rspec-prof 0.0.1

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.
@@ -0,0 +1,71 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{rspec-prof}
8
+ s.version = "0.0.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Colin MacKenzie IV"]
12
+ s.date = %q{2010-07-13}
13
+ s.description = %q{Integrates ruby-prof with RSpec, allowing you to easily profile your RSpec examples.}
14
+ s.email = %q{sinisterchipmunk@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ "LICENSE",
21
+ "README.rdoc",
22
+ "Rakefile",
23
+ "VERSION",
24
+ "lib/rspec-prof.rb",
25
+ "lib/rspec-prof/profiler.rb",
26
+ "pkg/rspec-prof-0.0.1.gem",
27
+ "profiles/1-RSpecProf__should_profile_rspec.html",
28
+ "profiles/2-RSpecProf__should_profile_rspec.txt",
29
+ "profiles/3-RSpecProf__should_profile_rspec.txt",
30
+ "profiles/5-RSpecProf__should_profile_rspec.html",
31
+ "profiles/6-RSpecProf__should_profile_rspec.html",
32
+ "profiles/7-RSpecProf_profile_multiple__before(:all).html",
33
+ "rspec-prof.gemspec",
34
+ "spec/rspec-prof_spec.rb",
35
+ "spec/spec.opts",
36
+ "spec/spec_helper.rb"
37
+ ]
38
+ s.homepage = %q{http://github.com/sinisterchipmunk/rspec-prof}
39
+ s.rdoc_options = ["--charset=UTF-8"]
40
+ s.require_paths = ["lib"]
41
+ s.rubygems_version = %q{1.3.7}
42
+ s.summary = %q{Integrates ruby-prof with RSpec, allowing you to easily profile your RSpec examples.}
43
+ s.test_files = [
44
+ "spec/rspec-prof_spec.rb",
45
+ "spec/spec.opts",
46
+ "spec/spec_helper.rb"
47
+ ]
48
+
49
+ if s.respond_to? :specification_version then
50
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
51
+ s.specification_version = 3
52
+
53
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
54
+ s.add_runtime_dependency(%q<sc-core-ext>, [">= 1.2.1"])
55
+ s.add_runtime_dependency(%q<rspec>, [">= 0"])
56
+ s.add_runtime_dependency(%q<ruby-prof>, [">= 0"])
57
+ s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
58
+ else
59
+ s.add_dependency(%q<sc-core-ext>, [">= 1.2.1"])
60
+ s.add_dependency(%q<rspec>, [">= 0"])
61
+ s.add_dependency(%q<ruby-prof>, [">= 0"])
62
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
63
+ end
64
+ else
65
+ s.add_dependency(%q<sc-core-ext>, [">= 1.2.1"])
66
+ s.add_dependency(%q<rspec>, [">= 0"])
67
+ s.add_dependency(%q<ruby-prof>, [">= 0"])
68
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
69
+ end
70
+ end
71
+
@@ -0,0 +1,43 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "RSpecProf" do
4
+ # I'm still at a loss as to how to spec extensions to rspec short of just using the extension.
5
+
6
+ shared_examples_for "profiling rspec" do
7
+ it "should profile rspec" do
8
+ # uhh, how to measure success?
9
+ sleep(1)
10
+ end
11
+ end
12
+
13
+ profile do
14
+ it_should_behave_like "profiling rspec"
15
+ end
16
+
17
+ profile :printer => :graph do
18
+ it_should_behave_like "profiling rspec"
19
+ end
20
+
21
+ profile :measure_mode => "wall_time", :printer => :graph do
22
+ it_should_behave_like "profiling rspec"
23
+ end
24
+
25
+ profile :file => StringIO.new("") do
26
+ it_should_behave_like "profiling rspec"
27
+ end
28
+
29
+ profile :min_percent => 0.01 do
30
+ it_should_behave_like "profiling rspec"
31
+ end
32
+
33
+ profile :each do
34
+ it_should_behave_like "profiling rspec"
35
+ end
36
+
37
+ context "profile multiple" do
38
+ profile :all do
39
+ it "should profile 1" do sleep(1); end
40
+ it "should profile 2" do 100000.times { }; end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1 @@
1
+ --color
@@ -0,0 +1,9 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+ require 'rspec-prof'
4
+ require 'spec'
5
+ require 'spec/autorun'
6
+
7
+ Spec::Runner.configure do |config|
8
+
9
+ end
metadata ADDED
@@ -0,0 +1,145 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rspec-prof
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Colin MacKenzie IV
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-07-13 00:00:00 -04:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: sc-core-ext
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 29
30
+ segments:
31
+ - 1
32
+ - 2
33
+ - 1
34
+ version: 1.2.1
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: rspec
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 3
46
+ segments:
47
+ - 0
48
+ version: "0"
49
+ type: :runtime
50
+ version_requirements: *id002
51
+ - !ruby/object:Gem::Dependency
52
+ name: ruby-prof
53
+ prerelease: false
54
+ requirement: &id003 !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ hash: 3
60
+ segments:
61
+ - 0
62
+ version: "0"
63
+ type: :runtime
64
+ version_requirements: *id003
65
+ - !ruby/object:Gem::Dependency
66
+ name: rspec
67
+ prerelease: false
68
+ requirement: &id004 !ruby/object:Gem::Requirement
69
+ none: false
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ hash: 13
74
+ segments:
75
+ - 1
76
+ - 2
77
+ - 9
78
+ version: 1.2.9
79
+ type: :development
80
+ version_requirements: *id004
81
+ description: Integrates ruby-prof with RSpec, allowing you to easily profile your RSpec examples.
82
+ email: sinisterchipmunk@gmail.com
83
+ executables: []
84
+
85
+ extensions: []
86
+
87
+ extra_rdoc_files:
88
+ - LICENSE
89
+ - README.rdoc
90
+ files:
91
+ - LICENSE
92
+ - README.rdoc
93
+ - Rakefile
94
+ - VERSION
95
+ - lib/rspec-prof.rb
96
+ - lib/rspec-prof/profiler.rb
97
+ - pkg/rspec-prof-0.0.1.gem
98
+ - profiles/1-RSpecProf__should_profile_rspec.html
99
+ - profiles/2-RSpecProf__should_profile_rspec.txt
100
+ - profiles/3-RSpecProf__should_profile_rspec.txt
101
+ - profiles/5-RSpecProf__should_profile_rspec.html
102
+ - profiles/6-RSpecProf__should_profile_rspec.html
103
+ - profiles/7-RSpecProf_profile_multiple__before(:all).html
104
+ - rspec-prof.gemspec
105
+ - spec/rspec-prof_spec.rb
106
+ - spec/spec.opts
107
+ - spec/spec_helper.rb
108
+ has_rdoc: true
109
+ homepage: http://github.com/sinisterchipmunk/rspec-prof
110
+ licenses: []
111
+
112
+ post_install_message:
113
+ rdoc_options:
114
+ - --charset=UTF-8
115
+ require_paths:
116
+ - lib
117
+ required_ruby_version: !ruby/object:Gem::Requirement
118
+ none: false
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ hash: 3
123
+ segments:
124
+ - 0
125
+ version: "0"
126
+ required_rubygems_version: !ruby/object:Gem::Requirement
127
+ none: false
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ hash: 3
132
+ segments:
133
+ - 0
134
+ version: "0"
135
+ requirements: []
136
+
137
+ rubyforge_project:
138
+ rubygems_version: 1.3.7
139
+ signing_key:
140
+ specification_version: 3
141
+ summary: Integrates ruby-prof with RSpec, allowing you to easily profile your RSpec examples.
142
+ test_files:
143
+ - spec/rspec-prof_spec.rb
144
+ - spec/spec.opts
145
+ - spec/spec_helper.rb