uploadbox 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/_manager.coffee +3 -2
- data/lib/uploadbox/image_uploader.rb +14 -4
- data/lib/uploadbox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a228230591c42ba12a0d67a19d78687d517b0999
|
4
|
+
data.tar.gz: 20665764002ee49e024075d09019cb929927453c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94e8e924cc31221601c5138249e18ff68fa3234d1dd0a914fc3c65fc519d1ab0dcf78e2bb9d19e50069770140d8a2fe7267ae42ba9cc28552bd025f256584204
|
7
|
+
data.tar.gz: 339752d9959bf1b1b741b812ad08c9344f8d52e88a4d568ece70019d14629bda5666bab491e5eec21eacab3fb130994a5b5fe50f0fa12137a63e91a4b6933265
|
@@ -7,9 +7,10 @@ class @Manager
|
|
7
7
|
|
8
8
|
for className in classNames
|
9
9
|
try
|
10
|
-
instance = new (eval(className))(container)
|
11
10
|
instanceName = Manager.getInstanceName(className)
|
12
|
-
container.data(instanceName
|
11
|
+
unless container.data(instanceName)
|
12
|
+
instance = new (eval(className))(container)
|
13
|
+
container.data(instanceName, instance)
|
13
14
|
catch error
|
14
15
|
try
|
15
16
|
console.warn "#{className} component not found"
|
@@ -15,7 +15,10 @@ module Uploadbox
|
|
15
15
|
imageable_type = self.to_s
|
16
16
|
upload_class_name = imageable_type + upload_name.to_s.camelize
|
17
17
|
upload_class = Class.new(Image)
|
18
|
-
|
18
|
+
|
19
|
+
unless Uploadbox.const_defined?(upload_class_name)
|
20
|
+
Uploadbox.const_set(upload_class_name, upload_class)
|
21
|
+
end
|
19
22
|
|
20
23
|
# @post.picture?
|
21
24
|
define_method("#{upload_name}?") do
|
@@ -83,7 +86,9 @@ module Uploadbox
|
|
83
86
|
|
84
87
|
# Uploabox::PostPictureUploader < UploadBox::ImgProcessing < CarrierWave
|
85
88
|
dynamic_uploader = Class.new(Uploadbox::ImageProcessingUploader)
|
86
|
-
|
89
|
+
unless Uplaodbox.const_defined?(self.name.demodulize + 'Uploader')
|
90
|
+
Uploadbox.const_set(self.name.demodulize + 'Uploader', dynamic_uploader)
|
91
|
+
end
|
87
92
|
dynamic_uploader.class_eval do
|
88
93
|
upload_versions.each do |version_name, dimensions|
|
89
94
|
if options[:retina]
|
@@ -134,7 +139,10 @@ module Uploadbox
|
|
134
139
|
imageable_type = self.to_s
|
135
140
|
upload_class_name = imageable_type + upload_name.to_s.camelize
|
136
141
|
upload_class = Class.new(Image)
|
137
|
-
|
142
|
+
|
143
|
+
unless Uploadbox.const_defined?(upload_class_name)
|
144
|
+
Uploadbox.const_set(upload_class_name, upload_class)
|
145
|
+
end
|
138
146
|
|
139
147
|
# @post.images?
|
140
148
|
define_method("#{upload_name}?") do
|
@@ -171,7 +179,9 @@ module Uploadbox
|
|
171
179
|
|
172
180
|
# Uploabox::PostPictureUploader < UploadBox::ImgProcessing < CarrierWave
|
173
181
|
dynamic_uploader = Class.new(Uploadbox::ImageProcessingUploader)
|
174
|
-
Uploadbox.
|
182
|
+
Uploadbox.const_defined?(self.name.demodulize + 'Uploader')
|
183
|
+
Uploadbox.const_set(self.name.demodulize + 'Uploader', dynamic_uploader)
|
184
|
+
end
|
175
185
|
dynamic_uploader.class_eval do
|
176
186
|
upload_versions.each do |version_name, dimensions|
|
177
187
|
if options[:retina]
|
data/lib/uploadbox/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uploadbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julio Protzek
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-11-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|