couch_photo 1.0.0.beta.11 → 1.0.0.beta.12
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/couch_photo/couch_photo.rb +9 -0
- data/lib/couch_photo/original.rb +2 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.0.beta.
|
1
|
+
1.0.0.beta.12
|
@@ -76,6 +76,15 @@ module CouchPhoto
|
|
76
76
|
def variations
|
77
77
|
@variations ||= load_variations
|
78
78
|
end
|
79
|
+
|
80
|
+
def regenerate_variations
|
81
|
+
generate_variations
|
82
|
+
@variations = load_variations
|
83
|
+
end
|
84
|
+
|
85
|
+
def reload_variations
|
86
|
+
@variations = load_variations
|
87
|
+
end
|
79
88
|
|
80
89
|
private
|
81
90
|
def load_variations
|
data/lib/couch_photo/original.rb
CHANGED
@@ -13,6 +13,8 @@ module CouchPhoto
|
|
13
13
|
|
14
14
|
if @document.has_attachment?(@attachment_name)
|
15
15
|
@document.update_attachment :name => @attachment_name, :file => FakeFile.new(@data)
|
16
|
+
@document.regenerate_variations
|
17
|
+
@document.reload_variations
|
16
18
|
else
|
17
19
|
@document.create_attachment :name => @attachment_name, :file => FakeFile.new(@data)
|
18
20
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: couch_photo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 62196379
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
9
|
- 0
|
10
10
|
- beta
|
11
|
-
-
|
12
|
-
version: 1.0.0.beta.
|
11
|
+
- 12
|
12
|
+
version: 1.0.0.beta.12
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Matt Parker
|