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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/submit_hw +6 -6
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5fe0b4d00bf33cad21a46e12a00f1e172fc2596a
4
- data.tar.gz: 4d2726dff1336853609eb8f1b7133f438d2436b9
3
+ metadata.gz: d8dc8df93f67d123b29dd4743b932f425bb6b843
4
+ data.tar.gz: 2b197f2cc31367bcfec66b6442f1afcde4972208
5
5
  SHA512:
6
- metadata.gz: 7d8afe66783582c979410b1855a6003d11b70b11ec7a23457e876f6f3b73898218e74cbe46243c6e0de2a2836fd50f324753401d98103d96371e5bab140fb8ce
7
- data.tar.gz: 03fc8a1e7ebb8acf115a1400ff7dc21cc35b9725552c477f1956f2b72b8cdac36063ceb761b02a65ca8509b55b2d9abfaabe16e5ad83a2bbf4e124cd153790b7
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 (#TODO add a verbose format for debugging)
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 which the instructors" + \
194
- "\nhave yet to merge! Have a great day.").yellow
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!").yellow
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: submit_hw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeffrey Konowitch