Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
76 lines (63 sloc) 2.14 KB
environment = File.expand_path('../vendor/gems/environment', __FILE__)
if File.exist?("#{environment}.rb")
require environment
end
require 'rake/rdoctask'
require 'rake/gempackagetask'
require 'rake/testtask'
require 'spec/rake/spectask'
require 'cucumber/rake/task'
require 'bundler'
spec = Gem::Specification.new do |s|
s.name = "mail"
s.version = "1.3.4"
s.author = "Mike Lindsaar"
s.email = "raasdnil@gmail.com"
s.homepage = "http://github.com/mikel/mail"
s.description = "A really Ruby Mail handler."
s.summary = "Mail provides a nice Ruby DSL for making, sending and reading emails."
s.platform = Gem::Platform::RUBY
s.has_rdoc = true
s.extra_rdoc_files = ["README.rdoc", "CHANGELOG.rdoc", "TODO.rdoc"]
manifest = Bundler::Environment.load(File.dirname(__FILE__) + '/Gemfile')
manifest.dependencies.each do |dep|
next if dep.only && dep.only.include?("test")
s.add_dependency(dep.name, dep.version)
end
s.require_path = 'lib'
s.files = %w(README.rdoc Rakefile TODO.rdoc) + Dir.glob("lib/**/*")
end
Rake::GemPackageTask.new(spec) do |pkg|
pkg.gem_spec = spec
end
task :default => :spec
Cucumber::Rake::Task.new do |t|
t.cucumber_opts = "spec/features --format pretty"
end
Spec::Rake::SpecTask.new(:rcov) do |t|
t.spec_files = FileList['test/**/tc_*.rb', 'spec/**/*_spec.rb']
t.rcov = true
t.rcov_opts = t.rcov_opts << ['--exclude', '/Library,/opt,/System']
end
Spec::Rake::SpecTask.new(:spec) do |t|
t.warning = true
t.spec_files = FileList["#{File.dirname(__FILE__)}/spec/**/*_spec.rb"]
t.spec_opts = %w(--backtrace --diff --color)
t.libs << "#{File.dirname(__FILE__)}/spec"
t.libs << "#{File.dirname(__FILE__)}/spec/mail"
end
Rake::TestTask.new(:test) do |t|
t.libs << 'test'
t.pattern = 'test/**/tc_*.rb'
t.verbose = true
t.warning = false
end
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'Mail'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README')
rdoc.rdoc_files.include('lib/**/*.rb')
end
# load custom rake tasks
Dir["#{File.dirname(__FILE__)}/lib/tasks/**/*.rake"].sort.each { |ext| load ext }
Something went wrong with that request. Please try again.