exiv2 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- exiv2 (0.0.1)
4
+ exiv2 (0.0.3)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
data/ext/exiv2/exiv2.cpp CHANGED
@@ -8,6 +8,7 @@ static VALUE to_ruby_string(const std::string& string) {
8
8
 
9
9
  // Create a C++ std::string from a Ruby string.
10
10
  static std::string to_std_string(VALUE string) {
11
+ string = StringValue(string); // Convert the Ruby object to a string if it isn't one.
11
12
  return std::string(RSTRING(string)->ptr, RSTRING(string)->len);
12
13
  }
13
14
 
data/lib/exiv2/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Exiv2
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/spec/exiv2_spec.rb CHANGED
@@ -25,6 +25,12 @@ describe Exiv2 do
25
25
  }
26
26
  end
27
27
 
28
+ it "should handle a Pathname being passed to open" do
29
+ image = Exiv2::ImageFactory.open(Pathname.new("spec/files/test.jpg"))
30
+ image.read_metadata
31
+ image.iptc_data.to_hash.should_not be_empty
32
+ end
33
+
28
34
  it "should raise an error when trying to open a non-existant file" do
29
35
  expect {
30
36
  Exiv2::ImageFactory.open("tmp/no-such-file.jpg")
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exiv2
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pete Yandell
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-27 00:00:00 +11:00
18
+ date: 2011-02-02 00:00:00 +11:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency