rspec-dump-profile-customizer 0.0.1 → 0.0.2
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/Gemfile.lock +70 -0
- data/README.md +14 -4
- data/Rakefile +1 -33
- data/doc/img/rspec-dump-profile-customizer-sample.png +0 -0
- data/lib/rspec-dump-profile-customizer.rb +0 -3
- data/lib/rspec-dump-profile-customizer/version.rb +1 -1
- data/rspec-dump-profile-customizer.gemspec +3 -9
- metadata +11 -15
data/Gemfile.lock
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rspec-dump-profile-customizer (0.0.1)
|
5
|
+
railties (>= 3.0.0)
|
6
|
+
rspec (>= 2.0.0)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
specs:
|
10
|
+
actionpack (3.2.6)
|
11
|
+
activemodel (= 3.2.6)
|
12
|
+
activesupport (= 3.2.6)
|
13
|
+
builder (~> 3.0.0)
|
14
|
+
erubis (~> 2.7.0)
|
15
|
+
journey (~> 1.0.1)
|
16
|
+
rack (~> 1.4.0)
|
17
|
+
rack-cache (~> 1.2)
|
18
|
+
rack-test (~> 0.6.1)
|
19
|
+
sprockets (~> 2.1.3)
|
20
|
+
activemodel (3.2.6)
|
21
|
+
activesupport (= 3.2.6)
|
22
|
+
builder (~> 3.0.0)
|
23
|
+
activesupport (3.2.6)
|
24
|
+
i18n (~> 0.6)
|
25
|
+
multi_json (~> 1.0)
|
26
|
+
builder (3.0.0)
|
27
|
+
diff-lcs (1.1.3)
|
28
|
+
erubis (2.7.0)
|
29
|
+
hike (1.2.1)
|
30
|
+
i18n (0.6.0)
|
31
|
+
journey (1.0.4)
|
32
|
+
json (1.7.3)
|
33
|
+
multi_json (1.3.6)
|
34
|
+
rack (1.4.1)
|
35
|
+
rack-cache (1.2)
|
36
|
+
rack (>= 0.4)
|
37
|
+
rack-ssl (1.3.2)
|
38
|
+
rack
|
39
|
+
rack-test (0.6.1)
|
40
|
+
rack (>= 1.0)
|
41
|
+
railties (3.2.6)
|
42
|
+
actionpack (= 3.2.6)
|
43
|
+
activesupport (= 3.2.6)
|
44
|
+
rack-ssl (~> 1.3.2)
|
45
|
+
rake (>= 0.8.7)
|
46
|
+
rdoc (~> 3.4)
|
47
|
+
thor (>= 0.14.6, < 2.0)
|
48
|
+
rake (0.9.2.2)
|
49
|
+
rdoc (3.12)
|
50
|
+
json (~> 1.4)
|
51
|
+
rspec (2.11.0)
|
52
|
+
rspec-core (~> 2.11.0)
|
53
|
+
rspec-expectations (~> 2.11.0)
|
54
|
+
rspec-mocks (~> 2.11.0)
|
55
|
+
rspec-core (2.11.0)
|
56
|
+
rspec-expectations (2.11.1)
|
57
|
+
diff-lcs (~> 1.1.3)
|
58
|
+
rspec-mocks (2.11.1)
|
59
|
+
sprockets (2.1.3)
|
60
|
+
hike (~> 1.2)
|
61
|
+
rack (~> 1.0)
|
62
|
+
tilt (~> 1.1, != 1.3.0)
|
63
|
+
thor (0.15.4)
|
64
|
+
tilt (1.3.3)
|
65
|
+
|
66
|
+
PLATFORMS
|
67
|
+
ruby
|
68
|
+
|
69
|
+
DEPENDENCIES
|
70
|
+
rspec-dump-profile-customizer!
|
data/README.md
CHANGED
@@ -4,7 +4,13 @@ RSpecDumpProfileCustomizer provides report about worst N slow test and/or slow t
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
7
|
+
Add 'rspec-dump-profile-customizer' gem to your existing app’s Gemfile:
|
8
|
+
|
9
|
+
gem 'rspec-dump-profile-customizer'
|
10
|
+
|
11
|
+
Bundle it:
|
12
|
+
|
13
|
+
% bundle
|
8
14
|
|
9
15
|
## Usage
|
10
16
|
|
@@ -12,8 +18,8 @@ Set up rspec-dump-profile-customizer is easy. Just put it in your Gemfile and ad
|
|
12
18
|
|
13
19
|
application.rb
|
14
20
|
|
15
|
-
config.rspec_dump_profile.number =
|
16
|
-
config.rspec_dump_profile.second =
|
21
|
+
config.rspec_dump_profile.number = 15
|
22
|
+
config.rspec_dump_profile.second = 3.5
|
17
23
|
|
18
24
|
Then, run your specs like this from now on:
|
19
25
|
|
@@ -28,13 +34,17 @@ Then, run your specs like this from now on:
|
|
28
34
|
$ bundle exec rake spec
|
29
35
|
|
30
36
|
|
37
|
+
|
38
|
+

|
39
|
+
|
40
|
+
|
31
41
|
## Prerequisites
|
32
42
|
|
33
43
|
A Rails >= 3.0 Application with RSpec >= 2.0
|
34
44
|
|
35
45
|
## Contributing
|
36
46
|
|
37
|
-
|
47
|
+
Send me your pull requests.
|
38
48
|
|
39
49
|
## Copyright
|
40
50
|
|
data/Rakefile
CHANGED
@@ -1,33 +1 @@
|
|
1
|
-
require '
|
2
|
-
require "rake"
|
3
|
-
require "rake/clean"
|
4
|
-
require "pathname"
|
5
|
-
|
6
|
-
task :default do
|
7
|
-
sh "rake -T"
|
8
|
-
end
|
9
|
-
|
10
|
-
CLEAN.include "rspec-dump-profile-customizer-*.gem"
|
11
|
-
|
12
|
-
|
13
|
-
namespace :gem do
|
14
|
-
|
15
|
-
desc "build rspec-dump-profile-customizer gem"
|
16
|
-
task :build do
|
17
|
-
sh "rake clean && gem build rspec-dump-profile-customizer.gemspec"
|
18
|
-
end
|
19
|
-
|
20
|
-
desc "run gem install on the built gem"
|
21
|
-
task :install => :build do
|
22
|
-
sh "gem install rspec-dump-profile-customizer*.gem"
|
23
|
-
end
|
24
|
-
|
25
|
-
desc "push rspec-dump-profile-customizer.gem to RubyGems"
|
26
|
-
task :release do
|
27
|
-
if Pathname.new("~/.gem/credentials").expand_path.exist?
|
28
|
-
sh "gem push rspec-dump-profile-customizer*.gem"
|
29
|
-
else
|
30
|
-
raise "Your rubygems.org credentials aren't set. Run `gem push` to set them."
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
1
|
+
require 'bundler/gem_tasks'
|
Binary file
|
@@ -10,11 +10,9 @@ module RSpecDumpProfileCustomizer
|
|
10
10
|
config.rspec_dump_profile = ActiveSupport::OrderedOptions.new
|
11
11
|
|
12
12
|
config.after_initialize do
|
13
|
-
|
14
13
|
RSpec::Core::Formatters::BaseTextFormatter.class_exec(config.rspec_dump_profile.number, config.rspec_dump_profile.second) do |number, second|
|
15
14
|
|
16
15
|
define_method("dump_profile") do
|
17
|
-
|
18
16
|
if number
|
19
17
|
sorted_examples_for_number = examples.sort_by {|example| example.execution_result[:run_time] }.
|
20
18
|
reverse.first(number)
|
@@ -28,7 +26,6 @@ module RSpecDumpProfileCustomizer
|
|
28
26
|
output.puts " #{yellow(format_seconds(example.execution_result[:run_time]))} #{yellow("seconds")} #{format_caller(example.location)}"
|
29
27
|
end
|
30
28
|
end
|
31
|
-
|
32
29
|
if second
|
33
30
|
output.puts cyan("\nSlow examples (over #{second} seconds):\n")
|
34
31
|
sorted_examples_for_number = examples.sort_by { |example| example.execution_result[:run_time] }.
|
@@ -13,15 +13,9 @@ Gem::Specification.new do |s|
|
|
13
13
|
RSpecDumpProfileCustomizer provide report about worst N slow test and/or slow test over M seconds.
|
14
14
|
You can set "N" and "M" in rails configuration file, application.rb.
|
15
15
|
EOS
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
"Rakefile",
|
20
|
-
"License.txt",
|
21
|
-
"rspec-dump-profile-customizer.gemspec",
|
22
|
-
"lib/rspec-dump-profile-customizer.rb",
|
23
|
-
"lib/rspec-dump-profile-customizer/version.rb",
|
24
|
-
]
|
16
|
+
|
17
|
+
s.files = `git ls-files`.split("\n")
|
18
|
+
|
25
19
|
s.require_paths = ["lib"]
|
26
20
|
s.add_dependency "railties", ">= 3.0.0"
|
27
21
|
s.add_dependency "rspec", ">= 2.0.0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-dump-profile-customizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-08-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
16
|
-
requirement: &
|
16
|
+
requirement: &78256100 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 3.0.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *78256100
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rspec
|
27
|
-
requirement: &
|
27
|
+
requirement: &78255680 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: 2.0.0
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *78255680
|
36
36
|
description: ! " RSpecDumpProfileCustomizer provide report about worst N slow test
|
37
37
|
and/or slow test over M seconds.\n You can set \"N\" and \"M\" in rails configuration
|
38
38
|
file, application.rb.\n"
|
@@ -43,12 +43,14 @@ extensions: []
|
|
43
43
|
extra_rdoc_files: []
|
44
44
|
files:
|
45
45
|
- Gemfile
|
46
|
+
- Gemfile.lock
|
47
|
+
- License.txt
|
46
48
|
- README.md
|
47
49
|
- Rakefile
|
48
|
-
-
|
49
|
-
- rspec-dump-profile-customizer.gemspec
|
50
|
+
- doc/img/rspec-dump-profile-customizer-sample.png
|
50
51
|
- lib/rspec-dump-profile-customizer.rb
|
51
52
|
- lib/rspec-dump-profile-customizer/version.rb
|
53
|
+
- rspec-dump-profile-customizer.gemspec
|
52
54
|
homepage: https://github.com/mori-dev/rspec-dump-profile-customizer
|
53
55
|
licenses: []
|
54
56
|
post_install_message:
|
@@ -61,21 +63,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
61
63
|
- - ! '>='
|
62
64
|
- !ruby/object:Gem::Version
|
63
65
|
version: '0'
|
64
|
-
segments:
|
65
|
-
- 0
|
66
|
-
hash: -249835232104295534
|
67
66
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
67
|
none: false
|
69
68
|
requirements:
|
70
69
|
- - ! '>='
|
71
70
|
- !ruby/object:Gem::Version
|
72
71
|
version: '0'
|
73
|
-
segments:
|
74
|
-
- 0
|
75
|
-
hash: -249835232104295534
|
76
72
|
requirements: []
|
77
73
|
rubyforge_project:
|
78
|
-
rubygems_version: 1.8.
|
74
|
+
rubygems_version: 1.8.17
|
79
75
|
signing_key:
|
80
76
|
specification_version: 3
|
81
77
|
summary: RSpecDumpProfileCustomizer - a small rspec extension for detecting slow test
|