sprout-as3-bundle 0.2.3 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ module Sprout # :nodoc:
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 0
5
5
  MINOR = 2
6
- TINY = 3
6
+ TINY = 9
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
9
9
  MAJOR_MINOR = [MAJOR, MINOR].join('.')
data/lib/sprout/as3.rb CHANGED
@@ -2,4 +2,4 @@ require 'sprout'
2
2
  require 'sprout/generator'
3
3
  require 'sprout/as3_tasks'
4
4
 
5
- Rails::Generator::Base.use_sprout_sources!('as3')
5
+ RubiGen::Base.use_sprout_sources!('as3')
@@ -6,6 +6,7 @@ require 'sprout/tasks/compc_task'
6
6
  require 'sprout/tasks/asdoc_task'
7
7
  require 'sprout/tasks/adl_task'
8
8
  require 'sprout/tasks/adt_task'
9
+ require 'sprout/tasks/fdb_task'
9
10
 
10
11
  require 'sprout/tasks/mxmlc_helper'
11
12
  require 'sprout/tasks/mxmlc_flex_builder'
@@ -24,21 +24,21 @@ project_model :model do |m|
24
24
  # m.libraries << :corelib
25
25
  end
26
26
 
27
- desc 'Compile and run the application for debugging'
27
+
28
+ desc 'Compile and debug the application'
28
29
  debug :debug
29
30
 
30
- desc 'Compile and run the test harness'
31
+ desc 'Compile run the test harness'
31
32
  unit :test
32
33
 
33
- desc 'Compile for deployment'
34
+ desc 'Compile the optimized deployment'
34
35
  deploy :deploy
35
36
 
36
- desc 'Generate documentation'
37
+ desc 'Create documentation'
37
38
  document :doc
38
39
 
40
+ desc 'Compile a SWC file'
41
+ swc :swc
42
+
39
43
  # set up the default rake task
40
44
  task :default => :debug
41
-
42
- # Coming Soon....
43
- #desc "Generate Flex Builder projects"
44
- #flex_builder :project
@@ -0,0 +1,54 @@
1
+ module Sprout
2
+ class ADLTask < ToolTask
3
+ # Specifies the directory containing the runtime to use. If not
4
+ # specified, the runtime directory in the same SDK as the ADL program
5
+ # will be used. If you move ADL out of its SDK folder, then you must
6
+ # specify the runtime directory. On Windows, specify the directory
7
+ # containing the Adobe AIR directory. On Mac OSX, specify the directory
8
+ # containing Adobe AIR.framework.
9
+ def runtime=(file)
10
+ @runtime = file
11
+ end
12
+
13
+ # Turns off debugging support. If used, the application process cannot
14
+ # connect to the Flash debugger and dialogs for unhandled exceptions are
15
+ # suppressed.
16
+ #
17
+ # Trace statements still print to the console window. Turning off
18
+ # debugging allows your application to run a little faster and also
19
+ # emulates the execution mode of an installed application more closely.
20
+ def nodebug=(boolean)
21
+ @nodebug = boolean
22
+ end
23
+
24
+ # Assigns the specified value as the publisher ID of the AIR application
25
+ # for this run. Specifying a temporary publisher ID allows you to test
26
+ # features of an AIR application, such as communicating over a local
27
+ # connection, that use the publisher ID to help uniquely identify an
28
+ # application.
29
+ #
30
+ # The final publisher ID is determined by the digital certificate used to
31
+ # sign the AIR installation file.
32
+ def pubid=(string)
33
+ @pubid = string
34
+ end
35
+
36
+ # The application descriptor file.
37
+ def application_descriptor=(file)
38
+ @application_descriptor = file
39
+ end
40
+
41
+ # The root directory of the application to run. If not
42
+ # specified, the directory containing the application
43
+ # descriptor file is used.
44
+ def root_directory=(file)
45
+ @root_directory = file
46
+ end
47
+
48
+ # Passed to the application as command-line arguments.
49
+ def arguments=(string)
50
+ @arguments = string
51
+ end
52
+
53
+ end
54
+ end
@@ -0,0 +1,44 @@
1
+ module Sprout
2
+ class ADTCertTask < ToolTask
3
+ # Using -certificate option as default.
4
+ def certificate=(boolean)
5
+ @certificate = boolean
6
+ end
7
+
8
+ # The string assigned as the common name of the new certificate.
9
+ def cn=(string)
10
+ @cn = string
11
+ end
12
+
13
+ # Astring assigned as the organizational unit issuing the certificate.
14
+ def ou=(string)
15
+ @ou = string
16
+ end
17
+
18
+ # A string assigned as the organization issuing the certificate.
19
+ def o=(string)
20
+ @o = string
21
+ end
22
+
23
+ # A two-letter ISO-3166 country code. A certificate is not generated if an invalid code is supplied.
24
+ def c=(string)
25
+ @c = string
26
+ end
27
+
28
+ # The type of key to use for the certificate, either "1024-RSA" or "2048-RSA".
29
+ def keytype=(string)
30
+ @keytype = string
31
+ end
32
+
33
+ # The path for the certificate file to be generated.
34
+ def keystore=(file)
35
+ @keystore = file
36
+ end
37
+
38
+ # The password for the new certificate. The password is required when signing AIR files with this certificate.
39
+ def keypass=(string)
40
+ @keypass = string
41
+ end
42
+
43
+ end
44
+ end
@@ -0,0 +1,88 @@
1
+ module Sprout
2
+ class ADTTask < ToolTask
3
+ # Using -package option as default.
4
+ def package=(boolean)
5
+ @package = boolean
6
+ end
7
+
8
+ # The alias of a key in the keystore. Specifying an alias is not
9
+ # necessary when a keystore only contains a single certificate. If no
10
+ # alias is specified, ADT uses the first key in the keystore.
11
+ def alias=(string)
12
+ @alias = string
13
+ end
14
+
15
+ # The type of keystore, determined by the keystore implementation. The
16
+ # default keystore implementation included with most installations of
17
+ # Java supports the JKS and PKCS12 types. Java 5.0 includes support for
18
+ # the PKCS11 type, for accessing keystores on hardware tokens, and
19
+ # Keychain type, for accessing the Mac OS-X keychain. Java 6.0 includes
20
+ # support for the MSCAPI type (on Windows). If other JCA providers have
21
+ # been installed and configured, additional keystore types might be
22
+ # available. If no keystore type is specified, the default type for the
23
+ # default JCA provider is used.
24
+ def storetype=(string)
25
+ @storetype = string
26
+ end
27
+
28
+ # The JCA provider for the specified keystore type. If not specified,
29
+ # then ADT uses the default provider for that type of keystore.
30
+ def providerName=(string)
31
+ @providerName = string
32
+ end
33
+
34
+ # The path to the keystore file for file-based store types.
35
+ def keystore=(file)
36
+ @keystore = file
37
+ end
38
+
39
+ # The password required to access the keystore. If not specified, ADT
40
+ # prompts for the password.
41
+ def storepass=(string)
42
+ @storepass = string
43
+ end
44
+
45
+ # The password required to access the private key that will be used to
46
+ # sign the AIR application. If not specified, ADT prompts for the password.
47
+ def keypass=(string)
48
+ @keypass = string
49
+ end
50
+
51
+ # Specifies the URL of an RFC3161-compliant time stamp server to time
52
+ # stamp the digital signature. If no URL is specified, a default time
53
+ # stamp server provided by Geotrust is used. When the signature of an AIR
54
+ # application is time stamped, the application can still be installed
55
+ # after the signing certificate expires, because the time stamp verifies
56
+ # that the certificate was valid at the time of signing.
57
+ def tsa=(url)
58
+ @tsa = url
59
+ end
60
+
61
+ # The name of the AIR file to be created.
62
+ def output=(file)
63
+ @output = file
64
+ end
65
+
66
+ # The path to the application descriptor file. The path can be specified
67
+ # relative to the current directory or as an absolute path. (The
68
+ # application descriptor file is renamed as "application.xml" in the AIR
69
+ # file.)
70
+ def application_descriptor=(file)
71
+ @application_descriptor = file
72
+ end
73
+
74
+ # The files and directories to package in the AIR file. Any number of
75
+ # files and directories can be specified, delimited by whitespace. If you
76
+ # list a directory, all files and subdirectories within, except hidden
77
+ # files, are added to the package. (In addition, if the application
78
+ # descriptor file is specified, either directly, or through wildcard or
79
+ # directory expansion, it is ignored and not added to the package a
80
+ # second time.) Files and directories specified must be in the current
81
+ # directory or one of its subdirectories. Use the -C option to change the
82
+ # current directory.
83
+ def files=(files)
84
+ @files = files
85
+ end
86
+
87
+ end
88
+ end
@@ -34,8 +34,8 @@ def doc_sources=(paths)
34
34
  end
35
35
 
36
36
  # A list of classes that should not be documented. You must specify individual class names. Alternatively, if the ASDoc comment for the class contains the @private tag, is not documented.
37
- def exclude_classes=(string)
38
- @exclude_classes = string
37
+ def exclude_classes=(strings)
38
+ @exclude_classes = strings
39
39
  end
40
40
 
41
41
  # Whether all dependencies found by the compiler are documented. If true, the dependencies of the input classes are not documented.
@@ -3,7 +3,7 @@
3
3
  module Sprout
4
4
  #
5
5
  # The AsDoc Task provides Rake support for the asdoc documentation engine.
6
- # If a Sprout::MXMLCTask or Sprout::COMPCTask are found as prerequisites
6
+ # If a MXMLCTask or COMPCTask are found as prerequisites
7
7
  # to the AsDoc task, AsDoc will inherit the source_path and library_path
8
8
  # from those tasks. You can also configure AsDoc normally if you wish.
9
9
  #
@@ -15,6 +15,17 @@ module Sprout
15
15
  # # Alias the compilation task with one that is easier to type
16
16
  # # task :compile => 'SomeProject.swf'
17
17
  #
18
+ # AsDoc tasks can be created and configured directly like any other rake task.
19
+ #
20
+ # # Create a simple, standard asdoc task
21
+ # asdoc :doc do |t|
22
+ # t.source_path << 'src'
23
+ # t.library_path << 'lib/corelib.swc'
24
+ # t.doc_classes = 'SomeProject'
25
+ # t.main_title = 'Some Project Title'
26
+ # t.footer = 'This is the footer for your project docs'
27
+ # end
28
+ #
18
29
  # # Create an MXMLCTask named for the output file that it creates. This task depends on the
19
30
  # # corelib library and will automatically add the corelib.swc to it's library_path
20
31
  # mxmlc 'bin/SomeProject.swf' => :corelib do |t|
@@ -78,7 +89,8 @@ This option works the same way as does the -include-sources option for the compc
78
89
  EOF
79
90
  end
80
91
 
81
- add_param(:exclude_classes, :string) do |p|
92
+ add_param(:exclude_classes, :strings) do |p|
93
+ p.delimiter = '='
82
94
  p.description =<<EOF
83
95
  A list of classes that should not be documented. You must specify individual class names. Alternatively, if the ASDoc comment for the class contains the @private tag, is not documented.
84
96
  EOF
@@ -268,6 +280,17 @@ EOF
268
280
  exe = Sprout.get_executable(gem_name, 'asdoc/templates/asDocHelper', gem_version)
269
281
  end
270
282
 
283
+ def resolve_library(library_task)
284
+ #TODO: Add support for libraries that don't get
285
+ # copied into the project
286
+ path = library_task.project_path
287
+ if(path.match(/.swc$/))
288
+ library_path << library_task.project_path
289
+ else
290
+ source_path << library_task.project_path
291
+ end
292
+ end
293
+
271
294
  end
272
295
  end
273
296