route_soap 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/route_soap.rb +3 -2
- 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: 84e74b6e41219b101953aee58534f4105152d35b
|
4
|
+
data.tar.gz: 0ff07fd9216cbe6aaeb5a6df70ed7dda002eb889
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a82202cc25e8af0996a25d93a3b94817bc4344209650ac93e5e96848950f93d205157100c5e54f3659113478b1de1b4ce7884c3f6de39e2ef2acb6b108607944
|
7
|
+
data.tar.gz: 8a4b1a0fed398409351a276cd7cf872c4210d9cde69cfed6d572928dc259cb14e8c4cb815bbe6e7d715ca2e46a252e9949567afcd729eddeaede4fe4ade22cee
|
data/route_soap.rb
CHANGED
@@ -55,14 +55,15 @@ module RouteSoap
|
|
55
55
|
def path
|
56
56
|
@path ||= String(route_path.spec).gsub("(.:format)", "").tap do |path|
|
57
57
|
required_params.each do |param, value|
|
58
|
-
path.gsub!(":#{param}", value)
|
58
|
+
path.gsub!(":#{param}", value) unless param == :format
|
59
59
|
end
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
63
|
Contract nil => Hash
|
64
64
|
def required_params
|
65
|
-
|
65
|
+
hash = { format: route.defaults[:format] }.delete_if { |_, v| v.nil? }
|
66
|
+
@required_params ||= route_path.required_names.reduce(hash) do |acc, param|
|
66
67
|
acc[param] = SecureRandom.hex(3)
|
67
68
|
acc
|
68
69
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: route_soap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philip Cunningham
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|