tuttle 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/app/controllers/tuttle/active_model_serializers_controller.rb +26 -0
  4. data/app/controllers/tuttle/active_support_controller.rb +26 -0
  5. data/app/controllers/tuttle/cancancan_controller.rb +1 -0
  6. data/app/controllers/tuttle/gems_controller.rb +4 -0
  7. data/app/controllers/tuttle/home_controller.rb +1 -3
  8. data/app/controllers/tuttle/performance_tuning_controller.rb +14 -0
  9. data/app/controllers/tuttle/rails_controller.rb +20 -18
  10. data/app/controllers/tuttle/request_controller.rb +16 -0
  11. data/app/controllers/tuttle/ruby_controller.rb +2 -0
  12. data/app/helpers/tuttle/application_helper.rb +8 -0
  13. data/app/views/layouts/tuttle/application.html.erb +22 -7
  14. data/app/views/tuttle/active_model_serializers/index.html.erb +86 -0
  15. data/app/views/tuttle/active_model_serializers/index9.html.erb +68 -0
  16. data/app/views/tuttle/active_support/dependencies.html.erb +72 -0
  17. data/app/views/tuttle/active_support/index.html.erb +69 -0
  18. data/app/views/tuttle/{rails → active_support}/inflectors.html.erb +0 -0
  19. data/app/views/tuttle/active_support/time_zones.html.erb +24 -0
  20. data/app/views/tuttle/cancancan/rule_tester.html.erb +1 -20
  21. data/app/views/tuttle/devise/index.html.erb +62 -9
  22. data/app/views/tuttle/gems/get_process_mem.html.erb +92 -0
  23. data/app/views/tuttle/gems/other.html.erb +102 -0
  24. data/app/views/tuttle/home/index.html.erb +1 -1
  25. data/app/views/tuttle/performance_tuning/index.html.erb +79 -0
  26. data/app/views/tuttle/rails/assets.html.erb +38 -43
  27. data/app/views/tuttle/rails/database.html.erb +2 -2
  28. data/app/views/tuttle/rails/engines.html.erb +40 -0
  29. data/app/views/tuttle/rails/generators.html.erb +74 -0
  30. data/app/views/tuttle/rails/index.html.erb +62 -86
  31. data/app/views/tuttle/rails/models.html.erb +16 -1
  32. data/app/views/tuttle/rails/schema_cache.html.erb +3 -1
  33. data/app/views/tuttle/request/index.html.erb +37 -0
  34. data/app/views/tuttle/ruby/index.html.erb +65 -0
  35. data/config/routes.rb +19 -3
  36. data/lib/tuttle.rb +6 -1
  37. data/lib/tuttle/engine.rb +23 -61
  38. data/lib/tuttle/instrumenter.rb +38 -0
  39. data/lib/tuttle/middleware/request_profiler.rb +80 -0
  40. data/lib/tuttle/ruby_prof/fast_call_stack_printer.rb +164 -0
  41. data/lib/tuttle/version.rb +1 -1
  42. metadata +21 -21
  43. data/app/assets/images/tuttle/favicon.ico +0 -0
  44. data/app/assets/javascripts/tuttle/application.js +0 -12
  45. data/app/assets/stylesheets/tuttle/application.css +0 -71
@@ -68,7 +68,7 @@
68
68
 
69
69
  <div class="panel panel-default">
70
70
  <div class="panel-heading">
71
- <h3 class="panel-title">Events (<%= Tuttle::Engine.events.size %>)</h3>
71
+ <h3 class="panel-title">Events (<%= Tuttle::Instrumenter.events.size %>)</h3>
72
72
  </div>
73
73
  <ul class="list-group">
74
74
  <% @event_counts.sort.each do |name,val| -%>
@@ -0,0 +1,79 @@
1
+ <h1>Performance Tuning</h1>
2
+
3
+ <dl class="dl-horizontal">
4
+ <dt>MiniProfiler Version</dt><dd><%= Rack::MiniProfiler::VERSION %></dd>
5
+ <dt>MiniProfiler Asset Version</dt><dd><%= Rack::MiniProfiler::ASSET_VERSION %></dd>
6
+ </dl>
7
+
8
+ <h3>Rack::MiniProfiler Global Settings</h3>
9
+ <table class="table table-condensed">
10
+ <tr>
11
+ <th>Setting</th>
12
+ <th>Value</th>
13
+ <th>Description</th>
14
+ </tr>
15
+ <tr><th colspan="3">Booleans</th></tr>
16
+ <% [:auto_inject, :disable_caching, :start_hidden, :skip_schema_queries, :disable_env_dump, :enabled].each do |setting_method| %>
17
+ <tr>
18
+ <td><%= setting_method %></td>
19
+ <td><%= truth_label(Rack::MiniProfiler.config.send(setting_method)) %></td>
20
+ <td></td>
21
+ </tr>
22
+ <% end %>
23
+ <tr><th colspan="3">Strings/Integers</th></tr>
24
+ <% [:position, :authorization_mode, :toggle_shortcut, :flamegraph_sample_rate,
25
+ :base_url_path, :backtrace_remove, :backtrace_includes, :backtrace_ignores, :backtrace_threshold_ms].each do |setting_method| %>
26
+ <tr>
27
+ <td><%= setting_method %></td>
28
+ <td><code><%= Rack::MiniProfiler.config.send(setting_method).inspect %></code></td>
29
+ <td></td>
30
+ </tr>
31
+ <% end %>
32
+ <tr><th colspan="3">Non-string</th></tr>
33
+ <% [ :storage, :storage_options, :storage_instance, :storage_failure, :user_provider, :pre_authorize_cb ].each do |setting_method| %>
34
+ <tr>
35
+ <td><%= setting_method %></td>
36
+ <td><code><%= Rack::MiniProfiler.config.send(setting_method).inspect %></code></td>
37
+ <td></td>
38
+ </tr>
39
+ <% end %>
40
+
41
+ </table>
42
+
43
+ <h3>Rack::MiniProfiler User Settings</h3>
44
+ <p>
45
+ MiniProfiler uses a session cookie to store user overrides of configuration.
46
+ </p>
47
+ <p>
48
+ This is controlled by using the <code>pp=(enable|disable)</code>
49
+ or <code>pp=(no|full|disable)-backtrace</code> query parameters.
50
+ </p>
51
+
52
+ <table class="table table-condensed">
53
+ <tr>
54
+ <th>Setting</th>
55
+ <th>Value</th>
56
+ <th>Description</th>
57
+ </tr>
58
+ <tr>
59
+ <td>has_cookie?</td>
60
+ <td><%= truth_label(@mp_client_settings.has_cookie?) %></td>
61
+ <td></td>
62
+ </tr>
63
+ <tr>
64
+ <td>Cookie Value</td>
65
+ <td><%= request.cookies[::Rack::MiniProfiler::ClientSettings::COOKIE_NAME].inspect %></td>
66
+ <td></td>
67
+ </tr>
68
+ <tr>
69
+ <td>disable_profiling?</td>
70
+ <td><%= truth_label(@mp_client_settings.disable_profiling?) %></td>
71
+ <td></td>
72
+ </tr>
73
+ <tr>
74
+ <td>backtrace_level</td>
75
+ <td><code><%= @mp_client_settings.backtrace_level %></code></td>
76
+ <td></td>
77
+ </tr>
78
+ </table>
79
+
@@ -1,46 +1,41 @@
1
1
  <h2>Assets/Sprockets</h2>
2
2
 
3
- Sprockets version: <%= Sprockets::VERSION %><br/>
4
- Sprockets::Rails version: <%= Sprockets::Rails::VERSION %><br/>
5
- SASS version: <%= defined?(Sass::VERSION) ? Sass::VERSION : '-' %><br/>
6
- CoffeeScript version: <%= defined?(CoffeeScript) ? CoffeeScript::version : '-' %><br/>
7
- ECO version: <%= defined?(Eco) ? Eco::version : '-' %><br/>
8
- EJS version: <%= defined?(EJS) ? '1.1.1' : '-' %><br/>
9
-
10
- <h3>Configuration</h3>
11
- digest: <%= Rails.application.config.assets.digest %><br/>
12
- <%- if Sprockets::VERSION < '3' %>
13
- ** digest value: <%= @sprockets.digest %><br/>
3
+ <%- if @sprockets %>
4
+ Sprockets version: <%= Sprockets::VERSION %><br/>
5
+ Sprockets::Rails version: <%= Sprockets::Rails::VERSION %><br/>
6
+ SASS version: <%= defined?(Sass::VERSION) ? Sass::VERSION : '-' %><br/>
7
+ CoffeeScript version: <%= defined?(CoffeeScript) ? CoffeeScript::version : '-' %><br/>
8
+ ECO version: <%= defined?(Eco) ? Eco::version : '-' %><br/>
9
+ EJS version: <%= defined?(EJS) ? '1.1.1' : '-' %><br/>
10
+
11
+ <h3>Configuration</h3>
12
+ digest: <%= Rails.application.config.assets.digest %><br/>
13
+ <%- if Sprockets::VERSION < '3' %>
14
+ ** digest value: <%= @sprockets.digest %><br/>
15
+ <%- end %>
16
+ assets version: <%= Rails.application.config.assets.version %><br/>
17
+ ** sprockets assets version: <%= @sprockets.version %><br/>
18
+ assets prefix: <%= Rails.application.config.assets.prefix %><br/>
19
+ manifest: <%= Rails.application.config.assets.manifest || 'false' %><br/>
20
+ debug: <%= Rails.application.config.assets.debug %><br/>
21
+ compile: <%= Rails.application.config.assets.compile %><br/>
22
+ <%- # NOTE: only in Sprockets 2.x %>
23
+ raise_runtime_errors: <%= Rails.application.config.assets.raise_runtime_errors %><br/>
24
+ js_compressor: <%= Rails.application.config.assets.js_compressor %><br/>
25
+ css_compressor: <%= Rails.application.config.assets.css_compressor %><br/>
26
+
27
+ asset_host (for CDNs): <%= Rails.application.config.action_controller.asset_host %><br/>
28
+ static_cache_control (for CDNs): <%= Rails.application.config.static_cache_control %><br/>
29
+
30
+
31
+ <h3>Asset paths</h3>
32
+ <pre>
33
+ <% @sprockets.paths.each do |asset_path| %>
34
+ <%= asset_path.to_s %>
35
+ <% end %>
36
+
37
+ </pre>
38
+
39
+ <%- else %>
40
+ <p>Sprockets does not appear to be enabled for this application.</p>
14
41
  <%- end %>
15
- assets version: <%= Rails.application.config.assets.version %><br/>
16
- ** sprockets assets version: <%= @sprockets.version %><br/>
17
- assets prefix: <%= Rails.application.config.assets.prefix %><br/>
18
- manifest: <%= Rails.application.config.assets.manifest || 'false' %><br/>
19
- debug: <%= Rails.application.config.assets.debug %><br/>
20
- compile: <%= Rails.application.config.assets.compile %><br/>
21
- <%- # NOTE: only in Sprockets 2.x %>
22
- raise_runtime_errors: <%= Rails.application.config.assets.raise_runtime_errors %><br/>
23
- js_compressor: <%= Rails.application.config.assets.js_compressor %><br/>
24
- css_compressor: <%= Rails.application.config.assets.css_compressor %><br/>
25
-
26
- asset_host (for CDNs): <%= Rails.application.config.action_controller.asset_host %><br/>
27
- static_cache_control (for CDNs): <%= Rails.application.config.static_cache_control %><br/>
28
-
29
-
30
- <h3>Asset paths</h3>
31
- <pre>
32
- <% @sprockets.paths.each do |asset_path| %>
33
- <%= asset_path.to_s %>
34
- <% end %>
35
-
36
- </pre>
37
-
38
- <h3>Engines</h3>
39
- <ul>
40
- <% @engines.each do |ext,engine_name| %>
41
- <li><%= ext %> - <%= engine_name %></li>
42
- <% end %>
43
-
44
- </ul>
45
-
46
-
@@ -12,8 +12,8 @@
12
12
  <p>Adapter Name = <%= @conn.adapter_name %></p>
13
13
  <p>Adapter Class = <%= @conn.class %></p>
14
14
  <p>Connected? = <%= ActiveRecord::Base.connected? %></p>
15
- <p>Pool size = <%= ActiveRecord::Base.connection_pool.size %></p>
16
- <p>Schema Cache size = <%= @conn.schema_cache.size %></p>
15
+ <p>Pool size = <%= ActiveRecord::Base.connection_pool.size rescue 'N/A' %></p>
16
+ <p>Schema Cache size = <%= @conn.schema_cache.size rescue 'N/A' %></p>
17
17
 
18
18
  <%- if defined?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter) && @conn.class <= ActiveRecord::ConnectionAdapters::PostgreSQLAdapter -%>
19
19
 
@@ -0,0 +1,40 @@
1
+ <h2>Rails Engines</h2>
2
+
3
+ <p>
4
+ Rails Engines are mini-applications that provide functionality to the host application.
5
+ An Engine is like a plugin module that can expose controllers, assets, rake tasks, etc.
6
+ </p>
7
+
8
+ <%- @engines.each do |engine| %>
9
+ <div class="panel panel-default">
10
+ <div class="panel-heading">
11
+ <h4><%= engine.engine_name %> - <%= engine.class.name %> <%= '<span class="label label-success">ISOLATED</span>'.html_safe if engine.isolated? %></h4>
12
+ </div>
13
+ <div class="panel-body">
14
+ <table class="table table-condensed" style="width: auto;">
15
+ <tr>
16
+ <th>Engine root path</th>
17
+ <td><%= engine.root %></td>
18
+ </tr>
19
+ <tr>
20
+ <th>Paths</th>
21
+ <td>
22
+ <% engine.paths.all_paths.each do |p| %>
23
+ <% current_path = p.instance_variable_get(:@current) %>
24
+ <% next if engine.paths[current_path].existent.empty? %>
25
+ <%= current_path %><br/>
26
+ <% end %>
27
+ </td>
28
+ </tr>
29
+ <tr>
30
+ <th>Routes</th>
31
+ <td><%= engine.routes.set.to_a.size %></td>
32
+ </tr>
33
+ <tr>
34
+ <th>Helpers</th>
35
+ <td><%= engine.helpers.instance_methods %></td>
36
+ </tr>
37
+ </table>
38
+ </div>
39
+ </div>
40
+ <%- end %>
@@ -0,0 +1,74 @@
1
+ <h2>Rails Generators</h2>
2
+
3
+ <p>Rails Generators are helpers for quickly creating new code that follows Rails standards and best practices.</p>
4
+ <p>Rails itself provides many generators as do other gems.</p>
5
+ <p>You can configure Rails Generators to generate files based on your project's preferences.</p>
6
+ <h2>Configuration Settings</h2>
7
+ <dl>
8
+ <dt>assets = <%= Rails::Generators.options[:rails][:assets] %></dt>
9
+ <dd>allows to create assets on generating a scaffold. Defaults to true.</dd>
10
+ <dt>force_plural = <%= Rails::Generators.options[:rails][:force_plural] %></dt>
11
+ <dd>allows pluralized model names. Defaults to false.</dd>
12
+ <dt>helper = <%= Rails::Generators.options[:rails][:helper] %></dt>
13
+ <dd>defines whether or not to generate helpers. Defaults to true.</dd>
14
+ <dt>integration_tool = <%= Rails::Generators.options[:rails][:integration_tool] %></dt>
15
+ <dd>defines which integration tool to use. Defaults to nil.</dd>
16
+ <dt>javascripts = <%= Rails::Generators.options[:rails][:javascripts] %></dt>
17
+ <dd>turns on the hook for JavaScript files in generators. Used in Rails for when the scaffold generator is run. Defaults to true.</dd>
18
+ <dt>javascript_engine = <%= Rails::Generators.options[:rails][:javascript_engine] %></dt>
19
+ <dd>configures the engine to be used (for eg. coffee) when generating assets. Defaults to nil.</dd>
20
+
21
+ <dt>orm = <%= Rails::Generators.options[:rails][:orm] %></dt>
22
+ <dd>defines which orm to use. Defaults to false and will use Active Record by default.</dd>
23
+ <dt>resource_controller = <%= Rails::Generators.options[:rails][:resource_controller] %></dt>
24
+ <dd>defines which generator to use for generating a controller when using rails generate resource. Defaults to :controller.</dd>
25
+ <dt>scaffold_controller = <%= Rails::Generators.options[:rails][:scaffold_controller] %></dt>
26
+ <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>
27
+ <dt>stylesheets = <%= Rails::Generators.options[:rails][:stylesheets] %></dt>
28
+ <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>
29
+ <dt>stylesheet_engine = <%= Rails::Generators.options[:rails][:stylesheet_engine] %></dt>
30
+ <dd>configures the stylesheet engine (for eg. sass) to be used when generating assets. Defaults to :css.</dd>
31
+ <dt>test_framework = <%= Rails::Generators.options[:rails][:test_framework] %></dt>
32
+ <dd>defines which test framework to use. Defaults to false and will use Test::Unit by default.</dd>
33
+ <dt>template_engine = <%= Rails::Generators.options[:rails][:template_engine] %></dt>
34
+ <dd>defines which template engine to use, such as ERB or Haml. Defaults to :erb.</dd>
35
+ </dl>
36
+ <h2>Generators</h2>
37
+ <p><i>
38
+ Note: Generators marked as <span class="label label-warning">HIDDEN</span>
39
+ are typically invoked indirectly as a dependency of another generator.
40
+ </i></p>
41
+
42
+ <% @generators.each do |namespace, generators| %>
43
+ <div class="panel panel-default">
44
+ <div class="panel-heading">
45
+ <h4><%= namespace %></h4>
46
+ </div>
47
+ <div class="panel-body">
48
+ <% generators.each do |generator| %>
49
+ <h5>
50
+ <%= generator.namespace %>
51
+ <% if Rails::Generators.hidden_namespaces.include?(generator.namespace) %>
52
+ <span class="label label-warning">HIDDEN</span>
53
+ <% end %>
54
+ </h5>
55
+ <p>Usage: <code><%= generator.banner %></code></p>
56
+ <pre><%= generator.desc %></pre>
57
+ <hr/>
58
+ <% end %>
59
+ </div>
60
+ </div>
61
+ <% end %>
62
+
63
+ <hr/>
64
+
65
+ <div class="alert <%= @generators.empty? ? 'alert-warning' : 'alert-info' %>" role="alert">
66
+ <p>
67
+ Rails generators are not loaded by default.
68
+ If no generators are listed or some appear to be missing,
69
+ Tuttle may need to force load the generators.
70
+ <br/>
71
+ <%= link_to 'Load Generators', rails_generators_path(:load_all_generators=>true), :class => 'btn btn-default' %>
72
+ </p>
73
+ </div>
74
+
@@ -10,12 +10,10 @@ Log Level = <%= Rails.configuration.log_level %>
10
10
 
11
11
  <ul class="nav nav-tabs" role="tablist">
12
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>
13
+ <li><a href="#load_paths" role="tab" data-toggle="tab">Load Paths</a></li>
14
14
  <li><a href="#initializers" role="tab" data-toggle="tab">Initializers</a></li>
15
15
  <li><a href="#middleware" role="tab" data-toggle="tab">Middleware</a></li>
16
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
17
  <li><a href="#timedate" role="tab" data-toggle="tab">Time and Date Formats</a></li>
20
18
  </ul>
21
19
 
@@ -63,32 +61,66 @@ Log Level = <%= Rails.configuration.log_level %>
63
61
  </div>
64
62
  </div>
65
63
  </div>
66
- <div class="tab-pane" id="application">
64
+ <div class="tab-pane" id="load_paths">
67
65
  <p>
68
- The fully-configured Rails Application object manages class loading and request routing.
66
+ Rails will load code based on the configured load paths with the
67
+ help of ActiveSupport.
68
+ <ul>
69
+ <li>
70
+ Autoload - Files will be searched here to auto
71
+ load classes based on naming convention
72
+ </li>
73
+ <li>
74
+ Autoload Once - A subset of autoload that will not be reloaded
75
+ when class caching is disabled (default for development)
76
+ </li>
77
+ <li>
78
+ Eager Load - All classes here will be loaded when eager loading
79
+ is configured (default for production)
80
+ </li>
81
+ </ul>
82
+ The runtime load paths are determined by configuration (typically in
83
+ <code>application.rb</code>), Rails' default load paths
84
+ (e.g. <code>app/*</code>), paths contributed by Engines, and direct API
85
+ calls to <code>ActiveSupport::Dependecies</code>.
86
+ </p>
87
+ <p>
88
+ <i>Ideally, all directories should exist.</i>
69
89
  </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') -%>
90
+
91
+ <%- all_load_paths = (Rails.application.send(:_all_load_paths) + ActiveSupport::Dependencies.autoload_paths).uniq -%>
92
+
93
+ <%- all_autoload_paths = Rails.application.send(:_all_autoload_paths) -%>
94
+ <%- all_autoload_once_paths = Rails.application.send(:_all_autoload_once_paths) -%>
95
+
96
+ <%- config_eager_load_paths = Rails.configuration.eager_load_paths -%>
97
+ <%- config_autoload_paths = Rails.configuration.autoload_paths -%>
98
+ <%- config_autoload_once_paths = Rails.configuration.autoload_once_paths -%>
99
+
72
100
  <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>
101
+
102
+ <table class="table table-condensed">
103
+ <tr>
104
+ <th>Path</th>
105
+ <th>Autoload?</th>
106
+ <th>Autoload Once?</th>
107
+ <th>Eager Load?</th>
108
+ <th>Config Autoload?</th>
109
+ <th>Config Autoload Once?</th>
110
+ <th>Exists?</th>
111
+ </tr>
112
+ <% all_load_paths.each do |path| %>
113
+ <tr>
114
+ <td><%= path %></td>
115
+ <td><%= truth_label(all_autoload_paths.include?(path)) %></td>
116
+ <td><%= truth_label(all_autoload_once_paths.include?(path)) %></td>
117
+ <td><%= truth_label(config_eager_load_paths.include?(path)) %></td>
118
+ <td><%= truth_label(config_autoload_paths.include?(path)) %></td>
119
+ <td><%= truth_label(config_autoload_once_paths.include?(path)) %></td>
120
+ <td><%= truth_label(File.directory?(path)) %></td>
121
+ </tr>
122
+ <% end %>
123
+ </table>
92
124
  </div>
93
125
  <div class="tab-pane" id="initializers">
94
126
  <p>Rails initializers are blocks of code that run during application initialization.</p>
@@ -100,11 +132,11 @@ Log Level = <%= Rails.configuration.log_level %>
100
132
  <%- options = initializer.instance_variable_get('@options'.freeze) %>
101
133
  <tr>
102
134
  <td><%= idx+=1 %></td>
103
- <td><%= initializer.name %></td>
135
+ <td><%= initializer.name.inspect %></td>
104
136
  <td><%= initializer.instance_variable_get('@context'.freeze).class.name %></td>
105
- <td><%= options.try(:[],:group) %></td>
106
- <td><%= options.try(:[],:after) %></td>
107
- <td><%= options.try(:[],:before) %></td>
137
+ <td><%= options.try(:[],:group).try(:inspect) %></td>
138
+ <td><%= options.try(:[],:after).try(:inspect) %></td>
139
+ <td><%= options.try(:[],:before).try(:inspect) %></td>
108
140
  </tr>
109
141
  <%- end %>
110
142
  </table>
@@ -136,19 +168,6 @@ Log Level = <%= Rails.configuration.log_level %>
136
168
  <%- end %>
137
169
  </ol>
138
170
  </div>
139
- <div class="tab-pane" id="engines">
140
- <p>
141
- Rails Engines are mini-applications that provide functionality to the host application.
142
- An Engine is like a plugin module that can expose controllers, assets, rake tasks, etc.
143
- </p>
144
- <ol>
145
- <%- ::Rails::Engine.descendants.sort_by(&:name).each do |engine_class| %>
146
- <%- next if engine_class.abstract_railtie? -%>
147
- <%- engine = engine_class.instance %>
148
- <li><%= engine.engine_name %> - <%= engine_class.name %> <%= engine_class.called_from %> <%= '<b>ISOLATED</b>'.html_safe if engine_class.isolated? %> </li>
149
- <%- end %>
150
- </ol>
151
- </div>
152
171
  <div class="tab-pane" id="timedate">
153
172
  <p>
154
173
  Rails date and time formats are usually configured in a config/initializers/date_formats.rb file.
@@ -199,47 +218,4 @@ Log Level = <%= Rails.configuration.log_level %>
199
218
  <%- end %>
200
219
  </table>
201
220
  </div>
202
- <div class="tab-pane" id="generators">
203
- <p>Rails Generators are helpers for quickly creating new code that follows Rails standards and best practices.</p>
204
- <p>Rails itself provides many generators as do other gems.</p>
205
- <p>You can configure Rails Generators to generate files based on your project's preferences.</p>
206
- <h2>Configuration Settings</h2>
207
- <dl>
208
- <dt>assets = <%= Rails::Generators.options[:rails][:assets] %></dt>
209
- <dd>allows to create assets on generating a scaffold. Defaults to true.</dd>
210
- <dt>force_plural = <%= Rails::Generators.options[:rails][:force_plural] %></dt>
211
- <dd>allows pluralized model names. Defaults to false.</dd>
212
- <dt>helper = <%= Rails::Generators.options[:rails][:helper] %></dt>
213
- <dd>defines whether or not to generate helpers. Defaults to true.</dd>
214
- <dt>integration_tool = <%= Rails::Generators.options[:rails][:integration_tool] %></dt>
215
- <dd>defines which integration tool to use. Defaults to nil.</dd>
216
- <dt>javascripts = <%= Rails::Generators.options[:rails][:javascripts] %></dt>
217
- <dd>turns on the hook for JavaScript files in generators. Used in Rails for when the scaffold generator is run. Defaults to true.</dd>
218
- <dt>javascript_engine = <%= Rails::Generators.options[:rails][:javascript_engine] %></dt>
219
- <dd>configures the engine to be used (for eg. coffee) when generating assets. Defaults to nil.</dd>
220
-
221
- <dt>orm = <%= Rails::Generators.options[:rails][:orm] %></dt>
222
- <dd>defines which orm to use. Defaults to false and will use Active Record by default.</dd>
223
- <dt>resource_controller = <%= Rails::Generators.options[:rails][:resource_controller] %></dt>
224
- <dd>defines which generator to use for generating a controller when using rails generate resource. Defaults to :controller.</dd>
225
- <dt>scaffold_controller = <%= Rails::Generators.options[:rails][:scaffold_controller] %></dt>
226
- <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>
227
- <dt>stylesheets = <%= Rails::Generators.options[:rails][:stylesheets] %></dt>
228
- <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>
229
- <dt>stylesheet_engine = <%= Rails::Generators.options[:rails][:stylesheet_engine] %></dt>
230
- <dd>configures the stylesheet engine (for eg. sass) to be used when generating assets. Defaults to :css.</dd>
231
- <dt>test_framework = <%= Rails::Generators.options[:rails][:test_framework] %></dt>
232
- <dd>defines which test framework to use. Defaults to false and will use Test::Unit by default.</dd>
233
- <dt>template_engine = <%= Rails::Generators.options[:rails][:template_engine] %></dt>
234
- <dd>defines which template engine to use, such as ERB or Haml. Defaults to :erb.</dd>
235
- </dl>
236
- <h2>Generators</h2>
237
- <ul>
238
- <% Rails::Generators.subclasses.each do |generator| %>
239
- <li><%= generator.namespace %>
240
- <pre><%= generator.desc %></pre>
241
- </li>
242
- <% end %>
243
- </ul>
244
- </div>
245
221
  </div>