onix 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ v0.9.4 (24th April 2012)
2
+ - Upgrade roxml dependency
3
+ - expand APAProduct to allow the nett price to be set
4
+
1
5
  v0.9.3 (8th November 2011)
2
6
  - Fix ordering of elements within thew Price composite
3
7
 
@@ -435,6 +435,16 @@ module ONIX
435
435
  price_set(2, num)
436
436
  end
437
437
 
438
+ # retrieve the nett price including any sales tax
439
+ def nett_inc_sales_tax
440
+ price_get(7).andand.price_amount
441
+ end
442
+
443
+ # set the rrp including any sales tax
444
+ def nett_inc_sales_tax=(num)
445
+ price_set(7, num)
446
+ end
447
+
438
448
  # retrieve the discount code that describes the rrp in this file
439
449
  def proprietry_discount_code_for_rrp
440
450
  price = price_get(2)
@@ -24,6 +24,29 @@ describe ONIX::Normaliser, "with a simple short tag file" do
24
24
  end
25
25
  end
26
26
 
27
+ describe ONIX::Normaliser, "with a simple short tag file that has no doctype" do
28
+
29
+ before(:each) do
30
+ @data_path = File.join(File.dirname(__FILE__),"..","data")
31
+ @filename = File.join(@data_path, "short_tags_no_doctype.xml")
32
+ @outfile = @filename + ".new"
33
+ end
34
+
35
+ after(:each) do
36
+ File.unlink(@outfile) if File.file?(@outfile)
37
+ end
38
+
39
+ it "should correctly convert short tag file to reference tag" do
40
+ pending
41
+ ONIX::Normaliser.process(@filename, @outfile)
42
+
43
+ File.file?(@outfile).should be_true
44
+ content = File.read(@outfile)
45
+ content.include?("<m174>").should be_false
46
+ content.include?("<FromCompany>").should be_true
47
+ end
48
+ end
49
+
27
50
  describe ONIX::Normaliser, "with a short tag file that include HTML tags" do
28
51
 
29
52
  before(:each) do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-07 00:00:00.000000000 Z
12
+ date: 2012-04-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: roxml
16
- requirement: &16873740 !ruby/object:Gem::Requirement
16
+ requirement: &24014420 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 3.1.6
21
+ version: 3.3.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *16873740
24
+ version_requirements: *24014420
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activesupport
27
- requirement: &16872980 !ruby/object:Gem::Requirement
27
+ requirement: &24013940 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 3.0.5
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *16872980
35
+ version_requirements: *24013940
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: i18n
38
- requirement: &16872300 !ruby/object:Gem::Requirement
38
+ requirement: &24013560 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *16872300
46
+ version_requirements: *24013560
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: andand
49
- requirement: &16871540 !ruby/object:Gem::Requirement
49
+ requirement: &24013100 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *16871540
57
+ version_requirements: *24013100
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: nokogiri
60
- requirement: &16870680 !ruby/object:Gem::Requirement
60
+ requirement: &24012600 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '1.4'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *16870680
68
+ version_requirements: *24012600
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
- requirement: &16867380 !ruby/object:Gem::Requirement
71
+ requirement: &24012180 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *16867380
79
+ version_requirements: *24012180
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rspec
82
- requirement: &16866660 !ruby/object:Gem::Requirement
82
+ requirement: &24011640 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '2.1'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *16866660
90
+ version_requirements: *24011640
91
91
  description: A convient mapping between ruby objects and the ONIX XML specification
92
92
  email:
93
93
  - jimmy@deefa.com