airake 0.2.10 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +5 -0
- data/lib/airake/commands/amxmlc.rb +1 -1
- data/lib/airake/commands/base.rb +12 -1
- data/lib/airake/runner.rb +5 -4
- data/lib/airake/tasks/air.rake +4 -1
- data/lib/airake/version.rb +1 -1
- metadata +1 -1
data/History.txt
CHANGED
@@ -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|
|
data/lib/airake/commands/base.rb
CHANGED
@@ -14,7 +14,14 @@ module Airake #:nodoc:
|
|
14
14
|
|
15
15
|
# Escape any spacing
|
16
16
|
def escape(command)
|
17
|
-
|
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
|
-
|
30
|
+
|
31
|
+
end
|
31
32
|
|
32
33
|
def fail
|
33
34
|
raise <<-EOS
|
data/lib/airake/tasks/air.rake
CHANGED
@@ -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
|
data/lib/airake/version.rb
CHANGED