Sha256: b00ccec3d34d1df5855fd8073a1e755d1b88062e0926fbfe4d06e89a93c38b28

Contents?: true

Size: 1.37 KB

Versions: 1

Compression:

Stored size: 1.37 KB

Contents

require 'rake'
require 'rake/testtask'
 
test_files_pattern = 'test/rails_root/test/{unit,functional,other}/**/*_test.rb'
namespace :test do
  Rake::TestTask.new(:all => 'generator:tests') do |t|
    t.libs << 'lib'
    t.pattern = test_files_pattern
    t.verbose = false
  end
end

namespace :generator do
  desc "Run the generator on the tests"
  task :tests do
    FileList["generators/clearance/templates/**/*.*"].each do |f|
      File.delete("test/rails_root/#{f.gsub("generators/clearance/templates/",'')}")
    end
    FileUtils.rm_r("test/rails_root/vendor/plugins/clearance")
    system "mkdir -p test/rails_root/vendor/plugins/clearance"
    system "cp -R generators test/rails_root/vendor/plugins/clearance"
    system "cd test/rails_root && ./script/generate clearance"
  end
end

desc "Run the test suite"
task :default => 'test:all'

spec = Gem::Specification.new do |s|
  s.name = "clearance"
  s.version = '0.3.7'
  s.summary = "Simple, complete Rails authentication."
  s.email = "support@thoughtbot.com"
  s.homepage = "http://github.com/thoughtbot/clearance"
  s.description = "Simple, complete Rails authentication scheme."
  s.authors = ["thoughtbot, inc.", "Josh Nichols", "Mike Breen"]
  s.files = FileList["[A-Z]*", "{generators,lib}/**/*"]
end

desc "Generate a gemspec file"
task :gemspec do
  File.open("#{spec.name}.gemspec", 'w') do |f|
    f.write spec.to_ruby
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
thoughtbot-clearance-0.3.7 Rakefile