mini_exiftool 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/Changelog CHANGED
@@ -1,3 +1,6 @@
1
+ v1.4.1
2
+ - Update documentation for using yard.
3
+
1
4
  v1.4.0
2
5
  - Allow symbols for tag access with [].
3
6
  - Refactoring tests.
data/Manifest CHANGED
@@ -1,10 +1,10 @@
1
1
  COPYING
2
2
  Changelog
3
3
  Manifest
4
- README
4
+ README.rdoc
5
5
  Rakefile
6
6
  TODO
7
- Tutorial
7
+ Tutorial.rdoc
8
8
  examples/external_photo.rb
9
9
  examples/print_portraits.rb
10
10
  examples/shift_time.rb
@@ -26,7 +26,7 @@ Alternative you can download the tarball or zip file and run
26
26
  == Contribution
27
27
 
28
28
  The code is also hostet in a git repository on Gitorious at
29
- http://gitorious.org/projects/mini_exiftool
29
+ http://gitorious.org/projects/mini_exiftool
30
30
  feel free to contribute!
31
31
 
32
32
  == Author
@@ -35,11 +35,11 @@ Jan Friedrich <janfri26 AT gmail DOT com>
35
35
  == Copyright / License
36
36
  Copyright (c) 2007-2011 by Jan Friedrich
37
37
 
38
- Licensed under terms of the GNU LESSER GENERAL PUBLIC LICENSE, Version 2.1,
38
+ Licensed under terms of the GNU LESSER GENERAL PUBLIC LICENSE, Version 2.1,
39
39
  February 1999 (see file COPYING for more details)
40
40
 
41
41
  == Usage
42
42
 
43
43
  For further information about using MiniExiftool read the
44
- Tutorial[link://files/Tutorial.html] and have a look at the examples in
44
+ Tutorial[link://file.Tutorial.html] and have a look at the examples in
45
45
  directory examples.
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ Echoe.new('mini_exiftool') do |p|
6
6
  p.email = 'janfri26@gmail.com'
7
7
  p.summary = 'This library is wrapper for the Exiftool command-line application (http://www.sno.phy.queensu.ca/~phil/exiftool).'
8
8
  p.url = 'http://gitorious.org/mini_exiftool'
9
- p.rdoc_files = %w(README Tutorial lib/*.rb)
9
+ p.rdoc_files = %w(README.rdoc Tutorial.rdoc lib/*.rb)
10
10
  p.install_message = %q{
11
11
  +-----------------------------------------------------------------------+
12
12
  | Please ensure you have installed exiftool and it's found in your PATH |
@@ -53,7 +53,7 @@ Following types of values are at the moment supported:
53
53
  * Time (e. g. DateTimeOriginal => 2005:09:13 20:08:50)
54
54
 
55
55
  Be aware, if there is only one value in a tag which can hold multiple
56
- values the result is'nt an array! But you can get one with the to_a
56
+ values the result is'nt an array! But you can get one with the Array
57
57
  method:
58
58
  # only _one_ keyword
59
59
  p1 = MiniExiftool.new 'p1.jpg'
@@ -63,9 +63,9 @@ method:
63
63
  p3.keywords # => ['red', 'yellow', 'green']
64
64
 
65
65
  # if we want to get an array in both cases and don't know
66
- # if there is one ore more values set let's take to_a
67
- p1.keywords.to_a # => ['red']
68
- p3.keywords.to_a # => ['red', 'yellow', 'green']
66
+ # if there is one ore more values set let's take Array()
67
+ Array(p1.keywords) # => ['red']
68
+ Array(p3.keywords) # => ['red', 'yellow', 'green']
69
69
 
70
70
  The Exiftool command-line application has an option (-n) to get values
71
71
  as numbers if possible, in MiniExiftool you can do this with setting
@@ -133,6 +133,7 @@ specific tag or in general all changes.
133
133
 
134
134
  You should also look at the rdoc information of MiniExiftool.
135
135
 
136
- === Further Example
136
+ === Further Examples
137
+
138
+ See external_photo.rb[link://file.external_photo.html], print_portraits.rb[link://file.print_portraits.html] and shift_time.rb[link://file.shift_time.html] in the +examples+ directory.
137
139
 
138
- See <code>shift_time.rb</code> in the +examples+ directory.
@@ -8,7 +8,7 @@
8
8
  # Read and write access is done in a clean OO manner.
9
9
  #
10
10
  # Author: Jan Friedrich
11
- # Copyright (c) 2007-2011 by Jan Friedrich
11
+ # Copyright (c) 2007-2012 by Jan Friedrich
12
12
  # Licensed under the GNU LESSER GENERAL PUBLIC LICENSE,
13
13
  # Version 2.1, February 1999
14
14
  #
@@ -32,7 +32,7 @@ class MiniExiftool
32
32
  attr_reader :filename
33
33
  attr_accessor :numerical, :composite, :convert_encoding, :errors, :timestamps
34
34
 
35
- VERSION = '1.4.0'
35
+ VERSION = '1.4.1'
36
36
 
37
37
  # +opts+ support at the moment
38
38
  # * <code>:numerical</code> for numerical values, default is +false+
@@ -349,13 +349,6 @@ class MiniExiftool
349
349
  else
350
350
  raise MiniExiftool::Error.new("Malformed line #{line.inspect} of exiftool output.")
351
351
  end
352
- unless value.respond_to?('to_a')
353
- class << value
354
- def to_a
355
- [self]
356
- end
357
- end
358
- end
359
352
  return [tag, value]
360
353
  end
361
354
 
@@ -439,15 +432,3 @@ class MiniExiftool
439
432
  end
440
433
 
441
434
  end
442
-
443
- # Add to_a to Numerical if it's not yet defined
444
- unless Numeric.instance_methods.include? 'to_a'
445
- class Numeric
446
- def to_a
447
- [self]
448
- end
449
- end
450
- end
451
-
452
- # Test if we can run the Exiftool command
453
- MiniExiftool.exiftool_version
@@ -2,18 +2,18 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "mini_exiftool"
5
- s.version = "1.4.0"
5
+ s.version = "1.4.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Jan Friedrich"]
9
9
  s.date = "2012-04-11"
10
10
  s.description = "This library is wrapper for the Exiftool command-line application (http://www.sno.phy.queensu.ca/~phil/exiftool)."
11
11
  s.email = "janfri26@gmail.com"
12
- s.extra_rdoc_files = ["README", "Tutorial", "lib/mini_exiftool.rb"]
13
- s.files = ["COPYING", "Changelog", "Manifest", "README", "Rakefile", "TODO", "Tutorial", "examples/external_photo.rb", "examples/print_portraits.rb", "examples/shift_time.rb", "lib/mini_exiftool.rb", "setup.rb", "test/data/Canon.jpg", "test/data/INFORMATION", "test/data/test.jpg", "test/data/test_special_dates.jpg", "test/helpers_for_test.rb", "test/test_class_methods.rb", "test/test_composite.rb", "test/test_dumping.rb", "test/test_read.rb", "test/test_read_numerical.rb", "test/test_save.rb", "test/test_special.rb", "test/test_special_dates.rb", "test/test_write.rb", "mini_exiftool.gemspec"]
12
+ s.extra_rdoc_files = ["README.rdoc", "Tutorial.rdoc", "lib/mini_exiftool.rb"]
13
+ s.files = ["COPYING", "Changelog", "Manifest", "README.rdoc", "Rakefile", "TODO", "Tutorial.rdoc", "examples/external_photo.rb", "examples/print_portraits.rb", "examples/shift_time.rb", "lib/mini_exiftool.rb", "setup.rb", "test/data/Canon.jpg", "test/data/INFORMATION", "test/data/test.jpg", "test/data/test_special_dates.jpg", "test/helpers_for_test.rb", "test/test_class_methods.rb", "test/test_composite.rb", "test/test_dumping.rb", "test/test_read.rb", "test/test_read_numerical.rb", "test/test_save.rb", "test/test_special.rb", "test/test_special_dates.rb", "test/test_write.rb", "mini_exiftool.gemspec"]
14
14
  s.homepage = "http://gitorious.org/mini_exiftool"
15
15
  s.post_install_message = "\n+-----------------------------------------------------------------------+\n| Please ensure you have installed exiftool and it's found in your PATH |\n| (Try \"exiftool -ver\" on your commandline). For more details see |\n| http://www.sno.phy.queensu.ca/~phil/exiftool/install.html |\n+-----------------------------------------------------------------------+\n "
16
- s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Mini_exiftool", "--main", "README"]
16
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Mini_exiftool", "--main", "README.rdoc"]
17
17
  s.require_paths = ["lib"]
18
18
  s.rubyforge_project = "mini_exiftool"
19
19
  s.rubygems_version = "1.8.21"
@@ -31,13 +31,12 @@ class TestRead < TestCase
31
31
  assert_kind_of String, (@mini_exiftool['SubjectLocation'] || @mini_exiftool['SubjectArea'])
32
32
  assert_kind_of Array, @mini_exiftool['Keywords']
33
33
  assert_kind_of String, @mini_exiftool['SupplementalCategories']
34
- assert_kind_of Array, @mini_exiftool['SupplementalCategories'].to_a
35
34
  end
36
35
 
37
36
  def test_list_tags
38
37
  assert_equal ['Orange', 'Rot'], @mini_exiftool['Keywords']
39
38
  assert_equal 'Natur', @mini_exiftool['SupplementalCategories']
40
- assert_equal ['Natur'], @mini_exiftool['SupplementalCategories'].to_a
39
+ assert_equal ['Natur'], Array(@mini_exiftool['SupplementalCategories'])
41
40
  end
42
41
 
43
42
  def test_encoding_conversion
@@ -28,7 +28,6 @@ class TestReadNumerical < TestCase
28
28
  assert_kind_of String, (@mini_exiftool_num['SubjectLocation'] || @mini_exiftool_num['SubjectArea'])
29
29
  assert_kind_of Array, @mini_exiftool_num['Keywords']
30
30
  assert_kind_of String, @mini_exiftool_num['SupplementalCategories']
31
- assert_kind_of Array, @mini_exiftool_num['SupplementalCategories'].to_a
32
31
  end
33
32
 
34
33
  end
metadata CHANGED
@@ -1,36 +1,32 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: mini_exiftool
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.4.1
4
5
  prerelease:
5
- version: 1.4.0
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Jan Friedrich
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2012-04-11 00:00:00 Z
12
+ date: 2012-04-11 00:00:00.000000000 Z
14
13
  dependencies: []
15
-
16
14
  description: This library is wrapper for the Exiftool command-line application (http://www.sno.phy.queensu.ca/~phil/exiftool).
17
15
  email: janfri26@gmail.com
18
16
  executables: []
19
-
20
17
  extensions: []
21
-
22
- extra_rdoc_files:
23
- - README
24
- - Tutorial
18
+ extra_rdoc_files:
19
+ - README.rdoc
20
+ - Tutorial.rdoc
25
21
  - lib/mini_exiftool.rb
26
- files:
22
+ files:
27
23
  - COPYING
28
24
  - Changelog
29
25
  - Manifest
30
- - README
26
+ - README.rdoc
31
27
  - Rakefile
32
28
  - TODO
33
- - Tutorial
29
+ - Tutorial.rdoc
34
30
  - examples/external_photo.rb
35
31
  - examples/print_portraits.rb
36
32
  - examples/shift_time.rb
@@ -53,42 +49,39 @@ files:
53
49
  - mini_exiftool.gemspec
54
50
  homepage: http://gitorious.org/mini_exiftool
55
51
  licenses: []
56
-
57
- post_install_message: "\n\
58
- +-----------------------------------------------------------------------+\n\
59
- | Please ensure you have installed exiftool and it's found in your PATH |\n\
60
- | (Try \"exiftool -ver\" on your commandline). For more details see |\n\
61
- | http://www.sno.phy.queensu.ca/~phil/exiftool/install.html |\n\
62
- +-----------------------------------------------------------------------+\n "
63
- rdoc_options:
52
+ post_install_message: ! "\n+-----------------------------------------------------------------------+\n|
53
+ Please ensure you have installed exiftool and it's found in your PATH |\n| (Try
54
+ \"exiftool -ver\" on your commandline). For more details see |\n| http://www.sno.phy.queensu.ca/~phil/exiftool/install.html
55
+ \ |\n+-----------------------------------------------------------------------+\n
56
+ \ "
57
+ rdoc_options:
64
58
  - --line-numbers
65
59
  - --inline-source
66
60
  - --title
67
61
  - Mini_exiftool
68
62
  - --main
69
- - README
70
- require_paths:
63
+ - README.rdoc
64
+ require_paths:
71
65
  - lib
72
- required_ruby_version: !ruby/object:Gem::Requirement
66
+ required_ruby_version: !ruby/object:Gem::Requirement
73
67
  none: false
74
- requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- version: "0"
78
- required_rubygems_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ! '>='
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
73
  none: false
80
- requirements:
81
- - - ">="
82
- - !ruby/object:Gem::Version
83
- version: "1.2"
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '1.2'
84
78
  requirements: []
85
-
86
79
  rubyforge_project: mini_exiftool
87
80
  rubygems_version: 1.8.21
88
81
  signing_key:
89
82
  specification_version: 3
90
83
  summary: This library is wrapper for the Exiftool command-line application (http://www.sno.phy.queensu.ca/~phil/exiftool).
91
- test_files:
84
+ test_files:
92
85
  - test/helpers_for_test.rb
93
86
  - test/test_class_methods.rb
94
87
  - test/test_composite.rb