Skip to content

@blowmage /GEM_NAME.gemspec
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Simple Gem Template
begin
require "rake"
require "rake/tasklib"
require "flay"
require "flay_task"
FlayTask.new do |t|
t.verbose = true
end
rescue LoadError
task :flay do
abort "Flay is not available. In order to run flay, you must: sudo gem install flay"
end
end
begin
require "rake"
require "rake/tasklib"
require "flog"
require "flog_task"
FlogTask.new do |t|
t.verbose = true
end
rescue LoadError
task :flog do
abort "Flog is not available. In order to run flog, you must: sudo gem install flog"
end
end
require "rake"
Gem::Specification.new do |s|
s.name = "GEM_NAME"
s.version = "0.1.0"
s.summary = "GEM_SUMMARY (short)"
s.description = "GEM_DESCRIPTION (longer)"
s.homepage = "http://example.com/GEM_NAME"
s.authors = ["GEM_AUTHOR_NAME"]
s.email = "GEM_AUTHOR_EMAIL"
#s.date = "2011-06-08" # defaults to today
s.files = FileList["lib/**/*.rb", "bin/*", "[A-Z]*", "test/**/*"].to_a
# RDoc settings
s.extra_rdoc_files = FileList["[A-Z]*"].to_a
s.rdoc_options << "--title" << s.summary <<
"--main" << "README.rdoc" <<
"--line-numbers" << "--charset=UTF-8"
# Test settings
s.test_files = FileList["test/**/*"].to_a
# Dependencies
if s.respond_to? :specification_version then
s.specification_version = 3
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new("1.2.0") then
s.add_runtime_dependency "GEM_RUNTIME_DEPENDENCY", [">= 1.0.0"]
s.add_development_dependency "GEM_DEVELOPMENT_DEPENDENCY", [">= 1.0.0"]
else
s.add_dependency "GEM_RUNTIME_DEPENDENCY", [">= 1.0.0"]
s.add_dependency "GEM_DEVELOPMENT_DEPENDENCY", [">= 1.0.0"]
end
else
s.add_dependency "GEM_RUNTIME_DEPENDENCY", [">= 1.0.0"]
s.add_dependency "GEM_DEVELOPMENT_DEPENDENCY", [">= 1.0.0"]
end
end
# Get all the dependencies defined in the gemspec
gemspec
require "rake"
require "rake/clean"
Dir["tasks/**/*.rake"].each { |t| load t }
task :default => :test
begin
require "rcov/rcovtask"
Rcov::RcovTask.new do |t|
t.libs << "test"
t.pattern = "test/**/test_*.rb"
t.verbose = true
end
rescue LoadError
task :rcov do
abort "RCov is unavailable. In order to run rcov, you must: gem install rcov"
end
end
require "rake/rdoctask"
Rake::RDocTask.new do |t|
# t.rdoc_dir = "html"
# t.title = "GEM_NAME -- GEM_SUMMARY"
# t.options << "--line-numbers --inline-source"
# t.rdoc_files.include(gemspec.files)
# t.main = "README.rdoc"
end
begin
require "reek"
require "reek/rake/task"
Reek::Rake::Task.new do |t|
t.verbose = true
end
rescue LoadError
task :reek do
abort "Reek is unavailable. In order to run reek, you must: gem install reek"
end
end
begin
require "rake"
require "rake/tasklib"
require "roodi"
require "roodi_task"
RoodiTask.new do |t|
t.verbose = false
end
rescue LoadError
task :roodi do
abort "Roodi is unavailable. In order to run roodi, you must: gem install roodi"
end
end
require "rake/testtask"
Rake::TestTask.new do |t|
t.libs << "lib" << "test"
t.pattern = "test/**/test_*.rb"
t.verbose = true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.