github 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +6 -0
- data/Rakefile +4 -3
- data/github.gemspec +7 -4
- data/lib/commands/commands.rb +8 -3
- data/lib/commands/helpers.rb +2 -0
- metadata +44 -14
data/History.txt
CHANGED
data/Rakefile
CHANGED
@@ -4,16 +4,17 @@ require 'rake'
|
|
4
4
|
begin
|
5
5
|
require 'echoe'
|
6
6
|
|
7
|
-
Echoe.new('github', '0.4.
|
7
|
+
Echoe.new('github', '0.4.2') 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."
|
11
11
|
p.url = "http://github.com/"
|
12
12
|
p.author = ['Chris Wanstrath', 'Kevin Ballard', 'Scott Chacon', 'Dr Nic Williams']
|
13
|
-
p.email = "
|
13
|
+
p.email = "drnicwilliams@gmail.com"
|
14
14
|
p.dependencies = [
|
15
15
|
"text-format >=1.0.0",
|
16
|
-
"highline ~>1.5.1"
|
16
|
+
"highline ~>1.5.1",
|
17
|
+
"json >=1.2.0"
|
17
18
|
]
|
18
19
|
end
|
19
20
|
|
data/github.gemspec
CHANGED
@@ -2,13 +2,13 @@
|
|
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.2"
|
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{
|
9
|
+
s.date = %q{2010-04-28}
|
10
10
|
s.description = %q{The official `github` command line helper for simplifying your GitHub experience.}
|
11
|
-
s.email = %q{
|
11
|
+
s.email = %q{drnicwilliams@gmail.com}
|
12
12
|
s.executables = ["gh", "github"]
|
13
13
|
s.extra_rdoc_files = ["LICENSE", "README.md", "bin/gh", "bin/github", "lib/commands/commands.rb", "lib/commands/helpers.rb", "lib/commands/issues.rb", "lib/commands/network.rb", "lib/github.rb", "lib/github/command.rb", "lib/github/extensions.rb", "lib/github/helper.rb", "lib/github/ui.rb"]
|
14
14
|
s.files = ["History.txt", "LICENSE", "Manifest", "README.md", "Rakefile", "bin/gh", "bin/github", "lib/commands/commands.rb", "lib/commands/helpers.rb", "lib/commands/issues.rb", "lib/commands/network.rb", "lib/github.rb", "lib/github/command.rb", "lib/github/extensions.rb", "lib/github/helper.rb", "lib/github/ui.rb", "setup.rb", "spec/command_spec.rb", "spec/commands/command_browse_spec.rb", "spec/commands/command_clone_spec.rb", "spec/commands/command_create-from-local_spec.rb", "spec/commands/command_fetch_spec.rb", "spec/commands/command_fork_spec.rb", "spec/commands/command_helper.rb", "spec/commands/command_home_spec.rb", "spec/commands/command_info_spec.rb", "spec/commands/command_issues_spec.rb", "spec/commands/command_network_spec.rb", "spec/commands/command_pull-request_spec.rb", "spec/commands/command_pull_spec.rb", "spec/commands/command_search_spec.rb", "spec/commands/command_track_spec.rb", "spec/commands_spec.rb", "spec/extensions_spec.rb", "spec/github_spec.rb", "spec/helper_spec.rb", "spec/spec_helper.rb", "spec/windoze_spec.rb", "github.gemspec"]
|
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Github", "--main", "README.md"]
|
17
17
|
s.require_paths = ["lib"]
|
18
18
|
s.rubyforge_project = %q{github}
|
19
|
-
s.rubygems_version = %q{1.3.
|
19
|
+
s.rubygems_version = %q{1.3.6}
|
20
20
|
s.summary = %q{The official `github` command line helper for simplifying your GitHub experience.}
|
21
21
|
|
22
22
|
if s.respond_to? :specification_version then
|
@@ -26,12 +26,15 @@ Gem::Specification.new do |s|
|
|
26
26
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
27
27
|
s.add_runtime_dependency(%q<text-format>, [">= 1.0.0"])
|
28
28
|
s.add_runtime_dependency(%q<highline>, ["~> 1.5.1"])
|
29
|
+
s.add_runtime_dependency(%q<json>, [">= 1.2.0"])
|
29
30
|
else
|
30
31
|
s.add_dependency(%q<text-format>, [">= 1.0.0"])
|
31
32
|
s.add_dependency(%q<highline>, ["~> 1.5.1"])
|
33
|
+
s.add_dependency(%q<json>, [">= 1.2.0"])
|
32
34
|
end
|
33
35
|
else
|
34
36
|
s.add_dependency(%q<text-format>, [">= 1.0.0"])
|
35
37
|
s.add_dependency(%q<highline>, ["~> 1.5.1"])
|
38
|
+
s.add_dependency(%q<json>, [">= 1.2.0"])
|
36
39
|
end
|
37
40
|
end
|
data/lib/commands/commands.rb
CHANGED
@@ -233,9 +233,14 @@ command :'create-from-local' do
|
|
233
233
|
repo = File.basename(cwd)
|
234
234
|
is_repo = !git("status").match(/fatal/)
|
235
235
|
raise "Not a git repository. Use gh create instead" unless is_repo
|
236
|
-
sh "curl -F 'repository[name]=#{repo}' -F 'repository[public]=#{!options[:private].inspect}' -F 'login=#{github_user}' -F 'token=#{github_token}' http://github.com/repositories"
|
237
|
-
|
238
|
-
|
236
|
+
created = sh "curl -F 'repository[name]=#{repo}' -F 'repository[public]=#{!options[:private].inspect}' -F 'login=#{github_user}' -F 'token=#{github_token}' http://github.com/repositories"
|
237
|
+
if created.out =~ %r{You are being <a href="http://github.com/#{github_user}/([^"]+)"}
|
238
|
+
git "remote add origin git@github.com:#{github_user}/#{$1}.git"
|
239
|
+
git_exec "push origin master"
|
240
|
+
else
|
241
|
+
#TODO try to explain why it failed
|
242
|
+
die "error creating repository"
|
243
|
+
end
|
239
244
|
end
|
240
245
|
|
241
246
|
desc "Search GitHub for the given repository name."
|
data/lib/commands/helpers.rb
CHANGED
@@ -3,6 +3,8 @@ DEV_NULL = File.exist?("/dev/null") ? "/dev/null" : "nul:" unless const_defined?
|
|
3
3
|
helper :user_and_repo_from do |url|
|
4
4
|
case url
|
5
5
|
when %r|^git://github\.com/([^/]+/[^/]+)$|: $1.split('/')
|
6
|
+
when %r|^http://github\.com/([^/]+/[^/]+)$|: $1.split('/')
|
7
|
+
when %r|^(?:git\+ssh://)?(?:git@)?github\.com/([^/]+/[^/]+)$|: $1.split('/')
|
6
8
|
when %r|^(?:ssh://)?(?:git@)?github\.com:([^/]+/[^/]+)$|: $1.split('/')
|
7
9
|
end
|
8
10
|
end
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 4
|
8
|
+
- 2
|
9
|
+
version: 0.4.2
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Chris Wanstrath, Kevin Ballard, Scott Chacon, Dr Nic Williams
|
@@ -9,31 +14,53 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date:
|
17
|
+
date: 2010-04-28 00:00:00 +10:00
|
13
18
|
default_executable:
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: text-format
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 1
|
29
|
+
- 0
|
30
|
+
- 0
|
23
31
|
version: 1.0.0
|
24
|
-
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
25
34
|
- !ruby/object:Gem::Dependency
|
26
35
|
name: highline
|
27
|
-
|
28
|
-
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
38
|
requirements:
|
31
39
|
- - ~>
|
32
40
|
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 1
|
43
|
+
- 5
|
44
|
+
- 1
|
33
45
|
version: 1.5.1
|
34
|
-
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: json
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
segments:
|
56
|
+
- 1
|
57
|
+
- 2
|
58
|
+
- 0
|
59
|
+
version: 1.2.0
|
60
|
+
type: :runtime
|
61
|
+
version_requirements: *id003
|
35
62
|
description: The official `github` command line helper for simplifying your GitHub experience.
|
36
|
-
email:
|
63
|
+
email: drnicwilliams@gmail.com
|
37
64
|
executables:
|
38
65
|
- gh
|
39
66
|
- github
|
@@ -111,18 +138,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
138
|
requirements:
|
112
139
|
- - ">="
|
113
140
|
- !ruby/object:Gem::Version
|
141
|
+
segments:
|
142
|
+
- 0
|
114
143
|
version: "0"
|
115
|
-
version:
|
116
144
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
145
|
requirements:
|
118
146
|
- - ">="
|
119
147
|
- !ruby/object:Gem::Version
|
148
|
+
segments:
|
149
|
+
- 1
|
150
|
+
- 2
|
120
151
|
version: "1.2"
|
121
|
-
version:
|
122
152
|
requirements: []
|
123
153
|
|
124
154
|
rubyforge_project: github
|
125
|
-
rubygems_version: 1.3.
|
155
|
+
rubygems_version: 1.3.6
|
126
156
|
signing_key:
|
127
157
|
specification_version: 3
|
128
158
|
summary: The official `github` command line helper for simplifying your GitHub experience.
|