airake 0.1.10 → 0.1.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/Notes.txt +3 -1
- data/lib/airake/daemonize.rb +4 -7
- data/lib/airake/fcsh.rb +1 -1
- data/lib/airake/project.rb +13 -6
- data/lib/airake/tasks/air.rake +1 -1
- data/lib/airake/tasks/deployment.rake +2 -2
- data/lib/airake/version.rb +1 -1
- metadata +2 -2
data/History.txt
CHANGED
data/Notes.txt
CHANGED
data/lib/airake/daemonize.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
|
2
|
-
#
|
1
|
+
# Daemonize code provided by Travis Whitton
|
2
|
+
#
|
3
3
|
# http://grub.ath.cx/daemonize/
|
4
|
-
|
5
4
|
module Daemonize
|
6
5
|
#VERSION = "0.1.2"
|
7
6
|
|
@@ -24,6 +23,7 @@ module Daemonize
|
|
24
23
|
end
|
25
24
|
|
26
25
|
# This method causes the current running process to become a daemon
|
26
|
+
#
|
27
27
|
# If closefd is true, all existing file descriptors are closed
|
28
28
|
def daemonize(oldmode=0, closefd=false)
|
29
29
|
srand # Split rand streams between spawning and daemonized process
|
@@ -57,7 +57,4 @@ module Daemonize
|
|
57
57
|
STDERR.reopen STDOUT # STDOUT/STDERR should go to a logfile
|
58
58
|
return oldmode ? sess_id : 0 # Return value is mostly irrelevant
|
59
59
|
end
|
60
|
-
end
|
61
|
-
|
62
|
-
# End Daemonize
|
63
|
-
######################################
|
60
|
+
end
|
data/lib/airake/fcsh.rb
CHANGED
@@ -47,7 +47,7 @@ module PatternPark
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
rescue StandardError => e
|
50
|
-
raise FCSHError.new("[FCSH ERROR] Was unable to connect to a running
|
50
|
+
raise FCSHError.new("[FCSH ERROR] Was unable to connect to a running fcsh process for stopping")
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
data/lib/airake/project.rb
CHANGED
@@ -15,10 +15,12 @@ module Airake
|
|
15
15
|
Options = [ :mxmlc_path, :adt_path, :bin_dir, :src_dir, :lib_dir, :test_dir,
|
16
16
|
:appxml_path, :air_path, :swf_path, :debug, :mxmlc_command, :adt_command,
|
17
17
|
:adl_command, :mxmlc_extra_opts, :adl_extra_opts, :adt_extra_opts ]
|
18
|
-
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
18
|
+
|
19
|
+
# Construct project
|
20
|
+
#
|
21
|
+
# base_dir:: Base (project) directory
|
22
|
+
# mxml_path: Path to the project.mxml (relative)
|
23
|
+
# options:: Override default paths, commands, extra opts, etc; See Options class var
|
22
24
|
def initialize(base_dir, mxml_path, options = {})
|
23
25
|
@base_dir = base_dir
|
24
26
|
@mxml_path = mxml_path
|
@@ -51,7 +53,7 @@ module Airake
|
|
51
53
|
@adl_command = options[:adl_command] || load_adl_command
|
52
54
|
end
|
53
55
|
|
54
|
-
# Run the
|
56
|
+
# Run the Adobe Developer Tool
|
55
57
|
def run_adt
|
56
58
|
run(adt_command)
|
57
59
|
end
|
@@ -67,8 +69,10 @@ module Airake
|
|
67
69
|
end
|
68
70
|
|
69
71
|
# Create project using parameters from rake ENV
|
72
|
+
#
|
70
73
|
# You can set any of the options via ENV; just upcase it. <tt>:foo_bar => ENV["FOO_BAR"]</tt>
|
71
|
-
#
|
74
|
+
#
|
75
|
+
# Booleans must be "true" for true
|
72
76
|
def self.new_from_rake(env, is_test = false)
|
73
77
|
base_dir = env["BASE_DIR"]
|
74
78
|
mxml = is_test ? env["MXML_TEST"] : env["MXML"]
|
@@ -135,10 +139,12 @@ module Airake
|
|
135
139
|
"-debug=#{@debug}" if @debug
|
136
140
|
end
|
137
141
|
|
142
|
+
# Get relative path from base (project) directory
|
138
143
|
def relative_path(path)
|
139
144
|
Pathname.new(path).relative_path_from(Pathname.new(@base_dir))
|
140
145
|
end
|
141
146
|
|
147
|
+
# Handle system command failure
|
142
148
|
def fail(cmd, error_status)
|
143
149
|
fail_message = <<-EOS
|
144
150
|
|
@@ -155,6 +161,7 @@ module Airake
|
|
155
161
|
raise "[#{error_status}] Failed to run command: #{cmd}"
|
156
162
|
end
|
157
163
|
|
164
|
+
# Run the (system) command
|
158
165
|
def run(cmd)
|
159
166
|
puts "Running: #{cmd}"
|
160
167
|
system cmd or fail(cmd, $?)
|
data/lib/airake/tasks/air.rake
CHANGED
@@ -7,7 +7,7 @@ namespace :air do
|
|
7
7
|
fcsh = PatternPark::FCSH.new_from_rake(ENV)
|
8
8
|
fcsh.execute([ project.base_dir, project.mxmlc_command ])
|
9
9
|
rescue PatternPark::FCSHConnectError => e
|
10
|
-
puts "Cannot connect to FCSHD (start by running: rake
|
10
|
+
puts "Cannot connect to FCSHD (start by running: rake fcsh:start); Continuing compilation..."
|
11
11
|
project.run_mxmlc
|
12
12
|
end
|
13
13
|
end
|
data/lib/airake/version.rb
CHANGED
metadata
CHANGED