Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 77 lines (65 sloc) 2.585 kb
2af75fb @jasonm Making sure Clearance is happy with 1.9
jasonm authored
1 # encoding: utf-8
2
1c6eee9 @technicalpickles Added Rakefile.
technicalpickles authored
3 require 'rake'
4 require 'rake/testtask'
c5d14a6 @eugenebolshakov Adedd rake task to run cucumber stories
eugenebolshakov authored
5 require 'cucumber/rake/task'
4e276c6 @croaky changing generators to require "test_helper" instead of the old File.joi...
croaky authored
6
34904e5 @mike-burns Test the generators by generating the test app from it, then running tes...
mike-burns authored
7 namespace :test do
c33d480 @croaky formatting & whitespace
croaky authored
8 Rake::TestTask.new(:all => ["generator:cleanup",
9 "generator:generate"]) do |task|
10 task.libs << "lib"
f3ccfd7 @jferris Moved tests out of the lib directory
jferris authored
11 task.libs << "test"
c33d480 @croaky formatting & whitespace
croaky authored
12 task.pattern = "test/**/*_test.rb"
5dd11f4 @croaky moving to shoulda_macros
croaky authored
13 task.verbose = false
34904e5 @mike-burns Test the generators by generating the test app from it, then running tes...
mike-burns authored
14 end
65f22b9 @qrush Cleaning up some whitespace issues
qrush authored
15
c5d14a6 @eugenebolshakov Adedd rake task to run cucumber stories
eugenebolshakov authored
16 Cucumber::Rake::Task.new(:features) do |t|
c33d480 @croaky formatting & whitespace
croaky authored
17 t.cucumber_opts = "--format progress"
18 t.feature_pattern = "test/rails_root/features/*.feature"
65f22b9 @qrush Cleaning up some whitespace issues
qrush authored
19 end
f378286 @croaky adding default rake task so runcoderun can run ... code
croaky authored
20 end
7f1e7f5 @mike-burns reduce dependencies
mike-burns authored
21
a5a8e30 @jferris Renamed 'stories' to 'features'
jferris authored
22 generators = %w(clearance clearance_features)
bcc61fe @eugenebolshakov Modified rakefile to run clearance_stories generator
eugenebolshakov authored
23
a9cc68a @mike-burns Revert "Remove generators, since they're untested"
mike-burns authored
24 namespace :generator do
e0f90c1 @eugenebolshakov Added migration templates to the generator and some handling in case use...
eugenebolshakov authored
25 desc "Cleans up the test app before running the generator"
26 task :cleanup do
bcc61fe @eugenebolshakov Modified rakefile to run clearance_stories generator
eugenebolshakov authored
27 generators.each do |generator|
28 FileList["generators/#{generator}/templates/**/*.*"].each do |each|
29 file = "test/rails_root/#{each.gsub("generators/#{generator}/templates/",'')}"
30 File.delete(file) if File.exists?(file)
65f22b9 @qrush Cleaning up some whitespace issues
qrush authored
31 end
9f22a36 @mike-burns Remove Jewler, clean up the test generator
mike-burns authored
32 end
65f22b9 @qrush Cleaning up some whitespace issues
qrush authored
33
0a9068f @eugenebolshakov Adedd rake task to run cucumber stories
eugenebolshakov authored
34 FileList["test/rails_root/db/**/*"].each do |each|
35 FileUtils.rm_rf(each)
36 end
8220e12 @eugenebolshakov Generator now automatically adds lines to ApplicationController and User...
eugenebolshakov authored
37 FileUtils.rm_rf("test/rails_root/vendor/plugins/clearance")
02bb2fe @jferris Moved the confirmations_controller into the app directory
jferris authored
38 FileUtils.mkdir_p("test/rails_root/vendor/plugins")
39 clearance_root = File.expand_path(File.dirname(__FILE__))
40 system("ln -s #{clearance_root} test/rails_root/vendor/plugins/clearance")
e0f90c1 @eugenebolshakov Added migration templates to the generator and some handling in case use...
eugenebolshakov authored
41 end
65f22b9 @qrush Cleaning up some whitespace issues
qrush authored
42
e0f90c1 @eugenebolshakov Added migration templates to the generator and some handling in case use...
eugenebolshakov authored
43 desc "Run the generator on the tests"
44 task :generate do
bcc61fe @eugenebolshakov Modified rakefile to run clearance_stories generator
eugenebolshakov authored
45 generators.each do |generator|
f3ccfd7 @jferris Moved tests out of the lib directory
jferris authored
46 system "cd test/rails_root && ./script/generate #{generator} && rake db:migrate db:test:prepare"
bcc61fe @eugenebolshakov Modified rakefile to run clearance_stories generator
eugenebolshakov authored
47 end
34904e5 @mike-burns Test the generators by generating the test app from it, then running tes...
mike-burns authored
48 end
a9cc68a @mike-burns Revert "Remove generators, since they're untested"
mike-burns authored
49 end
e0c1747 @croaky altering Rakefile for easier gemspec bumping
croaky authored
50
51 desc "Run the test suite"
c5d14a6 @eugenebolshakov Adedd rake task to run cucumber stories
eugenebolshakov authored
52 task :default => ['test:all', 'test:features']
9f22a36 @mike-burns Remove Jewler, clean up the test generator
mike-burns authored
53
5dd11f4 @croaky moving to shoulda_macros
croaky authored
54 gem_spec = Gem::Specification.new do |gem_spec|
a0d434d @croaky bumping gemspec to 0.3.9
croaky authored
55 gem_spec.name = "clearance"
d5620ec @croaky Added defined? checks for various Rails constants such as ActionControll...
croaky authored
56 gem_spec.version = "0.6.8"
2319f3b @croaky updating gemspec for 0.6.1 which failed on github (probably due to a str...
croaky authored
57 gem_spec.summary = "Rails authentication with email & password."
a0d434d @croaky bumping gemspec to 0.3.9
croaky authored
58 gem_spec.email = "support@thoughtbot.com"
59 gem_spec.homepage = "http://github.com/thoughtbot/clearance"
2319f3b @croaky updating gemspec for 0.6.1 which failed on github (probably due to a str...
croaky authored
60 gem_spec.description = "Rails authentication with email & password."
61 gem_spec.authors = ["Dan Croak", "Mike Burns", "Jason Morrison",
62 "Joe Ferris", "Eugene Bolshakov", "Nick Quaranto",
63 "Josh Nichols", "Mike Breen", "Marcel Görner",
64 "Bence Nagy", "Ben Mabey", "Eloy Duran",
ccc7d98 @croaky updating generator README with one fewer instruction now that Clearance:...
croaky authored
65 "Tim Pope", "Mihai Anca", "Mark Cornick",
66 "Shay Arnett"]
b947402 @qrush Updating gemspec for 0.6.0
qrush authored
67 gem_spec.files = FileList["[A-Z]*", "{app,config,generators,lib,shoulda_macros,rails}/**/*"]
b2eb349 @jferris Fixing some gem issues
jferris authored
68 end
69
70 desc "Generate a gemspec file"
71 task :gemspec do
5dd11f4 @croaky moving to shoulda_macros
croaky authored
72 File.open("#{gem_spec.name}.gemspec", 'w') do |f|
73 f.write gem_spec.to_yaml
b2eb349 @jferris Fixing some gem issues
jferris authored
74 end
e0c1747 @croaky altering Rakefile for easier gemspec bumping
croaky authored
75 end
2a3ca7b @croaky removing public_context in tests as an example for Karel on the mailing ...
croaky authored
76
Something went wrong with that request. Please try again.