gub 0.1.2 → 0.1.3
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.
- checksums.yaml +4 -4
- data/lib/gub/cli.rb +12 -9
- data/lib/gub/repository.rb +3 -1
- data/lib/gub/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c545f5df605b71f6616e721cb7cede555e6f27b
|
4
|
+
data.tar.gz: 35c55cf02011c7f5429cf1d8613ad775589caf4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b29a59c7b85457da01e38dfc53a825526c0e527129fb04596ad860da5b03cadbd89cd2e7031e675139f30fbf43404c12dd65c56a14b89aacf8b6b199227b1cff
|
7
|
+
data.tar.gz: 7d77d4cad52a3aba03447d358a577b1ef5e0f885f31f28aa6f6167f740653f3e56a3d6394343a92001cbe0340c9302ace20752f63ae7e33f84f6748082826525
|
data/lib/gub/cli.rb
CHANGED
@@ -13,17 +13,20 @@ module Gub
|
|
13
13
|
def repos
|
14
14
|
rows = []
|
15
15
|
id = 0
|
16
|
-
|
17
|
-
|
18
|
-
rows << [id, repo.full_name]
|
19
|
-
end
|
20
|
-
Gub.github.orgs.list.each do |org|
|
21
|
-
Gub.github.repos.list(org: org.login).each do |repo|
|
16
|
+
table = Terminal::Table.new(headings: ['#', 'Repository']) do |t|
|
17
|
+
Gub.github.repos.each do |repo|
|
22
18
|
id = id.next
|
23
|
-
|
19
|
+
t.add_row [id, repo.full_name]
|
20
|
+
end
|
21
|
+
Gub.github.orgs.each do |org|
|
22
|
+
t.add_separator
|
23
|
+
Gub.github.organization_repositories(org.login).each do |repo|
|
24
|
+
id = id.next
|
25
|
+
t.add_row [id, repo.full_name]
|
26
|
+
end
|
24
27
|
end
|
25
28
|
end
|
26
|
-
|
29
|
+
puts table
|
27
30
|
end
|
28
31
|
|
29
32
|
desc 'issue [id]', 'Show a Github issue'
|
@@ -161,7 +164,7 @@ module Gub
|
|
161
164
|
|
162
165
|
private
|
163
166
|
def table rows, header = []
|
164
|
-
Terminal::Table.new :
|
167
|
+
Terminal::Table.new headings: header, rows: rows
|
165
168
|
end
|
166
169
|
|
167
170
|
# Source: https://github.com/rails/rails/actionpack/lib/action_view/helpers/text_helper.rb
|
data/lib/gub/repository.rb
CHANGED
@@ -8,6 +8,8 @@ module Gub
|
|
8
8
|
else
|
9
9
|
self.full_name = full_name
|
10
10
|
end
|
11
|
+
# Strip .git from the name
|
12
|
+
self.full_name = self.full_name.split('.').first
|
11
13
|
if self.full_name.nil? || self.full_name.empty?
|
12
14
|
Gub.log.fatal 'Unable to find repo name'
|
13
15
|
exit 1
|
@@ -74,7 +76,7 @@ module Gub
|
|
74
76
|
end
|
75
77
|
|
76
78
|
def parent
|
77
|
-
self.info.parent.full_name if self.info.parent
|
79
|
+
self.info.parent.full_name.split('.').first if self.info.parent
|
78
80
|
end
|
79
81
|
|
80
82
|
def sync
|
data/lib/gub/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Omar Abdel-Wahab
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|