elibri_onix 0.2.9 → 0.2.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -44,9 +44,9 @@ module Elibri
44
44
  self.new(data, *initialization_args)
45
45
  end
46
46
 
47
- def initialize(data, *initialization_args)
48
- @to_xml = data.to_s
49
- xml = Nokogiri::XML(data) unless xml.is_a?(Nokogiri::XML::Document)
47
+ def initialize(xml, *initialization_args)
48
+ @to_xml = xml.to_s
49
+ xml = Nokogiri::XML(xml) unless xml.is_a?(Nokogiri::XML::Document)
50
50
  onix_message = xml.children.first
51
51
  @release = onix_message['release']
52
52
  @elibri_dialect = onix_message.at_xpath('elibri:Dialect').try(:text)
@@ -2,7 +2,7 @@ module Elibri
2
2
  module ONIX
3
3
  z = $VERBOSE
4
4
  $VERBOSE = nil
5
- VERSION = "0.2.9"
5
+ VERSION = "0.2.10"
6
6
  Version = VERSION
7
7
  $VERBOSE = z
8
8
  end
metadata CHANGED
@@ -1,189 +1,141 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: elibri_onix
3
- version: !ruby/object:Gem::Version
4
- version: 0.2.9
3
+ version: !ruby/object:Gem::Version
5
4
  prerelease:
5
+ version: 0.2.10
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Marcin Urbanski
9
9
  - Piotr Szmielew
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-05-20 00:00:00.000000000 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
13
+
14
+ date: 2013-05-20 00:00:00 Z
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
16
17
  name: activesupport
17
- requirement: !ruby/object:Gem::Requirement
18
- none: false
19
- requirements:
20
- - - ! '>='
21
- - !ruby/object:Gem::Version
22
- version: 2.3.5
23
- type: :runtime
24
18
  prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
19
+ requirement: &id001 !ruby/object:Gem::Requirement
26
20
  none: false
27
- requirements:
28
- - - ! '>='
29
- - !ruby/object:Gem::Version
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
30
24
  version: 2.3.5
31
- - !ruby/object:Gem::Dependency
32
- name: nokogiri
33
- requirement: !ruby/object:Gem::Requirement
34
- none: false
35
- requirements:
36
- - - ! '>='
37
- - !ruby/object:Gem::Version
38
- version: '0'
39
25
  type: :runtime
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
28
+ name: nokogiri
40
29
  prerelease: false
41
- version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
- requirements:
44
- - - ! '>='
45
- - !ruby/object:Gem::Version
46
- version: '0'
47
- - !ruby/object:Gem::Dependency
48
- name: i18n
49
- requirement: !ruby/object:Gem::Requirement
30
+ requirement: &id002 !ruby/object:Gem::Requirement
50
31
  none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: "0"
55
36
  type: :runtime
37
+ version_requirements: *id002
38
+ - !ruby/object:Gem::Dependency
39
+ name: i18n
56
40
  prerelease: false
57
- version_requirements: !ruby/object:Gem::Requirement
41
+ requirement: &id003 !ruby/object:Gem::Requirement
58
42
  none: false
59
- requirements:
60
- - - ! '>='
61
- - !ruby/object:Gem::Version
62
- version: '0'
63
- - !ruby/object:Gem::Dependency
64
- name: elibri_onix_dict
65
- requirement: !ruby/object:Gem::Requirement
66
- none: false
67
- requirements:
68
- - - ! '>='
69
- - !ruby/object:Gem::Version
70
- version: 0.0.5
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: "0"
71
47
  type: :runtime
48
+ version_requirements: *id003
49
+ - !ruby/object:Gem::Dependency
50
+ name: elibri_onix_dict
72
51
  prerelease: false
73
- version_requirements: !ruby/object:Gem::Requirement
52
+ requirement: &id004 !ruby/object:Gem::Requirement
74
53
  none: false
75
- requirements:
76
- - - ! '>='
77
- - !ruby/object:Gem::Version
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
78
57
  version: 0.0.5
79
- - !ruby/object:Gem::Dependency
58
+ type: :runtime
59
+ version_requirements: *id004
60
+ - !ruby/object:Gem::Dependency
80
61
  name: pry
81
- requirement: !ruby/object:Gem::Requirement
82
- none: false
83
- requirements:
84
- - - ! '>='
85
- - !ruby/object:Gem::Version
86
- version: '0'
87
- type: :development
88
62
  prerelease: false
89
- version_requirements: !ruby/object:Gem::Requirement
63
+ requirement: &id005 !ruby/object:Gem::Requirement
90
64
  none: false
91
- requirements:
92
- - - ! '>='
93
- - !ruby/object:Gem::Version
94
- version: '0'
95
- - !ruby/object:Gem::Dependency
96
- name: mocha
97
- requirement: !ruby/object:Gem::Requirement
98
- none: false
99
- requirements:
100
- - - ! '>='
101
- - !ruby/object:Gem::Version
102
- version: '0'
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: "0"
103
69
  type: :development
70
+ version_requirements: *id005
71
+ - !ruby/object:Gem::Dependency
72
+ name: mocha
104
73
  prerelease: false
105
- version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
- requirements:
108
- - - ! '>='
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: minitest
113
- requirement: !ruby/object:Gem::Requirement
74
+ requirement: &id006 !ruby/object:Gem::Requirement
114
75
  none: false
115
- requirements:
116
- - - ! '>='
117
- - !ruby/object:Gem::Version
118
- version: '0'
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: "0"
119
80
  type: :development
81
+ version_requirements: *id006
82
+ - !ruby/object:Gem::Dependency
83
+ name: minitest
120
84
  prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
122
- none: false
123
- requirements:
124
- - - ! '>='
125
- - !ruby/object:Gem::Version
126
- version: '0'
127
- - !ruby/object:Gem::Dependency
128
- name: bundler
129
- requirement: !ruby/object:Gem::Requirement
85
+ requirement: &id007 !ruby/object:Gem::Requirement
130
86
  none: false
131
- requirements:
132
- - - ! '>='
133
- - !ruby/object:Gem::Version
134
- version: 1.0.0
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: "0"
135
91
  type: :development
92
+ version_requirements: *id007
93
+ - !ruby/object:Gem::Dependency
94
+ name: bundler
136
95
  prerelease: false
137
- version_requirements: !ruby/object:Gem::Requirement
96
+ requirement: &id008 !ruby/object:Gem::Requirement
138
97
  none: false
139
- requirements:
140
- - - ! '>='
141
- - !ruby/object:Gem::Version
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
142
101
  version: 1.0.0
143
- - !ruby/object:Gem::Dependency
144
- name: rake
145
- requirement: !ruby/object:Gem::Requirement
146
- none: false
147
- requirements:
148
- - - ! '>='
149
- - !ruby/object:Gem::Version
150
- version: '0'
151
102
  type: :development
103
+ version_requirements: *id008
104
+ - !ruby/object:Gem::Dependency
105
+ name: rake
152
106
  prerelease: false
153
- version_requirements: !ruby/object:Gem::Requirement
107
+ requirement: &id009 !ruby/object:Gem::Requirement
154
108
  none: false
155
- requirements:
156
- - - ! '>='
157
- - !ruby/object:Gem::Version
158
- version: '0'
159
- - !ruby/object:Gem::Dependency
160
- name: rdoc
161
- requirement: !ruby/object:Gem::Requirement
162
- none: false
163
- requirements:
164
- - - ! '>='
165
- - !ruby/object:Gem::Version
166
- version: '0'
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: "0"
167
113
  type: :development
114
+ version_requirements: *id009
115
+ - !ruby/object:Gem::Dependency
116
+ name: rdoc
168
117
  prerelease: false
169
- version_requirements: !ruby/object:Gem::Requirement
118
+ requirement: &id010 !ruby/object:Gem::Requirement
170
119
  none: false
171
- requirements:
172
- - - ! '>='
173
- - !ruby/object:Gem::Version
174
- version: '0'
175
- description: EDItEUR ONIX format subset implementation used in Elibri publication
176
- system
177
- email:
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: "0"
124
+ type: :development
125
+ version_requirements: *id010
126
+ description: EDItEUR ONIX format subset implementation used in Elibri publication system
127
+ email:
178
128
  - marcin@urbanski.vdl.pl
179
129
  - p.szmielew@ava.waw.pl
180
130
  executables: []
131
+
181
132
  extensions: []
182
- extra_rdoc_files:
133
+
134
+ extra_rdoc_files:
183
135
  - LICENSE.txt
184
136
  - README.rdoc
185
137
  - FIELDS.rdoc
186
- files:
138
+ files:
187
139
  - .gitignore
188
140
  - .travis.yml
189
141
  - FIELDS.rdoc
@@ -283,31 +235,33 @@ files:
283
235
  - test/fixtures/onix_unlimited_book_sample_example.xml
284
236
  - test/helper.rb
285
237
  homepage: http://github.com/elibri/elibri_onix
286
- licenses:
238
+ licenses:
287
239
  - MIT
288
240
  post_install_message:
289
241
  rdoc_options: []
290
- require_paths:
242
+
243
+ require_paths:
291
244
  - lib
292
- required_ruby_version: !ruby/object:Gem::Requirement
245
+ required_ruby_version: !ruby/object:Gem::Requirement
293
246
  none: false
294
- requirements:
295
- - - ! '>='
296
- - !ruby/object:Gem::Version
297
- version: '0'
298
- required_rubygems_version: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - ">="
249
+ - !ruby/object:Gem::Version
250
+ version: "0"
251
+ required_rubygems_version: !ruby/object:Gem::Requirement
299
252
  none: false
300
- requirements:
301
- - - ! '>='
302
- - !ruby/object:Gem::Version
303
- version: '0'
253
+ requirements:
254
+ - - ">="
255
+ - !ruby/object:Gem::Version
256
+ version: "0"
304
257
  requirements: []
258
+
305
259
  rubyforge_project:
306
- rubygems_version: 1.8.25
260
+ rubygems_version: 1.8.23
307
261
  signing_key:
308
262
  specification_version: 3
309
263
  summary: EDItEUR ONIX format subset implementation used in Elibri publication system
310
- test_files:
264
+ test_files:
311
265
  - test/elibri_audience_range_test.rb
312
266
  - test/elibri_categories_test.rb
313
267
  - test/elibri_contributors_test.rb