uri_template 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/uri_template.rb +7 -0
- data/uri_template.gemspec +1 -1
- metadata +2 -2
data/lib/uri_template.rb
CHANGED
@@ -200,6 +200,13 @@ RUBY
|
|
200
200
|
def expand(variables = {})
|
201
201
|
raise ArgumentError, "Expected something that responds to :map, but got: #{variables.inspect}" unless variables.respond_to? :map
|
202
202
|
|
203
|
+
if variables.kind_of? Array
|
204
|
+
warn <<WARN
|
205
|
+
Passing variables as an Array to URITemplate#expand will have a different semantic in the next version of uri_template.
|
206
|
+
Please convert your variables into a Hash or use some ducktyping.
|
207
|
+
WARN
|
208
|
+
end
|
209
|
+
|
203
210
|
# Stringify variables
|
204
211
|
arg = variables.map{ |k, v| [k.to_s, v] }
|
205
212
|
if arg.any?{|elem| !elem.kind_of?(Array) }
|
data/uri_template.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uri_template
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|