restify 0.1.2.1.b33 → 0.1.2.1.b34
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/restify/client.rb +1 -1
- data/lib/restify/relation.rb +14 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjZhNWQ1YzA2YmVmZDFlMWViZTBhY2QxMmVkMmUzM2EzNDU1YjY0MQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YmU5OGEyOGUxOGZmY2Q2YTA1N2U2ZTI2NTIzMDhiYjcwNWRjN2UyNQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NWYyYjk3NDY1ZjQxYzVlZGQwOGM4MzFmN2Q3MjJhZmVlOWNlYWY2OWY0ZTc4
|
10
|
+
MjJmZThmZGRmYjA0MDA5MTY4N2JjZDA0ZGE0MWQ4Y2FhYjRkNDZkODI4YjJj
|
11
|
+
ZWY5YWI3OWExYWJjYjcxOGQ4NDYyYmM4M2FjMGQ2MTYyN2RhZWM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NGQzNWRhZmRmMzkwYzUwYzY2N2U5ZGUzOTA0MjQ0YmVmYTg0YWQzZWZmNThk
|
14
|
+
NjA3YzAyYmIyN2IxNmFmZTJjODAzYjcyZTFkMmY0YmU4NWI4M2RiNTgxYzNk
|
15
|
+
NDVjZDljYjRhNDU0ZjkzZmQ3ZTRhNWVlZWZlZWU0NmVmNTc1Y2I=
|
data/lib/restify/client.rb
CHANGED
data/lib/restify/relation.rb
CHANGED
@@ -40,10 +40,23 @@ module Restify
|
|
40
40
|
|
41
41
|
def request(method, opts = {})
|
42
42
|
keys = template.variables - Client::RESERVED_KEYS
|
43
|
-
params =
|
43
|
+
params = extract_params(opts, keys)
|
44
44
|
uri = template.expand(params)
|
45
45
|
|
46
46
|
client.request method, uri, opts
|
47
47
|
end
|
48
|
+
|
49
|
+
def extract_params(opts, keys)
|
50
|
+
params = {}
|
51
|
+
keys.each do |key|
|
52
|
+
if opts.key?(key)
|
53
|
+
params[key] = opts.delete(key)
|
54
|
+
elsif opts.key?(key.to_sym)
|
55
|
+
params[key] = opts.delete(key.to_sym)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
params
|
60
|
+
end
|
48
61
|
end
|
49
62
|
end
|