h4oflashsdk 1.0.0
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/Gemfile +3 -0
- data/Gemfile.lock +41 -0
- data/POSTINSTALL.rdoc +79 -0
- data/README.textile +79 -0
- data/VERSION +1 -0
- data/bin/flashlog +8 -0
- data/bin/flashplayer +9 -0
- data/bin/sprout-as3 +9 -0
- data/bin/sprout-flex +8 -0
- data/ext/CloseFlashPlayerForDumbassOSX.scpt +6 -0
- data/ext/OpenFlashPlayerForDumbassOSX.scpt +12 -0
- data/flashsdk.gemspec +25 -0
- data/flashsdk.komodoproject +4 -0
- data/lib/flashplayer/errors.rb +12 -0
- data/lib/flashplayer/executable.rb +143 -0
- data/lib/flashplayer/log_file.rb +94 -0
- data/lib/flashplayer/mm_config.rb +96 -0
- data/lib/flashplayer/module.rb +51 -0
- data/lib/flashplayer/specification.rb +45 -0
- data/lib/flashplayer/system_mixins.rb +98 -0
- data/lib/flashplayer/task.legacy.rb +293 -0
- data/lib/flashplayer/task.rb +62 -0
- data/lib/flashplayer/trust.rb +45 -0
- data/lib/flashplayer.rb +9 -0
- data/lib/flashsdk/acompc.rb +29 -0
- data/lib/flashsdk/adl.rb +83 -0
- data/lib/flashsdk/adt.rb +276 -0
- data/lib/flashsdk/amxmlc.rb +28 -0
- data/lib/flashsdk/asdoc.rb +164 -0
- data/lib/flashsdk/compc.rb +124 -0
- data/lib/flashsdk/compiler_base.rb +1131 -0
- data/lib/flashsdk/fcsh.rb +173 -0
- data/lib/flashsdk/fcsh_socket.rb +167 -0
- data/lib/flashsdk/fdb.rb +833 -0
- data/lib/flashsdk/generators/class_generator.rb +87 -0
- data/lib/flashsdk/generators/flash_helper.rb +234 -0
- data/lib/flashsdk/generators/flex_project_generator.rb +30 -0
- data/lib/flashsdk/generators/project_generator.rb +31 -0
- data/lib/flashsdk/generators/templates/ActionScript3Class.as +9 -0
- data/lib/flashsdk/generators/templates/ActionScript3MainClass.as +11 -0
- data/lib/flashsdk/generators/templates/ActionScript3RunnerClass.as +19 -0
- data/lib/flashsdk/generators/templates/DefaultProjectImage.png +0 -0
- data/lib/flashsdk/generators/templates/Flex4Application.mxml +45 -0
- data/lib/flashsdk/generators/templates/Flex4Main.css +7 -0
- data/lib/flashsdk/generators/templates/Flex4Rakefile.rb +34 -0
- data/lib/flashsdk/generators/templates/Flex4RunnerClass.mxml +29 -0
- data/lib/flashsdk/generators/templates/FlexTestRunner.mxml +0 -0
- data/lib/flashsdk/generators/templates/Gemfile +5 -0
- data/lib/flashsdk/generators/templates/rakefile.rb +79 -0
- data/lib/flashsdk/module.rb +107 -0
- data/lib/flashsdk/mxmlc.rb +160 -0
- data/lib/flashsdk.rb +24 -0
- data/lib/flex3.rb +54 -0
- data/lib/flex4.rb +115 -0
- data/rakefile.rb +42 -0
- data/test/fixtures/acompc/simple/SomeAirFile.as +11 -0
- data/test/fixtures/air/simple/SomeProject.apk +1 -0
- data/test/fixtures/air/simple/SomeProject.as +11 -0
- data/test/fixtures/air/simple/SomeProject.mxml +9 -0
- data/test/fixtures/air/simple/SomeProject.pfx +0 -0
- data/test/fixtures/air/simple/SomeProject.swf +0 -0
- data/test/fixtures/air/simple/SomeProject.xml +13 -0
- data/test/fixtures/asdoc/lib/OtherFile.as +17 -0
- data/test/fixtures/asdoc/src/SomeFile.as +11 -0
- data/test/fixtures/compc/simple/SomeFile.as +11 -0
- data/test/fixtures/flashplayer/AsUnit Runner.swf +0 -0
- data/test/fixtures/mxmlc/broken/SomeFile.as +10 -0
- data/test/fixtures/mxmlc/simple/SomeFile.as +11 -0
- data/test/fixtures/sdk/fdb +90 -0
- data/test/fixtures/sdk/mxmlc +56 -0
- data/test/unit/acompc_test.rb +37 -0
- data/test/unit/adl_test.rb +32 -0
- data/test/unit/adt_test.rb +185 -0
- data/test/unit/amxmlc_test.rb +55 -0
- data/test/unit/asdoc_test.rb +45 -0
- data/test/unit/class_generator_test.rb +56 -0
- data/test/unit/compc_test.rb +37 -0
- data/test/unit/fake_flashplayer_system.rb +11 -0
- data/test/unit/fcsh_socket_test.rb +53 -0
- data/test/unit/fcsh_test.rb +55 -0
- data/test/unit/fdb_test.rb +54 -0
- data/test/unit/flash_helper_test.rb +43 -0
- data/test/unit/flashplayer_executable_test.rb +69 -0
- data/test/unit/flashplayer_log_file_test.rb +47 -0
- data/test/unit/flashplayer_mm_config_test.rb +74 -0
- data/test/unit/flashplayer_module_test.rb +56 -0
- data/test/unit/flashplayer_task_test.rb +91 -0
- data/test/unit/flashplayer_trust_test.rb +30 -0
- data/test/unit/flex_compiler_options_test.rb +213 -0
- data/test/unit/flex_generator_test.rb +37 -0
- data/test/unit/mxmlc_test.rb +65 -0
- data/test/unit/project_generator_test.rb +57 -0
- data/test/unit/test_helper.rb +18 -0
- metadata +284 -0
@@ -0,0 +1,213 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class FlexCompilerOptionsTest < Test::Unit::TestCase
|
4
|
+
include Sprout::TestHelper
|
5
|
+
|
6
|
+
# formal tests for a variety of Flex compiler options and how they should appear on the CLI based on true/false settings
|
7
|
+
context "A Flex compiler's options" do
|
8
|
+
|
9
|
+
setup do
|
10
|
+
@mxmlc = FlashSDK::MXMLC.new
|
11
|
+
end
|
12
|
+
|
13
|
+
teardown do
|
14
|
+
end
|
15
|
+
|
16
|
+
# -as3
|
17
|
+
should "default to as3=true" do
|
18
|
+
assert_equal true, @mxmlc.as3
|
19
|
+
end
|
20
|
+
|
21
|
+
should "not include a -as3 flag if :as3 is set to true" do
|
22
|
+
@mxmlc.as3 = true
|
23
|
+
assert_no_match /-as3/, @mxmlc.to_shell
|
24
|
+
end
|
25
|
+
|
26
|
+
should "include -as3=false flag if :as3 is set to false" do
|
27
|
+
@mxmlc.as3 = false
|
28
|
+
assert_equal '-as3=false', @mxmlc.to_shell
|
29
|
+
end
|
30
|
+
|
31
|
+
# -benchmark
|
32
|
+
should "default to benchmark=true" do
|
33
|
+
assert_equal true, @mxmlc.benchmark
|
34
|
+
end
|
35
|
+
|
36
|
+
should "not include a -benchmark flag if :benchmark is set to true" do
|
37
|
+
@mxmlc.benchmark = true
|
38
|
+
assert_no_match /-benchmark/, @mxmlc.to_shell
|
39
|
+
end
|
40
|
+
|
41
|
+
should "include -benchmark=false flag if :benchmark is set to false" do
|
42
|
+
@mxmlc.benchmark = false
|
43
|
+
assert_equal '-benchmark=false', @mxmlc.to_shell
|
44
|
+
end
|
45
|
+
|
46
|
+
# -debug
|
47
|
+
should "default to debug=false" do
|
48
|
+
assert_equal false, @mxmlc.debug
|
49
|
+
end
|
50
|
+
|
51
|
+
should "not include a -debug flag if :debug is set to false" do
|
52
|
+
assert_no_match /-debug/, @mxmlc.to_shell
|
53
|
+
end
|
54
|
+
|
55
|
+
should "include -debug flag if :debug is set to true" do
|
56
|
+
@mxmlc.debug = true
|
57
|
+
assert_equal '-debug', @mxmlc.to_shell
|
58
|
+
end
|
59
|
+
|
60
|
+
# -use-network
|
61
|
+
should "default to use_network=false" do
|
62
|
+
assert_equal true, @mxmlc.use_network
|
63
|
+
end
|
64
|
+
|
65
|
+
should "not include a -use-network flag if :use_network is set to true" do
|
66
|
+
@mxmlc.use_network = true
|
67
|
+
assert_no_match /-use-network/, @mxmlc.to_shell
|
68
|
+
end
|
69
|
+
|
70
|
+
should "include -use-network=false flag if :use_network is set to false" do
|
71
|
+
@mxmlc.use_network = false
|
72
|
+
assert_equal '-use-network=false', @mxmlc.to_shell
|
73
|
+
end
|
74
|
+
|
75
|
+
# -optimize
|
76
|
+
should "default to optimize=true" do
|
77
|
+
assert_equal true, @mxmlc.optimize
|
78
|
+
end
|
79
|
+
|
80
|
+
should "not include a -optimize flag if :optimize is set to true" do
|
81
|
+
@mxmlc.optimize = true
|
82
|
+
assert_no_match /-optimize/, @mxmlc.to_shell
|
83
|
+
end
|
84
|
+
|
85
|
+
should "include -optimize=false flag if :optimize is set to false" do
|
86
|
+
@mxmlc.optimize = false
|
87
|
+
assert_equal '-optimize=false', @mxmlc.to_shell
|
88
|
+
end
|
89
|
+
|
90
|
+
# -show-actionscript-warnings
|
91
|
+
should "default to show-actionscript-warnings=true" do
|
92
|
+
assert_equal true, @mxmlc.show_actionscript_warnings
|
93
|
+
end
|
94
|
+
|
95
|
+
should "not include a -show-actionscript-warnings flag if :show-actionscript-warnings is set to true" do
|
96
|
+
@mxmlc.show_actionscript_warnings = true
|
97
|
+
assert_no_match /-show-actionscript-warnings/, @mxmlc.to_shell
|
98
|
+
end
|
99
|
+
|
100
|
+
should "include -show-actionscript-warnings=false flag if :show-actionscript-warnings is set to false" do
|
101
|
+
@mxmlc.show_actionscript_warnings = false
|
102
|
+
assert_equal '-show-actionscript-warnings=false', @mxmlc.to_shell
|
103
|
+
end
|
104
|
+
|
105
|
+
# -show-binding-warnings
|
106
|
+
should "default to show-binding-warnings=true" do
|
107
|
+
assert_equal true, @mxmlc.show_binding_warnings
|
108
|
+
end
|
109
|
+
|
110
|
+
should "not include a -show-binding-warnings flag if :show-binding-warnings is set to true" do
|
111
|
+
@mxmlc.show_binding_warnings = true
|
112
|
+
assert_no_match /-show-binding-warnings/, @mxmlc.to_shell
|
113
|
+
end
|
114
|
+
|
115
|
+
should "include -show-binding-warnings=false flag if :show-binding-warnings is set to false" do
|
116
|
+
@mxmlc.show_binding_warnings = false
|
117
|
+
assert_equal '-show-binding-warnings=false', @mxmlc.to_shell
|
118
|
+
end
|
119
|
+
|
120
|
+
# -show-shadowed-device-font-warnings
|
121
|
+
should "default to show-shadowed-device-font-warnings=true" do
|
122
|
+
assert_equal true, @mxmlc.show_shadowed_device_font_warnings
|
123
|
+
end
|
124
|
+
|
125
|
+
should "not include a -show-shadowed-device-font-warnings flag if :show-shadowed-device-font-warnings is set to true" do
|
126
|
+
@mxmlc.show_shadowed_device_font_warnings = true
|
127
|
+
assert_no_match /-show-shadowed-device-font-warnings/, @mxmlc.to_shell
|
128
|
+
end
|
129
|
+
|
130
|
+
should "include -show-shadowed-device-font-warnings=false flag if :show-shadowed-device-font-warnings is set to false" do
|
131
|
+
@mxmlc.show_shadowed_device_font_warnings = false
|
132
|
+
assert_equal '-show-shadowed-device-font-warnings=false', @mxmlc.to_shell
|
133
|
+
end
|
134
|
+
|
135
|
+
# -show-unused-type-selector-warnings
|
136
|
+
should "default to show-unused-type-selector-warnings=true" do
|
137
|
+
assert_equal true, @mxmlc.show_unused_type_selector_warnings
|
138
|
+
end
|
139
|
+
|
140
|
+
should "not include a -show-unused-type-selector-warnings flag if :show-unused-type-selector-warnings is set to true" do
|
141
|
+
@mxmlc.show_unused_type_selector_warnings = true
|
142
|
+
assert_no_match /-show-unused-type-selector-warnings/, @mxmlc.to_shell
|
143
|
+
end
|
144
|
+
|
145
|
+
should "include -show-unused-type-selector-warnings=false flag if :show-unused-type-selector-warnings is set to false" do
|
146
|
+
@mxmlc.show_unused_type_selector_warnings = false
|
147
|
+
assert_equal '-show-unused-type-selector-warnings=false', @mxmlc.to_shell
|
148
|
+
end
|
149
|
+
|
150
|
+
# -static-link-runtime-shared-libraries
|
151
|
+
should "default to static-link-runtime-shared-libraries=false" do
|
152
|
+
assert_equal false, @mxmlc.static_link_runtime_shared_libraries
|
153
|
+
end
|
154
|
+
|
155
|
+
should "include a -static-link-runtime-shared-libraries=true flag if :static-link-runtime-shared-libraries is set to true" do
|
156
|
+
@mxmlc.static_link_runtime_shared_libraries = true
|
157
|
+
assert_equal '-static-link-runtime-shared-libraries=true', @mxmlc.to_shell
|
158
|
+
end
|
159
|
+
|
160
|
+
should "not include -static-link-runtime-shared-libraries=false flag if :static-link-runtime-shared-libraries is set to false" do
|
161
|
+
@mxmlc.static_link_runtime_shared_libraries = false
|
162
|
+
assert_no_match /-static-link-runtime-shared-libraries/, @mxmlc.to_shell
|
163
|
+
end
|
164
|
+
|
165
|
+
# -strict
|
166
|
+
should "default to strict=true" do
|
167
|
+
assert_equal true, @mxmlc.strict
|
168
|
+
end
|
169
|
+
|
170
|
+
should "not include a -strict flag if :strict is set to true" do
|
171
|
+
@mxmlc.strict = true
|
172
|
+
assert_no_match /-strict/, @mxmlc.to_shell
|
173
|
+
end
|
174
|
+
|
175
|
+
should "include -strict=false flag if :strict is set to false" do
|
176
|
+
@mxmlc.strict = false
|
177
|
+
assert_equal '-strict=false', @mxmlc.to_shell
|
178
|
+
end
|
179
|
+
|
180
|
+
# -use-resource-bundle-metadata
|
181
|
+
should "default to use-resource-bundle-metadata=true" do
|
182
|
+
assert_equal true, @mxmlc.use_resource_bundle_metadata
|
183
|
+
end
|
184
|
+
|
185
|
+
should "not include a -use-resource-bundle-metadata flag if :use-resource-bundle-metadata is set to true" do
|
186
|
+
@mxmlc.use_resource_bundle_metadata = true
|
187
|
+
assert_no_match /-use-resource-bundle-metadata/, @mxmlc.to_shell
|
188
|
+
end
|
189
|
+
|
190
|
+
should "include -use-resource-bundle-metadata=false flag if :use-resource-bundle-metadata is set to false" do
|
191
|
+
@mxmlc.use_resource_bundle_metadata = false
|
192
|
+
assert_equal '-use-resource-bundle-metadata=false', @mxmlc.to_shell
|
193
|
+
end
|
194
|
+
|
195
|
+
# -warnings
|
196
|
+
should "default to warnings=true" do
|
197
|
+
assert_equal true, @mxmlc.warnings
|
198
|
+
end
|
199
|
+
|
200
|
+
should "not include a -warnings flag if :warnings is set to true" do
|
201
|
+
@mxmlc.warnings = true
|
202
|
+
assert_no_match /-warnings/, @mxmlc.to_shell
|
203
|
+
end
|
204
|
+
|
205
|
+
should "include -warnings=false flag if :warnings is set to false" do
|
206
|
+
@mxmlc.warnings = false
|
207
|
+
assert_equal '-warnings=false', @mxmlc.to_shell
|
208
|
+
end
|
209
|
+
|
210
|
+
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class FlexGeneratorTest < Test::Unit::TestCase
|
4
|
+
include Sprout::TestHelper
|
5
|
+
|
6
|
+
context "A new Flex generator" do
|
7
|
+
|
8
|
+
setup do
|
9
|
+
@temp = File.join(fixtures, 'generators', 'tmp')
|
10
|
+
FileUtils.mkdir_p @temp
|
11
|
+
@generator = FlashSDK::FlexProjectGenerator.new
|
12
|
+
@generator.path = @temp
|
13
|
+
@generator.logger = StringIO.new
|
14
|
+
end
|
15
|
+
|
16
|
+
teardown do
|
17
|
+
remove_file @temp
|
18
|
+
end
|
19
|
+
|
20
|
+
should "generate a new Flex" do
|
21
|
+
@generator.input = "Flex"
|
22
|
+
@generator.execute
|
23
|
+
|
24
|
+
input_dir = File.join(@temp, "Flex")
|
25
|
+
assert_directory input_dir
|
26
|
+
|
27
|
+
src_dir = File.join(input_dir, "src")
|
28
|
+
assert_directory src_dir
|
29
|
+
|
30
|
+
input_file = File.join(src_dir, "Flex.mxml")
|
31
|
+
assert_file input_file do |content|
|
32
|
+
assert_matches /Flex.mxml::FlexCompleteHandler/, content
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class MXMLCTest < Test::Unit::TestCase
|
4
|
+
include Sprout::TestHelper
|
5
|
+
|
6
|
+
context "An MXMLC tool" do
|
7
|
+
|
8
|
+
setup do
|
9
|
+
@original_use_fcsh_value = ENV['USE_FCSH']
|
10
|
+
@fixture = File.join fixtures, 'mxmlc', 'simple'
|
11
|
+
@input = File.join @fixture, 'SomeFile.as'
|
12
|
+
@expected_output = File.join @fixture, "SomeFile.swf"
|
13
|
+
end
|
14
|
+
|
15
|
+
teardown do
|
16
|
+
remove_file @expected_output
|
17
|
+
ENV['USE_FCSH'] = @original_use_fcsh_value
|
18
|
+
end
|
19
|
+
|
20
|
+
should "compile a swf" do
|
21
|
+
as_a_unix_system do
|
22
|
+
mxmlc = FlashSDK::MXMLC.new
|
23
|
+
# Comment out following line to use REAL Mxmlc:
|
24
|
+
mxmlc.binary_path = File.join fixtures, 'sdk', 'mxmlc'
|
25
|
+
mxmlc.input = @input
|
26
|
+
mxmlc.output = @expected_output
|
27
|
+
mxmlc.execute
|
28
|
+
assert_file @expected_output
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
should "accept input" do
|
33
|
+
as_a_unix_system do
|
34
|
+
mxmlc = FlashSDK::MXMLC.new
|
35
|
+
mxmlc.input = 'test/fixtures/mxmlc/simple/SomeFile.as'
|
36
|
+
mxmlc.source_path << 'test/fixtures/mxmlc/simple'
|
37
|
+
assert_equal '-source-path+=test/fixtures/mxmlc/simple test/fixtures/mxmlc/simple/SomeFile.as', mxmlc.to_shell
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
should "assign default-size" do
|
42
|
+
mxmlc = FlashSDK::MXMLC.new
|
43
|
+
mxmlc.default_size = '800,500'
|
44
|
+
assert_equal '-default-size=800,500', mxmlc.to_shell
|
45
|
+
end
|
46
|
+
|
47
|
+
should "assign simple output" do
|
48
|
+
t = mxmlc 'bin/SomeProject.swf' do |t|
|
49
|
+
t.input = @input
|
50
|
+
end
|
51
|
+
assert_equal 'bin/SomeProject.swf', t.output
|
52
|
+
end
|
53
|
+
|
54
|
+
should "use fcsh if specified" do
|
55
|
+
Sprout::Executable.expects(:load).with(:mxmlc).never
|
56
|
+
|
57
|
+
mxmlc = FlashSDK::MXMLC.new
|
58
|
+
mxmlc.expects(:execute_with_fcsh)
|
59
|
+
mxmlc.input = @input
|
60
|
+
mxmlc.use_fcsh = true
|
61
|
+
mxmlc.execute
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class ProjectGeneratorTest < Test::Unit::TestCase
|
4
|
+
include Sprout::TestHelper
|
5
|
+
|
6
|
+
context "A new project generator" do
|
7
|
+
|
8
|
+
setup do
|
9
|
+
@temp = File.join(fixtures, 'generators', 'tmp')
|
10
|
+
FileUtils.mkdir_p @temp
|
11
|
+
@generator = FlashSDK::ProjectGenerator.new
|
12
|
+
@generator.path = @temp
|
13
|
+
@generator.logger = StringIO.new
|
14
|
+
end
|
15
|
+
|
16
|
+
teardown do
|
17
|
+
remove_file @temp
|
18
|
+
end
|
19
|
+
|
20
|
+
should "generate a new application" do
|
21
|
+
@generator.input = 'SomeProject'
|
22
|
+
@generator.execute
|
23
|
+
project = File.join(@temp, 'SomeProject')
|
24
|
+
assert_directory project
|
25
|
+
assert_file File.join(project, 'Gemfile') do |content|
|
26
|
+
assert_matches /asunit4/, content
|
27
|
+
end
|
28
|
+
assert_file File.join(project, 'rakefile.rb') do |content|
|
29
|
+
assert_matches /bin\/SomeProject-debug.swf\"/, content
|
30
|
+
assert_matches /src\/SomeProject.as/, content
|
31
|
+
end
|
32
|
+
assert_file File.join(project, 'src', 'SomeProject.as') do |content|
|
33
|
+
assert_matches /flash.display.Sprite;/, content
|
34
|
+
end
|
35
|
+
assert_file File.join(project, 'src', 'SomeProjectRunner.as') do |content|
|
36
|
+
assert_matches /asunit.core.TextCore;/, content
|
37
|
+
|
38
|
+
end
|
39
|
+
assert_directory File.join(project, 'lib')
|
40
|
+
assert_directory File.join(project, 'bin')
|
41
|
+
end
|
42
|
+
|
43
|
+
should "accept alternate bin dir" do
|
44
|
+
@generator.bin = 'other'
|
45
|
+
@generator.input = 'OtherProject'
|
46
|
+
@generator.execute
|
47
|
+
project = File.join(@temp, 'OtherProject')
|
48
|
+
assert_directory project
|
49
|
+
assert_directory File.join(project, 'other')
|
50
|
+
assert_file File.join(project, 'rakefile.rb') do |content|
|
51
|
+
assert_matches /other\/OtherProject-debug.swf/, content
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require "rubygems"
|
2
|
+
require "bundler"
|
3
|
+
|
4
|
+
Bundler.setup :default, :development
|
5
|
+
|
6
|
+
require 'sprout'
|
7
|
+
# These require statments *must* be in this order:
|
8
|
+
# http://bit.ly/bCC0Ew
|
9
|
+
# Somewhat surprised they're not being required by Bundler...
|
10
|
+
require 'shoulda'
|
11
|
+
require 'mocha'
|
12
|
+
|
13
|
+
$:.unshift File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'lib'))
|
14
|
+
$:.unshift File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
15
|
+
|
16
|
+
require 'flashsdk'
|
17
|
+
require 'sprout/test_helper'
|
18
|
+
|
metadata
ADDED
@@ -0,0 +1,284 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: h4oflashsdk
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- 0
|
10
|
+
version: 1.0.0
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Guenael LABOIS - H4o Studio
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2012-11-06 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
prerelease: false
|
22
|
+
type: :runtime
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: -746247827
|
29
|
+
segments:
|
30
|
+
- 1
|
31
|
+
- 1
|
32
|
+
- 18
|
33
|
+
- pre
|
34
|
+
version: 1.1.18.pre
|
35
|
+
version_requirements: *id001
|
36
|
+
name: sprout
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
prerelease: false
|
39
|
+
type: :development
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 3
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
version: "0"
|
49
|
+
version_requirements: *id002
|
50
|
+
name: shoulda
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
prerelease: false
|
53
|
+
type: :development
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 3
|
60
|
+
segments:
|
61
|
+
- 0
|
62
|
+
version: "0"
|
63
|
+
version_requirements: *id003
|
64
|
+
name: mocha
|
65
|
+
description: The Flash SDK Rubygem is brought to you by Project Sprouts (http://projectsprouts.org)
|
66
|
+
email: glabois@h4o-studio.com
|
67
|
+
executables:
|
68
|
+
- sprout-as3
|
69
|
+
- sprout-flex
|
70
|
+
- flashplayer
|
71
|
+
- flashlog
|
72
|
+
extensions: []
|
73
|
+
|
74
|
+
extra_rdoc_files: []
|
75
|
+
|
76
|
+
files:
|
77
|
+
- POSTINSTALL.rdoc
|
78
|
+
- VERSION
|
79
|
+
- bin/flashlog
|
80
|
+
- bin/sprout-flex
|
81
|
+
- bin/sprout-as3
|
82
|
+
- bin/flashplayer
|
83
|
+
- lib/flashsdk/compc.rb
|
84
|
+
- lib/flashsdk/module.rb
|
85
|
+
- lib/flashsdk/fdb.rb
|
86
|
+
- lib/flashsdk/compiler_base.rb
|
87
|
+
- lib/flashsdk/adt.rb
|
88
|
+
- lib/flashsdk/mxmlc.rb
|
89
|
+
- lib/flashsdk/fcsh.rb
|
90
|
+
- lib/flashsdk/adl.rb
|
91
|
+
- lib/flashsdk/fcsh_socket.rb
|
92
|
+
- lib/flashsdk/acompc.rb
|
93
|
+
- lib/flashsdk/amxmlc.rb
|
94
|
+
- lib/flashsdk/asdoc.rb
|
95
|
+
- lib/flashsdk/generators/flash_helper.rb
|
96
|
+
- lib/flashsdk/generators/templates/ActionScript3MainClass.as
|
97
|
+
- lib/flashsdk/generators/templates/FlexTestRunner.mxml
|
98
|
+
- lib/flashsdk/generators/templates/ActionScript3Class.as
|
99
|
+
- lib/flashsdk/generators/templates/Flex4Rakefile.rb
|
100
|
+
- lib/flashsdk/generators/templates/ActionScript3RunnerClass.as
|
101
|
+
- lib/flashsdk/generators/templates/Flex4Application.mxml
|
102
|
+
- lib/flashsdk/generators/templates/DefaultProjectImage.png
|
103
|
+
- lib/flashsdk/generators/templates/Flex4Main.css
|
104
|
+
- lib/flashsdk/generators/templates/rakefile.rb
|
105
|
+
- lib/flashsdk/generators/templates/Gemfile
|
106
|
+
- lib/flashsdk/generators/templates/Flex4RunnerClass.mxml
|
107
|
+
- lib/flashsdk/generators/class_generator.rb
|
108
|
+
- lib/flashsdk/generators/flex_project_generator.rb
|
109
|
+
- lib/flashsdk/generators/project_generator.rb
|
110
|
+
- lib/flashplayer.rb
|
111
|
+
- lib/flex4.rb
|
112
|
+
- lib/flashsdk.rb
|
113
|
+
- lib/flex3.rb
|
114
|
+
- lib/flashplayer/specification.rb
|
115
|
+
- lib/flashplayer/task.legacy.rb
|
116
|
+
- lib/flashplayer/module.rb
|
117
|
+
- lib/flashplayer/executable.rb
|
118
|
+
- lib/flashplayer/trust.rb
|
119
|
+
- lib/flashplayer/errors.rb
|
120
|
+
- lib/flashplayer/system_mixins.rb
|
121
|
+
- lib/flashplayer/task.rb
|
122
|
+
- lib/flashplayer/mm_config.rb
|
123
|
+
- lib/flashplayer/log_file.rb
|
124
|
+
- Gemfile.lock
|
125
|
+
- ext/OpenFlashPlayerForDumbassOSX.scpt
|
126
|
+
- ext/CloseFlashPlayerForDumbassOSX.scpt
|
127
|
+
- README.textile
|
128
|
+
- flashsdk.gemspec
|
129
|
+
- test/unit/compc_test.rb
|
130
|
+
- test/unit/flashplayer_executable_test.rb
|
131
|
+
- test/unit/adt_test.rb
|
132
|
+
- test/unit/fcsh_socket_test.rb
|
133
|
+
- test/unit/amxmlc_test.rb
|
134
|
+
- test/unit/flashplayer_task_test.rb
|
135
|
+
- test/unit/flashplayer_module_test.rb
|
136
|
+
- test/unit/acompc_test.rb
|
137
|
+
- test/unit/class_generator_test.rb
|
138
|
+
- test/unit/flashplayer_trust_test.rb
|
139
|
+
- test/unit/flashplayer_mm_config_test.rb
|
140
|
+
- test/unit/flash_helper_test.rb
|
141
|
+
- test/unit/fake_flashplayer_system.rb
|
142
|
+
- test/unit/fdb_test.rb
|
143
|
+
- test/unit/asdoc_test.rb
|
144
|
+
- test/unit/mxmlc_test.rb
|
145
|
+
- test/unit/flex_compiler_options_test.rb
|
146
|
+
- test/unit/test_helper.rb
|
147
|
+
- test/unit/adl_test.rb
|
148
|
+
- test/unit/flashplayer_log_file_test.rb
|
149
|
+
- test/unit/fcsh_test.rb
|
150
|
+
- test/unit/project_generator_test.rb
|
151
|
+
- test/unit/flex_generator_test.rb
|
152
|
+
- test/fixtures/air/simple/SomeProject.pfx
|
153
|
+
- test/fixtures/air/simple/SomeProject.xml
|
154
|
+
- test/fixtures/air/simple/SomeProject.as
|
155
|
+
- test/fixtures/air/simple/SomeProject.swf
|
156
|
+
- test/fixtures/air/simple/SomeProject.apk
|
157
|
+
- test/fixtures/air/simple/SomeProject.mxml
|
158
|
+
- test/fixtures/asdoc/src/SomeFile.as
|
159
|
+
- test/fixtures/asdoc/lib/OtherFile.as
|
160
|
+
- test/fixtures/compc/simple/SomeFile.as
|
161
|
+
- test/fixtures/sdk/fdb
|
162
|
+
- test/fixtures/sdk/mxmlc
|
163
|
+
- test/fixtures/mxmlc/simple/SomeFile.as
|
164
|
+
- test/fixtures/mxmlc/broken/SomeFile.as
|
165
|
+
- test/fixtures/flashplayer/AsUnit Runner.swf
|
166
|
+
- test/fixtures/acompc/simple/SomeAirFile.as
|
167
|
+
- flashsdk.komodoproject
|
168
|
+
- rakefile.rb
|
169
|
+
- Gemfile
|
170
|
+
homepage: http://www.adobe.com/products/flex
|
171
|
+
licenses: []
|
172
|
+
|
173
|
+
post_install_message: |+
|
174
|
+
++++++++++++++++++++++++++++++++
|
175
|
+
You have successfully installed the Project Sprouts Flash SDK!
|
176
|
+
|
177
|
+
To get started with a new ActionScript 3 project:
|
178
|
+
|
179
|
+
# Generate a project named 'SomeProject'
|
180
|
+
sprout-as3 SomeProject
|
181
|
+
|
182
|
+
# Change directory to the newly-created directory:
|
183
|
+
cd SomeProject
|
184
|
+
|
185
|
+
# Install whatever additional gems are required
|
186
|
+
# by this project Gemfile:
|
187
|
+
bundle install
|
188
|
+
|
189
|
+
# Use Rake to run the default task:
|
190
|
+
rake
|
191
|
+
|
192
|
+
++++++++++++++++++++++++++++++++
|
193
|
+
Next Steps:
|
194
|
+
|
195
|
+
# Generate a new class, test case and test suite:
|
196
|
+
sprout-class utils.MathUtil
|
197
|
+
|
198
|
+
# Compile and run the test harness:
|
199
|
+
rake test
|
200
|
+
|
201
|
+
# List available rake tasks:
|
202
|
+
rake -T
|
203
|
+
|
204
|
+
# List available generators:
|
205
|
+
sprout-
|
206
|
+
(followed by the TAB key)
|
207
|
+
|
208
|
+
++++++++++++++++++++++++++++++++
|
209
|
+
To use FCSH, simply start the service,
|
210
|
+
and call the fcsh task before any other
|
211
|
+
mxmlc or compc task:
|
212
|
+
|
213
|
+
# Open a new terminal and from your project:
|
214
|
+
rake fcsh:start
|
215
|
+
|
216
|
+
# Open a new terminal and from your project:
|
217
|
+
rake fcsh test
|
218
|
+
|
219
|
+
++++++++++++++++++++++++++++++++
|
220
|
+
To use FDB, simply call the fdb task
|
221
|
+
before any flashplayer task:
|
222
|
+
|
223
|
+
# Run the default task with FDB:
|
224
|
+
rake fdb test
|
225
|
+
|
226
|
+
(type, 'help' for more info when prompted)
|
227
|
+
|
228
|
+
++++++++++++++++++++++++++++++++
|
229
|
+
You can also launch any SWF file using
|
230
|
+
a debug Flash Player with:
|
231
|
+
|
232
|
+
flashplayer bin/SomeProject.swf
|
233
|
+
|
234
|
+
Or run a SWF with FDB like:
|
235
|
+
|
236
|
+
flashplayer --fdb bin/SomeProject.swf
|
237
|
+
|
238
|
+
++++++++++++++++++++++++++++++++
|
239
|
+
You can also tail your system's flashlog
|
240
|
+
while running a SWF or HTML page with:
|
241
|
+
|
242
|
+
flashlog
|
243
|
+
|
244
|
+
++++++++++++++++++++++++++++++++
|
245
|
+
Issues or Questions?
|
246
|
+
|
247
|
+
Troubleshooting at:
|
248
|
+
http://projectsprouts.org/troubleshooting.html
|
249
|
+
|
250
|
+
Email us at:
|
251
|
+
projectsprouts@googlegroups.com
|
252
|
+
|
253
|
+
rdoc_options: []
|
254
|
+
|
255
|
+
require_paths:
|
256
|
+
- lib
|
257
|
+
- lib
|
258
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
259
|
+
none: false
|
260
|
+
requirements:
|
261
|
+
- - ">="
|
262
|
+
- !ruby/object:Gem::Version
|
263
|
+
hash: 3
|
264
|
+
segments:
|
265
|
+
- 0
|
266
|
+
version: "0"
|
267
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
268
|
+
none: false
|
269
|
+
requirements:
|
270
|
+
- - ">="
|
271
|
+
- !ruby/object:Gem::Version
|
272
|
+
hash: 3
|
273
|
+
segments:
|
274
|
+
- 0
|
275
|
+
version: "0"
|
276
|
+
requirements: []
|
277
|
+
|
278
|
+
rubyforge_project:
|
279
|
+
rubygems_version: 1.8.15
|
280
|
+
signing_key:
|
281
|
+
specification_version: 3
|
282
|
+
summary: Adobe Flash SDK including mxmlc, compc, asdoc, adl, adt, optimizer and fdb
|
283
|
+
test_files: []
|
284
|
+
|