couch_photo 1.0.0.beta.12 → 1.0.0.beta.13

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0.beta.12
1
+ 1.0.0.beta.13
@@ -1,3 +1,5 @@
1
+ require 'ftools'
2
+
1
3
  module CouchPhoto
2
4
  module VariationMetadata
3
5
  def path
@@ -47,11 +49,15 @@ module CouchPhoto
47
49
 
48
50
  def xmp_metadata
49
51
  tmp_image_uuid = `uuidgen`.strip
50
- tmp_image_file_name = "/tmp/#{tmp_image_uuid}.#{extension}"
52
+ tmp_image_file_name = "/tmp/#{tmp_image_uuid}.#{extension}"
51
53
  tmp_xmp_file_name = "/tmp/#{tmp_image_uuid}.xmp"
52
54
  mini_magick.write tmp_image_file_name
53
- `convert #{tmp_image_file_name} #{tmp_xmp_file_name} 2> /dev/null`
54
- Hash.from_xml File.read(tmp_xmp_file_name)
55
+ `convert #{tmp_image_file_name} #{tmp_xmp_file_name} 2> /dev/null`
56
+ meta_data = Hash.from_xml File.read(tmp_xmp_file_name)
57
+
58
+ File.safe_unlink(tmp_image_file_name)
59
+ File.safe_unlink(tmp_xmp_file_name)
60
+ meta_data
55
61
  end
56
62
 
57
63
  def url
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: 62196379
4
+ hash: 62196377
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
9
  - 0
10
10
  - beta
11
- - 12
12
- version: 1.0.0.beta.12
11
+ - 13
12
+ version: 1.0.0.beta.13
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-11-02 00:00:00 Z
20
+ date: 2012-01-18 00:00:00 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: cucumber