jqr-github 0.3.4 → 0.3.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +14 -0
- data/Manifest +13 -13
- data/Rakefile +42 -0
- data/github.gemspec +32 -0
- data/lib/commands/commands.rb +15 -2
- data/setup.rb +1551 -0
- data/spec/ui_spec.rb +9 -0
- metadata +19 -22
- data/github-gem.gemspec +0 -26
data/History.txt
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
== 0.3.4.1
|
2
|
+
|
3
|
+
* Added --private option to create commands. [drnic] [jqr]
|
4
|
+
* Added rebuild-gems command. [jqr]
|
5
|
+
|
6
|
+
== 0.1.4
|
7
|
+
|
8
|
+
* Added usage notes to commands. [topfunky]
|
9
|
+
* Added config option to set github.user and github.repo. [topfunky]
|
10
|
+
* Uses current user to automatically use SSH when cloning own projects.
|
11
|
+
|
12
|
+
== 0.1.3
|
13
|
+
|
14
|
+
* Original version
|
data/Manifest
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
|
2
|
-
github
|
3
|
-
|
1
|
+
bin/gh
|
2
|
+
bin/github
|
3
|
+
github.gemspec
|
4
|
+
History.txt
|
4
5
|
lib/commands/commands.rb
|
5
6
|
lib/commands/helpers.rb
|
6
7
|
lib/commands/network.rb
|
7
|
-
lib/github/helper.rb
|
8
8
|
lib/github/command.rb
|
9
9
|
lib/github/extensions.rb
|
10
|
-
|
11
|
-
|
10
|
+
lib/github/helper.rb
|
11
|
+
lib/github.rb
|
12
|
+
LICENSE
|
13
|
+
Manifest
|
14
|
+
Rakefile
|
15
|
+
README
|
16
|
+
setup.rb
|
17
|
+
spec/command_spec.rb
|
12
18
|
spec/extensions_spec.rb
|
13
|
-
spec/spec_helper.rb
|
14
19
|
spec/github_spec.rb
|
15
|
-
spec/command_spec.rb
|
16
20
|
spec/helper_spec.rb
|
21
|
+
spec/spec_helper.rb
|
17
22
|
spec/ui_spec.rb
|
18
23
|
spec/windoze_spec.rb
|
19
|
-
Manifest
|
20
|
-
Rakefile
|
21
|
-
History.txt
|
22
|
-
README
|
23
|
-
LICENSE
|
data/Rakefile
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'echoe'
|
6
|
+
|
7
|
+
Echoe.new('github', '0.3.4.1') do |p|
|
8
|
+
p.rubyforge_name = 'github'
|
9
|
+
p.summary = "The official `github` command line helper for simplifying your GitHub experience."
|
10
|
+
p.description = "The official `github` command line helper for simplifying your GitHub experience."
|
11
|
+
p.url = "http://github.com/"
|
12
|
+
p.author = ['Chris Wanstrath', 'Kevin Ballard', 'Scott Chacon']
|
13
|
+
p.email = "chris@ozmm.org"
|
14
|
+
p.retain_gemspec = true
|
15
|
+
# p.dependencies = ["launchy"]
|
16
|
+
end
|
17
|
+
|
18
|
+
rescue LoadError => boom
|
19
|
+
puts "You are missing a dependency required for meta-operations on this gem."
|
20
|
+
puts "#{boom.to_s.capitalize}."
|
21
|
+
end
|
22
|
+
|
23
|
+
# add spec tasks, if you have rspec installed
|
24
|
+
begin
|
25
|
+
require 'spec/rake/spectask'
|
26
|
+
|
27
|
+
Spec::Rake::SpecTask.new("spec") do |t|
|
28
|
+
t.spec_files = FileList['spec/**/*_spec.rb']
|
29
|
+
t.spec_opts = ['--color']
|
30
|
+
end
|
31
|
+
|
32
|
+
task :test do
|
33
|
+
Rake::Task['spec'].invoke
|
34
|
+
end
|
35
|
+
|
36
|
+
Spec::Rake::SpecTask.new("rcov_spec") do |t|
|
37
|
+
t.spec_files = FileList['spec/**/*_spec.rb']
|
38
|
+
t.spec_opts = ['--color']
|
39
|
+
t.rcov = true
|
40
|
+
t.rcov_opts = ['--exclude', '^spec,/gems/']
|
41
|
+
end
|
42
|
+
end
|
data/github.gemspec
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{github}
|
5
|
+
s.version = "0.3.4.1"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Chris Wanstrath, Kevin Ballard, Scott Chacon"]
|
9
|
+
s.date = %q{2009-04-02}
|
10
|
+
s.description = %q{The official `github` command line helper for simplifying your GitHub experience.}
|
11
|
+
s.email = %q{chris@ozmm.org}
|
12
|
+
s.executables = ["gh", "github"]
|
13
|
+
s.extra_rdoc_files = ["bin/gh", "bin/github", "lib/commands/commands.rb", "lib/commands/helpers.rb", "lib/commands/network.rb", "lib/github/command.rb", "lib/github/extensions.rb", "lib/github/helper.rb", "lib/github.rb", "LICENSE", "README"]
|
14
|
+
s.files = ["bin/gh", "bin/github", "github.gemspec", "History.txt", "lib/commands/commands.rb", "lib/commands/helpers.rb", "lib/commands/network.rb", "lib/github/command.rb", "lib/github/extensions.rb", "lib/github/helper.rb", "lib/github.rb", "LICENSE", "Manifest", "Rakefile", "README", "setup.rb", "spec/command_spec.rb", "spec/extensions_spec.rb", "spec/github_spec.rb", "spec/helper_spec.rb", "spec/spec_helper.rb", "spec/ui_spec.rb", "spec/windoze_spec.rb"]
|
15
|
+
s.has_rdoc = true
|
16
|
+
s.homepage = %q{http://github.com/}
|
17
|
+
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Github", "--main", "README"]
|
18
|
+
s.require_paths = ["lib"]
|
19
|
+
s.rubyforge_project = %q{github}
|
20
|
+
s.rubygems_version = %q{1.3.1}
|
21
|
+
s.summary = %q{The official `github` command line helper for simplifying your GitHub experience.}
|
22
|
+
|
23
|
+
if s.respond_to? :specification_version then
|
24
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
25
|
+
s.specification_version = 2
|
26
|
+
|
27
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
28
|
+
else
|
29
|
+
end
|
30
|
+
else
|
31
|
+
end
|
32
|
+
end
|
data/lib/commands/commands.rb
CHANGED
@@ -153,8 +153,9 @@ flags :mdown => 'Create README.mdown'
|
|
153
153
|
flags :textile => 'Create README.textile'
|
154
154
|
flags :rdoc => 'Create README.rdoc'
|
155
155
|
flags :rst => 'Create README.rst'
|
156
|
+
flags :private => 'Create private repository'
|
156
157
|
command :create do |repo|
|
157
|
-
sh "curl -F 'repository[name]=#{repo}' -F 'login=#{github_user}' -F 'token=#{github_token}' http://github.com/repositories"
|
158
|
+
sh "curl -F 'repository[name]=#{repo}' -F 'repository[public]=#{!options[:private]}' -F 'login=#{github_user}' -F 'token=#{github_token}' http://github.com/repositories"
|
158
159
|
mkdir repo
|
159
160
|
cd repo
|
160
161
|
git "init"
|
@@ -194,12 +195,24 @@ command :fork do |user, repo|
|
|
194
195
|
end
|
195
196
|
|
196
197
|
desc "Create a new GitHub repository from the current local repository"
|
198
|
+
flags :private => 'Create private repository'
|
197
199
|
command 'create-from-local' do
|
198
200
|
cwd = sh "pwd"
|
199
201
|
repo = File.basename(cwd)
|
200
202
|
is_repo = !git("status").match(/fatal/)
|
201
203
|
raise "Not a git repository. Use gh create instead" unless is_repo
|
202
|
-
sh
|
204
|
+
sh "curl -F 'repository[name]=#{repo}' -F 'repository[public]=#{!options[:private]}' -F 'login=#{github_user}' -F 'token=#{github_token}' http://github.com/repositories"
|
203
205
|
git "remote add origin git@github.com:#{github_user}/#{repo}.git"
|
204
206
|
git_exec "push origin master"
|
205
207
|
end
|
208
|
+
|
209
|
+
|
210
|
+
desc "Request GitHub rebuild the latest Rubygems"
|
211
|
+
usage 'github rebuild-gems [user]/[repo]'
|
212
|
+
command 'rebuild-gems' do |user, repo|
|
213
|
+
if repo.nil?
|
214
|
+
user, repo = user.split('/')
|
215
|
+
end
|
216
|
+
|
217
|
+
# sh "curl http://github.com/#{user}/#{repo}/rebuild_gems"
|
218
|
+
end
|