iptc 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -116,8 +116,16 @@ module IPTC
116
116
 
117
117
  l "Found marker 0x#{type.to_s(16)}"
118
118
  marker = IPTC::Marker.new(type, value)
119
- @values[@prefix+"/"+IPTC::MarkerNomenclature.markers(type.to_i).name] ||= []
120
- @values[@prefix+"/"+IPTC::MarkerNomenclature.markers(type.to_i).name] << value
119
+ k = @prefix+"/"+IPTC::MarkerNomenclature.markers(type.to_i).name
120
+ if @values.has_key?(k)
121
+ if @values[k].is_a?(Array)
122
+ @values[k] << value
123
+ else
124
+ @values[k] = [@values[k], value]
125
+ end
126
+ else
127
+ @values[k] = value
128
+ end
121
129
  @markers << marker
122
130
 
123
131
  else
@@ -1,3 +1,3 @@
1
1
  module IPTC
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iptc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-02-28 00:00:00.000000000 Z
14
+ date: 2013-03-05 00:00:00.000000000 Z
15
15
  dependencies: []
16
16
  description: Original code from http://raa.ruby-lang.org/project/jpeg-jfif-iptc/,
17
17
  gemified and updated by Jens Kraemer, Futher fixes by Pierre Baillet