tuttle 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/README.md +61 -4
  4. data/Rakefile +1 -16
  5. data/app/controllers/tuttle/active_job_controller.rb +51 -0
  6. data/app/controllers/tuttle/active_model_serializers_controller.rb +3 -8
  7. data/app/controllers/tuttle/application_controller.rb +3 -0
  8. data/app/controllers/tuttle/cancancan_controller.rb +8 -15
  9. data/app/controllers/tuttle/devise_controller.rb +1 -2
  10. data/app/controllers/tuttle/gems_controller.rb +4 -4
  11. data/app/controllers/tuttle/home_controller.rb +0 -1
  12. data/app/controllers/tuttle/paperclip_controller.rb +1 -2
  13. data/app/controllers/tuttle/rack_mini_profiler_controller.rb +15 -0
  14. data/app/controllers/tuttle/rails_controller.rb +45 -7
  15. data/app/controllers/tuttle/request_controller.rb +0 -4
  16. data/app/controllers/tuttle/ruby_controller.rb +6 -2
  17. data/app/helpers/tuttle/application_helper.rb +13 -8
  18. data/app/models/tuttle/configuration_registry.rb +25 -0
  19. data/app/models/tuttle/version_detector.rb +9 -0
  20. data/app/views/layouts/tuttle/application.html.erb +29 -20
  21. data/app/views/tuttle/active_job/index.html.erb +48 -0
  22. data/app/views/tuttle/active_model_serializers/index.html.erb +2 -0
  23. data/app/views/tuttle/gems/get_process_mem.html.erb +13 -13
  24. data/app/views/tuttle/gems/http_clients.html.erb +9 -10
  25. data/app/views/tuttle/gems/json.html.erb +3 -3
  26. data/app/views/tuttle/gems/other.html.erb +41 -11
  27. data/app/views/tuttle/home/index.html.erb +27 -23
  28. data/app/views/tuttle/{performance_tuning → rack_mini_profiler}/index.html.erb +6 -6
  29. data/app/views/tuttle/rails/_cache_dalli_store.html.erb +65 -0
  30. data/app/views/tuttle/rails/_cache_memory_store.html.erb +43 -0
  31. data/app/views/tuttle/rails/_cache_monitor.html.erb +63 -0
  32. data/app/views/tuttle/rails/assets.html.erb +181 -28
  33. data/app/views/tuttle/rails/cache.html.erb +92 -102
  34. data/app/views/tuttle/rails/database.html.erb +2 -2
  35. data/app/views/tuttle/rails/index.html.erb +20 -21
  36. data/app/views/tuttle/rails/routes.html.erb +88 -36
  37. data/app/views/tuttle/rails/schema_cache.html.erb +2 -1
  38. data/app/views/tuttle/ruby/index.html.erb +24 -20
  39. data/config/rails_config_base.yml +80 -0
  40. data/config/rails_config_v4.x.yml +14 -0
  41. data/config/rails_config_v5.x.yml +12 -0
  42. data/config/routes.rb +7 -1
  43. data/lib/tuttle.rb +3 -6
  44. data/lib/tuttle/engine.rb +24 -12
  45. data/lib/tuttle/instrumenter.rb +7 -7
  46. data/lib/tuttle/middleware/request_profiler.rb +165 -24
  47. data/lib/tuttle/presenters/action_dispatch/routing/route_wrapper.rb +7 -3
  48. data/lib/tuttle/presenters/rack_mini_profiler/client_settings.rb +27 -0
  49. data/lib/tuttle/ruby_prof/fast_call_stack_printer.rb +26 -53
  50. data/lib/tuttle/version.rb +1 -1
  51. metadata +18 -8
  52. data/app/controllers/tuttle/performance_tuning_controller.rb +0 -14
@@ -55,8 +55,8 @@
55
55
  </ul>
56
56
  <%- end -%>
57
57
 
58
- <h3>Tables (<%= @conn.tables.size %>)</h3>
59
- <p><%= @conn.tables %></p>
58
+ <h3>Tables (Data Sources) (<%= @data_sources.size %>)</h3>
59
+ <p><%= @data_sources %></p>
60
60
 
61
61
  <h3>Native DB Types Supported</h3>
62
62
  <dl class="dl-horizontal">
@@ -20,10 +20,16 @@ Log Level = <%= Rails.configuration.log_level %>
20
20
  <div class="tab-content">
21
21
  <div class="tab-pane active" id="config">
22
22
  <p>
23
- Rails configuration is managed through the applications's config/application.rb, an environment-specific configuration file, and initializers from the config/initializers directory.
23
+ Rails configuration is managed through the applications's <code>config/application.rb</code>,
24
+ an environment-specific configuration file, and initializers from
25
+ the <code>config/initializers</code> directory.
24
26
  </p>
25
27
  <p>
26
- The combined results of these configurations are shown here:
28
+ The Rails Guide <a href="<%= rails_guides_versioned_url('configuring.html') %>">Configuring Rails Applications</a>
29
+ has a mostly-complete list of the options available.
30
+ </p>
31
+ <p>
32
+ The combined results of these configurations are shown here.
27
33
  </p>
28
34
  <table class="table table-condensed">
29
35
  <tr>
@@ -31,23 +37,16 @@ Log Level = <%= Rails.configuration.log_level %>
31
37
  <th>Value</th>
32
38
  <th>Description</th>
33
39
  </tr>
34
- <tr>
35
- <td>config.asset_host</td>
36
- <td><%= Rails.configuration.asset_host %></td>
37
- <td>
38
- 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.
39
- </td>
40
- </tr>
41
- <tr>
42
- <td>config.beginning_of_week</td>
43
- <td><%= Rails.configuration.beginning_of_week %></td>
44
- <td>
45
- Sets the default beginning of week for the application. Accepts a valid week day symbol (e.g. :monday).
46
- </td>
47
- </tr>
40
+ <% @config_options.each do |key, description| %>
41
+ <tr data-config-key="<%= key %>">
42
+ <td>config.<%= key %></td>
43
+ <td><code><%= Rails.configuration.send(key).inspect rescue 'ERROR'%></code></td>
44
+ <td><%= description %></td>
45
+ </tr>
46
+ <% end %>
48
47
  </table>
49
48
 
50
- <div class="panel panel-warning">
49
+ <div class="panel panel-warning hidden">
51
50
  <div class="panel-heading">
52
51
  <h4 class="panel-title" data-toggle="collapse" data-target="#rails_config_instances">Instance Variables</h4>
53
52
  </div>
@@ -176,7 +175,7 @@ Log Level = <%= Rails.configuration.log_level %>
176
175
  Here are the formats that have been configured for this application (including Rails' default formats).
177
176
  </p>
178
177
  <% # http://www.foragoodstrftime.com/ %>
179
- <%- today, now = Date.today, Time.now %>
178
+ <%- today, now = Date.current, Time.current %>
180
179
  <h3>Date Formats</h3>
181
180
  <table class="table table-condensed">
182
181
  <tr>
@@ -189,7 +188,7 @@ Log Level = <%= Rails.configuration.log_level %>
189
188
  <td><%= today.to_s %></td>
190
189
  <td></td>
191
190
  </tr>
192
- <%- Date::DATE_FORMATS.sort.each do |format,formatter| %>
191
+ <%- Date::DATE_FORMATS.sort.each do |format, formatter| %>
193
192
  <tr>
194
193
  <td>:<%= format %></td>
195
194
  <td><%= today.to_s(format) %></td>
@@ -209,10 +208,10 @@ Log Level = <%= Rails.configuration.log_level %>
209
208
  <td><%= now.to_s %></td>
210
209
  <td></td>
211
210
  </tr>
212
- <%- Time::DATE_FORMATS.sort.each do |format,formatter| %>
211
+ <%- Time::DATE_FORMATS.sort.each do |format, formatter| %>
213
212
  <tr>
214
213
  <td>:<%= format %></td>
215
- <td><%= today.to_s(format) %></td>
214
+ <td><%= now.to_s(format) %></td>
216
215
  <td><%= formatter.respond_to?(:call) ? 'Dynamic Proc'.freeze : formatter %></td>
217
216
  </tr>
218
217
  <%- end %>
@@ -1,41 +1,93 @@
1
+ <%- content_for(:javascripts) do -%>
2
+ <%= javascript_tag do -%>
3
+ $(function () { $('[data-toggle="tooltip"]').tooltip(); });
4
+ <% end -%>
5
+ <%- end %>
1
6
  <style>
2
7
  table td { white-space: nowrap; }
3
8
  </style>
4
9
  <h2>Routes</h2>
5
- <p>
6
- Rails routing is described in the <a href="http://guides.rubyonrails.org/routing.html">Rails
7
- Routing from the Outside In</a> guide.
8
- </p>
9
- <p>
10
- In addition to the routes defined in your <code>config/routes.rb</code> file,
11
- Rails has internal routes and other Engines can contribute routes to the application.
12
- </p>
13
10
 
14
- <table class="table table-striped table-condensed">
15
- <tr>
16
- <th><span data-toggle="tooltip" title="Route paths are checked in the order they are defined.">Precedence</span></th>
17
- <th><span data-toggle="tooltip" title="The route name is used to generate Named Helpers like myaction_path">Name</span></th>
18
- <th><span data-toggle="tooltip" title="The HTTP method for this route">Verb</span></th>
19
- <th><span data-toggle="tooltip" title="The URI for the route.">Path</span></th>
20
- <th><span data-toggle="tooltip" title="Most routes will map to a Controller#Action but some will be handled by engines or Rails internals">Endpoint or App</span></th>
21
- <th><span data-toggle="tooltip" title="Routes can be constrained to match parameters">Constraints</span></th>
22
- <th><span data-toggle="tooltip" title="The Controller for the route">Controller</span></th>
23
- <th><span data-toggle="tooltip" title="The Action for the route">Action</span></th>
24
- <th><span data-toggle="tooltip" title="Internal routes are handle by Rails under the covers">Internal?</span></th>
25
- <th><span data-toggle="tooltip" title="Some routes are handled my mounted engines">Engine?</span></th>
26
- </tr>
27
- <% @routes.each do |route| %>
28
- <tr>
29
- <td><%= route.precedence %></td>
30
- <td><%= route.name %></td>
31
- <td><%= route.verb %></td>
32
- <td><%= route.path %></td>
33
- <td><%= route.endpoint_or_app_name %></td>
34
- <td><%= route.constraints %></td>
35
- <td><%= route.controller %></td>
36
- <td><%= route.action %></td>
37
- <td><%= route.is_internal_to_rails? %></td>
38
- <td><%= route.engine? %></td>
39
- </tr>
40
- <% end %>
41
- </table>
11
+ <ul class="nav nav-tabs" role="tablist">
12
+ <li class="<%= 'active' if @recognized_paths.blank? %>"><a href="#routes" role="tab" data-toggle="tab">Routes</a></li>
13
+ <li class="<%= 'active' unless @recognized_paths.blank? %>"><a href="#route_tester" role="tab" data-toggle="tab">Recognize Path</a></li>
14
+ </ul>
15
+ <br>
16
+
17
+ <div class="tab-content">
18
+ <div class="tab-pane <%= 'active' if @recognized_paths.blank? %>" id="routes">
19
+ <p>
20
+ Rails routing is described in the <a href="<%= rails_guides_versioned_url('routing.html') %>">Rails
21
+ Routing from the Outside In</a> guide.
22
+ </p>
23
+ <p>
24
+ In addition to the routes defined in your <code>config/routes.rb</code> file,
25
+ Rails has internal routes and other Engines can contribute routes to the application.
26
+ </p>
27
+
28
+ <table class="table table-striped table-condensed">
29
+ <tr>
30
+ <th><span data-toggle="tooltip" title="Route paths are checked in the order they are defined.">Precedence</span></th>
31
+ <th><span data-toggle="tooltip" title="The route name is used to generate Named Helpers like myaction_path">Name</span></th>
32
+ <th><span data-toggle="tooltip" title="The HTTP method for this route">Verb</span></th>
33
+ <th><span data-toggle="tooltip" title="The URI for the route.">Path</span></th>
34
+ <th><span data-toggle="tooltip" title="Most routes will map to a Controller#Action but some will be handled by engines or Rails internals">Endpoint or App</span></th>
35
+ <th><span data-toggle="tooltip" title="Routes can be constrained to match parameters">Constraints</span></th>
36
+ <th><span data-toggle="tooltip" title="The Controller for the route">Controller</span></th>
37
+ <th><span data-toggle="tooltip" title="The Action for the route">Action</span></th>
38
+ <th><span data-toggle="tooltip" title="Internal routes are handle by Rails under the covers">Internal?</span></th>
39
+ <th><span data-toggle="tooltip" title="Some routes are handled my mounted engines">Engine?</span></th>
40
+ </tr>
41
+ <% @routes.each do |route| %>
42
+ <tr>
43
+ <td><%= route.precedence %></td>
44
+ <td><%= route.name %></td>
45
+ <td><%= route.verb %></td>
46
+ <td><%= route.path %></td>
47
+ <td><%= route.endpoint_or_app_name %></td>
48
+ <td><%= route.constraints %></td>
49
+ <td><%= route.controller %></td>
50
+ <td><%= route.action %></td>
51
+ <td><%= route.internal_to_rails? %></td>
52
+ <td><%= route.engine? %></td>
53
+ </tr>
54
+ <% end %>
55
+ </table>
56
+ </div>
57
+
58
+ <div class="tab-pane <%= 'active' unless @recognized_paths.blank? %>" id="route_tester">
59
+ <p>Paste a URL from your application to quickly get the corresponding controller/action</p>
60
+ <form class="form-horizontal" role="form" method="get">
61
+ <div class="form-group">
62
+ <label for="recognize_path" class="col-sm-2 control-label">URL / Path</label>
63
+ <div class="col-sm-10">
64
+ <input type="text" class="form-control typeahead" name="recognize_path" id="recognize_path" value="<%= @path_to_recognize %>">
65
+ </div>
66
+ </div>
67
+ <div class="form-group">
68
+ <div class="col-sm-offset-2 col-sm-10">
69
+ <button type="submit" class="btn btn-default">Check</button>
70
+ </div>
71
+ </div>
72
+ <hr>
73
+ <% if !@recognized_paths.blank? %>
74
+ <div class="form-group">
75
+ <div class="col-sm-offset-2 col-sm-10">
76
+ <table class="table table-striped">
77
+ <% @recognized_paths.each do |key, value| %>
78
+ <% value.each do |route| %>
79
+ <tr class="<%= 'success' unless route[:error] %>">
80
+ <td><%= key.to_s.upcase %></td>
81
+ <td><%= route[:error] ? route[:error] : route %>
82
+ </tr>
83
+ <% end %>
84
+ <% end %>
85
+ </table>
86
+ </div>
87
+ </div>
88
+ <% end %>
89
+ </form>
90
+
91
+ </div>
92
+ </div>
93
+
@@ -43,7 +43,8 @@
43
43
  <% end %>
44
44
 
45
45
  <%- # Rails 5.x switched to @data_sources from @tables for instance variable %>
46
- <% cached_tablenames = @connection_schema_cache.instance_variable_defined?(:@data_sources) && instance_variable_get(:@data_sources) ||
46
+ <% cached_tablenames = @connection_schema_cache.instance_variable_defined?(:@data_sources) &&
47
+ @connection_schema_cache.instance_variable_get(:@data_sources) ||
47
48
  @connection_schema_cache.instance_variable_get(:@tables) || [] %>
48
49
  <% cached_columns = @connection_schema_cache.instance_variable_get(:@columns) %>
49
50
  <% cached_columns_hash = @connection_schema_cache.instance_variable_get(:@columns_hash) %>
@@ -2,13 +2,11 @@
2
2
 
3
3
  <ul class="nav nav-tabs" role="tablist">
4
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>
5
+ <li><a href="#environment" role="tab" data-toggle="tab">Environment (<%= ENV.size %>)</a></li>
6
+ <li><a href="#load_path" role="tab" data-toggle="tab">Load Path (<%= $LOAD_PATH.size %>)</a></li>
7
+ <li><a href="#loaded_features" role="tab" data-toggle="tab">Loaded Features (<%= $LOADED_FEATURES.size %>)</a></li>
6
8
  <li><a href="#rbconfig" role="tab" data-toggle="tab">Ruby Config</a></li>
7
9
  <li><a href="#bundler" role="tab" data-toggle="tab">Bundler</a></li>
8
- <li><a href="#gc" role="tab" data-toggle="tab">Garbage Collection</a></li>
9
- <li><a href="#load_path" role="tab" data-toggle="tab">Load Path</a></li>
10
- <li><a href="#loaded_features" role="tab" data-toggle="tab">Loaded Features</a></li>
11
-
12
10
  </ul>
13
11
 
14
12
  <div class="tab-content">
@@ -47,29 +45,44 @@
47
45
  <pre><%= RubyVM::OPTS.inspect %></pre>
48
46
  </div>
49
47
 
48
+
50
49
  <div class="tab-pane" id="rbconfig">
51
50
  <h3>RbConfig</h3>
52
- <p>The RbConfig records the compile-time values of... </p>
51
+ <p>RbConfig records the compile-time settings that were used to build ruby.</p>
52
+
53
+ <p>
54
+ <code>RbConfig.ruby</code> = <code><%= RbConfig.ruby -%></code>
55
+ <br>
56
+ <code>RbConfig::TOPDIR</code> = <code><%= RbConfig::TOPDIR -%></code>
57
+ </p>
58
+
59
+ <h3>RbConfig::CONFIG</h3>
53
60
  <table class="table table-condensed" style="width: auto;">
54
61
  <tr>
55
62
  <th>Setting</th>
56
63
  <th>Value</th>
64
+ <th>Unexpanded Value</th>
57
65
  </tr>
58
66
  <% RbConfig::CONFIG.each do |k, v| %>
59
67
  <tr>
60
68
  <td><%= k %></td>
61
69
  <td><code><%= v %></code></td>
70
+ <td><code><%= RbConfig::MAKEFILE_CONFIG[k] %></code></td>
62
71
  </tr>
63
72
  <% end %>
64
73
  </table>
65
74
  </div>
66
75
 
67
76
  <div class="tab-pane" id="environment">
68
- <pre>
69
- <% @filtered_env.each do |key, val| %>
77
+ <p>
78
+ The <code>ENV</code> (<%= ENV.size %> entries) includes
79
+ the environment variables.
80
+ </p>
81
+ <pre>
82
+ <% @filtered_env.each do |key, val| -%>
70
83
  <%= key %> = <%= val %>
71
- <% end %>
72
- </pre>
84
+ <% end -%>
85
+ </pre>
73
86
  </div>
74
87
 
75
88
  <div class="tab-pane" id="bundler">
@@ -92,18 +105,9 @@
92
105
  </dl>
93
106
  </div>
94
107
 
95
- <div class="tab-pane" id="gc">
96
- <dl class="dl-horizontal">
97
- <%- GC.stat.each_pair do |key,val| %>
98
- <dt><%= key %></dt>
99
- <dd><%= val %></dd>
100
- <%- end %>
101
- </dl>
102
- </div>
103
-
104
108
  <div class="tab-pane" id="load_path">
105
109
  <p>
106
- The the <code>$LOAD_PATH</code> (<%= $LOAD_PATH.size %> entries) lists
110
+ The <code>$LOAD_PATH</code> (<%= $LOAD_PATH.size %> entries) lists
107
111
  the directories that will be searched when code is loaded with
108
112
  <code>require</code> or <code>load</code>.
109
113
  </p>
@@ -0,0 +1,80 @@
1
+ ---
2
+ :asset_host:
3
+ Sets the host for the assets. Useful when CDNs are used for hosting assets,
4
+ or when you want to work around the concurrency constraints built-in in browsers
5
+ using different domain aliases. Shorter version of config.action_controller.asset_host.
6
+ :beginning_of_week:
7
+ Sets the default beginning of week for the application. Accepts
8
+ a valid week day symbol (e.g. :monday).
9
+ :cache_classes:
10
+ Controls whether or not application classes and modules should be
11
+ reloaded on each request. Defaults to false in development mode, and true in test
12
+ and production modes.
13
+ :consider_all_requests_local:
14
+ Is a flag. If true then any error will cause detailed debugging information to
15
+ be dumped in the HTTP response, and the Rails::Info controller will show the
16
+ application runtime context in /rails/info/properties.
17
+ :colorize_logging:
18
+ Specifies whether or not to use ANSI color codes when logging information.
19
+ Defaults to true.
20
+ :eager_load:
21
+ When true, eager loads all registered config.eager_load_namespaces. This
22
+ includes your application, engines, Rails frameworks and any other registered namespace.
23
+ :eager_load_namespaces:
24
+ Registers namespaces that are eager loaded when config.eager_load
25
+ is true. All namespaces in the list must respond to the eager_load! method.
26
+ :eager_load_paths:
27
+ Accepts an array of paths from which Rails will eager load on boot
28
+ if cache classes is enabled. Defaults to every folder in the app directory of the
29
+ application.
30
+ :encoding:
31
+ Sets up the application-wide encoding. Defaults to UTF-8.
32
+ :exceptions_app:
33
+ Sets the exceptions application invoked by the ShowException middleware
34
+ when an exception happens. Defaults to ActionDispatch::PublicExceptions.new(Rails.public_path).
35
+ :filter_parameters:
36
+ Used for filtering out the parameters that you don't want shown
37
+ in the logs, such as passwords or credit card numbers. By default, Rails filters
38
+ out passwords by adding Rails.application.config.filter_parameters += [:password]
39
+ in config/initializers/filter_parameter_logging.rb. Parameters filter works by partial
40
+ matching regular expression.
41
+ :force_ssl:
42
+ 'Forces all requests to be served over HTTPS by using the ActionDispatch::SSL
43
+ middleware, and sets config.action_mailer.default_url_options to
44
+ be { protocol: ''https'' }.
45
+ This can be configured by setting config.ssl_options - see the ActionDispatch::SSL
46
+ documentation for details.'
47
+
48
+ :log_formatter:
49
+ Defines the formatter of the Rails logger. This option defaults to an instance
50
+ of ActiveSupport::Logger::SimpleFormatter for all modes except production,
51
+ where it defaults to Logger::Formatter.
52
+
53
+ :log_level:
54
+ Defines the verbosity of the Rails logger. This option defaults to :debug for all environments.
55
+
56
+ :log_tags:
57
+ Accepts a list of methods that the request object responds to. This makes it
58
+ easy to tag log lines with debug information like subdomain and request id -
59
+ both very helpful in debugging multi-user production applications.
60
+
61
+ :logger:
62
+ Accepts a logger conforming to the interface of Log4r or the default Ruby
63
+ Logger class. Defaults to an instance of ActiveSupport::Logger.
64
+
65
+ :middleware:
66
+ Allows you to configure the application's middleware. This is covered in depth
67
+ in the Configuring Middleware of the Ruby Guide.
68
+
69
+ :reload_classes_only_on_change:
70
+ Enables or disables reloading of classes only when tracked files change.
71
+ By default tracks everything on autoload paths and is set to true.
72
+ If config.cache_classes is true, this option is ignored.
73
+
74
+ :session_store:
75
+ Is usually set up in config/initializers/session_store.rb and specifies what class to use to
76
+ store the session. Possible values are :cookie_store which is the default, :mem_cache_store, and :disabled.
77
+ The last one tells Rails not to deal with sessions. Custom session stores can also be specified.
78
+
79
+ :time_zone:
80
+ Sets the default time zone for the application and enables time zone awareness for Active Record.
@@ -0,0 +1,14 @@
1
+ ---
2
+ :file_watcher:
3
+ Is the class used to detect file updates in the filesystem when
4
+ config.reload_classes_only_on_change is true.
5
+ Must conform to ActiveSupport::FileUpdateChecker API.
6
+
7
+ :serve_static_files:
8
+ Configures Rails itself to serve static files. Defaults to true, but in the
9
+ production environment is turned off as the server software (e.g. NGINX or Apache)
10
+ used to run the application should serve static assets instead.
11
+ Unlike the default setting set this to true when running (absolutely not recommended!)
12
+ or testing your app in production mode using WEBrick.
13
+ Otherwise you won't be able use page caching and requests for files that exist
14
+ regularly under the public directory will anyway hit your Rails app.
@@ -0,0 +1,12 @@
1
+ ---
2
+ :file_watcher:
3
+ Is the class used to detect file updates in the file system when config.reload_classes_only_on_change
4
+ is true. Rails ships with ActiveSupport::FileUpdateChecker, the default, and ActiveSupport::EventedFileUpdateChecker
5
+ (this one depends on the listen gem). Custom classes must conform to the ActiveSupport::FileUpdateChecker
6
+ API.
7
+ :enable_dependency_loading:
8
+ When true, enables autoloading, even if the application is eager loaded and
9
+ config.cache_classes is set as true. Defaults to false.
10
+ :debug_exception_response_format:
11
+ Sets the format used in responses when errors occur in development mode.
12
+ Defaults to :api for API only apps and :default for normal apps.
@@ -23,7 +23,13 @@ Tuttle::Engine.routes.draw do
23
23
  get :dependencies, :inflectors, :time_zones
24
24
  end
25
25
 
26
- get '/performance_tuning' => 'performance_tuning#index'
26
+ if defined?(ActiveJob)
27
+ namespace :active_job do
28
+ get '', :action => :index
29
+ end
30
+ end
31
+
32
+ get '/rack_mini_profiler' => 'rack_mini_profiler#index'
27
33
 
28
34
  get '/request' => 'request#index'
29
35
 
@@ -1,22 +1,19 @@
1
1
  require 'tuttle/version'
2
- require 'tuttle/engine' if defined?(Rails)
3
2
 
4
3
  # TODO: clean this up so that mattr_accessor is not needed
5
4
  require 'active_support/core_ext/module/attribute_accessors'
6
5
 
7
6
  module Tuttle
8
-
9
7
  mattr_accessor :automount_engine
10
8
  mattr_accessor :enabled
9
+ mattr_accessor :enable_profiling
11
10
  mattr_accessor :track_notifications
12
11
 
13
- @@automount_engine = @@enabled = nil
14
- @@track_notifications = false
15
-
16
12
  autoload :Instrumenter, 'tuttle/instrumenter'
17
13
 
18
14
  def self.setup
19
15
  yield self
20
16
  end
21
-
22
17
  end
18
+
19
+ require 'tuttle/engine' if defined?(Rails)