Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
History.txt | ||
LICENSE | ||
Manifest.txt | ||
PostInstall.txt | ||
README.rdoc | ||
Rakefile | ||
lib/invoicing.rb | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,43 @@ | ||
desc "Run rake test for invoicing gem" | ||
task :test do | ||
exec "cd invoicing; rake test" | ||
end | ||
%w[rubygems rake rake/clean fileutils newgem rubigen hoe].each { |f| require f } | ||
require File.dirname(__FILE__) + '/lib/invoicing' | ||
|
||
task :create_db do | ||
cmd_string = %[mysqladmin create ept_invoicing_test -u build] | ||
system cmd_string | ||
# Hoe calls Ruby with the "-w" set by default; unfortunately, ActiveRecord (at version 2.2.2 | ||
# at least) causes a lot of warnings internally, by no fault of our own, which clutters | ||
# the output. Comment out the following four lines to see those warnings. | ||
class Hoe | ||
RUBY_FLAGS = ENV['RUBY_FLAGS'] || "-I#{%w(lib test).join(File::PATH_SEPARATOR)}" + | ||
((defined?(RUBY_DEBUG) && RUBY_DEBUG) ? " #{RUBY_DEBUG}" : '') | ||
end | ||
|
||
def runcoderun? | ||
ENV["RUN_CODE_RUN"] | ||
end | ||
# Generate all the Rake tasks | ||
# Run 'rake -T' to see list of generated tasks (from gem root directory) | ||
$hoe = Hoe.spec 'invoicing' do |p| | ||
p.version = Invoicing::VERSION | ||
p.developer 'Martin Kleppmann', 'rubyforge@eptcomputing.com' | ||
|
||
p.summary = p.paragraphs_of('README.rdoc', 3).join | ||
p.description = p.paragraphs_of('README.rdoc', 3..5).join("\n\n") | ||
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n") | ||
p.post_install_message = 'PostInstall.txt' | ||
p.rubyforge_name = p.name | ||
|
||
if runcoderun? | ||
task :default => [:create_db, :test] | ||
else | ||
task :default => :test | ||
p.extra_deps = [ | ||
['activerecord', '>= 2.1.0'], | ||
['builder', '>= 2.0'] | ||
] | ||
p.extra_dev_deps = [ | ||
['newgem', ">= #{::Newgem::VERSION}"] | ||
#['invoicing_generator', "= #{Invoicing::VERSION}"] - causes a circular dependency in rubygems < 1.2 | ||
] | ||
|
||
p.test_globs = %w[test/*_test.rb] # do not include test/models/*.rb | ||
p.clean_globs |= %w[**/.DS_Store tmp *.log coverage] | ||
p.rsync_args = '-av --delete --ignore-errors' | ||
p.remote_rdoc_dir = 'doc' | ||
end | ||
|
||
require 'newgem/tasks' # load /tasks/*.rake | ||
Dir['tasks/**/*.rake'].each { |t| load t } | ||
|
||
# Tasks to run by default | ||
# task :default => [:spec, :features] |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.