derailed_benchmarks 1.1.3 → 1.3.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b976cfecb34ae2e8c405bc7ad3aa3a030850174
4
- data.tar.gz: a5fb83252151a6f084d05bea7309aa2825a24f0d
3
+ metadata.gz: b7d529865331b3c126efb52e13518c229ee35404
4
+ data.tar.gz: 4fa199d4d5ca3ffe0c80b10a3ad42828ab5dc3bf
5
5
  SHA512:
6
- metadata.gz: 5451c014af77280b11a4a595d2a0297f2246891b89e23ca256df9b3306b819379c91c30915848ede095316b545127a866ca5e1f3b9da820fad2bd7f26f4490f7
7
- data.tar.gz: 6e42ef879390e7334a776ebf477359c768d3bf7bc628c291474a69f9d679af8b3e46529ea75ddf217c8dda9d453b0c0ca159d7448fd3e7b49194a9a9a64986a6
6
+ metadata.gz: e6ef7f085eff11d02879fa383d2084d4fd437feace36a75e3182bc159980c5e21be3d277fd841c7efa675d269d4c3eed0cf3e46ec4d2dbd47faf28dbc1ceb63b
7
+ data.tar.gz: 1fc3922d1ac62bf7d3b22b0234f51dac5e7ef93ccdc025f4041ef156db9fcc022bd384f0e093d57b452286222241b01de6eeb6662a756948a605c767cbdc87cd
@@ -1,5 +1,10 @@
1
1
  # A Log of Changes!
2
2
 
3
+ ## [1.3.0] - 2015-01-07
4
+
5
+ - Allow environment variable to skip Active Record setup.
6
+ - Allow Rack 2 to work with Derailed.
7
+
3
8
  ## [1.1.3] - 2015-10-15
4
9
 
5
10
  - Update docs
@@ -1,12 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- derailed_benchmarks (1.1.3)
4
+ derailed_benchmarks (1.3.0)
5
5
  benchmark-ips (~> 2)
6
6
  get_process_mem (~> 0)
7
7
  heapy (~> 0)
8
8
  memory_profiler (~> 0)
9
- rack (~> 1)
9
+ rack (>= 1)
10
10
  rake (~> 10)
11
11
  thor (~> 0.19)
12
12
 
@@ -59,7 +59,7 @@ GEM
59
59
  warden (~> 1.2.3)
60
60
  erubis (2.7.0)
61
61
  get_process_mem (0.2.0)
62
- heapy (0.1.0)
62
+ heapy (0.1.2)
63
63
  hike (1.2.3)
64
64
  i18n (0.7.0)
65
65
  journey (1.0.4)
@@ -67,7 +67,7 @@ GEM
67
67
  mail (2.5.4)
68
68
  mime-types (~> 1.16)
69
69
  treetop (~> 1.4.8)
70
- memory_profiler (0.9.5)
70
+ memory_profiler (0.9.6)
71
71
  mime-types (1.25.1)
72
72
  mini_portile (0.6.2)
73
73
  multi_json (1.11.0)
@@ -136,4 +136,4 @@ DEPENDENCIES
136
136
  test-unit (~> 3.0)
137
137
 
138
138
  BUNDLED WITH
139
- 1.10.6
139
+ 1.11.2
data/README.md CHANGED
@@ -24,7 +24,7 @@ curl 7.37.1 #...
24
24
 
25
25
  Put this in your gemfile:
26
26
 
27
- ```
27
+ ```ruby
28
28
  gem 'derailed', group: :development
29
29
  ```
30
30
 
@@ -34,7 +34,7 @@ While executing your commands you may need to use `bundle exec` before typing th
34
34
 
35
35
  To use all profiling methods available also add:
36
36
 
37
- ```
37
+ ```ruby
38
38
  gem 'stackprof', group: :development
39
39
  ```
40
40
 
@@ -427,6 +427,13 @@ This boots a webserver and hits it using `curl` instead of in memory. This is us
427
427
 
428
428
  Note: this plugs in the given webserver directly into rack, it doesn't use any `puma.config` file etc. that you have set-up. If you want to do this, i'm open to suggestions on how (and pull requests)
429
429
 
430
+ ### Excluding ActiveRecord
431
+
432
+ By default, derailed will load ActiveRecord if the gem is included as a dependency. It is included by default, if you just include the `rails` gem. If you are using a different ORM, you will either need to only include the `railties` gem, or set the `DERAILED_SKIP_ACTIVE_RECORD` flag.
433
+
434
+ ```
435
+ $ DERAILED_SKIP_ACTIVE_RECORD=true
436
+ ```
430
437
 
431
438
  ### Running in a different environment
432
439
 
@@ -479,7 +486,7 @@ $ rake -f perf.rake -T
479
486
 
480
487
  Using Rails? You don't need to do anything special. If you're using Rack, you need to tell us how to boot your app. In your `perf.rake` file add a task:
481
488
 
482
- ```
489
+ ```ruby
483
490
  namespace :perf do
484
491
  task :rack_load do
485
492
  DERAILED_APP = # your code here
@@ -533,7 +540,7 @@ $ cat perf.rake
533
540
 
534
541
  If you want you can customize the user that is logged in by setting that value in your `perf.rake` file.
535
542
 
536
- ```
543
+ ```ruby
537
544
  DerailedBenchmarks.auth.user = -> { User.find_or_create!(twitter: "schneems") }
538
545
  ```
539
546
 
@@ -76,7 +76,14 @@ class DerailedBenchmarkCLI < Thor
76
76
  require 'bundler/setup'
77
77
 
78
78
  begin
79
- require 'rails/all'
79
+ if ENV["DERAILED_SKIP_ACTIVE_RECORD"]
80
+ require "action_controller/railtie"
81
+ require "action_mailer/railtie"
82
+ require "sprockets/railtie"
83
+ require "rails/test_unit/railtie"
84
+ else
85
+ require 'rails/all'
86
+ end
80
87
  rescue LoadError
81
88
  end
82
89
  end
@@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
22
22
  gem.add_dependency "memory_profiler", "~> 0"
23
23
  gem.add_dependency "get_process_mem", "~> 0"
24
24
  gem.add_dependency "benchmark-ips", "~> 2"
25
- gem.add_dependency "rack", "~> 1"
25
+ gem.add_dependency "rack", ">= 1"
26
26
  gem.add_dependency "rake", "~> 10"
27
27
  gem.add_dependency "thor", "~> 0.19"
28
28
 
@@ -28,7 +28,7 @@ namespace :perf do
28
28
  DERAILED_APP.initialize! unless DERAILED_APP.instance_variable_get(:@initialized)
29
29
  end
30
30
 
31
- if defined? ActiveRecord
31
+ if ENV["DERAILED_SKIP_ACTIVE_RECORD"] && defined? ActiveRecord
32
32
  if defined? ActiveRecord::Tasks::DatabaseTasks
33
33
  ActiveRecord::Tasks::DatabaseTasks.create_current
34
34
  else # Rails 3.2
@@ -1,3 +1,3 @@
1
1
  module DerailedBenchmarks
2
- VERSION = "1.1.3"
2
+ VERSION = "1.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: derailed_benchmarks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Schneeman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-15 00:00:00.000000000 Z
11
+ date: 2016-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: heapy
@@ -70,14 +70,14 @@ dependencies:
70
70
  name: rack
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '1'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1'
83
83
  - !ruby/object:Gem::Dependency
@@ -250,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
250
250
  version: '0'
251
251
  requirements: []
252
252
  rubyforge_project:
253
- rubygems_version: 2.4.5.1
253
+ rubygems_version: 2.5.0
254
254
  signing_key:
255
255
  specification_version: 4
256
256
  summary: Benchmarks designed to performance test your ENTIRE site