forked from drnic/newgem
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: svn+ssh://rubyforge.org/var/svn/newgem/trunk@2 b8dfb574-5f1f-0410-9469-b441dc4e948f
- Loading branch information
nicwilliams
committed
Oct 9, 2006
1 parent
42b5c8e
commit bc6b022
Showing
9 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
README for newgem | ||
================= | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
require 'rubygems' | ||
require 'rake' | ||
require 'rake/clean' | ||
require 'rake/packagetask' | ||
require 'rake/gempackagetask' | ||
require 'rake/rdoctask' | ||
require 'rake/contrib/rubyforgepublisher' | ||
require 'fileutils' | ||
include FileUtils | ||
require File.join(File.dirname(__FILE__), 'lib', 'newgem', 'version') | ||
|
||
NAME = "newgem" | ||
REV = File.read(".svn/entries")[/committed-rev="(\d+)"/, 1] rescue nil | ||
VERS = ENV['VERSION'] || (Newgem::VERSION::STRING + (REV ? ".#{REV}" : "")) | ||
CLEAN.include ['**/.*.sw?', '*.gem', '.config'] | ||
RDOC_OPTS = ['--quiet', '--title', "Camping, the Documentation", | ||
"--opname", "index.html", | ||
"--line-numbers", | ||
"--main", "README", | ||
"--inline-source"] | ||
|
||
desc "Packages up newgem gem to make gems." | ||
task :default => [:test] | ||
task :package => [:clean] | ||
|
||
task :test do | ||
require File.dirname(__FILE__) + '/test/all_tests.rb' | ||
end | ||
|
||
spec = | ||
Gem::Specification.new do |s| | ||
s.name = NAME | ||
s.version = VERS | ||
s.platform = Gem::Platform::RUBY | ||
s.has_rdoc = true | ||
s.extra_rdoc_files = ["README", "CHANGELOG"] | ||
s.rdoc_options += RDOC_OPTS + ['--exclude', '^(examples|extras)\/'] | ||
s.summary = "Make your own gems at home" | ||
s.description = s.summary | ||
s.author = "Dr Nic Williams" | ||
s.email = 'drnicwilliams@gmail.com' | ||
s.homepage = 'http://newgem.rubyforge.org' | ||
s.executables = ['newgem'] | ||
s.bindir = "bin" | ||
|
||
#s.add_dependency('xxx', '>=1.3.1') | ||
#s.required_ruby_version = '>= 1.8.2' | ||
|
||
s.files = %w(README Rakefile) + | ||
Dir.glob("{bin,doc,test,lib,extras,website,script}/**/*") + | ||
Dir.glob("ext/**/*.{h,c,rb}") + | ||
Dir.glob("examples/**/*.rb") + | ||
Dir.glob("tools/*.rb") | ||
|
||
s.require_path = "lib" | ||
# s.extensions = FileList["ext/**/extconf.rb"].to_a | ||
end | ||
|
||
Rake::GemPackageTask.new(spec) do |p| | ||
p.need_tar = true | ||
p.gem_spec = spec | ||
end | ||
|
||
task :install do | ||
sh %{rake package} | ||
sh %{sudo gem install pkg/#{NAME}-#{VERS}} | ||
end | ||
|
||
task :install_win => [:package] do | ||
%x{gem install pkg\\#{NAME}-#{VERS}.gem} | ||
end | ||
|
||
task :uninstall => [:clean] do | ||
sh %{sudo gem uninstall #{NAME}} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env ruby | ||
|
||
puts "This will generate a new gem structure for you soon" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dir['newgem/**/*.rb'].each { |lib| require lib } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module Newgem #:nodoc: | ||
module VERSION #:nodoc: | ||
MAJOR = 0 | ||
MINOR = 0 | ||
TINY = 1 | ||
|
||
STRING = [MAJOR, MINOR, TINY].join('.') | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dir['**/*_test.rb'].each { |test_case| require test_case } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
require 'test/unit' | ||
require File.dirname(__FILE__) + '/../lib/newgem' |