rails_admin_jcrop 1.3.0 → 1.4.0

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: 53d5489e657c9d9affc179738e5c61e0abc3b9eb
4
- data.tar.gz: 08e64cefde8e422604c65d31aef910fa878e5191
3
+ metadata.gz: 698215a17058dded1d3a8fe99cf82009e54729ed
4
+ data.tar.gz: 84de62206d48f4a18e6ca9bda452cbd421d7d90f
5
5
  SHA512:
6
- metadata.gz: 1507eebf55b314a1e6977009647972f4347f55e424a81d46cc1f76bd6371f7a9b0f6db88d433b4ff8f96b685f1fde89d6a9cf489a995897a84af23c3802f1e65
7
- data.tar.gz: 2c81e11ad84afe5a22e8df2d1a86d442e200e99a3d75d12800a167f07fe7977b0011b5cf6ac05e8c929d5b7b7cb8dfee16d5e07b76a12aaf082ecf49a126c555
6
+ metadata.gz: 8fdc043d952fa2e2208c437a12504911ca907bc9b55327514e1c444ad2e588843685e78184b03bc0c7847956f2543e250e720adc8f2346ad71af7313522c4181
7
+ data.tar.gz: 2248c99b98eea262a50c904e2986f026c74bf7026dade026dc3727f6ea6fa95d5fdc93e0d95e495b10207fa26e2065cd9f26d7ea2cca49da31fc4215821850e2
@@ -36,7 +36,7 @@ class AvatarUploader < CarrierWave::Uploader::Base
36
36
 
37
37
  version :thumb do
38
38
  process :rails_admin_crop
39
- process :resize_to_fill: [500,320]
39
+ process resize_to_fill: [500,320]
40
40
  end
41
41
 
42
42
  end
@@ -133,7 +133,8 @@ Any help is encouraged. Here are some ways you can contribute:
133
133
  * [Alan Rosin Sikora](https://github.com/alansikora) ([alansikora](https://github.com/alansikora))
134
134
  * [cec](https://github.com/cec)
135
135
  * [Alex Chien](https://github.com/AlexChien)
136
- * [Mitsuhiro Shibuya]([mshibuya](https://github.com/mshibuya))
136
+ * [Mitsuhiro Shibuya](https://github.com/mshibuya)
137
+ * [anant anil kolvankar](https://github.com/anantkolvankar)
137
138
 
138
139
  ### And ... ###
139
140
 
@@ -15,10 +15,33 @@ module RailsAdmin
15
15
 
16
16
  @image_tag_options = {}
17
17
  @image_tag_options[:class] = "jcrop-subject"
18
- @image_tag_options[:'data-geometry'] = geometry(@object.send(@field).path).join(",")
18
+ @file_path=''
19
+ #Condition for Carrierwave.
20
+ if @object.send(@field).class.to_s =~ /Uploader/
19
21
 
20
- if @fit_image
21
- fit_image_geometry = fit_image_geometry(@object.send(@field).path)
22
+ if @object.send(@field)._storage.to_s =~ /Fog/
23
+
24
+ @file_path=@object.send(@field).url
25
+ else
26
+
27
+ @file_path=@object.send(@field).path
28
+ end
29
+ #Condition for Paperclip.
30
+ elsif @object.send(@field).class.to_s =~ /Paperclip/
31
+
32
+ if (@object.send(@field).options[:storage].to_s =='s3')
33
+
34
+ @file_path=@object.send(@field).url
35
+ else
36
+
37
+ @file_path=@object.send(@field).path
38
+ end
39
+ end
40
+
41
+ @image_tag_options[:'data-geometry'] = geometry(@file_path).join(",")
42
+
43
+ if @fit_image_geometry
44
+ fit_image_geometry = fit_image_geometry(@file_path)
22
45
 
23
46
  @form_options[:'style'] = "margin-left: #{375 - (fit_image_geometry[0]/2) - 15}px;"
24
47
 
@@ -1,3 +1,3 @@
1
1
  module RailsAdminJcrop
2
- VERSION = "1.3.0"
2
+ VERSION = "1.4.0"
3
3
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin_jcrop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Xie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-08 00:00:00.000000000 Z
11
+ date: 2014-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 3.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 3.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails_admin
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.3.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.3.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: mini_magick
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: Jcrop plugin for rails admin. Image cropping made easy!
@@ -59,34 +59,34 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - app/controllers/rails_admin/jcrop_controller.rb
62
+ - MIT-LICENSE
63
+ - README.markdown
64
+ - Rakefile
63
65
  - app/assets/javascripts/rails_admin/ra.jcrop.js
64
- - app/views/rails_admin/main/_form_jcrop.html.haml
66
+ - app/controllers/rails_admin/jcrop_controller.rb
65
67
  - app/views/rails_admin/jcrop/edit.html.haml
66
- - config/routes.rb
68
+ - app/views/rails_admin/main/_form_jcrop.html.haml
67
69
  - config/locales/en.yml
70
+ - config/routes.rb
68
71
  - lib/rails_admin_jcrop.rb
69
- - lib/rails_admin_jcrop/engine.rb
70
- - lib/rails_admin_jcrop/rails_admin.rb
71
- - lib/rails_admin_jcrop/orm/active_record.rb
72
- - lib/rails_admin_jcrop/orm/mongoid.rb
73
- - lib/rails_admin_jcrop/image_helper.rb
74
- - lib/rails_admin_jcrop/orm.rb
75
72
  - lib/rails_admin_jcrop/asset_engine.rb
76
73
  - lib/rails_admin_jcrop/asset_engine/carrier_wave.rb
77
74
  - lib/rails_admin_jcrop/asset_engine/paperclip.rb
75
+ - lib/rails_admin_jcrop/engine.rb
76
+ - lib/rails_admin_jcrop/image_helper.rb
77
+ - lib/rails_admin_jcrop/orm.rb
78
+ - lib/rails_admin_jcrop/orm/active_record.rb
79
+ - lib/rails_admin_jcrop/orm/mongoid.rb
80
+ - lib/rails_admin_jcrop/rails_admin.rb
78
81
  - lib/rails_admin_jcrop/version.rb
79
- - vendor/assets/javascripts/rails_admin/jquery.color.js
82
+ - vendor/assets/images/rails_admin/Jcrop.gif
80
83
  - vendor/assets/javascripts/rails_admin/jquery.Jcrop.js
81
84
  - vendor/assets/javascripts/rails_admin/jquery.Jcrop.min.js
85
+ - vendor/assets/javascripts/rails_admin/jquery.color.js
82
86
  - vendor/assets/javascripts/rails_admin/jquery.min.js
83
87
  - vendor/assets/stylesheets/rails_admin/Jcrop.gif
84
- - vendor/assets/stylesheets/rails_admin/jquery.Jcrop.min.css
85
88
  - vendor/assets/stylesheets/rails_admin/jquery.Jcrop.css
86
- - vendor/assets/images/rails_admin/Jcrop.gif
87
- - MIT-LICENSE
88
- - Rakefile
89
- - README.markdown
89
+ - vendor/assets/stylesheets/rails_admin/jquery.Jcrop.min.css
90
90
  homepage: https://github.com/janx/rails_admin_jcrop
91
91
  licenses: []
92
92
  metadata: {}
@@ -96,19 +96,18 @@ require_paths:
96
96
  - lib
97
97
  required_ruby_version: !ruby/object:Gem::Requirement
98
98
  requirements:
99
- - - '>='
99
+ - - ">="
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
102
  required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  requirements:
104
- - - '>='
104
+ - - ">="
105
105
  - !ruby/object:Gem::Version
106
106
  version: '0'
107
107
  requirements: []
108
108
  rubyforge_project:
109
- rubygems_version: 2.1.11
109
+ rubygems_version: 2.2.2
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: Jcrop plugin for rails admin.
113
113
  test_files: []
114
- has_rdoc: