http_router 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,7 +32,7 @@ class HttpRouter
32
32
  end
33
33
 
34
34
  def hashify_params(params)
35
- variable_names && params ? variable_names.zip(params).inject({}) { |h, (k,v)| h[k] = v; h } : {}
35
+ !static? && params ? variable_names.zip(params).inject({}) { |h, (k,v)| h[k] = v; h } : {}
36
36
  end
37
37
 
38
38
  def ===(other_path)
@@ -64,10 +64,7 @@ class HttpRouter
64
64
  end
65
65
 
66
66
  def variables
67
- unless @variables
68
- @variables = @parts.select{|p| p.is_a?(Variable)}
69
- end
70
- @variables
67
+ @variables ||= @parts.select{|p| p.is_a?(Variable)}
71
68
  end
72
69
 
73
70
  def variable_names
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  class HttpRouter #:nodoc
3
- VERSION = '0.5.0'
3
+ VERSION = '0.5.1'
4
4
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http_router
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 0
10
- version: 0.5.0
9
+ - 1
10
+ version: 0.5.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Joshua Hull
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-06 00:00:00 -08:00
18
+ date: 2011-01-12 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency