rxsd 0.3 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ require 'rake/gempackagetask'
9
9
 
10
10
 
11
11
  GEM_NAME="rxsd"
12
- PKG_VERSION='0.3'
12
+ PKG_VERSION='0.4'
13
13
 
14
14
  desc "Run all specs"
15
15
  Spec::Rake::SpecTask.new('spec') do |t|
@@ -22,19 +22,23 @@ Rake::RDocTask.new do |rd|
22
22
  rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
23
23
  end
24
24
 
25
- PKG_FILES = FileList['bin/**/*', 'lib/**/*.rb', 'COPYING', 'LICENSE', 'Rakefile', 'README.rdoc', 'spec/**/*.rb' ]
25
+ PKG_FILES = FileList['lib/**/*.rb', 'COPYING', 'LICENSE', 'Rakefile', 'README.rdoc', 'spec/**/*.rb' ]
26
26
 
27
27
  SPEC = Gem::Specification.new do |s|
28
28
  s.name = GEM_NAME
29
29
  s.version = PKG_VERSION
30
30
  s.files = PKG_FILES
31
+ s.executables << 'xsd_to_ruby' << 'rxsd_test'
31
32
 
32
33
  s.required_ruby_version = '>= 1.8.1'
33
34
  s.required_rubygems_version = Gem::Requirement.new(">= 1.3.3")
34
35
 
36
+ s.add_dependency('libxml-ruby', '~> 1.1.4')
37
+ s.add_development_dependency('rspec', '~> 1.3.0')
38
+
35
39
  s.author = "Mohammed Morsi"
36
40
  s.email = "movitto@yahoo.com"
37
- s.date = %q{2010-03-18}
41
+ s.date = %q{2010-09-04}
38
42
  s.description = %q{A library to translate xsd schemas and xml implementations into ruby classes/objects}
39
43
  s.summary = %q{A library to translate xsd schemas and xml implementations into ruby classes/objects}
40
44
  s.homepage = %q{http://morsi.org/projects/RXSD}
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/ruby
2
2
  # Simple rxsd test utility
3
3
  #
4
- # Usage rxsd-test.rb uri-to-schema uri-to-xml-instance
4
+ # Usage rxsd_test uri-to-schema uri-to-xml-instance
5
5
  #
6
6
  # Copyright (C) 2010 Mohammed Morsi <movitto@yahoo.com>
7
7
  # See COPYING for the License of this software
@@ -10,7 +10,7 @@ require 'lib/rxsd'
10
10
 
11
11
  if ARGV.size < 2
12
12
  puts "missing required arguments"
13
- puts "usage: rxsd-test xsd_uri xml_uri"
13
+ puts "usage: rxsd_test xsd_uri xml_uri"
14
14
  exit
15
15
  end
16
16
 
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/ruby
2
- # Simple rxsd test utility
2
+ # XSD to Ruby class converted
3
3
  #
4
- # Usage rxsd-test.rb uri-to-schema uri-to-xml-instance
4
+ # Usage xsd_to_ruby xsd_uri output_dir
5
5
  #
6
6
  # Copyright (C) 2010 Mohammed Morsi <movitto@yahoo.com>
7
7
  # See COPYING for the License of this software
@@ -11,7 +11,7 @@ require 'lib/rxsd'
11
11
 
12
12
  if ARGV.size < 2
13
13
  puts "missing required arguments"
14
- puts "usage: gen_ruby_definitions xsd_uri output_dir"
14
+ puts "usage: xsd_to_ruby xsd_uri output_dir"
15
15
  exit
16
16
  end
17
17
 
@@ -41,7 +41,7 @@ class String
41
41
  end
42
42
 
43
43
  # Helper to convert string to array of specified type.
44
- def to_a(args = {})
44
+ def to_xa(args = {})
45
45
  arr = []
46
46
  item_type = args[:type]
47
47
  delim = args.has_key?(:delim) ? args[:delim] : ' '
@@ -16,6 +16,7 @@ class Resolver
16
16
  if args.has_key? :node_objs
17
17
  node_objs = args[:node_objs]
18
18
  else
19
+ # TODO auto generate keys from classes defined under the XSD module
19
20
  node_objs = {XSD::Attribute => [], XSD::AttributeGroup => [], XSD::Choice => [],
20
21
  XSD::ComplexContent => [], XSD::ComplexType => [], XSD::Element => [],
21
22
  XSD::Extension => [], XSD::Group => [], XSD::List => [], XSD::Restriction => [],
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rxsd
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.3"
4
+ hash: 3
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 4
9
+ version: "0.4"
5
10
  platform: ruby
6
11
  authors:
7
12
  - Mohammed Morsi
@@ -9,21 +14,51 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-03-18 00:00:00 -04:00
17
+ date: 2010-09-04 00:00:00 -04:00
13
18
  default_executable:
14
- dependencies: []
15
-
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: libxml-ruby
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ~>
27
+ - !ruby/object:Gem::Version
28
+ hash: 27
29
+ segments:
30
+ - 1
31
+ - 1
32
+ - 4
33
+ version: 1.1.4
34
+ type: :runtime
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ name: rspec
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ hash: 27
45
+ segments:
46
+ - 1
47
+ - 3
48
+ - 0
49
+ version: 1.3.0
50
+ type: :development
51
+ version_requirements: *id002
16
52
  description: A library to translate xsd schemas and xml implementations into ruby classes/objects
17
53
  email: movitto@yahoo.com
18
- executables: []
19
-
54
+ executables:
55
+ - xsd_to_ruby
56
+ - rxsd_test
20
57
  extensions: []
21
58
 
22
59
  extra_rdoc_files: []
23
60
 
24
61
  files:
25
- - bin/rxsd-test.rb
26
- - bin/gen_ruby_definitions.rb
27
62
  - lib/rxsd.rb
28
63
  - lib/rxsd/xml.rb
29
64
  - lib/rxsd/resolver.rb
@@ -64,6 +99,8 @@ files:
64
99
  - spec/loader_spec.rb
65
100
  - spec/xml_spec.rb
66
101
  - spec/builder_spec.rb
102
+ - bin/xsd_to_ruby
103
+ - bin/rxsd_test
67
104
  has_rdoc: true
68
105
  homepage: http://morsi.org/projects/RXSD
69
106
  licenses: []
@@ -74,21 +111,31 @@ rdoc_options: []
74
111
  require_paths:
75
112
  - lib
76
113
  required_ruby_version: !ruby/object:Gem::Requirement
114
+ none: false
77
115
  requirements:
78
116
  - - ">="
79
117
  - !ruby/object:Gem::Version
118
+ hash: 53
119
+ segments:
120
+ - 1
121
+ - 8
122
+ - 1
80
123
  version: 1.8.1
81
- version:
82
124
  required_rubygems_version: !ruby/object:Gem::Requirement
125
+ none: false
83
126
  requirements:
84
127
  - - ">="
85
128
  - !ruby/object:Gem::Version
129
+ hash: 29
130
+ segments:
131
+ - 1
132
+ - 3
133
+ - 3
86
134
  version: 1.3.3
87
- version:
88
135
  requirements: []
89
136
 
90
137
  rubyforge_project:
91
- rubygems_version: 1.3.5
138
+ rubygems_version: 1.3.7
92
139
  signing_key:
93
140
  specification_version: 3
94
141
  summary: A library to translate xsd schemas and xml implementations into ruby classes/objects