github 0.4.2 → 0.4.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/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.4.3
2
+
3
+ Updated command:
4
+ * gh config - asks for user/token if not provided
5
+
1
6
  == 0.4.2
2
7
 
3
8
  New protocols supported: http, git+ssh, git+ssh://git@
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.2') do |p|
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.2"
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-04-28}
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"]
@@ -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] [my_repo_name]"
12
- command :config do |user, repo|
13
- user ||= ENV['USER']
14
- repo ||= File.basename(FileUtils.pwd)
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.repo #{repo}"
17
- puts "Configured with github.user #{user}, github.repo #{repo}"
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."
@@ -41,4 +41,5 @@ describe "github fork" do
41
41
  stdout.should == "Giving GitHub a moment to create the fork...\n"
42
42
  end
43
43
  end
44
+
44
45
  end
@@ -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::RaiseError, Spec::Matchers::Change, Spec::Matchers::ThrowSymbol
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
- - 2
9
- version: 0.4.2
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-04-28 00:00:00 +10:00
17
+ date: 2010-05-07 00:00:00 +10:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency