active_admin_jcrop 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 326e21766767012bd356d954661fecb173d2a1c0
4
- data.tar.gz: 09a6046da3b1a2655ba0c0604d9cd93be7bb4b56
3
+ metadata.gz: 9e9fce20298ee9a26815ef13a02cbe86fe31aeac
4
+ data.tar.gz: 5f215eaf265c9193974ddd7952beee004866c01e
5
5
  SHA512:
6
- metadata.gz: 7c0a421d432be71597f87b22d9cd92de14390cc9eddf537b1e373f143b964441eb06036419bfa6ffaea497bcd7c0c20503905aec694c383a0d293448136bfcbb
7
- data.tar.gz: bcfed065aa3371c04da0507ce67cbec98ceecf358644616e3e61438c2e1792280aeb6ec0001b894dcafa17ba826a47c6d1a317172b0dfd84db9b4be0e81a7907
6
+ metadata.gz: a9042855b869ae6f22d8423a86aa0094e59b22d153113242088738b1bb657a5d5322b409d0b166d2ac0aa7feda42fa1fb3b1442a477eac02283fba09576442ca
7
+ data.tar.gz: 7e0154e0c0ff9a551cbd5b894755fa44f579fe6d7ca50b06f2b92dac95109584cb76b47f847b320d9a53cc52b1dac8a9b797abbc5780fa103bc28b267e4782e7
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2014 YOURNAME
1
+ Copyright 2014 Ricardo Nacif <nacif.ricardo@gmail.com>
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -18,9 +18,12 @@ module Paperclip
18
18
  def has_attached_file(*args)
19
19
  super
20
20
 
21
- self.attachment_definitions.each do |name, options|
22
- options[:processors] ||= []
23
- options[:processors] << :active_admin_jcropper
21
+ attribute_name = args[0]
22
+ definition = attachment_definitions[attribute_name]
23
+ definition[:processors] ||= []
24
+
25
+ unless definition[:processors].include?(:active_admin_jcropper)
26
+ definition[:processors] << :active_admin_jcropper
24
27
  end
25
28
  end
26
29
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveAdminJcrop
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -23,7 +23,7 @@ module Formtastic
23
23
 
24
24
  def jcrop_options
25
25
  options[:jcrop_options] ||= {}
26
- options[:jcrop_options].assert_valid_keys(:aspectRatio, :minSize, :maxSize, :setSelect, :bgColor, :bgOpacity)
26
+ options[:jcrop_options].assert_valid_keys(:aspectRatio, :minSize, :maxSize, :setSelect, :bgColor, :bgOpacity, :boxWidth)
27
27
  options[:jcrop_options].reverse_merge!(setSelect: [0,0,100,100])
28
28
  end
29
29
 
@@ -0,0 +1,2 @@
1
+ ActiveRecord::SchemaMigration Load (71.9ms) SELECT `schema_migrations`.* FROM `schema_migrations`
2
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT `schema_migrations`.* FROM `schema_migrations`
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_admin_jcrop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Nacif
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-18 00:00:00.000000000 Z
11
+ date: 2014-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -273,6 +273,7 @@ files:
273
273
  - spec/dummy/db/migrate/20140609202215_devise_create_admin_users.rb
274
274
  - spec/dummy/db/migrate/20140619201236_drop_admin_user_table.rb
275
275
  - spec/dummy/db/schema.rb
276
+ - spec/dummy/log/test.log
276
277
  - spec/dummy/public/404.html
277
278
  - spec/dummy/public/422.html
278
279
  - spec/dummy/public/500.html
@@ -354,6 +355,7 @@ test_files:
354
355
  - spec/dummy/db/migrate/20140609202215_devise_create_admin_users.rb
355
356
  - spec/dummy/db/migrate/20140619201236_drop_admin_user_table.rb
356
357
  - spec/dummy/db/schema.rb
358
+ - spec/dummy/log/test.log
357
359
  - spec/dummy/public/404.html
358
360
  - spec/dummy/public/422.html
359
361
  - spec/dummy/public/500.html