router_simple 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +14 -1
- data/lib/router_simple/version.rb +1 -1
- data/router_simple.gemspec +1 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -18,7 +18,20 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
router = RouterSimple::Router.new
|
22
|
+
router.register('GET', '/', 'Root')
|
23
|
+
router.register('POST', '/member/create', 'Member#create')
|
24
|
+
router.register('GET', '/member/:name', 'Member#detail')
|
25
|
+
router.register('GET', '/download/*path', 'Download#detail')
|
26
|
+
|
27
|
+
router.match('/')
|
28
|
+
# => ('Root', {})
|
29
|
+
|
30
|
+
router.match('/member/dankogai')
|
31
|
+
# => ('Member#detail', {"name" => 'dankogai'})
|
32
|
+
|
33
|
+
router.match('/download/growthforecast')
|
34
|
+
# => ('Download#detail', {"path" => 'growthforecast'})
|
22
35
|
|
23
36
|
## Contributing
|
24
37
|
|
data/router_simple.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: router_simple
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,10 +9,10 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: minitest
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|