onix 0.4.4 → 0.4.5

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.
Files changed (4) hide show
  1. data/CHANGELOG +3 -0
  2. data/lib/onix.rb +1 -1
  3. data/lib/onix/apa_product.rb +11 -4
  4. metadata +2 -2
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ v0.4.5 (21st November 2008)
2
+ - APAProduct wrapper should generate valid MediaFile composites
3
+
1
4
  v0.4.4 (19th November 2008)
2
5
  - Added support for more elements from MarketRepresentation
3
6
 
@@ -52,7 +52,7 @@ module ONIX
52
52
  module Version #:nodoc:
53
53
  Major = 0
54
54
  Minor = 4
55
- Tiny = 4
55
+ Tiny = 5
56
56
 
57
57
  String = [Major, Minor, Tiny].join('.')
58
58
  end
@@ -171,7 +171,9 @@ module ONIX
171
171
 
172
172
  # set the url to the product cover image
173
173
  def cover_url=(url)
174
- media_file_set(4,url)
174
+ # 4 - cover image
175
+ # 1 - URI
176
+ media_file_set(4,1,url)
175
177
  end
176
178
 
177
179
  # retrieve the url to the high quality product cover image
@@ -181,7 +183,9 @@ module ONIX
181
183
 
182
184
  # set the url to the high quality product cover image
183
185
  def cover_url_hq=(url)
184
- media_file_set(6,url)
186
+ # 6 - hq cover image
187
+ # 1 - URI
188
+ media_file_set(6,1,url)
185
189
  end
186
190
 
187
191
  # retrieve the url to the product thumbnail
@@ -191,7 +195,9 @@ module ONIX
191
195
 
192
196
  # set the url to the product cover image
193
197
  def thumbnail_url=(url)
194
- media_file_set(7,url)
198
+ # 7 - thumbnail image
199
+ # 1 - URI
200
+ media_file_set(7,1,url)
195
201
  end
196
202
 
197
203
  # retrieve the main description
@@ -607,13 +613,14 @@ module ONIX
607
613
  end
608
614
 
609
615
  # set the value of a particular ID
610
- def media_file_set(type, value)
616
+ def media_file_set(type, link_type, value)
611
617
  media = media_file(type)
612
618
 
613
619
  # create a new isbn record if we need to
614
620
  if media.nil?
615
621
  media = ONIX::MediaFile.new
616
622
  media.media_file_type_code = type
623
+ media.media_file_link_type_code = link_type
617
624
  product.media_files << media
618
625
  end
619
626
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Healy
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-11-19 00:00:00 +11:00
12
+ date: 2008-11-21 00:00:00 +11:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency