elibri_onix 0.2.13 → 0.2.14

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8ce46a1eb8e46cef1cc9a59fe3bcea7231291aac
4
+ data.tar.gz: bac4f813e83b8fef9350b3188982443b437f8b20
5
+ SHA512:
6
+ metadata.gz: 643f2bfdee0d57672f412273a08c6ad8e3c4057836265c2caf32ffcd8e8d96f2b27a552964ccc22eb003c7b8a87ae5f978dc52b03a045a7cfba06d2dcb249254
7
+ data.tar.gz: c2b6969cffc82d9567bc737b560f52e6c41f1a7e544f088e2dad16c945431177caacf3d7656fa4f80ee3980be611a129e207a4e71fa112ddf3c2f68503d4bb0c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- elibri_onix (0.2.13)
4
+ elibri_onix (0.2.14)
5
5
  activesupport (>= 2.3.5)
6
6
  elibri_onix_dict (>= 0.0.5)
7
7
  i18n
@@ -10,22 +10,22 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activesupport (3.2.12)
14
- i18n (~> 0.6)
13
+ activesupport (3.2.17)
14
+ i18n (~> 0.6, >= 0.6.4)
15
15
  multi_json (~> 1.0)
16
16
  coderay (1.0.6)
17
- elibri_onix_dict (0.0.22)
18
- i18n (0.6.5)
17
+ elibri_onix_dict (0.0.24)
18
+ i18n (0.6.11)
19
19
  json (1.7.6)
20
20
  json (1.7.6-java)
21
21
  metaclass (0.0.1)
22
22
  method_source (0.7.1)
23
- mini_portile (0.5.0)
23
+ mini_portile (0.5.3)
24
24
  minitest (3.0.1)
25
25
  mocha (0.11.4)
26
26
  metaclass (~> 0.0.1)
27
- multi_json (1.8.2)
28
- nokogiri (1.6.0)
27
+ multi_json (1.10.1)
28
+ nokogiri (1.6.1)
29
29
  mini_portile (~> 0.5.0)
30
30
  pry (0.9.9.6)
31
31
  coderay (~> 1.0.5)
@@ -19,7 +19,7 @@ module Elibri
19
19
  :publisher, :product_form, :no_contributor, :edition_statement, :number_of_illustrations, :publishing_status,
20
20
  :publishing_date, :premiere, :front_cover, :series_names, :city_of_publication,
21
21
  :elibri_product_category1_id, :elibri_product_category2_id, :preview_exists, :short_description, :sale_restricted_to_poland,
22
- :technical_protection_onix_code, :unlimited_licence
22
+ :technical_protection_onix_code, :unlimited_licence, :hyphenated_isbn, :preorder_embargo_date
23
23
  ]
24
24
 
25
25
  #:nodoc:
@@ -181,6 +181,9 @@ module Elibri
181
181
  #informacje o plikach master (produkty cyfrowe)
182
182
  attr_reader :file_infos
183
183
 
184
+ #isbn z kreskami
185
+ attr_reader :hyphenated_isbn
186
+
184
187
  #:nodoc:
185
188
  attr_reader :text_contents
186
189
  attr_reader :file_size
@@ -207,6 +210,7 @@ module Elibri
207
210
  attr_reader :sales_restrictions
208
211
  attr_reader :publishing_date
209
212
  attr_reader :related_products
213
+ attr_reader :preorder_embargo_date
210
214
 
211
215
  #:nodoc:
212
216
  attr_accessor :sale_restricted_to_poland, :unlimited_licence, :no_contributor, :preview_exists
@@ -240,6 +244,8 @@ module Elibri
240
244
  @cover_price = BigDecimal.new(data.at_xpath('elibri:CoverPrice').try(:text)) if data.at_xpath('elibri:CoverPrice')
241
245
  @vat = data.at_xpath('elibri:Vat').try(:text).try(:to_i)
242
246
  @pkwiu = data.at_xpath('elibri:PKWiU').try(:text)
247
+ @hyphenated_isbn = data.at_xpath('elibri:HyphenatedISBN').try(:text)
248
+
243
249
  @preview_exists = (data.at_xpath('elibri:preview_exists').try(:text) == "true")
244
250
  @identifiers = data.xpath('xmlns:ProductIdentifier').map { |ident_data| ProductIdentifier.new(ident_data) }
245
251
  begin
@@ -312,7 +318,13 @@ module Elibri
312
318
  @publisher = Publisher.new(data.at_xpath('xmlns:Publisher')) if data.at_xpath('xmlns:Publisher')
313
319
  @publishing_status = data.at_xpath('xmlns:PublishingStatus').try(:text)
314
320
  @city_of_publication = data.at_xpath("xmlns:CityOfPublication").try(:text)
315
- @publishing_date = PublishingDate.new(data.at_xpath('xmlns:PublishingDate')) if data.at_xpath('xmlns:PublishingDate')
321
+ publication_dates = data.xpath('xmlns:PublishingDate').map do |node|
322
+ PublishingDate.new(node)
323
+ end
324
+ @publishing_date = publication_dates.find { |date| date.role == Elibri::ONIX::Dict::Release_3_0::PublishingDateRole::PUBLICATION_DATE }
325
+ preorder_embargo_date_as_object = publication_dates.find { |date| date.role == Elibri::ONIX::Dict::Release_3_0::PublishingDateRole::PREORDER_EMBARGO_DATE }
326
+ @preorder_embargo_date = Date.new(*preorder_embargo_date_as_object.parsed) if preorder_embargo_date_as_object
327
+
316
328
  @sales_restrictions = data.xpath('xmlns:SalesRestriction').map { |restriction_data| SalesRestriction.new(restriction_data) }
317
329
  #ograniczenia terytorialne
318
330
  if data.at_xpath(".//xmlns:CountriesIncluded").try(:text) == "PL"
@@ -2,7 +2,7 @@ module Elibri
2
2
  module ONIX
3
3
  z = $VERBOSE
4
4
  $VERBOSE = nil
5
- VERSION = "0.2.13"
5
+ VERSION = "0.2.14"
6
6
  Version = VERSION
7
7
  $VERBOSE = z
8
8
  end
@@ -19,6 +19,7 @@ describe Elibri::ONIX::Release_3_0::ONIXMessage do
19
19
  assert_equal :preorder, product.current_state
20
20
  assert_equal [2011, 2, 10], product.parsed_publishing_date
21
21
  assert_equal Date.new(2011, 2, 10), product.premiere
22
+ assert_equal Date.new(2011, 2, 1), product.preorder_embargo_date
22
23
  assert !product.sales_restrictions?
23
24
  end
24
25
 
@@ -8,6 +8,7 @@ describe Elibri::ONIX::Release_3_0::ONIXMessage do
8
8
  assert_equal "fdb8fa072be774d97a97", product.record_reference
9
9
  assert_equal '9788324799992', product.isbn13
10
10
  assert_equal '9788324788882', product.ean
11
+ assert_equal '978-83-2478-888-2', product.hyphenated_isbn
11
12
 
12
13
  assert_equal({"Olesiejuk" => "355006"}, product.proprietary_identifiers)
13
14
 
@@ -7,7 +7,7 @@
7
7
  <ContactName>Tomasz Meka</ContactName>
8
8
  <EmailAddress>kontakt@elibri.com.pl</EmailAddress>
9
9
  </Sender>
10
- <SentDateTime>20111111</SentDateTime>
10
+ <SentDateTime>20140930</SentDateTime>
11
11
  </Header>
12
12
  <Product>
13
13
  <RecordReference>fdb8fa072be774d97a97</RecordReference>
@@ -44,6 +44,11 @@
44
44
  <DateFormat>00</DateFormat>
45
45
  <Date>20110210</Date>
46
46
  </PublishingDate>
47
+ <PublishingDate>
48
+ <PublishingDateRole>27</PublishingDateRole>
49
+ <DateFormat>00</DateFormat>
50
+ <Date>20110201</Date>
51
+ </PublishingDate>
47
52
  <SalesRights>
48
53
  <SalesRightsType>01</SalesRightsType>
49
54
  <Territory>
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elibri_onix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.13
5
- prerelease:
4
+ version: 0.2.14
6
5
  platform: ruby
7
6
  authors:
8
7
  - Marcin Urbanski
@@ -10,166 +9,146 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-12-09 00:00:00.000000000 Z
12
+ date: 2014-09-30 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: activesupport
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ! '>='
18
+ - - '>='
21
19
  - !ruby/object:Gem::Version
22
20
  version: 2.3.5
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ! '>='
25
+ - - '>='
29
26
  - !ruby/object:Gem::Version
30
27
  version: 2.3.5
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: nokogiri
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ! '>='
32
+ - - '>='
37
33
  - !ruby/object:Gem::Version
38
34
  version: '0'
39
35
  type: :runtime
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
- - - ! '>='
39
+ - - '>='
45
40
  - !ruby/object:Gem::Version
46
41
  version: '0'
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: i18n
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
- - - ! '>='
46
+ - - '>='
53
47
  - !ruby/object:Gem::Version
54
48
  version: '0'
55
49
  type: :runtime
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
- - - ! '>='
53
+ - - '>='
61
54
  - !ruby/object:Gem::Version
62
55
  version: '0'
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: elibri_onix_dict
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
- - - ! '>='
60
+ - - '>='
69
61
  - !ruby/object:Gem::Version
70
62
  version: 0.0.5
71
63
  type: :runtime
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
- - - ! '>='
67
+ - - '>='
77
68
  - !ruby/object:Gem::Version
78
69
  version: 0.0.5
79
70
  - !ruby/object:Gem::Dependency
80
71
  name: pry
81
72
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
73
  requirements:
84
- - - ! '>='
74
+ - - '>='
85
75
  - !ruby/object:Gem::Version
86
76
  version: '0'
87
77
  type: :development
88
78
  prerelease: false
89
79
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
80
  requirements:
92
- - - ! '>='
81
+ - - '>='
93
82
  - !ruby/object:Gem::Version
94
83
  version: '0'
95
84
  - !ruby/object:Gem::Dependency
96
85
  name: mocha
97
86
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
87
  requirements:
100
- - - ! '>='
88
+ - - '>='
101
89
  - !ruby/object:Gem::Version
102
90
  version: '0'
103
91
  type: :development
104
92
  prerelease: false
105
93
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
94
  requirements:
108
- - - ! '>='
95
+ - - '>='
109
96
  - !ruby/object:Gem::Version
110
97
  version: '0'
111
98
  - !ruby/object:Gem::Dependency
112
99
  name: minitest
113
100
  requirement: !ruby/object:Gem::Requirement
114
- none: false
115
101
  requirements:
116
- - - ! '>='
102
+ - - '>='
117
103
  - !ruby/object:Gem::Version
118
104
  version: '0'
119
105
  type: :development
120
106
  prerelease: false
121
107
  version_requirements: !ruby/object:Gem::Requirement
122
- none: false
123
108
  requirements:
124
- - - ! '>='
109
+ - - '>='
125
110
  - !ruby/object:Gem::Version
126
111
  version: '0'
127
112
  - !ruby/object:Gem::Dependency
128
113
  name: bundler
129
114
  requirement: !ruby/object:Gem::Requirement
130
- none: false
131
115
  requirements:
132
- - - ! '>='
116
+ - - '>='
133
117
  - !ruby/object:Gem::Version
134
118
  version: 1.0.0
135
119
  type: :development
136
120
  prerelease: false
137
121
  version_requirements: !ruby/object:Gem::Requirement
138
- none: false
139
122
  requirements:
140
- - - ! '>='
123
+ - - '>='
141
124
  - !ruby/object:Gem::Version
142
125
  version: 1.0.0
143
126
  - !ruby/object:Gem::Dependency
144
127
  name: rake
145
128
  requirement: !ruby/object:Gem::Requirement
146
- none: false
147
129
  requirements:
148
- - - ! '>='
130
+ - - '>='
149
131
  - !ruby/object:Gem::Version
150
132
  version: '0'
151
133
  type: :development
152
134
  prerelease: false
153
135
  version_requirements: !ruby/object:Gem::Requirement
154
- none: false
155
136
  requirements:
156
- - - ! '>='
137
+ - - '>='
157
138
  - !ruby/object:Gem::Version
158
139
  version: '0'
159
140
  - !ruby/object:Gem::Dependency
160
141
  name: rdoc
161
142
  requirement: !ruby/object:Gem::Requirement
162
- none: false
163
143
  requirements:
164
- - - ! '>='
144
+ - - '>='
165
145
  - !ruby/object:Gem::Version
166
146
  version: '0'
167
147
  type: :development
168
148
  prerelease: false
169
149
  version_requirements: !ruby/object:Gem::Requirement
170
- none: false
171
150
  requirements:
172
- - - ! '>='
151
+ - - '>='
173
152
  - !ruby/object:Gem::Version
174
153
  version: '0'
175
154
  description: EDItEUR ONIX format subset implementation used in Elibri publication
@@ -291,33 +270,26 @@ files:
291
270
  homepage: http://github.com/elibri/elibri_onix
292
271
  licenses:
293
272
  - MIT
273
+ metadata: {}
294
274
  post_install_message:
295
275
  rdoc_options: []
296
276
  require_paths:
297
277
  - lib
298
278
  required_ruby_version: !ruby/object:Gem::Requirement
299
- none: false
300
279
  requirements:
301
- - - ! '>='
280
+ - - '>='
302
281
  - !ruby/object:Gem::Version
303
282
  version: '0'
304
- segments:
305
- - 0
306
- hash: 3259318260067271762
307
283
  required_rubygems_version: !ruby/object:Gem::Requirement
308
- none: false
309
284
  requirements:
310
- - - ! '>='
285
+ - - '>='
311
286
  - !ruby/object:Gem::Version
312
287
  version: '0'
313
- segments:
314
- - 0
315
- hash: 3259318260067271762
316
288
  requirements: []
317
289
  rubyforge_project:
318
- rubygems_version: 1.8.25
290
+ rubygems_version: 2.2.2
319
291
  signing_key:
320
- specification_version: 3
292
+ specification_version: 4
321
293
  summary: EDItEUR ONIX format subset implementation used in Elibri publication system
322
294
  test_files:
323
295
  - test/elibri_audience_range_test.rb