forked from ryanb/xapit
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moving rake task into xapit/rake_tasks.rb so it can be included with gem
- Loading branch information
Showing
2 changed files
with
14 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# TODO investigate why this is needed to ensure it doesn't load twice | ||
unless @xapit_rake_loaded | ||
@xapit_rake_loaded = true | ||
namespace :xapit do | ||
desc "Index all xapit models." | ||
task :index => :environment do | ||
Xapit.remove_database | ||
Xapit.index_all do |member_class| | ||
puts "Indexing #{member_class.name}" | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1 @@ | ||
# TODO investigate why this is needed to ensure it doesn't load twice | ||
unless @xapit_rake_loaded | ||
@xapit_rake_loaded = true | ||
namespace :xapit do | ||
desc "Index all xapit models." | ||
task :index => :environment do | ||
Xapit.remove_database | ||
Xapit.index_all do |member_class| | ||
puts "Indexing #{member_class.name}" | ||
end | ||
end | ||
end | ||
end | ||
require File.join(File.dirname(__FILE__), '/../lib/xapit/rake_tasks') |