hull 0.1.1 → 0.1.2
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/bin/hull +1 -1
- data/lib/hull.rb +0 -3
- data/lib/hull/command.rb +25 -0
- data/lib/hull/help.rb +11 -31
- data/lib/hull/hull.rb +5 -5
- data/lib/hull/list.rb +2 -2
- data/lib/hull/show.rb +2 -2
- metadata +6 -6
data/bin/hull
CHANGED
data/lib/hull.rb
CHANGED
data/lib/hull/command.rb
CHANGED
@@ -1,6 +1,12 @@
|
|
1
|
+
require 'hull/list'
|
2
|
+
require 'hull/help'
|
3
|
+
require 'hull/show'
|
4
|
+
|
1
5
|
module Hull
|
2
6
|
class Command
|
3
7
|
|
8
|
+
private
|
9
|
+
|
4
10
|
BASH_COLORS = {
|
5
11
|
:reset => "0",
|
6
12
|
:red => "31",
|
@@ -95,6 +101,25 @@ module Hull
|
|
95
101
|
config["remote.#{remote}.url"].match(/^git@github.com:/)
|
96
102
|
end
|
97
103
|
|
104
|
+
def self.help_title(title)
|
105
|
+
write(title, :cyan)
|
106
|
+
end
|
107
|
+
|
108
|
+
def self.help_hull
|
109
|
+
write('hull', :yellow)
|
110
|
+
end
|
111
|
+
|
112
|
+
def self.help_command(command)
|
113
|
+
write(command, :pink)
|
114
|
+
end
|
115
|
+
|
116
|
+
def self.help_number(number)
|
117
|
+
write(number, :purple)
|
118
|
+
end
|
119
|
+
|
120
|
+
def self.help_red(red)
|
121
|
+
write(red, :red)
|
122
|
+
end
|
98
123
|
end
|
99
124
|
|
100
125
|
class InvalidRepository < RuntimeError; end
|
data/lib/hull/help.rb
CHANGED
@@ -1,28 +1,8 @@
|
|
1
1
|
module Hull
|
2
|
-
class
|
3
|
-
def self.title(title)
|
4
|
-
write(title, :cyan)
|
5
|
-
end
|
6
|
-
|
7
|
-
def self.hull
|
8
|
-
write('hull', :yellow)
|
9
|
-
end
|
10
|
-
|
11
|
-
def self.command(command)
|
12
|
-
write(command, :pink)
|
13
|
-
end
|
14
|
-
|
15
|
-
def self.number(number)
|
16
|
-
write(number, :purple)
|
17
|
-
end
|
18
|
-
|
19
|
-
def self.red(red)
|
20
|
-
write(red, :red)
|
21
|
-
end
|
22
|
-
|
2
|
+
class Command
|
23
3
|
def self.help
|
24
4
|
<<HELP
|
25
|
-
#{
|
5
|
+
#{help_title('### Setup')}
|
26
6
|
|
27
7
|
Config Github user name:
|
28
8
|
|
@@ -32,33 +12,33 @@ Config GitHub API key (https://github.com/account/admin):
|
|
32
12
|
|
33
13
|
$ git config github.token <api_token>
|
34
14
|
|
35
|
-
#{
|
15
|
+
#{help_title('### Usage')}
|
36
16
|
|
37
17
|
This help doc:
|
38
18
|
|
39
|
-
$ #{
|
19
|
+
$ #{help_hull} #{help_command('help')}
|
40
20
|
|
41
21
|
List all pull requests for this project:
|
42
22
|
|
43
|
-
$ #{
|
23
|
+
$ #{help_hull} #{help_command('list')}
|
44
24
|
|
45
25
|
Show details about pull request number <number>:
|
46
26
|
|
47
|
-
$ #{
|
27
|
+
$ #{help_hull} #{help_command('show')} <#{help_number('number')}>
|
48
28
|
|
49
|
-
#{
|
29
|
+
#{help_title('### Unimplemented Features')}
|
50
30
|
|
51
31
|
Check out the contents of pull request number <number> and switch to that branch:
|
52
32
|
|
53
|
-
$ #{
|
33
|
+
$ #{help_hull} <#{help_command('checkout')}|#{help_command('co')}|#{help_command('pull')}> <#{help_number('number')}>
|
54
34
|
|
55
35
|
Remove contents of pull request <number> that has been checked out:
|
56
36
|
|
57
|
-
$ #{
|
37
|
+
$ #{help_hull} <#{help_command('rm')}|#{help_command('remove')}|#{help_command('delete')}> <#{help_number('number')}>
|
58
38
|
|
59
|
-
#{
|
39
|
+
#{help_title('### Why Hull?')}
|
60
40
|
|
61
|
-
Originally it was called puller, but @natekross pushed a gem with the same name to rubygems.org, literally the day I started working on Hull. #{
|
41
|
+
Originally it was called puller, but @natekross pushed a gem with the same name to rubygems.org, literally the day I started working on Hull. #{help_red("\x28\xe2\x95\xaf\xc2\xb0\xe2\x96\xa1\xc2\xb0\xef\xbc\x89\xe2\x95\xaf")}\xef\xb8\xb5\x20\xe2\x94\xbb\xe2\x94\x81\xe2\x94\xbb
|
62
42
|
HELP
|
63
43
|
end
|
64
44
|
end
|
data/lib/hull/hull.rb
CHANGED
@@ -9,15 +9,15 @@ module Hull
|
|
9
9
|
def run
|
10
10
|
case command
|
11
11
|
when 'list'
|
12
|
-
|
12
|
+
Command.list
|
13
13
|
when 'show'
|
14
|
-
|
14
|
+
Command.show(number)
|
15
15
|
when 'pull', 'checkout', 'co'
|
16
|
-
|
16
|
+
Command.pull(number)
|
17
17
|
when 'rm', 'remove', 'delete'
|
18
|
-
|
18
|
+
Command.remove(number)
|
19
19
|
else
|
20
|
-
|
20
|
+
Command.help
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
data/lib/hull/list.rb
CHANGED
data/lib/hull/show.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hull
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-01-
|
12
|
+
date: 2012-01-30 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
16
|
-
requirement: &
|
16
|
+
requirement: &70356749681420 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70356749681420
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: grit
|
27
|
-
requirement: &
|
27
|
+
requirement: &70356749680980 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70356749680980
|
36
36
|
description: Code Review helper using GitHub's Pull Requests
|
37
37
|
email: hc5duke@gmail.com
|
38
38
|
executables:
|