Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 50 additions & 58 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
rich (1.4.8)
rich (1.4.9)
jquery-rails
kaminari
mime-types
Expand All @@ -12,27 +12,27 @@ PATH
GEM
remote: http://rubygems.org/
specs:
actionmailer (4.1.1)
actionpack (= 4.1.1)
actionview (= 4.1.1)
mail (~> 2.5.4)
actionpack (4.1.1)
actionview (= 4.1.1)
activesupport (= 4.1.1)
actionmailer (4.1.12)
actionpack (= 4.1.12)
actionview (= 4.1.12)
mail (~> 2.5, >= 2.5.4)
actionpack (4.1.12)
actionview (= 4.1.12)
activesupport (= 4.1.12)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
actionview (4.1.1)
activesupport (= 4.1.1)
actionview (4.1.12)
activesupport (= 4.1.12)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.1)
activesupport (= 4.1.1)
activemodel (4.1.12)
activesupport (= 4.1.12)
builder (~> 3.1)
activerecord (4.1.1)
activemodel (= 4.1.1)
activesupport (= 4.1.1)
activerecord (4.1.12)
activemodel (= 4.1.12)
activesupport (= 4.1.12)
arel (~> 5.0.0)
activesupport (4.1.1)
activesupport (4.1.12)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
Expand All @@ -41,65 +41,57 @@ GEM
arel (5.0.1.20140414130214)
builder (3.2.2)
erubis (2.7.0)
hike (1.2.3)
i18n (0.6.9)
jquery-rails (3.1.0)
i18n (0.7.0)
jquery-rails (3.1.3)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
kaminari (0.16.1)
json (1.8.3)
kaminari (0.16.3)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25.1)
minitest (5.3.5)
multi_json (1.10.1)
polyglot (0.3.5)
rack (1.5.2)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mime-types (2.6.1)
minitest (5.8.0)
multi_json (1.11.2)
rack (1.5.5)
rack-raw-upload (1.1.1)
multi_json
rack-test (0.6.2)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.1.1)
actionmailer (= 4.1.1)
actionpack (= 4.1.1)
actionview (= 4.1.1)
activemodel (= 4.1.1)
activerecord (= 4.1.1)
activesupport (= 4.1.1)
rails (4.1.12)
actionmailer (= 4.1.12)
actionpack (= 4.1.12)
actionview (= 4.1.12)
activemodel (= 4.1.12)
activerecord (= 4.1.12)
activesupport (= 4.1.12)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.1)
railties (= 4.1.12)
sprockets-rails (~> 2.0)
railties (4.1.1)
actionpack (= 4.1.1)
activesupport (= 4.1.1)
railties (4.1.12)
actionpack (= 4.1.12)
activesupport (= 4.1.12)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.3.2)
sass (3.2.19)
sass-rails (4.0.3)
rake (10.4.2)
sass (3.4.18)
sass-rails (5.0.3)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.0)
sprockets (~> 2.8, <= 2.11.0)
sprockets-rails (~> 2.0)
sprockets (2.11.0)
hike (~> 1.2)
multi_json (~> 1.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (~> 1.1)
sprockets (3.2.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.1.3)
sprockets-rails (2.3.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sprockets (>= 2.8, < 4.0)
thor (0.19.1)
thread_safe (0.3.4)
thread_safe (0.3.5)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (1.2.1)
tzinfo (1.2.2)
thread_safe (~> 0.1)

PLATFORMS
Expand Down
1 change: 1 addition & 0 deletions app/models/rich/rich_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class RichFile < ActiveRecord::Base
paginates_per Rich.options[:paginates_per]

has_attached_file :rich_file,
:processors => Proc.new { Rich.image_processors },
:styles => Proc.new {|a| a.instance.set_styles },
:convert_options => Proc.new { |a| Rich.convert_options[a] }
if self.respond_to?(:do_not_validate_attachment_file_type)
Expand Down
3 changes: 1 addition & 2 deletions app/views/rich/files/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
</ul>

</header>

<div id="legacy-form"><%= form_for(@rich_asset, :url => files_path) do |f| %>
<div id="legacy-form"><%= form_for(@rich_asset, :url => rich.files_path) do |f| %>
<p><%= f.file_field :rich_file%></p>
<%= f.submit("Upload") %>
<% end %>
Expand Down
9 changes: 9 additions & 0 deletions lib/rich.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ def self.image_styles=(image_styles)
:thumb => "100x100#"
}

# configure image processors
def self.image_processors
@@image_processors
end
def self.image_processors=(image_processors)
@@image_processors = image_processors
end
@@image_processors = [:thumbnail]

mattr_accessor :convert_options
@@convert_options = {}

Expand Down
1 change: 1 addition & 0 deletions lib/rich/backends/paperclip.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module Paperclip

included do
has_attached_file :rich_file,
:processors => Proc.new { Rich.image_processors },
:styles => Proc.new {|a| a.instance.set_styles },
:convert_options => Proc.new { |a| Rich.convert_options[a] }

Expand Down
2 changes: 1 addition & 1 deletion lib/rich/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Rich
VERSION = "1.4.8"
VERSION = "1.4.11"
end
2 changes: 1 addition & 1 deletion vendor/assets/javascripts/ckeditor/skins/moono/editor.css

Large diffs are not rendered by default.