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 +1 -1
- data/ext/exiv2/exiv2.cpp +1 -0
- data/lib/exiv2/version.rb +1 -1
- data/spec/exiv2_spec.rb +6 -0
- metadata +4 -4
data/Gemfile.lock
CHANGED
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
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:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
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-
|
18
|
+
date: 2011-02-02 00:00:00 +11:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|