github_helper 1.0.2 → 1.0.3
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/github_helper.gemspec +1 -0
- data/lib/github_helper/first_time.rb +2 -14
- data/lib/github_helper/version.rb +1 -1
- data/lib/github_helper.rb +2 -2
- metadata +18 -2
data/github_helper.gemspec
CHANGED
@@ -1,22 +1,10 @@
|
|
1
|
-
require '
|
1
|
+
require 'highline/import'
|
2
2
|
|
3
3
|
# First time run ? Let's make the config file !
|
4
4
|
class GithubHelper::FirstTime
|
5
5
|
include HTTParty
|
6
6
|
base_uri 'https://api.github.com'
|
7
7
|
|
8
|
-
# Outputs the string as a question then waits for the user input
|
9
|
-
def ask(string,hidden=false,default=nil)
|
10
|
-
puts string
|
11
|
-
if hidden
|
12
|
-
input = STDIN.noecho {|i| i.gets}.chomp
|
13
|
-
else
|
14
|
-
input = gets.strip
|
15
|
-
end
|
16
|
-
puts ""
|
17
|
-
input = (input == "") ? default : input
|
18
|
-
end
|
19
|
-
|
20
8
|
# This let us get the OAuth token
|
21
9
|
def getToken(user,password)
|
22
10
|
data = {:scopes => ["repo"], :note => "GithubHelper Gem"}
|
@@ -40,7 +28,7 @@ class GithubHelper::FirstTime
|
|
40
28
|
def fillArray!
|
41
29
|
puts "Setting your credentials"
|
42
30
|
user = ask("What's your github user name (Won't work with your email) ?")
|
43
|
-
password = ask("What's your git password ?\n(This won't be logged, used to get an OAuth token)"
|
31
|
+
password = ask("What's your git password ?\n(This won't be logged, used to get an OAuth token)") { |q| q.echo = false }
|
44
32
|
self.class.basic_auth user, password
|
45
33
|
|
46
34
|
@config['credentials']['user'] = user
|
data/lib/github_helper.rb
CHANGED
@@ -25,7 +25,7 @@ module GithubHelper
|
|
25
25
|
pulls = get("/repos/#{@@target_user}/#{@@target_repo}/pulls")
|
26
26
|
pp pulls if @verbose
|
27
27
|
checkHeaders(pulls)
|
28
|
-
pulls.each { |pull| print "*\t"+pull['title'] + "\t" + pull['user']['login'] + "\n" }
|
28
|
+
pulls.each { |pull| print "*\t#{pull['number']}\t"+pull['title'] + "\t" + pull['user']['login'] + "\n" }
|
29
29
|
end
|
30
30
|
|
31
31
|
def initialize(options)
|
@@ -102,7 +102,7 @@ module GithubHelper
|
|
102
102
|
message = options[:commitmessage]
|
103
103
|
|
104
104
|
ci = @Git.commit(message)
|
105
|
-
pp ci
|
105
|
+
pp ci if @verbose
|
106
106
|
else
|
107
107
|
raise Exception, "Commit needs a message"
|
108
108
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11
|
12
|
+
date: 2012-12-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -59,6 +59,22 @@ dependencies:
|
|
59
59
|
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: highline
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
62
78
|
description: A small gem to commit, push to remote, and open a pull request, in a
|
63
79
|
single line. It can also handle issue ids and add them to the Pullrequest's description.
|
64
80
|
email:
|