rspec_profiling 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.
- checksums.yaml +9 -9
- data/README.md +9 -1
- data/lib/rspec_profiling/collectors/csv.rb +2 -2
- data/lib/rspec_profiling/collectors/database.rb +2 -2
- data/lib/rspec_profiling/current_commit.rb +15 -2
- data/lib/rspec_profiling/run.rb +2 -2
- data/lib/rspec_profiling/version.rb +1 -1
- data/rspec_profiling.gemspec +1 -1
- data/spec/collectors/database_spec.rb +3 -3
- data/spec/run_spec.rb +1 -1
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MGQ1MzhlZmZhOGNmYzE0YTI2MTgyOWEwYTZmYjNiMDc3NGE4YWJmMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
7
|
-
|
6
|
+
ZWUzMzM4ZWEwMDc4NTY1NzQyMTU3ZGQ0MTg2Y2M5NzQwMzNhMjM4OQ==
|
7
|
+
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2E1MDhmMzkwZWU2YTEzM2NhN2I3ZDFjY2E0MWQyNzgyNzZmZDUzYThjOTk2
|
10
|
+
YWE4NzJkOTNhNmVlNWRlZGQzNDEzM2E2ZDk2MGZjNDQ1MTZlNmY0MjFhNWFj
|
11
|
+
YTkxMDkwMDA2YTNjNjVlZDRmNGYwZDc1MzA1ZjlmZTFmODU4YzA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Yzc3OTZkM2Y4ZjEzYzkwMmIwYjY1NjEzODFlNTM3YjhjOGM2ODkzZmU1Y2I0
|
14
|
+
NGU5YjM2MDc0MTc1MTVlYzhiMDA4Mjc2NzM2MmFkNmJkMjhjOTc3YWIxZjUx
|
15
|
+
OWU2ZDhmOWQzYTFmMDg5NTcxYTYyOTVmMjA2ZDMzNGRmNjg0MGU=
|
data/README.md
CHANGED
@@ -5,7 +5,7 @@ with interesting attributes. For example, find the slowest specs, or the
|
|
5
5
|
spec which issues the most queries.
|
6
6
|
|
7
7
|
Collected attributes include:
|
8
|
-
- git commit SHA and date
|
8
|
+
- git commit SHA (or SVN revision) and date
|
9
9
|
- example file, line number and description
|
10
10
|
- example status (i.e. passed or failed)
|
11
11
|
- example time
|
@@ -127,3 +127,11 @@ rspec_profiling:uninstall`.
|
|
127
127
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
128
128
|
4. Push to the branch (`git push origin my-new-feature`)
|
129
129
|
5. Create new Pull Request
|
130
|
+
|
131
|
+
## About Foraker Labs
|
132
|
+
|
133
|
+
<img src="http://assets.foraker.com/foraker_logo.png" width="400" height="62">
|
134
|
+
|
135
|
+
This project is maintained by Foraker Labs. The names and logos of Foraker Labs are fully owned and copyright Foraker Design, LLC.
|
136
|
+
|
137
|
+
Foraker Labs is a Boulder-based Ruby on Rails and iOS development shop. Please reach out if we can [help build your product](http://www.foraker.com).
|
@@ -4,12 +4,25 @@ module RspecProfiling
|
|
4
4
|
module CurrentCommit
|
5
5
|
extend self
|
6
6
|
|
7
|
+
def git?
|
8
|
+
`git rev-parse 2>&1`
|
9
|
+
$?.success?
|
10
|
+
end
|
11
|
+
|
7
12
|
def sha
|
8
|
-
|
13
|
+
if git?
|
14
|
+
`git rev-parse HEAD`
|
15
|
+
else
|
16
|
+
`svn info -r 'HEAD' | grep "Revision" | cut -f2 -d' '`
|
17
|
+
end
|
9
18
|
end
|
10
19
|
|
11
20
|
def time
|
12
|
-
|
21
|
+
if git?
|
22
|
+
Time.parse `git show -s --format=%ci #{sha}`
|
23
|
+
else
|
24
|
+
Time.parse `svn info -r 'HEAD' | grep "Last Changed Date" | cut -f4,5,6 -d' '`
|
25
|
+
end
|
13
26
|
end
|
14
27
|
end
|
15
28
|
end
|
data/lib/rspec_profiling/run.rb
CHANGED
@@ -19,8 +19,8 @@ module RspecProfiling
|
|
19
19
|
|
20
20
|
def example_finished(*args)
|
21
21
|
collector.insert({
|
22
|
-
|
23
|
-
|
22
|
+
commit: CurrentCommit.sha,
|
23
|
+
date: CurrentCommit.time,
|
24
24
|
file: @current_example.file,
|
25
25
|
line_number: @current_example.line_number,
|
26
26
|
description: @current_example.description,
|
data/rspec_profiling.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["bae@foraker.com"]
|
11
11
|
spec.description = %q{Profile RSpec test suites}
|
12
12
|
spec.summary = %q{Profile RSpec test suites}
|
13
|
-
spec.homepage = "
|
13
|
+
spec.homepage = ""
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
@@ -13,8 +13,8 @@ module RspecProfiling
|
|
13
13
|
|
14
14
|
before do
|
15
15
|
collector.insert({
|
16
|
-
|
17
|
-
|
16
|
+
commit: "ABC123",
|
17
|
+
date: "Thu Dec 18 12:00:00 2012",
|
18
18
|
file: "/some/file.rb",
|
19
19
|
line_number: 10,
|
20
20
|
description: "Some spec",
|
@@ -32,7 +32,7 @@ module RspecProfiling
|
|
32
32
|
end
|
33
33
|
|
34
34
|
it "records the commit SHA" do
|
35
|
-
expect(result.
|
35
|
+
expect(result.commit).to eq "ABC123"
|
36
36
|
end
|
37
37
|
|
38
38
|
it "records the commit date" do
|
data/spec/run_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec_profiling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Eddy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sqlite3
|
@@ -107,7 +107,7 @@ files:
|
|
107
107
|
- rspec_profiling.gemspec
|
108
108
|
- spec/collectors/database_spec.rb
|
109
109
|
- spec/run_spec.rb
|
110
|
-
homepage:
|
110
|
+
homepage: ''
|
111
111
|
licenses:
|
112
112
|
- MIT
|
113
113
|
metadata: {}
|
@@ -127,11 +127,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
127
|
version: '0'
|
128
128
|
requirements: []
|
129
129
|
rubyforge_project:
|
130
|
-
rubygems_version: 2.
|
130
|
+
rubygems_version: 2.2.2
|
131
131
|
signing_key:
|
132
132
|
specification_version: 4
|
133
133
|
summary: Profile RSpec test suites
|
134
134
|
test_files:
|
135
135
|
- spec/collectors/database_spec.rb
|
136
136
|
- spec/run_spec.rb
|
137
|
-
has_rdoc:
|