Skip to content

Commit 8131f47

Browse files
Switched to jeweler.
1 parent decd4b2 commit 8131f47

File tree

5 files changed

+115
-15
lines changed

5 files changed

+115
-15
lines changed

.gitignore

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
*.kpf
2-
pkg/*
3-
doc/*
4-
coverage/*
2+
*.sw?
3+
.DS_Store
4+
coverage
5+
rdoc
6+
pkg
7+

Rakefile

Lines changed: 57 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
require 'rubygems'
22
require 'rake/gempackagetask'
33

4-
spec = eval(File.read('ruby-git.gemspec'))
5-
6-
Rake::GemPackageTask.new(spec) do |pkg|
7-
pkg.need_tar = true
8-
end
9-
10-
task :default => "pkg/#{spec.name}-#{spec.version}.gem" do
11-
puts "generated latest version"
4+
begin
5+
require 'jeweler'
6+
Jeweler::Tasks.new do |gem|
7+
gem.name = "git"
8+
gem.summary = %Q{TODO}
9+
gem.email = "schacon@gmail.com"
10+
gem.homepage = "http://github.com/schacon/ruby-git"
11+
gem.authors = "Scott Chacon"
12+
gem.rubyforge_project = "git"
13+
gem.files = FileList["lib/**/*.rb"]
14+
gem.test_files = FileList["test/*.rb"]
15+
gem.extra_rdoc_files = ["README"]
16+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
17+
end
18+
rescue LoadError
19+
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
1220
end
1321

14-
desc "Regenerate Documentation"
15-
task :doc do |t|
16-
system('rdoc lib/ README --main README --inline-source')
17-
end
1822

1923
desc "Upload Docs"
2024
task :upload_docs do |t|
@@ -27,3 +31,44 @@ task :test do |t|
2731
require File.dirname(__FILE__) + '/tests/all_tests.rb'
2832
end
2933

34+
require 'rake/rdoctask'
35+
Rake::RDocTask.new do |rdoc|
36+
if File.exist?('VERSION.yml')
37+
config = YAML.load(File.read('VERSION.yml'))
38+
version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
39+
else
40+
version = ""
41+
end
42+
43+
rdoc.rdoc_dir = 'rdoc'
44+
rdoc.title = "ruby-git #{version}"
45+
rdoc.rdoc_files.include('README*')
46+
rdoc.rdoc_files.include('lib/**/*.rb')
47+
end
48+
49+
begin
50+
require 'rake/contrib/sshpublisher'
51+
namespace :rubyforge do
52+
53+
desc "Release gem and RDoc documentation to RubyForge"
54+
task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
55+
56+
namespace :release do
57+
desc "Publish RDoc to RubyForge."
58+
task :docs => [:rdoc] do
59+
config = YAML.load(
60+
File.read(File.expand_path('~/.rubyforge/user-config.yml'))
61+
)
62+
63+
host = "#{config['username']}@rubyforge.org"
64+
remote_dir = "/var/www/gforge-projects/git/"
65+
local_dir = 'rdoc'
66+
67+
Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
68+
end
69+
end
70+
end
71+
rescue LoadError
72+
puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
73+
end
74+

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.1.1

git.gemspec

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# -*- encoding: utf-8 -*-
2+
3+
Gem::Specification.new do |s|
4+
s.name = %q{git}
5+
s.version = "1.1.1"
6+
7+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8+
s.authors = ["Scott Chacon"]
9+
s.date = %q{2009-05-04}
10+
s.email = %q{schacon@gmail.com}
11+
s.extra_rdoc_files = [
12+
"README"
13+
]
14+
s.files = [
15+
"lib/git.rb",
16+
"lib/git/author.rb",
17+
"lib/git/base.rb",
18+
"lib/git/branch.rb",
19+
"lib/git/branches.rb",
20+
"lib/git/diff.rb",
21+
"lib/git/index.rb",
22+
"lib/git/lib.rb",
23+
"lib/git/log.rb",
24+
"lib/git/object.rb",
25+
"lib/git/path.rb",
26+
"lib/git/remote.rb",
27+
"lib/git/repository.rb",
28+
"lib/git/stash.rb",
29+
"lib/git/stashes.rb",
30+
"lib/git/status.rb",
31+
"lib/git/working_directory.rb"
32+
]
33+
s.has_rdoc = true
34+
s.homepage = %q{http://github.com/schacon/ruby-git}
35+
s.rdoc_options = ["--charset=UTF-8"]
36+
s.require_paths = ["lib"]
37+
s.rubyforge_project = %q{git}
38+
s.rubygems_version = %q{1.3.1}
39+
s.summary = %q{TODO}
40+
41+
if s.respond_to? :specification_version then
42+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
43+
s.specification_version = 2
44+
45+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
46+
else
47+
end
48+
else
49+
end
50+
end

ruby-git

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit faba4e1e90ec2d893582b8fd3a25c354ef00d66b

0 commit comments

Comments
 (0)