airake 0.2.10 → 0.2.11

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.2.11 2007-11-10
2
+
3
+ * Fixing source paths under lib
4
+ * Adding air:adl_only task for calling adl without compilation
5
+
1
6
  == 0.2.10 2007-11-10
2
7
 
3
8
  * Fixing non-escaped source path (causes problems when using path with spaces)
@@ -42,7 +42,7 @@ module Airake #:nodoc:
42
42
  source_paths = []
43
43
  # List of directories in lib/ for source_path +=
44
44
  if @lib_dir and File.directory?(@lib_dir)
45
- Dir["#{@lib_dir}/*"].collect { |f| escape(f) if File.directory?(f) }.compact
45
+ source_paths += Dir["#{@lib_dir}/*"].collect { |f| escape(f) if File.directory?(f) }.compact
46
46
  end
47
47
 
48
48
  @src_dirs.each do |src_dir|
@@ -14,7 +14,14 @@ module Airake #:nodoc:
14
14
 
15
15
  # Escape any spacing
16
16
  def escape(command)
17
- command.to_s.gsub(" ", "\\ ")
17
+ if windows?
18
+ if command =~ /\S+\s+\S+/ then
19
+ command = "\"#{command}\""
20
+ end
21
+ else
22
+ command = command.to_s.gsub(" ", "\\ ")
23
+ end
24
+ command
18
25
  end
19
26
 
20
27
  # Get relative path
@@ -22,6 +29,10 @@ module Airake #:nodoc:
22
29
  Pathname.new(path).relative_path_from(Pathname.new(from))
23
30
  end
24
31
 
32
+ def windows?
33
+ RUBY_PLATFORM =~ /win32/
34
+ end
35
+
25
36
  def with_options(options, defaults = {})
26
37
  options.each do |key, value|
27
38
  raise "Invalid option: '#{key}' for command: #{self.class}" unless respond_to?(key.to_sym)
data/lib/airake/runner.rb CHANGED
@@ -7,14 +7,14 @@ module Airake #:nodoc:
7
7
  attr_reader :output, :cmd, :took, :process
8
8
 
9
9
  def initialize(cmd)
10
- @cmd = RUBY_PLATFORM =~ /win32/ ? "cmd.exe /c #{cmd}" : "#{cmd} 2>&1"
10
+ @cmd = RUBY_PLATFORM =~ /win32/ ? "cmd.exe /c #{cmd} 2>&1" : "#{cmd} 2>&1"
11
11
  end
12
12
 
13
13
  def run(verbose = true)
14
14
  puts "Running: #{@cmd}" if verbose
15
-
15
+
16
16
  t1 = Time.now
17
- IO.popen(@cmd) do |f|
17
+ IO.popen(@cmd) do |f|
18
18
  while s = f.read(1)
19
19
  printf s
20
20
  STDOUT.flush
@@ -27,7 +27,8 @@ module Airake #:nodoc:
27
27
  success? or fail
28
28
  #puts "Took %.2fs" % [ @took ]
29
29
  end
30
- end
30
+
31
+ end
31
32
 
32
33
  def fail
33
34
  raise <<-EOS
@@ -91,7 +91,10 @@ namespace :air do
91
91
  end
92
92
 
93
93
  desc "Launch ADL"
94
- task :adl => [ :set_debug, :compile ] do
94
+ task :adl => [ :set_debug, :compile, :just_adl ] do; end
95
+
96
+ desc "Launch ADL (don't compile)"
97
+ task :adl_only do
95
98
  project = Airake::Project.new_from_rake(ENV)
96
99
  Airake::Runner.run(project.adl, :launch)
97
100
  end
@@ -2,7 +2,7 @@ module Airake #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- TINY = 10
5
+ TINY = 11
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: airake
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.2.10
6
+ version: 0.2.11
7
7
  date: 2007-11-10 00:00:00 -05:00
8
8
  summary: Tasks and generators for Adobe AIR apps
9
9
  require_paths: