exifr 1.3.3 → 1.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG +3 -0
- data/Gemfile +2 -0
- data/README.rdoc +5 -0
- data/lib/exifr/jpeg.rb +6 -2
- data/lib/exifr/tiff.rb +6 -2
- data/tests/jpeg_test.rb +7 -0
- data/tests/tiff_test.rb +7 -0
- metadata +33 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 761b2bd6bc3860282c9ccb81711700387f6c5ff9921c27bc1a5788b73d56a644
|
4
|
+
data.tar.gz: a23be2354eb6a013b68b1b04356d1dd7a1c89adafb115dee7df69ed56d3e30c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4162bf20d1ccf018cbdd007a8ba9ec2d5144171d2f6a76e737066dd73fac6476638232b62d4deabfb06d27bf56a19c2fc59362e7f3bf5e06b3bef0ceb02c3f99
|
7
|
+
data.tar.gz: 4992021fb7dbb28501e9c913fc54b0a3a3eaf58fca79c3303a6596c78b1c4daabcacd686ae44074470f491d42900c3250003f1059e5aa4b7192f71ed212352b4
|
data/CHANGELOG
CHANGED
data/Gemfile
ADDED
data/README.rdoc
CHANGED
@@ -50,6 +50,11 @@ Or when the application depends on ActiveSupport for time zone handling:
|
|
50
50
|
If you need to access XMP data you can use the xmp gem. More info and
|
51
51
|
examples at https://github.com/amberbit/xmp
|
52
52
|
|
53
|
+
== Development and running tests
|
54
|
+
|
55
|
+
On a fresh checkout of the repository, run `bundle install` and then
|
56
|
+
`bundle exec rake test`
|
57
|
+
|
53
58
|
== Author
|
54
59
|
R.W. van 't Veer
|
55
60
|
|
data/lib/exifr/jpeg.rb
CHANGED
@@ -66,8 +66,12 @@ module EXIFR
|
|
66
66
|
super || methods.include?(method) || (include_all && private_methods.include?(method))
|
67
67
|
end
|
68
68
|
|
69
|
-
def methods # :nodoc:
|
70
|
-
|
69
|
+
def methods(regular=true) # :nodoc:
|
70
|
+
if regular
|
71
|
+
super + TIFF::TAGS << :gps
|
72
|
+
else
|
73
|
+
super
|
74
|
+
end
|
71
75
|
end
|
72
76
|
|
73
77
|
class << self
|
data/lib/exifr/tiff.rb
CHANGED
@@ -423,8 +423,12 @@ module EXIFR
|
|
423
423
|
TAGS.include?(method)
|
424
424
|
end
|
425
425
|
|
426
|
-
def methods # :nodoc:
|
427
|
-
|
426
|
+
def methods(regular=true) # :nodoc:
|
427
|
+
if regular
|
428
|
+
(super + TAGS + IFD.instance_methods(false)).uniq
|
429
|
+
else
|
430
|
+
super
|
431
|
+
end
|
428
432
|
end
|
429
433
|
|
430
434
|
def encode_with(coder)
|
data/tests/jpeg_test.rb
CHANGED
@@ -103,6 +103,13 @@ class JPEGTest < TestCase
|
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
106
|
+
def test_methods_method
|
107
|
+
j = JPEG.new(f('exif.jpg'))
|
108
|
+
assert j.methods.include?(:date_time)
|
109
|
+
assert j.methods(true).include?(:date_time)
|
110
|
+
refute j.methods(false).include?(:date_time)
|
111
|
+
end
|
112
|
+
|
106
113
|
def test_multiple_app1
|
107
114
|
assert JPEG.new(f('multiple-app1.jpg')).exif?
|
108
115
|
end
|
data/tests/tiff_test.rb
CHANGED
@@ -199,4 +199,11 @@ class TIFFTest < TestCase
|
|
199
199
|
def test_nul_terminated_strings
|
200
200
|
assert_equal 'GoPro', TIFF.new(f('gopro_hd2.exif')).make
|
201
201
|
end
|
202
|
+
|
203
|
+
def test_methods_method
|
204
|
+
t = TIFF.new(f('gopro_hd2.exif'))
|
205
|
+
assert t.methods.include?(:make)
|
206
|
+
assert t.methods(true).include?(:make)
|
207
|
+
refute t.methods(false).include?(:make)
|
208
|
+
end
|
202
209
|
end
|
metadata
CHANGED
@@ -1,15 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exifr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- R.W. van 't Veer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
11
|
+
date: 2018-05-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: test-unit
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.1.5
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.1.5
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10'
|
13
41
|
description: EXIF Reader is a module to read EXIF from JPEG and TIFF images.
|
14
42
|
email: exifr@remworks.net
|
15
43
|
executables:
|
@@ -20,6 +48,7 @@ extra_rdoc_files:
|
|
20
48
|
- CHANGELOG
|
21
49
|
files:
|
22
50
|
- CHANGELOG
|
51
|
+
- Gemfile
|
23
52
|
- README.rdoc
|
24
53
|
- Rakefile
|
25
54
|
- bin/exifr
|
@@ -77,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
106
|
version: '0'
|
78
107
|
requirements: []
|
79
108
|
rubyforge_project:
|
80
|
-
rubygems_version: 2.6
|
109
|
+
rubygems_version: 2.7.6
|
81
110
|
signing_key:
|
82
111
|
specification_version: 4
|
83
112
|
summary: Read EXIF from JPEG and TIFF images
|