lib/airake/project.rb in airake-0.2.6 vs lib/airake/project.rb in airake-0.2.7
- old
+ new
@@ -1,8 +1,7 @@
-require 'pathname'
+module Airake #:nodoc
-module Airake
# Project settings for AIR app
class Project
attr_reader :base_dir, :bin_dir, :src_dir, :lib_dir, :test_dir
attr_reader :mxml_path, :appxml_path, :air_path, :swf_path
@@ -42,23 +41,27 @@
# Debug options
@debug = options[:debug].is_a?(TrueClass) || options[:debug] == "true"
end
- # Flex compiler command
+ # Flex compiler command for this project
def amxmlc
- Airake::Commands::Amxmlc.new(self, @options)
+ options = @options.merge({ :swf_path => swf_path, :mxml_path => mxml_path, :lib_dir => lib_dir,
+ :src_dir => src_dir, :test_dir => test_dir, :debug_option => debug_option })
+ Airake::Commands::Amxmlc.new(options)
end
- # ADL command
+ # ADL command for this project
def adl
- Airake::Commands::Adl.new(self, @options)
+ options = @options.merge({ :appxml_path => appxml_path, :root_dir => base_dir })
+ Airake::Commands::Adl.new(options)
end
- # ADT command
+ # ADT command for this project
def adt
- Airake::Commands::Adt.new(self, @options)
+ options = @options.merge({ :air_path => air_path, :appxml_path => appxml_path, :swf_path => swf_path, :base_dir => base_dir })
+ Airake::Commands::Adt.new(options)
end
# Create project using parameters from rake ENV
#
# You can set any of the options via ENV; just upcase it. <tt>:foo_bar => ENV["FOO_BAR"]</tt>
@@ -79,14 +82,9 @@
end
def debug_option
"-debug=#{@debug}" if @debug
end
-
- # Get relative path from base (project) directory
- def relative_path(path)
- Pathname.new(path).relative_path_from(Pathname.new(@base_dir))
- end
-
+
end
end
\ No newline at end of file