submit_hw 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/bin/submit_hw +23 -0
  3. metadata +44 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 70ee9ca456e524665a934197fc98d964affdad17
4
+ data.tar.gz: 3d4aa7e4809915ff709d9d53547b4c37bcea0bea
5
+ SHA512:
6
+ metadata.gz: ffca316217b0a36b917590d36bda7d03e21b953a1b2f15ba908c7e946c0727a2d0abcb23bdd2c97349f7727dcdcef675519b1b050d53861f46eda6fe096ab896
7
+ data.tar.gz: c747631b1ec96a54d41ba2aa2a2230fa03ab5ca0313e9f9ed2fd38074a97c01217f274eef968e72be900f56df5290e0039a6b9b21156cc4fa59b9decb7d77850
data/bin/submit_hw ADDED
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env ruby
2
+ require 'json'
3
+
4
+ hub_not_installed = `brew list --versions hub`.empty?
5
+
6
+ if hub_not_installed
7
+ puts "Please install the \`hub\` utility."
8
+ exit(false)
9
+ end
10
+
11
+ data = {}
12
+
13
+ puts "Completeness [1 - 5]"
14
+ data["completeness"] = gets.gsub(/\W+/, '')
15
+
16
+ puts "Comfortability [1 - 5]"
17
+ data["comfortability"] = gets.gsub(/\W+/, '')
18
+
19
+ github_name = `git config --get user.name`.strip
20
+ upstream = `git config --get remote.upstream.url`.strip.match(/:(.*[^\.git])/).captures.first
21
+ branch = "#{upstream}:#{github_name}"
22
+
23
+ puts `hub pull-request -m $'HW\n\n#{data.to_json}' -b '#{branch}'`
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: submit_hw
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Jeffrey Konowitch
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-07-31 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: ''
14
+ email: jeff.konowitch@ga.co
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - "./bin/submit_hw"
20
+ homepage: https://github.com/jkonowitch/submit_hw
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.2.1
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Submitting homework for GA's WDI.
44
+ test_files: []