deas 0.22.0 → 0.22.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/deas/url.rb CHANGED
@@ -24,10 +24,14 @@ module Deas
24
24
  end
25
25
 
26
26
  def apply_hashed(path, params)
27
+ # don't alter the given params
28
+ hash = params.dup
29
+
27
30
  # ignore captures in applying params
28
- captures = params.delete(:captures) || params.delete('captures') || []
29
- splat = params.delete(:splat) || params.delete('splat') || []
30
- apply_extra(apply_named(apply_splat(@path, splat), params), params)
31
+ captures = hash.delete(:captures) || hash.delete('captures') || []
32
+ splat = hash.delete(:splat) || hash.delete('splat') || []
33
+
34
+ apply_extra(apply_named(apply_splat(@path, splat), hash), hash)
31
35
  end
32
36
 
33
37
  def apply_splat(path, params)
data/lib/deas/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Deas
2
- VERSION = "0.22.0"
2
+ VERSION = "0.22.1"
3
3
  end
@@ -102,6 +102,14 @@ class Deas::Url
102
102
  })
103
103
  end
104
104
 
105
+ should "not alter the given params" do
106
+ params = {'some' => 'thing'}
107
+ exp_params = params.dup
108
+
109
+ subject.path_for(params)
110
+ assert_equal exp_params, params
111
+ end
112
+
105
113
  end
106
114
 
107
115
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deas
3
3
  version: !ruby/object:Gem::Version
4
- hash: 71
4
+ hash: 69
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 22
9
- - 0
10
- version: 0.22.0
9
+ - 1
10
+ version: 0.22.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kelly Redding