route66 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.rdoc
CHANGED
@@ -9,12 +9,15 @@ app, it is also much more quickly loaded.
|
|
9
9
|
|
10
10
|
== Installation
|
11
11
|
|
12
|
-
|
12
|
+
Route66 can be found at: https://rubygems.org/gems/route66
|
13
|
+
Just add the following line to your Gemfile:
|
14
|
+
|
13
15
|
gem 'route66'
|
14
|
-
end
|
15
16
|
|
16
17
|
You probably don't want to run it in production, though.
|
17
18
|
|
19
|
+
gem 'route66', :group => :development
|
20
|
+
|
18
21
|
== Use
|
19
22
|
|
20
23
|
Just go to <your-url>/route66. So in a brand new default project:
|
@@ -19,17 +19,15 @@ class Route66Controller < ApplicationController
|
|
19
19
|
Rails.application.routes.routes.routes.each do |r|
|
20
20
|
verb = r.verb.to_s.scan( /\^(\w+)\$/).first
|
21
21
|
verb = verb ? verb.first : ''
|
22
|
+
name = r.name ? r.name : ''
|
22
23
|
new_route = {:precedence => r.precedence,
|
23
24
|
:verb => verb,
|
24
25
|
:controller => r.defaults[:controller],
|
25
26
|
:action => r.defaults[:action],
|
26
27
|
:path => r.path.spec,
|
27
|
-
:name =>
|
28
|
+
:name => name }
|
28
29
|
@routes[r.precedence] = new_route
|
29
30
|
end
|
30
|
-
Rails.application.routes.routes.named_routes.each do |name, route|
|
31
|
-
@routes[route.precedence][:name] = name
|
32
|
-
end
|
33
31
|
end
|
34
32
|
|
35
33
|
end
|
@@ -14,8 +14,10 @@
|
|
14
14
|
|
15
15
|
<td><%= r[:verb] %></td>
|
16
16
|
|
17
|
-
<%
|
18
|
-
<td
|
17
|
+
<% if r[:controller].nil? %>
|
18
|
+
<td></td>
|
19
|
+
<% else %>
|
20
|
+
<td><%= link_to r[:controller].camelize, route66_controller_path(u r[:controller]) %></td>
|
19
21
|
<% end %>
|
20
22
|
<td><%= r[:action] %></td>
|
21
23
|
|
@@ -1,4 +1,7 @@
|
|
1
|
-
<%= link_to "
|
1
|
+
<%= link_to "All", route66_path %>
|
2
|
+
<h1>
|
3
|
+
<%= params[:id].camelize %>
|
4
|
+
</h1>
|
2
5
|
<table class="table table-striped">
|
3
6
|
<tr>
|
4
7
|
<th>precedence</th>
|
@@ -16,7 +19,7 @@
|
|
16
19
|
|
17
20
|
<td><%= r[:verb] %></td>
|
18
21
|
|
19
|
-
<td><%= r[:controller] %></td>
|
22
|
+
<td><%= r[:controller].camelize %></td>
|
20
23
|
<td><%= r[:action] %></td>
|
21
24
|
|
22
25
|
<td><%= r[:path] %></td>
|
data/lib/route66/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: route66
|
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,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '0'
|
46
|
-
description: Displays routes
|
46
|
+
description: Displays routes at <your-app>/route66
|
47
47
|
email:
|
48
48
|
- lance.hampton@gmail.com
|
49
49
|
executables: []
|
@@ -104,7 +104,7 @@ files:
|
|
104
104
|
- test/dummy/public/422.html
|
105
105
|
- test/dummy/db/development.sqlite3
|
106
106
|
- test/dummy/log/development.log
|
107
|
-
homepage:
|
107
|
+
homepage: https://github.com/LanceH/route66
|
108
108
|
licenses: []
|
109
109
|
post_install_message:
|
110
110
|
rdoc_options: []
|
@@ -118,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
118
118
|
version: '0'
|
119
119
|
segments:
|
120
120
|
- 0
|
121
|
-
hash: -
|
121
|
+
hash: -3980582478689202735
|
122
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
123
|
none: false
|
124
124
|
requirements:
|
@@ -127,13 +127,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
127
|
version: '0'
|
128
128
|
segments:
|
129
129
|
- 0
|
130
|
-
hash: -
|
130
|
+
hash: -3980582478689202735
|
131
131
|
requirements: []
|
132
132
|
rubyforge_project:
|
133
133
|
rubygems_version: 1.8.21
|
134
134
|
signing_key:
|
135
135
|
specification_version: 3
|
136
|
-
summary: Displays routes
|
136
|
+
summary: Displays routes at <your-app>/route66
|
137
137
|
test_files:
|
138
138
|
- test/route66_test.rb
|
139
139
|
- test/integration/navigation_test.rb
|