elibri_onix 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -1
- data/Gemfile.lock +3 -1
- data/elibri_onix.gemspec +48 -5
- data/lib/elibri_onix.rb +3 -0
- data/lib/elibri_onix/inspector.rb +25 -0
- data/lib/elibri_onix/onix_3_0/audience_range.rb +4 -3
- data/lib/elibri_onix/onix_3_0/collection.rb +10 -1
- data/lib/elibri_onix/onix_3_0/contributor.rb +9 -0
- data/lib/elibri_onix/onix_3_0/extent.rb +17 -3
- data/lib/elibri_onix/onix_3_0/header.rb +1 -0
- data/lib/elibri_onix/onix_3_0/imprint.rb +1 -0
- data/lib/elibri_onix/onix_3_0/language.rb +14 -2
- data/lib/elibri_onix/onix_3_0/measure.rb +12 -2
- data/lib/elibri_onix/onix_3_0/onix_message.rb +2 -1
- data/lib/elibri_onix/onix_3_0/price.rb +1 -0
- data/lib/elibri_onix/onix_3_0/product.rb +97 -67
- data/lib/elibri_onix/onix_3_0/product_identifier.rb +10 -1
- data/lib/elibri_onix/onix_3_0/publisher.rb +3 -1
- data/lib/elibri_onix/onix_3_0/publishing_date.rb +11 -2
- data/lib/elibri_onix/onix_3_0/related_product.rb +1 -0
- data/lib/elibri_onix/onix_3_0/sales_restriction.rb +1 -0
- data/lib/elibri_onix/onix_3_0/sender.rb +2 -0
- data/lib/elibri_onix/onix_3_0/stock_quantity_coded.rb +1 -0
- data/lib/elibri_onix/onix_3_0/subject.rb +1 -0
- data/lib/elibri_onix/onix_3_0/supplier.rb +1 -0
- data/lib/elibri_onix/onix_3_0/supplier_identifier.rb +1 -0
- data/lib/elibri_onix/onix_3_0/supply_detail.rb +1 -0
- data/lib/elibri_onix/onix_3_0/supporting_resource.rb +24 -5
- data/lib/elibri_onix/onix_3_0/text_content.rb +15 -2
- data/lib/elibri_onix/onix_3_0/title_detail.rb +21 -9
- data/lib/elibri_onix/onix_3_0/title_element.rb +15 -4
- data/lib/elibri_onix/version.rb +1 -1
- data/test/elibri_audience_range_test.rb +14 -0
- data/test/elibri_contributors_test.rb +37 -0
- data/test/elibri_edition_test.rb +10 -0
- data/test/elibri_extensions_test.rb +14 -0
- data/test/elibri_extent_test.rb +15 -0
- data/test/elibri_languages_test.rb +14 -0
- data/test/elibri_measurement_test.rb +16 -0
- data/test/elibri_onix_release_3_0_onix_message_test.rb +19 -28
- data/test/elibri_product_form_test.rb +12 -0
- data/test/elibri_publisher_info_test.rb +12 -0
- data/test/elibri_publishing_status_test.rb +41 -0
- data/test/elibri_record_identifiers_test.rb +16 -0
- data/test/elibri_sale_restrictions_test.rb +11 -0
- data/test/elibri_series_memberships_test.rb +16 -0
- data/test/elibri_supporting_resources_test.rb +12 -0
- data/test/elibri_texts_test.rb +16 -0
- data/test/elibri_titles_test.rb +24 -0
- data/test/fixtures/old_dialect.xml +10 -0
- data/test/fixtures/onix_announced_product_example.xml +54 -0
- data/test/fixtures/onix_audience_range_example.xml +44 -0
- data/test/fixtures/onix_audiobook_extent_example.xml +39 -0
- data/test/fixtures/onix_collective_work_example.xml +38 -0
- data/test/fixtures/onix_contributors_example.xml +53 -0
- data/test/fixtures/onix_ebook_extent_example.xml +45 -0
- data/test/fixtures/onix_edition_example.xml +35 -0
- data/test/fixtures/onix_elibri_extensions_example.xml +38 -0
- data/test/fixtures/onix_languages_example.xml +42 -0
- data/test/fixtures/onix_measurement_example.xml +55 -0
- data/test/fixtures/onix_no_contributors_example.xml +35 -0
- data/test/fixtures/onix_out_of_print_product_example.xml +34 -0
- data/test/fixtures/onix_preorder_product_example.xml +39 -0
- data/test/fixtures/onix_product_form_example.xml +35 -0
- data/test/fixtures/onix_published_product_example.xml +39 -0
- data/test/fixtures/onix_publisher_info_example.xml +41 -0
- data/test/fixtures/onix_record_identifiers_example.xml +74 -0
- data/test/fixtures/onix_sale_restrictions_example.xml +46 -0
- data/test/fixtures/onix_series_memberships_example.xml +56 -0
- data/test/fixtures/onix_supporting_resources_example.xml +54 -0
- data/test/fixtures/onix_texts_example.xml +65 -0
- data/test/fixtures/onix_title_with_collection_example.xml +53 -0
- data/test/fixtures/onix_titles_example.xml +49 -0
- data/test/helper.rb +6 -0
- metadata +73 -17
data/test/helper.rb
CHANGED
@@ -18,3 +18,9 @@ require 'elibri_onix'
|
|
18
18
|
|
19
19
|
class Test::Unit::TestCase
|
20
20
|
end
|
21
|
+
|
22
|
+
def load_fixture(filename)
|
23
|
+
xml_string = File.read File.join(File.dirname(__FILE__), "..", "test", "fixtures", filename)
|
24
|
+
onix = Elibri::ONIX::Release_3_0::ONIXMessage.from_xml(xml_string)
|
25
|
+
return onix.products.first
|
26
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elibri_onix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 6
|
10
|
+
version: 0.1.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Marcin Urbanski
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-11-14 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -65,17 +65,19 @@ dependencies:
|
|
65
65
|
version_requirements: *id003
|
66
66
|
prerelease: false
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
|
-
type: :
|
68
|
+
type: :runtime
|
69
69
|
requirement: &id004 !ruby/object:Gem::Requirement
|
70
70
|
none: false
|
71
71
|
requirements:
|
72
|
-
- - "
|
72
|
+
- - "="
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
hash:
|
74
|
+
hash: 25
|
75
75
|
segments:
|
76
76
|
- 0
|
77
|
-
|
78
|
-
|
77
|
+
- 0
|
78
|
+
- 3
|
79
|
+
version: 0.0.3
|
80
|
+
name: elibri_onix_dict
|
79
81
|
version_requirements: *id004
|
80
82
|
prerelease: false
|
81
83
|
- !ruby/object:Gem::Dependency
|
@@ -89,7 +91,7 @@ dependencies:
|
|
89
91
|
segments:
|
90
92
|
- 0
|
91
93
|
version: "0"
|
92
|
-
name:
|
94
|
+
name: pry
|
93
95
|
version_requirements: *id005
|
94
96
|
prerelease: false
|
95
97
|
- !ruby/object:Gem::Dependency
|
@@ -103,7 +105,7 @@ dependencies:
|
|
103
105
|
segments:
|
104
106
|
- 0
|
105
107
|
version: "0"
|
106
|
-
name:
|
108
|
+
name: mocha
|
107
109
|
version_requirements: *id006
|
108
110
|
prerelease: false
|
109
111
|
- !ruby/object:Gem::Dependency
|
@@ -111,7 +113,21 @@ dependencies:
|
|
111
113
|
requirement: &id007 !ruby/object:Gem::Requirement
|
112
114
|
none: false
|
113
115
|
requirements:
|
114
|
-
- -
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
hash: 3
|
119
|
+
segments:
|
120
|
+
- 0
|
121
|
+
version: "0"
|
122
|
+
name: minitest
|
123
|
+
version_requirements: *id007
|
124
|
+
prerelease: false
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
type: :development
|
127
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
128
|
+
none: false
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
115
131
|
- !ruby/object:Gem::Version
|
116
132
|
hash: 23
|
117
133
|
segments:
|
@@ -120,11 +136,11 @@ dependencies:
|
|
120
136
|
- 0
|
121
137
|
version: 1.0.0
|
122
138
|
name: bundler
|
123
|
-
version_requirements: *
|
139
|
+
version_requirements: *id008
|
124
140
|
prerelease: false
|
125
141
|
- !ruby/object:Gem::Dependency
|
126
142
|
type: :development
|
127
|
-
requirement: &
|
143
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
128
144
|
none: false
|
129
145
|
requirements:
|
130
146
|
- - ~>
|
@@ -136,11 +152,11 @@ dependencies:
|
|
136
152
|
- 2
|
137
153
|
version: 1.6.2
|
138
154
|
name: jeweler
|
139
|
-
version_requirements: *
|
155
|
+
version_requirements: *id009
|
140
156
|
prerelease: false
|
141
157
|
- !ruby/object:Gem::Dependency
|
142
158
|
type: :development
|
143
|
-
requirement: &
|
159
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
144
160
|
none: false
|
145
161
|
requirements:
|
146
162
|
- - ">="
|
@@ -150,7 +166,7 @@ dependencies:
|
|
150
166
|
- 0
|
151
167
|
version: "0"
|
152
168
|
name: rcov
|
153
|
-
version_requirements: *
|
169
|
+
version_requirements: *id010
|
154
170
|
prerelease: false
|
155
171
|
description: EDItEUR ONIX format subset implementation used in Elibri publication system
|
156
172
|
email: marcin@urbanski.vdl.pl
|
@@ -171,6 +187,7 @@ files:
|
|
171
187
|
- VERSION
|
172
188
|
- elibri_onix.gemspec
|
173
189
|
- lib/elibri_onix.rb
|
190
|
+
- lib/elibri_onix/inspector.rb
|
174
191
|
- lib/elibri_onix/onix_3_0/audience_range.rb
|
175
192
|
- lib/elibri_onix/onix_3_0/collection.rb
|
176
193
|
- lib/elibri_onix/onix_3_0/contributor.rb
|
@@ -199,10 +216,49 @@ files:
|
|
199
216
|
- lib/elibri_onix/onix_3_0/title_element.rb
|
200
217
|
- lib/elibri_onix/releases.rb
|
201
218
|
- lib/elibri_onix/version.rb
|
219
|
+
- test/elibri_audience_range_test.rb
|
220
|
+
- test/elibri_contributors_test.rb
|
221
|
+
- test/elibri_edition_test.rb
|
222
|
+
- test/elibri_extensions_test.rb
|
223
|
+
- test/elibri_extent_test.rb
|
224
|
+
- test/elibri_languages_test.rb
|
225
|
+
- test/elibri_measurement_test.rb
|
202
226
|
- test/elibri_onix_release_3_0_onix_message_test.rb
|
203
227
|
- test/elibri_onix_test.rb
|
228
|
+
- test/elibri_product_form_test.rb
|
229
|
+
- test/elibri_publisher_info_test.rb
|
230
|
+
- test/elibri_publishing_status_test.rb
|
231
|
+
- test/elibri_record_identifiers_test.rb
|
232
|
+
- test/elibri_sale_restrictions_test.rb
|
233
|
+
- test/elibri_series_memberships_test.rb
|
234
|
+
- test/elibri_supporting_resources_test.rb
|
235
|
+
- test/elibri_texts_test.rb
|
236
|
+
- test/elibri_titles_test.rb
|
204
237
|
- test/fixtures/all_possible_tags.xml
|
205
238
|
- test/fixtures/old_dialect.xml
|
239
|
+
- test/fixtures/onix_announced_product_example.xml
|
240
|
+
- test/fixtures/onix_audience_range_example.xml
|
241
|
+
- test/fixtures/onix_audiobook_extent_example.xml
|
242
|
+
- test/fixtures/onix_collective_work_example.xml
|
243
|
+
- test/fixtures/onix_contributors_example.xml
|
244
|
+
- test/fixtures/onix_ebook_extent_example.xml
|
245
|
+
- test/fixtures/onix_edition_example.xml
|
246
|
+
- test/fixtures/onix_elibri_extensions_example.xml
|
247
|
+
- test/fixtures/onix_languages_example.xml
|
248
|
+
- test/fixtures/onix_measurement_example.xml
|
249
|
+
- test/fixtures/onix_no_contributors_example.xml
|
250
|
+
- test/fixtures/onix_out_of_print_product_example.xml
|
251
|
+
- test/fixtures/onix_preorder_product_example.xml
|
252
|
+
- test/fixtures/onix_product_form_example.xml
|
253
|
+
- test/fixtures/onix_published_product_example.xml
|
254
|
+
- test/fixtures/onix_publisher_info_example.xml
|
255
|
+
- test/fixtures/onix_record_identifiers_example.xml
|
256
|
+
- test/fixtures/onix_sale_restrictions_example.xml
|
257
|
+
- test/fixtures/onix_series_memberships_example.xml
|
258
|
+
- test/fixtures/onix_supporting_resources_example.xml
|
259
|
+
- test/fixtures/onix_texts_example.xml
|
260
|
+
- test/fixtures/onix_title_with_collection_example.xml
|
261
|
+
- test/fixtures/onix_titles_example.xml
|
206
262
|
- test/helper.rb
|
207
263
|
has_rdoc: true
|
208
264
|
homepage: http://github.com/elibri/elibri_onix
|