wash_out 0.11.0.beta.1 → 0.11.0.beta.2
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/lib/wash_out/router.rb +20 -4
- data/lib/wash_out/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5f141fb15bb0de83f6a21321b491bfe4877344f
|
4
|
+
data.tar.gz: c38aa890a97bbaec1eae14629d84eb62e1303ee3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87e9b3295e80e00d0efea3a05f316aa96367ff69569a0e4f572842e93f39af02e0b208e0c285d528227f8ec08292b150c5a49de592b346d0e237ce0bafca99cd
|
7
|
+
data.tar.gz: b42db7edf34731c880378ca6e2d9194907d20893d8886d340ccc33e52b0b925a20a387dc38f0bd6e85b81e25e3065b716ff79d2890351f7d892b18f50de37be5
|
data/lib/wash_out/router.rb
CHANGED
@@ -4,12 +4,28 @@ module WashOut
|
|
4
4
|
# This class is a Rack middleware used to route SOAP requests to a proper
|
5
5
|
# action of a given SOAP controller.
|
6
6
|
class Router
|
7
|
-
def self.
|
8
|
-
|
7
|
+
def self.lookup_soap_routes(controller_name, routes)
|
8
|
+
results = []
|
9
|
+
|
10
|
+
routes.each do |x|
|
9
11
|
defaults = x.defaults
|
10
12
|
defaults = defaults[:defaults] if defaults.include?(:defaults) # Rails 5
|
11
|
-
defaults[:controller] == controller_name && defaults[:action] == 'soap'
|
12
|
-
|
13
|
+
if defaults[:controller] == controller_name && defaults[:action] == 'soap'
|
14
|
+
results << x
|
15
|
+
end
|
16
|
+
|
17
|
+
app = x.app
|
18
|
+
app = app.app if app.respond_to?(:app)
|
19
|
+
if app.is_a?(Class) && app.ancestors.include?(Rails::Engine)
|
20
|
+
results += lookup_soap_routes(controller_name, app.routes.routes)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
results
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.url(request, controller_name)
|
28
|
+
route = lookup_soap_routes(controller_name, Rails.application.routes.routes).first
|
13
29
|
|
14
30
|
path = if route.respond_to?(:optimized_path) # Rails 4
|
15
31
|
route.optimized_path
|
data/lib/wash_out/version.rb
CHANGED
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.11.0.beta.
|
4
|
+
version: 0.11.0.beta.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boris Staal
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-06-
|
12
|
+
date: 2016-06-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nori
|