sprout-as3-bundle 1.0.30 → 1.0.31

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 = 1
5
5
  MINOR = 0
6
- TINY = 30
6
+ TINY = 31
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
9
9
  MAJOR_MINOR = [MAJOR, MINOR].join('.')
@@ -262,6 +262,27 @@ def incremental=(boolean)
262
262
  @incremental = boolean
263
263
  end
264
264
 
265
+ # Keep the specified metadata in the SWF (advanced, repeatable).
266
+ #
267
+ # Example:
268
+ #
269
+ # Rakefile:
270
+ #
271
+ # mxmlc 'bin/SomeProject.swf' do |t|
272
+ # t.keep_as3_metadata << 'Orange'
273
+ # end
274
+ #
275
+ # Source Code:
276
+ #
277
+ # [Orange(isTasty=true)]
278
+ # public function eatOranges():void {
279
+ # // do something
280
+ # }
281
+ #
282
+ def keep_as3_metadata=(symbols)
283
+ @keep_as3_metadata = symbols
284
+ end
285
+
265
286
  # Determines whether to keep the generated ActionScript class files.
266
287
  #
267
288
  # The generated class files include stubs and classes that are generated by the compiler and used to build the SWF file.
@@ -546,11 +567,6 @@ def warnings=(boolean)
546
567
  @warnings = boolean
547
568
  end
548
569
 
549
- # Main source file to send compiler
550
- def input=(file)
551
- @input = file
552
- end
553
-
554
570
  # Outputs the SWC file in an open directory format rather than a SWC file. You use this option with the output option to specify a destination directory, as the following example shows:
555
571
  # compc -directory -output destination_directory
556
572
  #
@@ -610,5 +626,10 @@ def namespace=(string)
610
626
  @namespace = string
611
627
  end
612
628
 
629
+ # Main source file to send compiler
630
+ def input=(file)
631
+ @input = file
632
+ end
633
+
613
634
  end
614
635
  end
@@ -58,6 +58,15 @@ EOF
58
58
  end
59
59
 
60
60
  add_param(:include_classes, :symbols) do |p|
61
+ p.to_shell_proc = Proc.new {|param|
62
+ return if(param.value.nil?)
63
+
64
+ if(param.value.is_a? Array)
65
+ "-include-classes #{param.value.join(' ')}"
66
+ else
67
+ "-include-classes #{param.value}"
68
+ end
69
+ }
61
70
  p.description =<<EOF
62
71
  Specifies classes to include in the SWC file. You provide the class name (for example, MyClass) rather than the file name (for example, MyClass.as) to the file for this option. As a result, all classes specified with this option must be in the compiler's source path. You specify this by using the source-path compiler option.
63
72
 
@@ -116,6 +125,19 @@ EOF
116
125
  Not sure about this option, it was in the CLI help, but not documented on the Adobe site
117
126
  EOF
118
127
  end
128
+
129
+ # Move the input param to the end of the stack:
130
+ input_param = nil
131
+ params.each_index do |index|
132
+ param = params[index]
133
+ if(param.name == 'input')
134
+ input_param = param
135
+ params.slice!(index, 1)
136
+ break
137
+ end
138
+ end
139
+ params << input_param unless input_param.nil?
140
+
119
141
  end
120
142
 
121
143
  end
@@ -262,6 +262,27 @@ def incremental=(boolean)
262
262
  @incremental = boolean
263
263
  end
264
264
 
265
+ # Keep the specified metadata in the SWF (advanced, repeatable).
266
+ #
267
+ # Example:
268
+ #
269
+ # Rakefile:
270
+ #
271
+ # mxmlc 'bin/SomeProject.swf' do |t|
272
+ # t.keep_as3_metadata << 'Orange'
273
+ # end
274
+ #
275
+ # Source Code:
276
+ #
277
+ # [Orange(isTasty=true)]
278
+ # public function eatOranges():void {
279
+ # // do something
280
+ # }
281
+ #
282
+ def keep_as3_metadata=(symbols)
283
+ @keep_as3_metadata = symbols
284
+ end
285
+
265
286
  # Determines whether to keep the generated ActionScript class files.
266
287
  #
267
288
  # The generated class files include stubs and classes that are generated by the compiler and used to build the SWF file.
@@ -359,6 +359,28 @@ EOF
359
359
  Enables incremental compilation. For more information, see About incremental compilation (http://livedocs.adobe.com/flex/2/docs/00001506.html#153980).
360
360
 
361
361
  This option is true by default for the Flex Builder application compiler. For the command-line compiler, the default is false. The web-tier compiler does not support incremental compilation.
362
+ EOF
363
+ end
364
+
365
+ add_param(:keep_as3_metadata, :symbols) do |p|
366
+ p.description =<<EOF
367
+ Keep the specified metadata in the SWF (advanced, repeatable).
368
+
369
+ Example:
370
+
371
+ Rakefile:
372
+
373
+ mxmlc 'bin/SomeProject.swf' do |t|
374
+ t.keep_as3_metadata << 'Orange'
375
+ end
376
+
377
+ Source Code:
378
+
379
+ [Orange(isTasty=true)]
380
+ public function eatOranges():void {
381
+ // do something
382
+ }
383
+
362
384
  EOF
363
385
  end
364
386
 
@@ -798,11 +820,13 @@ EOF
798
820
 
799
821
  def execute(*args)
800
822
  begin
823
+ start = Time.now.to_i
801
824
  if(@use_fcsh)
802
825
  execute_with_fcsh(to_shell)
803
826
  else
804
827
  super
805
828
  end
829
+ Log.puts "mxmlc finished compiling #{name} in #{Time.now.to_i - start} seconds"
806
830
  rescue ExecutionError => e
807
831
  if(e.message.index('Warning:'))
808
832
  # MXMLC sends warnings to stderr....
data/rakefile.rb CHANGED
@@ -63,7 +63,7 @@ spec = Gem::Specification.new do |s|
63
63
  s.rdoc_options << '-i' << '.'
64
64
  s.files = PKG_LIST.to_a
65
65
 
66
- s.add_dependency('sprout', '>= 0.7.205')
66
+ s.add_dependency('sprout', '>= 0.7.215')
67
67
  s.add_dependency('sprout-flashplayer-bundle', '>= 10.22.0')
68
68
  s.add_dependency('sprout-asunit3-library', '>= 3.2.6')
69
69
  end
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: 1.0.30
4
+ version: 1.0.31
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: 2009-08-22 00:00:00 -07:00
12
+ date: 2009-10-28 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 0.7.205
23
+ version: 0.7.215
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sprout-flashplayer-bundle