lib/tasks/exlibris-aleph_tasks.rake in exlibris-aleph-1.0.3 vs lib/tasks/exlibris-aleph_tasks.rake in exlibris-aleph-1.0.4

- old
+ new

@@ -3,11 +3,11 @@ desc "Initialize the Exlibris::Aleph environment" task :initialize, :config_file, :tab_path, :yml_path, :adms do |task, args| args.with_defaults(:config_file => '', :tab_path => '', :adms => []) # If we're in the Rails environment, use Rails initializers if defined?(::Rails) && ::Rails.version >= '3.1.0' - Rake::Task['exlibris:aleph:initialize_via_rails_initializers'].invoke + Rake::Task[:environment].invoke elsif (not args[:config_file].empty?) Rake::Task['exlibris:aleph:initialize_via_config_file'].invoke(args[:config_file]) elsif (not args[:tab_path].empty?) and (not args[:adms].empty?) Rake::Task['exlibris:aleph:initialize_via_args'].invoke(args[:tab_path], args[:yml_path], args[:adms]) else @@ -35,16 +35,9 @@ # Load Aleph configuration via given config_file Exlibris::Aleph.configure do |config| config.tab_path = tab_path config.yml_path = yml_path config.adms = adms - end - end - - desc "Initialize the Exlibris::Aleph environment via the Rails initializers" - task :initialize_via_rails_initializers do - Dir.glob("config/initializers/*.rb").each do |initializer| - require File.join(Rails.root, initializer) end end desc "Refresh the Exlibris::Aleph tables" task :refresh, [:config_file, :tab_path, :yml_path, :adms] => :initialize do \ No newline at end of file