git_manager 0.0.5 → 0.0.6
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/lib/git_manager.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# example usage
|
2
2
|
# Git::Blames::Pending.new(
|
3
|
+
# :log => <explicit log file to test against>
|
3
4
|
# :root => <root folder where build logs are located>
|
4
5
|
# :rspec => boolean specifying whether or
|
5
6
|
# not you want to run rspec now to get pending specs
|
@@ -102,8 +103,10 @@ class Git::Blames::Pending
|
|
102
103
|
include Git::Blames
|
103
104
|
|
104
105
|
def initialize options = nil
|
105
|
-
if options.nil? || options[:root].nil? && !options[:rspec]
|
106
|
+
if options.nil? || options[:root].nil? && !options[:rspec] && !options[:log]
|
106
107
|
@root = "#{File.dirname(__FILE__)}/logs"
|
108
|
+
elsif options[:log]
|
109
|
+
find_pending_specs_by_logfile_name( options[:log] )
|
107
110
|
elsif options[:rspec]
|
108
111
|
find_pending_specs_by_rspec_results( rspec_results )
|
109
112
|
else
|
@@ -156,7 +159,8 @@ class Git::Blames::Pending
|
|
156
159
|
puts e
|
157
160
|
end
|
158
161
|
end
|
159
|
-
files.to_a.select { |log| log.match /\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}/ }.sort.last
|
162
|
+
file_name = files.to_a.select { |log| log.match /\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}/ }.sort.last
|
163
|
+
"#{file_name}/log"
|
160
164
|
end
|
161
165
|
|
162
166
|
def find_pending_specs_by_rspec_results spec_output
|
File without changes
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- kikuchiyo
|
@@ -31,7 +31,7 @@ extra_rdoc_files: []
|
|
31
31
|
|
32
32
|
files:
|
33
33
|
- lib/git_manager.rb
|
34
|
-
- lib/logs/2012-08-21_00-00-
|
34
|
+
- lib/logs/2012-08-21_00-00-02/log
|
35
35
|
- config/email.yml
|
36
36
|
- spec/git_manager_spec.rb
|
37
37
|
homepage: http://rubygems.org/gems/git_manager
|
@@ -69,4 +69,3 @@ specification_version: 3
|
|
69
69
|
summary: gem to manage git
|
70
70
|
test_files:
|
71
71
|
- spec/git_manager_spec.rb
|
72
|
-
has_rdoc:
|