git_recent 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 +7 -0
- data/README.md +2 -2
- data/git_recent.gemspec +8 -0
- data/lib/git_recent/branch_lister.rb +10 -12
- data/lib/git_recent/version.rb +1 -1
- metadata +17 -24
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e6bb16746818bede2a78021effc1cd435ed59add
|
4
|
+
data.tar.gz: 8b739eb4bdd309a18819823a6898eebf0d6d0c55
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3834ce3a51f70285fb995824953f15db16761bb70601c11f5c7df401721e7d92d7ff644bf2b017d67b0629320586782bae0e4e0fdde6be73abc7c0aeac11cd5e
|
7
|
+
data.tar.gz: 1d249c6bc92b99a93ec65865d51fc72e8fd7538b841bd6a53c5ee4ee1dd15c940b475433569ee9b1db7af03911f7f797f22fec8f51e9f246622619f74d5b2395
|
data/README.md
CHANGED
data/git_recent.gemspec
CHANGED
@@ -10,6 +10,14 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ['tjmwey@gmail.com']
|
11
11
|
spec.description = %q{CLI for displaying and interacting with recently checked-out git branches}
|
12
12
|
spec.summary = %q{List and interactively checkout recently checked-out git branches}
|
13
|
+
spec.post_install_message = <<-'MSG'
|
14
|
+
You may find it useful to add the following to the [alias] section of your .gitconfig:
|
15
|
+
|
16
|
+
rl = ! sh -c 'git_recent list'
|
17
|
+
rc = ! sh -c 'git_recent checkout'
|
18
|
+
|
19
|
+
MSG
|
20
|
+
|
13
21
|
spec.homepage = 'https://github.com/tjmw/ruby-GitRecent'
|
14
22
|
spec.license = 'MIT'
|
15
23
|
|
@@ -13,23 +13,21 @@ module GitRecent
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def branch_names(max)
|
16
|
-
|
17
|
-
recent_branches = {}
|
16
|
+
recent_branches = {}
|
18
17
|
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
reflog_iterator.each do |reflog_line|
|
19
|
+
to_branch = reflog_line.to_branch
|
20
|
+
recent_branches[to_branch] = true if should_include_branch? to_branch
|
22
21
|
|
23
|
-
|
22
|
+
return recent_branches.keys if recent_branches.keys.length == max
|
24
23
|
|
25
|
-
|
26
|
-
|
24
|
+
from_branch = reflog_line.from_branch
|
25
|
+
recent_branches[from_branch] = true if should_include_branch? from_branch
|
27
26
|
|
28
|
-
|
29
|
-
end
|
30
|
-
|
31
|
-
recent_branches.keys
|
27
|
+
return recent_branches.keys if recent_branches.keys.length == max
|
32
28
|
end
|
29
|
+
|
30
|
+
recent_branches.keys
|
33
31
|
end
|
34
32
|
|
35
33
|
private
|
data/lib/git_recent/version.rb
CHANGED
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_recent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Tom Wey
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-10-28 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: bundler
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,39 +27,34 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rake
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rspec
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: git
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ~>
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ~>
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -78,7 +69,6 @@ dependencies:
|
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: thor
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
73
|
- - ~>
|
84
74
|
- !ruby/object:Gem::Version
|
@@ -86,7 +76,6 @@ dependencies:
|
|
86
76
|
type: :runtime
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
80
|
- - ~>
|
92
81
|
- !ruby/object:Gem::Version
|
@@ -122,27 +111,31 @@ files:
|
|
122
111
|
homepage: https://github.com/tjmw/ruby-GitRecent
|
123
112
|
licenses:
|
124
113
|
- MIT
|
125
|
-
|
114
|
+
metadata: {}
|
115
|
+
post_install_message: |+
|
116
|
+
You may find it useful to add the following to the [alias] section of your .gitconfig:
|
117
|
+
|
118
|
+
rl = ! sh -c 'git_recent list'
|
119
|
+
rc = ! sh -c 'git_recent checkout'
|
120
|
+
|
126
121
|
rdoc_options: []
|
127
122
|
require_paths:
|
128
123
|
- lib
|
129
124
|
required_ruby_version: !ruby/object:Gem::Requirement
|
130
|
-
none: false
|
131
125
|
requirements:
|
132
|
-
- -
|
126
|
+
- - '>='
|
133
127
|
- !ruby/object:Gem::Version
|
134
128
|
version: 1.9.2
|
135
129
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
|
-
none: false
|
137
130
|
requirements:
|
138
|
-
- -
|
131
|
+
- - '>='
|
139
132
|
- !ruby/object:Gem::Version
|
140
133
|
version: '0'
|
141
134
|
requirements: []
|
142
135
|
rubyforge_project:
|
143
|
-
rubygems_version:
|
136
|
+
rubygems_version: 2.0.3
|
144
137
|
signing_key:
|
145
|
-
specification_version:
|
138
|
+
specification_version: 4
|
146
139
|
summary: List and interactively checkout recently checked-out git branches
|
147
140
|
test_files:
|
148
141
|
- spec/git_recent/branch_chooser_spec.rb
|