git_fame 1.7.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/.rspec +5 -3
- data/.travis.yml +6 -1
- data/README.md +60 -70
- data/Rakefile +13 -0
- data/bin/git-fame +34 -19
- data/git_fame.gemspec +11 -10
- data/lib/git_fame.rb +1 -6
- data/lib/git_fame/author.rb +14 -0
- data/lib/git_fame/base.rb +302 -125
- data/lib/git_fame/blame_parser.rb +83 -0
- data/lib/git_fame/commit_range.rb +27 -0
- data/lib/git_fame/errors.rb +3 -1
- data/lib/git_fame/silent_progressbar.rb +10 -3
- data/lib/git_fame/version.rb +1 -1
- data/spec/bin_spec.rb +69 -6
- data/spec/git_fame_spec.rb +318 -28
- data/spec/spec_helper.rb +28 -6
- metadata +55 -39
data/spec/spec_helper.rb
CHANGED
@@ -2,8 +2,9 @@ require "rspec"
|
|
2
2
|
require "git_fame"
|
3
3
|
require "coveralls"
|
4
4
|
require "rspec/collection_matchers"
|
5
|
-
require_relative "./support/startup"
|
6
5
|
require "rspec/expectations"
|
6
|
+
require "pp"
|
7
|
+
require_relative "./support/startup"
|
7
8
|
|
8
9
|
Coveralls.wear!
|
9
10
|
|
@@ -28,15 +29,36 @@ RSpec::Matchers.define :include_output do |expected|
|
|
28
29
|
end
|
29
30
|
|
30
31
|
RSpec.configure do |config|
|
32
|
+
# Set to false to allow Kernel#puts
|
33
|
+
suppress_stdout = true
|
34
|
+
|
31
35
|
config.include GitFame::Startup
|
32
36
|
config.mock_with :rspec
|
33
|
-
config.
|
34
|
-
|
37
|
+
config.expect_with(:rspec) do |c|
|
38
|
+
c.syntax = [:should, :expect]
|
39
|
+
end
|
40
|
+
config.mock_with :rspec do |mocks|
|
41
|
+
mocks.syntax = :should
|
42
|
+
end
|
35
43
|
config.fail_fast = false
|
36
44
|
config.before(:all) do
|
37
45
|
Dir.chdir(repository) { system "git checkout 7ab01bc5a720 > /dev/null 2>&1" }
|
38
46
|
end
|
39
|
-
|
40
|
-
|
41
|
-
|
47
|
+
config.before(:suite) do
|
48
|
+
ENV["TZ"] = "GMT-2"
|
49
|
+
warn "-----------"
|
50
|
+
warn "Current environment:"
|
51
|
+
warn "\t#{`git --version`.strip}"
|
52
|
+
warn "\t#{`grep --version`.strip}"
|
53
|
+
warn "Spec notes:"
|
54
|
+
if suppress_stdout
|
55
|
+
warn "\tMessages to STDOUT has been suppressed. See spec/spec_helper.rb"
|
56
|
+
end
|
57
|
+
warn "\tRequires git 2.x for specs to pass"
|
58
|
+
warn "\tTime zone during testing is set to #{ENV["TZ"]}"
|
59
|
+
warn "-----------"
|
60
|
+
end
|
61
|
+
config.before(:each) do
|
62
|
+
$stdout.stub(:puts) if suppress_stdout
|
63
|
+
end
|
42
64
|
end
|
metadata
CHANGED
@@ -1,141 +1,155 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_fame
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Linus Oleander
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: progressbar
|
14
|
+
name: ruby-progressbar
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.7.5
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.7.5
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: trollop
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 2.1.2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 2.1.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: hirb
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 0.7.3
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 0.7.3
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: scrub_rb
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 1.0.1
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 1.0.1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: memoist
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 0.14.0
|
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
|
-
version:
|
82
|
+
version: 0.14.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: method_profiler
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 2.0.1
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 2.0.1
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: rspec
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
101
|
- - "~>"
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
103
|
+
version: 3.4.0
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
108
|
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
110
|
+
version: 3.4.0
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: rspec-collection_matchers
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
|
-
- - "
|
115
|
+
- - "~>"
|
102
116
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
117
|
+
version: 1.1.2
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
|
-
- - "
|
122
|
+
- - "~>"
|
109
123
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
124
|
+
version: 1.1.2
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: rake
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
|
-
- - "
|
129
|
+
- - "~>"
|
116
130
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
131
|
+
version: 10.4.2
|
118
132
|
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
|
-
- - "
|
136
|
+
- - "~>"
|
123
137
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
138
|
+
version: 10.4.2
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: coveralls
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
|
-
- - "
|
143
|
+
- - "~>"
|
130
144
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
145
|
+
version: 0.8.1
|
132
146
|
type: :development
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
|
-
- - "
|
150
|
+
- - "~>"
|
137
151
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
152
|
+
version: 0.8.1
|
139
153
|
description: Generates awesome stats from git-blame
|
140
154
|
email:
|
141
155
|
- linus@oleander.nu
|
@@ -157,6 +171,8 @@ files:
|
|
157
171
|
- lib/git_fame.rb
|
158
172
|
- lib/git_fame/author.rb
|
159
173
|
- lib/git_fame/base.rb
|
174
|
+
- lib/git_fame/blame_parser.rb
|
175
|
+
- lib/git_fame/commit_range.rb
|
160
176
|
- lib/git_fame/errors.rb
|
161
177
|
- lib/git_fame/file.rb
|
162
178
|
- lib/git_fame/helper.rb
|