wash_out 0.9.0 → 0.12.0
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.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/.travis.yml +10 -5
- data/Appraisals +16 -9
- data/Gemfile +3 -1
- data/README.md +112 -8
- data/Rakefile +15 -5
- data/app/helpers/wash_out_helper.rb +62 -25
- data/app/views/{wash_with_soap → wash_out}/document/error.builder +1 -1
- data/app/views/{wash_with_soap → wash_out}/document/response.builder +8 -3
- data/app/views/{wash_with_soap → wash_out}/document/wsdl.builder +16 -16
- data/app/views/{wash_with_soap → wash_out}/rpc/error.builder +1 -1
- data/app/views/{wash_with_soap → wash_out}/rpc/response.builder +9 -4
- data/app/views/{wash_with_soap → wash_out}/rpc/wsdl.builder +17 -17
- data/gemfiles/rails_3.2.13.gemfile +21 -0
- data/gemfiles/rails_4.0.0.gemfile +21 -0
- data/gemfiles/rails_4.1.0.gemfile +21 -0
- data/gemfiles/rails_4.2.0.gemfile +21 -0
- data/gemfiles/rails_5.0.0.beta2.gemfile +19 -0
- data/gemfiles/rails_5.0.0.gemfile +20 -0
- data/gemfiles/rails_5.1.1.gemfile +20 -0
- data/lib/wash_out/dispatcher.rb +126 -48
- data/lib/wash_out/engine.rb +1 -2
- data/lib/wash_out/model.rb +1 -1
- data/lib/wash_out/param.rb +14 -1
- data/lib/wash_out/router.rb +61 -19
- data/lib/wash_out/soap.rb +15 -3
- data/lib/wash_out/soap_config.rb +2 -0
- data/lib/wash_out/version.rb +1 -1
- data/lib/wash_out/wsse.rb +49 -23
- data/lib/wash_out.rb +35 -6
- data/spec/dummy/app/controllers/application_controller.rb +1 -1
- data/spec/dummy/config/environments/test.rb +1 -0
- data/spec/fixtures/nested_refs_to_arrays.xml +19 -0
- data/spec/fixtures/ref_to_one_array.xml +11 -0
- data/spec/fixtures/refs_to_arrays.xml +16 -0
- data/spec/lib/wash_out/dispatcher_spec.rb +135 -13
- data/spec/lib/wash_out/middleware_spec.rb +8 -8
- data/spec/lib/wash_out/param_spec.rb +43 -11
- data/spec/lib/wash_out/router_spec.rb +50 -0
- data/spec/lib/wash_out/type_spec.rb +9 -9
- data/spec/lib/wash_out_spec.rb +440 -88
- data/spec/spec_helper.rb +26 -4
- metadata +27 -16
data/spec/spec_helper.rb
CHANGED
@@ -24,6 +24,8 @@ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
|
24
24
|
RSpec.configure do |config|
|
25
25
|
require 'rspec/expectations'
|
26
26
|
config.include RSpec::Matchers
|
27
|
+
config.filter_run focus: true
|
28
|
+
config.run_all_when_everything_filtered = true
|
27
29
|
|
28
30
|
config.mock_with :rspec
|
29
31
|
config.before(:all) do
|
@@ -50,12 +52,20 @@ HTTPI.adapter = :rack
|
|
50
52
|
|
51
53
|
HTTPI::Adapter::Rack.mount 'app', Dummy::Application
|
52
54
|
Dummy::Application.routes.draw do
|
53
|
-
|
55
|
+
namespace :route do
|
56
|
+
scope module: 'space' do
|
57
|
+
wash_out :api
|
58
|
+
end
|
59
|
+
end
|
54
60
|
end
|
55
61
|
|
56
62
|
def mock_controller(options = {}, &block)
|
57
|
-
Object.send :
|
58
|
-
|
63
|
+
Object.send :const_set, :Route, Module.new unless defined?(Route)
|
64
|
+
Route.send :const_set, :Space, Module.new unless defined?(Route::Space)
|
65
|
+
Route::Space.send :remove_const, :ApiController if defined?(Route::Space::ApiController)
|
66
|
+
Route::Space.send :const_set, :ApiController, Class.new(ApplicationController) {
|
67
|
+
include RSpec::Matchers
|
68
|
+
|
59
69
|
soap_service options.reverse_merge({
|
60
70
|
snakecase_input: true,
|
61
71
|
camelize_wsdl: true,
|
@@ -64,5 +74,17 @@ def mock_controller(options = {}, &block)
|
|
64
74
|
class_exec &block if block
|
65
75
|
}
|
66
76
|
|
67
|
-
ActiveSupport::Dependencies::Reference.instance_variable_get(:'@store').delete('ApiController')
|
77
|
+
ActiveSupport::Dependencies::Reference.instance_variable_get(:'@store').delete('Route::Space::ApiController')
|
78
|
+
end
|
79
|
+
|
80
|
+
unless defined?(silence_stream) # Rails 5
|
81
|
+
def silence_stream(stream)
|
82
|
+
old_stream = stream.dup
|
83
|
+
stream.reopen(RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ? 'NUL:' : '/dev/null')
|
84
|
+
stream.sync = true
|
85
|
+
yield
|
86
|
+
ensure
|
87
|
+
stream.reopen(old_stream)
|
88
|
+
old_stream.close
|
89
|
+
end
|
68
90
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wash_out
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boris Staal
|
@@ -9,20 +9,20 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-10-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nori
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: 2.0.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: 2.0.0
|
28
28
|
description: Dead simple Rails 3 SOAP server library
|
@@ -31,9 +31,9 @@ executables: []
|
|
31
31
|
extensions: []
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
|
-
- .gitignore
|
35
|
-
- .rspec
|
36
|
-
- .travis.yml
|
34
|
+
- ".gitignore"
|
35
|
+
- ".rspec"
|
36
|
+
- ".travis.yml"
|
37
37
|
- Appraisals
|
38
38
|
- CHANGELOG.md
|
39
39
|
- Gemfile
|
@@ -42,12 +42,19 @@ files:
|
|
42
42
|
- README.md
|
43
43
|
- Rakefile
|
44
44
|
- app/helpers/wash_out_helper.rb
|
45
|
-
- app/views/
|
46
|
-
- app/views/
|
47
|
-
- app/views/
|
48
|
-
- app/views/
|
49
|
-
- app/views/
|
50
|
-
- app/views/
|
45
|
+
- app/views/wash_out/document/error.builder
|
46
|
+
- app/views/wash_out/document/response.builder
|
47
|
+
- app/views/wash_out/document/wsdl.builder
|
48
|
+
- app/views/wash_out/rpc/error.builder
|
49
|
+
- app/views/wash_out/rpc/response.builder
|
50
|
+
- app/views/wash_out/rpc/wsdl.builder
|
51
|
+
- gemfiles/rails_3.2.13.gemfile
|
52
|
+
- gemfiles/rails_4.0.0.gemfile
|
53
|
+
- gemfiles/rails_4.1.0.gemfile
|
54
|
+
- gemfiles/rails_4.2.0.gemfile
|
55
|
+
- gemfiles/rails_5.0.0.beta2.gemfile
|
56
|
+
- gemfiles/rails_5.0.0.gemfile
|
57
|
+
- gemfiles/rails_5.1.1.gemfile
|
51
58
|
- init.rb
|
52
59
|
- lib/wash_out.rb
|
53
60
|
- lib/wash_out/configurable.rb
|
@@ -85,9 +92,13 @@ files:
|
|
85
92
|
- spec/dummy/public/favicon.ico
|
86
93
|
- spec/dummy/public/stylesheets/.gitkeep
|
87
94
|
- spec/dummy/script/rails
|
95
|
+
- spec/fixtures/nested_refs_to_arrays.xml
|
96
|
+
- spec/fixtures/ref_to_one_array.xml
|
97
|
+
- spec/fixtures/refs_to_arrays.xml
|
88
98
|
- spec/lib/wash_out/dispatcher_spec.rb
|
89
99
|
- spec/lib/wash_out/middleware_spec.rb
|
90
100
|
- spec/lib/wash_out/param_spec.rb
|
101
|
+
- spec/lib/wash_out/router_spec.rb
|
91
102
|
- spec/lib/wash_out/type_spec.rb
|
92
103
|
- spec/lib/wash_out_spec.rb
|
93
104
|
- spec/spec_helper.rb
|
@@ -103,17 +114,17 @@ require_paths:
|
|
103
114
|
- lib
|
104
115
|
required_ruby_version: !ruby/object:Gem::Requirement
|
105
116
|
requirements:
|
106
|
-
- -
|
117
|
+
- - ">="
|
107
118
|
- !ruby/object:Gem::Version
|
108
119
|
version: '0'
|
109
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
121
|
requirements:
|
111
|
-
- -
|
122
|
+
- - ">="
|
112
123
|
- !ruby/object:Gem::Version
|
113
124
|
version: '0'
|
114
125
|
requirements: []
|
115
126
|
rubyforge_project:
|
116
|
-
rubygems_version: 2.
|
127
|
+
rubygems_version: 2.5.1
|
117
128
|
signing_key:
|
118
129
|
specification_version: 4
|
119
130
|
summary: Dead simple Rails 3 SOAP server library
|