git_curate 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/Gemfile.lock +16 -1
- data/README.md +1 -1
- data/Rakefile +6 -0
- data/VERSION +1 -1
- data/exe/git-curate +3 -1
- data/git_curate.gemspec +1 -0
- data/lib/git_curate/branch.rb +6 -4
- data/lib/git_curate/cli_parser.rb +5 -2
- data/lib/git_curate/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 104be2a4415dd003c7c407d28ffcabb1eda79e0f8276e7be30aa5387592fe0ef
|
4
|
+
data.tar.gz: 2636466a92daeda271e41ebd4b10003f10703f792f1b41c0f5757089ed7aa932
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cf19b5538b1a996c29e260e7d576e9f12dade39bc506c008946aaec2ef4f2042fe2b4f85b7c66fe1c87c9db5d1c69815ded3e38496226bfc5f6354ef62ae07b
|
7
|
+
data.tar.gz: 0521c60590d20e6fd36aecc5b8759a38c7d30077043e1b64d33cab6d8d200fb179af6091a52c24be8a63352af82128bbef0d7a317ff5b96ad9e74a1f579280aa
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
git_curate (0.6.
|
4
|
+
git_curate (0.6.4)
|
5
5
|
highline (= 2.0.2)
|
6
6
|
tabulo (= 1.5.1)
|
7
7
|
tty-screen (= 0.7.0)
|
@@ -9,10 +9,24 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
+
diff-lcs (1.3)
|
12
13
|
highline (2.0.2)
|
13
14
|
rake (12.3.2)
|
14
15
|
rake-version (1.0.1)
|
15
16
|
rake (> 11.1)
|
17
|
+
rspec (3.8.0)
|
18
|
+
rspec-core (~> 3.8.0)
|
19
|
+
rspec-expectations (~> 3.8.0)
|
20
|
+
rspec-mocks (~> 3.8.0)
|
21
|
+
rspec-core (3.8.2)
|
22
|
+
rspec-support (~> 3.8.0)
|
23
|
+
rspec-expectations (3.8.4)
|
24
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
25
|
+
rspec-support (~> 3.8.0)
|
26
|
+
rspec-mocks (3.8.1)
|
27
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
28
|
+
rspec-support (~> 3.8.0)
|
29
|
+
rspec-support (3.8.2)
|
16
30
|
tabulo (1.5.1)
|
17
31
|
tty-screen (= 0.7.0)
|
18
32
|
unicode-display_width (= 1.6.0)
|
@@ -27,6 +41,7 @@ DEPENDENCIES
|
|
27
41
|
git_curate!
|
28
42
|
rake (~> 12.3)
|
29
43
|
rake-version (~> 1.0)
|
44
|
+
rspec (~> 3.0)
|
30
45
|
|
31
46
|
BUNDLED WITH
|
32
47
|
2.0.1
|
data/README.md
CHANGED
@@ -68,7 +68,7 @@ Bug reports and pull requests are welcome on [GitHub](https://github.com/matt-ha
|
|
68
68
|
To start working on `git_curate`, `git clone` and `cd` into your fork of the repo, then run `bin/setup` to
|
69
69
|
install dependencies.
|
70
70
|
|
71
|
-
|
71
|
+
To run the test suite, run `rake spec`. For a list of other Rake tasks, run `rake -T`.
|
72
72
|
|
73
73
|
## License
|
74
74
|
|
data/Rakefile
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
+
require "rspec/core/rake_task"
|
2
3
|
require "rake-version"
|
3
4
|
|
5
|
+
RSpec::Core::RakeTask.new(:spec)
|
6
|
+
|
7
|
+
task :default => :spec
|
8
|
+
|
4
9
|
RakeVersion::Tasks.new do |v|
|
5
10
|
v.copy "lib/git_curate/version.rb"
|
11
|
+
v.copy "README.md", all: true
|
6
12
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.4
|
data/exe/git-curate
CHANGED
data/git_curate.gemspec
CHANGED
data/lib/git_curate/branch.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require "open3"
|
2
|
+
|
1
3
|
module GitCurate
|
2
4
|
|
3
5
|
class Branch
|
@@ -14,7 +16,7 @@ module GitCurate
|
|
14
16
|
end
|
15
17
|
|
16
18
|
def current?
|
17
|
-
@current ||= /^\*\s
|
19
|
+
@current ||= (/^\*\s+/ =~ @raw_name)
|
18
20
|
end
|
19
21
|
|
20
22
|
def displayable_name(pad:)
|
@@ -26,15 +28,15 @@ module GitCurate
|
|
26
28
|
end
|
27
29
|
|
28
30
|
def last_author
|
29
|
-
|
31
|
+
Open3.capture2("git log -n1 --format=format:%an #{proper_name}").first
|
30
32
|
end
|
31
33
|
|
32
34
|
def last_commit_date
|
33
|
-
|
35
|
+
Open3.capture2("git log -n1 --date=short --format=format:%cd #{proper_name}").first
|
34
36
|
end
|
35
37
|
|
36
38
|
def last_subject
|
37
|
-
|
39
|
+
Open3.capture2("git log -n1 --format=format:%s #{proper_name}").first
|
38
40
|
end
|
39
41
|
|
40
42
|
end
|
@@ -10,6 +10,8 @@ module GitCurate
|
|
10
10
|
@parsed_options = {}
|
11
11
|
end
|
12
12
|
|
13
|
+
# Sets @parsed_options according to the options received, and return truthy
|
14
|
+
# if and only if the program should continue after the options are passed.
|
13
15
|
def parse(options)
|
14
16
|
opt_parser = OptionParser.new do |opts|
|
15
17
|
opts.banner = <<-EOF
|
@@ -36,16 +38,17 @@ module GitCurate
|
|
36
38
|
|
37
39
|
opts.on("-h", "Print this help message") do
|
38
40
|
puts opts
|
39
|
-
|
41
|
+
return false
|
40
42
|
end
|
41
43
|
|
42
44
|
opts.on("-v", "--version", "Print the currently installed version of this program") do
|
43
45
|
puts "git curate v#{GitCurate::VERSION} #{GitCurate::COPYRIGHT}"
|
44
|
-
|
46
|
+
return false
|
45
47
|
end
|
46
48
|
end
|
47
49
|
|
48
50
|
opt_parser.parse!(options)
|
51
|
+
return true
|
49
52
|
end
|
50
53
|
end
|
51
54
|
end
|
data/lib/git_curate/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_curate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Harvey
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '1.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '3.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '3.0'
|
97
111
|
description: Step through local git branches from the command line, keeping or deleting
|
98
112
|
each.
|
99
113
|
email:
|