asproject 0.1.71 → 0.1.74
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/asproject.rb +2 -0
- data/lib/asproject/version.rb +1 -1
- data/lib/tasks/env_task.rb +31 -0
- data/lib/tasks/flash_player.rb +2 -2
- data/lib/tasks/mxmlc.rb +126 -0
- data/lib/tasks/remote_file_task.rb +11 -3
- metadata +3 -13
- data/templates/asclass/mxml/.crap_file +0 -10
- data/templates/asproject/as2/art/.crap_file +0 -10
- data/templates/asproject/as2/doc/.crap_file +0 -10
- data/templates/asproject/as2/project/bin/.crap_file +0 -10
- data/templates/asproject/as2/project/lib/.crap_file +0 -10
- data/templates/asproject/as3/art/.crap_file +0 -10
- data/templates/asproject/as3/doc/.crap_file +0 -10
- data/templates/asproject/as3/project/bin/.crap_file +0 -10
- data/templates/asproject/as3/project/lib/.crap_file +0 -10
- data/templates/asproject/as3/project/test/.crap_file +0 -10
- data/templates/asproject/mxml/.crap_file +0 -10
data/lib/asproject.rb
CHANGED
@@ -28,8 +28,10 @@ require 'asclass_arguments'
|
|
28
28
|
require 'test_suite_generator'
|
29
29
|
|
30
30
|
require 'tasks/simple_resolver'
|
31
|
+
require 'tasks/env_task'
|
31
32
|
require 'tasks/remote_file_task'
|
32
33
|
require 'tasks/flash_log'
|
34
|
+
require 'tasks/mxmlc'
|
33
35
|
require 'tasks/mtasc'
|
34
36
|
require 'tasks/hamtasc'
|
35
37
|
require 'tasks/flash_player_trust'
|
data/lib/asproject/version.rb
CHANGED
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
module AsProject
|
3
|
+
class EnvTaskError < StandardError; end
|
4
|
+
|
5
|
+
class EnvTask
|
6
|
+
attr_accessor :name,
|
7
|
+
:target
|
8
|
+
|
9
|
+
def initialize(name=:env_task)
|
10
|
+
@name = name
|
11
|
+
yield self if block_given?
|
12
|
+
define
|
13
|
+
end
|
14
|
+
|
15
|
+
def define
|
16
|
+
if(target.nil?)
|
17
|
+
raise EnvTaskError.new('EnvTask requires a task target to execute')
|
18
|
+
end
|
19
|
+
begin
|
20
|
+
sh(target)
|
21
|
+
rescue NoMethodError => e
|
22
|
+
target_not_found
|
23
|
+
rescue RuntimeError => e
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def target_not_found
|
28
|
+
raise EnvTaskError.new("EnvTask was unable to find the target: #{target}")
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/tasks/flash_player.rb
CHANGED
@@ -36,8 +36,8 @@ module AsProject
|
|
36
36
|
@unix_url = nil
|
37
37
|
@unix_extracted_file = nil
|
38
38
|
elsif(version == 9)
|
39
|
-
@win_url =
|
40
|
-
@win_extracted_file =
|
39
|
+
@win_url = "http://download.macromedia.com/pub/flashplayer/updaters/9/sa_flashplayer_9_debug.exe"
|
40
|
+
@win_extracted_file = "sa_flashplayer_9_debug.exe"
|
41
41
|
@osx_url = nil
|
42
42
|
@osx_extracted_file = nil
|
43
43
|
@unix_url = nil
|
data/lib/tasks/mxmlc.rb
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
|
2
|
+
module AsProject
|
3
|
+
class MXMLC < EnvTask
|
4
|
+
attr_accessor :accessible,
|
5
|
+
:debug,
|
6
|
+
:external_library_path,
|
7
|
+
:default_frame_rate,
|
8
|
+
:default_background_color,
|
9
|
+
:default_script_limits,
|
10
|
+
:default_size,
|
11
|
+
:frames,
|
12
|
+
:incremental,
|
13
|
+
:library_path,
|
14
|
+
:locale,
|
15
|
+
:optimize,
|
16
|
+
:show_actionscript_warnings,
|
17
|
+
:source_path,
|
18
|
+
:theme,
|
19
|
+
:runtime_shared_libraries,
|
20
|
+
:output,
|
21
|
+
:use_network,
|
22
|
+
:warnings,
|
23
|
+
:input
|
24
|
+
|
25
|
+
def initialize(name=:mxmlc)
|
26
|
+
@options = []
|
27
|
+
@source_path = []
|
28
|
+
@external_library_path = []
|
29
|
+
@frames = []
|
30
|
+
@library_path = []
|
31
|
+
@theme = []
|
32
|
+
@runtime_shared_libraries = []
|
33
|
+
@incremental = false
|
34
|
+
@target = 'mxmlc'
|
35
|
+
@name = name
|
36
|
+
yield self if block_given?
|
37
|
+
define
|
38
|
+
end
|
39
|
+
|
40
|
+
def define
|
41
|
+
|
42
|
+
@external_library_path = add_path_list(@external_library_path) if @external_library_path.size > 0
|
43
|
+
@library_path = add_path_list(@library_path) if @library_path.size > 0
|
44
|
+
@source_path = add_path_list(@source_path) if @source_path.size > 0
|
45
|
+
@theme.collect do |item|
|
46
|
+
file item
|
47
|
+
file @output => item
|
48
|
+
end
|
49
|
+
|
50
|
+
add_path(File.dirname(@input))
|
51
|
+
|
52
|
+
file @output do |t|
|
53
|
+
sh(%{#{target} #{option_list.join(' ')}})
|
54
|
+
end
|
55
|
+
|
56
|
+
CLEAN.add(@output)
|
57
|
+
if(@incremental)
|
58
|
+
CLEAN.add(FileList['**/**/*.cache'])
|
59
|
+
end
|
60
|
+
|
61
|
+
desc "Compile #{@name} using MXMLC"
|
62
|
+
task @name => [@output]
|
63
|
+
end
|
64
|
+
|
65
|
+
def sp
|
66
|
+
return @source_path
|
67
|
+
end
|
68
|
+
|
69
|
+
def el
|
70
|
+
return @external_library_path
|
71
|
+
end
|
72
|
+
|
73
|
+
def rsl
|
74
|
+
return @runtime_shared_libraries
|
75
|
+
end
|
76
|
+
|
77
|
+
def l
|
78
|
+
return @library_path
|
79
|
+
end
|
80
|
+
|
81
|
+
def option_list
|
82
|
+
result = @options.dup
|
83
|
+
result << "-accessible" if accessible
|
84
|
+
result << "-debug" if debug
|
85
|
+
result << "-optimize" if optimize
|
86
|
+
result << "-warnings" if warnings
|
87
|
+
result << "-use-network" if use_network
|
88
|
+
result << "-show-actionscript-warnings" if show_actionscript_warnings
|
89
|
+
result << "-locale" << locale if locale
|
90
|
+
result << "-default-frame-rate" << default_frame_rate if default_frame_rate
|
91
|
+
result << "-default-background-color" << default_background_color if default_background_color
|
92
|
+
result << "-default-script-limits" << default_script_limits if default_script_limits
|
93
|
+
result << "-default-size" << default_size if default_size
|
94
|
+
result << "-output" << clean_path(output) if output
|
95
|
+
result << "-theme " + theme.join(" -theme ") if theme.size > 0
|
96
|
+
result << "-frame " + frames.join(" -frame ") if frames.size > 0
|
97
|
+
result << "-rsl " + runtime_shared_libraries.join(" -rsl ") if runtime_shared_libraries.size > 0
|
98
|
+
result << "-el=" + external_library_path.join(" -el=") if external_library_path.size > 0
|
99
|
+
result << "-l=" + library_path.join(" -l=") if library_path.size > 0
|
100
|
+
result << "-sp=" + source_path.join(" -sp=") if source_path.size > 0
|
101
|
+
result << "-incremental" if incremental
|
102
|
+
result << clean_path(input)
|
103
|
+
return result
|
104
|
+
end
|
105
|
+
|
106
|
+
def add_path_list(list)
|
107
|
+
list.collect do |path|
|
108
|
+
add_path(path)
|
109
|
+
clean_path(path)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
def add_path(path)
|
114
|
+
input_files = FileList[File.dirname(path) + '/**/*.as']
|
115
|
+
file input_files
|
116
|
+
file @output => input_files
|
117
|
+
end
|
118
|
+
|
119
|
+
def clean_path(path)
|
120
|
+
if(!path.index(' ').nil?)
|
121
|
+
path = %{"#{path}"}
|
122
|
+
end
|
123
|
+
return path
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
@@ -90,16 +90,20 @@ module AsProject
|
|
90
90
|
downloaded_file = downloaded_file_path
|
91
91
|
file downloaded_file do |f|
|
92
92
|
get_remote_file(@uri, downloaded_file)
|
93
|
+
if(extracted_file_path == downloaded_file)
|
94
|
+
File.chmod(0755, extracted_file_path)
|
95
|
+
end
|
93
96
|
end
|
94
97
|
|
95
98
|
if(extracted_file_path != downloaded_file)
|
96
99
|
if(!Rake::Task.task_defined?(extracted_file_path))
|
97
100
|
file extracted_file_path => downloaded_file do |f|
|
98
101
|
unpack_downloaded_file(downloaded_file, extracted_file_path)
|
102
|
+
puts "CHMODING FILE AT: " + extracted_file_path
|
99
103
|
File.chmod(0755, extracted_file_path)
|
100
104
|
end
|
101
105
|
end
|
102
|
-
|
106
|
+
end
|
103
107
|
|
104
108
|
task @name => [extracted_file_path]
|
105
109
|
end
|
@@ -241,8 +245,12 @@ module AsProject
|
|
241
245
|
elsif(response.is_a? Net::HTTPRedirection)
|
242
246
|
return fetch(response['location'], limit - 1)
|
243
247
|
else
|
244
|
-
|
245
|
-
|
248
|
+
if(response.nil?)
|
249
|
+
raise UsageError.new("Network connection failed!")
|
250
|
+
else
|
251
|
+
puts response.to_s
|
252
|
+
return response.error!
|
253
|
+
end
|
246
254
|
end
|
247
255
|
end
|
248
256
|
|
metadata
CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: asproject
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.
|
6
|
+
version: 0.1.74
|
7
7
|
date: 2007-03-12 00:00:00 -07:00
|
8
8
|
summary: AsProject is a tool set that simplifies the process of beginning and growing a new ActionScript project.
|
9
9
|
require_paths:
|
@@ -35,7 +35,6 @@ files:
|
|
35
35
|
- lib
|
36
36
|
- Manifest.txt
|
37
37
|
- MIT-LICENSE.txt
|
38
|
-
- pkg
|
39
38
|
- rakefile.rb
|
40
39
|
- README.txt
|
41
40
|
- setup.rb
|
@@ -59,11 +58,13 @@ files:
|
|
59
58
|
- lib/template_resolver.rb
|
60
59
|
- lib/test_suite_generator.rb
|
61
60
|
- lib/asproject/version.rb
|
61
|
+
- lib/tasks/env_task.rb
|
62
62
|
- lib/tasks/flash_log.rb
|
63
63
|
- lib/tasks/flash_player.rb
|
64
64
|
- lib/tasks/flash_player_trust.rb
|
65
65
|
- lib/tasks/hamtasc.rb
|
66
66
|
- lib/tasks/mtasc.rb
|
67
|
+
- lib/tasks/mxmlc.rb
|
67
68
|
- lib/tasks/remote_file_task.rb
|
68
69
|
- lib/tasks/simple_resolver.rb
|
69
70
|
- lib/tasks/swfmill.rb
|
@@ -254,23 +255,12 @@ files:
|
|
254
255
|
- templates/ide/mate/Create Class.tmCommand
|
255
256
|
- templates/ide/mate/Rebuild Test Suites.tmCommand
|
256
257
|
- templates/ide/mate/Run Rake Task.tmCommand
|
257
|
-
- templates/asclass/mxml/.crap_file
|
258
|
-
- templates/asproject/as2/art/.crap_file
|
259
|
-
- templates/asproject/as2/doc/.crap_file
|
260
|
-
- templates/asproject/as2/project/bin/.crap_file
|
261
|
-
- templates/asproject/as2/project/lib/.crap_file
|
262
|
-
- templates/asproject/as3/art/.crap_file
|
263
|
-
- templates/asproject/as3/doc/.crap_file
|
264
|
-
- templates/asproject/as3/project/bin/.crap_file
|
265
|
-
- templates/asproject/as3/project/lib/.crap_file
|
266
|
-
- templates/asproject/as3/project/test/.crap_file
|
267
258
|
- templates/asproject/fb2as/project/.actionScriptProperties
|
268
259
|
- templates/asproject/fb2as/project/.project
|
269
260
|
- templates/asproject/fb2as/project/.settings
|
270
261
|
- templates/asproject/fdt/project/.as2_classpath
|
271
262
|
- templates/asproject/fdt/project/.project
|
272
263
|
- templates/asproject/fdt/project/.settings
|
273
|
-
- templates/asproject/mxml/.crap_file
|
274
264
|
test_files: []
|
275
265
|
|
276
266
|
rdoc_options:
|