fabricator 0.0.1
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 +4 -0
- data/Manifest.txt +63 -0
- data/PostInstall.txt +7 -0
- data/README.rdoc +48 -0
- data/Rakefile +28 -0
- data/app_generators/pureapp/USAGE +5 -0
- data/app_generators/pureapp/pureapp_generator.rb +151 -0
- data/app_generators/pureapp/templates/actionscript.properties +20 -0
- data/app_generators/pureapp/templates/authentication_module.mxml +27 -0
- data/app_generators/pureapp/templates/common/constants.as +12 -0
- data/app_generators/pureapp/templates/dashboard_module.mxml +28 -0
- data/app_generators/pureapp/templates/flex.properties +2 -0
- data/app_generators/pureapp/templates/html-template/AC_OETags.js +276 -0
- data/app_generators/pureapp/templates/html-template/history/history.css +6 -0
- data/app_generators/pureapp/templates/html-template/history/history.js +645 -0
- data/app_generators/pureapp/templates/html-template/history/historyFrame.html +29 -0
- data/app_generators/pureapp/templates/html-template/index.template.html +121 -0
- data/app_generators/pureapp/templates/html-template/playerProductInstall.swf +0 -0
- data/app_generators/pureapp/templates/libs/PureMVC_AS3_MultiCore_1_0_5.swc +0 -0
- data/app_generators/pureapp/templates/libs/Utility_AS3_MultiCore_Pipes_1_1.swc +0 -0
- data/app_generators/pureapp/templates/libs/fabrication-0.6-flex.swc +0 -0
- data/app_generators/pureapp/templates/libs/fabrication_license.txt +7 -0
- data/app_generators/pureapp/templates/libs/puremvc_multicore_license.txt +61 -0
- data/app_generators/pureapp/templates/libs/puremvc_pipes_license.txt +63 -0
- data/app_generators/pureapp/templates/mainapp.mxml +22 -0
- data/app_generators/pureapp/templates/modules/authentication/controller/authentication_module_startup_command.as +22 -0
- data/app_generators/pureapp/templates/modules/authentication/model/authentication_proxy.as +20 -0
- data/app_generators/pureapp/templates/modules/authentication/view/authentication_module_mediator.as +31 -0
- data/app_generators/pureapp/templates/modules/authentication/view/components/sign_in_view.mxml +48 -0
- data/app_generators/pureapp/templates/modules/authentication/view/sign_in_view_mediator.as +48 -0
- data/app_generators/pureapp/templates/modules/dashboard/controller/dashboard_module_startup_command.as +22 -0
- data/app_generators/pureapp/templates/modules/dashboard/view/components/nav_bar.mxml +14 -0
- data/app_generators/pureapp/templates/modules/dashboard/view/components/todo_list.mxml +21 -0
- data/app_generators/pureapp/templates/modules/dashboard/view/dashboard_module_mediator.as +37 -0
- data/app_generators/pureapp/templates/modules/dashboard/view/nav_bar_mediator.as +45 -0
- data/app_generators/pureapp/templates/modules/dashboard/view/todo_list_mediator.as +23 -0
- data/app_generators/pureapp/templates/project.properties +18 -0
- data/app_generators/pureapp/templates/properties.yml +6 -0
- data/app_generators/pureapp/templates/shell/controller/add_module_command.as +18 -0
- data/app_generators/pureapp/templates/shell/controller/change_selected_module_command.as +23 -0
- data/app_generators/pureapp/templates/shell/controller/load_dashboard_module_command.as +16 -0
- data/app_generators/pureapp/templates/shell/controller/remove_module_command.as +21 -0
- data/app_generators/pureapp/templates/shell/controller/startup_command.as +30 -0
- data/app_generators/pureapp/templates/shell/model/i_list_element.as +8 -0
- data/app_generators/pureapp/templates/shell/model/list_proxy.as +53 -0
- data/app_generators/pureapp/templates/shell/model/module_descriptor.as +19 -0
- data/app_generators/pureapp/templates/shell/model/selection_proxy.as +30 -0
- data/app_generators/pureapp/templates/shell/shell_constants.as +11 -0
- data/app_generators/pureapp/templates/shell/view/components/modules_container.mxml +15 -0
- data/app_generators/pureapp/templates/shell/view/mediator.as +35 -0
- data/app_generators/pureapp/templates/shell/view/modules_container_mediator.as +124 -0
- data/bin/pureapp +17 -0
- data/lib/fabricator.rb +6 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/test/test_fabricator.rb +11 -0
- data/test/test_generator_helper.rb +29 -0
- data/test/test_helper.rb +3 -0
- data/test/test_pureapp_generator.rb +43 -0
- metadata +145 -0
data/History.txt
ADDED
data/Manifest.txt
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
app_generators/pureapp/pureapp_generator.rb
|
2
|
+
app_generators/pureapp/templates/actionscript.properties
|
3
|
+
app_generators/pureapp/templates/authentication_module.mxml
|
4
|
+
app_generators/pureapp/templates/common/constants.as
|
5
|
+
app_generators/pureapp/templates/dashboard_module.mxml
|
6
|
+
app_generators/pureapp/templates/flex.properties
|
7
|
+
app_generators/pureapp/templates/html-template/AC_OETags.js
|
8
|
+
app_generators/pureapp/templates/html-template/history
|
9
|
+
app_generators/pureapp/templates/html-template/history/history.css
|
10
|
+
app_generators/pureapp/templates/html-template/history/history.js
|
11
|
+
app_generators/pureapp/templates/html-template/history/historyFrame.html
|
12
|
+
app_generators/pureapp/templates/html-template/index.template.html
|
13
|
+
app_generators/pureapp/templates/html-template/playerProductInstall.swf
|
14
|
+
app_generators/pureapp/templates/libs/fabrication-0.6-flex.swc
|
15
|
+
app_generators/pureapp/templates/libs/fabrication_license.txt
|
16
|
+
app_generators/pureapp/templates/libs/PureMVC_AS3_MultiCore_1_0_5.swc
|
17
|
+
app_generators/pureapp/templates/libs/puremvc_multicore_license.txt
|
18
|
+
app_generators/pureapp/templates/libs/puremvc_pipes_license.txt
|
19
|
+
app_generators/pureapp/templates/libs/Utility_AS3_MultiCore_Pipes_1_1.swc
|
20
|
+
app_generators/pureapp/templates/mainapp.mxml
|
21
|
+
app_generators/pureapp/templates/modules/authentication/controller/authentication_module_startup_command.as
|
22
|
+
app_generators/pureapp/templates/modules/authentication/model/authentication_proxy.as
|
23
|
+
app_generators/pureapp/templates/modules/authentication/view/authentication_module_mediator.as
|
24
|
+
app_generators/pureapp/templates/modules/authentication/view/components/sign_in_view.mxml
|
25
|
+
app_generators/pureapp/templates/modules/authentication/view/sign_in_view_mediator.as
|
26
|
+
app_generators/pureapp/templates/modules/dashboard/controller/dashboard_module_startup_command.as
|
27
|
+
app_generators/pureapp/templates/modules/dashboard/view/components/nav_bar.mxml
|
28
|
+
app_generators/pureapp/templates/modules/dashboard/view/components/todo_list.mxml
|
29
|
+
app_generators/pureapp/templates/modules/dashboard/view/dashboard_module_mediator.as
|
30
|
+
app_generators/pureapp/templates/modules/dashboard/view/nav_bar_mediator.as
|
31
|
+
app_generators/pureapp/templates/modules/dashboard/view/todo_list_mediator.as
|
32
|
+
app_generators/pureapp/templates/project.properties
|
33
|
+
app_generators/pureapp/templates/properties.yml
|
34
|
+
app_generators/pureapp/templates/shell/controller/add_module_command.as
|
35
|
+
app_generators/pureapp/templates/shell/controller/change_selected_module_command.as
|
36
|
+
app_generators/pureapp/templates/shell/controller/load_dashboard_module_command.as
|
37
|
+
app_generators/pureapp/templates/shell/controller/remove_module_command.as
|
38
|
+
app_generators/pureapp/templates/shell/controller/startup_command.as
|
39
|
+
app_generators/pureapp/templates/shell/model/i_list_element.as
|
40
|
+
app_generators/pureapp/templates/shell/model/list_proxy.as
|
41
|
+
app_generators/pureapp/templates/shell/model/module_descriptor.as
|
42
|
+
app_generators/pureapp/templates/shell/model/selection_proxy.as
|
43
|
+
app_generators/pureapp/templates/shell/shell_constants.as
|
44
|
+
app_generators/pureapp/templates/shell/view/components
|
45
|
+
app_generators/pureapp/templates/shell/view/components/modules_container.mxml
|
46
|
+
app_generators/pureapp/templates/shell/view/mediator.as
|
47
|
+
app_generators/pureapp/templates/shell/view/modules_container_mediator.as
|
48
|
+
app_generators/pureapp/USAGE
|
49
|
+
bin/pureapp
|
50
|
+
History.txt
|
51
|
+
lib/fabricator
|
52
|
+
lib/fabricator.rb
|
53
|
+
Manifest.txt
|
54
|
+
PostInstall.txt
|
55
|
+
Rakefile
|
56
|
+
README.rdoc
|
57
|
+
script/console
|
58
|
+
script/destroy
|
59
|
+
script/generate
|
60
|
+
test/test_fabricator.rb
|
61
|
+
test/test_generator_helper.rb
|
62
|
+
test/test_helper.rb
|
63
|
+
test/test_pureapp_generator.rb
|
data/PostInstall.txt
ADDED
data/README.rdoc
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
= fabricator
|
2
|
+
|
3
|
+
* FIX (url)
|
4
|
+
|
5
|
+
== DESCRIPTION:
|
6
|
+
|
7
|
+
FIX (describe your package)
|
8
|
+
|
9
|
+
== FEATURES/PROBLEMS:
|
10
|
+
|
11
|
+
* FIX (list of features or problems)
|
12
|
+
|
13
|
+
== SYNOPSIS:
|
14
|
+
|
15
|
+
FIX (code sample of usage)
|
16
|
+
|
17
|
+
== REQUIREMENTS:
|
18
|
+
|
19
|
+
* FIX (list of requirements)
|
20
|
+
|
21
|
+
== INSTALL:
|
22
|
+
|
23
|
+
* FIX (sudo gem install, anything else)
|
24
|
+
|
25
|
+
== LICENSE:
|
26
|
+
|
27
|
+
(The MIT License)
|
28
|
+
|
29
|
+
Copyright (c) 2009 FIXME full name
|
30
|
+
|
31
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
32
|
+
a copy of this software and associated documentation files (the
|
33
|
+
'Software'), to deal in the Software without restriction, including
|
34
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
35
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
36
|
+
permit persons to whom the Software is furnished to do so, subject to
|
37
|
+
the following conditions:
|
38
|
+
|
39
|
+
The above copyright notice and this permission notice shall be
|
40
|
+
included in all copies or substantial portions of the Software.
|
41
|
+
|
42
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
43
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
44
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
45
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
46
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
47
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
48
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
%w[rubygems rake rake/clean fileutils newgem rubigen].each { |f| require f }
|
2
|
+
require File.dirname(__FILE__) + '/lib/fabricator'
|
3
|
+
|
4
|
+
# Generate all the Rake tasks
|
5
|
+
# Run 'rake -T' to see list of generated tasks (from gem root directory)
|
6
|
+
$hoe = Hoe.new('fabricator', Fabricator::VERSION) do |p|
|
7
|
+
p.developer('Steffen Egelund Jensen', 'sej@lenio.dk')
|
8
|
+
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
9
|
+
p.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
|
10
|
+
p.rubyforge_name = 'pure-fab-gen'#p.name # TODO this is default value
|
11
|
+
# p.extra_deps = [
|
12
|
+
# ['activesupport','>= 2.0.2'],
|
13
|
+
# ]
|
14
|
+
p.extra_dev_deps = [
|
15
|
+
['newgem', ">= #{::Newgem::VERSION}"]
|
16
|
+
]
|
17
|
+
|
18
|
+
p.clean_globs |= %w[**/.DS_Store tmp *.log]
|
19
|
+
path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
|
20
|
+
p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
|
21
|
+
p.rsync_args = '-av --delete --ignore-errors'
|
22
|
+
end
|
23
|
+
|
24
|
+
require 'newgem/tasks' # load /tasks/*.rake
|
25
|
+
Dir['tasks/**/*.rake'].each { |t| load t }
|
26
|
+
|
27
|
+
# TODO - want other tests/tasks run by default? Add them to the list
|
28
|
+
# task :default => [:spec, :features]
|
@@ -0,0 +1,151 @@
|
|
1
|
+
class PureappGenerator < RubiGen::Base
|
2
|
+
|
3
|
+
DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'],
|
4
|
+
Config::CONFIG['ruby_install_name'])
|
5
|
+
|
6
|
+
default_options :author => nil
|
7
|
+
|
8
|
+
attr_reader :name,
|
9
|
+
:title,
|
10
|
+
:base_package,
|
11
|
+
:base_folder,
|
12
|
+
:base_src_folder,
|
13
|
+
:base_package_folder,
|
14
|
+
:startup_command_name
|
15
|
+
|
16
|
+
def initialize(runtime_args, runtime_options = {})
|
17
|
+
super
|
18
|
+
usage if args.empty?
|
19
|
+
@name = args.shift
|
20
|
+
@destination_root = File.expand_path(@name)
|
21
|
+
@base_package = args.shift || "org.puremvc.multicore.fabrication.app"
|
22
|
+
@title = args.shift || @name
|
23
|
+
@base_src_folder = "src/main/flex/"
|
24
|
+
@base_package_folder = @base_package.gsub('.', '/').gsub(/\s/, '')
|
25
|
+
@base_folder = @base_src_folder + @base_package_folder
|
26
|
+
@startup_command_name = "#{@name}ShellStartupCommand"
|
27
|
+
extract_options
|
28
|
+
end
|
29
|
+
|
30
|
+
def manifest
|
31
|
+
record do |m|
|
32
|
+
# Ensure appropriate folder(s) exists
|
33
|
+
#m.directory "#{@name}"
|
34
|
+
m.directory @base_folder
|
35
|
+
m.directory @base_folder +"/shell/controller"
|
36
|
+
m.directory @base_folder +"/shell/model"
|
37
|
+
m.directory @base_folder +"/shell/view/components"
|
38
|
+
m.directory @base_folder +"/common"
|
39
|
+
m.directory @base_folder +"/modules/authentication/model"
|
40
|
+
m.directory @base_folder +"/modules/authentication/view/components"
|
41
|
+
m.directory @base_folder +"/modules/authentication/controller"
|
42
|
+
m.directory @base_folder +"/modules/dashboard/model"
|
43
|
+
m.directory @base_folder +"/modules/dashboard/view/components"
|
44
|
+
m.directory @base_folder +"/modules/dashboard/controller"
|
45
|
+
BASEDIRS.each { |path| m.directory path }
|
46
|
+
|
47
|
+
# Setup Flex project
|
48
|
+
m.file 'flex.properties', '.flexProperties'
|
49
|
+
m.template 'actionscript.properties', '.actionScriptProperties'
|
50
|
+
m.template 'project.properties', '.project'
|
51
|
+
m.directory 'html-template/history'
|
52
|
+
%w(index.template.html AC_OETags.js playerProductInstall.swf).each do |file|
|
53
|
+
m.file "html-template/#{file}", "html-template/#{file}"
|
54
|
+
end
|
55
|
+
|
56
|
+
# Save generator properties for component generators.
|
57
|
+
m.template "properties.yml", "/script/properties.yml"
|
58
|
+
|
59
|
+
# Create template files
|
60
|
+
%w(history.css history.js historyFrame.html).each do |file|
|
61
|
+
m.file "html-template/history/#{file}", "html-template/history/#{file}"
|
62
|
+
end
|
63
|
+
|
64
|
+
# Copy needed swc's and their licenses
|
65
|
+
%w(puremvc_multicore_license.txt puremvc_pipes_license.txt PureMVC_AS3_MultiCore_1_0_5.swc Utility_AS3_MultiCore_Pipes_1_1.swc fabrication-0.6-flex.swc fabrication_license.txt).each do |file|
|
66
|
+
m.file "libs/#{file}", "libs/#{file}"
|
67
|
+
end
|
68
|
+
|
69
|
+
# Create stubs
|
70
|
+
m.template "mainapp.mxml", "#{@base_src_folder + @name}Shell.mxml"
|
71
|
+
m.template "common/constants.as", "#{@base_folder}/common/#{@name}Constants.as"
|
72
|
+
|
73
|
+
# Create shell stubs
|
74
|
+
m.template "shell/shell_constants.as", "#{@base_folder}/shell/#{@name}ShellConstants.as"
|
75
|
+
m.template "shell/controller/startup_command.as", "#{@base_folder}/shell/controller/#{@startup_command_name}.as"
|
76
|
+
m.template "shell/controller/add_module_command.as", "#{@base_folder}/shell/controller/AddModuleCommand.as"
|
77
|
+
m.template "shell/controller/remove_module_command.as", "#{@base_folder}/shell/controller/RemoveModuleCommand.as"
|
78
|
+
m.template "shell/controller/change_selected_module_command.as", "#{@base_folder}/shell/controller/ChangeSelectedModuleCommand.as"
|
79
|
+
m.template "shell/view/mediator.as", "#{@base_folder}/shell/view/#{@name}ShellMediator.as"
|
80
|
+
m.file "shell/view/components/modules_container.mxml", "#{@base_folder}/shell/view/components/ModulesContainer.mxml"
|
81
|
+
m.template "shell/view/modules_container_mediator.as", "#{@base_folder}/shell/view/ModulesContainerMediator.as"
|
82
|
+
m.template "shell/model/list_proxy.as", "#{@base_folder}/shell/model/ListProxy.as"
|
83
|
+
m.template "shell/model/selection_proxy.as", "#{@base_folder}/shell/model/SelectionProxy.as"
|
84
|
+
m.template "shell/model/i_list_element.as", "#{@base_folder}/shell/model/IListElement.as"
|
85
|
+
m.template "shell/model/module_descriptor.as", "#{@base_folder}/shell/model/ModuleDescriptor.as"
|
86
|
+
|
87
|
+
#Create authentication module
|
88
|
+
m.template "authentication_module.mxml", "#{@base_src_folder}/AuthenticationModule.mxml"
|
89
|
+
m.template "modules/authentication/controller/authentication_module_startup_command.as","#{@base_folder}/modules/authentication/controller/AuthenticationModuleStartupCommand.as"
|
90
|
+
m.template "modules/authentication/view/authentication_module_mediator.as", "#{@base_folder}/modules/authentication/view/AuthenticationModuleMediator.as"
|
91
|
+
m.template "modules/authentication/view/components/sign_in_view.mxml", "#{@base_folder}/modules/authentication/view/components/SignInView.mxml"
|
92
|
+
m.template "modules/authentication/view/sign_in_view_mediator.as", "#{@base_folder}/modules/authentication/view/SignInViewMediator.as"
|
93
|
+
m.template "modules/authentication/model/authentication_proxy.as", "#{@base_folder}/modules/authentication/model/AuthenticationProxy.as"
|
94
|
+
|
95
|
+
#Create dashboard module
|
96
|
+
m.template "dashboard_module.mxml", "#{@base_src_folder}/DashboardModule.mxml"
|
97
|
+
m.template "modules/dashboard/controller/dashboard_module_startup_command.as","#{@base_folder}/modules/dashboard/controller/DashboardModuleStartupCommand.as"
|
98
|
+
m.template "modules/dashboard/view/dashboard_module_mediator.as", "#{@base_folder}/modules/dashboard/view/DashboardModuleMediator.as"
|
99
|
+
m.template "shell/controller/load_dashboard_module_command.as", "#{@base_folder}/shell/controller/LoadDashboardModuleCommand.as"
|
100
|
+
m.template "modules/dashboard/view/components/nav_bar.mxml", "#{@base_folder}/modules/dashboard/view/components/NavBar.mxml"
|
101
|
+
m.template "modules/dashboard/view/nav_bar_mediator.as", "#{@base_folder}/modules/dashboard/view/NavBarMediator.as"
|
102
|
+
m.template "modules/dashboard/view/components/todo_list.mxml", "#{@base_folder}/modules/dashboard/view/components/TodoList.mxml"
|
103
|
+
m.template "modules/dashboard/view/todo_list_mediator.as", "#{@base_folder}/modules/dashboard/view/TodoListMediator.as"
|
104
|
+
|
105
|
+
# Create stubs
|
106
|
+
# m.template "template.rb", "some_file_after_erb.rb"
|
107
|
+
# m.template_copy_each ["template.rb", "template2.rb"]
|
108
|
+
# m.file "file", "some_file_copied"
|
109
|
+
# m.file_copy_each ["path/to/file", "path/to/file2"]
|
110
|
+
|
111
|
+
m.dependency "install_rubigen_scripts", [destination_root, 'pureapp'],
|
112
|
+
:shebang => options[:shebang], :collision => :force
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
protected
|
117
|
+
def banner
|
118
|
+
<<-EOS
|
119
|
+
Creates a ...
|
120
|
+
|
121
|
+
USAGE: #{spec.name} name
|
122
|
+
EOS
|
123
|
+
end
|
124
|
+
|
125
|
+
def add_options!(opts)
|
126
|
+
opts.separator ''
|
127
|
+
opts.separator 'Options:'
|
128
|
+
# For each option below, place the default
|
129
|
+
# at the top of the file next to "default_options"
|
130
|
+
# opts.on("-a", "--author=\"Your Name\"", String,
|
131
|
+
# "Some comment about this option",
|
132
|
+
# "Default: none") { |o| options[:author] = o }
|
133
|
+
opts.on("-v", "--version", "Show the #{File.basename($0)} version number and quit.")
|
134
|
+
end
|
135
|
+
|
136
|
+
def extract_options
|
137
|
+
# for each option, extract it into a local variable (and create an "attr_reader :author" at the top)
|
138
|
+
# Templates can access these value via the attr_reader-generated methods, but not the
|
139
|
+
# raw instance variable value.
|
140
|
+
# @author = options[:author]
|
141
|
+
end
|
142
|
+
|
143
|
+
# Installation skeleton. Intermediate directories are automatically
|
144
|
+
# created so don't sweat their absence here.
|
145
|
+
BASEDIRS = %w(
|
146
|
+
bin
|
147
|
+
libs
|
148
|
+
script
|
149
|
+
src/main/flex
|
150
|
+
)
|
151
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<actionScriptProperties mainApplicationPath="<%= name %>Shell.mxml" version="3">
|
3
|
+
<compiler additionalCompilerArguments="-locale en_US -keep-as3-metadata+=Resource,HasOne,HasMany,BelongsTo,DateTime,Lazy,Ignored" copyDependentFiles="true" enableModuleDebug="true" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersion="9.0.28" htmlPlayerVersionCheck="true" outputFolderPath="bin" sourceFolderPath="src/main/flex" strict="true" useApolloConfig="false" verifyDigests="true" warn="true">
|
4
|
+
<compilerSourcePath/>
|
5
|
+
<libraryPath defaultLinkType="1">
|
6
|
+
<libraryPathEntry kind="4" path=""/>
|
7
|
+
<libraryPathEntry kind="1" linkType="1" path="libs"/>
|
8
|
+
</libraryPath>
|
9
|
+
<sourceAttachmentPath/>
|
10
|
+
</compiler>
|
11
|
+
<applications>
|
12
|
+
<application path="<%= name %>Shell.mxml"/>
|
13
|
+
</applications>
|
14
|
+
<modules>
|
15
|
+
<!--Todo for each module-->
|
16
|
+
<module application="<%= base_src_folder%>/<%= name %>Shell.mxml" destPath="<%=base_package_folder%>/modules/authentication/AuthenticationModule.swf" optimize="true" sourcePath="<%=base_src_folder%>/AuthenticationModule.mxml"/>
|
17
|
+
<module application="<%= base_src_folder%>/<%= name %>Shell.mxml" destPath="<%=base_package_folder%>/modules/dashboard/DashboardModule.swf" optimize="true" sourcePath="<%=base_src_folder%>/DashboardModule.mxml"/>
|
18
|
+
</modules>
|
19
|
+
<buildCSSFiles/>
|
20
|
+
</actionScriptProperties>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<fab:FlexModule
|
3
|
+
xmlns:mx="http://www.adobe.com/2006/mxml"
|
4
|
+
xmlns:fab="org.puremvc.as3.multicore.utilities.fabrication.components.*"
|
5
|
+
xmlns:local="<%= base_package%>.modules.authentication.view.components.*" width="100%" height="100%">
|
6
|
+
|
7
|
+
<mx:Script>
|
8
|
+
<![CDATA[
|
9
|
+
import <%= base_package%>.modules.authentication.controller.AuthenticationModuleStartupCommand;
|
10
|
+
import mx.effects.easing.*;
|
11
|
+
|
12
|
+
override public function getStartupCommand():Class {
|
13
|
+
return AuthenticationModuleStartupCommand;
|
14
|
+
}
|
15
|
+
|
16
|
+
override public function getClassByName(path:String):Class {
|
17
|
+
return getDefinitionByName(path) as Class;
|
18
|
+
}
|
19
|
+
|
20
|
+
]]>
|
21
|
+
</mx:Script>
|
22
|
+
<mx:Label text="Welcome to <%= title%>" color="#FFFFFF" fontSize="30" width="100%" textAlign="center" fontWeight="bold"/>
|
23
|
+
<mx:Blur id="myViewShowEffect" blurXFrom="100" blurXTo="0" blurYFrom="100" blurYTo="0" duration="600" />
|
24
|
+
<mx:VBox height="100%" width="100%" horizontalAlign="center" verticalAlign="middle" showEffect="{myViewShowEffect}">
|
25
|
+
<local:SignInView id="signInView" showEffect="{myViewShowEffect}"/>
|
26
|
+
</mx:VBox>
|
27
|
+
</fab:FlexModule>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
package <%= base_package%>.common {
|
2
|
+
|
3
|
+
public class <%= name%>Constants {
|
4
|
+
|
5
|
+
static public const SELECTED_MODULE_CHANGED:String = "selectedModuleChanged";
|
6
|
+
static public const VALID_LOGIN:String = "validLogin";
|
7
|
+
static public const SIGN_OUT:String = "signOut";
|
8
|
+
|
9
|
+
static public const SHELL_NAME:String = "<%= name%>Shell";
|
10
|
+
|
11
|
+
}
|
12
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<fab:FlexModule
|
3
|
+
xmlns:mx="http://www.adobe.com/2006/mxml"
|
4
|
+
xmlns:fab="org.puremvc.as3.multicore.utilities.fabrication.components.*"
|
5
|
+
xmlns:local="<%= base_package%>.modules.dashboard.view.components.*" width="100%" height="100%">
|
6
|
+
|
7
|
+
<mx:Script>
|
8
|
+
<![CDATA[
|
9
|
+
import <%= base_package%>.modules.dashboard.controller.DashboardModuleStartupCommand;
|
10
|
+
import mx.effects.easing.*;
|
11
|
+
|
12
|
+
private var count:int = 0;
|
13
|
+
|
14
|
+
override public function getStartupCommand():Class {
|
15
|
+
return DashboardModuleStartupCommand;
|
16
|
+
}
|
17
|
+
|
18
|
+
override public function getClassByName(path:String):Class {
|
19
|
+
return getDefinitionByName(path) as Class;
|
20
|
+
}
|
21
|
+
|
22
|
+
]]>
|
23
|
+
</mx:Script>
|
24
|
+
<local:NavBar id="navBar"/>
|
25
|
+
<mx:VBox height="100%" width="100%" horizontalAlign="center" verticalAlign="middle">
|
26
|
+
<local:TodoList id="todoList"/>
|
27
|
+
</mx:VBox>
|
28
|
+
</fab:FlexModule>
|
@@ -0,0 +1,276 @@
|
|
1
|
+
// Flash Player Version Detection - Rev 1.6
|
2
|
+
// Detect Client Browser type
|
3
|
+
// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved.
|
4
|
+
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
|
5
|
+
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
|
6
|
+
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
|
7
|
+
|
8
|
+
function ControlVersion()
|
9
|
+
{
|
10
|
+
var version;
|
11
|
+
var axo;
|
12
|
+
var e;
|
13
|
+
|
14
|
+
// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
|
15
|
+
|
16
|
+
try {
|
17
|
+
// version will be set for 7.X or greater players
|
18
|
+
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
|
19
|
+
version = axo.GetVariable("$version");
|
20
|
+
} catch (e) {
|
21
|
+
}
|
22
|
+
|
23
|
+
if (!version)
|
24
|
+
{
|
25
|
+
try {
|
26
|
+
// version will be set for 6.X players only
|
27
|
+
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
|
28
|
+
|
29
|
+
// installed player is some revision of 6.0
|
30
|
+
// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
|
31
|
+
// so we have to be careful.
|
32
|
+
|
33
|
+
// default to the first public version
|
34
|
+
version = "WIN 6,0,21,0";
|
35
|
+
|
36
|
+
// throws if AllowScripAccess does not exist (introduced in 6.0r47)
|
37
|
+
axo.AllowScriptAccess = "always";
|
38
|
+
|
39
|
+
// safe to call for 6.0r47 or greater
|
40
|
+
version = axo.GetVariable("$version");
|
41
|
+
|
42
|
+
} catch (e) {
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
if (!version)
|
47
|
+
{
|
48
|
+
try {
|
49
|
+
// version will be set for 4.X or 5.X player
|
50
|
+
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
|
51
|
+
version = axo.GetVariable("$version");
|
52
|
+
} catch (e) {
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
if (!version)
|
57
|
+
{
|
58
|
+
try {
|
59
|
+
// version will be set for 3.X player
|
60
|
+
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
|
61
|
+
version = "WIN 3,0,18,0";
|
62
|
+
} catch (e) {
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
if (!version)
|
67
|
+
{
|
68
|
+
try {
|
69
|
+
// version will be set for 2.X player
|
70
|
+
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
|
71
|
+
version = "WIN 2,0,0,11";
|
72
|
+
} catch (e) {
|
73
|
+
version = -1;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
return version;
|
78
|
+
}
|
79
|
+
|
80
|
+
// JavaScript helper required to detect Flash Player PlugIn version information
|
81
|
+
function GetSwfVer(){
|
82
|
+
// NS/Opera version >= 3 check for Flash plugin in plugin array
|
83
|
+
var flashVer = -1;
|
84
|
+
|
85
|
+
if (navigator.plugins != null && navigator.plugins.length > 0) {
|
86
|
+
if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
|
87
|
+
var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
|
88
|
+
var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
|
89
|
+
var descArray = flashDescription.split(" ");
|
90
|
+
var tempArrayMajor = descArray[2].split(".");
|
91
|
+
var versionMajor = tempArrayMajor[0];
|
92
|
+
var versionMinor = tempArrayMajor[1];
|
93
|
+
var versionRevision = descArray[3];
|
94
|
+
if (versionRevision == "") {
|
95
|
+
versionRevision = descArray[4];
|
96
|
+
}
|
97
|
+
if (versionRevision[0] == "d") {
|
98
|
+
versionRevision = versionRevision.substring(1);
|
99
|
+
} else if (versionRevision[0] == "r") {
|
100
|
+
versionRevision = versionRevision.substring(1);
|
101
|
+
if (versionRevision.indexOf("d") > 0) {
|
102
|
+
versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
|
103
|
+
}
|
104
|
+
}
|
105
|
+
var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
|
106
|
+
}
|
107
|
+
}
|
108
|
+
// MSN/WebTV 2.6 supports Flash 4
|
109
|
+
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
|
110
|
+
// WebTV 2.5 supports Flash 3
|
111
|
+
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
|
112
|
+
// older WebTV supports Flash 2
|
113
|
+
else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
|
114
|
+
else if ( isIE && isWin && !isOpera ) {
|
115
|
+
flashVer = ControlVersion();
|
116
|
+
}
|
117
|
+
return flashVer;
|
118
|
+
}
|
119
|
+
|
120
|
+
// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
|
121
|
+
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
|
122
|
+
{
|
123
|
+
versionStr = GetSwfVer();
|
124
|
+
if (versionStr == -1 ) {
|
125
|
+
return false;
|
126
|
+
} else if (versionStr != 0) {
|
127
|
+
if(isIE && isWin && !isOpera) {
|
128
|
+
// Given "WIN 2,0,0,11"
|
129
|
+
tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"]
|
130
|
+
tempString = tempArray[1]; // "2,0,0,11"
|
131
|
+
versionArray = tempString.split(","); // ['2', '0', '0', '11']
|
132
|
+
} else {
|
133
|
+
versionArray = versionStr.split(".");
|
134
|
+
}
|
135
|
+
var versionMajor = versionArray[0];
|
136
|
+
var versionMinor = versionArray[1];
|
137
|
+
var versionRevision = versionArray[2];
|
138
|
+
|
139
|
+
// is the major.revision >= requested major.revision AND the minor version >= requested minor
|
140
|
+
if (versionMajor > parseFloat(reqMajorVer)) {
|
141
|
+
return true;
|
142
|
+
} else if (versionMajor == parseFloat(reqMajorVer)) {
|
143
|
+
if (versionMinor > parseFloat(reqMinorVer))
|
144
|
+
return true;
|
145
|
+
else if (versionMinor == parseFloat(reqMinorVer)) {
|
146
|
+
if (versionRevision >= parseFloat(reqRevision))
|
147
|
+
return true;
|
148
|
+
}
|
149
|
+
}
|
150
|
+
return false;
|
151
|
+
}
|
152
|
+
}
|
153
|
+
|
154
|
+
function AC_AddExtension(src, ext)
|
155
|
+
{
|
156
|
+
if (src.indexOf('?') != -1)
|
157
|
+
return src.replace(/\?/, ext+'?');
|
158
|
+
else
|
159
|
+
return src + ext;
|
160
|
+
}
|
161
|
+
|
162
|
+
function AC_Generateobj(objAttrs, params, embedAttrs)
|
163
|
+
{
|
164
|
+
var str = '';
|
165
|
+
if (isIE && isWin && !isOpera)
|
166
|
+
{
|
167
|
+
str += '<object ';
|
168
|
+
for (var i in objAttrs)
|
169
|
+
str += i + '="' + objAttrs[i] + '" ';
|
170
|
+
str += '>';
|
171
|
+
for (var i in params)
|
172
|
+
str += '<param name="' + i + '" value="' + params[i] + '" /> ';
|
173
|
+
str += '</object>';
|
174
|
+
} else {
|
175
|
+
str += '<embed ';
|
176
|
+
for (var i in embedAttrs)
|
177
|
+
str += i + '="' + embedAttrs[i] + '" ';
|
178
|
+
str += '> </embed>';
|
179
|
+
}
|
180
|
+
|
181
|
+
document.write(str);
|
182
|
+
}
|
183
|
+
|
184
|
+
function AC_FL_RunContent(){
|
185
|
+
var ret =
|
186
|
+
AC_GetArgs
|
187
|
+
( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
|
188
|
+
, "application/x-shockwave-flash"
|
189
|
+
);
|
190
|
+
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
|
191
|
+
}
|
192
|
+
|
193
|
+
function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
|
194
|
+
var ret = new Object();
|
195
|
+
ret.embedAttrs = new Object();
|
196
|
+
ret.params = new Object();
|
197
|
+
ret.objAttrs = new Object();
|
198
|
+
for (var i=0; i < args.length; i=i+2){
|
199
|
+
var currArg = args[i].toLowerCase();
|
200
|
+
|
201
|
+
switch (currArg){
|
202
|
+
case "classid":
|
203
|
+
break;
|
204
|
+
case "pluginspage":
|
205
|
+
ret.embedAttrs[args[i]] = args[i+1];
|
206
|
+
break;
|
207
|
+
case "src":
|
208
|
+
case "movie":
|
209
|
+
args[i+1] = AC_AddExtension(args[i+1], ext);
|
210
|
+
ret.embedAttrs["src"] = args[i+1];
|
211
|
+
ret.params[srcParamName] = args[i+1];
|
212
|
+
break;
|
213
|
+
case "onafterupdate":
|
214
|
+
case "onbeforeupdate":
|
215
|
+
case "onblur":
|
216
|
+
case "oncellchange":
|
217
|
+
case "onclick":
|
218
|
+
case "ondblClick":
|
219
|
+
case "ondrag":
|
220
|
+
case "ondragend":
|
221
|
+
case "ondragenter":
|
222
|
+
case "ondragleave":
|
223
|
+
case "ondragover":
|
224
|
+
case "ondrop":
|
225
|
+
case "onfinish":
|
226
|
+
case "onfocus":
|
227
|
+
case "onhelp":
|
228
|
+
case "onmousedown":
|
229
|
+
case "onmouseup":
|
230
|
+
case "onmouseover":
|
231
|
+
case "onmousemove":
|
232
|
+
case "onmouseout":
|
233
|
+
case "onkeypress":
|
234
|
+
case "onkeydown":
|
235
|
+
case "onkeyup":
|
236
|
+
case "onload":
|
237
|
+
case "onlosecapture":
|
238
|
+
case "onpropertychange":
|
239
|
+
case "onreadystatechange":
|
240
|
+
case "onrowsdelete":
|
241
|
+
case "onrowenter":
|
242
|
+
case "onrowexit":
|
243
|
+
case "onrowsinserted":
|
244
|
+
case "onstart":
|
245
|
+
case "onscroll":
|
246
|
+
case "onbeforeeditfocus":
|
247
|
+
case "onactivate":
|
248
|
+
case "onbeforedeactivate":
|
249
|
+
case "ondeactivate":
|
250
|
+
case "type":
|
251
|
+
case "codebase":
|
252
|
+
ret.objAttrs[args[i]] = args[i+1];
|
253
|
+
break;
|
254
|
+
case "id":
|
255
|
+
case "width":
|
256
|
+
case "height":
|
257
|
+
case "align":
|
258
|
+
case "vspace":
|
259
|
+
case "hspace":
|
260
|
+
case "class":
|
261
|
+
case "title":
|
262
|
+
case "accesskey":
|
263
|
+
case "name":
|
264
|
+
case "tabindex":
|
265
|
+
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
|
266
|
+
break;
|
267
|
+
default:
|
268
|
+
ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
|
269
|
+
}
|
270
|
+
}
|
271
|
+
ret.objAttrs["classid"] = classid;
|
272
|
+
if (mimeType) ret.embedAttrs["type"] = mimeType;
|
273
|
+
return ret;
|
274
|
+
}
|
275
|
+
|
276
|
+
|