rubiii-apricoteatsgorilla 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.7
|
data/apricoteatsgorilla.gemspec
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{apricoteatsgorilla}
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Daniel Harrington"]
|
12
|
-
s.date = %q{2009-09-
|
13
|
-
s.description = %q{SOAP communication helper
|
12
|
+
s.date = %q{2009-09-04}
|
13
|
+
s.description = %q{SOAP communication helper}
|
14
14
|
s.email = %q{me@rubiii.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"README.rdoc"
|
@@ -35,7 +35,7 @@ Gem::Specification.new do |s|
|
|
35
35
|
s.rdoc_options = ["--charset=UTF-8", "--title", "Apricot eats Gorilla", "--main", "README.rdoc", "--line-numbers", "--inline-source"]
|
36
36
|
s.require_paths = ["lib"]
|
37
37
|
s.rubygems_version = %q{1.3.1}
|
38
|
-
s.summary = %q{SOAP communication helper
|
38
|
+
s.summary = %q{SOAP communication helper}
|
39
39
|
s.test_files = [
|
40
40
|
"spec/apricoteatsgorilla/apricoteatsgorilla_hash_to_xml_spec.rb",
|
41
41
|
"spec/apricoteatsgorilla/apricoteatsgorilla_spec.rb",
|
@@ -266,6 +266,8 @@ class ApricotEatsGorilla
|
|
266
266
|
def map_hash_value(value)
|
267
267
|
if value.kind_of? DateTime
|
268
268
|
value.strftime("%Y-%m-%dT%H:%M:%S")
|
269
|
+
elsif value.respond_to? :to_datetime
|
270
|
+
value.to_datetime.strftime("%Y-%m-%dT%H:%M:%S")
|
269
271
|
elsif value.respond_to? :to_s
|
270
272
|
value.to_s
|
271
273
|
else
|
@@ -33,13 +33,25 @@ describe ApricotEatsGorilla do
|
|
33
33
|
"<when></when><with>100.01</with></apricot>"
|
34
34
|
end
|
35
35
|
|
36
|
-
it "converts DateTime objects into Strings
|
37
|
-
date = DateTime.new(y=2009,m=9,d=1, h=12,min=0,s=8)
|
36
|
+
it "converts DateTime objects into xsd:dateTime Strings" do
|
37
|
+
date = DateTime.new(y=2009, m=9, d=1, h=12, min=0, s=8)
|
38
38
|
hash = { :apricot => { :eats => { :at => date } } }
|
39
39
|
ApricotEatsGorilla.hash_to_xml(hash).should ==
|
40
40
|
"<apricot><eats><at>2009-09-01T12:00:08</at></eats></apricot>"
|
41
41
|
end
|
42
42
|
|
43
|
+
it "converts objects responding to 'to_datetime' into xsd:dateTime Strings" do
|
44
|
+
date = DateTime.new(y=2009, m=9, d=1, h=12, min=0, s=8)
|
45
|
+
TestObject = Struct.new(:whatever) do
|
46
|
+
def to_datetime
|
47
|
+
DateTime.new(y=2009, m=9, d=1, h=12, min=0, s=8)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
hash = { :apricot => { :eats => { :at => TestObject.new } } }
|
51
|
+
ApricotEatsGorilla.hash_to_xml(hash).should ==
|
52
|
+
"<apricot><eats><at>2009-09-01T12:00:08</at></eats></apricot>"
|
53
|
+
end
|
54
|
+
|
43
55
|
it "applies namespaces nodes defined via nodes_to_namespace" do
|
44
56
|
ApricotEatsGorilla.nodes_to_namespace = { :wsdl => [ :apricot ] }
|
45
57
|
hash = { :apricot => { :eats => "Gorilla" } }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubiii-apricoteatsgorilla
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Harrington
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-04 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.2.8
|
34
34
|
version:
|
35
|
-
description: SOAP communication helper
|
35
|
+
description: SOAP communication helper
|
36
36
|
email: me@rubiii.com
|
37
37
|
executables: []
|
38
38
|
|
@@ -56,6 +56,7 @@ files:
|
|
56
56
|
- spec/spec_helper.rb
|
57
57
|
has_rdoc: true
|
58
58
|
homepage: http://github.com/rubiii/apricoteatsgorilla
|
59
|
+
licenses:
|
59
60
|
post_install_message:
|
60
61
|
rdoc_options:
|
61
62
|
- --charset=UTF-8
|
@@ -82,10 +83,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
83
|
requirements: []
|
83
84
|
|
84
85
|
rubyforge_project:
|
85
|
-
rubygems_version: 1.
|
86
|
+
rubygems_version: 1.3.5
|
86
87
|
signing_key:
|
87
88
|
specification_version: 2
|
88
|
-
summary: SOAP communication helper
|
89
|
+
summary: SOAP communication helper
|
89
90
|
test_files:
|
90
91
|
- spec/apricoteatsgorilla/apricoteatsgorilla_hash_to_xml_spec.rb
|
91
92
|
- spec/apricoteatsgorilla/apricoteatsgorilla_spec.rb
|