airake 0.3.1 → 0.3.2

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/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.3.2 2008-01-19
2
+
3
+ * Refactoring amxmlc command into mxmlc command to work for regular flash projects
4
+ * Started flash tasks
5
+
1
6
  == 0.3.1 2007-12-16
2
7
 
3
8
  * Fixing generators for AIR beta 3 (descriptor xml)
data/Manifest.txt CHANGED
@@ -32,9 +32,9 @@ lib/airake.rb
32
32
  lib/airake/commands/acompc.rb
33
33
  lib/airake/commands/adl.rb
34
34
  lib/airake/commands/adt.rb
35
- lib/airake/commands/amxmlc.rb
36
35
  lib/airake/commands/asdoc.rb
37
36
  lib/airake/commands/base.rb
37
+ lib/airake/commands/mxmlc.rb
38
38
  lib/airake/core_ext/blank.rb
39
39
  lib/airake/daemonize.rb
40
40
  lib/airake/fcsh.rb
@@ -44,6 +44,7 @@ lib/airake/runner.rb
44
44
  lib/airake/tasks.rb
45
45
  lib/airake/tasks/air.rake
46
46
  lib/airake/tasks/fcsh.rake
47
+ lib/airake/tasks/flash.rake
47
48
  lib/airake/version.rb
48
49
  script/destroy
49
50
  script/generate
@@ -58,7 +58,7 @@ This is experimental. In the Rakefile, specify:
58
58
 
59
59
  # Override default settings, this is experimental
60
60
  # cwd = File.expand_path(File.dirname(__FILE__))
61
- #ENV["AMXMLC_PATH"] = "mxmlc"
61
+ #ENV["MXMLC_PATH"] = "mxmlc"
62
62
  #ENV["ADT_PATH"] = "adt"
63
63
  #ENV["BIN_DIR"] = "#{cwd}/bin"
64
64
  #ENV["SRC_DIR"] = "#{cwd}/src"
@@ -67,6 +67,6 @@ This is experimental. In the Rakefile, specify:
67
67
  #ENV["APPXML_PATH"] = "#{cwd}/src/MyProject-app.xml"
68
68
  #ENV["AIR_PATH"] = "#{cwd}/bin/MyProject.air"
69
69
  #ENV["SWF_PATH"] = "#{cwd}/bin/MyProject.swf"
70
- #ENV["AMXMLC_EXTRA_OPTS"] = ...
70
+ #ENV["MXMLC_EXTRA_OPTS"] = ...
71
71
  #ENV["ADL_EXTRA_OPTS"] = ...
72
72
  #ENV["ADT_EXTRA_OPTS"] = ...
data/lib/airake.rb CHANGED
@@ -1,11 +1,13 @@
1
1
  $:.unshift File.dirname(__FILE__)
2
2
 
3
+ module Airake; end
4
+
3
5
  require 'airake/daemonize'
4
6
  require 'airake/fcsh'
5
7
  require 'airake/fcshd'
6
8
  require 'airake/commands/base'
7
9
  require 'airake/commands/acompc'
8
- require 'airake/commands/amxmlc'
10
+ require 'airake/commands/mxmlc'
9
11
  require 'airake/commands/adl'
10
12
  require 'airake/commands/adt'
11
13
  require 'airake/commands/asdoc'
@@ -16,9 +18,4 @@ require 'airake/tasks'
16
18
 
17
19
  unless Object.respond_to?(:blank?)
18
20
  require 'airake/core_ext/blank'
19
- end
20
-
21
-
22
- module Airake
23
-
24
21
  end
@@ -18,7 +18,10 @@ module Airake #:nodoc:
18
18
  #
19
19
  def initialize(options = {})
20
20
  assert_required(options, [ :appxml_path, :base_dir ])
21
- with_options(options, { :adl_path => "adl" })
21
+ with_options(options, { :adl_path => "adl" })
22
+
23
+ # For full path
24
+ @appxml_path = File.expand_path(@appxml_path)
22
25
  end
23
26
 
24
27
  # Get the ADL launch command
@@ -2,36 +2,39 @@ module Airake #:nodoc:
2
2
 
3
3
  module Commands #:nodoc:
4
4
 
5
- # AMXMLC (AIR MXML compiler)
6
- #
7
- # http://livedocs.adobe.com/labs/air/1/devappsflex/help.html?content=CommandLineTools_2.html#1032546
8
- class Amxmlc < Base
5
+ # MXMLC (MXML compiler)
6
+ class Mxmlc < Base
9
7
 
10
- attr_reader :amxmlc_path, :amxmlc_extra_opts, :swf_path, :mxml_path, :lib_dir, :src_dirs, :debug
8
+ attr_reader :mxmlc_path, :mxmlc_extra_opts, :swf_path, :mxml_path, :lib_dir, :src_dirs, :debug
9
+ attr_reader :config_name
11
10
 
12
11
  # Build with options:
13
12
  #
14
- # amxmlc_path: Path to flex compiler, defaults to 'mxmlc +configname=air'
13
+ # mxmlc_path: Path to flex compiler, defaults to 'mxmlc'
15
14
  # swf_path: Path to generated swf (required)
16
15
  # mxml_path: Path to mxml (required)
17
16
  # lib_dir: Path to lib directory. Will load swc files from here or source directories
18
17
  # src_dirs: Path to source directories (required)
19
- # amxmlc_extra_opts: Extra options to pass to compiler
18
+ # config_name: Config name, like 'air'
19
+ # mxmlc_extra_opts: Extra options to pass to compiler
20
20
  #
21
21
  def initialize(options = {})
22
22
  assert_required(options, [ :swf_path, :mxml_path, :src_dirs ])
23
- with_options(options, { :amxmlc_path => "mxmlc +configname=air" })
23
+
24
+ default_mxmlc_path = options[:config_name].blank? ? "mxmlc" : "mxmlc +configname=#{options[:config_name]}"
25
+
26
+ with_options(options, { :mxmlc_path => default_mxmlc_path })
24
27
 
25
28
  @source_paths = source_paths(@src_dirs, @lib_dir)
26
29
  raise ArgumentError, "There aren't any valid source directories to compile" if @source_paths.empty?
27
30
  @library_path = escape(@lib_dir) if @lib_dir and File.directory?(@lib_dir)
28
31
  end
29
32
 
30
- # Get the amxmlc compile command
33
+ # Get the mxmlc compile command
31
34
  def compile
32
35
  command = []
33
- command << @amxmlc_path
34
- command << @amxmlc_extra_opts
36
+ command << @mxmlc_path
37
+ command << @mxmlc_extra_opts
35
38
  command << "-source-path #{@source_paths.join(" ")}"
36
39
  command << "-library-path+=#{@library_path}" unless @library_path.blank?
37
40
  command << "-output"
@@ -32,7 +32,7 @@ module Airake #:nodoc
32
32
  # certificate: Path to certificate
33
33
  #
34
34
  # Other options:
35
- # :amxmlc_path, :adt_path, :adl_path, :asdoc_path, :amxmlc_extra_opts, :adt_extra_opts, :adl_extra_opts, :asdoc_extra_opts
35
+ # :mxmlc_path, :adt_path, :adl_path, :asdoc_path, :mxmlc_extra_opts, :adt_extra_opts, :adl_extra_opts, :asdoc_extra_opts
36
36
  #
37
37
  def initialize(base_dir, mxml_path, options = {}, build_env = :normal)
38
38
  raise ArgumentError, "Invalid MXML path: #{mxml_path}" if mxml_path.blank?
@@ -58,23 +58,28 @@ module Airake #:nodoc
58
58
  # Debug options
59
59
  @debug = options[:debug].is_a?(TrueClass) || options[:debug] == "true"
60
60
 
61
- with_keyed_options([ :assets, :certificate, :amxmlc_path, :adt_path, :adl_path, :asdoc_path,
62
- :amxmlc_extra_opts, :adt_extra_opts, :adl_extra_opts, :asdoc_extra_opts ], options)
61
+ with_keyed_options([ :assets, :certificate, :mxmlc_path, :adt_path, :adl_path, :asdoc_path,
62
+ :mxmlc_extra_opts, :adt_extra_opts, :adl_extra_opts, :asdoc_extra_opts ], options)
63
63
  end
64
64
 
65
- # Flex compiler command for this project
65
+ # Flex compiler command (under AIR) for this project
66
66
  def amxmlc
67
+ mxmlc({ :config_name => "air" })
68
+ end
69
+
70
+ # Flex compiler command for this project
71
+ def mxmlc(options = {})
67
72
  src_dirs = case build_env
68
73
  when :normal then [ @src_dir ]
69
74
  when :test then [ @src_dir, @test_dir ]
70
75
  else raise "Invalid build_env setting: #{build_env}"
71
76
  end
72
77
 
73
- options = { :swf_path => @swf_path, :mxml_path => @mxml_path, :lib_dir => @lib_dir,
74
- :src_dirs => src_dirs, :debug => @debug, :amxmlc_extra_opts => @amxmlc_extra_opts,
75
- :amxmlc_path => @amxmlc_path }
78
+ options = options.merge({ :swf_path => @swf_path, :mxml_path => @mxml_path, :lib_dir => @lib_dir,
79
+ :src_dirs => src_dirs, :debug => @debug, :mxmlc_extra_opts => @mxmlc_extra_opts,
80
+ :mxmlc_path => @mxmlc_path })
76
81
 
77
- Airake::Commands::Amxmlc.new(options)
82
+ Airake::Commands::Mxmlc.new(options)
78
83
  end
79
84
 
80
85
  # ADL command for this project
@@ -0,0 +1,32 @@
1
+ namespace :flash do
2
+
3
+ desc "Compile (on flash)"
4
+ task :compile => :clean do
5
+ begin
6
+ project = Airake::Project.new_from_rake(ENV)
7
+ Airake::Runner.run(project.mxmlc, :compile)
8
+ end
9
+ end
10
+
11
+ desc "Clean"
12
+ task :clean do
13
+ project = Airake::Project.new_from_rake(ENV)
14
+ paths = project.to_clean
15
+
16
+ # Test
17
+ test_project = Airake::Project.new_from_rake(ENV, :test)
18
+ paths += project.to_clean
19
+
20
+ paths.each do |path|
21
+ FileUtils.rm(path, :verbose => true) if File.exist?(path)
22
+ end
23
+ end
24
+
25
+ desc "Run"
26
+ task :run do
27
+
28
+
29
+
30
+ end
31
+
32
+ end
@@ -2,7 +2,7 @@ module Airake #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 3
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,33 +1,49 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
3
- specification_version: 1
4
2
  name: airake
5
3
  version: !ruby/object:Gem::Version
6
- version: 0.3.1
7
- date: 2007-12-17 00:00:00 -05:00
8
- summary: Tasks and generators for Adobe AIR apps
9
- require_paths:
10
- - lib
11
- email: gabrielh@gmail.com
12
- homepage: http://airake.rubyforge.org
13
- rubyforge_project: airake
14
- description: Tasks and generators for Adobe AIR apps
15
- autorequire:
16
- default_executable:
17
- bindir: bin
18
- has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
20
- requirements:
21
- - - ">"
22
- - !ruby/object:Gem::Version
23
- version: 0.0.0
24
- version:
25
- platform: ruby
26
- signing_key:
27
- cert_chain:
28
- post_install_message:
4
+ version: 0.3.2
5
+ platform: ""
29
6
  authors:
30
7
  - Gabriel Handford, Min Kim
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-01-20 00:00:00 -05:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rubigen
17
+ version_requirement:
18
+ version_requirements: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.0.4
23
+ version:
24
+ - !ruby/object:Gem::Dependency
25
+ name: activesupport
26
+ version_requirement:
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: 1.4.2
32
+ version:
33
+ description: Tasks and generators for Adobe AIR apps
34
+ email: gabrielh@gmail.com
35
+ executables:
36
+ - airake
37
+ - browsair
38
+ extensions: []
39
+
40
+ extra_rdoc_files:
41
+ - History.txt
42
+ - License.txt
43
+ - Manifest.txt
44
+ - Notes.txt
45
+ - README.txt
46
+ - app_generators/shared/icons/MouseRunnerDotComGraphicsLicense.txt
31
47
  files:
32
48
  - History.txt
33
49
  - License.txt
@@ -63,9 +79,9 @@ files:
63
79
  - lib/airake/commands/acompc.rb
64
80
  - lib/airake/commands/adl.rb
65
81
  - lib/airake/commands/adt.rb
66
- - lib/airake/commands/amxmlc.rb
67
82
  - lib/airake/commands/asdoc.rb
68
83
  - lib/airake/commands/base.rb
84
+ - lib/airake/commands/mxmlc.rb
69
85
  - lib/airake/core_ext/blank.rb
70
86
  - lib/airake/daemonize.rb
71
87
  - lib/airake/fcsh.rb
@@ -75,6 +91,7 @@ files:
75
91
  - lib/airake/tasks.rb
76
92
  - lib/airake/tasks/air.rake
77
93
  - lib/airake/tasks/fcsh.rake
94
+ - lib/airake/tasks/flash.rake
78
95
  - lib/airake/version.rb
79
96
  - script/destroy
80
97
  - script/generate
@@ -89,6 +106,33 @@ files:
89
106
  - test/test_generator_helper.rb
90
107
  - test/test_helper.rb
91
108
  - MIT-LICENSE
109
+ has_rdoc: true
110
+ homepage: http://airake.rubyforge.org
111
+ post_install_message:
112
+ rdoc_options:
113
+ - --main
114
+ - README.txt
115
+ require_paths:
116
+ - lib
117
+ required_ruby_version: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: "0"
122
+ version:
123
+ required_rubygems_version: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - ">="
126
+ - !ruby/object:Gem::Version
127
+ version: "0"
128
+ version:
129
+ requirements: []
130
+
131
+ rubyforge_project: airake
132
+ rubygems_version: 0.9.5
133
+ signing_key:
134
+ specification_version: 2
135
+ summary: Tasks and generators for Adobe AIR apps
92
136
  test_files:
93
137
  - test/test_airake.rb
94
138
  - test/test_airake_generator.rb
@@ -96,39 +140,3 @@ test_files:
96
140
  - test/test_class_generator.rb
97
141
  - test/test_generator_helper.rb
98
142
  - test/test_helper.rb
99
- rdoc_options:
100
- - --main
101
- - README.txt
102
- extra_rdoc_files:
103
- - History.txt
104
- - License.txt
105
- - Manifest.txt
106
- - Notes.txt
107
- - README.txt
108
- - app_generators/shared/icons/MouseRunnerDotComGraphicsLicense.txt
109
- executables:
110
- - airake
111
- - browsair
112
- extensions: []
113
-
114
- requirements: []
115
-
116
- dependencies:
117
- - !ruby/object:Gem::Dependency
118
- name: rubigen
119
- version_requirement:
120
- version_requirements: !ruby/object:Gem::Version::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: 1.0.4
125
- version:
126
- - !ruby/object:Gem::Dependency
127
- name: activesupport
128
- version_requirement:
129
- version_requirements: !ruby/object:Gem::Version::Requirement
130
- requirements:
131
- - - ">="
132
- - !ruby/object:Gem::Version
133
- version: 1.4.2
134
- version: