wash_out 0.5.2 → 0.5.3
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/.gitignore +1 -0
- data/.rspec +1 -0
- data/.travis.yml +1 -0
- data/Gemfile +0 -3
- data/Gemfile.lock +29 -11
- data/Guardfile +12 -0
- data/README.md +3 -10
- data/lib/wash_out/dispatcher.rb +17 -2
- data/lib/wash_out/param.rb +5 -1
- data/lib/wash_out/router.rb +2 -1
- data/lib/wash_out/type.rb +2 -1
- data/lib/wash_out/version.rb +1 -1
- data/spec/{wash_out → lib/wash_out}/dispatcher_spec.rb +1 -1
- data/spec/lib/wash_out/param_spec.rb +37 -0
- data/spec/{wash_out → lib/wash_out}/type_spec.rb +2 -2
- data/spec/{wash_out_spec.rb → lib/wash_out_spec.rb} +78 -4
- data/spec/spec_helper.rb +6 -0
- data/wash_out.gemspec +9 -4
- metadata +167 -61
- data/spec/wash_out/param_spec.rb +0 -26
data/.gitignore
CHANGED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--tty --colour
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
wash_out (0.5.
|
4
|
+
wash_out (0.5.3)
|
5
5
|
nori
|
6
6
|
|
7
7
|
GEM
|
@@ -29,9 +29,18 @@ GEM
|
|
29
29
|
bundler
|
30
30
|
rake
|
31
31
|
builder (3.0.0)
|
32
|
-
coderay (1.0.
|
32
|
+
coderay (1.0.8)
|
33
33
|
diff-lcs (1.1.3)
|
34
34
|
erubis (2.7.0)
|
35
|
+
ffi (1.1.5)
|
36
|
+
ffi (1.1.5-java)
|
37
|
+
guard (1.5.0)
|
38
|
+
listen (>= 0.4.2)
|
39
|
+
lumberjack (>= 1.0.2)
|
40
|
+
pry (>= 0.9.10)
|
41
|
+
thor (>= 0.14.6)
|
42
|
+
guard-rspec (1.2.1)
|
43
|
+
guard (>= 1.1)
|
35
44
|
gyoku (0.4.4)
|
36
45
|
builder (>= 2.1.2)
|
37
46
|
hike (1.2.1)
|
@@ -41,19 +50,21 @@ GEM
|
|
41
50
|
journey (1.0.3)
|
42
51
|
json (1.6.5)
|
43
52
|
json (1.6.5-java)
|
44
|
-
|
53
|
+
listen (0.5.3)
|
54
|
+
lumberjack (1.0.2)
|
55
|
+
method_source (0.8.1)
|
45
56
|
multi_json (1.1.0)
|
46
57
|
nokogiri (1.5.0)
|
47
58
|
nokogiri (1.5.0-java)
|
48
59
|
nori (1.1.0)
|
49
|
-
pry (0.9.
|
60
|
+
pry (0.9.10)
|
50
61
|
coderay (~> 1.0.5)
|
51
|
-
method_source (~> 0.
|
52
|
-
slop (
|
53
|
-
pry (0.9.
|
62
|
+
method_source (~> 0.8)
|
63
|
+
slop (~> 3.3.1)
|
64
|
+
pry (0.9.10-java)
|
54
65
|
coderay (~> 1.0.5)
|
55
|
-
method_source (~> 0.
|
56
|
-
slop (
|
66
|
+
method_source (~> 0.8)
|
67
|
+
slop (~> 3.3.1)
|
57
68
|
spoon (~> 0.0)
|
58
69
|
rack (1.4.1)
|
59
70
|
rack-cache (1.1)
|
@@ -69,7 +80,10 @@ GEM
|
|
69
80
|
rake (>= 0.8.7)
|
70
81
|
rdoc (~> 3.4)
|
71
82
|
thor (~> 0.14.6)
|
72
|
-
rake (0.
|
83
|
+
rake (10.0.2)
|
84
|
+
rb-fsevent (0.9.2)
|
85
|
+
rb-inotify (0.8.8)
|
86
|
+
ffi (>= 0.5.0)
|
73
87
|
rdoc (3.12)
|
74
88
|
json (~> 1.4)
|
75
89
|
rspec (2.8.0)
|
@@ -93,7 +107,7 @@ GEM
|
|
93
107
|
nokogiri (>= 1.4.0)
|
94
108
|
nori (~> 1.1)
|
95
109
|
wasabi (~> 2.1)
|
96
|
-
slop (
|
110
|
+
slop (3.3.3)
|
97
111
|
spoon (0.0.1)
|
98
112
|
sprockets (2.1.2)
|
99
113
|
hike (~> 1.2)
|
@@ -111,7 +125,11 @@ PLATFORMS
|
|
111
125
|
|
112
126
|
DEPENDENCIES
|
113
127
|
appraisal
|
128
|
+
guard
|
129
|
+
guard-rspec
|
114
130
|
pry
|
131
|
+
rb-fsevent
|
132
|
+
rb-inotify
|
115
133
|
rspec-rails
|
116
134
|
savon
|
117
135
|
tzinfo
|
data/Guardfile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# More info at https://github.com/guard/guard#readme
|
2
|
+
|
3
|
+
# Could be changed to whatever you want.
|
4
|
+
# See: https://github.com/guard/guard#notification
|
5
|
+
notification :off
|
6
|
+
|
7
|
+
guard 'rspec' do
|
8
|
+
watch %r{^spec/.+_spec\.rb$}
|
9
|
+
watch %r{lib/} do 'spec' end
|
10
|
+
end
|
11
|
+
|
12
|
+
# vim:ft=ruby
|
data/README.md
CHANGED
@@ -6,19 +6,12 @@ But if you have a chance, please [http://stopsoap.com/](http://stopsoap.com/).
|
|
6
6
|
|
7
7
|
## Compatibility
|
8
8
|
|
9
|
-
Rails >3.0 only.
|
9
|
+
Rails >3.0 only. MRI 1.9, JRuby (--1.9), Rubinius (--1.9).
|
10
10
|
|
11
|
-
|
11
|
+
Ruby 1.8 is not officially supported since 0.5.3. We will accept further compatibilty pull-requests but no upcoming versions will be tested against it.
|
12
12
|
|
13
13
|

|
14
14
|
|
15
|
-
We do support CRuby 1.8.7. However it is not a goal and it is not well supported by our specs. According to
|
16
|
-
this fact it maybe sometimes broken from the start on major releases. You are welcome to hold on an old
|
17
|
-
version and give us enough issues and pull-requests to make it work.
|
18
|
-
|
19
|
-
All dependencies are JRuby-compatible so again it will work well in --1.9 mode but it can fail with
|
20
|
-
fresh releases if you go --1.8.
|
21
|
-
|
22
15
|
## Installation
|
23
16
|
|
24
17
|
In your Gemfile, add this line:
|
@@ -151,7 +144,7 @@ Available properties are:
|
|
151
144
|
* **namespace**: SOAP namespace to use. Default is `urn:WashOut`.
|
152
145
|
* **snakecase**: *(DEPRECATED SINCE 0.4.0)* Determines if WashOut should modify parameters keys to snakecase. Default is `false`.
|
153
146
|
* **snakecase_input**: Determines if WashOut should modify parameters keys to snakecase. Default is `false`.
|
154
|
-
* **camelize_wsdl**:
|
147
|
+
* **camelize_wsdl**: Determines if WashOut should camelize types within WSDL and responses. Default is `false`.
|
155
148
|
|
156
149
|
### Camelization
|
157
150
|
|
data/lib/wash_out/dispatcher.rb
CHANGED
@@ -8,6 +8,7 @@ module WashOut
|
|
8
8
|
# A SOAPError exception can be raised to return a correct SOAP error
|
9
9
|
# response.
|
10
10
|
class SOAPError < Exception; end
|
11
|
+
class ProgrammerError < Exception; end
|
11
12
|
|
12
13
|
# This filter parses the SOAP request and puts it into +params+ array.
|
13
14
|
def _parse_soap_parameters
|
@@ -122,12 +123,26 @@ module WashOut
|
|
122
123
|
|
123
124
|
# Inline array of complex structures
|
124
125
|
elsif param.struct? && param.multiplied
|
125
|
-
|
126
|
+
if data.nil?
|
127
|
+
data = {} # when no data is given
|
128
|
+
elsif data.is_a?(Array)
|
129
|
+
raise ProgrammerError,
|
130
|
+
"SOAP response used #{data.inspect} (which is an Array), " +
|
131
|
+
"in the context where a Hash with key of '#{param.raw_name}' " +
|
132
|
+
"was expected."
|
133
|
+
end
|
126
134
|
data[param.raw_name] = [] unless data[param.raw_name].is_a?(Array)
|
127
135
|
result_spec[i].map = data[param.raw_name].map{|e| inject.call(e, param.map)}
|
128
136
|
|
129
137
|
else
|
130
|
-
|
138
|
+
val = data[param.raw_name]
|
139
|
+
if param.multiplied and val and not val.is_a?(Array)
|
140
|
+
raise ProgrammerError,
|
141
|
+
"SOAP response tried to use '#{val.inspect}' " +
|
142
|
+
"(which is of type #{val.class}), as the value for " +
|
143
|
+
"'#{param.raw_name}' (which expects an Array)."
|
144
|
+
end
|
145
|
+
result_spec[i].value = val
|
131
146
|
end
|
132
147
|
end
|
133
148
|
|
data/lib/wash_out/param.rb
CHANGED
@@ -70,7 +70,7 @@ module WashOut
|
|
70
70
|
else raise RuntimeError, "Invalid WashOut simple type: #{type}"
|
71
71
|
end
|
72
72
|
|
73
|
-
if operation.nil?
|
73
|
+
if operation.nil? || data.nil?
|
74
74
|
data
|
75
75
|
elsif @multiplied
|
76
76
|
data.map{|x| x.send(operation)}
|
@@ -156,6 +156,10 @@ module WashOut
|
|
156
156
|
|
157
157
|
# Used to load an entire structure.
|
158
158
|
def map_struct(data)
|
159
|
+
unless data.is_a?(Hash)
|
160
|
+
raise WashOut::Dispatcher::SOAPError, "SOAP message structure is broken"
|
161
|
+
end
|
162
|
+
|
159
163
|
data = data.with_indifferent_access
|
160
164
|
struct = {}.with_indifferent_access
|
161
165
|
|
data/lib/wash_out/router.rb
CHANGED
@@ -13,7 +13,8 @@ module WashOut
|
|
13
13
|
# RUBY18 1.8 does not have force_encoding.
|
14
14
|
soap_action.force_encoding('UTF-8') if soap_action.respond_to? :force_encoding
|
15
15
|
|
16
|
-
|
16
|
+
namespace = Regexp.escape WashOut::Engine.namespace.to_s
|
17
|
+
soap_action.gsub!(/^\"(namespace\/?)?(.*)\"$/, '\2')
|
17
18
|
|
18
19
|
env['wash_out.soap_action'] = soap_action
|
19
20
|
end
|
data/lib/wash_out/type.rb
CHANGED
@@ -15,13 +15,14 @@ module WashOut
|
|
15
15
|
|
16
16
|
def self.wash_out_param_name
|
17
17
|
@param_type_name ||= name.underscore
|
18
|
-
@param_type_name
|
19
18
|
|
20
19
|
if WashOut::Engine.camelize_wsdl.to_s == 'lower'
|
21
20
|
@param_type_name = @param_type_name.camelize(:lower)
|
22
21
|
elsif WashOut::Engine.camelize_wsdl
|
23
22
|
@param_type_name = @param_type_name.camelize
|
24
23
|
end
|
24
|
+
|
25
|
+
@param_type_name
|
25
26
|
end
|
26
27
|
end
|
27
28
|
end
|
data/lib/wash_out/version.rb
CHANGED
@@ -0,0 +1,37 @@
|
|
1
|
+
#encoding:utf-8
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe WashOut::Param do
|
6
|
+
|
7
|
+
class Abraka1 < WashOut::Type
|
8
|
+
map(
|
9
|
+
:test => :string
|
10
|
+
)
|
11
|
+
end
|
12
|
+
class Abraka2 < WashOut::Type
|
13
|
+
type_name 'test'
|
14
|
+
map :foo => Abraka1
|
15
|
+
end
|
16
|
+
|
17
|
+
it "loads custom_types" do
|
18
|
+
map = WashOut::Param.parse_def Abraka2
|
19
|
+
|
20
|
+
map.should be_a_kind_of(Array)
|
21
|
+
map[0].name.should == 'value'
|
22
|
+
map[0].map[0].name.should == 'foo'
|
23
|
+
map[0].map[0].map[0].name.should == 'test'
|
24
|
+
end
|
25
|
+
|
26
|
+
it "respects camelization setting" do
|
27
|
+
WashOut::Engine.camelize_wsdl = true
|
28
|
+
|
29
|
+
map = WashOut::Param.parse_def Abraka2
|
30
|
+
|
31
|
+
map.should be_a_kind_of(Array)
|
32
|
+
map[0].name.should == 'Value'
|
33
|
+
map[0].map[0].name.should == 'Foo'
|
34
|
+
map[0].map[0].map[0].name.should == 'Test'
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
@@ -13,10 +13,10 @@ describe WashOut::Type do
|
|
13
13
|
map :foo => Abraka1
|
14
14
|
end
|
15
15
|
|
16
|
-
Abraka1.wash_out_param_name.should == '
|
16
|
+
Abraka1.wash_out_param_name.should == 'abraka1'
|
17
17
|
Abraka1.wash_out_param_map.should == {:test => :string}
|
18
18
|
|
19
|
-
Abraka2.wash_out_param_name.should == '
|
19
|
+
Abraka2.wash_out_param_name.should == 'test'
|
20
20
|
Abraka2.wash_out_param_map.should == {:foo => Abraka1}
|
21
21
|
end
|
22
22
|
|
@@ -6,7 +6,7 @@ describe WashOut do
|
|
6
6
|
before(:each) do
|
7
7
|
WashOut::Engine.snakecase_input = true
|
8
8
|
WashOut::Engine.camelize_wsdl = true
|
9
|
-
WashOut::Engine.namespace
|
9
|
+
WashOut::Engine.namespace = false
|
10
10
|
end
|
11
11
|
|
12
12
|
it "should be valid" do
|
@@ -49,13 +49,13 @@ describe WashOut do
|
|
49
49
|
|
50
50
|
# Savon underscores method names so we
|
51
51
|
# get back just what we have at controller
|
52
|
-
client.wsdl.soap_actions.should == [:result, :get_area, :rocky]
|
52
|
+
client.wsdl.soap_actions.map{|x| x.to_s}.sort.should == [:result, :get_area, :rocky].map{|x| x.to_s}.sort
|
53
53
|
|
54
54
|
x = xml[:definitions][:types][:schema][:complex_type].find{|x| x[:'@name'] == 'Center'}[:sequence][:element].find{|x| x[:'@name'] == 'X'}
|
55
55
|
x[:'@min_occurs'].should == "0"
|
56
56
|
x[:'@max_occurs'].should == "unbounded"
|
57
57
|
|
58
|
-
xml[:definitions][:binding][:operation].map{|e| e[:'@name']}.should == ['Result', 'getArea', 'rocky']
|
58
|
+
xml[:definitions][:binding][:operation].map{|e| e[:'@name']}.sort.should == ['Result', 'getArea', 'rocky'].sort
|
59
59
|
|
60
60
|
client.wsdl.xml.include?('<xsd:complexType name="Circle1">').should == true
|
61
61
|
end
|
@@ -119,6 +119,23 @@ describe WashOut do
|
|
119
119
|
end.to_hash[:check_answer_response][:value].should == false
|
120
120
|
end
|
121
121
|
|
122
|
+
it "handles incorrect requests" do
|
123
|
+
mock_controller do
|
124
|
+
soap_action "duty",
|
125
|
+
:args => {:bad => {:a => :string, :b => :string}, :good => {:a => :string, :b => :string}},
|
126
|
+
:return => nil
|
127
|
+
def duty
|
128
|
+
render :soap => nil
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
lambda {
|
133
|
+
client.request(:duty) do
|
134
|
+
soap.body = { :bad => 42, :good => nil }
|
135
|
+
end
|
136
|
+
}.should raise_exception(Savon::SOAP::Fault)
|
137
|
+
end
|
138
|
+
|
122
139
|
it "should handle snakecase option properly" do
|
123
140
|
WashOut::Engine.snakecase_input = false
|
124
141
|
WashOut::Engine.camelize_wsdl = false
|
@@ -496,7 +513,7 @@ describe WashOut do
|
|
496
513
|
:args => :date,
|
497
514
|
:return => :nil
|
498
515
|
def date
|
499
|
-
params[:value].should == Date.parse('2000-12-30')
|
516
|
+
params[:value].should == Date.parse('2000-12-30') unless params[:value].blank?
|
500
517
|
render :soap => nil
|
501
518
|
end
|
502
519
|
end
|
@@ -506,6 +523,14 @@ describe WashOut do
|
|
506
523
|
:value => '2000-12-30'
|
507
524
|
}
|
508
525
|
end
|
526
|
+
|
527
|
+
lambda {
|
528
|
+
client.request(:date) do
|
529
|
+
soap.body = {
|
530
|
+
:value => nil
|
531
|
+
}
|
532
|
+
end
|
533
|
+
}.should_not raise_exception
|
509
534
|
end
|
510
535
|
|
511
536
|
describe "ws-security" do
|
@@ -609,4 +634,53 @@ describe WashOut do
|
|
609
634
|
|
610
635
|
end
|
611
636
|
|
637
|
+
it 'will not let you pass an Array in the place of a Hash' do
|
638
|
+
mock_controller do
|
639
|
+
soap_action 'bad', :args => :integer, :return => {
|
640
|
+
:basic => :string,
|
641
|
+
:stallions => {
|
642
|
+
:stallion => [
|
643
|
+
:name => :string,
|
644
|
+
:wyldness => :integer,
|
645
|
+
]
|
646
|
+
},
|
647
|
+
}
|
648
|
+
def bad
|
649
|
+
render :soap => {
|
650
|
+
:basic => 'hi',
|
651
|
+
:stallions => [{:name => 'ted', :wyldness => 11}]
|
652
|
+
}
|
653
|
+
end
|
654
|
+
end
|
655
|
+
|
656
|
+
lambda {
|
657
|
+
client.request(:bad).to_hash(:bad_response)
|
658
|
+
}.should raise_exception(
|
659
|
+
WashOut::Dispatcher::ProgrammerError,
|
660
|
+
/SOAP response .*wyldness.*Array.*Hash.*stallion/
|
661
|
+
)
|
662
|
+
end
|
663
|
+
|
664
|
+
it 'loudly fails if you return a string in place of an Array' do
|
665
|
+
mock_controller do
|
666
|
+
soap_action 'bad2', :args => :integer, :return => {
|
667
|
+
:basic => :string,
|
668
|
+
:telephone_booths => [:string]
|
669
|
+
}
|
670
|
+
def bad2
|
671
|
+
render :soap => {
|
672
|
+
:basic => 'hihi',
|
673
|
+
:telephone_booths => 'oops'
|
674
|
+
}
|
675
|
+
end
|
676
|
+
end
|
677
|
+
|
678
|
+
lambda {
|
679
|
+
client.request(:bad2).to_hash[:bad_response]
|
680
|
+
}.should raise_exception(
|
681
|
+
WashOut::Dispatcher::ProgrammerError,
|
682
|
+
/SOAP response .*oops.*String.*telephone_booths.*Array/
|
683
|
+
)
|
684
|
+
end
|
685
|
+
|
612
686
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -18,6 +18,12 @@ RSpec.configure do |config|
|
|
18
18
|
|
19
19
|
# == Mock Framework
|
20
20
|
config.mock_with :rspec
|
21
|
+
|
22
|
+
config.before(:all) do
|
23
|
+
WashOut::Engine.snakecase_input = false
|
24
|
+
WashOut::Engine.camelize_wsdl = false
|
25
|
+
WashOut::Engine.namespace = false
|
26
|
+
end
|
21
27
|
end
|
22
28
|
|
23
29
|
require 'savon'
|
data/wash_out.gemspec
CHANGED
@@ -14,8 +14,13 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.require_paths = ["lib"]
|
15
15
|
|
16
16
|
s.add_dependency("nori")
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
%w(
|
18
|
+
savon
|
19
|
+
rspec-rails guard guard-rspec rb-inotify rb-fsevent
|
20
|
+
appraisal
|
21
|
+
tzinfo
|
22
|
+
pry
|
23
|
+
).each do |dep|
|
24
|
+
s.add_development_dependency(dep)
|
25
|
+
end
|
21
26
|
end
|
metadata
CHANGED
@@ -1,84 +1,180 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: wash_out
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 1063984129097862891
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 5
|
9
|
+
- 3
|
10
|
+
version: 0.5.3
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Boris Staal
|
9
14
|
- Peter Zotov
|
10
15
|
autorequire:
|
11
16
|
bindir: bin
|
12
17
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
18
|
+
|
19
|
+
date: 2012-12-01 00:00:00 Z
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
16
22
|
name: nori
|
17
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
18
25
|
none: false
|
19
|
-
requirements:
|
20
|
-
- -
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 2002549777813010636
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
23
33
|
type: :runtime
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: savon
|
24
37
|
prerelease: false
|
25
|
-
|
26
|
-
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 2002549777813010636
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
version: "0"
|
47
|
+
type: :development
|
48
|
+
version_requirements: *id002
|
49
|
+
- !ruby/object:Gem::Dependency
|
27
50
|
name: rspec-rails
|
28
|
-
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
29
53
|
none: false
|
30
|
-
requirements:
|
31
|
-
- -
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
hash: 2002549777813010636
|
58
|
+
segments:
|
59
|
+
- 0
|
60
|
+
version: "0"
|
34
61
|
type: :development
|
62
|
+
version_requirements: *id003
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: guard
|
35
65
|
prerelease: false
|
36
|
-
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: appraisal
|
39
|
-
requirement: &70188738988240 !ruby/object:Gem::Requirement
|
66
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
40
67
|
none: false
|
41
|
-
requirements:
|
42
|
-
- -
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
hash: 2002549777813010636
|
72
|
+
segments:
|
73
|
+
- 0
|
74
|
+
version: "0"
|
45
75
|
type: :development
|
76
|
+
version_requirements: *id004
|
77
|
+
- !ruby/object:Gem::Dependency
|
78
|
+
name: guard-rspec
|
46
79
|
prerelease: false
|
47
|
-
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: tzinfo
|
50
|
-
requirement: &70188738987780 !ruby/object:Gem::Requirement
|
80
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
51
81
|
none: false
|
52
|
-
requirements:
|
53
|
-
- -
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
hash: 2002549777813010636
|
86
|
+
segments:
|
87
|
+
- 0
|
88
|
+
version: "0"
|
56
89
|
type: :development
|
90
|
+
version_requirements: *id005
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: rb-inotify
|
57
93
|
prerelease: false
|
58
|
-
|
59
|
-
- !ruby/object:Gem::Dependency
|
60
|
-
name: savon
|
61
|
-
requirement: &70188738987360 !ruby/object:Gem::Requirement
|
94
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
62
95
|
none: false
|
63
|
-
requirements:
|
64
|
-
- -
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
hash: 2002549777813010636
|
100
|
+
segments:
|
101
|
+
- 0
|
102
|
+
version: "0"
|
67
103
|
type: :development
|
104
|
+
version_requirements: *id006
|
105
|
+
- !ruby/object:Gem::Dependency
|
106
|
+
name: rb-fsevent
|
68
107
|
prerelease: false
|
69
|
-
|
108
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
109
|
+
none: false
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
hash: 2002549777813010636
|
114
|
+
segments:
|
115
|
+
- 0
|
116
|
+
version: "0"
|
117
|
+
type: :development
|
118
|
+
version_requirements: *id007
|
119
|
+
- !ruby/object:Gem::Dependency
|
120
|
+
name: appraisal
|
121
|
+
prerelease: false
|
122
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
123
|
+
none: false
|
124
|
+
requirements:
|
125
|
+
- - ">="
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
hash: 2002549777813010636
|
128
|
+
segments:
|
129
|
+
- 0
|
130
|
+
version: "0"
|
131
|
+
type: :development
|
132
|
+
version_requirements: *id008
|
133
|
+
- !ruby/object:Gem::Dependency
|
134
|
+
name: tzinfo
|
135
|
+
prerelease: false
|
136
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ">="
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
hash: 2002549777813010636
|
142
|
+
segments:
|
143
|
+
- 0
|
144
|
+
version: "0"
|
145
|
+
type: :development
|
146
|
+
version_requirements: *id009
|
147
|
+
- !ruby/object:Gem::Dependency
|
148
|
+
name: pry
|
149
|
+
prerelease: false
|
150
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
151
|
+
none: false
|
152
|
+
requirements:
|
153
|
+
- - ">="
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
hash: 2002549777813010636
|
156
|
+
segments:
|
157
|
+
- 0
|
158
|
+
version: "0"
|
159
|
+
type: :development
|
160
|
+
version_requirements: *id010
|
70
161
|
description: Dead simple Rails 3 SOAP server library
|
71
162
|
email: boris@roundlake.ru
|
72
163
|
executables: []
|
164
|
+
|
73
165
|
extensions: []
|
166
|
+
|
74
167
|
extra_rdoc_files: []
|
75
|
-
|
168
|
+
|
169
|
+
files:
|
76
170
|
- .gitignore
|
171
|
+
- .rspec
|
77
172
|
- .travis.yml
|
78
173
|
- Appraisals
|
79
174
|
- CHANGELOG.md
|
80
175
|
- Gemfile
|
81
176
|
- Gemfile.lock
|
177
|
+
- Guardfile
|
82
178
|
- LICENSE
|
83
179
|
- README.md
|
84
180
|
- Rakefile
|
@@ -124,35 +220,45 @@ files:
|
|
124
220
|
- spec/dummy/public/favicon.ico
|
125
221
|
- spec/dummy/public/stylesheets/.gitkeep
|
126
222
|
- spec/dummy/script/rails
|
223
|
+
- spec/lib/wash_out/dispatcher_spec.rb
|
224
|
+
- spec/lib/wash_out/param_spec.rb
|
225
|
+
- spec/lib/wash_out/type_spec.rb
|
226
|
+
- spec/lib/wash_out_spec.rb
|
127
227
|
- spec/spec_helper.rb
|
128
228
|
- spec/support/httpi-rack.rb
|
129
|
-
- spec/wash_out/dispatcher_spec.rb
|
130
|
-
- spec/wash_out/param_spec.rb
|
131
|
-
- spec/wash_out/type_spec.rb
|
132
|
-
- spec/wash_out_spec.rb
|
133
229
|
- wash_out.gemspec
|
134
230
|
homepage: http://roundlake.github.com/wash_out/
|
135
231
|
licenses: []
|
232
|
+
|
136
233
|
post_install_message:
|
137
234
|
rdoc_options: []
|
138
|
-
|
235
|
+
|
236
|
+
require_paths:
|
139
237
|
- lib
|
140
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
238
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
141
239
|
none: false
|
142
|
-
requirements:
|
143
|
-
- -
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
|
146
|
-
|
240
|
+
requirements:
|
241
|
+
- - ">="
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
hash: 2002549777813010636
|
244
|
+
segments:
|
245
|
+
- 0
|
246
|
+
version: "0"
|
247
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
248
|
none: false
|
148
|
-
requirements:
|
149
|
-
- -
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
|
249
|
+
requirements:
|
250
|
+
- - ">="
|
251
|
+
- !ruby/object:Gem::Version
|
252
|
+
hash: 2002549777813010636
|
253
|
+
segments:
|
254
|
+
- 0
|
255
|
+
version: "0"
|
152
256
|
requirements: []
|
257
|
+
|
153
258
|
rubyforge_project:
|
154
|
-
rubygems_version: 1.8.
|
259
|
+
rubygems_version: 1.8.24
|
155
260
|
signing_key:
|
156
261
|
specification_version: 3
|
157
262
|
summary: Dead simple Rails 3 SOAP server library
|
158
263
|
test_files: []
|
264
|
+
|
data/spec/wash_out/param_spec.rb
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
#encoding:utf-8
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
describe WashOut::Param do
|
6
|
-
|
7
|
-
it "loads custom_types" do
|
8
|
-
class Abraka1 < WashOut::Type
|
9
|
-
map(
|
10
|
-
:test => :string
|
11
|
-
)
|
12
|
-
end
|
13
|
-
class Abraka2 < WashOut::Type
|
14
|
-
type_name 'test'
|
15
|
-
map :foo => Abraka1
|
16
|
-
end
|
17
|
-
|
18
|
-
map = WashOut::Param.parse_def Abraka2
|
19
|
-
|
20
|
-
map.should be_a_kind_of(Array)
|
21
|
-
map[0].name.should == 'Value'
|
22
|
-
map[0].map[0].name.should == 'Foo'
|
23
|
-
map[0].map[0].map[0].name.should == 'Test'
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|