wash-out 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.rspec +1 -0
- data/.travis.yml +35 -0
- data/Appraisals +25 -0
- data/CHANGELOG.md +102 -0
- data/Gemfile +16 -0
- data/Guardfile +12 -0
- data/LICENSE +22 -0
- data/README.md +246 -0
- data/Rakefile +13 -0
- data/app/helpers/wash_out_helper.rb +106 -0
- data/app/views/wash_out/document/error.builder +9 -0
- data/app/views/wash_out/document/response.builder +10 -0
- data/app/views/wash_out/document/wsdl.builder +68 -0
- data/app/views/wash_out/rpc/error.builder +10 -0
- data/app/views/wash_out/rpc/response.builder +11 -0
- data/app/views/wash_out/rpc/wsdl.builder +68 -0
- data/gemfiles/rails_3.1.3.gemfile +20 -0
- data/gemfiles/rails_3.2.12.gemfile +20 -0
- data/gemfiles/rails_4.0.0.gemfile +19 -0
- data/gemfiles/rails_4.1.0.gemfile +19 -0
- data/gemfiles/rails_4.2.0.gemfile +19 -0
- data/gemfiles/rails_5.0.0.beta2.gemfile +19 -0
- data/init.rb +1 -0
- data/lib/wash_out.rb +53 -0
- data/lib/wash_out/configurable.rb +41 -0
- data/lib/wash_out/dispatcher.rb +218 -0
- data/lib/wash_out/engine.rb +12 -0
- data/lib/wash_out/middleware.rb +41 -0
- data/lib/wash_out/model.rb +29 -0
- data/lib/wash_out/param.rb +200 -0
- data/lib/wash_out/router.rb +95 -0
- data/lib/wash_out/soap.rb +48 -0
- data/lib/wash_out/soap_config.rb +93 -0
- data/lib/wash_out/type.rb +29 -0
- data/lib/wash_out/version.rb +3 -0
- data/lib/wash_out/wsse.rb +101 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +51 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +23 -0
- data/spec/dummy/config/environments/test.rb +30 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +10 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +8 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +58 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +26 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/stylesheets/.gitkeep +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/lib/wash_out/dispatcher_spec.rb +99 -0
- data/spec/lib/wash_out/middleware_spec.rb +33 -0
- data/spec/lib/wash_out/param_spec.rb +94 -0
- data/spec/lib/wash_out/router_spec.rb +22 -0
- data/spec/lib/wash_out/type_spec.rb +41 -0
- data/spec/lib/wash_out_spec.rb +754 -0
- data/spec/spec_helper.rb +82 -0
- data/wash_out.gemspec +21 -0
- metadata +128 -0
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
# Configure Rails Envinronment
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
3
|
+
|
4
|
+
require "simplecov"
|
5
|
+
SimpleCov.start do
|
6
|
+
add_filter 'spec'
|
7
|
+
add_group 'Library', 'lib'
|
8
|
+
add_group 'App', 'app'
|
9
|
+
|
10
|
+
at_exit do; end
|
11
|
+
end
|
12
|
+
|
13
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
14
|
+
require "rails/test_help"
|
15
|
+
require "rspec/rails"
|
16
|
+
require "pry"
|
17
|
+
require "savon"
|
18
|
+
|
19
|
+
Rails.backtrace_cleaner.remove_silencers!
|
20
|
+
|
21
|
+
# Load support files
|
22
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
23
|
+
|
24
|
+
RSpec.configure do |config|
|
25
|
+
require 'rspec/expectations'
|
26
|
+
config.include RSpec::Matchers
|
27
|
+
|
28
|
+
config.mock_with :rspec
|
29
|
+
config.before(:all) do
|
30
|
+
WashOut::Engine.config.wash_out = {
|
31
|
+
snakecase_input: false,
|
32
|
+
camelize_wsdl: false,
|
33
|
+
namespace: false
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
config.after(:suite) do
|
38
|
+
if SimpleCov.running
|
39
|
+
silence_stream(STDOUT) do
|
40
|
+
SimpleCov::Formatter::HTMLFormatter.new.format(SimpleCov.result)
|
41
|
+
end
|
42
|
+
|
43
|
+
SimpleCov::Formatter::SummaryFormatter.new.format(SimpleCov.result)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
HTTPI.logger = Logger.new(open("/dev/null", 'w'))
|
49
|
+
HTTPI.adapter = :rack
|
50
|
+
|
51
|
+
HTTPI::Adapter::Rack.mount 'app', Dummy::Application
|
52
|
+
Dummy::Application.routes.draw do
|
53
|
+
wash_out :api
|
54
|
+
end
|
55
|
+
|
56
|
+
def mock_controller(options = {}, &block)
|
57
|
+
Object.send :remove_const, :ApiController if defined?(ApiController)
|
58
|
+
Object.send :const_set, :ApiController, Class.new(ApplicationController) {
|
59
|
+
include RSpec::Matchers
|
60
|
+
|
61
|
+
soap_service options.reverse_merge({
|
62
|
+
snakecase_input: true,
|
63
|
+
camelize_wsdl: true,
|
64
|
+
namespace: false
|
65
|
+
})
|
66
|
+
class_exec &block if block
|
67
|
+
}
|
68
|
+
|
69
|
+
ActiveSupport::Dependencies::Reference.instance_variable_get(:'@store').delete('ApiController')
|
70
|
+
end
|
71
|
+
|
72
|
+
unless defined?(silence_stream) # Rails 5
|
73
|
+
def silence_stream(stream)
|
74
|
+
old_stream = stream.dup
|
75
|
+
stream.reopen(RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ? 'NUL:' : '/dev/null')
|
76
|
+
stream.sync = true
|
77
|
+
yield
|
78
|
+
ensure
|
79
|
+
stream.reopen(old_stream)
|
80
|
+
old_stream.close
|
81
|
+
end
|
82
|
+
end
|
data/wash_out.gemspec
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require File.expand_path('lib/wash_out/version', __dir__)
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = 'wash-out'
|
5
|
+
s.version = WashOut::VERSION
|
6
|
+
s.licenses = ['MIT']
|
7
|
+
s.platform = Gem::Platform::RUBY
|
8
|
+
s.summary = 'Dead simple Rails 5 SOAP server library with legacy code'
|
9
|
+
s.email = 'boris@roundlake.ru'
|
10
|
+
s.homepage = 'http://github.com/inossidabile/wash_out/'
|
11
|
+
s.description = 'Dead simple Rails 5 SOAP server library'
|
12
|
+
s.authors = ['Boris Staal', 'Peter Zotov']
|
13
|
+
|
14
|
+
s.files = `git ls-files`.split("\n")
|
15
|
+
s.require_paths = ['lib']
|
16
|
+
s.post_install_message = <<-EOS
|
17
|
+
Please replace `include WashOut::SOAP` with `soap_service`
|
18
|
+
in your controllers if you are upgrading from a version before 0.8.5.
|
19
|
+
EOS
|
20
|
+
s.add_dependency('nori', '>= 2.0.0')
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,128 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: wash-out
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.10.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Boris Staal
|
8
|
+
- Peter Zotov
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2018-05-30 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: nori
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 2.0.0
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 2.0.0
|
28
|
+
description: Dead simple Rails 5 SOAP server library
|
29
|
+
email: boris@roundlake.ru
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- ".gitignore"
|
35
|
+
- ".rspec"
|
36
|
+
- ".travis.yml"
|
37
|
+
- Appraisals
|
38
|
+
- CHANGELOG.md
|
39
|
+
- Gemfile
|
40
|
+
- Guardfile
|
41
|
+
- LICENSE
|
42
|
+
- README.md
|
43
|
+
- Rakefile
|
44
|
+
- app/helpers/wash_out_helper.rb
|
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.1.3.gemfile
|
52
|
+
- gemfiles/rails_3.2.12.gemfile
|
53
|
+
- gemfiles/rails_4.0.0.gemfile
|
54
|
+
- gemfiles/rails_4.1.0.gemfile
|
55
|
+
- gemfiles/rails_4.2.0.gemfile
|
56
|
+
- gemfiles/rails_5.0.0.beta2.gemfile
|
57
|
+
- init.rb
|
58
|
+
- lib/wash_out.rb
|
59
|
+
- lib/wash_out/configurable.rb
|
60
|
+
- lib/wash_out/dispatcher.rb
|
61
|
+
- lib/wash_out/engine.rb
|
62
|
+
- lib/wash_out/middleware.rb
|
63
|
+
- lib/wash_out/model.rb
|
64
|
+
- lib/wash_out/param.rb
|
65
|
+
- lib/wash_out/router.rb
|
66
|
+
- lib/wash_out/soap.rb
|
67
|
+
- lib/wash_out/soap_config.rb
|
68
|
+
- lib/wash_out/type.rb
|
69
|
+
- lib/wash_out/version.rb
|
70
|
+
- lib/wash_out/wsse.rb
|
71
|
+
- spec/dummy/Rakefile
|
72
|
+
- spec/dummy/app/controllers/application_controller.rb
|
73
|
+
- spec/dummy/app/helpers/application_helper.rb
|
74
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
75
|
+
- spec/dummy/config.ru
|
76
|
+
- spec/dummy/config/application.rb
|
77
|
+
- spec/dummy/config/boot.rb
|
78
|
+
- spec/dummy/config/environment.rb
|
79
|
+
- spec/dummy/config/environments/development.rb
|
80
|
+
- spec/dummy/config/environments/test.rb
|
81
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
82
|
+
- spec/dummy/config/initializers/inflections.rb
|
83
|
+
- spec/dummy/config/initializers/mime_types.rb
|
84
|
+
- spec/dummy/config/initializers/secret_token.rb
|
85
|
+
- spec/dummy/config/initializers/session_store.rb
|
86
|
+
- spec/dummy/config/locales/en.yml
|
87
|
+
- spec/dummy/config/routes.rb
|
88
|
+
- spec/dummy/public/404.html
|
89
|
+
- spec/dummy/public/422.html
|
90
|
+
- spec/dummy/public/500.html
|
91
|
+
- spec/dummy/public/favicon.ico
|
92
|
+
- spec/dummy/public/stylesheets/.gitkeep
|
93
|
+
- spec/dummy/script/rails
|
94
|
+
- spec/lib/wash_out/dispatcher_spec.rb
|
95
|
+
- spec/lib/wash_out/middleware_spec.rb
|
96
|
+
- spec/lib/wash_out/param_spec.rb
|
97
|
+
- spec/lib/wash_out/router_spec.rb
|
98
|
+
- spec/lib/wash_out/type_spec.rb
|
99
|
+
- spec/lib/wash_out_spec.rb
|
100
|
+
- spec/spec_helper.rb
|
101
|
+
- wash_out.gemspec
|
102
|
+
homepage: http://github.com/inossidabile/wash_out/
|
103
|
+
licenses:
|
104
|
+
- MIT
|
105
|
+
metadata: {}
|
106
|
+
post_install_message: |2
|
107
|
+
Please replace `include WashOut::SOAP` with `soap_service`
|
108
|
+
in your controllers if you are upgrading from a version before 0.8.5.
|
109
|
+
rdoc_options: []
|
110
|
+
require_paths:
|
111
|
+
- lib
|
112
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - ">="
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
122
|
+
requirements: []
|
123
|
+
rubyforge_project:
|
124
|
+
rubygems_version: 2.7.6
|
125
|
+
signing_key:
|
126
|
+
specification_version: 4
|
127
|
+
summary: Dead simple Rails 5 SOAP server library with legacy code
|
128
|
+
test_files: []
|