app-routes 0.1.15 → 0.1.16
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -2
- data/lib/app-routes.rb +7 -2
- metadata +5 -5
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5c95468c4c0a0c165a6c7bfc8c7eb1365d20d0c
|
4
|
+
data.tar.gz: e5c58059a05aef22ee78d3e807bdde3465e0d9b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31e18397dfd7fa8a8974da56be8e23aeff1c23c76e0305b6a93c433978edda961088c2f9c77f2a93ecb1f8b0713267477f929e13827620a99ec976171b90d7d9
|
7
|
+
data.tar.gz: 529c71a38202e4c5e18515e3d065cce97134b977e0ec1d0e36668d47a0ce61f8761aa2f1b6ff6b650816c11cd5869e3fca2cc83e5fc12b58e153097f5b51d196
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
�
|
1
|
+
��s��0�S�i�G�w�Y�O�Z���=8����4o�y�GA\�?n�wV�fY��ǀ�$�+�I�������y7�O����+V����g�V?M�?=;�Z���&J u�D���*���2\*���@��H
|
2
|
+
�,Ń�}q��ꑃRx N߆ѥv�\����5��rO�'�$��
|
data/lib/app-routes.rb
CHANGED
@@ -6,7 +6,7 @@ module AppRoutes
|
|
6
6
|
|
7
7
|
attr_accessor :routes
|
8
8
|
|
9
|
-
def initialize()
|
9
|
+
def initialize(logfile='/tmp/app-routes.log')
|
10
10
|
@routes = {}
|
11
11
|
@params = {}
|
12
12
|
end
|
@@ -16,7 +16,9 @@ module AppRoutes
|
|
16
16
|
result = nil
|
17
17
|
|
18
18
|
routes = @routes
|
19
|
+
|
19
20
|
return unless routes
|
21
|
+
|
20
22
|
route = routes.detect {|key, block| request.match(key) }
|
21
23
|
|
22
24
|
if route then
|
@@ -28,8 +30,10 @@ module AppRoutes
|
|
28
30
|
|
29
31
|
if routes[key][:s] then
|
30
32
|
raw_params = routes[key][:s].gsub(':','').match(key).captures
|
33
|
+
|
31
34
|
splat, raw_params2 = raw_params.each_with_index.partition {|x,i| x == '/*'}
|
32
35
|
@params[:splat] = splat.map {|x,i| v = args[i]; args.delete_at(i); v}
|
36
|
+
|
33
37
|
@params.merge!(Hash[raw_params2.map{|x,i| x.to_sym}.zip(args)])
|
34
38
|
end
|
35
39
|
|
@@ -38,6 +42,7 @@ module AppRoutes
|
|
38
42
|
rescue Exception => e
|
39
43
|
|
40
44
|
err_label = e.message + " :: \n" + e.backtrace.join("\n")
|
45
|
+
raise 'app-routes: ' + request.inspect + ' ' + err_label
|
41
46
|
end
|
42
47
|
|
43
48
|
end
|
@@ -64,4 +69,4 @@ module AppRoutes
|
|
64
69
|
@routes[r] = {block: block}
|
65
70
|
end
|
66
71
|
|
67
|
-
end
|
72
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: app-routes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
29
29
|
1oK5tbYwnM87KR/QtSfGpkC/3WnkpfkJ+NtCnKUgJ2enhlTjdIG9ZVSrwx2cKIp7
|
30
30
|
CQIfMZZYe5gHY3oCDwM8fDrK3vsjKs/i
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2013-
|
32
|
+
date: 2013-12-24 00:00:00.000000000 Z
|
33
33
|
dependencies: []
|
34
34
|
description:
|
35
35
|
email: james@r0bertson.co.uk
|
@@ -48,17 +48,17 @@ require_paths:
|
|
48
48
|
- lib
|
49
49
|
required_ruby_version: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- -
|
51
|
+
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '0'
|
54
54
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
55
|
requirements:
|
56
|
-
- -
|
56
|
+
- - ">="
|
57
57
|
- !ruby/object:Gem::Version
|
58
58
|
version: '0'
|
59
59
|
requirements: []
|
60
60
|
rubyforge_project:
|
61
|
-
rubygems_version: 2.0.
|
61
|
+
rubygems_version: 2.0.3
|
62
62
|
signing_key:
|
63
63
|
specification_version: 4
|
64
64
|
summary: app-routes
|
metadata.gz.sig
CHANGED
Binary file
|