sprout-as3-bundle 0.1.41 → 0.1.45

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 = 1
6
- TINY = 41
6
+ TINY = 45
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
9
9
  MAJOR_MINOR = [MAJOR, MINOR].join('.')
@@ -5,3 +5,5 @@ require 'sprout/tasks/mxmlc_task'
5
5
  require 'sprout/tasks/compc_task'
6
6
  require 'sprout/tasks/asdoc_task'
7
7
  require 'sprout/tasks/asunit_task'
8
+ require 'sprout/tasks/adl_task'
9
+ require 'sprout/tasks/adt_task'
@@ -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
@@ -0,0 +1,94 @@
1
+ module Sprout
2
+ #
3
+ # The ADL Task provides Rake support for the adl, Adobe Debug Launcher command.
4
+ # http://livedocs.adobe.com/flex/3/html/help.html?content=CommandLineTools_4.html#1031914
5
+ #
6
+ # The following example can be pasted in a file named 'rakefile.rb':
7
+ #
8
+ # # Create an ADL task named :run dependent upon the swf that it is using for the window content
9
+ # adl :run => 'SomeProject.swf' do |t|
10
+ # t.root_directory = model.project_path
11
+ # t.application_descriptor = "#{model.src_dir}/TestProj-app.xml"
12
+ # end
13
+ #
14
+ class ADLTask < ToolTask
15
+
16
+ def initialize_task
17
+ super
18
+ @default_gem_name = 'sprout-flex3sdk-tool'
19
+ @default_gem_path = 'bin/adl'
20
+
21
+ add_param(:runtime, :file) do |p|
22
+ p.delimiter = " "
23
+ p.description = <<-DESC
24
+ Specifies the directory containing the runtime to use. If not
25
+ specified, the runtime directory in the same SDK as the ADL program
26
+ will be used. If you move ADL out of its SDK folder, then you must
27
+ specify the runtime directory. On Windows, specify the directory
28
+ containing the Adobe AIR directory. On Mac OSX, specify the directory
29
+ containing Adobe AIR.framework.
30
+ DESC
31
+ end
32
+
33
+ add_param(:nodebug, :boolean) do |p|
34
+ p.hidden_value = true
35
+ p.description = <<-DESC
36
+ Turns off debugging support. If used, the application process cannot
37
+ connect to the Flash debugger and dialogs for unhandled exceptions are
38
+ suppressed.
39
+
40
+ Trace statements still print to the console window. Turning off
41
+ debugging allows your application to run a little faster and also
42
+ emulates the execution mode of an installed application more closely.
43
+ DESC
44
+ end
45
+
46
+ add_param(:pubid, :string) do |p|
47
+ p.delimiter = " "
48
+ p.description = <<-DESC
49
+ Assigns the specified value as the publisher ID of the AIR application
50
+ for this run. Specifying a temporary publisher ID allows you to test
51
+ features of an AIR application, such as communicating over a local
52
+ connection, that use the publisher ID to help uniquely identify an
53
+ application.
54
+
55
+ The final publisher ID is determined by the digital certificate used to
56
+ sign the AIR installation file.
57
+ DESC
58
+ end
59
+
60
+ add_param(:application_descriptor, :file) do |p|
61
+ p.hidden_name = true
62
+ p.required = true
63
+ p.description = "The application descriptor file."
64
+ end
65
+
66
+ add_param(:root_directory, :file) do |p|
67
+ p.hidden_name = true
68
+ p.required = true
69
+ p.description = <<-DESC
70
+ The root directory of the application to run. If not
71
+ specified, the directory containing the application
72
+ descriptor file is used.
73
+ DESC
74
+ end
75
+
76
+ add_param(:arguments, :string) do |p|
77
+ p.shell_name = "--"
78
+ p.delimiter = " "
79
+ p.description = <<-DESC
80
+ Passed to the application as command-line arguments.
81
+ DESC
82
+ end
83
+
84
+ end
85
+
86
+ end
87
+ end
88
+
89
+ # Helper method for definining and accessing ADLTask instances in a rakefile
90
+ def adl(args, &block)
91
+ Sprout::ADLTask.define_task(args, &block)
92
+ end
93
+
94
+
@@ -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,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,245 @@
1
+ module Sprout
2
+
3
+ # The ADT Task provides Rake support for the AIR Developer Tool package command.
4
+ # http://livedocs.adobe.com/flex/3/html/CommandLineTools_5.html#1035876
5
+ #
6
+ # The following example can be pasted in a file named 'rakefile.rb':
7
+ #
8
+ # # Create an ADL task named :run dependent upon the swf that it is using for the window content
9
+ # adt :package => 'SomeProject.swf' do |t|
10
+ # t.storetype = "PKCS12"
11
+ # t.keystore = "cert.p12"
12
+ # t.output = "bin/TestProj.air"
13
+ # t.application_descriptor = "src/SomeProject-app.xml"
14
+ # t.files = [ "assets", "skins" ]
15
+ # end
16
+ #
17
+ class ADTTask < ToolTask
18
+
19
+
20
+ def initialize_task
21
+ super
22
+ @default_gem_name = 'sprout-flex3sdk-tool'
23
+ @default_gem_path = 'bin/adt'
24
+
25
+ # Package command is "adt -package"
26
+ add_param(:package, :boolean) do |p|
27
+ p.description = "Using -package option as default."
28
+ p.value = true
29
+ p.hidden_value = true
30
+ end
31
+
32
+ #
33
+ # Signing options
34
+ #
35
+
36
+ add_param(:alias, :string) do |p|
37
+ p.delimiter = " "
38
+ p.description = <<-DESC
39
+ The alias of a key in the keystore. Specifying an alias is not
40
+ necessary when a keystore only contains a single certificate. If no
41
+ alias is specified, ADT uses the first key in the keystore.
42
+ DESC
43
+ end
44
+
45
+ add_param(:storetype, :string) do |p|
46
+ p.delimiter = " "
47
+ p.description = <<-DESC
48
+ The type of keystore, determined by the keystore implementation. The
49
+ default keystore implementation included with most installations of
50
+ Java supports the JKS and PKCS12 types. Java 5.0 includes support for
51
+ the PKCS11 type, for accessing keystores on hardware tokens, and
52
+ Keychain type, for accessing the Mac OS-X keychain. Java 6.0 includes
53
+ support for the MSCAPI type (on Windows). If other JCA providers have
54
+ been installed and configured, additional keystore types might be
55
+ available. If no keystore type is specified, the default type for the
56
+ default JCA provider is used.
57
+ DESC
58
+ end
59
+
60
+ add_param(:providerName, :string) do |p|
61
+ p.delimiter = " "
62
+ p.description = <<-DESC
63
+ The JCA provider for the specified keystore type. If not specified,
64
+ then ADT uses the default provider for that type of keystore.
65
+ DESC
66
+ end
67
+
68
+ add_param(:keystore, :file) do |p|
69
+ p.delimiter = " "
70
+ p.description = "The path to the keystore file for file-based store types."
71
+ end
72
+
73
+ add_param(:storepass, :string) do |p|
74
+ p.delimiter = " "
75
+ p.description = <<-DESC
76
+ The password required to access the keystore. If not specified, ADT
77
+ prompts for the password.
78
+ DESC
79
+ end
80
+
81
+ add_param(:keypass, :string) do |p|
82
+ p.delimiter = " "
83
+ p.description = <<-DESC
84
+ The password required to access the private key that will be used to
85
+ sign the AIR application. If not specified, ADT prompts for the password.
86
+ DESC
87
+ end
88
+
89
+ add_param(:tsa, :url) do |p|
90
+ p.delimiter = " "
91
+ p.description = <<-DESC
92
+ Specifies the URL of an RFC3161-compliant time stamp server to time
93
+ stamp the digital signature. If no URL is specified, a default time
94
+ stamp server provided by Geotrust is used. When the signature of an AIR
95
+ application is time stamped, the application can still be installed
96
+ after the signing certificate expires, because the time stamp verifies
97
+ that the certificate was valid at the time of signing.
98
+ DESC
99
+ end
100
+
101
+ #
102
+ # ADT package options
103
+ #
104
+
105
+ add_param(:output, :file) do |p|
106
+ p.hidden_name = true
107
+ p.required = true
108
+ p.description = "The name of the AIR file to be created."
109
+ end
110
+
111
+ add_param(:application_descriptor, :file) do |p|
112
+ p.hidden_name = true
113
+ p.delimiter = " "
114
+ p.required = true
115
+ p.description = <<-DESC
116
+ The path to the application descriptor file. The path can be specified
117
+ relative to the current directory or as an absolute path. (The
118
+ application descriptor file is renamed as "application.xml" in the AIR
119
+ file.)
120
+ DESC
121
+ end
122
+
123
+ add_param(:files, :files) do |p|
124
+ # Work-around for shell name not being hidden on files param type
125
+ p.instance_variable_set(:@shell_name, "")
126
+ p.hidden_name = true
127
+ p.delimiter = ""
128
+ p.description = <<-DESC
129
+ The files and directories to package in the AIR file. Any number of
130
+ files and directories can be specified, delimited by whitespace. If you
131
+ list a directory, all files and subdirectories within, except hidden
132
+ files, are added to the package. (In addition, if the application
133
+ descriptor file is specified, either directly, or through wildcard or
134
+ directory expansion, it is ignored and not added to the package a
135
+ second time.) Files and directories specified must be in the current
136
+ directory or one of its subdirectories. Use the -C option to change the
137
+ current directory.
138
+ DESC
139
+ end
140
+
141
+ def define # :nodoc:
142
+ super
143
+
144
+ if(!output)
145
+ self.output = name
146
+ end
147
+
148
+ CLEAN.add(output)
149
+ end
150
+
151
+ end
152
+ end
153
+
154
+ # The ADT Cert Task provides Rake support for the AIR Developer Tool certificate command.
155
+ # http://livedocs.adobe.com/flex/3/html/CommandLineTools_6.html#1034775
156
+ #
157
+ # The certificate and associated private key generated by ADT are stored in a PKCS12-type keystore file.
158
+ # The password specified is set on the key itself, not the keystore.
159
+ #
160
+ # The following example can be pasted in a file named 'rakefile.rb':
161
+ #
162
+ # # Create an ADL task named :run dependent upon the swf that it is using for the window content
163
+ # adt_cert :certificate do |t|
164
+ # t.cn = "Common name"
165
+ # t.keytype = "1024-RSA"
166
+ # t.keystore = "cert.p12"
167
+ # t.keypass = "thepassword"
168
+ # end
169
+ #
170
+ class ADTCertTask < ToolTask
171
+
172
+ def initialize_task
173
+ super
174
+ @default_gem_name = 'sprout-flex3sdk-tool'
175
+ @default_gem_path = 'bin/adt'
176
+
177
+ # Certificate command is "adt -certificate"
178
+ add_param(:certificate, :boolean) do |p|
179
+ p.description = "Using -certificate option as default."
180
+ p.value = true
181
+ p.hidden_value = true
182
+ end
183
+
184
+ add_param(:cn, :string) do |p|
185
+ p.required = true
186
+ p.delimiter = " "
187
+ p.description = "The string assigned as the common name of the new certificate."
188
+ end
189
+
190
+ add_param(:ou, :string) do |p|
191
+ p.delimiter = " "
192
+ p.description = "Astring assigned as the organizational unit issuing the certificate."
193
+ end
194
+
195
+ add_param(:o, :string) do |p|
196
+ p.delimiter = " "
197
+ p.description = "A string assigned as the organization issuing the certificate."
198
+ end
199
+
200
+ add_param(:c, :string) do |p|
201
+ p.delimiter = " "
202
+ p.description = "A two-letter ISO-3166 country code. A certificate is not generated if an invalid code is supplied."
203
+ end
204
+
205
+ add_param(:keytype, :string) do |p|
206
+ p.hidden_name = true
207
+ p.required = true
208
+ p.description = %{The type of key to use for the certificate, either "1024-RSA" or "2048-RSA".}
209
+ end
210
+
211
+ add_param(:keystore, :file) do |p|
212
+ p.hidden_name = true
213
+ p.required = true
214
+ p.description = "The path for the certificate file to be generated."
215
+ end
216
+
217
+ add_param(:keypass, :string) do |p|
218
+ p.hidden_name = true
219
+ p.required = true
220
+ p.description = "The password for the new certificate. The password is required when signing AIR files with this certificate."
221
+ end
222
+ end
223
+
224
+ def prepare
225
+ super
226
+ # In case of spaces, need to escape them. Maybe have an option on StringParam to do this for us?
227
+ cn.gsub!(/\s/, "\\ ") if cn
228
+ ou.gsub!(/\s/, "\\ ") if ou
229
+ o.gsub!(/\s/, "\\ ") if o
230
+ end
231
+
232
+ end
233
+
234
+ end
235
+
236
+ # Helper method for definining and accessing ADLTask instances in a rakefile
237
+ def adt(args, &block)
238
+ Sprout::ADTTask.define_task(args, &block)
239
+ end
240
+
241
+ def adt_cert(args, &block)
242
+ Sprout::ADTCertTask.define_task(args, &block)
243
+ end
244
+
245
+
@@ -264,7 +264,7 @@ EOF
264
264
  # the executable flag, calling Sprout::get_executable with this target will
265
265
  # automatically chmod it to 744.
266
266
  def update_helper_mode
267
- exe = Sprout.get_executable('sprout-flex2sdk-tool', 'asdoc/templates/asDocHelper', gem_version)
267
+ exe = Sprout.get_executable(gem_name, 'asdoc/templates/asDocHelper', gem_version)
268
268
  end
269
269
 
270
270
  end
@@ -164,7 +164,6 @@ EOF
164
164
 
165
165
  add_param(:default_size, :string) do |p|
166
166
  p.delimiter = ' '
167
- p.value = '950 550'
168
167
  p.description = "Defines the default application size, in pixels for example: default_size = '950 550'. This is an advanced option."
169
168
  end
170
169
 
@@ -611,10 +610,14 @@ EOF
611
610
  super
612
611
 
613
612
  if(!output)
614
- self.output = name
613
+ if(name.match(/.swf/) || name.match(/swc/))
614
+ self.output = name
615
+ end
615
616
  end
616
617
 
617
- source_path << File.dirname(input)
618
+ if(!input.match(/.css/))
619
+ source_path << File.dirname(input)
620
+ end
618
621
 
619
622
  CLEAN.add(output)
620
623
  if(incremental)
data/rakefile.rb CHANGED
@@ -26,6 +26,10 @@ lib_dir = File.dirname(__FILE__) + '/lib'
26
26
  add_tool(lib_dir + '/sprout/tasks/mxmlc_task.rb', Sprout::MXMLCTask)
27
27
  add_tool(lib_dir + '/sprout/tasks/compc_task.rb', Sprout::COMPCTask)
28
28
  add_tool(lib_dir + '/sprout/tasks/asdoc_task.rb', Sprout::AsDocTask)
29
+ add_tool(lib_dir + '/sprout/tasks/adt_task.rb', Sprout::ADLTask)
30
+ add_tool(lib_dir + '/sprout/tasks/adl_task.rb', Sprout::ADTTask)
31
+ add_tool(lib_dir + '/sprout/tasks/adt_cert_task.rb', Sprout::ADTCertTask)
32
+
29
33
  #########################
30
34
 
31
35
  PKG_LIST = FileList['[a-zA-Z]*',
@@ -59,7 +63,7 @@ spec = Gem::Specification.new do |s|
59
63
  s.rdoc_options << '-i' << '.'
60
64
  s.files = PKG_LIST.to_a
61
65
 
62
- s.add_dependency('sprout', '>= 0.7.167')
66
+ s.add_dependency('sprout', '>= 0.7.170')
63
67
  s.add_dependency('sprout-flashplayer-bundle')
64
68
  end
65
69
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprout-as3-bundle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.41
4
+ version: 0.1.45
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pattern Park
@@ -9,7 +9,7 @@ autorequire: sprout/as3
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-03-11 00:00:00 -07:00
12
+ date: 2008-05-01 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -19,7 +19,7 @@ dependencies:
19
19
  requirements:
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 0.7.167
22
+ version: 0.7.170
23
23
  version:
24
24
  - !ruby/object:Gem::Dependency
25
25
  name: sprout-flashplayer-bundle
@@ -40,7 +40,6 @@ extra_rdoc_files:
40
40
  - README
41
41
  files:
42
42
  - lib
43
- - pkg
44
43
  - rakefile.rb
45
44
  - README
46
45
  - samples
@@ -87,6 +86,11 @@ files:
87
86
  - lib/sprout/generators/test/test_generator.rb
88
87
  - lib/sprout/generators/test/USAGE
89
88
  - lib/sprout/tasks
89
+ - lib/sprout/tasks/adl_doc.rb
90
+ - lib/sprout/tasks/adl_task.rb
91
+ - lib/sprout/tasks/adt_cert_doc.rb
92
+ - lib/sprout/tasks/adt_doc.rb
93
+ - lib/sprout/tasks/adt_task.rb
90
94
  - lib/sprout/tasks/asdoc_doc.rb
91
95
  - lib/sprout/tasks/asdoc_task.rb
92
96
  - lib/sprout/tasks/asunit_task.rb