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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/route_soap.rb +3 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dda88b7513c1a4d3f8a56eac537da1b0768fd883
4
- data.tar.gz: ae5b432be1c4f484b8c0722b6769ead16d05de01
3
+ metadata.gz: 84e74b6e41219b101953aee58534f4105152d35b
4
+ data.tar.gz: 0ff07fd9216cbe6aaeb5a6df70ed7dda002eb889
5
5
  SHA512:
6
- metadata.gz: 38aa431651f9653acc1282e18e91b4a6db66d251af02fedcc4dc88fe4c1dadc5e4448ccf1c85902f201eb93707d8acbabeb78bf7ec5e6f506cc9b74500bf09c0
7
- data.tar.gz: 4c76e28b2e696da0b4381954e7af82cab4909f985990d0204e52e777cda39cc077d6f00da85eaefcfedad1f2e9af431cbc950f7a29e88d8f473f6de435239b75
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
- @required_params ||= route_path.required_names.reduce(Hash.new) do |acc, param|
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.1
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-02-17 00:00:00.000000000 Z
11
+ date: 2015-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler