git_pr 0.0.6 → 0.0.7
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/bin/git-pr +33 -1
- data/lib/git_pr/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: f8cc6ae5ee1b8542c6604e93b867b02f2ad50b3b
|
4
|
+
data.tar.gz: 2c5cba47012e107e6abcfded23dfeaf2854b7d75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 932da4da4bdc06625caa8a4db56343a703e0e06bb4418e6643d08b2acb1a28e7b8426ad9ef839d500eb239ae8bd8ba0b43b501762672fb709eade05d91ab89e9
|
7
|
+
data.tar.gz: f4cdb8e73c7e3eae5375186f9f4eefd1df25ed02c31e3213456df13577b956e41f3c8cab376dd80e8408ac2c1c2bf3b681b839301f6730fb3eab3e93b73587c5
|
data/bin/git-pr
CHANGED
@@ -125,6 +125,24 @@ eos
|
|
125
125
|
end
|
126
126
|
}
|
127
127
|
|
128
|
+
def alias_to_subcommand(subcommand)
|
129
|
+
case subcommand
|
130
|
+
when "dt", /^difft/
|
131
|
+
"difftool"
|
132
|
+
when "d", /^d/
|
133
|
+
"diff"
|
134
|
+
when "web", /^o/
|
135
|
+
"open"
|
136
|
+
when "ls", /^l/
|
137
|
+
"list"
|
138
|
+
when "ci", /^m/
|
139
|
+
"merge"
|
140
|
+
else
|
141
|
+
subcommand
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
# Parse global options. Print help if any unrecognized
|
128
146
|
begin
|
129
147
|
global_options.order!
|
130
148
|
rescue OptionParser::InvalidOption => e
|
@@ -133,12 +151,26 @@ rescue OptionParser::InvalidOption => e
|
|
133
151
|
exit
|
134
152
|
end
|
135
153
|
|
136
|
-
command = ARGV.shift
|
154
|
+
command = alias_to_subcommand(ARGV.shift)
|
155
|
+
|
156
|
+
# Check for the special command help. Support "git pr help" and "git pr help <subcommand>"
|
157
|
+
if command == "help"
|
158
|
+
command = alias_to_subcommand(ARGV.shift)
|
159
|
+
if subcommands[command]
|
160
|
+
puts subcommands[command]
|
161
|
+
else
|
162
|
+
puts global_options
|
163
|
+
end
|
164
|
+
exit
|
165
|
+
end
|
166
|
+
|
167
|
+
# Unrecognized command? Print help and exit
|
137
168
|
if !subcommands[command]
|
138
169
|
puts global_options
|
139
170
|
exit
|
140
171
|
end
|
141
172
|
|
173
|
+
# Parse subcommand options. Print help if any unrecognized
|
142
174
|
begin
|
143
175
|
options[command].additional_arguments = subcommands[command].permute!
|
144
176
|
rescue OptionParser::InvalidOption => e
|
data/lib/git_pr/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_pr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Sharon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|