copperegg-apm 1.0.0.pre14 → 1.0.0.pre15

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.
data/README.md CHANGED
@@ -215,14 +215,14 @@ If you prefer to add RUM to your HTML pages manually, you can call the helper me
215
215
  <%= ce_rum_javascript_tag %>
216
216
  ```
217
217
 
218
- For versions prior to 3.2, you will need to include the `CopperEgg::APM::RUM` module into your helper modules:
218
+ For versions prior to 3.0, you may need to include the `CopperEgg::APM::RUM` module into your helper modules:
219
219
 
220
220
  ```ruby
221
221
  module ApplicationHelper
222
222
  include CopperEgg::APM::RUM
223
223
  ```
224
224
 
225
- Alternatively, you can include the module in your controllers:
225
+ or include the module in your controllers:
226
226
 
227
227
  ```ruby
228
228
  class UsersController < ActionController::Base
@@ -55,6 +55,7 @@ module CopperEgg
55
55
  else
56
56
  puts
57
57
  puts "#{separator}\n#{header_columns}\n#{separator}\n#{benchmarkable_methods.map {|method| method_columns(method)}.join("\n")}\n#{separator}"
58
+ puts "Benchmark level: #{Configuration.benchmark_methods_level}"
58
59
  puts "#{benchmarkable_methods.size} methods defined in #{classes_count} classes across #{file_count} files. #{benchmarkable_methods.size - excluded_methods.size == 1 ? "1 method" : "#{benchmarkable_methods.size - excluded_methods.size} methods"} benchmarked."
59
60
  puts
60
61
  end
@@ -170,13 +170,7 @@ module CopperEgg
170
170
 
171
171
  def self.configure(&block)
172
172
  yield(self)
173
- if defined?(::Rails) && ::Rails.respond_to?(:configuration)
174
- Rails.configuration.after_initialize do
175
- self.init
176
- end
177
- else
178
- self.init
179
- end
173
+ self.init
180
174
  end
181
175
 
182
176
  def self.init
@@ -198,7 +192,13 @@ module CopperEgg
198
192
  @@include_methods = []
199
193
  else
200
194
  if @@benchmark_methods_level != :disabled
201
- CopperEgg::APM.add_method_benchmarking
195
+ if defined?(::Rails) && ::Rails.respond_to?(:configuration)
196
+ ::Rails.configuration.after_initialize do
197
+ CopperEgg::APM.add_method_benchmarking
198
+ end
199
+ else
200
+ CopperEgg::APM.add_method_benchmarking
201
+ end
202
202
  end
203
203
 
204
204
  if @@benchmark_browser && defined?(::Rails) && ::Rails.respond_to?(:configuration) && ::Rails.configuration.respond_to?(:middleware) && ::Rails.configuration.middleware.respond_to?(:use)
@@ -5,7 +5,7 @@ module CopperEgg
5
5
  module APM
6
6
  class Railtie < ::Rails::Railtie
7
7
  initializer "copperegg_apm.helpers" do
8
- ActiveSupport.on_load_all do
8
+ ActiveSupport.on_load(:action_controller) do
9
9
  helper CopperEgg::APM::RUM
10
10
  end
11
11
  end
@@ -1,5 +1,5 @@
1
1
  module CopperEgg
2
2
  module APM
3
- GEM_VERSION = '1.0.0.pre14' unless defined? GEM_VERSION
3
+ GEM_VERSION = '1.0.0.pre15' unless defined? GEM_VERSION
4
4
  end
5
5
  end
@@ -3,7 +3,8 @@ CopperEgg::APM.configure do |config|
3
3
  config.benchmark_sql = true
4
4
  config.benchmark_exceptions = true
5
5
  config.benchmark_http = true
6
- config.benchmark_methods :disabled # To enable, set to :basic, :moderate, or :full
6
+ config.benchmark_browser = false
7
+ config.benchmark_methods :disabled # To enable, set to :basic, :moderate, :full, or :custom
7
8
  # Below are examples of customizing method benchmarking
8
9
  # config.benchmark_methods :basic, :exclude => %w(UsersController#new UsersController#edit), :include => %w(User UserRole perform)
9
10
  # config.benchmark_methods :custom, %w(User Client index ClientsController#create)
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: copperegg-apm
3
3
  version: !ruby/object:Gem::Version
4
- hash: -3216946352
4
+ hash: -778372730
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
9
  - 0
10
10
  - pre
11
- - 14
12
- version: 1.0.0.pre14
11
+ - 15
12
+ version: 1.0.0.pre15
13
13
  platform: ruby
14
14
  authors:
15
15
  - Mike Bradford
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2013-06-27 00:00:00 Z
20
+ date: 2013-06-28 00:00:00 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: rake
@@ -345,7 +345,7 @@ rubyforge_project:
345
345
  rubygems_version: 1.8.25
346
346
  signing_key:
347
347
  specification_version: 3
348
- summary: copperegg-apm-1.0.0.pre14
348
+ summary: copperegg-apm-1.0.0.pre15
349
349
  test_files:
350
350
  - spec/action_controller_spec.rb
351
351
  - spec/apm_spec.rb