lolsoap 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/lolsoap/hash_builder.rb +16 -24
- data/lib/lolsoap/wsdl/element.rb +1 -1
- data/lolsoap.gemspec +2 -2
- metadata +13 -13
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
data/lib/lolsoap/hash_builder.rb
CHANGED
@@ -10,38 +10,35 @@ module LolSoap
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def output
|
13
|
-
if
|
13
|
+
if node.first_element_child
|
14
14
|
children_hash
|
15
15
|
else
|
16
16
|
content
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
def children
|
21
|
-
@children ||= node.children.select(&:element?)
|
22
|
-
end
|
23
|
-
|
24
20
|
private
|
25
21
|
|
26
22
|
# @private
|
27
23
|
def children_hash
|
28
24
|
hash = {}
|
29
|
-
|
25
|
+
node.element_children.each do |child|
|
30
26
|
element = type.element(child.name)
|
31
27
|
output = self.class.new(child, element.type).output
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
28
|
+
val = hash[child.name]
|
29
|
+
|
30
|
+
if output
|
31
|
+
if val
|
32
|
+
if val.is_a?(Array)
|
33
|
+
val << output
|
34
|
+
else
|
35
|
+
hash[child.name] = [val, output]
|
36
|
+
end
|
37
|
+
else
|
38
|
+
hash[child.name] = element.singular? ? output : [output]
|
39
|
+
end
|
43
40
|
else
|
44
|
-
hash[child.name] =
|
41
|
+
hash[child.name] = element.singular? ? nil : []
|
45
42
|
end
|
46
43
|
end
|
47
44
|
hash
|
@@ -54,12 +51,7 @@ module LolSoap
|
|
54
51
|
|
55
52
|
# @private
|
56
53
|
def nil_value?
|
57
|
-
|
58
|
-
end
|
59
|
-
|
60
|
-
# @private
|
61
|
-
def parent
|
62
|
-
node.ancestors.first
|
54
|
+
node.attribute_with_ns('nil', 'http://www.w3.org/2001/XMLSchema-instance')
|
63
55
|
end
|
64
56
|
end
|
65
57
|
end
|
data/lib/lolsoap/wsdl/element.rb
CHANGED
data/lolsoap.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "lolsoap"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jon Leighton"]
|
12
|
-
s.date = "2012-05-
|
12
|
+
s.date = "2012-05-17"
|
13
13
|
s.description = "A library for dealing with SOAP requests and responses. We tear our hair out so you don't have to."
|
14
14
|
s.email = "j@jonathanleighton.com"
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lolsoap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
16
|
-
requirement: &
|
16
|
+
requirement: &11380260 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.5.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *11380260
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: bundler
|
27
|
-
requirement: &
|
27
|
+
requirement: &11379660 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.0.0
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *11379660
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: jeweler
|
38
|
-
requirement: &
|
38
|
+
requirement: &11378960 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.6.4
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *11378960
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: minitest
|
49
|
-
requirement: &
|
49
|
+
requirement: &11378100 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *11378100
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: yard
|
60
|
-
requirement: &
|
60
|
+
requirement: &11392100 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *11392100
|
69
69
|
description: A library for dealing with SOAP requests and responses. We tear our hair
|
70
70
|
out so you don't have to.
|
71
71
|
email: j@jonathanleighton.com
|
@@ -136,7 +136,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
136
136
|
version: '0'
|
137
137
|
segments:
|
138
138
|
- 0
|
139
|
-
hash:
|
139
|
+
hash: 4450731572727892655
|
140
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
141
|
none: false
|
142
142
|
requirements:
|