submit_hw 0.1.0 → 0.1.1
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/submit_hw +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8dc8df93f67d123b29dd4743b932f425bb6b843
|
4
|
+
data.tar.gz: 2b197f2cc31367bcfec66b6442f1afcde4972208
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4a43288af0d38df003efb7db81d5f440caf202cb5092344aa5a37cc0eb5d8988c3f9976337bb26726cf03c528167aad75b3aa47f5212158720a7884367b341c
|
7
|
+
data.tar.gz: d57f1efd30a7bf00a337d26897a8581646f8a53538c262503d44179b8ded0218bcf2d0803f71c029e3b54743fc190c5b8a1e1c02c1d122fe3fbf7a4b13c228aa
|
data/bin/submit_hw
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
# TODO (phlco) remove Hub dependency and use github gem/api directly...
|
4
|
+
|
3
5
|
# require dependencies
|
4
6
|
require "octokit"
|
5
7
|
require "colorize"
|
@@ -9,7 +11,7 @@ require "json"
|
|
9
11
|
require "yaml"
|
10
12
|
require "io/console"
|
11
13
|
|
12
|
-
# require development dependencies
|
14
|
+
# require development dependencies
|
13
15
|
if ARGV[0] == "--debug"
|
14
16
|
puts "(running in debug mode...)".yellow
|
15
17
|
require "pry"
|
@@ -26,8 +28,6 @@ if ["-h","--help"].include? ARGV[0]
|
|
26
28
|
end
|
27
29
|
ARGV.clear # clean out arguments from $stdin so they don't get `gets`-ed below
|
28
30
|
|
29
|
-
# TODO (phlco) remove Hub dependency and use github gem/api directly...
|
30
|
-
|
31
31
|
# NOTE: Removed in order to clean up the bash profile (this shouldn't touch it)
|
32
32
|
# storing data in the ~/.gitconfig instead
|
33
33
|
#
|
@@ -190,11 +190,11 @@ debug "pr_message: #{submission_msg}"
|
|
190
190
|
|
191
191
|
# Check the submission message to ensure there were no errors
|
192
192
|
if submission_msg.include? "pull request already exists"
|
193
|
-
puts ("You already have an outstanding pull request
|
194
|
-
"\
|
193
|
+
puts ("You already have an outstanding pull request," + \
|
194
|
+
"\nand now it's been updated! Have a great day.").green
|
195
195
|
elsif submission_msg.include? "pull request: Unprocessable Entity (HTTP 422)"
|
196
196
|
puts ("We may not have an upstream branch for you yet. " + \
|
197
|
-
"Contact your Instructors!").
|
197
|
+
"Contact your Instructors!").red
|
198
198
|
elsif submission_msg.include? "No commits between"
|
199
199
|
# NOTE: (phlco) we'll ignore this for now bc we probably won't get this error.
|
200
200
|
puts "You haven't commited any changes.".red
|