editx 0.1.2 → 0.2.0
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.
- data/CHANGELOG +6 -0
- data/lib/editx.rb +4 -8
- data/lib/editx/order.rb +1 -1
- data/spec/order_spec.rb +2 -4
- data/spec/sample_data_spec.rb +3 -5
- data/spec/spec_helper.rb +7 -0
- metadata +19 -26
data/CHANGELOG
CHANGED
data/lib/editx.rb
CHANGED
@@ -1,19 +1,15 @@
|
|
1
|
-
|
1
|
+
# load stdlib
|
2
2
|
require 'bigdecimal'
|
3
3
|
|
4
|
-
#
|
5
|
-
gem 'roxml', '2.5.3'
|
6
|
-
gem 'andand'
|
7
|
-
|
8
|
-
# and now load the actual gems
|
4
|
+
# load external libs gems
|
9
5
|
require 'roxml'
|
10
6
|
require 'andand'
|
11
7
|
|
12
8
|
module EDItX
|
13
9
|
module Version #:nodoc:
|
14
10
|
Major = 0
|
15
|
-
Minor =
|
16
|
-
Tiny =
|
11
|
+
Minor = 2
|
12
|
+
Tiny = 0
|
17
13
|
|
18
14
|
String = [Major, Minor, Tiny].join('.')
|
19
15
|
end
|
data/lib/editx/order.rb
CHANGED
data/spec/order_spec.rb
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
require 'editx'
|
3
|
+
require File.dirname(__FILE__) + '/spec_helper'
|
6
4
|
|
7
5
|
context "EDItX::Order" do
|
8
6
|
|
9
7
|
before(:each) do
|
10
8
|
data_path = File.join(File.dirname(__FILE__),"data")
|
11
9
|
file1 = File.join(data_path, "order_1_2.xml")
|
12
|
-
@doc
|
10
|
+
@doc = Nokogiri::XML::Document.parse(File.read(file1))
|
13
11
|
@root = @doc.root
|
14
12
|
end
|
15
13
|
|
data/spec/sample_data_spec.rb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
require 'editx'
|
3
|
+
require File.dirname(__FILE__) + '/spec_helper'
|
6
4
|
|
7
5
|
context "spec/data/order_1_1.xml" do
|
8
6
|
|
@@ -14,7 +12,7 @@ context "spec/data/order_1_1.xml" do
|
|
14
12
|
end
|
15
13
|
|
16
14
|
specify "should be a valid EDItX Trade Order 1.1 file" do
|
17
|
-
system("xmllint --schema #{@schema_path} #{@file_path}
|
15
|
+
system("xmllint --schema #{@schema_path} #{@file_path} > /dev/null 2>&1")
|
18
16
|
$?.exitstatus.should eql(0)
|
19
17
|
end
|
20
18
|
|
@@ -30,7 +28,7 @@ context "spec/data/order_1_2.xml" do
|
|
30
28
|
end
|
31
29
|
|
32
30
|
specify "should be a valid EDItX Trade Order 1.2 file" do
|
33
|
-
system("xmllint --schema #{@schema_path} #{@file_path}
|
31
|
+
system("xmllint --schema #{@schema_path} #{@file_path} > /dev/null 2>&1")
|
34
32
|
$?.exitstatus.should eql(0)
|
35
33
|
end
|
36
34
|
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: editx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Healy
|
@@ -9,28 +9,18 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-11-02 00:00:00 +11:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: roxml
|
17
17
|
type: :runtime
|
18
18
|
version_requirement:
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
20
|
-
requirements:
|
21
|
-
- - "="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 2.5.3
|
24
|
-
version:
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: libxml-ruby
|
27
|
-
type: :runtime
|
28
|
-
version_requirement:
|
29
19
|
version_requirements: !ruby/object:Gem::Requirement
|
30
20
|
requirements:
|
31
21
|
- - ">="
|
32
22
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.1
|
23
|
+
version: 3.1.1
|
34
24
|
version:
|
35
25
|
- !ruby/object:Gem::Dependency
|
36
26
|
name: andand
|
@@ -51,27 +41,29 @@ extensions: []
|
|
51
41
|
extra_rdoc_files: []
|
52
42
|
|
53
43
|
files:
|
54
|
-
- lib/editx
|
55
|
-
- lib/editx/order
|
56
|
-
- lib/editx/order/party.rb
|
44
|
+
- lib/editx.rb
|
45
|
+
- lib/editx/order.rb
|
57
46
|
- lib/editx/order/item_detail.rb
|
47
|
+
- lib/editx/order/discount_part.rb
|
58
48
|
- lib/editx/order/returns_conditions.rb
|
49
|
+
- lib/editx/order/party.rb
|
59
50
|
- lib/editx/order/product_id.rb
|
51
|
+
- lib/editx/order/returns_condition_coded.rb
|
52
|
+
- lib/editx/order/discount_detail.rb
|
53
|
+
- lib/editx/order/message.rb
|
54
|
+
- lib/editx/order/date_coded.rb
|
55
|
+
- lib/editx/order/reference_coded.rb
|
60
56
|
- lib/editx/order/price.rb
|
61
57
|
- lib/editx/order/order_item_qualifier_coded.rb
|
62
|
-
- lib/editx/order/message.rb
|
63
|
-
- lib/editx/order/discount_detail.rb
|
64
|
-
- lib/editx/order/returns_condition_coded.rb
|
65
|
-
- lib/editx/order/discount_part.rb
|
66
|
-
- lib/editx/order.rb
|
67
|
-
- lib/editx.rb
|
68
58
|
- README.markdown
|
69
59
|
- CHANGELOG
|
60
|
+
- schemas/editx_codelists.xsd
|
70
61
|
- schemas/order_1_1.xsd
|
71
62
|
- schemas/order_1_2.xsd
|
72
|
-
- schemas/editx_codelists.xsd
|
73
63
|
has_rdoc: true
|
74
64
|
homepage: http://github.com/yob/editx/tree/master
|
65
|
+
licenses: []
|
66
|
+
|
75
67
|
post_install_message:
|
76
68
|
rdoc_options:
|
77
69
|
- --title
|
@@ -94,10 +86,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
86
|
requirements: []
|
95
87
|
|
96
88
|
rubyforge_project: rbook
|
97
|
-
rubygems_version: 1.3.
|
89
|
+
rubygems_version: 1.3.5
|
98
90
|
signing_key:
|
99
|
-
specification_version:
|
91
|
+
specification_version: 3
|
100
92
|
summary: A convient mapping between ruby objects and the various EDItX XML specifications
|
101
93
|
test_files:
|
102
|
-
- spec/order_spec.rb
|
103
94
|
- spec/sample_data_spec.rb
|
95
|
+
- spec/order_spec.rb
|
96
|
+
- spec/spec_helper.rb
|