tuttle 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +22 -0
  4. data/Rakefile +37 -0
  5. data/app/assets/javascripts/tuttle/application.js +12 -0
  6. data/app/assets/stylesheets/scaffold.css +56 -0
  7. data/app/assets/stylesheets/tuttle/application.css +71 -0
  8. data/app/controllers/tuttle/application_controller.rb +20 -0
  9. data/app/controllers/tuttle/cancancan_controller.rb +29 -0
  10. data/app/controllers/tuttle/devise_controller.rb +12 -0
  11. data/app/controllers/tuttle/home_controller.rb +14 -0
  12. data/app/controllers/tuttle/rails_controller.rb +52 -0
  13. data/app/controllers/tuttle/ruby_controller.rb +10 -0
  14. data/app/helpers/tuttle/application_helper.rb +4 -0
  15. data/app/views/layouts/tuttle/application.html.erb +68 -0
  16. data/app/views/tuttle/cancancan/_rule_table.html.erb +31 -0
  17. data/app/views/tuttle/cancancan/index.html.erb +45 -0
  18. data/app/views/tuttle/cancancan/rule_tester.html.erb +68 -0
  19. data/app/views/tuttle/devise/index.html.erb +84 -0
  20. data/app/views/tuttle/home/index.html.erb +74 -0
  21. data/app/views/tuttle/rails/assets.html.erb +44 -0
  22. data/app/views/tuttle/rails/controllers.html.erb +10 -0
  23. data/app/views/tuttle/rails/database.html.erb +46 -0
  24. data/app/views/tuttle/rails/helpers.html.erb +35 -0
  25. data/app/views/tuttle/rails/index.html.erb +235 -0
  26. data/app/views/tuttle/rails/instrumentation.html.erb +22 -0
  27. data/app/views/tuttle/rails/models.html.erb +61 -0
  28. data/app/views/tuttle/rails/routes.html.erb +37 -0
  29. data/app/views/tuttle/ruby/index.html.erb +83 -0
  30. data/config/routes.rb +21 -0
  31. data/lib/tasks/tuttle_tasks.rake +4 -0
  32. data/lib/tuttle.rb +4 -0
  33. data/lib/tuttle/engine.rb +39 -0
  34. data/lib/tuttle/version.rb +3 -0
  35. data/test/controllers/tuttle/cancancan_controller_test.rb +60 -0
  36. data/test/controllers/tuttle/devise_controller_test.rb +12 -0
  37. data/test/controllers/tuttle/home_controller_test.rb +13 -0
  38. data/test/controllers/tuttle/rails_controller_test.rb +56 -0
  39. data/test/controllers/tuttle/ruby_controller_test.rb +12 -0
  40. data/test/dummy/Gemfile.lock +142 -0
  41. data/test/dummy/README.rdoc +261 -0
  42. data/test/dummy/Rakefile +7 -0
  43. data/test/dummy/app/assets/javascripts/application.js +15 -0
  44. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  45. data/test/dummy/app/controllers/application_controller.rb +3 -0
  46. data/test/dummy/app/helpers/application_helper.rb +2 -0
  47. data/test/dummy/app/models/ability.rb +7 -0
  48. data/test/dummy/app/models/user.rb +6 -0
  49. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  50. data/test/dummy/config.ru +4 -0
  51. data/test/dummy/config/application.rb +52 -0
  52. data/test/dummy/config/boot.rb +11 -0
  53. data/test/dummy/config/database.yml +25 -0
  54. data/test/dummy/config/environment.rb +5 -0
  55. data/test/dummy/config/environments/development.rb +30 -0
  56. data/test/dummy/config/environments/test.rb +38 -0
  57. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  58. data/test/dummy/config/initializers/devise.rb +257 -0
  59. data/test/dummy/config/initializers/inflections.rb +15 -0
  60. data/test/dummy/config/initializers/mime_types.rb +5 -0
  61. data/test/dummy/config/initializers/secret_token.rb +7 -0
  62. data/test/dummy/config/initializers/session_store.rb +8 -0
  63. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  64. data/test/dummy/config/locales/en.yml +5 -0
  65. data/test/dummy/config/routes.rb +6 -0
  66. data/test/dummy/db/migrate/20141229204528_devise_create_users.rb +42 -0
  67. data/test/dummy/db/schema.rb +34 -0
  68. data/test/dummy/public/404.html +26 -0
  69. data/test/dummy/public/422.html +26 -0
  70. data/test/dummy/public/500.html +25 -0
  71. data/test/dummy/public/favicon.ico +0 -0
  72. data/test/dummy/script/rails +6 -0
  73. data/test/dummy/test/fixtures/users.yml +6 -0
  74. data/test/dummy/test/models/user_test.rb +7 -0
  75. data/test/dummy/tmp/cache/assets/test/sprockets/00091e0cb6df543a8e704290f4dec8db +0 -0
  76. data/test/dummy/tmp/cache/assets/test/sprockets/11599cd5b5d6a0a58a5e98c0902e1997 +0 -0
  77. data/test/dummy/tmp/cache/assets/test/sprockets/9b2e26c1e54d4ff5ae04270e8f03907f +0 -0
  78. data/test/dummy/tmp/cache/assets/test/sprockets/a65793481a75afa9f660d1032ee66ef5 +0 -0
  79. data/test/dummy/tmp/cache/assets/test/sprockets/d9450766086a9f3f994e8c4a2273bfaa +0 -0
  80. data/test/dummy/tmp/cache/assets/test/sprockets/e117b0425a7b9daef8a213c1a2203f00 +0 -0
  81. data/test/integration/navigation_test.rb +9 -0
  82. data/test/test_helper.rb +37 -0
  83. data/test/tuttle_test.rb +7 -0
  84. data/test/unit/tuttle/note_test.rb +9 -0
  85. metadata +219 -0
@@ -0,0 +1,235 @@
1
+ <h1>Rails Overview</h1>
2
+
3
+ <pre>
4
+ Rails Version = <%= Rails::VERSION::STRING %>
5
+ Environment = <%= Rails.env %>
6
+ Root = <%= Rails.root %>
7
+ Timezone = <%= Rails.configuration.time_zone %>
8
+ Log Level = <%= Rails.configuration.log_level %>
9
+ </pre>
10
+
11
+ <ul class="nav nav-tabs" role="tablist">
12
+ <li class="active"><a href="#config" role="tab" data-toggle="tab">Configuration</a></li>
13
+ <li><a href="#application" role="tab" data-toggle="tab">Application</a></li>
14
+ <li><a href="#initializers" role="tab" data-toggle="tab">Initializers</a></li>
15
+ <li><a href="#middleware" role="tab" data-toggle="tab">Middleware</a></li>
16
+ <li><a href="#railties" role="tab" data-toggle="tab">Railties</a></li>
17
+ <li><a href="#engines" role="tab" data-toggle="tab">Engines</a></li>
18
+ <li><a href="#generators" role="tab" data-toggle="tab">Generators</a></li>
19
+ <li><a href="#timedate" role="tab" data-toggle="tab">Time and Date Formats</a></li>
20
+ </ul>
21
+
22
+ <div class="tab-content">
23
+ <div class="tab-pane active" id="config">
24
+ <p>
25
+ Rails configuration is managed through the applications's config/application.rb, an environment-specific configuration file, and initializers from the config/initializers directory.
26
+ </p>
27
+ <p>
28
+ The combined results of these configurations are shown here:
29
+ </p>
30
+ <table class="table table-condensed">
31
+ <tr>
32
+ <th>Setting</th>
33
+ <th>Value</th>
34
+ <th>Description</th>
35
+ </tr>
36
+ <tr>
37
+ <td>config.asset_host</td>
38
+ <td><%= Rails.configuration.asset_host %></td>
39
+ <td>
40
+ Sets the host for the assets. Useful when CDNs are used for hosting assets, or when you want to work around the concurrency constraints built-in in browsers using different domain aliases. Shorter version of config.action_controller.asset_host.
41
+ </td>
42
+ </tr>
43
+ <tr>
44
+ <td>config.beginning_of_week</td>
45
+ <td><%= Rails.configuration.beginning_of_week %></td>
46
+ <td>
47
+ Sets the default beginning of week for the application. Accepts a valid week day symbol (e.g. :monday).
48
+ </td>
49
+ </tr>
50
+ </table>
51
+
52
+ <div class="panel panel-warning">
53
+ <div class="panel-heading">
54
+ <h4 class="panel-title" data-toggle="collapse" data-target="#rails_config_instances">Instance Variables</h4>
55
+ </div>
56
+ <div id="rails_config_instances" class="panel-body collapse">
57
+ <dl class="dl-horizontal">
58
+ <%- Rails.configuration.instance_variables.sort.each do |symbol| %>
59
+ <dt><%= symbol %></dt>
60
+ <dd><samp><%= Rails.configuration.instance_variable_get(symbol) %></samp></dd>
61
+ <%- end %>
62
+ </dl>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ <div class="tab-pane" id="application">
67
+ <p>
68
+ The fully-configured Rails Application object manages class loading and request routing.
69
+ </p>
70
+ <%- all_autoload_paths = Rails.application.instance_variable_get('@_all_autoload_paths') -%>
71
+ <%- all_load_paths = Rails.application.instance_variable_get('@_all_load_paths') -%>
72
+ <h3>Load Paths</h3>
73
+ <ol class="list-unstyled">
74
+ <% all_load_paths.each do |path| %>
75
+ <li><%= path %><%= ' *' unless all_autoload_paths.include?(path) %></li>
76
+ <% end %>
77
+ </ol>
78
+ <p>Paths marked with '*' are not autoload paths</p>
79
+ <div class="panel panel-warning">
80
+ <div class="panel-heading">
81
+ <h4 class="panel-title" data-toggle="collapse" data-target="#rails_app_instances">Instance Variables</h4>
82
+ </div>
83
+ <div id="rails_app_instances" class="panel-body collapse">
84
+ <dl class="dl-horizontal">
85
+ <%- Rails.application.instance_variables.sort.each do |symbol| %>
86
+ <dt><%= symbol %></dt>
87
+ <dd><samp><%= Rails.application.instance_variable_get(symbol).class.name %></samp></dd>
88
+ <%- end %>
89
+ </dl>
90
+ </div>
91
+ </div>
92
+ </div>
93
+ <div class="tab-pane" id="initializers">
94
+ <p>Rails initializers are blocks of code that run during application initialization.</p>
95
+ <p>Initializers can be provided by any Railtie, which includes Rails components themselves as well as many Gems.</p>
96
+ <ol>
97
+ <%- Rails.application.initializers.each do |initializer| %>
98
+ <li><%= initializer.name %> - <%= initializer.instance_variable_get('@context').class.name %></li>
99
+ <%- end %>
100
+ </ol>
101
+ </div>
102
+ <div class="tab-pane" id="middleware">
103
+ <p>The Rack middleware configuration shows the modules in the Rack stack that will process the request and response.</p>
104
+ <ol>
105
+ <%- Rails.application.middleware.each do |middleware| %>
106
+ <li><%= middleware.name %></li>
107
+ <%- end %>
108
+ </ol>
109
+ </div>
110
+ <div class="tab-pane" id="railties">
111
+ <p>
112
+ Railties are components of the Rails framework or any other component that needs to interact directly with the framework.
113
+ </p>
114
+ <p>
115
+ The configuration order of the Railties can be specified if necessary.
116
+ </p>
117
+ <p>
118
+ Rails configuration.railties_order = <%= Rails.configuration.railties_order %>
119
+ </p>
120
+ <ol>
121
+ <%- # TODO: protected methods `ordered_railties` changed to return an array of arrays between rails 4.1.5 and 4.1.8. investigate and replace. -%>
122
+ <%- ordered_railties = Rails.application.send(:ordered_railties) -%>
123
+ <%- ordered_railties = ordered_railties[0] if ordered_railties.is_a?(Array) -%>
124
+ <%- ordered_railties.each do |railtie| %>
125
+ <li><%= railtie.railtie_name %> - <%= railtie.class.name %></li>
126
+ <%- end %>
127
+ </ol>
128
+ </div>
129
+ <div class="tab-pane" id="engines">
130
+ <p>
131
+ Rails Engines are mini-applications that provide functionality to the host application.
132
+ An Engine is like a plugin module that can expose controllers, assets, rake tasks, etc.
133
+ </p>
134
+ <ol>
135
+ <%- ::Rails::Engine.descendants.sort_by(&:name).each do |engine_class| %>
136
+ <%- next if engine_class.abstract_railtie? -%>
137
+ <%- engine = engine_class.instance %>
138
+ <li><%= engine.engine_name %> - <%= engine_class.name %> <%= engine_class.called_from %> <%= '<b>ISOLATED</b>'.html_safe if engine_class.isolated? %> </li>
139
+ <%- end %>
140
+ </ol>
141
+ </div>
142
+ <div class="tab-pane" id="timedate">
143
+ <p>
144
+ Rails date and time formats are usually configured in a config/initializers/date_formats.rb file.
145
+ </p>
146
+ <p>
147
+ Here are the formats that have been configured for this application (including Rails' default formats).
148
+ </p>
149
+ <% # http://www.foragoodstrftime.com/ %>
150
+ <%- today, now = Date.today, Time.now %>
151
+ <h3>Date Formats</h3>
152
+ <table class="table table-condensed">
153
+ <tr>
154
+ <th>Format</th>
155
+ <th>Example</th>
156
+ <th>Formatter</th>
157
+ </tr>
158
+ <tr>
159
+ <td><i>default</i></td>
160
+ <td><%= today.to_s %></td>
161
+ <td></td>
162
+ </tr>
163
+ <%- Date::DATE_FORMATS.sort.each do |format,formatter| %>
164
+ <tr>
165
+ <td>:<%= format %></td>
166
+ <td><%= today.to_s(format) %></td>
167
+ <td><%= formatter.respond_to?(:call) ? 'Dynamic Proc' : formatter %></td>
168
+ </tr>
169
+ <%- end %>
170
+ </table>
171
+ <h3>Time Formats</h3>
172
+ <table class="table table-condensed">
173
+ <tr>
174
+ <th>Format</th>
175
+ <th>Example</th>
176
+ <th>Formatter</th>
177
+ </tr>
178
+ <tr>
179
+ <td><i>default</i></td>
180
+ <td><%= now.to_s %></td>
181
+ <td></td>
182
+ </tr>
183
+ <%- Time::DATE_FORMATS.sort.each do |format,formatter| %>
184
+ <tr>
185
+ <td>:<%= format %></td>
186
+ <td><%= today.to_s(format) %></td>
187
+ <td><%= formatter.respond_to?(:call) ? 'Dynamic Proc' : formatter %></td>
188
+ </tr>
189
+ <%- end %>
190
+ </table>
191
+ </div>
192
+ <div class="tab-pane" id="generators">
193
+ <p>Rails Generators are helpers for quickly creating new code that follows Rails standards and best practices.</p>
194
+ <p>Rails itself provides many generators as do other gems.</p>
195
+ <p>You can configure Rails Generators to generate files based on your project's preferences.</p>
196
+ <h2>Configuration Settings</h2>
197
+ <dl>
198
+ <dt>assets = <%= Rails::Generators.options[:rails][:assets] %></dt>
199
+ <dd>allows to create assets on generating a scaffold. Defaults to true.</dd>
200
+ <dt>force_plural = <%= Rails::Generators.options[:rails][:force_plural] %></dt>
201
+ <dd>allows pluralized model names. Defaults to false.</dd>
202
+ <dt>helper = <%= Rails::Generators.options[:rails][:helper] %></dt>
203
+ <dd>defines whether or not to generate helpers. Defaults to true.</dd>
204
+ <dt>integration_tool = <%= Rails::Generators.options[:rails][:integration_tool] %></dt>
205
+ <dd>defines which integration tool to use. Defaults to nil.</dd>
206
+ <dt>javascripts = <%= Rails::Generators.options[:rails][:javascripts] %></dt>
207
+ <dd>turns on the hook for JavaScript files in generators. Used in Rails for when the scaffold generator is run. Defaults to true.</dd>
208
+ <dt>javascript_engine = <%= Rails::Generators.options[:rails][:javascript_engine] %></dt>
209
+ <dd>configures the engine to be used (for eg. coffee) when generating assets. Defaults to nil.</dd>
210
+
211
+ <dt>orm = <%= Rails::Generators.options[:rails][:orm] %></dt>
212
+ <dd>defines which orm to use. Defaults to false and will use Active Record by default.</dd>
213
+ <dt>resource_controller = <%= Rails::Generators.options[:rails][:resource_controller] %></dt>
214
+ <dd>defines which generator to use for generating a controller when using rails generate resource. Defaults to :controller.</dd>
215
+ <dt>scaffold_controller = <%= Rails::Generators.options[:rails][:scaffold_controller] %></dt>
216
+ <dd>different from resource_controller, defines which generator to use for generating a scaffolded controller when using rails generate scaffold. Defaults to :scaffold_controller.</dd>
217
+ <dt>stylesheets = <%= Rails::Generators.options[:rails][:stylesheets] %></dt>
218
+ <dd>turns on the hook for stylesheets in generators. Used in Rails for when the scaffold generator is run, but this hook can be used in other generates as well. Defaults to true.</dd>
219
+ <dt>stylesheet_engine = <%= Rails::Generators.options[:rails][:stylesheet_engine] %></dt>
220
+ <dd>configures the stylesheet engine (for eg. sass) to be used when generating assets. Defaults to :css.</dd>
221
+ <dt>test_framework = <%= Rails::Generators.options[:rails][:test_framework] %></dt>
222
+ <dd>defines which test framework to use. Defaults to false and will use Test::Unit by default.</dd>
223
+ <dt>template_engine = <%= Rails::Generators.options[:rails][:template_engine] %></dt>
224
+ <dd>defines which template engine to use, such as ERB or Haml. Defaults to :erb.</dd>
225
+ </dl>
226
+ <h2>Generators</h2>
227
+ <ul>
228
+ <% Rails::Generators.subclasses.each do |generator| %>
229
+ <li><%= generator.namespace %>
230
+ <pre><%= generator.desc %></pre>
231
+ </li>
232
+ <% end %>
233
+ </ul>
234
+ </div>
235
+ </div>
@@ -0,0 +1,22 @@
1
+ <h1>Instrumentation</h1>
2
+
3
+ <p>Events (<%= @events.size %>)</p>
4
+
5
+ <table class="table">
6
+ <tr>
7
+ <th>Name</th>
8
+ <th>Time</th>
9
+ <th>Duration</th>
10
+ <th>Payload</th>
11
+ <th>TransactionID</th>
12
+ </tr>
13
+ <% @events.reverse.each do |event| -%>
14
+ <tr>
15
+ <td><%= event.name %></td>
16
+ <td><%= event.time.to_s(:db) %></td>
17
+ <td><%= number_with_precision(event.duration) %></td>
18
+ <td><%= truncate(event.payload.to_s, length: 250) %></td>
19
+ <td><%= event.transaction_id %></td>
20
+ </tr>
21
+ <% end -%>
22
+ </table>
@@ -0,0 +1,61 @@
1
+ <h2>Models (<%= @models.size %>)</h2>
2
+
3
+ <% if (0 == @models.size) %>
4
+ No models were found in this application
5
+ <% end %>
6
+
7
+ <table class="table table-compact">
8
+ <tr>
9
+ <th>&nbsp;</th>
10
+ <th>Name</th>
11
+ <th>Type</th>
12
+ <th>Default</th>
13
+ <th>Null</th>
14
+ <th>Limit</th>
15
+ <th>SQL Type</th>
16
+ <th>Precision</th>
17
+ <th>Scale</th>
18
+ </tr>
19
+ <% @models.each do |model| %>
20
+ <% next if model.abstract_class? %>
21
+ <tr>
22
+ <th colspan="9"><%= model.name %> (<%= model.table_name %>)</th>
23
+ </tr>
24
+ <% model.columns.each do |col| %>
25
+ <tr>
26
+ <td>&nbsp;</td>
27
+ <td><%= col.name || Rails.configuration.filtered_parameters %></td>
28
+ <td><%= col.type %></td>
29
+ <td><%= col.default %></td>
30
+ <td><%= 'false' unless col.null %></td>
31
+ <td><%= col.limit %></td>
32
+ <td><%= col.sql_type %></td>
33
+ <td><%= col.precision %></td>
34
+ <td><%= col.scale %></td>
35
+ </tr>
36
+ <% end %>
37
+ <% end %>
38
+ </table>
39
+
40
+ <% @models.each do |model| %>
41
+ <div class="panel panel-default">
42
+ <div class="panel-heading">
43
+ <h3 class="panel-title"><%= model.name %></h3>
44
+ </div>
45
+ <div class="panel-body">
46
+ Stored attributes = <%= model.stored_attributes %><br/>
47
+ Save callbacks = <%= model.send('_save_callbacks').count %><br/>
48
+ Associations = <%= model.reflect_on_all_associations.count %><br/>
49
+ Reflections = <%= model.reflections.keys.to_s %>
50
+ </div>
51
+ </div>
52
+
53
+ <% end %>
54
+
55
+
56
+ <pre>
57
+ <% @models.each do |model| %>
58
+ <%= model.inspect.to_s %>
59
+
60
+ <% end %>
61
+ </pre>
@@ -0,0 +1,37 @@
1
+ <style>
2
+ table td { white-space: nowrap; }
3
+ </style>
4
+ <h2>Routes</h2>
5
+
6
+ <table class="table table-striped table-condensed">
7
+ <tr>
8
+ <th>precedence</th>
9
+ <th>name</th>
10
+ <th>verb</th>
11
+ <th>path</th>
12
+ <th>endpoint/app</th>
13
+ <th>constraints</th>
14
+ <th>regexp</th>
15
+ <th>json_regexp</th>
16
+ <th>controller</th>
17
+ <th>action</th>
18
+ <th>internal?</th>
19
+ <th>engine?</th>
20
+ </tr>
21
+ <% @routes.each do |route| %>
22
+ <tr>
23
+ <td><%= route.precedence %></td>
24
+ <td><%= route.name %></td>
25
+ <td><%= route.verb %></td>
26
+ <td><%= route.path %></td>
27
+ <td><%= route.rack_app ? route.rack_app : route.endpoint %></td>
28
+ <td><%= route.constraints %></td>
29
+ <td><%= route.regexp %></td>
30
+ <td><%= route.json_regexp %></td>
31
+ <td><%= route.controller unless route.rack_app %></td>
32
+ <td><%= route.action unless route.rack_app %></td>
33
+ <td><%= !!route.internal? %></td>
34
+ <td><%= !!route.engine? %></td>
35
+ </tr>
36
+ <% end %>
37
+ </table>
@@ -0,0 +1,83 @@
1
+ <h1>Ruby Configuration</h1>
2
+
3
+ <ul class="nav nav-tabs" role="tablist">
4
+ <li class="active"><a href="#ruby" role="tab" data-toggle="tab">Ruby</a></li>
5
+ <li><a href="#environment" role="tab" data-toggle="tab">Environment</a></li>
6
+ <li><a href="#bundler" role="tab" data-toggle="tab">Bundler</a></li>
7
+ <li><a href="#gems" role="tab" data-toggle="tab">Gems</a></li>
8
+ <li><a href="#gc" role="tab" data-toggle="tab">Garbage Collection</a></li>
9
+ </ul>
10
+
11
+ <div class="tab-content">
12
+ <div class="tab-pane active" id="ruby">
13
+ <dl class="dl-horizontal">
14
+ <dt>RUBY_ENGINE</dt><dd><%= RUBY_ENGINE %></dd>
15
+ <dt>RUBY_VERSION</dt><dd><%= RUBY_VERSION %></dd>
16
+ <dt>RUBY_PATCHLEVEL</dt><dd><%= RUBY_PATCHLEVEL %></dd>
17
+ <dt>RUBY_RELEASE_DATE</dt><dd><%= RUBY_RELEASE_DATE %></dd>
18
+ <dt>RUBY_REVISION</dt><dd><%= RUBY_REVISION %></dd>
19
+ <dt>RUBY_PLATFORM</dt><dd><%= RUBY_PLATFORM %></dd>
20
+ <dt>RUBY_DESCRIPTION</dt><dd><%= RUBY_DESCRIPTION %></dd>
21
+ <dt>RUBY_COPYRIGHT</dt><dd><%= RUBY_COPYRIGHT %></dd>
22
+ </dl>
23
+ </div>
24
+
25
+ <div class="tab-pane" id="environment">
26
+ <pre>
27
+ <% ENV.sort.each do |key, val| %>
28
+ <%= key %> = <%= val %>
29
+ <% end %>
30
+ </pre>
31
+ </div>
32
+
33
+ <div class="tab-pane" id="bundler">
34
+
35
+ <h2>Configuration</h2>
36
+ <dl>
37
+
38
+ <dt>Version</dt><dd><%= ::Bundler::VERSION %></dd>
39
+ <dt>Local config file</dt><dd><%= Bundler.settings.send(:local_config_file) %></dd>
40
+ <dt>Global config file</dt><dd><%= Bundler.settings.send(:global_config_file) %></dd>
41
+ <dt>Require sudo?</dt><dd><%= Bundler.requires_sudo? %></dd>
42
+ <dt>Allow sudo?</dt><dd><%= Bundler.settings.allow_sudo? %></dd>
43
+ </dl>
44
+ <h2>Settings</h2>
45
+ <dl>
46
+ <% Bundler.settings.all.each do |key| %>
47
+ <dt><%= key %></dt>
48
+ <dd><%= Bundler.settings.pretty_values_for(key)[0] %></dd>
49
+ <% end %>
50
+ </dl>
51
+ </div>
52
+
53
+ <div class="tab-pane" id="gems">
54
+ <table class="table">
55
+ <tr>
56
+ <th>Name</th>
57
+ <th>Version</th>
58
+ <th>Summary</th>
59
+ <th>License</th>
60
+ <th>Homepage</th>
61
+ </tr>
62
+ <% Bundler.rubygems.all_specs.sort_by(&:name).each do |gemspec| %>
63
+ <tr>
64
+ <td class="text-nowrap"><%= gemspec.name %></td>
65
+ <td><%= gemspec.version.to_s %></td>
66
+ <td><%= gemspec.summary %></td>
67
+ <td><%= gemspec.licenses.join(', ') %></td>
68
+ <td><%= link_to gemspec.homepage, gemspec.homepage if !gemspec.homepage.blank? %></td>
69
+ </tr>
70
+ <% end %>
71
+ </table>
72
+ </div>
73
+
74
+ <div class="tab-pane" id="gc">
75
+ <dl class="dl-horizontal">
76
+ <%- GC.stat.each_pair do |key,val| %>
77
+ <dt><%= key %></dt>
78
+ <dd><%= val %></dd>
79
+ <%- end %>
80
+ </dl>
81
+ </div>
82
+
83
+ </div>
data/config/routes.rb ADDED
@@ -0,0 +1,21 @@
1
+ Tuttle::Engine.routes.draw do
2
+
3
+ root :to => 'home#index'
4
+
5
+ namespace :rails do
6
+ get '', :action => :index
7
+ get :controllers, :models, :database, :helpers, :assets, :routes, :instrumentation
8
+ end
9
+
10
+ get '/ruby' => 'ruby#index'
11
+
12
+ if defined?(Devise)
13
+ get '/devise' => 'devise#index'
14
+ end
15
+
16
+ if defined?(CanCanCan)
17
+ get '/cancancan' => 'cancancan#index'
18
+ get '/cancancan/rule_tester' => 'cancancan#rule_tester'
19
+ end
20
+
21
+ end