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.
@@ -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) }
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'uri_template'
3
- s.version = '0.5.2'
3
+ s.version = '0.5.3'
4
4
  s.date = Time.now.strftime('%Y-%m-%d')
5
5
  s.authors = ["HannesG"]
6
6
  s.email = %q{hannes.georg@googlemail.com}
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.2
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-03-16 00:00:00.000000000 Z
12
+ date: 2013-04-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json