couch_photo 1.0.0.beta.10 → 1.0.0.beta.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/couch_photo/original.rb +7 -1
  3. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0.beta.10
1
+ 1.0.0.beta.11
@@ -10,7 +10,13 @@ module CouchPhoto
10
10
  extension = File.extname filename
11
11
  @data = data
12
12
  @attachment_name = "variations/original#{extension}"
13
- @document.create_attachment :name => @attachment_name, :file => FakeFile.new(@data)
13
+
14
+ if @document.has_attachment?(@attachment_name)
15
+ @document.update_attachment :name => @attachment_name, :file => FakeFile.new(@data)
16
+ else
17
+ @document.create_attachment :name => @attachment_name, :file => FakeFile.new(@data)
18
+ end
19
+
14
20
  @document.original_filename = File.basename(filename)
15
21
  @document.xmp_metadata = xmp_metadata if @document.class.extract_xmp_metadata?
16
22
  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: 62196375
4
+ hash: 62196373
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
9
  - 0
10
10
  - beta
11
- - 10
12
- version: 1.0.0.beta.10
11
+ - 11
12
+ version: 1.0.0.beta.11
13
13
  platform: ruby
14
14
  authors:
15
15
  - Matt Parker
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-10-04 00:00:00 Z
20
+ date: 2011-11-02 00:00:00 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: cucumber