rspec_profiling 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjdkNDIyMmIzYWQ1YjFlZjgwYzEwOTFmZjgzZDY1YzM2N2NmZDI3Yw==
4
+ MGQ1MzhlZmZhOGNmYzE0YTI2MTgyOWEwYTZmYjNiMDc3NGE4YWJmMw==
5
5
  data.tar.gz: !binary |-
6
- MTRmYWE0OWRkMmUzOTZlZjQ5MTQzYWE5MjZjMTg3N2JkZTY5NGMxYg==
7
- !binary "U0hBNTEy":
6
+ ZWUzMzM4ZWEwMDc4NTY1NzQyMTU3ZGQ0MTg2Y2M5NzQwMzNhMjM4OQ==
7
+ SHA512:
8
8
  metadata.gz: !binary |-
9
- YWZkYmMzZjYzNWJkMjZmNzFhODFjZjJlMmFlNzExYTRmZmI4ZmY0MTU3NTNh
10
- MzhmYzEwMGUyYjBmYmFkYTM3YzBlNTRhMWNhMjlkNzM4MDMwYWI2NTJiZDg5
11
- NGFlYzk0YTEwOGE3MWYwNTdjNTY0MjBiYTlmNTJmMzJjOGUxNGI=
9
+ Y2E1MDhmMzkwZWU2YTEzM2NhN2I3ZDFjY2E0MWQyNzgyNzZmZDUzYThjOTk2
10
+ YWE4NzJkOTNhNmVlNWRlZGQzNDEzM2E2ZDk2MGZjNDQ1MTZlNmY0MjFhNWFj
11
+ YTkxMDkwMDA2YTNjNjVlZDRmNGYwZDc1MzA1ZjlmZTFmODU4YzA=
12
12
  data.tar.gz: !binary |-
13
- MTkyMmMxNWU2NDQyNDRkMzExNzgyMjRkNjExNzZhODhkMmM0MzJjYzdhNjQ2
14
- MDYwMWQwZjExMGJlOTBkZGNkOWY5MjUyN2FhNTJmM2Q4ZmJkZjE1MTcyMTUw
15
- ZWYzODE4NjNjOWI4NTA1NGFkODZiNmFkOGE1NmJlMmI3MGY5Mjc=
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,8 +4,8 @@ module RspecProfiling
4
4
  module Collectors
5
5
  class CSV
6
6
  HEADERS = %w{
7
- commit_sha
8
- commit_date
7
+ commit
8
+ date
9
9
  file
10
10
  line_number
11
11
  description
@@ -24,8 +24,8 @@ module RspecProfiling
24
24
  return if prepared?
25
25
 
26
26
  connection.create_table(table) do |t|
27
- t.string :commit_sha
28
- t.datetime :commit_date
27
+ t.string :commit
28
+ t.datetime :date
29
29
  t.text :file
30
30
  t.integer :line_number
31
31
  t.text :description
@@ -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
- `git rev-parse HEAD`
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
- Time.parse `git show -s --format=%ci #{sha}`
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
@@ -19,8 +19,8 @@ module RspecProfiling
19
19
 
20
20
  def example_finished(*args)
21
21
  collector.insert({
22
- commit_sha: CurrentCommit.sha,
23
- commit_date: CurrentCommit.time,
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,
@@ -1,3 +1,3 @@
1
1
  module RspecProfiling
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -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 = "https://github.com/foraker/rspec_profiling"
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
- commit_sha: "ABC123",
17
- commit_date: "Thu Dec 18 12:00:00 2012",
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.commit_sha).to eq "ABC123"
35
+ expect(result.commit).to eq "ABC123"
36
36
  end
37
37
 
38
38
  it "records the commit date" do
@@ -23,7 +23,7 @@ module RspecProfiling
23
23
  let(:result) { collector.results.first }
24
24
  let(:commit) do
25
25
  double({
26
- sha: "abc123",
26
+ commit: "abc123",
27
27
  time: Time.new(2012, 12, 12)
28
28
  })
29
29
  end
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.1
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-02-09 00:00:00.000000000 Z
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: https://github.com/foraker/rspec_profiling
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.0.3
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: