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 CHANGED
@@ -1,3 +1,9 @@
1
+ v0.2.0 (2nd November 2009)
2
+ - bump roxml dependency to 3.x
3
+ - increased stability
4
+ - removes libxml dependency
5
+ - removes mongrel incompatibility
6
+
1
7
  v0.1.1 (17th April 2009)
2
8
  - bump roxml dependency to 2.5.3 for libxml-ruby 1.1.3 compatibility
3
9
 
@@ -1,19 +1,15 @@
1
- require 'rubygems'
1
+ # load stdlib
2
2
  require 'bigdecimal'
3
3
 
4
- # ensure we load the correct gem versions
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 = 1
16
- Tiny = 2
11
+ Minor = 2
12
+ Tiny = 0
17
13
 
18
14
  String = [Major, Minor, Tiny].join('.')
19
15
  end
@@ -103,7 +103,7 @@ module EDItX
103
103
  tf.write self.to_s
104
104
  tf.close
105
105
 
106
- system("xmllint --schema #{schema_path} #{tf.path} &> /dev/null")
106
+ system("xmllint --schema #{schema_path} #{tf.path} > /dev/null 2>&1")
107
107
  if $?.exitstatus == 0
108
108
  return true
109
109
  else
@@ -1,15 +1,13 @@
1
1
  # coding: utf-8
2
2
 
3
- $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib')
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 = LibXML::XML::Document.file(file1)
10
+ @doc = Nokogiri::XML::Document.parse(File.read(file1))
13
11
  @root = @doc.root
14
12
  end
15
13
 
@@ -1,8 +1,6 @@
1
1
  # coding: utf-8
2
2
 
3
- $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib')
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} &> /dev/null")
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} &> /dev/null")
31
+ system("xmllint --schema #{@schema_path} #{@file_path} > /dev/null 2>&1")
34
32
  $?.exitstatus.should eql(0)
35
33
  end
36
34
 
@@ -0,0 +1,7 @@
1
+ # coding: utf-8
2
+
3
+ require 'rubygems'
4
+
5
+ $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib')
6
+
7
+ require 'editx'
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.1.2
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-05-31 00:00:00 +10:00
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.3
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/order/reference_coded.rb
55
- - lib/editx/order/date_coded.rb
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.1
89
+ rubygems_version: 1.3.5
98
90
  signing_key:
99
- specification_version: 2
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