rxsd 0.4.1 → 0.5.1

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.4.1'
12
+ PKG_VERSION='0.5.1'
13
13
 
14
14
  desc "Run all specs"
15
15
  Spec::Rake::SpecTask.new('spec') do |t|
@@ -36,9 +36,9 @@ SPEC = Gem::Specification.new do |s|
36
36
  s.add_dependency('libxml-ruby', '~> 1.1.4')
37
37
  s.add_development_dependency('rspec', '~> 1.3.0')
38
38
 
39
- s.author = "Mohammed Morsi"
40
- s.email = "movitto@yahoo.com"
41
- s.date = %q{2010-09-04}
39
+ s.author = "Mo Morsi"
40
+ s.email = "mo@morsi.org"
41
+ s.date = %q{2011-04-10}
42
42
  s.description = %q{A library to translate xsd schemas and xml implementations into ruby classes/objects}
43
43
  s.summary = %q{A library to translate xsd schemas and xml implementations into ruby classes/objects}
44
44
  s.homepage = %q{http://morsi.org/projects/RXSD}
data/bin/rxsd_test CHANGED
@@ -6,7 +6,12 @@
6
6
  # Copyright (C) 2010 Mohammed Morsi <movitto@yahoo.com>
7
7
  # See COPYING for the License of this software
8
8
 
9
- require 'rxsd'
9
+ begin
10
+ require 'rxsd'
11
+ rescue LoadError
12
+ $: << File.join(File.dirname(File.expand_path(__FILE__)), '..', 'lib')
13
+ require 'rxsd'
14
+ end
10
15
 
11
16
  if ARGV.size < 2
12
17
  puts "missing required arguments"
data/bin/xsd_to_ruby CHANGED
@@ -7,7 +7,13 @@
7
7
  # See COPYING for the License of this software
8
8
 
9
9
  require 'fileutils'
10
- require 'rxsd'
10
+
11
+ begin
12
+ require 'rxsd'
13
+ rescue LoadError
14
+ $: << File.join(File.dirname(File.expand_path(__FILE__)), '..', 'lib')
15
+ require 'rxsd'
16
+ end
11
17
 
12
18
  if ARGV.size < 2
13
19
  puts "missing required arguments"
data/lib/rxsd/parser.rb CHANGED
@@ -56,36 +56,36 @@ class Parser
56
56
  res = nil
57
57
 
58
58
  case builtin_type_name
59
- when "xs:string":
59
+ when "xs:string" then
60
60
  res = String
61
- when "xs:boolean":
61
+ when "xs:boolean" then
62
62
  res = Boolean
63
- when "xs:decimal":
63
+ when "xs:decimal" then
64
64
  res = XSDFloat
65
- when "xs:float":
65
+ when "xs:float" then
66
66
  res = XSDFloat
67
- when "xs:double":
67
+ when "xs:double" then
68
68
  res = XSDFloat
69
- when "xs:duration":
70
- when "xs:dateTime":
69
+ when "xs:duration" then
70
+ when "xs:dateTime" then
71
71
  res = Time
72
- when "xs:date":
72
+ when "xs:date" then
73
73
  res = Time
74
- when "xs:gYearMonth":
74
+ when "xs:gYearMonth" then
75
75
  res = Time
76
- when "xs:gYear":
76
+ when "xs:gYear" then
77
77
  res = Time
78
- when "xs:gMonthDay":
78
+ when "xs:gMonthDay" then
79
79
  res = Time
80
- when "xs:gDay":
80
+ when "xs:gDay" then
81
81
  res = Time
82
- when "xs:gMonth":
82
+ when "xs:gMonth" then
83
83
  res = Time
84
- when "xs:hexBinary":
85
- when "xs:base64Binary":
86
- when "xs:anyURI":
87
- when "xs:QName":
88
- when "xs:NOTATION":
84
+ when "xs:hexBinary" then
85
+ when "xs:base64Binary" then
86
+ when "xs:anyURI" then
87
+ when "xs:QName" then
88
+ when "xs:NOTATION" then
89
89
  when "xs:normalizedString"
90
90
  when "xs:token"
91
91
  res = String # FIXME should be a string derived class, eliminating whitespace
metadata CHANGED
@@ -1,21 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rxsd
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 4
8
+ - 5
9
9
  - 1
10
- version: 0.4.1
10
+ version: 0.5.1
11
11
  platform: ruby
12
12
  authors:
13
- - Mohammed Morsi
13
+ - Mo Morsi
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-04 00:00:00 -04:00
18
+ date: 2011-04-10 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -51,7 +51,7 @@ dependencies:
51
51
  type: :development
52
52
  version_requirements: *id002
53
53
  description: A library to translate xsd schemas and xml implementations into ruby classes/objects
54
- email: movitto@yahoo.com
54
+ email: mo@morsi.org
55
55
  executables:
56
56
  - xsd_to_ruby
57
57
  - rxsd_test