github 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/README.md +9 -0
- data/Rakefile +1 -1
- data/github.gemspec +2 -2
- data/lib/commands/commands.rb +9 -6
- data/spec/commands/command_fork_spec.rb +1 -0
- data/spec/commands/command_helper.rb +1 -1
- metadata +3 -3
data/History.txt
CHANGED
data/README.md
CHANGED
@@ -14,6 +14,15 @@ Run it:
|
|
14
14
|
$ github <command> <args>
|
15
15
|
$ gh <command> <args>
|
16
16
|
|
17
|
+
## Authentication
|
18
|
+
|
19
|
+
To let GitHub know who you are, just have your git config set up with your GitHub username and token.
|
20
|
+
|
21
|
+
$ git config --global github.user "your-github-username"
|
22
|
+
$ git config --global github.token "your-github-token"
|
23
|
+
|
24
|
+
You can find your token under [your account](https://github.com/account).
|
25
|
+
|
17
26
|
## Pulling Upstream Changes
|
18
27
|
|
19
28
|
Let's say you just forked `github-gem` on GitHub from defunkt.
|
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ require 'rake'
|
|
4
4
|
begin
|
5
5
|
require 'echoe'
|
6
6
|
|
7
|
-
Echoe.new('github', '0.4.
|
7
|
+
Echoe.new('github', '0.4.3') do |p|
|
8
8
|
p.rubyforge_name = 'github'
|
9
9
|
p.summary = "The official `github` command line helper for simplifying your GitHub experience."
|
10
10
|
p.description = "The official `github` command line helper for simplifying your GitHub experience."
|
data/github.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{github}
|
5
|
-
s.version = "0.4.
|
5
|
+
s.version = "0.4.3"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Chris Wanstrath, Kevin Ballard, Scott Chacon, Dr Nic Williams"]
|
9
|
-
s.date = %q{2010-
|
9
|
+
s.date = %q{2010-05-07}
|
10
10
|
s.description = %q{The official `github` command line helper for simplifying your GitHub experience.}
|
11
11
|
s.email = %q{drnicwilliams@gmail.com}
|
12
12
|
s.executables = ["gh", "github"]
|
data/lib/commands/commands.rb
CHANGED
@@ -8,13 +8,16 @@ command :home do |user|
|
|
8
8
|
end
|
9
9
|
|
10
10
|
desc "Automatically set configuration info, or pass args to specify."
|
11
|
-
usage "github config [my_username] [
|
12
|
-
command :config do |user,
|
13
|
-
|
14
|
-
|
11
|
+
usage "github config [my_username] [my_token]"
|
12
|
+
command :config do |user, token|
|
13
|
+
require "highline"
|
14
|
+
highline = HighLine.new
|
15
|
+
user ||= highline.ask("What is your github user? ") {|q| q.default = ENV['USER']}
|
16
|
+
token ||= highline.ask("What is your github token? ")
|
17
|
+
repo ||= File.basename(FileUtils.pwd)
|
15
18
|
git "config --global github.user #{user}"
|
16
|
-
git "config github.
|
17
|
-
puts "Configured with github.user #{user}
|
19
|
+
git "config --global github.token #{token}"
|
20
|
+
puts "Configured with github.user #{user}"
|
18
21
|
end
|
19
22
|
|
20
23
|
desc "Open this repo in a web browser."
|
@@ -31,7 +31,7 @@ module CommandHelper
|
|
31
31
|
if @expected_result
|
32
32
|
expectation, result = @expected_result
|
33
33
|
case result
|
34
|
-
when Spec::Matchers::
|
34
|
+
when Spec::Matchers::RaiseException, Spec::Matchers::Change, Spec::Matchers::ThrowSymbol
|
35
35
|
invoke.send expectation, result
|
36
36
|
else
|
37
37
|
invoke.call.send expectation, result
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 4
|
8
|
-
-
|
9
|
-
version: 0.4.
|
8
|
+
- 3
|
9
|
+
version: 0.4.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Chris Wanstrath, Kevin Ballard, Scott Chacon, Dr Nic Williams
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-05-07 00:00:00 +10:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|