elibri_onix 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{elibri_onix}
8
- s.version = "0.1.11"
8
+ s.version = "0.1.12"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Marcin Urbanski"]
12
- s.date = %q{2011-12-19}
12
+ s.date = %q{2012-03-16}
13
13
  s.description = %q{EDItEUR ONIX format subset implementation used in Elibri publication system}
14
14
  s.email = %q{marcin@urbanski.vdl.pl}
15
15
  s.extra_rdoc_files = [
@@ -105,7 +105,7 @@ Gem::Specification.new do |s|
105
105
  s.homepage = %q{http://github.com/elibri/elibri_onix}
106
106
  s.licenses = ["MIT"]
107
107
  s.require_paths = ["lib"]
108
- s.rubygems_version = %q{1.6.2}
108
+ s.rubygems_version = %q{1.5.2}
109
109
  s.summary = %q{EDItEUR ONIX format subset implementation used in Elibri publication system}
110
110
 
111
111
  if s.respond_to? :specification_version then
@@ -22,6 +22,8 @@ module Elibri
22
22
  xml_accessor :cover_price_from_3_0_1, :from => 'elibri:CoverPrice', :as => BigDecimal
23
23
  xml_accessor :vat_from_3_0_1, :from => 'elibri:Vat', :as => Fixnum
24
24
  xml_accessor :pkwiu_from_3_0_1, :from => 'elibri:PKWiU'
25
+ xml_accessor :preview_exists_from_3_0_1, :from => "elibri:preview_exists"
26
+
25
27
 
26
28
  # Attributes in namespace elibri:* are specific for dialect >= 3.0.1.
27
29
  # If dialect is less than 3.0.1, returns nil.
@@ -37,7 +39,6 @@ module Elibri
37
39
  EVAL_END
38
40
  end
39
41
 
40
-
41
42
  xml_accessor :identifiers, :as => [ProductIdentifier]
42
43
  xml_accessor :related_products, :as => [RelatedProduct], :in => 'RelatedMaterial'
43
44
  xml_accessor :supply_details, :as => [SupplyDetail], :in => 'ProductSupply'
@@ -94,6 +95,9 @@ module Elibri
94
95
  end
95
96
  end
96
97
 
98
+ def preview_exists?
99
+ preview_exists_from_3_0_1 == "true"
100
+ end
97
101
 
98
102
  def front_cover
99
103
  supporting_resources.find { |resource| resource.content_type_name == "front_cover" }
@@ -4,7 +4,7 @@ module Elibri
4
4
  module Version
5
5
  MAJOR = 0
6
6
  MINOR = 1
7
- PATCH = 11
7
+ PATCH = 12
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
10
10
  end
@@ -9,6 +9,7 @@ describe Elibri::ONIX::Release_3_0::ONIXMessage do
9
9
  assert_equal 12.99, product.cover_price
10
10
  assert_equal 5, product.vat
11
11
  assert_equal "58.11.1", product.pkwiu
12
+ assert product.preview_exists?
12
13
  end
13
14
 
14
15
  end
@@ -4,7 +4,7 @@ describe Elibri::ONIX::Release_3_0::ONIXMessage do
4
4
 
5
5
  it "should be able to parse the product form" do
6
6
  product = load_fixture("onix_product_form_example.xml")
7
-
7
+ #TODO - rozwiń jak w php
8
8
  assert_equal "00", product.product_composition
9
9
  assert_equal "BA", product.product_form
10
10
  end
@@ -34,5 +34,6 @@
34
34
  <elibri:CoverPrice>12.99</elibri:CoverPrice>
35
35
  <elibri:Vat>5</elibri:Vat>
36
36
  <elibri:PKWiU>58.11.1</elibri:PKWiU>
37
+ <elibri:preview_exists>true</elibri:preview_exists>
37
38
  </Product>
38
39
  </ONIXMessage>
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: 13
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 11
10
- version: 0.1.11
9
+ - 12
10
+ version: 0.1.12
11
11
  platform: ruby
12
12
  authors:
13
13
  - Marcin Urbanski
@@ -15,10 +15,11 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-12-19 00:00:00 +01:00
18
+ date: 2012-03-16 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
+ type: :runtime
22
23
  name: activesupport
23
24
  version_requirements: &id001 !ruby/object:Gem::Requirement
24
25
  none: false
@@ -32,9 +33,9 @@ dependencies:
32
33
  - 5
33
34
  version: 2.3.5
34
35
  prerelease: false
35
- type: :runtime
36
36
  requirement: *id001
37
37
  - !ruby/object:Gem::Dependency
38
+ type: :runtime
38
39
  name: roxml
39
40
  version_requirements: &id002 !ruby/object:Gem::Requirement
40
41
  none: false
@@ -48,9 +49,9 @@ dependencies:
48
49
  - 3
49
50
  version: 3.1.3
50
51
  prerelease: false
51
- type: :runtime
52
52
  requirement: *id002
53
53
  - !ruby/object:Gem::Dependency
54
+ type: :runtime
54
55
  name: i18n
55
56
  version_requirements: &id003 !ruby/object:Gem::Requirement
56
57
  none: false
@@ -62,9 +63,9 @@ dependencies:
62
63
  - 0
63
64
  version: "0"
64
65
  prerelease: false
65
- type: :runtime
66
66
  requirement: *id003
67
67
  - !ruby/object:Gem::Dependency
68
+ type: :runtime
68
69
  name: elibri_onix_dict
69
70
  version_requirements: &id004 !ruby/object:Gem::Requirement
70
71
  none: false
@@ -78,9 +79,9 @@ dependencies:
78
79
  - 5
79
80
  version: 0.0.5
80
81
  prerelease: false
81
- type: :runtime
82
82
  requirement: *id004
83
83
  - !ruby/object:Gem::Dependency
84
+ type: :development
84
85
  name: pry
85
86
  version_requirements: &id005 !ruby/object:Gem::Requirement
86
87
  none: false
@@ -92,9 +93,9 @@ dependencies:
92
93
  - 0
93
94
  version: "0"
94
95
  prerelease: false
95
- type: :development
96
96
  requirement: *id005
97
97
  - !ruby/object:Gem::Dependency
98
+ type: :development
98
99
  name: mocha
99
100
  version_requirements: &id006 !ruby/object:Gem::Requirement
100
101
  none: false
@@ -106,9 +107,9 @@ dependencies:
106
107
  - 0
107
108
  version: "0"
108
109
  prerelease: false
109
- type: :development
110
110
  requirement: *id006
111
111
  - !ruby/object:Gem::Dependency
112
+ type: :development
112
113
  name: minitest
113
114
  version_requirements: &id007 !ruby/object:Gem::Requirement
114
115
  none: false
@@ -120,9 +121,9 @@ dependencies:
120
121
  - 0
121
122
  version: "0"
122
123
  prerelease: false
123
- type: :development
124
124
  requirement: *id007
125
125
  - !ruby/object:Gem::Dependency
126
+ type: :development
126
127
  name: bundler
127
128
  version_requirements: &id008 !ruby/object:Gem::Requirement
128
129
  none: false
@@ -136,9 +137,9 @@ dependencies:
136
137
  - 0
137
138
  version: 1.0.0
138
139
  prerelease: false
139
- type: :development
140
140
  requirement: *id008
141
141
  - !ruby/object:Gem::Dependency
142
+ type: :development
142
143
  name: jeweler
143
144
  version_requirements: &id009 !ruby/object:Gem::Requirement
144
145
  none: false
@@ -152,9 +153,9 @@ dependencies:
152
153
  - 2
153
154
  version: 1.6.2
154
155
  prerelease: false
155
- type: :development
156
156
  requirement: *id009
157
157
  - !ruby/object:Gem::Dependency
158
+ type: :development
158
159
  name: rcov
159
160
  version_requirements: &id010 !ruby/object:Gem::Requirement
160
161
  none: false
@@ -166,7 +167,6 @@ dependencies:
166
167
  - 0
167
168
  version: "0"
168
169
  prerelease: false
169
- type: :development
170
170
  requirement: *id010
171
171
  description: EDItEUR ONIX format subset implementation used in Elibri publication system
172
172
  email: marcin@urbanski.vdl.pl
@@ -292,7 +292,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
292
292
  requirements: []
293
293
 
294
294
  rubyforge_project:
295
- rubygems_version: 1.6.2
295
+ rubygems_version: 1.5.2
296
296
  signing_key:
297
297
  specification_version: 3
298
298
  summary: EDItEUR ONIX format subset implementation used in Elibri publication system