exifr 1.2.4 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 58dd69f23caf259884c52a2a7fdfcb0ea963b197
4
- data.tar.gz: e59b53e2bee8394c31890898700f1647646e88ba
3
+ metadata.gz: d9ac6553d42bb5f17abdd4092b39c4718ef73036
4
+ data.tar.gz: 481f598f4ac68d65f36a96979c384a9ae630fa54
5
5
  SHA512:
6
- metadata.gz: 54e2121231c33fa26cf61bbaf291f46d5aaf6fb1cf0da47919ffe0f42c9155c2b5d9feb42cf9f15fdb6d95b57c88bd659a798d3d3edcf3e3c582df73d752ec6e
7
- data.tar.gz: c8e6263af3eabf45425860090e3105acc79661a648d335e3f9be719b34768b396f66634e695ab75841f9bb4a0fdeebe94c2b5d6768f3b5293231c77204440298
6
+ metadata.gz: 8c0e17c14a6c8b458717459c2aa5397c4520b968319bce43c240a56d8963b34225e0064edafeee3decd9dc287329104a4b792e1d34436696ff2df21b382e7849
7
+ data.tar.gz: 1765feeb043209fa869f2c19f36ce53559e3e021716d576c608f8d41a3e97119dcd78cf43069d6c81cc61ff26806fa5a593c335fc959b00e286a1c6eb92e1e19
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ EXIF Reader 1.2.5
2
+ * bug fix; "[GH#46] Having stringified methods is not a good idea"; thanks Filipe Costa
3
+ * bug fix; "Fix typo in subsec_time_original key"; thanks Filipe Costa
4
+
1
5
  EXIF Reader 1.2.4
2
6
  * bug fix; "[GH#43] Fix `respond_to?` signature"; thanks Pete Johns
3
7
 
@@ -57,22 +57,22 @@ module EXIFR
57
57
  # +method+ does exist for EXIF data +nil+ will be returned.
58
58
  def method_missing(method, *args)
59
59
  super unless args.empty?
60
- super unless methods.include?(method.to_s)
60
+ super unless methods.include?(method)
61
61
  @exif.send method if defined?(@exif) && @exif
62
62
  end
63
63
 
64
64
  def respond_to?(method, include_all = false) # :nodoc:
65
- super || methods.include?(method.to_s) || (include_all && private_methods.include?(method))
65
+ super || methods.include?(method) || (include_all && private_methods.include?(method))
66
66
  end
67
67
 
68
68
  def methods # :nodoc:
69
- super + TIFF::TAGS << "gps"
69
+ super + TIFF::TAGS << :gps
70
70
  end
71
71
 
72
72
  class << self
73
73
  alias instance_methods_without_jpeg_extras instance_methods
74
74
  def instance_methods(include_super = true) # :nodoc:
75
- instance_methods_without_jpeg_extras(include_super) + TIFF::TAGS << "gps"
75
+ instance_methods_without_jpeg_extras(include_super) + TIFF::TAGS << :gps
76
76
  end
77
77
  end
78
78
 
@@ -169,7 +169,7 @@ module EXIFR
169
169
  0x927c => :maker_note,
170
170
  0x9286 => :user_comment,
171
171
  0x9290 => :subsec_time,
172
- 0x9291 => :subsec_time_orginal,
172
+ 0x9291 => :subsec_time_original,
173
173
  0x9292 => :subsec_time_digitized,
174
174
  0xa000 => :flashpix_version,
175
175
  0xa001 => :color_space,
@@ -366,7 +366,7 @@ module EXIFR
366
366
  })
367
367
 
368
368
  # Names for all recognized TIFF fields.
369
- TAGS = ([TAG_MAPPING.keys, TAG_MAPPING.values.map{|v|v.values}].flatten.uniq - IFD_TAGS).map{|v|v.to_s}
369
+ TAGS = [TAG_MAPPING.keys, TAG_MAPPING.values.map{|v|v.values}].flatten.uniq - IFD_TAGS
370
370
 
371
371
  # +file+ is a filename or an +IO+ object. Hint: use +StringIO+ when working with slurped data like blobs.
372
372
  def initialize(file)
@@ -407,7 +407,7 @@ module EXIFR
407
407
 
408
408
  if @ifds.first.respond_to?(method)
409
409
  @ifds.first.send(method)
410
- elsif TAGS.include?(method.to_s)
410
+ elsif TAGS.include?(method)
411
411
  @ifds.first.to_hash[method]
412
412
  else
413
413
  super
@@ -417,7 +417,7 @@ module EXIFR
417
417
  def respond_to?(method, include_all = false) # :nodoc:
418
418
  super ||
419
419
  (defined?(@ifds) && @ifds && @ifds.first && @ifds.first.respond_to?(method, include_all)) ||
420
- TAGS.include?(method.to_s)
420
+ TAGS.include?(method)
421
421
  end
422
422
 
423
423
  def methods # :nodoc:
@@ -477,7 +477,7 @@ module EXIFR
477
477
  end
478
478
 
479
479
  def method_missing(method, *args)
480
- super unless args.empty? && TAGS.include?(method.to_s)
480
+ super unless args.empty? && TAGS.include?(method)
481
481
  to_hash[method]
482
482
  end
483
483
 
@@ -78,11 +78,9 @@ class JPEGTest < TestCase
78
78
 
79
79
  def test_exif_dispatch
80
80
  j = JPEG.new(f('exif.jpg'))
81
-
82
- assert JPEG.instance_methods.include?('date_time')
83
- assert j.methods.include?('date_time')
81
+ assert JPEG.instance_methods.include?(:date_time)
82
+ assert j.methods.include?(:date_time)
84
83
  assert j.respond_to?(:date_time)
85
- assert j.respond_to?('date_time')
86
84
  assert j.date_time
87
85
  assert_kind_of Time, j.date_time
88
86
 
@@ -16,7 +16,7 @@ class TIFFTest < TestCase
16
16
  assert TIFF.new(StringIO.new(File.read(fname)))
17
17
  end
18
18
  end
19
-
19
+
20
20
  def test_raises_malformed_tiff
21
21
  begin
22
22
  TIFF.new(StringIO.new("djibberish"))
@@ -120,9 +120,8 @@ class TIFFTest < TestCase
120
120
 
121
121
  def test_ifd_dispatch
122
122
  assert @t.respond_to?(:f_number)
123
- assert @t.respond_to?('f_number')
124
- assert @t.methods.include?('f_number')
125
- assert TIFF.instance_methods.include?('f_number')
123
+ assert @t.methods.include?(:f_number)
124
+ assert TIFF.instance_methods.include?(:f_number)
126
125
 
127
126
  assert @t.f_number
128
127
  assert_kind_of Rational, @t.f_number
@@ -186,7 +185,7 @@ class TIFFTest < TestCase
186
185
  def test_handle_out_of_range_offset
187
186
  assert_equal 'NIKON', TIFF.new(f('out-of-range.exif')).make
188
187
  end
189
-
188
+
190
189
  def test_negative_exposure_bias_value
191
190
  assert_equal(-1.quo(3), TIFF.new(f('negative-exposure-bias-value.exif')).exposure_bias_value)
192
191
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exifr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
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: 2015-12-30 00:00:00.000000000 Z
11
+ date: 2016-07-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: EXIF Reader is a module to read EXIF from JPEG and TIFF images.
14
14
  email: remco@remvee.net
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  version: '0'
76
76
  requirements: []
77
77
  rubyforge_project:
78
- rubygems_version: 2.4.5.1
78
+ rubygems_version: 2.5.1
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Read EXIF from JPEG and TIFF images