Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 76 lines (63 sloc) 2.16 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
environment = File.expand_path('../../vendor/gems/environment')
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.0"
  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['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.