Skip to content

Commit

Permalink
[#77] rake generator:cleanup needed to be... cleaned up. (Ron Newman)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Croak committed Apr 9, 2010
1 parent 5843a08 commit 3c22c5a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

* Removed unnecessary db index. (Rich Thornett, doctorzaius)
* [#79] Allow customization of cookie duration. (Ron Newman, Dan Croak)
* [#77] rake generator:cleanup needed to be... cleaned up. (Ron Newman)

0.8.8 (02/25/2010)
------------------
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Then run rake!
Optional Formtastic views
-------------------------

We use & recommend [Formtastic](http://github.com/justinfrench/formtastic].
We use & recommend [Formtastic](http://github.com/justinfrench/formtastic).

Clearance has another generator to generate Formastic views:

Expand All @@ -136,4 +136,4 @@ Nick Quaranto, Josh Nichols, Mike Breen, Marcel Görner, Bence Nagy, Ben Mabey,
Eloy Duran, Tim Pope, Mihai Anca, Mark Cornick, Shay Arnett, Joshua Clayton,
Mustafa Ekim, Jon Yurek, Anuj Dutta, Chad Pytel, Ben Orenstein, Bobby Wilson,
Matthew Ford, Ryan McGeary, Claudio Poli, Joseph Holsten, Peter Haza,
and Ron Newman.
Ron Newman, and Rich Thornett.
20 changes: 15 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,34 @@ require 'cucumber/rake/task'

namespace :test do
Rake::TestTask.new(:basic => ["generator:cleanup",
"generator:clearance",
"generator:clearance_features"]) do |task|
"generator:clearance"]) do |task|
task.libs << "lib"
task.libs << "test"
task.pattern = "test/**/*_test.rb"
task.verbose = false
end

Rake::TestTask.new(:views => ["generator:clearance_views"]) do |task|
Rake::TestTask.new(:views => ["generator:cleanup",
"generator:clearance",
"generator:clearance_views"]) do |task|
task.libs << "lib"
task.libs << "test"
task.pattern = "test/**/*_test.rb"
task.verbose = false
end

Cucumber::Rake::Task.new(:features) do |t|

Cucumber::Rake::Task.new(:features => ["generator:cleanup",
"generator:clearance",
"generator:clearance_features"]) do |t|
t.cucumber_opts = "--format progress"
t.profile = 'features'
end

Cucumber::Rake::Task.new(:features_for_views) do |t|
Cucumber::Rake::Task.new(:features_for_views => ["generator:cleanup",
"generator:clearance",
"generator:clearance_features",
"generator:clearance_views"]) do |t|
t.cucumber_opts = "--format progress"
t.profile = 'features_for_views'
end
Expand All @@ -42,6 +49,9 @@ namespace :generator do
end

FileUtils.rm_rf("test/rails_root/vendor/plugins/clearance")
FileUtils.rm_rf("test/rails_root/app/views/passwords")
FileUtils.rm_rf("test/rails_root/app/views/sessions")
FileUtils.rm_rf("test/rails_root/app/views/users")
FileUtils.mkdir_p("test/rails_root/vendor/plugins")
clearance_root = File.expand_path(File.dirname(__FILE__))
system("ln -s #{clearance_root} test/rails_root/vendor/plugins/clearance")
Expand Down

0 comments on commit 3c22c5a

Please sign in to comment.