onix 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -0
- data/lib/onix.rb +33 -32
- data/lib/onix/apa_product.rb +27 -0
- data/lib/onix/discount_coded.rb +13 -0
- data/lib/onix/price.rb +5 -0
- data/spec/apa_product_spec.rb +33 -0
- metadata +282 -317
data/CHANGELOG
CHANGED
data/lib/onix.rb
CHANGED
@@ -42,9 +42,9 @@ module ONIX
|
|
42
42
|
lambda do |val|
|
43
43
|
if val.nil?
|
44
44
|
nil
|
45
|
-
elsif val < 10
|
45
|
+
elsif val.to_i < 10
|
46
46
|
"0#{val}"
|
47
|
-
elsif val > 99
|
47
|
+
elsif val.to_i > 99
|
48
48
|
val.to_s[-2,2]
|
49
49
|
else
|
50
50
|
val.to_s
|
@@ -57,37 +57,38 @@ end
|
|
57
57
|
# core files
|
58
58
|
# - ordering is important, classes need to be defined before any
|
59
59
|
# other class can use them
|
60
|
-
require
|
61
|
-
require
|
62
|
-
require
|
63
|
-
require
|
64
|
-
require
|
65
|
-
require
|
66
|
-
require
|
67
|
-
require
|
68
|
-
require
|
69
|
-
require
|
70
|
-
require
|
71
|
-
require
|
72
|
-
require
|
73
|
-
require
|
74
|
-
require
|
75
|
-
require
|
76
|
-
require
|
77
|
-
require
|
78
|
-
require
|
79
|
-
require
|
80
|
-
require
|
81
|
-
require
|
82
|
-
require
|
83
|
-
require
|
84
|
-
require
|
60
|
+
require "onix/sender_identifier"
|
61
|
+
require "onix/addressee_identifier"
|
62
|
+
require "onix/header"
|
63
|
+
require "onix/product_identifier"
|
64
|
+
require "onix/series_identifier"
|
65
|
+
require "onix/series"
|
66
|
+
require "onix/title"
|
67
|
+
require "onix/website"
|
68
|
+
require "onix/contributor"
|
69
|
+
require "onix/language"
|
70
|
+
require "onix/subject"
|
71
|
+
require "onix/audience_range"
|
72
|
+
require "onix/imprint"
|
73
|
+
require "onix/publisher"
|
74
|
+
require "onix/other_text"
|
75
|
+
require "onix/media_file"
|
76
|
+
require "onix/sales_restriction"
|
77
|
+
require "onix/stock"
|
78
|
+
require "onix/discount_coded"
|
79
|
+
require "onix/price"
|
80
|
+
require "onix/supply_detail"
|
81
|
+
require "onix/market_representation"
|
82
|
+
require "onix/measure"
|
83
|
+
require "onix/product"
|
84
|
+
require "onix/reader"
|
85
|
+
require "onix/writer"
|
85
86
|
|
86
87
|
# product wrappers
|
87
|
-
require
|
88
|
-
require
|
88
|
+
require "onix/simple_product"
|
89
|
+
require "onix/apa_product"
|
89
90
|
|
90
91
|
# misc
|
91
|
-
require
|
92
|
-
require
|
93
|
-
require
|
92
|
+
require "onix/lists"
|
93
|
+
require "onix/normaliser"
|
94
|
+
require "onix/code_list_extractor"
|
data/lib/onix/apa_product.rb
CHANGED
@@ -435,6 +435,33 @@ module ONIX
|
|
435
435
|
price_set(2, num)
|
436
436
|
end
|
437
437
|
|
438
|
+
# retrieve the discount code that describes the rrp in this file
|
439
|
+
def proprietry_discount_code_for_rrp
|
440
|
+
price = price_get(2)
|
441
|
+
return nil if price.nil?
|
442
|
+
|
443
|
+
discount = price.discounts_coded.find { |disc| disc.discount_code_type == 2 }
|
444
|
+
discount.andand.discount_code
|
445
|
+
end
|
446
|
+
|
447
|
+
# set the discount code that describes the rrp in this file
|
448
|
+
def proprietry_discount_code_for_rrp=(code)
|
449
|
+
price = price_get(2)
|
450
|
+
if price.nil?
|
451
|
+
self.rrp_inc_sales_tax = 0
|
452
|
+
price = price_get(2)
|
453
|
+
end
|
454
|
+
|
455
|
+
discount = price.discounts_coded.find { |disc| disc.discount_code_type == 2 }
|
456
|
+
|
457
|
+
if discount.nil?
|
458
|
+
discount = ONIX::DiscountCoded.new
|
459
|
+
discount.discount_code_type = 2
|
460
|
+
price.discounts_coded << discount
|
461
|
+
end
|
462
|
+
discount.discount_code = code
|
463
|
+
end
|
464
|
+
|
438
465
|
# just get the first price we can find, regardless of the type.
|
439
466
|
# useful as a backup for reading files from that don't contain a type
|
440
467
|
def price
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
module ONIX
|
4
|
+
class DiscountCoded
|
5
|
+
include ROXML
|
6
|
+
|
7
|
+
xml_name "DiscountCoded"
|
8
|
+
|
9
|
+
xml_accessor :discount_code_type, :from => "DiscountCodeType", :as => Fixnum, :to_xml => ONIX::Formatters.two_digit
|
10
|
+
xml_accessor :discount_code_type_name, :from => "DiscountCodeTypeName"
|
11
|
+
xml_accessor :discount_code, :from => "DiscountCode"
|
12
|
+
end
|
13
|
+
end
|
data/lib/onix/price.rb
CHANGED
@@ -6,6 +6,7 @@ module ONIX
|
|
6
6
|
|
7
7
|
xml_name "Price"
|
8
8
|
|
9
|
+
xml_accessor :discounts_coded, :from => "DiscountCoded", :as => [ONIX::DiscountCoded]
|
9
10
|
xml_accessor :price_type_code, :from => "PriceTypeCode", :as => Fixnum, :to_xml => ONIX::Formatters.two_digit
|
10
11
|
xml_accessor :price_type_qualifier, :from => "PriceQualifier", :as => Fixnum, :to_xml => ONIX::Formatters.two_digit
|
11
12
|
xml_accessor :price_type_description, :from => "PriceTypeDescription"
|
@@ -16,5 +17,9 @@ module ONIX
|
|
16
17
|
xml_accessor :price_status, :from => "PriceStatus", :as => Fixnum, :to_xml => ONIX::Formatters.two_digit
|
17
18
|
xml_accessor :price_amount, :from => "PriceAmount", :as => BigDecimal, :to_xml => ONIX::Formatters.decimal
|
18
19
|
xml_accessor :currency_code, :from => "CurrencyCode"
|
20
|
+
|
21
|
+
def initialize
|
22
|
+
self.discounts_coded = []
|
23
|
+
end
|
19
24
|
end
|
20
25
|
end
|
data/spec/apa_product_spec.rb
CHANGED
@@ -97,3 +97,36 @@ describe ONIX::APAProduct, "rrp_exc_sales_tax method" do
|
|
97
97
|
@apa.rrp_exc_sales_tax.should eql(BigDecimal.new("99.95"))
|
98
98
|
end
|
99
99
|
end
|
100
|
+
|
101
|
+
describe ONIX::APAProduct, "proprietry_discount_code_for_rrp method" do
|
102
|
+
before(:each) do
|
103
|
+
@data_path = File.join(File.dirname(__FILE__),"..","data")
|
104
|
+
file1 = File.join(@data_path, "product.xml")
|
105
|
+
@doc = Nokogiri::XML::Document.parse(File.read(file1))
|
106
|
+
@product_node = @doc.root
|
107
|
+
end
|
108
|
+
|
109
|
+
it "should return the first price in the file, regardless of type" do
|
110
|
+
@product = ONIX::Product.from_xml(@product_node.to_s)
|
111
|
+
@apa = ONIX::APAProduct.new(@product)
|
112
|
+
|
113
|
+
@apa.proprietry_discount_code_for_rrp.should eql("123")
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
describe ONIX::APAProduct, "proprietry_discount_code_for_rrp= method" do
|
118
|
+
before(:each) do
|
119
|
+
@data_path = File.join(File.dirname(__FILE__),"..","data")
|
120
|
+
file1 = File.join(@data_path, "product.xml")
|
121
|
+
@doc = Nokogiri::XML::Document.parse(File.read(file1))
|
122
|
+
@product_node = @doc.root
|
123
|
+
end
|
124
|
+
|
125
|
+
it "should set the discount code on the RRP" do
|
126
|
+
@product = ONIX::Product.from_xml(@product_node.to_s)
|
127
|
+
@apa = ONIX::APAProduct.new(@product)
|
128
|
+
|
129
|
+
@apa.proprietry_discount_code_for_rrp="123"
|
130
|
+
@apa.to_xml.to_s.include?("<DiscountCode>123</DiscountCode>").should be_true
|
131
|
+
end
|
132
|
+
end
|
metadata
CHANGED
@@ -1,424 +1,389 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: onix
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 9
|
8
|
-
- 1
|
9
|
-
version: 0.9.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.9.2
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- James Healy
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-11-07 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: roxml
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &15860160 !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
18
|
+
requirements:
|
26
19
|
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
segments:
|
29
|
-
- 3
|
30
|
-
- 1
|
31
|
-
- 6
|
20
|
+
- !ruby/object:Gem::Version
|
32
21
|
version: 3.1.6
|
33
22
|
type: :runtime
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: activesupport
|
37
23
|
prerelease: false
|
38
|
-
|
24
|
+
version_requirements: *15860160
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: activesupport
|
27
|
+
requirement: &15875720 !ruby/object:Gem::Requirement
|
39
28
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
segments:
|
44
|
-
- 3
|
45
|
-
- 0
|
46
|
-
- 5
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
47
32
|
version: 3.0.5
|
48
33
|
type: :runtime
|
49
|
-
version_requirements: *id002
|
50
|
-
- !ruby/object:Gem::Dependency
|
51
|
-
name: i18n
|
52
34
|
prerelease: false
|
53
|
-
|
35
|
+
version_requirements: *15875720
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: i18n
|
38
|
+
requirement: &15875160 !ruby/object:Gem::Requirement
|
54
39
|
none: false
|
55
|
-
requirements:
|
56
|
-
- -
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
|
59
|
-
- 0
|
60
|
-
version: "0"
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
61
44
|
type: :runtime
|
62
|
-
version_requirements: *id003
|
63
|
-
- !ruby/object:Gem::Dependency
|
64
|
-
name: andand
|
65
45
|
prerelease: false
|
66
|
-
|
46
|
+
version_requirements: *15875160
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: andand
|
49
|
+
requirement: &15874460 !ruby/object:Gem::Requirement
|
67
50
|
none: false
|
68
|
-
requirements:
|
69
|
-
- -
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
|
72
|
-
- 0
|
73
|
-
version: "0"
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
74
55
|
type: :runtime
|
75
|
-
version_requirements: *id004
|
76
|
-
- !ruby/object:Gem::Dependency
|
77
|
-
name: nokogiri
|
78
56
|
prerelease: false
|
79
|
-
|
57
|
+
version_requirements: *15874460
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: nokogiri
|
60
|
+
requirement: &15873700 !ruby/object:Gem::Requirement
|
80
61
|
none: false
|
81
|
-
requirements:
|
82
|
-
- -
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
|
85
|
-
- 1
|
86
|
-
- 4
|
87
|
-
version: "1.4"
|
62
|
+
requirements:
|
63
|
+
- - ~>
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '1.4'
|
88
66
|
type: :runtime
|
89
|
-
version_requirements: *id005
|
90
|
-
- !ruby/object:Gem::Dependency
|
91
|
-
name: rake
|
92
67
|
prerelease: false
|
93
|
-
|
68
|
+
version_requirements: *15873700
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: &15872980 !ruby/object:Gem::Requirement
|
94
72
|
none: false
|
95
|
-
requirements:
|
96
|
-
- -
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
|
99
|
-
- 0
|
100
|
-
version: "0"
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
101
77
|
type: :development
|
102
|
-
version_requirements: *id006
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: rspec
|
105
78
|
prerelease: false
|
106
|
-
|
79
|
+
version_requirements: *15872980
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: rspec
|
82
|
+
requirement: &15871940 !ruby/object:Gem::Requirement
|
107
83
|
none: false
|
108
|
-
requirements:
|
84
|
+
requirements:
|
109
85
|
- - ~>
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
|
112
|
-
- 2
|
113
|
-
- 1
|
114
|
-
version: "2.1"
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '2.1'
|
115
88
|
type: :development
|
116
|
-
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: *15871940
|
117
91
|
description: A convient mapping between ruby objects and the ONIX XML specification
|
118
|
-
email:
|
92
|
+
email:
|
119
93
|
- jimmy@deefa.com
|
120
94
|
executables: []
|
121
|
-
|
122
95
|
extensions: []
|
123
|
-
|
124
96
|
extra_rdoc_files: []
|
125
|
-
|
126
|
-
|
97
|
+
files:
|
98
|
+
- lib/onix/stock.rb
|
127
99
|
- lib/onix/writer.rb
|
128
|
-
- lib/onix/
|
100
|
+
- lib/onix/addressee_identifier.rb
|
101
|
+
- lib/onix/contributor.rb
|
129
102
|
- lib/onix/simple_product.rb
|
103
|
+
- lib/onix/discount_coded.rb
|
104
|
+
- lib/onix/code_list_extractor.rb
|
105
|
+
- lib/onix/media_file.rb
|
106
|
+
- lib/onix/product.rb
|
107
|
+
- lib/onix/reader.rb
|
108
|
+
- lib/onix/supply_detail.rb
|
109
|
+
- lib/onix/audience_range.rb
|
110
|
+
- lib/onix/measure.rb
|
111
|
+
- lib/onix/market_representation.rb
|
112
|
+
- lib/onix/normaliser.rb
|
113
|
+
- lib/onix/other_text.rb
|
114
|
+
- lib/onix/price.rb
|
115
|
+
- lib/onix/lists.rb
|
130
116
|
- lib/onix/publisher.rb
|
131
|
-
- lib/onix/stock.rb
|
132
|
-
- lib/onix/contributor.rb
|
133
117
|
- lib/onix/subject.rb
|
134
|
-
- lib/onix/apa_product.rb
|
135
118
|
- lib/onix/imprint.rb
|
119
|
+
- lib/onix/sales_restriction.rb
|
136
120
|
- lib/onix/series.rb
|
137
121
|
- lib/onix/website.rb
|
138
122
|
- lib/onix/sender_identifier.rb
|
123
|
+
- lib/onix/apa_product.rb
|
124
|
+
- lib/onix/series_identifier.rb
|
125
|
+
- lib/onix/title.rb
|
126
|
+
- lib/onix/language.rb
|
139
127
|
- lib/onix/header.rb
|
140
|
-
- lib/onix/measure.rb
|
141
|
-
- lib/onix/lists.rb
|
142
|
-
- lib/onix/market_representation.rb
|
143
|
-
- lib/onix/audience_range.rb
|
144
|
-
- lib/onix/code_list_extractor.rb
|
145
128
|
- lib/onix/product_identifier.rb
|
146
|
-
- lib/onix/supply_detail.rb
|
147
|
-
- lib/onix/language.rb
|
148
|
-
- lib/onix/series_identifier.rb
|
149
|
-
- lib/onix/addressee_identifier.rb
|
150
|
-
- lib/onix/normaliser.rb
|
151
|
-
- lib/onix/other_text.rb
|
152
|
-
- lib/onix/price.rb
|
153
|
-
- lib/onix/sales_restriction.rb
|
154
|
-
- lib/onix/reader.rb
|
155
|
-
- lib/onix/product.rb
|
156
|
-
- lib/onix/media_file.rb
|
157
129
|
- lib/onix.rb
|
158
|
-
- support/
|
159
|
-
- support/codes/102.tsv
|
160
|
-
- support/codes/157.tsv
|
161
|
-
- support/codes/176.tsv
|
162
|
-
- support/codes/091.tsv
|
163
|
-
- support/codes/081.tsv
|
164
|
-
- support/codes/010.tsv
|
130
|
+
- support/extract.rb
|
165
131
|
- support/codes/028.tsv
|
166
|
-
- support/codes/
|
167
|
-
- support/codes/
|
168
|
-
- support/codes/
|
169
|
-
- support/codes/
|
170
|
-
- support/codes/
|
171
|
-
- support/codes/
|
172
|
-
- support/codes/
|
173
|
-
- support/codes/
|
174
|
-
- support/codes/
|
175
|
-
- support/codes/
|
176
|
-
- support/codes/
|
132
|
+
- support/codes/021.tsv
|
133
|
+
- support/codes/095.tsv
|
134
|
+
- support/codes/101.tsv
|
135
|
+
- support/codes/039.tsv
|
136
|
+
- support/codes/100.tsv
|
137
|
+
- support/codes/058.tsv
|
138
|
+
- support/codes/066.tsv
|
139
|
+
- support/codes/078.tsv
|
140
|
+
- support/codes/083.tsv
|
141
|
+
- support/codes/158.tsv
|
142
|
+
- support/codes/015.tsv
|
143
|
+
- support/codes/175.tsv
|
144
|
+
- support/codes/033.tsv
|
177
145
|
- support/codes/061.tsv
|
178
|
-
- support/codes/098.tsv
|
179
|
-
- support/codes/017.tsv
|
180
|
-
- support/codes/082.tsv
|
181
|
-
- support/codes/050.tsv
|
182
146
|
- support/codes/026.tsv
|
183
|
-
- support/codes/
|
184
|
-
- support/codes/
|
185
|
-
- support/codes/
|
186
|
-
- support/codes/092.tsv
|
187
|
-
- support/codes/049.tsv
|
147
|
+
- support/codes/054.tsv
|
148
|
+
- support/codes/022.tsv
|
149
|
+
- support/codes/057.tsv
|
188
150
|
- support/codes/084.tsv
|
189
|
-
- support/codes/
|
190
|
-
- support/codes/
|
151
|
+
- support/codes/086.tsv
|
152
|
+
- support/codes/009.tsv
|
153
|
+
- support/codes/141.tsv
|
154
|
+
- support/codes/048.tsv
|
155
|
+
- support/codes/152.tsv
|
156
|
+
- support/codes/040.tsv
|
157
|
+
- support/codes/062.tsv
|
158
|
+
- support/codes/047.tsv
|
159
|
+
- support/codes/063.tsv
|
160
|
+
- support/codes/013.tsv
|
161
|
+
- support/codes/016.tsv
|
162
|
+
- support/codes/076.tsv
|
163
|
+
- support/codes/090.tsv
|
164
|
+
- support/codes/082.tsv
|
191
165
|
- support/codes/023.tsv
|
192
|
-
- support/codes/
|
193
|
-
- support/codes/027.tsv
|
166
|
+
- support/codes/071.tsv
|
194
167
|
- support/codes/121.tsv
|
195
|
-
- support/codes/
|
196
|
-
- support/codes/
|
168
|
+
- support/codes/151.tsv
|
169
|
+
- support/codes/089.tsv
|
170
|
+
- support/codes/074.tsv
|
197
171
|
- support/codes/168.tsv
|
172
|
+
- support/codes/035.tsv
|
173
|
+
- support/codes/020.tsv
|
174
|
+
- support/codes/029.tsv
|
175
|
+
- support/codes/011.tsv
|
176
|
+
- support/codes/102.tsv
|
177
|
+
- support/codes/044.tsv
|
178
|
+
- support/codes/031.tsv
|
179
|
+
- support/codes/043.tsv
|
198
180
|
- support/codes/085.tsv
|
199
|
-
- support/codes/
|
200
|
-
- support/codes/
|
201
|
-
- support/codes/
|
202
|
-
- support/codes/
|
203
|
-
- support/codes/
|
204
|
-
- support/codes/
|
205
|
-
- support/codes/
|
206
|
-
- support/codes/
|
207
|
-
- support/codes/
|
208
|
-
- support/codes/
|
209
|
-
- support/codes/
|
210
|
-
- support/codes/
|
181
|
+
- support/codes/088.tsv
|
182
|
+
- support/codes/160.tsv
|
183
|
+
- support/codes/165.tsv
|
184
|
+
- support/codes/139.tsv
|
185
|
+
- support/codes/070.tsv
|
186
|
+
- support/codes/149.tsv
|
187
|
+
- support/codes/171.tsv
|
188
|
+
- support/codes/173.tsv
|
189
|
+
- support/codes/087.tsv
|
190
|
+
- support/codes/154.tsv
|
191
|
+
- support/codes/024.tsv
|
192
|
+
- support/codes/142.tsv
|
193
|
+
- support/codes/032.tsv
|
194
|
+
- support/codes/037.tsv
|
195
|
+
- support/codes/178.tsv
|
196
|
+
- support/codes/067.tsv
|
197
|
+
- support/codes/091.tsv
|
211
198
|
- support/codes/018.tsv
|
212
|
-
- support/codes/
|
213
|
-
- support/codes/
|
214
|
-
- support/codes/
|
215
|
-
- support/codes/
|
216
|
-
- support/codes/
|
217
|
-
- support/codes/164.tsv
|
218
|
-
- support/codes/162.tsv
|
219
|
-
- support/codes/147.tsv
|
220
|
-
- support/codes/071.tsv
|
199
|
+
- support/codes/064.tsv
|
200
|
+
- support/codes/051.tsv
|
201
|
+
- support/codes/140.tsv
|
202
|
+
- support/codes/081.tsv
|
203
|
+
- support/codes/046.tsv
|
221
204
|
- support/codes/099.tsv
|
222
|
-
- support/codes/
|
223
|
-
- support/codes/
|
224
|
-
- support/codes/
|
225
|
-
- support/codes/
|
205
|
+
- support/codes/002.tsv
|
206
|
+
- support/codes/014.tsv
|
207
|
+
- support/codes/079.tsv
|
208
|
+
- support/codes/042.tsv
|
226
209
|
- support/codes/169.tsv
|
227
|
-
- support/codes/
|
228
|
-
- support/codes/
|
229
|
-
- support/codes/
|
210
|
+
- support/codes/166.tsv
|
211
|
+
- support/codes/161.tsv
|
212
|
+
- support/codes/056.tsv
|
213
|
+
- support/codes/030.tsv
|
214
|
+
- support/codes/177.tsv
|
230
215
|
- support/codes/053.tsv
|
231
|
-
- support/codes/
|
232
|
-
- support/codes/
|
233
|
-
- support/codes/
|
216
|
+
- support/codes/096.tsv
|
217
|
+
- support/codes/010.tsv
|
218
|
+
- support/codes/146.tsv
|
219
|
+
- support/codes/093.tsv
|
220
|
+
- support/codes/145.tsv
|
221
|
+
- support/codes/097.tsv
|
222
|
+
- support/codes/098.tsv
|
234
223
|
- support/codes/041.tsv
|
224
|
+
- support/codes/068.tsv
|
225
|
+
- support/codes/092.tsv
|
226
|
+
- support/codes/174.tsv
|
227
|
+
- support/codes/155.tsv
|
228
|
+
- support/codes/049.tsv
|
235
229
|
- support/codes/008.tsv
|
236
|
-
- support/codes/079.tsv
|
237
|
-
- support/codes/015.tsv
|
238
|
-
- support/codes/090.tsv
|
239
|
-
- support/codes/150.tsv
|
240
|
-
- support/codes/158.tsv
|
241
|
-
- support/codes/146.tsv
|
242
|
-
- support/codes/021.tsv
|
243
|
-
- support/codes/022.tsv
|
244
|
-
- support/codes/067.tsv
|
245
|
-
- support/codes/142.tsv
|
246
|
-
- support/codes/060.tsv
|
247
230
|
- support/codes/072.tsv
|
248
|
-
- support/codes/
|
249
|
-
- support/codes/
|
250
|
-
- support/codes/
|
251
|
-
- support/codes/
|
252
|
-
- support/codes/
|
231
|
+
- support/codes/162.tsv
|
232
|
+
- support/codes/069.tsv
|
233
|
+
- support/codes/055.tsv
|
234
|
+
- support/codes/005.tsv
|
235
|
+
- support/codes/038.tsv
|
236
|
+
- support/codes/153.tsv
|
253
237
|
- support/codes/148.tsv
|
254
|
-
- support/codes/
|
255
|
-
- support/codes/
|
256
|
-
- support/codes/
|
257
|
-
- support/codes/
|
258
|
-
- support/codes/
|
259
|
-
- support/codes/
|
260
|
-
- support/codes/
|
238
|
+
- support/codes/034.tsv
|
239
|
+
- support/codes/157.tsv
|
240
|
+
- support/codes/159.tsv
|
241
|
+
- support/codes/001.tsv
|
242
|
+
- support/codes/060.tsv
|
243
|
+
- support/codes/012.tsv
|
244
|
+
- support/codes/003.tsv
|
245
|
+
- support/codes/059.tsv
|
246
|
+
- support/codes/019.tsv
|
247
|
+
- support/codes/036.tsv
|
261
248
|
- support/codes/138.tsv
|
262
|
-
- support/codes/
|
263
|
-
- support/codes/
|
264
|
-
- support/codes/
|
265
|
-
- support/codes/
|
266
|
-
- support/codes/
|
267
|
-
- support/codes/
|
268
|
-
- support/codes/025.tsv
|
269
|
-
- support/codes/020.tsv
|
270
|
-
- support/codes/040.tsv
|
271
|
-
- support/codes/062.tsv
|
272
|
-
- support/codes/054.tsv
|
273
|
-
- support/codes/152.tsv
|
249
|
+
- support/codes/045.tsv
|
250
|
+
- support/codes/006.tsv
|
251
|
+
- support/codes/147.tsv
|
252
|
+
- support/codes/094.tsv
|
253
|
+
- support/codes/144.tsv
|
254
|
+
- support/codes/050.tsv
|
274
255
|
- support/codes/143.tsv
|
275
|
-
- support/codes/
|
276
|
-
- support/codes/
|
277
|
-
- support/codes/
|
256
|
+
- support/codes/077.tsv
|
257
|
+
- support/codes/052.tsv
|
258
|
+
- support/codes/065.tsv
|
278
259
|
- support/codes/170.tsv
|
279
|
-
- support/codes/
|
280
|
-
- support/codes/043.tsv
|
281
|
-
- support/codes/038.tsv
|
282
|
-
- support/codes/144.tsv
|
283
|
-
- support/codes/066.tsv
|
284
|
-
- support/codes/029.tsv
|
285
|
-
- support/codes/096.tsv
|
286
|
-
- support/codes/059.tsv
|
260
|
+
- support/codes/163.tsv
|
287
261
|
- support/codes/080.tsv
|
288
|
-
- support/codes/
|
289
|
-
- support/codes/
|
290
|
-
- support/codes/
|
291
|
-
- support/codes/057.tsv
|
292
|
-
- support/codes/007.tsv
|
293
|
-
- support/codes/012.tsv
|
294
|
-
- support/codes/161.tsv
|
295
|
-
- support/codes/014.tsv
|
262
|
+
- support/codes/156.tsv
|
263
|
+
- support/codes/164.tsv
|
264
|
+
- support/codes/073.tsv
|
296
265
|
- support/codes/075.tsv
|
297
|
-
- support/codes/
|
298
|
-
- support/codes/
|
299
|
-
- support/codes/
|
300
|
-
- support/codes/
|
266
|
+
- support/codes/027.tsv
|
267
|
+
- support/codes/176.tsv
|
268
|
+
- support/codes/172.tsv
|
269
|
+
- support/codes/025.tsv
|
270
|
+
- support/codes/167.tsv
|
271
|
+
- support/codes/017.tsv
|
272
|
+
- support/codes/007.tsv
|
273
|
+
- support/codes/150.tsv
|
301
274
|
- support/switch-onix-2.1-short-to-reference.xsl
|
302
|
-
- support/entities.txt
|
303
275
|
- support/switch-onix-tagnames-2.0.xsl
|
304
|
-
- support/extract.rb
|
305
276
|
- support/switch-onix-tagnames-1.1.xsl
|
306
|
-
-
|
307
|
-
- dtd/2.1r3/
|
308
|
-
- dtd/2.1r3/iso-
|
277
|
+
- support/entities.txt
|
278
|
+
- dtd/2.1r3/iso-amso.ent
|
279
|
+
- dtd/2.1r3/iso-lat2.ent
|
309
280
|
- dtd/2.1r3/iso-amsa.ent
|
310
|
-
- dtd/2.1r3/iso-
|
311
|
-
- dtd/2.1r3/iso-
|
281
|
+
- dtd/2.1r3/iso-mfrk.ent
|
282
|
+
- dtd/2.1r3/iso-lat1.ent
|
283
|
+
- dtd/2.1r3/iso-cyr2.ent
|
284
|
+
- dtd/2.1r3/iso-pub.ent
|
285
|
+
- dtd/2.1r3/xhtml-symbol.ent
|
312
286
|
- dtd/2.1r3/iso-num.ent
|
313
|
-
- dtd/2.1r3/
|
287
|
+
- dtd/2.1r3/onix-international.dtd
|
288
|
+
- dtd/2.1r3/iso-amsc.ent
|
289
|
+
- dtd/2.1r3/iso-box.ent
|
314
290
|
- dtd/2.1r3/iso-num.old.ent
|
315
|
-
- dtd/2.1r3/xhtml-symbol.ent
|
316
|
-
- dtd/2.1r3/iso-pub.ent
|
317
|
-
- dtd/2.1r3/reference.elt
|
318
|
-
- dtd/2.1r3/iso-amsr.ent
|
319
|
-
- dtd/2.1r3/iso-cyr1.ent
|
320
291
|
- dtd/2.1r3/iso-amsn.ent
|
321
|
-
- dtd/2.1r3/iso-lat1.ent
|
322
|
-
- dtd/2.1r3/iso-box.ent
|
323
|
-
- dtd/2.1r3/iso-mscr.ent
|
324
292
|
- dtd/2.1r3/xhtml-special.ent
|
325
|
-
- dtd/2.1r3/iso-
|
326
|
-
- dtd/2.1r3/iso-cyr2.ent
|
327
|
-
- dtd/2.1r3/iso-amsb.ent
|
328
|
-
- dtd/2.1r3/iso-amso.ent
|
293
|
+
- dtd/2.1r3/iso-cyr1.ent
|
329
294
|
- dtd/2.1r3/iso-grk3.ent
|
295
|
+
- dtd/2.1r3/iso-mopf.ent
|
296
|
+
- dtd/2.1r3/reference.elt
|
297
|
+
- dtd/2.1r3/iso-tech.ent
|
298
|
+
- dtd/2.1r3/iso-mscr.ent
|
299
|
+
- dtd/2.1r3/iso-amsr.ent
|
300
|
+
- dtd/2.1r3/iso-dia.ent
|
301
|
+
- dtd/2.1r3/iso-amsb.ent
|
330
302
|
- dtd/2.1r3/onix-xhtml.elt
|
331
303
|
- README.markdown
|
332
304
|
- TODO
|
333
305
|
- CHANGELOG
|
334
|
-
- spec/
|
335
|
-
- spec/series_spec.rb
|
336
|
-
- spec/media_file_spec.rb
|
337
|
-
- spec/normaliser_spec.rb
|
338
|
-
- spec/other_text_spec.rb
|
339
|
-
- spec/reader_spec.rb
|
340
|
-
- spec/publisher_spec.rb
|
341
|
-
- spec/website_spec.rb
|
342
|
-
- spec/sales_restriction_spec.rb
|
343
|
-
- spec/series_identifier_spec.rb
|
344
|
-
- spec/stock_spec.rb
|
306
|
+
- spec/imprint_spec.rb
|
345
307
|
- spec/writer_spec.rb
|
346
|
-
- spec/
|
308
|
+
- spec/contributor_spec.rb
|
309
|
+
- spec/other_text_spec.rb
|
310
|
+
- spec/media_file_spec.rb
|
311
|
+
- spec/audience_range_spec.rb
|
312
|
+
- spec/product_spec.rb
|
347
313
|
- spec/title_spec.rb
|
348
|
-
- spec/apa_product_spec.rb
|
349
314
|
- spec/language_spec.rb
|
350
|
-
- spec/
|
351
|
-
- spec/
|
352
|
-
- spec/supply_detail_spec.rb
|
353
|
-
- spec/contributor_spec.rb
|
354
|
-
- spec/market_representation_spec.rb
|
315
|
+
- spec/measure_spec.rb
|
316
|
+
- spec/reader_spec.rb
|
355
317
|
- spec/spec_helper.rb
|
318
|
+
- spec/normaliser_spec.rb
|
319
|
+
- spec/header_spec.rb
|
320
|
+
- spec/stock_spec.rb
|
321
|
+
- spec/sales_restriction_spec.rb
|
356
322
|
- spec/subject_spec.rb
|
357
|
-
- spec/measure_spec.rb
|
358
|
-
- spec/product_identifier_spec.rb
|
359
|
-
- spec/imprint_spec.rb
|
360
|
-
- spec/product_spec.rb
|
361
323
|
- spec/price_spec.rb
|
362
|
-
|
324
|
+
- spec/publisher_spec.rb
|
325
|
+
- spec/sender_identifier.rb
|
326
|
+
- spec/lists_spec.rb
|
327
|
+
- spec/product_identifier_spec.rb
|
328
|
+
- spec/supply_detail_spec.rb
|
329
|
+
- spec/series_spec.rb
|
330
|
+
- spec/series_identifier_spec.rb
|
331
|
+
- spec/website_spec.rb
|
332
|
+
- spec/market_representation_spec.rb
|
333
|
+
- spec/apa_product_spec.rb
|
363
334
|
homepage: http://github.com/yob/onix
|
364
335
|
licenses: []
|
365
|
-
|
366
336
|
post_install_message:
|
367
|
-
rdoc_options:
|
337
|
+
rdoc_options:
|
368
338
|
- --title
|
369
339
|
- ONIX - Working with the ONIX XML spec
|
370
340
|
- --line-numbers
|
371
|
-
require_paths:
|
341
|
+
require_paths:
|
372
342
|
- lib
|
373
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
343
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
374
344
|
none: false
|
375
|
-
requirements:
|
376
|
-
- -
|
377
|
-
- !ruby/object:Gem::Version
|
378
|
-
|
379
|
-
|
380
|
-
version: "0"
|
381
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
345
|
+
requirements:
|
346
|
+
- - ! '>='
|
347
|
+
- !ruby/object:Gem::Version
|
348
|
+
version: '0'
|
349
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
382
350
|
none: false
|
383
|
-
requirements:
|
384
|
-
- -
|
385
|
-
- !ruby/object:Gem::Version
|
386
|
-
|
387
|
-
- 0
|
388
|
-
version: "0"
|
351
|
+
requirements:
|
352
|
+
- - ! '>='
|
353
|
+
- !ruby/object:Gem::Version
|
354
|
+
version: '0'
|
389
355
|
requirements: []
|
390
|
-
|
391
356
|
rubyforge_project:
|
392
|
-
rubygems_version: 1.
|
357
|
+
rubygems_version: 1.8.11
|
393
358
|
signing_key:
|
394
359
|
specification_version: 3
|
395
360
|
summary: A convient mapping between ruby objects and the ONIX XML specification
|
396
|
-
test_files:
|
397
|
-
- spec/
|
398
|
-
- spec/series_spec.rb
|
399
|
-
- spec/media_file_spec.rb
|
400
|
-
- spec/normaliser_spec.rb
|
401
|
-
- spec/other_text_spec.rb
|
402
|
-
- spec/reader_spec.rb
|
403
|
-
- spec/publisher_spec.rb
|
404
|
-
- spec/website_spec.rb
|
405
|
-
- spec/sales_restriction_spec.rb
|
406
|
-
- spec/series_identifier_spec.rb
|
407
|
-
- spec/stock_spec.rb
|
361
|
+
test_files:
|
362
|
+
- spec/imprint_spec.rb
|
408
363
|
- spec/writer_spec.rb
|
409
|
-
- spec/
|
364
|
+
- spec/contributor_spec.rb
|
365
|
+
- spec/other_text_spec.rb
|
366
|
+
- spec/media_file_spec.rb
|
367
|
+
- spec/audience_range_spec.rb
|
368
|
+
- spec/product_spec.rb
|
410
369
|
- spec/title_spec.rb
|
411
|
-
- spec/apa_product_spec.rb
|
412
370
|
- spec/language_spec.rb
|
413
|
-
- spec/
|
414
|
-
- spec/
|
415
|
-
- spec/supply_detail_spec.rb
|
416
|
-
- spec/contributor_spec.rb
|
417
|
-
- spec/market_representation_spec.rb
|
371
|
+
- spec/measure_spec.rb
|
372
|
+
- spec/reader_spec.rb
|
418
373
|
- spec/spec_helper.rb
|
374
|
+
- spec/normaliser_spec.rb
|
375
|
+
- spec/header_spec.rb
|
376
|
+
- spec/stock_spec.rb
|
377
|
+
- spec/sales_restriction_spec.rb
|
419
378
|
- spec/subject_spec.rb
|
420
|
-
- spec/measure_spec.rb
|
421
|
-
- spec/product_identifier_spec.rb
|
422
|
-
- spec/imprint_spec.rb
|
423
|
-
- spec/product_spec.rb
|
424
379
|
- spec/price_spec.rb
|
380
|
+
- spec/publisher_spec.rb
|
381
|
+
- spec/sender_identifier.rb
|
382
|
+
- spec/lists_spec.rb
|
383
|
+
- spec/product_identifier_spec.rb
|
384
|
+
- spec/supply_detail_spec.rb
|
385
|
+
- spec/series_spec.rb
|
386
|
+
- spec/series_identifier_spec.rb
|
387
|
+
- spec/website_spec.rb
|
388
|
+
- spec/market_representation_spec.rb
|
389
|
+
- spec/apa_product_spec.rb
|