elibri_onix 0.2.14 → 0.2.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -262,8 +262,16 @@ module Elibri
262
262
  collateral_details_setup(data.at_xpath('xmlns:CollateralDetail')) if data.at_xpath('xmlns:CollateralDetail')
263
263
  publishing_details_setup(data.at_xpath('xmlns:PublishingDetail')) if data.at_xpath('xmlns:PublishingDetail')
264
264
  licence_information_setup(data)
265
- @excerpt_infos = data.xpath("//elibri:excerpt").map { |node| ExcerptInfo.new(node) }
266
- @file_infos = data.xpath("//elibri:master").map { |node| FileInfo.new(node) }
265
+ begin
266
+ @excerpt_infos = data.at_xpath("elibri:excerpts").xpath("elibri:excerpt").map { |node| ExcerptInfo.new(node) }
267
+ rescue
268
+ @excerpt_infos = []
269
+ end
270
+ begin
271
+ @file_infos = data.at_xpath("elibri:masters").xpath("elibri:master").map { |node| FileInfo.new(node) }
272
+ rescue
273
+ @file_infos = []
274
+ end
267
275
  after_parse
268
276
  end
269
277
 
@@ -2,7 +2,7 @@ module Elibri
2
2
  module ONIX
3
3
  z = $VERBOSE
4
4
  $VERBOSE = nil
5
- VERSION = "0.2.14"
5
+ VERSION = "0.2.15"
6
6
  Version = VERSION
7
7
  $VERBOSE = z
8
8
  end
data/lib/elibri_onix.rb CHANGED
@@ -15,8 +15,6 @@ require 'elibri_onix/releases'
15
15
  require 'elibri_onix/nokogiri_patch'
16
16
  require 'elibri_onix_dict'
17
17
 
18
- $KCODE = "UTF-8"
19
-
20
18
 
21
19
  module Elibri
22
20
  module ONIX
@@ -57,4 +57,52 @@
57
57
  <elibri:master id="766" md5="d2c75a26973a1888f241125717b166cf" file_size="5246982" file_type="mobi" updated_at="2012-12-30T15:16:00+00:00"/>
58
58
  </elibri:masters>
59
59
  </Product>
60
+ <Product>
61
+ <RecordReference>fdb8fa072be774d97a98</RecordReference>
62
+ <NotificationType>03</NotificationType>
63
+ <ProductIdentifier>
64
+ <ProductIDType>15</ProductIDType>
65
+ <IDValue>9788324799993</IDValue>
66
+ </ProductIdentifier>
67
+ <DescriptiveDetail>
68
+ <ProductComposition>00</ProductComposition>
69
+ <ProductForm>EA</ProductForm>
70
+ <TitleDetail>
71
+ <TitleType>01</TitleType>
72
+ <TitleElement>
73
+ <TitleElementLevel>01</TitleElementLevel>
74
+ <TitleText>Legalni</TitleText>
75
+ </TitleElement>
76
+ </TitleDetail>
77
+ </DescriptiveDetail>
78
+ <PublishingDetail>
79
+ <Publisher>
80
+ <PublishingRole>01</PublishingRole>
81
+ <PublisherIdentifier>
82
+ <PublisherIDType>01</PublisherIDType>
83
+ <IDTypeName>ElibriPublisherCode</IDTypeName>
84
+ <IDValue>11</IDValue>
85
+ </PublisherIdentifier>
86
+ <PublisherName>GREG</PublisherName>
87
+ </Publisher>
88
+ <CityOfPublication>Warszawa</CityOfPublication>
89
+ <PublishingStatus>04</PublishingStatus>
90
+ <SalesRights>
91
+ <SalesRightsType>01</SalesRightsType>
92
+ <Territory>
93
+ <RegionsIncluded>WORLD</RegionsIncluded>
94
+ </Territory>
95
+ </SalesRights>
96
+ </PublishingDetail>
97
+ <elibri:preview_exists>false</elibri:preview_exists>
98
+ <elibri:SaleNotRestricted/>
99
+ <elibri:excerpts>
100
+ <elibri:excerpt md5="4b145ff46636b06f49225abdab70927f" file_size="2100230" file_type="epub_excerpt" updated_at="2012-12-30T15:18:00+00:00" id="777">https://www.elibri.com.pl/excerpt/767</elibri:excerpt>
101
+ <elibri:excerpt md5="6f534ab6ab573845bb7ab221192aa86a" file_size="2101254" file_type="mobi_excerpt" updated_at="2012-12-30T15:16:00+00:00" id="778">https://www.elibri.com.pl/excerpt/768</elibri:excerpt>
102
+ </elibri:excerpts>
103
+ <elibri:masters>
104
+ <elibri:master id="775" md5="e9353ce40eaa677f8c5d666c2f8bbb3f" file_size="4197382" file_type="epub" updated_at="2012-12-30T15:18:00+00:00"/>
105
+ <elibri:master id="776" md5="d2c75a26973a1888f241125717b166cf" file_size="5246982" file_type="mobi" updated_at="2012-12-30T15:16:00+00:00"/>
106
+ </elibri:masters>
107
+ </Product>
60
108
  </ONIXMessage>
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elibri_onix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.14
4
+ version: 0.2.15
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Marcin Urbanski
@@ -9,146 +10,166 @@ authors:
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2014-09-30 00:00:00.000000000 Z
13
+ date: 2014-12-08 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: activesupport
16
17
  requirement: !ruby/object:Gem::Requirement
18
+ none: false
17
19
  requirements:
18
- - - '>='
20
+ - - ! '>='
19
21
  - !ruby/object:Gem::Version
20
22
  version: 2.3.5
21
23
  type: :runtime
22
24
  prerelease: false
23
25
  version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
24
27
  requirements:
25
- - - '>='
28
+ - - ! '>='
26
29
  - !ruby/object:Gem::Version
27
30
  version: 2.3.5
28
31
  - !ruby/object:Gem::Dependency
29
32
  name: nokogiri
30
33
  requirement: !ruby/object:Gem::Requirement
34
+ none: false
31
35
  requirements:
32
- - - '>='
36
+ - - ! '>='
33
37
  - !ruby/object:Gem::Version
34
38
  version: '0'
35
39
  type: :runtime
36
40
  prerelease: false
37
41
  version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
38
43
  requirements:
39
- - - '>='
44
+ - - ! '>='
40
45
  - !ruby/object:Gem::Version
41
46
  version: '0'
42
47
  - !ruby/object:Gem::Dependency
43
48
  name: i18n
44
49
  requirement: !ruby/object:Gem::Requirement
50
+ none: false
45
51
  requirements:
46
- - - '>='
52
+ - - ! '>='
47
53
  - !ruby/object:Gem::Version
48
54
  version: '0'
49
55
  type: :runtime
50
56
  prerelease: false
51
57
  version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
52
59
  requirements:
53
- - - '>='
60
+ - - ! '>='
54
61
  - !ruby/object:Gem::Version
55
62
  version: '0'
56
63
  - !ruby/object:Gem::Dependency
57
64
  name: elibri_onix_dict
58
65
  requirement: !ruby/object:Gem::Requirement
66
+ none: false
59
67
  requirements:
60
- - - '>='
68
+ - - ! '>='
61
69
  - !ruby/object:Gem::Version
62
70
  version: 0.0.5
63
71
  type: :runtime
64
72
  prerelease: false
65
73
  version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
66
75
  requirements:
67
- - - '>='
76
+ - - ! '>='
68
77
  - !ruby/object:Gem::Version
69
78
  version: 0.0.5
70
79
  - !ruby/object:Gem::Dependency
71
80
  name: pry
72
81
  requirement: !ruby/object:Gem::Requirement
82
+ none: false
73
83
  requirements:
74
- - - '>='
84
+ - - ! '>='
75
85
  - !ruby/object:Gem::Version
76
86
  version: '0'
77
87
  type: :development
78
88
  prerelease: false
79
89
  version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
80
91
  requirements:
81
- - - '>='
92
+ - - ! '>='
82
93
  - !ruby/object:Gem::Version
83
94
  version: '0'
84
95
  - !ruby/object:Gem::Dependency
85
96
  name: mocha
86
97
  requirement: !ruby/object:Gem::Requirement
98
+ none: false
87
99
  requirements:
88
- - - '>='
100
+ - - ! '>='
89
101
  - !ruby/object:Gem::Version
90
102
  version: '0'
91
103
  type: :development
92
104
  prerelease: false
93
105
  version_requirements: !ruby/object:Gem::Requirement
106
+ none: false
94
107
  requirements:
95
- - - '>='
108
+ - - ! '>='
96
109
  - !ruby/object:Gem::Version
97
110
  version: '0'
98
111
  - !ruby/object:Gem::Dependency
99
112
  name: minitest
100
113
  requirement: !ruby/object:Gem::Requirement
114
+ none: false
101
115
  requirements:
102
- - - '>='
116
+ - - ! '>='
103
117
  - !ruby/object:Gem::Version
104
118
  version: '0'
105
119
  type: :development
106
120
  prerelease: false
107
121
  version_requirements: !ruby/object:Gem::Requirement
122
+ none: false
108
123
  requirements:
109
- - - '>='
124
+ - - ! '>='
110
125
  - !ruby/object:Gem::Version
111
126
  version: '0'
112
127
  - !ruby/object:Gem::Dependency
113
128
  name: bundler
114
129
  requirement: !ruby/object:Gem::Requirement
130
+ none: false
115
131
  requirements:
116
- - - '>='
132
+ - - ! '>='
117
133
  - !ruby/object:Gem::Version
118
134
  version: 1.0.0
119
135
  type: :development
120
136
  prerelease: false
121
137
  version_requirements: !ruby/object:Gem::Requirement
138
+ none: false
122
139
  requirements:
123
- - - '>='
140
+ - - ! '>='
124
141
  - !ruby/object:Gem::Version
125
142
  version: 1.0.0
126
143
  - !ruby/object:Gem::Dependency
127
144
  name: rake
128
145
  requirement: !ruby/object:Gem::Requirement
146
+ none: false
129
147
  requirements:
130
- - - '>='
148
+ - - ! '>='
131
149
  - !ruby/object:Gem::Version
132
150
  version: '0'
133
151
  type: :development
134
152
  prerelease: false
135
153
  version_requirements: !ruby/object:Gem::Requirement
154
+ none: false
136
155
  requirements:
137
- - - '>='
156
+ - - ! '>='
138
157
  - !ruby/object:Gem::Version
139
158
  version: '0'
140
159
  - !ruby/object:Gem::Dependency
141
160
  name: rdoc
142
161
  requirement: !ruby/object:Gem::Requirement
162
+ none: false
143
163
  requirements:
144
- - - '>='
164
+ - - ! '>='
145
165
  - !ruby/object:Gem::Version
146
166
  version: '0'
147
167
  type: :development
148
168
  prerelease: false
149
169
  version_requirements: !ruby/object:Gem::Requirement
170
+ none: false
150
171
  requirements:
151
- - - '>='
172
+ - - ! '>='
152
173
  - !ruby/object:Gem::Version
153
174
  version: '0'
154
175
  description: EDItEUR ONIX format subset implementation used in Elibri publication
@@ -270,26 +291,27 @@ files:
270
291
  homepage: http://github.com/elibri/elibri_onix
271
292
  licenses:
272
293
  - MIT
273
- metadata: {}
274
294
  post_install_message:
275
295
  rdoc_options: []
276
296
  require_paths:
277
297
  - lib
278
298
  required_ruby_version: !ruby/object:Gem::Requirement
299
+ none: false
279
300
  requirements:
280
- - - '>='
301
+ - - ! '>='
281
302
  - !ruby/object:Gem::Version
282
303
  version: '0'
283
304
  required_rubygems_version: !ruby/object:Gem::Requirement
305
+ none: false
284
306
  requirements:
285
- - - '>='
307
+ - - ! '>='
286
308
  - !ruby/object:Gem::Version
287
309
  version: '0'
288
310
  requirements: []
289
311
  rubyforge_project:
290
- rubygems_version: 2.2.2
312
+ rubygems_version: 1.8.23
291
313
  signing_key:
292
- specification_version: 4
314
+ specification_version: 3
293
315
  summary: EDItEUR ONIX format subset implementation used in Elibri publication system
294
316
  test_files:
295
317
  - test/elibri_audience_range_test.rb
@@ -350,3 +372,4 @@ test_files:
350
372
  - test/fixtures/onix_titles_example.xml
351
373
  - test/fixtures/onix_unlimited_book_sample_example.xml
352
374
  - test/helper.rb
375
+ has_rdoc:
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 8ce46a1eb8e46cef1cc9a59fe3bcea7231291aac
4
- data.tar.gz: bac4f813e83b8fef9350b3188982443b437f8b20
5
- SHA512:
6
- metadata.gz: 643f2bfdee0d57672f412273a08c6ad8e3c4057836265c2caf32ffcd8e8d96f2b27a552964ccc22eb003c7b8a87ae5f978dc52b03a045a7cfba06d2dcb249254
7
- data.tar.gz: c2b6969cffc82d9567bc737b560f52e6c41f1a7e544f088e2dad16c945431177caacf3d7656fa4f80ee3980be611a129e207a4e71fa112ddf3c2f68503d4bb0c