spine-routing 0.2.0 → 0.3.0
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
- data/CHANGELOG.md +4 -0
- data/README.md +3 -0
- data/lib/spine/routing.rb +1 -0
- data/lib/spine/routing/parameters.rb +9 -0
- data/lib/spine/routing/route.rb +1 -1
- data/lib/spine/routing/router.rb +3 -2
- data/lib/spine/routing/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4becea9a7a3f05d9ce9bb4e701ef75f5619b0d26
|
4
|
+
data.tar.gz: 0a97bd8d1c089ffff56be59b8b2d15d059b54b73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f093bec4d1ba84766c98451cfb92b34aee7a1e488ff3ab01f73cb17c265bf1f89e8e830e14751e442702ed001401b8794015910635f03b4680b0f3408c1d072f
|
7
|
+
data.tar.gz: 6fa34127dc338c4026b071e2d9335da0172935712162caff35efb521be9ee38c4189c870946200958a15f6a126992fe4f889b125d62d768049b7e55ce66a7dcf
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
data/lib/spine/routing.rb
CHANGED
data/lib/spine/routing/route.rb
CHANGED
data/lib/spine/routing/router.rb
CHANGED
@@ -7,7 +7,7 @@ module Spine
|
|
7
7
|
|
8
8
|
VERB = 'REQUEST_METHOD'.freeze
|
9
9
|
PATH = 'PATH_INFO'.freeze
|
10
|
-
|
10
|
+
PARAMETERS = 'router.parameters'.freeze
|
11
11
|
NOT_FOUND_RESPONSE = [404, {}, ['']].freeze
|
12
12
|
|
13
13
|
|
@@ -44,7 +44,8 @@ module Spine
|
|
44
44
|
verb = env[VERB].downcase.gsub('head', 'get').to_sym
|
45
45
|
route = recognise(verb, env[PATH])
|
46
46
|
if route
|
47
|
-
env[
|
47
|
+
env[PARAMETERS] = Rack::Request.new(env).params
|
48
|
+
env[PARAMETERS].merge!(route.parameters)
|
48
49
|
run(route.app, env)
|
49
50
|
else
|
50
51
|
NOT_FOUND_RESPONSE # TODO: set default app
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spine-routing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TOGGL LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -100,6 +100,7 @@ files:
|
|
100
100
|
- lib/spine/routing/engine/configuration.rb
|
101
101
|
- lib/spine/routing/engine/loader.rb
|
102
102
|
- lib/spine/routing/nested_router.rb
|
103
|
+
- lib/spine/routing/parameters.rb
|
103
104
|
- lib/spine/routing/route.rb
|
104
105
|
- lib/spine/routing/router.rb
|
105
106
|
- lib/spine/routing/syntax/match.rb
|