lib/barista/rake_task.rb in barista-1.2.1 vs lib/barista/rake_task.rb in barista-1.3.0
- old
+ new
@@ -1,11 +1,11 @@
-require 'barista' unless defined?(Barista)
require 'rake'
require 'rake/tasklib'
module Barista
class RakeTask < ::Rake::TaskLib
+ include Rake::DSL
attr_writer :namespace, :task_name
attr_writer :environment, :input_directory, :output_directory, :rails
def initialize
@@ -43,9 +43,11 @@
end
private
def setup_barista
+ require 'barista'
+
Barista.env = @environment if @environment
if @input_directory
Barista.root = File.expand_path(@input_directory, Dir.pwd)
end
if @output_directory
\ No newline at end of file