http_router 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/http_router/path.rb +2 -5
- data/lib/http_router/version.rb +1 -1
- metadata +4 -4
data/lib/http_router/path.rb
CHANGED
@@ -32,7 +32,7 @@ class HttpRouter
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def hashify_params(params)
|
35
|
-
|
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
|
-
|
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
|
data/lib/http_router/version.rb
CHANGED
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:
|
4
|
+
hash: 9
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
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:
|
18
|
+
date: 2011-01-12 00:00:00 -08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|