lib/fulmar/domain/service/application_service.rb in fulmar-0.6.5 vs lib/fulmar/domain/service/application_service.rb in fulmar-1.0.0

- old
+ new

@@ -6,11 +6,10 @@ # The main application which extends rake class ApplicationService < Rake::Application def initialize super @rakefiles = %w(fulmarfile Fulmarfile fulmarfile.rb Fulmarfile.rb) - @rakefiles.push(*fulmar_tasks) end def name 'fulmar' end @@ -18,10 +17,16 @@ def run Rake.application = self super end + def init + super + options.rakelib << fulmar_task_dir + options.rakelib << 'Fulmar' + end + def define_task(task_class, *args, &block) super(task_class, *args, &wrap_environment(&block)) end def wrap_environment @@ -36,11 +41,11 @@ configuration.target = target unless target.nil? end end # Add fulmar application tasks - def fulmar_tasks - Dir.glob(File.expand_path(File.join(File.dirname(__FILE__), '../', 'task')) + '/*.rake') + def fulmar_task_dir + File.expand_path(File.join(File.dirname(__FILE__), '..', 'task')) end end end end end