rails_admin_jcrop 1.2.0 → 1.2.1

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: 4bd7b4dec4babbafb2ea4f763c4a85b7bf095881
4
- data.tar.gz: 6a5eb850d0d0c2504a0aba3def26c178b47a52e7
3
+ metadata.gz: b8d991eab65fb7f30df49d118a550cd73e8c40ff
4
+ data.tar.gz: 97fff698c39f9f6257dbca6ea60b6a42ed1f65c7
5
5
  SHA512:
6
- metadata.gz: 30bde63660bb507e3120493c4cf9c20b0dc7fedc868b62938ddc03e7bfcffcc59f825b0e24903b8385b5fc2c28e2205718671778b131fb56f10db6566e7c3930
7
- data.tar.gz: 2f77bcda104f21b381283c88e5a47afee72b478fb6ef9fc4ff4908aaed47e317ca47551c6514e5bf2274b48b593d8eeb1f8fa0dddfbece58a43bcc75e42035d4
6
+ metadata.gz: d25a648e40225a1ea69dd34a6f17aab80fff6343ad03b2be9b1d7c806583c6f32e4c4b8d9c03375104ca9193a4bdfb7bb0d3b1cd7d29e6c772fd4a8c9ca90d70
7
+ data.tar.gz: 1e96f8e8c0b88ff6f228c638fcfea3149d0d4564f32c4e713b5bbe6422c132f8285a0de67db477d09e5fdeed231e72c69ce32705c0a5764ec38fa1481c3c8a93
data/README.markdown CHANGED
@@ -122,6 +122,7 @@ Any help is encouraged. Here are some ways you can contribute:
122
122
 
123
123
  * [Alan Rosin Sikora](https://github.com/alansikora) ([alansikora](https://github.com/alansikora))
124
124
  * [cec](https://github.com/cec)
125
+ * [Alex Chien](https://github.com/AlexChien)
125
126
 
126
127
  ### And ... ###
127
128
 
@@ -37,8 +37,8 @@ module Paperclip
37
37
  if @attachment.instance.rails_admin_cropping?
38
38
  ary = super
39
39
  if i = ary.index('-crop')
40
- ary.delete_at i
41
40
  ary.delete_at i+1
41
+ ary.delete_at i
42
42
  end
43
43
  ['-crop', crop_params] + ary
44
44
  else
@@ -2,9 +2,9 @@ module RailsAdminJcrop
2
2
  module ImageHelper
3
3
 
4
4
  class <<self
5
- def crop(*args)
6
- processor = defined?(::Magick) ? 'rmagick' : 'minimagick'
7
- send("#{processor}_crop", *args)
5
+ def crop(img, w, h, x, y)
6
+ processor = img.class.name =~ /^MiniMagick/ ? 'minimagick' : 'rmagick'
7
+ send("#{processor}_crop", img, w, h, x, y)
8
8
  end
9
9
 
10
10
  def minimagick_crop(img, w, h, x, y)
@@ -1,3 +1,3 @@
1
1
  module RailsAdminJcrop
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin_jcrop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Xie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-27 00:00:00.000000000 Z
11
+ date: 2013-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -63,27 +63,27 @@ files:
63
63
  - app/assets/javascripts/rails_admin/ra.jcrop.js
64
64
  - app/views/rails_admin/main/_form_jcrop.html.haml
65
65
  - app/views/rails_admin/jcrop/edit.html.haml
66
- - config/locales/en.yml
67
66
  - config/routes.rb
68
- - lib/rails_admin_jcrop/version.rb
69
- - lib/rails_admin_jcrop/asset_engine.rb
70
- - lib/rails_admin_jcrop/asset_engine/paperclip.rb
71
- - lib/rails_admin_jcrop/asset_engine/carrier_wave.rb
72
- - lib/rails_admin_jcrop/image_helper.rb
67
+ - config/locales/en.yml
68
+ - lib/rails_admin_jcrop.rb
73
69
  - lib/rails_admin_jcrop/engine.rb
74
70
  - lib/rails_admin_jcrop/rails_admin.rb
75
- - lib/rails_admin_jcrop/orm.rb
76
71
  - lib/rails_admin_jcrop/orm/active_record.rb
77
72
  - lib/rails_admin_jcrop/orm/mongoid.rb
78
- - lib/rails_admin_jcrop.rb
79
- - vendor/assets/images/rails_admin/Jcrop.gif
73
+ - lib/rails_admin_jcrop/image_helper.rb
74
+ - lib/rails_admin_jcrop/orm.rb
75
+ - lib/rails_admin_jcrop/asset_engine.rb
76
+ - lib/rails_admin_jcrop/asset_engine/carrier_wave.rb
77
+ - lib/rails_admin_jcrop/asset_engine/paperclip.rb
78
+ - lib/rails_admin_jcrop/version.rb
79
+ - vendor/assets/javascripts/rails_admin/jquery.color.js
80
80
  - vendor/assets/javascripts/rails_admin/jquery.Jcrop.js
81
- - vendor/assets/javascripts/rails_admin/jquery.min.js
82
81
  - vendor/assets/javascripts/rails_admin/jquery.Jcrop.min.js
83
- - vendor/assets/javascripts/rails_admin/jquery.color.js
84
- - vendor/assets/stylesheets/rails_admin/jquery.Jcrop.css
82
+ - vendor/assets/javascripts/rails_admin/jquery.min.js
85
83
  - vendor/assets/stylesheets/rails_admin/Jcrop.gif
86
84
  - vendor/assets/stylesheets/rails_admin/jquery.Jcrop.min.css
85
+ - vendor/assets/stylesheets/rails_admin/jquery.Jcrop.css
86
+ - vendor/assets/images/rails_admin/Jcrop.gif
87
87
  - MIT-LICENSE
88
88
  - Rakefile
89
89
  - README.markdown
@@ -111,3 +111,4 @@ signing_key:
111
111
  specification_version: 4
112
112
  summary: Jcrop plugin for rails admin.
113
113
  test_files: []
114
+ has_rdoc: