Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 51 lines (46 sloc) 1.773 kB
1c6eee9 @technicalpickles Added Rakefile.
technicalpickles authored
1 require 'rake'
2 require 'rake/testtask'
07a62e5 @croaky sqlite in memory database
croaky authored
3 require 'date'
7f1e7f5 @mike-burns reduce dependencies
mike-burns authored
4
cda2451 @croaky merging changes from mike breen, altering test directory structure
croaky authored
5 test_files_pattern = 'test/rails_root/test/{unit,functional,other}/**/*_test.rb'
1c6eee9 @technicalpickles Added Rakefile.
technicalpickles authored
6 Rake::TestTask.new do |t|
7 t.libs << 'lib'
8 t.pattern = test_files_pattern
9 t.verbose = false
f378286 @croaky adding default rake task so runcoderun can run ... code
croaky authored
10 end
7f1e7f5 @mike-burns reduce dependencies
mike-burns authored
11
f378286 @croaky adding default rake task so runcoderun can run ... code
croaky authored
12 desc "Run the test suite"
13 task :default => :test
7f1e7f5 @mike-burns reduce dependencies
mike-burns authored
14
07a62e5 @croaky sqlite in memory database
croaky authored
15 spec = Gem::Specification.new do |s|
16 s.name = "clearance"
17 s.summary = "Simple, complete Rails authentication."
18 s.email = "dcroak@thoughtbot.com"
19 s.homepage = "http://github.com/thoughtbot/clearance"
20 s.description = "Simple, complete Rails authentication scheme."
fd3d7f1 @croaky added missing tests for remember me on sessions#create
croaky authored
21 s.authors = ["thoughtbot, inc.", "Dan Croak", "Josh Nichols", "Jason Morrison", "Mike Burns", "Mike Breen"]
07a62e5 @croaky sqlite in memory database
croaky authored
22 s.files = FileList["[A-Z]*", "{generators,lib,test}/**/*"]
23 end
7f1e7f5 @mike-burns reduce dependencies
mike-burns authored
24
27c0010 @croaky adding jeweler, fiddling with generator templates
croaky authored
25 namespace :generator do
26 task :templates do
27 app_files = FileList["test/rails_root/app/{controllers,models,views}/**/*"]
28 app_files.reject! { |file| file.include?("test/rails_root/app/views/layouts") }
29 test_files = FileList["test/rails_root/test/{functional,unit}/**/*"]
30 test_files += ["test/rails_root/test/factories.rb"]
31 files = test_files + app_files
32 templates_path = "generators/clearance/templates"
33 system `rm -rf #{templates_path}`
34 system `mkdir #{templates_path}`
35 ["app", "app/controllers", "app/models", "app/views",
36 "test", "test/functional", "test/unit"].each do |directory|
37 system `mkdir #{templates_path}/#{directory}`
a6b8c49 @croaky creating rake gemspec:write, rake gemspec:bump:major, rake gemspec:bu…
croaky authored
38 end
27c0010 @croaky adding jeweler, fiddling with generator templates
croaky authored
39 files.each do |file|
40 template = "generators/clearance/templates/#{file.gsub("test/rails_root/", "")}"
41 if File.directory?(file)
42 system `rm -rf #{template}`
43 system `mkdir #{template}`
44 else
45 system `rm #{template}` if File.exists?(template)
46 system `cp #{file} #{template}`
a6b8c49 @croaky creating rake gemspec:write, rake gemspec:bump:major, rake gemspec:bu…
croaky authored
47 end
48 end
07a62e5 @croaky sqlite in memory database
croaky authored
49 end
7f1e7f5 @mike-burns reduce dependencies
mike-burns authored
50 end
Something went wrong with that request. Please try again.