airake 0.2.2 → 0.2.3

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,9 @@
1
+ == 0.2.3 2007-10-12
2
+
3
+ * Fixing default project layout bug
4
+ * Using path/to/Name for browsair arg
5
+ * Browsair will generate buttons
6
+
1
7
  == 0.2.2 2007-10-11
2
8
 
3
9
  * Fixed handling of spaces in name
data/Manifest.txt CHANGED
@@ -7,7 +7,6 @@ Rakefile
7
7
  app_generators/airake/USAGE
8
8
  app_generators/airake/airake_generator.rb
9
9
  app_generators/airake/templates/README
10
- app_generators/airake/templates/lib/corelib-08.30.2007.swc
11
10
  app_generators/browsair/USAGE
12
11
  app_generators/browsair/browsair_generator.rb
13
12
  app_generators/browsair/templates/README
@@ -16,6 +15,7 @@ app_generators/shared/application.mxml
16
15
  app_generators/shared/descriptor.xml
17
16
  app_generators/shared/icons/MouseRunnerDotComGraphicsLicense.txt
18
17
  app_generators/shared/icons/Web.png
18
+ app_generators/shared/lib/corelib-08.30.2007.swc
19
19
  app_generators/shared/lib/flexunit-08.30.2007.swc
20
20
  app_generators/shared/test/Test-app.xml
21
21
  app_generators/shared/test/Test.mxml
@@ -5,13 +5,15 @@ class AirakeGenerator < RubiGen::Base
5
5
  def initialize(runtime_args, runtime_options = {})
6
6
  super
7
7
  usage if args.empty? || args.size < 1
8
- @name = args.shift
9
- @destination_root = File.expand_path(@name)
10
- @app_name = File.basename(@destination_root).gsub(/\s+/, "").camelize
8
+ @name = args.shift
9
+ @app_name = @name.gsub(/\s+/, "").camelize
11
10
  @title = @name
12
11
  @url = "http://airake.rubyforge.org/resources.html"
13
12
  @description = "Put description here"
14
13
  extract_options
14
+
15
+ @destination_root = File.expand_path(@name)
16
+ @source_root = File.join(File.dirname(__FILE__), "..", "shared")
15
17
  end
16
18
 
17
19
  def manifest
@@ -20,29 +22,26 @@ class AirakeGenerator < RubiGen::Base
20
22
  m.directory ''
21
23
  BASEDIRS.each { |path| m.directory path }
22
24
 
23
- m.file "README", "README"
24
- m.file "lib/corelib-08.30.2007.swc", "lib/corelib-08.30.2007.swc"
25
-
26
- # Shared templates
27
- shared_path = "../../shared"
25
+ m.file "../airake/templates/README", "README"
28
26
 
29
27
  # Lib
30
- m.file "#{shared_path}/lib/flexunit-08.30.2007.swc", "lib/flexunit-08.30.2007.swc"
28
+ m.file "lib/flexunit-08.30.2007.swc", "lib/flexunit-08.30.2007.swc"
29
+ m.file "lib/corelib-08.30.2007.swc", "lib/corelib-08.30.2007.swc"
31
30
 
32
31
  # Test
33
- m.file "#{shared_path}/test/Test-app.xml", "test/Test-app.xml"
34
- m.file "#{shared_path}/test/Test.mxml", "test/Test.mxml"
32
+ m.file "test/Test-app.xml", "test/Test-app.xml"
33
+ m.file "test/Test.mxml", "test/Test.mxml"
35
34
  m.directory "test/suite"
36
- m.file "#{shared_path}/test/suite/AllTests.as", "test/suite/AllTests.as"
35
+ m.file "test/suite/AllTests.as", "test/suite/AllTests.as"
37
36
 
38
- m.template "#{shared_path}/Rakefile", "Rakefile"
39
- m.template "#{shared_path}/descriptor.xml", "src/#{app_name}-app.xml"
40
- m.template "#{shared_path}/application.mxml", "src/#{app_name}.mxml"
37
+ m.template "Rakefile", "Rakefile"
38
+ m.template "descriptor.xml", "src/#{app_name}-app.xml"
39
+ m.template "application.mxml", "src/#{app_name}.mxml"
41
40
 
42
41
  # Icons
43
42
  m.directory "src/assets/app_icons"
44
- m.file "#{shared_path}/icons/Web.png", "src/assets/app_icons/icon_128.png"
45
- m.file "#{shared_path}/icons/MouseRunnerDotComGraphicsLicense.txt", "src/assets/app_icons/MouseRunnerDotComGraphicsLicense.txt"
43
+ m.file "icons/Web.png", "src/assets/app_icons/icon_128.png"
44
+ m.file "icons/MouseRunnerDotComGraphicsLicense.txt", "src/assets/app_icons/MouseRunnerDotComGraphicsLicense.txt"
46
45
 
47
46
  end
48
47
  end
@@ -2,4 +2,4 @@ Description:
2
2
  Create an AIR browser for a specific URL.
3
3
 
4
4
  Usage:
5
- browsair [name] [http://the.url] [path/to/icon_128.png (optional)]
5
+ browsair [path/to/Project] [http://the.url] [path/to/icon_128.png (optional)]
@@ -5,14 +5,17 @@ class BrowsairGenerator < RubiGen::Base
5
5
  def initialize(runtime_args, runtime_options = {})
6
6
  super
7
7
  usage if args.empty? || args.size < 2
8
- @name = args.shift
9
- @destination_root = File.expand_path(@name)
10
- @app_name = File.basename(@destination_root).gsub(/\s+/, "")
8
+ @path = args.shift
9
+ @name = File.basename(@path)
10
+ @app_name = @name.gsub(/\s+/, "")
11
11
  @url = args.shift
12
12
  @title = "#{@name} - #{@url}"
13
13
  @description = "AIR Browser for #{@url}"
14
14
  @icon_src_path = File.expand_path(args.shift) unless args.empty?
15
15
  extract_options
16
+
17
+ @destination_root = File.expand_path(@path)
18
+ @source_root = File.join(File.dirname(__FILE__), "..", "shared")
16
19
  end
17
20
 
18
21
  def manifest
@@ -21,31 +24,28 @@ class BrowsairGenerator < RubiGen::Base
21
24
  m.directory ''
22
25
  BASEDIRS.each { |path| m.directory path }
23
26
 
24
- m.file "README", "README"
25
-
26
- # Shared templates
27
- shared_path = "../../shared"
27
+ m.file "../browsair/templates/README", "README"
28
28
 
29
29
  # Lib
30
- m.file "#{shared_path}/lib/flexunit-08.30.2007.swc", "lib/flexunit-08.30.2007.swc"
30
+ m.file "lib/flexunit-08.30.2007.swc", "lib/flexunit-08.30.2007.swc"
31
31
 
32
32
  # Test
33
- m.file "#{shared_path}/test/Test-app.xml", "test/Test-app.xml"
34
- m.file "#{shared_path}/test/Test.mxml", "test/Test.mxml"
33
+ m.file "test/Test-app.xml", "test/Test-app.xml"
34
+ m.file "test/Test.mxml", "test/Test.mxml"
35
35
  m.directory "test/suite"
36
- m.file "#{shared_path}/test/suite/AllTests.as", "test/suite/AllTests.as"
36
+ m.file "test/suite/AllTests.as", "test/suite/AllTests.as"
37
37
 
38
38
  # Basic
39
- m.template "#{shared_path}/Rakefile", "Rakefile"
40
- m.template "#{shared_path}/descriptor.xml", "src/#{app_name}-app.xml"
41
- m.template "#{shared_path}/application.mxml", "src/#{app_name}.mxml"
39
+ m.template "Rakefile", "Rakefile"
40
+ m.template "descriptor.xml", "src/#{app_name}-app.xml"
41
+ m.template "application.mxml", "src/#{app_name}.mxml"
42
42
 
43
43
  # Icons
44
44
  m.directory "src/assets/app_icons"
45
45
 
46
46
  if @icon_src_path.blank?
47
- m.file "#{shared_path}/icons/Web.png", "src/assets/app_icons/icon_128.png"
48
- m.file "#{shared_path}/icons/MouseRunnerDotComGraphicsLicense.txt", "src/assets/app_icons/MouseRunnerDotComGraphicsLicense.txt"
47
+ m.file "icons/Web.png", "src/assets/app_icons/icon_128.png"
48
+ m.file "icons/MouseRunnerDotComGraphicsLicense.txt", "src/assets/app_icons/MouseRunnerDotComGraphicsLicense.txt"
49
49
  else
50
50
  icon_dest_path = destination_path("src/assets/app_icons/icon_128.png")
51
51
  FileUtils.cp(icon_src_path, icon_dest_path)
@@ -59,7 +59,7 @@ class BrowsairGenerator < RubiGen::Base
59
59
  <<-EOS
60
60
  Create an AIR browser for a specific URL.
61
61
 
62
- USAGE: #{spec.name} [name] [http://the.url] [path/to/icon_128.png (optional)]
62
+ USAGE: #{spec.name} [path/to/Project] [http://the.url] [path/to/icon_128.png (optional)]
63
63
  EOS
64
64
  end
65
65
 
@@ -1 +1,11 @@
1
- Browser AIR application
1
+ == Browsair
2
+
3
+ If you don't have a certificate you may need to run:
4
+
5
+ rake air:certificate
6
+
7
+ To create the AIR application
8
+
9
+ rake air:package
10
+
11
+ And then look in the bin directory.
@@ -1,23 +1,21 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" showStatusBar="false">
3
3
 
4
- <mx:VBox width="100%" height="100%" backgroundColor="#FFFFFF">
4
+ <mx:VBox width="100%" height="100%" backgroundColor="#FFFFFF" verticalGap="0">
5
5
 
6
6
  <mx:HBox id="buttons" width="100%" paddingLeft="5" paddingTop="5"
7
7
  borderColor="#CCCCCC" borderSides="bottom" borderThickness="2" borderStyle="solid">
8
8
 
9
9
  <mx:Button label="Back" click="html.htmlControl.historyBack()" />
10
10
  <mx:Button label="Forward" click="html.htmlControl.historyForward()" />
11
- <mx:Button label="Home" click="html.location = '<%= url %>'" />
12
- <!-- <mx:Button label="Cancel" click="html.htmlControl.cancelLoad()" /> -->
13
- <!-- <mx:Label text="{html.location}" width="100%" /> -->
11
+ <mx:Button label="Home" click="html.location='<%= url %>'" />
14
12
 
15
13
  <mx:HBox width="100%" horizontalAlign="right" paddingBottom="5" paddingRight="5">
16
14
  <mx:Button label="Hide" click="buttons.height = 0" />
17
15
  </mx:HBox>
18
16
  </mx:HBox>
19
17
 
20
- <mx:VBox width="100%" height="100%" >
18
+ <mx:VBox width="100%" height="100%">
21
19
  <mx:HTML id="html" width="100%" height="100%" location="<%= url %>" />
22
20
  </mx:VBox>
23
21
  </mx:VBox>
data/bin/airake CHANGED
@@ -8,5 +8,5 @@ if %w(-v --version).include? ARGV.first
8
8
  end
9
9
 
10
10
  require 'rubigen/scripts/generate'
11
- RubiGen::Base.use_application_sources! :airake
11
+ RubiGen::Base.use_application_sources! :air
12
12
  RubiGen::Scripts::Generate.new.run(ARGV, :generator => 'airake')
data/bin/browsair CHANGED
@@ -8,5 +8,5 @@ if %w(-v --version).include? ARGV.first
8
8
  end
9
9
 
10
10
  require 'rubigen/scripts/generate'
11
- RubiGen::Base.use_application_sources! :airake
11
+ RubiGen::Base.use_application_sources! :air
12
12
  RubiGen::Scripts::Generate.new.run(ARGV, :generator => 'browsair')
@@ -2,7 +2,7 @@ module Airake
2
2
 
3
3
  module Commands
4
4
 
5
- class Adl < Airake::Commands::Base
5
+ class Adl < Base
6
6
 
7
7
  attr_reader :project, :path, :extra_opts
8
8
 
@@ -2,7 +2,7 @@ module Airake
2
2
 
3
3
  module Commands
4
4
 
5
- class Adt < Airake::Commands::Base
5
+ class Adt < Base
6
6
 
7
7
  attr_reader :project, :path, :certificate, :extra_opts, :assets
8
8
 
@@ -2,7 +2,7 @@ module Airake
2
2
 
3
3
  module Commands
4
4
 
5
- class Amxmlc < Airake::Commands::Base
5
+ class Amxmlc < Base
6
6
 
7
7
  attr_reader :project, :path, :extra_opts
8
8
 
@@ -2,7 +2,7 @@ module Airake #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- TINY = 2
5
+ TINY = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -3,12 +3,8 @@ require File.join(File.dirname(__FILE__), "test_generator_helper.rb")
3
3
  class TestBrowsairGenerator < Test::Unit::TestCase
4
4
  include RubiGen::GeneratorTestHelper
5
5
 
6
- attr_reader :app_name, :url
7
-
8
6
  def setup
9
7
  bare_setup
10
- @app_name = "GReader"
11
- @url = "http://reader.google.com"
12
8
  end
13
9
 
14
10
  def teardown
@@ -30,7 +26,7 @@ class TestBrowsairGenerator < Test::Unit::TestCase
30
26
  # bare_teardown - place this in teardown method to destroy the TMP_ROOT or APP_ROOT folder after each test
31
27
 
32
28
  def test_generator_with_options
33
- run_generator('browsair', [ APP_ROOT, @url ], sources)
29
+ run_generator('browsair', [ APP_ROOT, "http://reader.google.com" ], sources)
34
30
  assert_generated_file "Rakefile"
35
31
  assert_generated_file "README"
36
32
  assert_directory_exists "bin"
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: airake
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.2.2
7
- date: 2007-10-11 00:00:00 -04:00
6
+ version: 0.2.3
7
+ date: 2007-10-12 00:00:00 -04:00
8
8
  summary: Adobe AIR generators and tasks
9
9
  require_paths:
10
10
  - lib
@@ -38,7 +38,6 @@ files:
38
38
  - app_generators/airake/USAGE
39
39
  - app_generators/airake/airake_generator.rb
40
40
  - app_generators/airake/templates/README
41
- - app_generators/airake/templates/lib/corelib-08.30.2007.swc
42
41
  - app_generators/browsair/USAGE
43
42
  - app_generators/browsair/browsair_generator.rb
44
43
  - app_generators/browsair/templates/README
@@ -47,6 +46,7 @@ files:
47
46
  - app_generators/shared/descriptor.xml
48
47
  - app_generators/shared/icons/MouseRunnerDotComGraphicsLicense.txt
49
48
  - app_generators/shared/icons/Web.png
49
+ - app_generators/shared/lib/corelib-08.30.2007.swc
50
50
  - app_generators/shared/lib/flexunit-08.30.2007.swc
51
51
  - app_generators/shared/test/Test-app.xml
52
52
  - app_generators/shared/test/Test.mxml