diff --git a/Gemfile.lock b/Gemfile.lock index 3563ae4..dd1a436 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: git://github.com/gregbell/active_admin.git - revision: f21cff30e7212706a39710e2c70ad0af8087ccea + revision: 65aae6b68e78aad3071b2f85242b19fd3fccf426 branch: master specs: activeadmin (1.0.0.pre) @@ -8,12 +8,12 @@ GIT bourbon coffee-rails devise (~> 3.2) - formtastic (~> 2.3.0.rc2) + formtastic (~> 2.3.0.rc3) inherited_resources (~> 1.3) jquery-rails jquery-ui-rails kaminari (~> 0.15) - rails (>= 3.2, < 4.1) + rails (>= 3.2, <= 4.1) ransack (~> 1.0) sass-rails @@ -22,64 +22,65 @@ PATH specs: activeadmin-dragonfly (0.0.2) activeadmin - dragonfly (= 0.9.15) + dragonfly rack-cache GEM remote: https://rubygems.org/ specs: - actionmailer (4.0.2) - actionpack (= 4.0.2) + actionmailer (4.1.0) + actionpack (= 4.1.0) + actionview (= 4.1.0) mail (~> 2.5.4) - actionpack (4.0.2) - activesupport (= 4.0.2) - builder (~> 3.1.0) - erubis (~> 2.7.0) + actionpack (4.1.0) + actionview (= 4.1.0) + activesupport (= 4.1.0) rack (~> 1.5.2) rack-test (~> 0.6.2) - activemodel (4.0.2) - activesupport (= 4.0.2) - builder (~> 3.1.0) - activerecord (4.0.2) - activemodel (= 4.0.2) - activerecord-deprecated_finders (~> 1.0.2) - activesupport (= 4.0.2) - arel (~> 4.0.0) - activerecord-deprecated_finders (1.0.3) - activesupport (4.0.2) - i18n (~> 0.6, >= 0.6.4) - minitest (~> 4.2) - multi_json (~> 1.3) + actionview (4.1.0) + activesupport (= 4.1.0) + builder (~> 3.1) + erubis (~> 2.7.0) + activemodel (4.1.0) + activesupport (= 4.1.0) + builder (~> 3.1) + activerecord (4.1.0) + activemodel (= 4.1.0) + activesupport (= 4.1.0) + arel (~> 5.0.0) + activesupport (4.1.0) + i18n (~> 0.6, >= 0.6.9) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) thread_safe (~> 0.1) - tzinfo (~> 0.3.37) + tzinfo (~> 1.1) arbre (1.0.1) activesupport (>= 3.0.0) - arel (4.0.1) - atomic (1.1.14) - bcrypt-ruby (3.1.2) - bourbon (3.1.8) - sass (>= 3.2.0) + arel (5.0.1.20140414130214) + bcrypt (3.1.7) + bourbon (3.2.0) + sass (~> 3.2) thor - builder (3.1.4) + builder (3.2.2) coffee-rails (4.0.1) coffee-script (>= 2.2.0) railties (>= 4.0.0, < 5.0) coffee-script (2.2.0) coffee-script-source execjs - coffee-script-source (1.6.3) - devise (3.2.2) - bcrypt-ruby (~> 3.0) + coffee-script-source (1.7.0) + devise (3.2.4) + bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 3.2.6, < 5) thread_safe (~> 0.1) warden (~> 1.2.3) - dragonfly (0.9.15) + dragonfly (1.0.4) multi_json (~> 1.0) rack erubis (2.7.0) execjs (2.0.2) - formtastic (2.3.0.rc2) + formtastic (2.3.0.rc3) actionpack (>= 3.0) has_scope (0.6.0.rc) actionpack (>= 3.2, < 5) @@ -89,11 +90,12 @@ GEM inherited_resources (1.4.1) has_scope (~> 0.6.0.rc) responders (~> 1.0.0.rc) - jquery-rails (3.0.4) + jquery-rails (3.1.0) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) - jquery-ui-rails (4.1.1) - railties (>= 3.1.0) + jquery-ui-rails (4.2.1) + railties (>= 3.2.16) + json (1.8.1) kaminari (0.15.1) actionpack (>= 3.0.0) activesupport (>= 3.0.0) @@ -101,59 +103,64 @@ GEM mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.25.1) - minitest (4.7.5) - multi_json (1.8.4) + minitest (5.3.3) + multi_json (1.9.2) orm_adapter (0.5.0) - polyamorous (0.6.4) + polyamorous (1.0.0) activerecord (>= 3.0) - polyglot (0.3.3) + polyglot (0.3.4) rack (1.5.2) rack-cache (1.2) rack (>= 0.4) rack-test (0.6.2) rack (>= 1.0) - rails (4.0.2) - actionmailer (= 4.0.2) - actionpack (= 4.0.2) - activerecord (= 4.0.2) - activesupport (= 4.0.2) + rails (4.1.0) + actionmailer (= 4.1.0) + actionpack (= 4.1.0) + actionview (= 4.1.0) + activemodel (= 4.1.0) + activerecord (= 4.1.0) + activesupport (= 4.1.0) bundler (>= 1.3.0, < 2.0) - railties (= 4.0.2) - sprockets-rails (~> 2.0.0) - railties (4.0.2) - actionpack (= 4.0.2) - activesupport (= 4.0.2) + railties (= 4.1.0) + sprockets-rails (~> 2.0) + railties (4.1.0) + actionpack (= 4.1.0) + activesupport (= 4.1.0) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (10.1.1) - ransack (1.1.0) + rake (10.3.1) + ransack (1.2.2) actionpack (>= 3.0) activerecord (>= 3.0) - polyamorous (~> 0.6.0) + activesupport (>= 3.0) + i18n + polyamorous (~> 1.0.0) responders (1.0.0) railties (>= 3.2, < 5) - sass (3.2.13) - sass-rails (4.0.1) + sass (3.2.19) + sass-rails (4.0.3) railties (>= 4.0.0, < 5.0) - sass (>= 3.1.10) - sprockets-rails (~> 2.0.0) - sprockets (2.10.1) + 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) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.0.1) + sprockets-rails (2.1.3) actionpack (>= 3.0) activesupport (>= 3.0) sprockets (~> 2.8) - thor (0.18.1) - thread_safe (0.1.3) - atomic + thor (0.19.1) + thread_safe (0.3.3) tilt (1.4.1) treetop (1.4.15) polyglot polyglot (>= 0.3.1) - tzinfo (0.3.38) + tzinfo (1.1.0) + thread_safe (~> 0.1) warden (1.2.3) rack (>= 1.0) diff --git a/activeadmin-dragonfly.gemspec b/activeadmin-dragonfly.gemspec index d212d60..edbe8e6 100644 --- a/activeadmin-dragonfly.gemspec +++ b/activeadmin-dragonfly.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |s| s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.md"] s.add_dependency "activeadmin" - s.add_dependency "dragonfly", "0.9.15" + s.add_dependency "dragonfly", "~>1.0" s.add_dependency "rack-cache" end diff --git a/lib/active_admin/dragonfly/engine.rb b/lib/active_admin/dragonfly/engine.rb index 28951ee..b64d161 100644 --- a/lib/active_admin/dragonfly/engine.rb +++ b/lib/active_admin/dragonfly/engine.rb @@ -5,11 +5,6 @@ module Dragonfly class Engine < ::Rails::Engine initializer "Railsyard precompile hook", group: :all do |app| - # check if someone already initialized Dragonfly for Rails - unless ActiveRecord::Base.methods.include? :image_accessor - require 'dragonfly/rails/images' - end - app.config.assets.precompile += [ "active_admin/active_admin_dragonfly.js", "active_admin/active_admin_dragonfly.css" diff --git a/lib/formtastic/inputs/dragonfly_input.rb b/lib/formtastic/inputs/dragonfly_input.rb index 813b8b5..57b9415 100644 --- a/lib/formtastic/inputs/dragonfly_input.rb +++ b/lib/formtastic/inputs/dragonfly_input.rb @@ -52,7 +52,7 @@ def fragment_label(fragment) if labels_from_options.key?(fragment) labels_from_options[fragment] else - ::I18n.t(fragment.to_s, :default => fragment.to_s.humanize, :scope => [:dragonfly]) + t(fragment.to_s, :default => fragment.to_s.humanize) end end @@ -68,7 +68,7 @@ def fragment_upload_html def is_image?(file) file.mime_type =~ /png|bmp|gif|tif|jpe?g/ - rescue Dragonfly::DataStorage::DataNotFound + rescue Dragonfly::Job::Fetch::NotFound false end @@ -84,7 +84,7 @@ def fragment_preview_html fragment_download_html end else - fragment_label_html(:preview) << "