airake 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/History.txt +4 -0
  2. data/License.txt +20 -0
  3. data/Manifest.txt +39 -0
  4. data/Notes.txt +3 -0
  5. data/README.txt +46 -0
  6. data/Rakefile +4 -0
  7. data/app_generators/airake/USAGE +5 -0
  8. data/app_generators/airake/airake_generator.rb +76 -0
  9. data/app_generators/airake/templates/README +36 -0
  10. data/app_generators/airake/templates/Rakefile +14 -0
  11. data/app_generators/airake/templates/application.mxml +6 -0
  12. data/app_generators/airake/templates/descriptor.xml +114 -0
  13. data/app_generators/airake/templates/lib/corelib-08.30.2007.swc +0 -0
  14. data/app_generators/airake/templates/lib/flexunit-08.30.2007.swc +0 -0
  15. data/app_generators/airake/templates/test/Test-app.xml +114 -0
  16. data/app_generators/airake/templates/test/Test.mxml +35 -0
  17. data/app_generators/airake/templates/test/suite/AllTests.as +16 -0
  18. data/bin/airake +12 -0
  19. data/config/hoe.rb +73 -0
  20. data/config/requirements.rb +17 -0
  21. data/lib/airake.rb +12 -0
  22. data/lib/airake/daemonize.rb +63 -0
  23. data/lib/airake/fcsh.rb +79 -0
  24. data/lib/airake/fcshd.rb +155 -0
  25. data/lib/airake/project.rb +95 -0
  26. data/lib/airake/tasks.rb +1 -0
  27. data/lib/airake/tasks/deployment.rake +61 -0
  28. data/lib/airake/version.rb +9 -0
  29. data/log/debug.log +0 -0
  30. data/script/destroy +14 -0
  31. data/script/generate +14 -0
  32. data/setup.rb +1585 -0
  33. data/tasks/deployment.rake +27 -0
  34. data/tasks/environment.rake +7 -0
  35. data/tasks/website.rake +9 -0
  36. data/test/test_airake.rb +11 -0
  37. data/test/test_airake_generator.rb +51 -0
  38. data/test/test_generator_helper.rb +20 -0
  39. data/test/test_helper.rb +2 -0
  40. metadata +100 -0
@@ -0,0 +1,4 @@
1
+ == 0.1.1 2007-08-29
2
+
3
+ * 1 major enhancement:
4
+ * Initial release
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2007 Gabriel Handford
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,39 @@
1
+ History.txt
2
+ License.txt
3
+ Manifest.txt
4
+ Notes.txt
5
+ README.txt
6
+ Rakefile
7
+ app_generators/airake/USAGE
8
+ app_generators/airake/airake_generator.rb
9
+ app_generators/airake/templates/README
10
+ app_generators/airake/templates/Rakefile
11
+ app_generators/airake/templates/application.mxml
12
+ app_generators/airake/templates/descriptor.xml
13
+ app_generators/airake/templates/lib/corelib-08.30.2007.swc
14
+ app_generators/airake/templates/lib/flexunit-08.30.2007.swc
15
+ app_generators/airake/templates/test/Test-app.xml
16
+ app_generators/airake/templates/test/Test.mxml
17
+ app_generators/airake/templates/test/suite/AllTests.as
18
+ bin/airake
19
+ config/hoe.rb
20
+ config/requirements.rb
21
+ lib/airake.rb
22
+ lib/airake/daemonize.rb
23
+ lib/airake/fcsh.rb
24
+ lib/airake/fcshd.rb
25
+ lib/airake/project.rb
26
+ lib/airake/tasks.rb
27
+ lib/airake/tasks/deployment.rake
28
+ lib/airake/version.rb
29
+ log/debug.log
30
+ script/destroy
31
+ script/generate
32
+ setup.rb
33
+ tasks/deployment.rake
34
+ tasks/environment.rake
35
+ tasks/website.rake
36
+ test/test_airake.rb
37
+ test/test_airake_generator.rb
38
+ test/test_generator_helper.rb
39
+ test/test_helper.rb
@@ -0,0 +1,3 @@
1
+ Regenerating manifest:
2
+
3
+ rake check_manifest | patch
@@ -0,0 +1,46 @@
1
+ == Setup
2
+
3
+ To include mxmlc, adl and adt (from Flex Builder):
4
+ export PATH="/Applications/Adobe Flex Builder 3/sdks/moxie/bin:$PATH"
5
+
6
+ To include adl and adt (from Apollo SDK):
7
+ export PATH="/Applications/ApolloSDK/bin:$PATH"
8
+
9
+ == Creating an AIR project
10
+
11
+ airake path/to/MyProject com.company.MyProject
12
+
13
+ will build a project scaffold with application name of MyProject and application id (used for AIR descriptor) of com.company.MyProject
14
+
15
+ The project includes as3corelib and flexunit, and test scaffolding as well.
16
+
17
+ == Tasks
18
+
19
+ Run: rake --tasks
20
+
21
+ # Start FCSHD
22
+ rake start_fcshd
23
+
24
+ # Compiling
25
+ rake compile
26
+
27
+ # Running air debug launcher (ADL)
28
+ rake adl
29
+
30
+ # Stop FCSHD
31
+ rake stop_fcsh
32
+
33
+ # Restart FCSHD
34
+ rake restart_fcshd
35
+
36
+ # Running alternate MXML, (the following expects src/Test-app.xml descriptor file)
37
+ rake adl MXML=src/Test.mxml
38
+
39
+ # Run ADL with debug enabled
40
+ rake adl DEBUG=true
41
+
42
+ # Testing
43
+ rake test
44
+
45
+ # Package AIR file
46
+ rake package
@@ -0,0 +1,4 @@
1
+ require 'config/requirements'
2
+ require 'config/hoe' # setup Hoe + all gem configuration
3
+
4
+ Dir['tasks/**/*.rake'].each { |rake| load rake }
@@ -0,0 +1,5 @@
1
+ Description:
2
+
3
+
4
+ Usage:
5
+
@@ -0,0 +1,76 @@
1
+ class AirakeGenerator < RubiGen::Base
2
+
3
+ #default_options :author => nil
4
+
5
+ attr_reader :app_name
6
+ attr_reader :app_id
7
+
8
+ def initialize(runtime_args, runtime_options = {})
9
+ super
10
+ usage if args.empty? || args.size < 2
11
+ @destination_root = File.expand_path(args.shift)
12
+ @app_name = File.basename(@destination_root).titleize
13
+ @app_id = args.shift
14
+ extract_options
15
+ end
16
+
17
+ def manifest
18
+ record do |m|
19
+ # Ensure appropriate folder(s) exists
20
+ m.directory ''
21
+ BASEDIRS.each { |path| m.directory path }
22
+
23
+ # Create stubs
24
+ m.template "Rakefile", "Rakefile"
25
+ m.file "README", "README"
26
+ m.template "descriptor.xml", "src/#{app_name}-app.xml"
27
+ m.template "application.mxml", "src/#{app_name}.mxml"
28
+
29
+ # Lib
30
+ m.file "lib/corelib-08.30.2007.swc", "lib/corelib-08.30.2007.swc"
31
+ m.file "lib/flexunit-08.30.2007.swc", "lib/flexunit-08.30.2007.swc"
32
+
33
+ # Test
34
+ m.file "test/Test-app.xml", "test/Test-app.xml"
35
+ m.file "test/Test.mxml", "test/Test.mxml"
36
+ m.file "test/suite/AllTests.as", "test/suite/AllTests.as"
37
+ end
38
+ end
39
+
40
+ protected
41
+ def banner
42
+ <<-EOS
43
+ Creates an AIR project scaffold.
44
+
45
+ USAGE: #{spec.name} path/to/AppName com.company.AppName
46
+ EOS
47
+ end
48
+
49
+ def add_options!(opts)
50
+ opts.separator ''
51
+ opts.separator 'Options:'
52
+ # For each option below, place the default
53
+ # at the top of the file next to "default_options"
54
+ # opts.on("-a", "--author=\"Your Name\"", String,
55
+ # "Some comment about this option",
56
+ # "Default: none") { |options[:author]| }
57
+ opts.on("-v", "--version", "Show the #{File.basename($0)} version number and quit.")
58
+ end
59
+
60
+ def extract_options
61
+ # for each option, extract it into a local variable (and create an "attr_reader :author" at the top)
62
+ # Templates can access these value via the attr_reader-generated methods, but not the
63
+ # raw instance variable value.
64
+ # @author = options[:author]
65
+ end
66
+
67
+ # Installation skeleton. Intermediate directories are automatically
68
+ # created so don't sweat their absence here.
69
+ BASEDIRS = %w(
70
+ bin
71
+ lib
72
+ src
73
+ test
74
+ test/suite
75
+ )
76
+ end
@@ -0,0 +1,36 @@
1
+ == Setup
2
+
3
+ Path to have access to adl and adt:
4
+ export PATH="/Applications/ApolloSDK/bin:$PATH"
5
+
6
+ Path to have access to mxmlc, etc. (flex compiler):
7
+ export PATH="/Applications/Adobe Flex Builder 3/sdks/moxie/bin:$PATH"
8
+
9
+ == Tasks
10
+
11
+ # Start FCSHD
12
+ rake start_fcshd
13
+
14
+ # Compiling
15
+ rake compile
16
+
17
+ # Running air debug launcher (ADL)
18
+ rake adl
19
+
20
+ # Stop FCSHD
21
+ rake stop_fcsh
22
+
23
+ # Restart FCSHD
24
+ rake restart_fcshd
25
+
26
+ # Running alternate MXML, (the following expects src/Test-app.xml descriptor file)
27
+ rake adl MXML=src/Test.mxml
28
+
29
+ # Run ADL with debug enabled
30
+ rake adl DEBUG=true
31
+
32
+ # Testing
33
+ rake test
34
+
35
+ # Package AIR file
36
+ rake package
@@ -0,0 +1,14 @@
1
+ require 'rubygems'
2
+ require 'airake'
3
+ require 'pathname'
4
+ include PatternPark
5
+
6
+ ENV["BASE_DIR"] ||= File.expand_path(File.dirname(__FILE__))
7
+ ENV["MXML"] ||= "src/<%= app_name %>.mxml"
8
+ ENV["MXML_TEST"] ||= "test/Test.mxml"
9
+
10
+ # Uncomment for custom FCSH settings
11
+ #ENV["FCSH_IP"] ||= "127.0.0.1"
12
+ #ENV["FCSH_PORT"] ||= "20569"
13
+
14
+ # For task list run, rake --tasks
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml">
3
+
4
+ <mx:HTML location="http://airake.rubyforge.org/" width="100%" height="100%"/>
5
+
6
+ </mx:WindowedApplication>
@@ -0,0 +1,114 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <application xmlns="http://ns.adobe.com/air/application/1.0.M4" appId="<%= app_id %>" version="0.0.1">
3
+
4
+ <!--
5
+ AIR Application Descriptor File:
6
+ Specifies parameters for identifying, installing, and launching AIR applications.
7
+
8
+ The root element of the descriptor is "application" and has the attributes:
9
+ appID - A string identifying this application. Every AIR application must
10
+ have a unique appID. The recommended form of an appID is a
11
+ dot-delimited, reverse-DNS-style string, such as
12
+ "com.example.ApplicationName". The appID string must be between
13
+ 17-255 characters long and may include the following characters:
14
+ 0-9
15
+ a-z
16
+ A-Z
17
+ . (dot)
18
+ - (hyphen)
19
+ version - An application-defined version designator.
20
+ Examples: "1.0", ".4", "0.5", "Alpha 1",
21
+ xmlns - The AIR namespace ("http://ns.adobe.com/air/application/1.0.M4").
22
+ -->
23
+
24
+ <!--
25
+ The name displayed by the operating system when the application is
26
+ running. (Required.)
27
+ -->
28
+ <name><%= app_name %></name>
29
+
30
+ <!--
31
+ The title displayed in the AIR application installer.
32
+ -->
33
+ <title/>
34
+
35
+ <!--
36
+ The description displayed in the AIR application installer.
37
+ -->
38
+ <description>Put description here</description>
39
+
40
+ <!--
41
+ The application copyright information.
42
+ -->
43
+ <copyright><%= Date.today.year %></copyright>
44
+
45
+ <!--
46
+ The main content file of the application, which must be a SWF or
47
+ HTML file. (Required.)
48
+
49
+ Attributes:
50
+ systemChrome - "standard" or "none". If "standard", the application
51
+ window is opened with operating system-specific window
52
+ elements such as a title bar, minimize, and close
53
+ buttons. If "none", the application must provide its
54
+ own window controls. (Note, the Flex WindowedApplication
55
+ class supplies a set of window controls, which are only
56
+ shown when systemChrome="none".)
57
+ transparent - "true" or "false". If "true", the application has support
58
+ for full transparency.
59
+ visible - "true" or "false". If "false", the main window will not
60
+ be displayed
61
+ until the application changes the window visible property
62
+ to "true".
63
+ width - the initial window height (including chrome).
64
+ height - the initial window width (including chrome).
65
+
66
+ In Flex Builder, the SWF reference required within this tag will be set
67
+ automatically when you launch or export this application.
68
+ -->
69
+ <rootContent systemChrome="none" transparent="true" visible="true" width="500" height="400">bin/<%= app_name %>.swf</rootContent>
70
+
71
+ <!--
72
+ The subdirectory within the default application installation location in
73
+ which to install the application.
74
+ -->
75
+ <!-- <installFolder></installFolder> -->
76
+
77
+ <!--
78
+ One or more PNG, GIF, or JPEG graphics files to be used as application
79
+ icons. The path specified is relative to the application root directory.
80
+ If an image is specified, it must be the exact size. The image files
81
+ must be included in the AIR package.
82
+ -->
83
+
84
+ <!--
85
+ <icon>
86
+ <image16x16>icons/AIRApp_16.png</image16x16>
87
+ <image32x32>icons/AIRApp_32.png</image32x32>
88
+ <image48x48>icons/AIRApp_48.png</image48x48>
89
+ <image128x128>icons/AIRApp_128.png</image128x128>
90
+ </icon>
91
+ -->
92
+
93
+ <!--
94
+ If the handleUpdates element is present in the application descriptor,
95
+ then the AIR runtime will defer version updates to this application.
96
+ -->
97
+ <!-- <handleUpdates/> -->
98
+
99
+ <!--
100
+ One or more file types to register when this application is installed.
101
+ -->
102
+
103
+ <!--
104
+ <fileTypes>
105
+ <fileType>
106
+ <name>com.example</name>
107
+ <extension>xmpl</extension>
108
+ <description>Example file</description>
109
+ <contentType>example/x-data-type</contentType>
110
+ </fileType>
111
+ </fileTypes>
112
+ -->
113
+
114
+ </application>
@@ -0,0 +1,114 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <application xmlns="http://ns.adobe.com/air/application/1.0.M4" appId="Test" version="1.0">
3
+
4
+ <!--
5
+ AIR Application Descriptor File:
6
+ Specifies parameters for identifying, installing, and launching AIR applications.
7
+
8
+ The root element of the descriptor is "application" and has the attributes:
9
+ appID - A string identifying this application. Every AIR application must
10
+ have a unique appID. The recommended form of an appID is a
11
+ dot-delimited, reverse-DNS-style string, such as
12
+ "com.example.ApplicationName". The appID string must be between
13
+ 17-255 characters long and may include the following characters:
14
+ 0-9
15
+ a-z
16
+ A-Z
17
+ . (dot)
18
+ - (hyphen)
19
+ version - An application-defined version designator.
20
+ Examples: "1.0", ".4", "0.5", "Alpha 1",
21
+ xmlns - The AIR namespace ("http://ns.adobe.com/air/application/1.0.M4").
22
+ -->
23
+
24
+ <!--
25
+ The name displayed by the operating system when the application is
26
+ running. (Required.)
27
+ -->
28
+ <name>Test</name>
29
+
30
+ <!--
31
+ The title displayed in the AIR application installer.
32
+ -->
33
+ <title/>
34
+
35
+ <!--
36
+ The description displayed in the AIR application installer.
37
+ -->
38
+ <description>Test</description>
39
+
40
+ <!--
41
+ The application copyright information.
42
+ -->
43
+ <copyright>2007</copyright>
44
+
45
+ <!--
46
+ The main content file of the application, which must be a SWF or
47
+ HTML file. (Required.)
48
+
49
+ Attributes:
50
+ systemChrome - "standard" or "none". If "standard", the application
51
+ window is opened with operating system-specific window
52
+ elements such as a title bar, minimize, and close
53
+ buttons. If "none", the application must provide its
54
+ own window controls. (Note, the Flex WindowedApplication
55
+ class supplies a set of window controls, which are only
56
+ shown when systemChrome="none".)
57
+ transparent - "true" or "false". If "true", the application has support
58
+ for full transparency.
59
+ visible - "true" or "false". If "false", the main window will not
60
+ be displayed
61
+ until the application changes the window visible property
62
+ to "true".
63
+ width - the initial window height (including chrome).
64
+ height - the initial window width (including chrome).
65
+
66
+ In Flex Builder, the SWF reference required within this tag will be set
67
+ automatically when you launch or export this application.
68
+ -->
69
+ <rootContent systemChrome="standard" visible="true">bin/Test.swf</rootContent>
70
+
71
+ <!--
72
+ The subdirectory within the default application installation location in
73
+ which to install the application.
74
+ -->
75
+ <!-- <installFolder></installFolder> -->
76
+
77
+ <!--
78
+ One or more PNG, GIF, or JPEG graphics files to be used as application
79
+ icons. The path specified is relative to the application root directory.
80
+ If an image is specified, it must be the exact size. The image files
81
+ must be included in the AIR package.
82
+ -->
83
+
84
+ <!--
85
+ <icon>
86
+ <image16x16>icons/AIRApp_16.png</image16x16>
87
+ <image32x32>icons/AIRApp_32.png</image32x32>
88
+ <image48x48>icons/AIRApp_48.png</image48x48>
89
+ <image128x128>icons/AIRApp_128.png</image128x128>
90
+ </icon>
91
+ -->
92
+
93
+ <!--
94
+ If the handleUpdates element is present in the application descriptor,
95
+ then the AIR runtime will defer version updates to this application.
96
+ -->
97
+ <!-- <handleUpdates/> -->
98
+
99
+ <!--
100
+ One or more file types to register when this application is installed.
101
+ -->
102
+
103
+ <!--
104
+ <fileTypes>
105
+ <fileType>
106
+ <name>com.example</name>
107
+ <extension>xmpl</extension>
108
+ <description>Example file</description>
109
+ <contentType>example/x-data-type</contentType>
110
+ </fileType>
111
+ </fileTypes>
112
+ -->
113
+
114
+ </application>