Sha256: 48047906293a82b0c493545f41d7adf647ca45e075b4393a1f16bd2ebe53ecb2

Contents?: true

Size: 2 KB

Versions: 2

Compression:

Stored size: 2 KB

Contents

# encoding: utf-8
#!/usr/bin/env rake
require "bundler/gem_tasks"
require "rake"

begin
  require "rspec/core/rake_task"
  RSpec::Core::RakeTask.new(:spec)
  task :default => :spec
rescue LoadError
end

require "reek/rake/task"
Reek::Rake::Task.new do |t|
  t.fail_on_error = true
  t.verbose = false
  t.source_files = "lib/**/*.rb"
end

require "roodi"
require "roodi_task"
RoodiTask.new do |t|
  t.verbose = false
end

namespace :test do
  desc "Test against all supported Rails versions"
  task :all do
    %w(3.0.x 3.1.x 3.2.x 4.0.x).each do |version|
      system(<<-EOS
          bash -i -c "rvm use 1.9.3"
          BUNDLE_GEMFILE="gemfiles/Gemfile.rails-#{version}" bundle --quiet
          BUNDLE_GEMFILE="gemfiles/Gemfile.rails-#{version}" bundle exec rspec spec
      EOS
      )
    end
    %w(3.2.x 4.0.x 4.1.x).each do |version|
      system(<<-EOS
          bash -i -c "rvm use 2.0.0"
          BUNDLE_GEMFILE="gemfiles/Gemfile.rails-#{version}" bundle --quiet
          BUNDLE_GEMFILE="gemfiles/Gemfile.rails-#{version}" bundle exec rspec spec
        EOS
      )
    end
    %w(3.2.x 4.0.x 4.1.x).each do |version|
      system(<<-EOS
          bash -i -c "rvm use 2.1.7"
          BUNDLE_GEMFILE="gemfiles/Gemfile.rails-#{version}" bundle --quiet
          BUNDLE_GEMFILE="gemfiles/Gemfile.rails-#{version}" bundle exec rspec spec
      EOS
      )
    end
    %w(3.2.x 4.0.x 4.1.x 4.2.x).each do |version|
      system(<<-EOS
          bash -i -c "rvm use 2.2.3"
          BUNDLE_GEMFILE="gemfiles/Gemfile.rails-#{version}" bundle --quiet
          BUNDLE_GEMFILE="gemfiles/Gemfile.rails-#{version}" bundle exec rspec spec
      EOS
      )
    end
  end
end

require File.expand_path("../lib/sanitize_email/version", __FILE__)
require "rdoc"
require "rdoc/task"
RDoc::Task.new do |rdoc|
  rdoc.rdoc_dir = "rdoc"
  rdoc.title    = "SanitizeEmail #{SanitizeEmail::VERSION}"
  rdoc.options << "--line-numbers"
  rdoc.rdoc_files.include("README*")
  rdoc.rdoc_files.include("lib/**/*.rb")
end

Bundler::GemHelper.install_tasks

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sanitize_email-1.2.0 Rakefile
sanitize_email-1.1.7 Rakefile