flashsdk 1.0.20.pre → 1.0.21.pre
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/POSTINSTALL.rdoc +20 -0
- data/VERSION +1 -1
- data/lib/flashsdk/asdoc.rb +140 -0
- data/lib/flashsdk/compiler_base.rb +14 -11
- data/lib/flashsdk/mxmlc.rb +4 -2
- data/lib/flashsdk.rb +1 -0
- data/test/fixtures/asdoc/lib/OtherFile.as +17 -0
- data/test/fixtures/asdoc/src/SomeFile.as +11 -0
- data/test/unit/asdoc_test.rb +45 -0
- metadata +27 -3
data/POSTINSTALL.rdoc
CHANGED
@@ -32,6 +32,26 @@ Next Steps:
|
|
32
32
|
sprout-
|
33
33
|
(followed by the TAB key)
|
34
34
|
|
35
|
+
++++++++++++++++++++++++++++++++
|
36
|
+
To use FCSH, simply start the service,
|
37
|
+
and call the fcsh task before any other
|
38
|
+
mxmlc or compc task:
|
39
|
+
|
40
|
+
# Open a new terminal and from your project:
|
41
|
+
rake fcsh:start
|
42
|
+
|
43
|
+
# Open a new terminal and from your project:
|
44
|
+
rake fcsh test
|
45
|
+
|
46
|
+
++++++++++++++++++++++++++++++++
|
47
|
+
To use FDB, simply call the fdb task
|
48
|
+
before any flashplayer task:
|
49
|
+
|
50
|
+
# Run the default task with FDB:
|
51
|
+
rake fdb test
|
52
|
+
|
53
|
+
(type, 'help' for more info when prompted)
|
54
|
+
|
35
55
|
++++++++++++++++++++++++++++++++
|
36
56
|
Issues or Questions?
|
37
57
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.21.pre
|
@@ -0,0 +1,140 @@
|
|
1
|
+
module FlashSDK
|
2
|
+
|
3
|
+
class AsDoc < CompilerBase
|
4
|
+
|
5
|
+
##
|
6
|
+
# The default prefix for shell params.
|
7
|
+
set :default_prefix, '-'
|
8
|
+
|
9
|
+
##
|
10
|
+
# The the Ruby file that will load the expected
|
11
|
+
# Sprout::Specification.
|
12
|
+
#
|
13
|
+
# Default value is 'flex4'
|
14
|
+
#
|
15
|
+
set :pkg_name, 'flex4'
|
16
|
+
|
17
|
+
##
|
18
|
+
# The default pkg version
|
19
|
+
#
|
20
|
+
set :pkg_version, ">= #{FlashSDK::VERSION}"
|
21
|
+
|
22
|
+
##
|
23
|
+
# The default executable target.
|
24
|
+
#
|
25
|
+
set :executable, :asdoc
|
26
|
+
|
27
|
+
##
|
28
|
+
# Boolean specifies whether to include the date in the footer.
|
29
|
+
add_param :date_in_footer, Boolean
|
30
|
+
|
31
|
+
##
|
32
|
+
# List of source file to include in the documentation.
|
33
|
+
add_param :doc_sources, Files
|
34
|
+
|
35
|
+
add_param_alias :ds, :doc_sources
|
36
|
+
|
37
|
+
##
|
38
|
+
# List of classes to include in the documentation.
|
39
|
+
add_param :doc_classes, Strings
|
40
|
+
|
41
|
+
##
|
42
|
+
# List of namespaces to include in the documentation.
|
43
|
+
add_param :doc_namespaces, Strings
|
44
|
+
|
45
|
+
##
|
46
|
+
# Path to look for the example files.
|
47
|
+
add_param :examples_path, Paths
|
48
|
+
|
49
|
+
##
|
50
|
+
# Classes to exclude from documentation.
|
51
|
+
add_param :exclude_classes, Strings
|
52
|
+
|
53
|
+
##
|
54
|
+
# Boolean specifying whether to exclude dependencies.
|
55
|
+
add_param :exclude_dependencies, Boolean
|
56
|
+
|
57
|
+
##
|
58
|
+
# List of source files to exclude form the documentation.
|
59
|
+
add_param :exclude_sources, Files
|
60
|
+
|
61
|
+
##
|
62
|
+
# Footer string to be displayed in the documentation.
|
63
|
+
add_param :footer, String
|
64
|
+
|
65
|
+
add_param :include_all_for_asdoc, Boolean
|
66
|
+
|
67
|
+
##
|
68
|
+
# If true, manifest entries with lookupOnly=true are included in SWC
|
69
|
+
# catalog. Default is false. (advanced)
|
70
|
+
add_param :include_lookup_only, Boolean, { :default => false }
|
71
|
+
|
72
|
+
##
|
73
|
+
# Width of the left frame.
|
74
|
+
add_param :left_frameset_width, Number
|
75
|
+
|
76
|
+
##
|
77
|
+
# Report well-formed HTML errors as warnings.
|
78
|
+
add_param :lenient, Boolean
|
79
|
+
|
80
|
+
##
|
81
|
+
# Title to be displayed in the title bar.
|
82
|
+
add_param :main_title, String
|
83
|
+
|
84
|
+
##
|
85
|
+
# File containing description for packages.
|
86
|
+
add_param :package_description_file, Files
|
87
|
+
|
88
|
+
##
|
89
|
+
# Specifies a description for a package name.
|
90
|
+
add_param :package, Path
|
91
|
+
|
92
|
+
##
|
93
|
+
# Path for custom templates.
|
94
|
+
add_param :templates_path, Path
|
95
|
+
|
96
|
+
##
|
97
|
+
# Title to be displayed in the browser window.
|
98
|
+
add_param :window_title, String
|
99
|
+
|
100
|
+
# TODO: Possibly remove the following from the CompilerBase
|
101
|
+
#
|
102
|
+
# include_resource_bundles
|
103
|
+
|
104
|
+
def execute
|
105
|
+
# Never use fcsh for asdoc
|
106
|
+
# (overused inheritance smell)
|
107
|
+
self.use_fcsh = false
|
108
|
+
start = Time.now
|
109
|
+
super
|
110
|
+
duration = (Time.now - start).seconds
|
111
|
+
Sprout.stdout.puts "[ASDOC] Creation complete in #{duration} seconds."
|
112
|
+
end
|
113
|
+
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
##
|
118
|
+
# Create a new Rake::File task that will execute {FlashSDK::AsDoc}.
|
119
|
+
#
|
120
|
+
# @return [FlashSDK::AsDoc]
|
121
|
+
#
|
122
|
+
# @example The following is a simple AsDoc task:
|
123
|
+
#
|
124
|
+
# desc "Compile the SWF"
|
125
|
+
# mxmlc 'bin/SomeProject.swf' do |t|
|
126
|
+
# t.library_path << 'lib/corelib.swc'
|
127
|
+
# t.input = 'src/SomeProject.as'
|
128
|
+
# end
|
129
|
+
#
|
130
|
+
# desc "Generate documentation"
|
131
|
+
# asdoc 'docs/' do |t|
|
132
|
+
# t.doc_sources << 'src'
|
133
|
+
# end
|
134
|
+
#
|
135
|
+
def asdoc args, &block
|
136
|
+
exe = FlashSDK::AsDoc.new
|
137
|
+
exe.to_rake args, &block
|
138
|
+
exe
|
139
|
+
end
|
140
|
+
|
@@ -661,6 +661,19 @@ module FlashSDK
|
|
661
661
|
|
662
662
|
protected
|
663
663
|
|
664
|
+
def update_fcsh
|
665
|
+
# Check for USE_FCSH on the environment
|
666
|
+
# variable hash, update instance value
|
667
|
+
# if found to be true:
|
668
|
+
if ENV['USE_FCSH'].to_s == 'true'
|
669
|
+
self.use_fcsh = true
|
670
|
+
end
|
671
|
+
|
672
|
+
if !ENV['FCSH_PORT'].nil?
|
673
|
+
self.fcsh_port = ENV['FCSH_PORT']
|
674
|
+
end
|
675
|
+
end
|
676
|
+
|
664
677
|
##
|
665
678
|
# Template method called by {Sprout::Executable} when
|
666
679
|
# a {Sprout::Library} is found in the Rake::Task prerequisite list.
|
@@ -681,17 +694,7 @@ module FlashSDK
|
|
681
694
|
##
|
682
695
|
# override
|
683
696
|
def prepare
|
684
|
-
|
685
|
-
# variable hash, update instance value
|
686
|
-
# if found to be true:
|
687
|
-
if ENV['USE_FCSH'].to_s == 'true'
|
688
|
-
self.use_fcsh = true
|
689
|
-
end
|
690
|
-
|
691
|
-
if !ENV['FCSH_PORT'].nil?
|
692
|
-
self.fcsh_port = ENV['FCSH_PORT']
|
693
|
-
end
|
694
|
-
|
697
|
+
update_fcsh if use_fcsh.nil?
|
695
698
|
super
|
696
699
|
end
|
697
700
|
|
data/lib/flashsdk/mxmlc.rb
CHANGED
@@ -56,6 +56,8 @@ module FlashSDK
|
|
56
56
|
# This must be the last item in this list
|
57
57
|
add_param :input, File, { :required => true, :hidden_name => true }
|
58
58
|
|
59
|
+
##
|
60
|
+
# The default prefix for shell params.
|
59
61
|
set :default_prefix, '-'
|
60
62
|
|
61
63
|
##
|
@@ -96,7 +98,7 @@ end
|
|
96
98
|
##
|
97
99
|
# Create a new Rake::File task that will execute {FlashSDK::MXMLC}.
|
98
100
|
#
|
99
|
-
# @return [
|
101
|
+
# @return [FlashSDK::MXMLC]
|
100
102
|
#
|
101
103
|
# @example The following is a simple MXMLC task:
|
102
104
|
#
|
@@ -107,7 +109,7 @@ end
|
|
107
109
|
#
|
108
110
|
def mxmlc args, &block
|
109
111
|
exe = FlashSDK::MXMLC.new
|
110
|
-
exe.to_rake
|
112
|
+
exe.to_rake args, &block
|
111
113
|
exe
|
112
114
|
end
|
113
115
|
|
data/lib/flashsdk.rb
CHANGED
@@ -11,6 +11,7 @@ require 'flashsdk/generators/flex_project_generator'
|
|
11
11
|
require 'flashsdk/fcsh'
|
12
12
|
require 'flashsdk/fcsh_socket'
|
13
13
|
require 'flashsdk/compiler_base'
|
14
|
+
require 'flashsdk/asdoc'
|
14
15
|
require 'flashsdk/mxmlc'
|
15
16
|
require 'flashsdk/compc'
|
16
17
|
require 'flashsdk/amxmlc'
|
@@ -0,0 +1,17 @@
|
|
1
|
+
package {
|
2
|
+
import flash.display.Sprite;
|
3
|
+
|
4
|
+
/**
|
5
|
+
* Hello Documentation!
|
6
|
+
*/
|
7
|
+
public class OtherFile extends Sprite {
|
8
|
+
|
9
|
+
/**
|
10
|
+
* This is the constructor!
|
11
|
+
*/
|
12
|
+
public function OtherFile() {
|
13
|
+
trace(">> OtherFile instantiated");
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class AsDocTest < Test::Unit::TestCase
|
4
|
+
include Sprout::TestHelper
|
5
|
+
|
6
|
+
context "An AsDoc tool" do
|
7
|
+
|
8
|
+
setup do
|
9
|
+
@original_use_fcsh_value = ENV['USE_FCSH']
|
10
|
+
@fixture = File.join fixtures, 'asdoc'
|
11
|
+
@source_path = File.join @fixture, 'src'
|
12
|
+
@lib_path = File.join @fixture, 'lib'
|
13
|
+
@doc_output = File.join @fixture, 'docs'
|
14
|
+
|
15
|
+
@swf_input = File.join @fixture, 'src', 'SomeFile.as'
|
16
|
+
@swf_output = File.join @fixture, 'bin', 'SomeFile.swf'
|
17
|
+
end
|
18
|
+
|
19
|
+
teardown do
|
20
|
+
remove_file @doc_output
|
21
|
+
end
|
22
|
+
|
23
|
+
should "generate simple documentation" do
|
24
|
+
t = FlashSDK::AsDoc.new
|
25
|
+
t.doc_sources << @source_path
|
26
|
+
t.doc_sources << @lib_path
|
27
|
+
t.output = @doc_output
|
28
|
+
t.execute
|
29
|
+
|
30
|
+
assert_file File.join(@doc_output, 'index.html')
|
31
|
+
end
|
32
|
+
|
33
|
+
=begin
|
34
|
+
should "work with a rake task too" do
|
35
|
+
exe = asdoc @doc_output do |t|
|
36
|
+
t.doc_sources << @source_path
|
37
|
+
t.doc_sources << @lib_path
|
38
|
+
end
|
39
|
+
exe.execute
|
40
|
+
end
|
41
|
+
=end
|
42
|
+
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
metadata
CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 21
|
9
9
|
- pre
|
10
|
-
version: 1.0.
|
10
|
+
version: 1.0.21.pre
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Luke Bayes
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-26 00:00:00 -08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -95,6 +95,7 @@ files:
|
|
95
95
|
- lib/flashsdk/adl.rb
|
96
96
|
- lib/flashsdk/adt.rb
|
97
97
|
- lib/flashsdk/amxmlc.rb
|
98
|
+
- lib/flashsdk/asdoc.rb
|
98
99
|
- lib/flashsdk/compc.rb
|
99
100
|
- lib/flashsdk/compiler_base.rb
|
100
101
|
- lib/flashsdk/fcsh.rb
|
@@ -128,6 +129,8 @@ files:
|
|
128
129
|
- test/fixtures/air/simple/SomeProject.pfx
|
129
130
|
- test/fixtures/air/simple/SomeProject.swf
|
130
131
|
- test/fixtures/air/simple/SomeProject.xml
|
132
|
+
- test/fixtures/asdoc/lib/OtherFile.as
|
133
|
+
- test/fixtures/asdoc/src/SomeFile.as
|
131
134
|
- test/fixtures/compc/simple/SomeFile.as
|
132
135
|
- test/fixtures/flashplayer/AsUnit Runner.swf
|
133
136
|
- test/fixtures/mxmlc/broken/SomeFile.as
|
@@ -137,6 +140,7 @@ files:
|
|
137
140
|
- test/unit/adl_test.rb
|
138
141
|
- test/unit/adt_test.rb
|
139
142
|
- test/unit/amxmlc_test.rb
|
143
|
+
- test/unit/asdoc_test.rb
|
140
144
|
- test/unit/class_generator_test.rb
|
141
145
|
- test/unit/compc_test.rb
|
142
146
|
- test/unit/fcsh_socket_test.rb
|
@@ -192,6 +196,26 @@ post_install_message: |+
|
|
192
196
|
sprout-
|
193
197
|
(followed by the TAB key)
|
194
198
|
|
199
|
+
++++++++++++++++++++++++++++++++
|
200
|
+
To use FCSH, simply start the service,
|
201
|
+
and call the fcsh task before any other
|
202
|
+
mxmlc or compc task:
|
203
|
+
|
204
|
+
# Open a new terminal and from your project:
|
205
|
+
rake fcsh:start
|
206
|
+
|
207
|
+
# Open a new terminal and from your project:
|
208
|
+
rake fcsh test
|
209
|
+
|
210
|
+
++++++++++++++++++++++++++++++++
|
211
|
+
To use FDB, simply call the fdb task
|
212
|
+
before any flashplayer task:
|
213
|
+
|
214
|
+
# Run the default task with FDB:
|
215
|
+
rake fdb test
|
216
|
+
|
217
|
+
(type, 'help' for more info when prompted)
|
218
|
+
|
195
219
|
++++++++++++++++++++++++++++++++
|
196
220
|
Issues or Questions?
|
197
221
|
|