vain_routes 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. data/.document +5 -5
  2. data/Gemfile +3 -3
  3. data/LICENSE +20 -20
  4. data/README.rdoc +37 -37
  5. data/Rakefile +21 -21
  6. data/VERSION +1 -1
  7. data/app/views/layouts/vain_routes/base.html.erb +29 -29
  8. data/app/views/vain_routes/routes/_route.html.erb +17 -17
  9. data/app/views/vain_routes/routes/index.html.erb +35 -35
  10. data/lib/vain_routes/engine.rb +10 -10
  11. data/public/vain_routes/data_tables/css/demo_page.css +92 -92
  12. data/public/vain_routes/data_tables/css/demo_table.css +538 -538
  13. data/public/vain_routes/data_tables/css/demo_table_jui.css +520 -520
  14. data/public/vain_routes/data_tables/js/jquery.dataTables.js +6862 -6862
  15. data/public/vain_routes/data_tables/js/jquery.dataTables.min.js +143 -143
  16. data/public/vain_routes/data_tables/js/jquery.js +15 -15
  17. data/public/vain_routes/stylesheets/base.css +48 -48
  18. data/public/vain_routes/stylesheets/data_table_jui.css +522 -522
  19. data/public/vain_routes/stylesheets/jui-pepper-grinder/images/ui-bg_diagonal-maze_20_6e4f1c_10x10.png +0 -0
  20. data/public/vain_routes/stylesheets/jui-pepper-grinder/images/ui-bg_diagonal-maze_40_000000_10x10.png +0 -0
  21. data/public/vain_routes/stylesheets/jui-pepper-grinder/images/ui-bg_fine-grain_10_eceadf_60x60.png +0 -0
  22. data/public/vain_routes/stylesheets/jui-pepper-grinder/images/ui-bg_fine-grain_10_f8f7f6_60x60.png +0 -0
  23. data/public/vain_routes/stylesheets/jui-pepper-grinder/images/ui-bg_fine-grain_15_eceadf_60x60.png +0 -0
  24. data/public/vain_routes/stylesheets/jui-pepper-grinder/images/ui-bg_fine-grain_15_f7f3de_60x60.png +0 -0
  25. data/public/vain_routes/stylesheets/jui-pepper-grinder/images/ui-bg_fine-grain_15_ffffff_60x60.png +0 -0
  26. data/public/vain_routes/stylesheets/jui-pepper-grinder/images/ui-bg_fine-grain_65_654b24_60x60.png +0 -0
  27. data/public/vain_routes/stylesheets/jui-pepper-grinder/images/ui-bg_fine-grain_68_b83400_60x60.png +0 -0
  28. data/public/vain_routes/stylesheets/jui-pepper-grinder/images/ui-icons_222222_256x240.png +0 -0
  29. data/public/vain_routes/stylesheets/jui-pepper-grinder/images/ui-icons_3572ac_256x240.png +0 -0
  30. data/public/vain_routes/stylesheets/jui-pepper-grinder/images/ui-icons_8c291d_256x240.png +0 -0
  31. data/public/vain_routes/stylesheets/jui-pepper-grinder/images/ui-icons_b83400_256x240.png +0 -0
  32. data/public/vain_routes/stylesheets/jui-pepper-grinder/images/ui-icons_fbdb93_256x240.png +0 -0
  33. data/public/vain_routes/stylesheets/jui-pepper-grinder/images/ui-icons_ffffff_256x240.png +0 -0
  34. data/public/vain_routes/stylesheets/jui-pepper-grinder/jquery-ui-1.8.11.custom.css +572 -572
  35. data/spec/spec.opts +1 -1
  36. data/spec/spec_helper.rb +9 -9
  37. data/spec/vain_routes_spec.rb +7 -7
  38. data/vain_routes.gemspec +122 -126
  39. metadata +35 -31
data/.document CHANGED
@@ -1,5 +1,5 @@
1
- README.rdoc
2
- lib/**/*.rb
3
- bin/*
4
- features/**/*.feature
5
- LICENSE
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
2
-
3
- gem "rails", ">=3.0"
1
+ source "http://rubygems.org"
2
+
3
+ gem "rails", ">=3.0"
4
4
  #gem "jeweler"
data/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License
2
-
3
- Copyright (c) 2010 Ryan D. Stawarz
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1
+ The MIT License
2
+
3
+ Copyright (c) 2010 Ryan D. Stawarz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
21
  THE SOFTWARE.
@@ -1,37 +1,37 @@
1
- = vain_routes
2
-
3
- You didn't invest all that time into creating your beautiful restful routes only to have them displayed in a
4
- console window, did you?
5
-
6
- Introducing 'Vain Routes' - a rails engine that enables you to view your routes directly from your browser, sort them, and even filter them! While the command line may helpful, it isn't as pretty as this!
7
-
8
- http://github.com/rstawarz/vain_routes/raw/master/doc/screenshot.png
9
-
10
- =Install
11
- Simply install the gem:
12
- gem install 'vain_routes'
13
-
14
- =Configure
15
- Add vain_routes to your Gemfile:
16
- group :development do
17
- gem 'vain_routes'
18
- end
19
- =Fire it up!
20
- From the command line, fire up your server
21
- rails server
22
- And open your browser to:
23
- http://localhost:3000/vain/routes
24
-
25
-
26
- == Feeback & Requests
27
-
28
- Please give it a try, and let me know if you have any requests on how I can make those routes look even better!
29
-
30
- If you like it (or not), please shoot me a note via email (ryan at stawarz dot com) or twitter (@rstawarz[http://www.twitter.com/rstawarz]).
31
-
32
- == Thanks
33
- Special thanks to {Matt Hamm}[http://www.flickr.com/photos/matthamm/2690294056/in/photostream/] for sharing the background image on flickr.
34
-
35
- == Copyright
36
-
37
- Copyright (c) 2010 Ryan Stawarz. It is free software governed by the MIT License - see the terms specified in the LICENSE file for details.
1
+ = vain_routes
2
+
3
+ You didn't invest all that time into creating your beautiful restful routes only to have them displayed in a
4
+ console window, did you?
5
+
6
+ Introducing 'Vain Routes' - a rails engine that enables you to view your routes directly from your browser, sort them, and even filter them! While the command line may helpful, it isn't as pretty as this!
7
+
8
+ http://github.com/rstawarz/vain_routes/raw/master/doc/screenshot.png
9
+
10
+ =Install
11
+ Simply install the gem:
12
+ gem install 'vain_routes'
13
+
14
+ =Configure
15
+ Add vain_routes to your Gemfile:
16
+ group :development do
17
+ gem 'vain_routes'
18
+ end
19
+ =Fire it up!
20
+ From the command line, fire up your server
21
+ rails server
22
+ And open your browser to:
23
+ http://localhost:3000/vain/routes
24
+
25
+
26
+ == Feeback & Requests
27
+
28
+ Please give it a try, and let me know if you have any requests on how I can make those routes look even better!
29
+
30
+ If you like it (or not), please shoot me a note via email (ryan at stawarz dot com) or twitter (@rstawarz[http://www.twitter.com/rstawarz]).
31
+
32
+ == Thanks
33
+ Special thanks to {Matt Hamm}[http://www.flickr.com/photos/matthamm/2690294056/in/photostream/] for sharing the background image on flickr.
34
+
35
+ == Copyright
36
+
37
+ Copyright (c) 2010 Ryan Stawarz. It is free software governed by the MIT License - see the terms specified in the LICENSE file for details.
data/Rakefile CHANGED
@@ -1,21 +1,21 @@
1
- require 'rubygems'
2
- require 'rake'
3
-
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "vain_routes"
8
- gem.summary = %Q{Vain Routes enables you to view your routes from a web page.}
9
- gem.description = %Q{Vain routes is a Rails engine that enables you to view your routes in a filterable online view.}
10
- gem.email = "ryan at stawarz dot com"
11
- gem.homepage = "http://github.com/rstawarz/vain_routes"
12
- gem.authors = ["Ryan Stawarz"]
13
- #gem.add_development_dependency "rspec", ">= 1.2.9"
14
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
15
- end
16
- Jeweler::GemcutterTasks.new
17
- rescue LoadError
18
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
19
- end
20
-
21
- #require 'spec/rake/spectask'
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "vain_routes"
8
+ gem.summary = %Q{Vain Routes enables you to view your routes from a web page.}
9
+ gem.description = %Q{Vain routes is a Rails engine that enables you to view your routes in a filterable online view.}
10
+ gem.email = "ryan at stawarz dot com"
11
+ gem.homepage = "http://github.com/rstawarz/vain_routes"
12
+ gem.authors = ["Ryan Stawarz"]
13
+ #gem.add_development_dependency "rspec", ">= 1.2.9"
14
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
15
+ end
16
+ Jeweler::GemcutterTasks.new
17
+ rescue LoadError
18
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
19
+ end
20
+
21
+ #require 'spec/rake/spectask'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.0.2
@@ -1,29 +1,29 @@
1
- <!DOCTYPE HTML>
2
- <html>
3
- <head>
4
- <title>Vain Routes</title>
5
- <link rel="stylesheet" href="/vain_routes/stylesheets/jui-redmond/jquery-ui-1.8.11.custom.css" type="text/css" media="screen" title="no title" charset="utf-8">
6
-
7
- <%= stylesheet_link_tag '/vain_routes/stylesheets/base.css', '/vain_routes/stylesheets/data_table_jui' %>
8
-
9
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
10
- <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js"></script>
11
- <script type="text/javascript" language="javascript" src="/vain_routes/data_tables/js/jquery.dataTables.js"></script>
12
-
13
- <%= csrf_meta_tag %>
14
- </head>
15
- <body>
16
- <div class="main-content">
17
- <div class="header"></div>
18
- <div class="content">
19
- <% [:error, :warning, :notice].each do |sym| %>
20
- <% if flash[sym] %>
21
- <p class="flash <%=sym.to_s%>"><%= flash[sym] %></p>
22
- <% end %>
23
- <% end %>
24
- <%= yield %>
25
- </div>
26
- <div class="footer"></div>
27
- </div>
28
- </body>
29
- </html>
1
+ <!DOCTYPE HTML>
2
+ <html>
3
+ <head>
4
+ <title>Vain Routes</title>
5
+ <link rel="stylesheet" href="/vain_routes/stylesheets/jui-redmond/jquery-ui-1.8.11.custom.css" type="text/css" media="screen" title="no title" charset="utf-8">
6
+
7
+ <%= stylesheet_link_tag '/vain_routes/stylesheets/base.css', '/vain_routes/stylesheets/data_table_jui' %>
8
+
9
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
10
+ <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js"></script>
11
+ <script type="text/javascript" language="javascript" src="/vain_routes/data_tables/js/jquery.dataTables.js"></script>
12
+
13
+ <%= csrf_meta_tag %>
14
+ </head>
15
+ <body>
16
+ <div class="main-content">
17
+ <div class="header"></div>
18
+ <div class="content">
19
+ <% [:error, :warning, :notice].each do |sym| %>
20
+ <% if flash[sym] %>
21
+ <p class="flash <%=sym.to_s%>"><%= flash[sym] %></p>
22
+ <% end %>
23
+ <% end %>
24
+ <%= yield %>
25
+ </div>
26
+ <div class="footer"></div>
27
+ </div>
28
+ </body>
29
+ </html>
@@ -1,18 +1,18 @@
1
- <tr class="<%=cycle('route-odd', 'route-even')%> <%=route.verb%> ">
2
- <td><%=route_counter+1%></td>
3
- <td><%= (route.verb || :any).to_s.upcase%></td>
4
- <td class="wrapword"><%= route.path %></td>
5
- <td class="wrapword">
6
- <%=route.requirements[:controller]%>
7
- </td>
8
- <td class="wrapword">
9
- <%=route.requirements[:action]%>
10
- </td>
11
- <!--
12
- <ul>
13
- <li>Controller: <%=route.requirements[:controller]%></li>
14
- <li>Action: <%=route.requirements[:action]%></li>
15
- </ul>
16
- <%= route.requirements.inspect %>,<%= route.conditions.inspect %>
17
- -->
1
+ <tr class="<%=cycle('route-odd', 'route-even')%> <%=route.verb%> ">
2
+ <td><%=route_counter+1%></td>
3
+ <td><%= (route.verb || :any).to_s.upcase%></td>
4
+ <td class="wrapword"><%= route.path %></td>
5
+ <td class="wrapword">
6
+ <%=route.requirements[:controller]%>
7
+ </td>
8
+ <td class="wrapword">
9
+ <%=route.requirements[:action]%>
10
+ </td>
11
+ <!--
12
+ <ul>
13
+ <li>Controller: <%=route.requirements[:controller]%></li>
14
+ <li>Action: <%=route.requirements[:action]%></li>
15
+ </ul>
16
+ <%= route.requirements.inspect %>,<%= route.conditions.inspect %>
17
+ -->
18
18
  </tr>
@@ -1,36 +1,36 @@
1
-
2
- <script type="text/javascript" charset="utf-8">
3
- $(document).ready(function() {
4
- $('#vainroutes').dataTable({
5
- "bPaginate": false,
6
- "bLengthChange": false,
7
- "bFilter": true,
8
- "bJQueryUI": true,
9
- "bSort": true,
10
- "bInfo": false,
11
- "bAutoWidth": false });
12
- } );
13
- </script>
14
- <div class="routes">
15
- <table id="vainroutes" class="display">
16
- <colgroup>
17
- <col class="order"/>
18
- <col class="verb"/>
19
- <col class="path"/>
20
- <col class="controller"/>
21
- <col class="action"/>
22
- </colgroup>
23
- <thead>
24
- <tr>
25
- <th >Order</th>
26
- <th>Verb</th>
27
- <th>Path</th>
28
- <th>Controller</th>
29
- <th>Action</th>
30
- </tr>
31
- </thead>
32
- <tbody>
33
- <%= render :partial => "route", :collection => @routes %>
34
- </tbody>
35
- </table>
1
+
2
+ <script type="text/javascript" charset="utf-8">
3
+ $(document).ready(function() {
4
+ $('#vainroutes').dataTable({
5
+ "bPaginate": false,
6
+ "bLengthChange": false,
7
+ "bFilter": true,
8
+ "bJQueryUI": true,
9
+ "bSort": true,
10
+ "bInfo": false,
11
+ "bAutoWidth": false });
12
+ } );
13
+ </script>
14
+ <div class="routes">
15
+ <table id="vainroutes" class="display">
16
+ <colgroup>
17
+ <col class="order"/>
18
+ <col class="verb"/>
19
+ <col class="path"/>
20
+ <col class="controller"/>
21
+ <col class="action"/>
22
+ </colgroup>
23
+ <thead>
24
+ <tr>
25
+ <th >Order</th>
26
+ <th>Verb</th>
27
+ <th>Path</th>
28
+ <th>Controller</th>
29
+ <th>Action</th>
30
+ </tr>
31
+ </thead>
32
+ <tbody>
33
+ <%= render :partial => "route", :collection => @routes %>
34
+ </tbody>
35
+ </table>
36
36
  </div>
@@ -1,11 +1,11 @@
1
- #require "vain_routes"
2
- #require "rails"
3
-
4
- module VainRoutes
5
- class Engine < Rails::Engine
6
- initializer "static assets" do |app|
7
- app.middleware.use ::ActionDispatch::Static, "#{root}/public"
8
- #app.middleware.insert_before(::ActionDispatch::Static, ::ActionDispatch::Static, "#{root}/public")
9
- end
10
- end
1
+ #require "vain_routes"
2
+ #require "rails"
3
+
4
+ module VainRoutes
5
+ class Engine < Rails::Engine
6
+ initializer "static assets" do |app|
7
+ app.middleware.use ::ActionDispatch::Static, "#{root}/public"
8
+ #app.middleware.insert_before(::ActionDispatch::Static, ::ActionDispatch::Static, "#{root}/public")
9
+ end
10
+ end
11
11
  end
@@ -1,93 +1,93 @@
1
-
2
- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3
- * General page setup
4
- */
5
- #dt_example {
6
- font: 80%/1.45em "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
7
- margin: 0;
8
- padding: 0;
9
- color: #333;
10
- background-color: #fff;
11
- }
12
-
13
-
14
- #dt_example #container {
15
- width: 800px;
16
- margin: 30px auto;
17
- padding: 0;
18
- }
19
-
20
-
21
- #dt_example #footer {
22
- margin: 50px auto 0 auto;
23
- padding: 0;
24
- }
25
-
26
- #dt_example #demo {
27
- margin: 30px auto 0 auto;
28
- }
29
-
30
- #dt_example .demo_jui {
31
- margin: 30px auto 0 auto;
32
- }
33
-
34
- #dt_example .big {
35
- font-size: 1.3em;
36
- font-weight: bold;
37
- line-height: 1.6em;
38
- color: #4E6CA3;
39
- }
40
-
41
- #dt_example .spacer {
42
- height: 20px;
43
- clear: both;
44
- }
45
-
46
- #dt_example .clear {
47
- clear: both;
48
- }
49
-
50
- #dt_example pre {
51
- padding: 15px;
52
- background-color: #F5F5F5;
53
- border: 1px solid #CCCCCC;
54
- }
55
-
56
- #dt_example h1 {
57
- margin-top: 2em;
58
- font-size: 1.3em;
59
- font-weight: normal;
60
- line-height: 1.6em;
61
- color: #4E6CA3;
62
- border-bottom: 1px solid #B0BED9;
63
- clear: both;
64
- }
65
-
66
- #dt_example h2 {
67
- font-size: 1.2em;
68
- font-weight: normal;
69
- line-height: 1.6em;
70
- color: #4E6CA3;
71
- clear: both;
72
- }
73
-
74
- #dt_example a {
75
- color: #0063DC;
76
- text-decoration: none;
77
- }
78
-
79
- #dt_example a:hover {
80
- text-decoration: underline;
81
- }
82
-
83
- #dt_example ul {
84
- color: #4E6CA3;
85
- }
86
-
87
- .css_right {
88
- float: right;
89
- }
90
-
91
- .css_left {
92
- float: left;
1
+
2
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3
+ * General page setup
4
+ */
5
+ #dt_example {
6
+ font: 80%/1.45em "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
7
+ margin: 0;
8
+ padding: 0;
9
+ color: #333;
10
+ background-color: #fff;
11
+ }
12
+
13
+
14
+ #dt_example #container {
15
+ width: 800px;
16
+ margin: 30px auto;
17
+ padding: 0;
18
+ }
19
+
20
+
21
+ #dt_example #footer {
22
+ margin: 50px auto 0 auto;
23
+ padding: 0;
24
+ }
25
+
26
+ #dt_example #demo {
27
+ margin: 30px auto 0 auto;
28
+ }
29
+
30
+ #dt_example .demo_jui {
31
+ margin: 30px auto 0 auto;
32
+ }
33
+
34
+ #dt_example .big {
35
+ font-size: 1.3em;
36
+ font-weight: bold;
37
+ line-height: 1.6em;
38
+ color: #4E6CA3;
39
+ }
40
+
41
+ #dt_example .spacer {
42
+ height: 20px;
43
+ clear: both;
44
+ }
45
+
46
+ #dt_example .clear {
47
+ clear: both;
48
+ }
49
+
50
+ #dt_example pre {
51
+ padding: 15px;
52
+ background-color: #F5F5F5;
53
+ border: 1px solid #CCCCCC;
54
+ }
55
+
56
+ #dt_example h1 {
57
+ margin-top: 2em;
58
+ font-size: 1.3em;
59
+ font-weight: normal;
60
+ line-height: 1.6em;
61
+ color: #4E6CA3;
62
+ border-bottom: 1px solid #B0BED9;
63
+ clear: both;
64
+ }
65
+
66
+ #dt_example h2 {
67
+ font-size: 1.2em;
68
+ font-weight: normal;
69
+ line-height: 1.6em;
70
+ color: #4E6CA3;
71
+ clear: both;
72
+ }
73
+
74
+ #dt_example a {
75
+ color: #0063DC;
76
+ text-decoration: none;
77
+ }
78
+
79
+ #dt_example a:hover {
80
+ text-decoration: underline;
81
+ }
82
+
83
+ #dt_example ul {
84
+ color: #4E6CA3;
85
+ }
86
+
87
+ .css_right {
88
+ float: right;
89
+ }
90
+
91
+ .css_left {
92
+ float: left;
93
93
  }