dima-ruboss4ruby 1.0.5 → 1.1.0

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.
Files changed (106) hide show
  1. data/History.txt +2 -3
  2. data/Manifest.txt +46 -37
  3. data/README.rdoc +12 -10
  4. data/Rakefile +37 -0
  5. data/app_generators/ruboss_app/USAGE +13 -0
  6. data/app_generators/ruboss_app/ruboss_app_generator.rb +88 -0
  7. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/actionscript.properties +1 -1
  8. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/actionscriptair.properties +0 -0
  9. data/app_generators/ruboss_app/templates/default_tasks.rake +51 -0
  10. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/expressInstall.swf +0 -0
  11. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/flex.properties +0 -0
  12. data/app_generators/ruboss_app/templates/generate.rb +21 -0
  13. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/html-template/AC_OETags.js +0 -0
  14. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/html-template/history/history.css +0 -0
  15. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/html-template/history/history.js +0 -0
  16. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/html-template/history/historyFrame.html +0 -0
  17. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/html-template/index.template.html +0 -0
  18. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/html-template/playerProductInstall.swf +0 -0
  19. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/index.html.erb +2 -2
  20. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/mainair-app.xml +3 -3
  21. data/app_generators/ruboss_app/templates/mainapp-config.xml +21 -0
  22. data/{merb_generators/templates/ruboss_flex_app → app_generators/ruboss_app/templates}/mainapp.mxml +6 -9
  23. data/app_generators/ruboss_app/templates/project-textmate.erb +52 -0
  24. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/project.properties +0 -0
  25. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/projectair.properties +0 -0
  26. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/swfobject.js +0 -0
  27. data/bin/ruboss-gen +17 -0
  28. data/generators/ruboss_config/USAGE +5 -0
  29. data/generators/ruboss_config/ruboss_config_generator.rb +24 -0
  30. data/generators/ruboss_controller/USAGE +10 -0
  31. data/generators/ruboss_controller/ruboss_controller_generator.rb +34 -0
  32. data/{merb_generators/templates/ruboss_controller → generators/ruboss_controller/templates}/controller.as.erb +0 -4
  33. data/generators/ruboss_main_app/USAGE +8 -0
  34. data/generators/ruboss_main_app/ruboss_main_app_generator.rb +46 -0
  35. data/generators/ruboss_main_app/templates/mainapp.mxml +31 -0
  36. data/generators/ruboss_scaffold/USAGE +29 -0
  37. data/generators/ruboss_scaffold/ruboss_scaffold_generator.rb +117 -0
  38. data/generators/ruboss_scaffold/templates/component.mxml.erb +149 -0
  39. data/generators/ruboss_scaffold/templates/model.as.erb +42 -0
  40. data/generators/ruboss_yaml_scaffold/USAGE +7 -0
  41. data/generators/ruboss_yaml_scaffold/ruboss_yaml_scaffold_generator.rb +43 -0
  42. data/lib/ruboss4ruby/active_foo.rb +0 -64
  43. data/lib/ruboss4ruby/active_record_default_methods.rb +54 -0
  44. data/lib/ruboss4ruby/configuration.rb +13 -28
  45. data/lib/ruboss4ruby/datamapper_foo.rb +1 -1
  46. data/lib/ruboss4ruby/rails/recipes.rb +58 -0
  47. data/lib/ruboss4ruby/rails/swf_helper.rb +59 -0
  48. data/lib/ruboss4ruby/tasks.rb +1 -1
  49. data/lib/ruboss4ruby.rb +35 -15
  50. data/rails_generators/ruboss_config/ruboss_config_generator.rb +2 -2
  51. data/rails_generators/ruboss_config/templates/mainair-app.xml +2 -2
  52. data/rails_generators/ruboss_controller/USAGE +1 -2
  53. data/rails_generators/ruboss_controller/ruboss_controller_generator.rb +1 -1
  54. data/rails_generators/ruboss_scaffold/ruboss_scaffold_generator.rb +1 -1
  55. data/rails_generators/ruboss_scaffold/templates/component.mxml.erb +69 -69
  56. data/rails_generators/ruboss_scaffold/templates/model.as.erb +1 -1
  57. data/ruboss4ruby.gemspec +43 -0
  58. data/spec/ruboss4ruby_spec.rb +7 -0
  59. data/spec/spec_helper.rb +16 -0
  60. data/test/rails/controllers/application.rb +15 -0
  61. data/test/rails/controllers/locations_controller.rb +93 -0
  62. data/test/rails/controllers/notes_controller.rb +96 -0
  63. data/test/rails/controllers/projects_controller.rb +93 -0
  64. data/test/rails/controllers/tasks_controller.rb +93 -0
  65. data/test/rails/controllers/users_controller.rb +93 -0
  66. data/test/rails/database.yml +4 -0
  67. data/test/rails/fixtures/locations.yml +8 -0
  68. data/test/rails/fixtures/notes.yml +17 -0
  69. data/test/rails/fixtures/projects.yml +25 -0
  70. data/test/rails/fixtures/simple_properties.yml +19 -0
  71. data/test/rails/fixtures/tasks.yml +46 -0
  72. data/test/rails/fixtures/users.yml +13 -0
  73. data/test/rails/helpers/functional_test_helper.rb +21 -0
  74. data/test/rails/helpers/test_helper.rb +61 -0
  75. data/test/rails/helpers/unit_test_helper.rb +30 -0
  76. data/test/rails/model.yml +35 -0
  77. data/test/rails/models/location.rb +4 -0
  78. data/test/rails/models/note.rb +3 -0
  79. data/test/rails/models/project.rb +4 -0
  80. data/test/rails/models/simple_property.rb +2 -0
  81. data/test/rails/models/task.rb +20 -0
  82. data/test/rails/models/user.rb +22 -0
  83. data/test/rails/playing_around_in_a_console.txt +71 -0
  84. data/test/rails/schema.rb +77 -0
  85. data/test/rails/test.swf +1 -0
  86. data/test/rails/test_active_foo.rb +81 -0
  87. data/test/rails/test_ruboss_rails_integration_functional.rb +22 -0
  88. data/test/rails/test_to_fxml.rb +77 -0
  89. data/test/rails/test_to_json.rb +23 -0
  90. data/test/rails/views/notes/empty_params_action.html.erb +1 -0
  91. data/test/rails/views/notes/index.html.erb +1 -0
  92. metadata +121 -92
  93. data/Generators +0 -7
  94. data/lib/ruboss4ruby/generated_attribute.rb +0 -61
  95. data/merb_generators/ruboss_config.rb +0 -103
  96. data/merb_generators/ruboss_controller.rb +0 -59
  97. data/merb_generators/ruboss_flex_app.rb +0 -67
  98. data/merb_generators/ruboss_resource.rb +0 -37
  99. data/merb_generators/ruboss_resource_controller.rb +0 -80
  100. data/merb_generators/ruboss_scaffold.rb +0 -157
  101. data/merb_generators/templates/ruboss_config/ruboss.yml +0 -16
  102. data/merb_generators/templates/ruboss_resource_controller/controller_ar.rb.erb +0 -49
  103. data/merb_generators/templates/ruboss_resource_controller/controller_dm.rb.erb +0 -46
  104. data/merb_generators/templates/ruboss_resource_controller/spec/controllers/%file_name%_spec.rb +0 -7
  105. data/merb_generators/templates/ruboss_resource_controller/spec/requests/%file_name%_spec.rb +0 -1
  106. data/merb_generators/templates/ruboss_resource_controller/test/controllers/%file_name%_test.rb +0 -17
data/History.txt CHANGED
@@ -1,4 +1,3 @@
1
- == 0.0.1 2008-11-26
1
+ == 1.1.0 / 2008-12-13
2
2
 
3
- * 1 major enhancement:
4
- * Initial release
3
+ * 1 major enhancement
data/Manifest.txt CHANGED
@@ -1,47 +1,54 @@
1
- Generators
2
1
  History.txt
3
2
  Manifest.txt
4
3
  README.rdoc
4
+ Rakefile
5
+ app_generators/ruboss_app/USAGE
6
+ app_generators/ruboss_app/ruboss_app_generator.rb
7
+ app_generators/ruboss_app/templates/actionscript.properties
8
+ app_generators/ruboss_app/templates/actionscriptair.properties
9
+ app_generators/ruboss_app/templates/default_tasks.rake
10
+ app_generators/ruboss_app/templates/expressInstall.swf
11
+ app_generators/ruboss_app/templates/flex.properties
12
+ app_generators/ruboss_app/templates/generate.rb
13
+ app_generators/ruboss_app/templates/html-template/AC_OETags.js
14
+ app_generators/ruboss_app/templates/html-template/history/history.css
15
+ app_generators/ruboss_app/templates/html-template/history/history.js
16
+ app_generators/ruboss_app/templates/html-template/history/historyFrame.html
17
+ app_generators/ruboss_app/templates/html-template/index.template.html
18
+ app_generators/ruboss_app/templates/html-template/playerProductInstall.swf
19
+ app_generators/ruboss_app/templates/index.html.erb
20
+ app_generators/ruboss_app/templates/mainair-app.xml
21
+ app_generators/ruboss_app/templates/mainapp-config.xml
22
+ app_generators/ruboss_app/templates/mainapp.mxml
23
+ app_generators/ruboss_app/templates/project-textmate.erb
24
+ app_generators/ruboss_app/templates/project.properties
25
+ app_generators/ruboss_app/templates/projectair.properties
26
+ app_generators/ruboss_app/templates/swfobject.js
27
+ bin/ruboss-gen
28
+ generators/ruboss_config/USAGE
29
+ generators/ruboss_config/ruboss_config_generator.rb
30
+ generators/ruboss_controller/USAGE
31
+ generators/ruboss_controller/ruboss_controller_generator.rb
32
+ generators/ruboss_controller/templates/controller.as.erb
33
+ generators/ruboss_main_app/USAGE
34
+ generators/ruboss_main_app/ruboss_main_app_generator.rb
35
+ generators/ruboss_main_app/templates/mainapp.mxml
36
+ generators/ruboss_scaffold/USAGE
37
+ generators/ruboss_scaffold/ruboss_scaffold_generator.rb
38
+ generators/ruboss_scaffold/templates/component.mxml.erb
39
+ generators/ruboss_scaffold/templates/model.as.erb
40
+ generators/ruboss_yaml_scaffold/USAGE
41
+ generators/ruboss_yaml_scaffold/ruboss_yaml_scaffold_generator.rb
5
42
  gpl-3.0.txt
6
43
  lib/ruboss4ruby.rb
7
44
  lib/ruboss4ruby/active_foo.rb
45
+ lib/ruboss4ruby/active_record_default_methods.rb
8
46
  lib/ruboss4ruby/active_record_tasks.rb
9
47
  lib/ruboss4ruby/configuration.rb
10
48
  lib/ruboss4ruby/datamapper_foo.rb
11
- lib/ruboss4ruby/generated_attribute.rb
12
49
  lib/ruboss4ruby/rails/recipes.rb
13
- lib/ruboss4ruby/rails/ruboss_helper.rb
14
- lib/ruboss4ruby/rails/ruboss_test_helpers.rb
50
+ lib/ruboss4ruby/rails/swf_helper.rb
15
51
  lib/ruboss4ruby/tasks.rb
16
- merb_generators/ruboss_config.rb
17
- merb_generators/ruboss_controller.rb
18
- merb_generators/ruboss_flex_app.rb
19
- merb_generators/ruboss_resource.rb
20
- merb_generators/ruboss_resource_controller.rb
21
- merb_generators/ruboss_scaffold.rb
22
- merb_generators/templates/ruboss_config/actionscript.properties
23
- merb_generators/templates/ruboss_config/actionscriptair.properties
24
- merb_generators/templates/ruboss_config/expressInstall.swf
25
- merb_generators/templates/ruboss_config/flex.properties
26
- merb_generators/templates/ruboss_config/html-template/AC_OETags.js
27
- merb_generators/templates/ruboss_config/html-template/history/history.css
28
- merb_generators/templates/ruboss_config/html-template/history/history.js
29
- merb_generators/templates/ruboss_config/html-template/history/historyFrame.html
30
- merb_generators/templates/ruboss_config/html-template/index.template.html
31
- merb_generators/templates/ruboss_config/html-template/playerProductInstall.swf
32
- merb_generators/templates/ruboss_config/index.html.erb
33
- merb_generators/templates/ruboss_config/mainair-app.xml
34
- merb_generators/templates/ruboss_config/project.properties
35
- merb_generators/templates/ruboss_config/projectair.properties
36
- merb_generators/templates/ruboss_config/ruboss.yml
37
- merb_generators/templates/ruboss_config/swfobject.js
38
- merb_generators/templates/ruboss_controller/controller.as.erb
39
- merb_generators/templates/ruboss_flex_app/mainapp.mxml
40
- merb_generators/templates/ruboss_resource_controller/controller_ar.rb.erb
41
- merb_generators/templates/ruboss_resource_controller/controller_dm.rb.erb
42
- merb_generators/templates/ruboss_resource_controller/spec/controllers/%file_name%_spec.rb
43
- merb_generators/templates/ruboss_resource_controller/spec/requests/%file_name%_spec.rb
44
- merb_generators/templates/ruboss_resource_controller/test/controllers/%file_name%_test.rb
45
52
  rails_generators/ruboss_config/USAGE
46
53
  rails_generators/ruboss_config/ruboss_config_generator.rb
47
54
  rails_generators/ruboss_config/templates/actionscript.properties
@@ -79,6 +86,8 @@ rails_generators/ruboss_yaml_scaffold/USAGE
79
86
  rails_generators/ruboss_yaml_scaffold/ruboss_yaml_scaffold_generator.rb
80
87
  rcl-1.0.txt
81
88
  ruboss4ruby.gemspec
89
+ spec/ruboss4ruby_spec.rb
90
+ spec/spec_helper.rb
82
91
  test/rails/controllers/application.rb
83
92
  test/rails/controllers/locations_controller.rb
84
93
  test/rails/controllers/notes_controller.rb
@@ -89,6 +98,7 @@ test/rails/database.yml
89
98
  test/rails/fixtures/locations.yml
90
99
  test/rails/fixtures/notes.yml
91
100
  test/rails/fixtures/projects.yml
101
+ test/rails/fixtures/simple_properties.yml
92
102
  test/rails/fixtures/tasks.yml
93
103
  test/rails/fixtures/users.yml
94
104
  test/rails/helpers/controllers.log
@@ -100,6 +110,7 @@ test/rails/model.yml
100
110
  test/rails/models/location.rb
101
111
  test/rails/models/note.rb
102
112
  test/rails/models/project.rb
113
+ test/rails/models/simple_property.rb
103
114
  test/rails/models/task.rb
104
115
  test/rails/models/user.rb
105
116
  test/rails/playing_around_in_a_console.txt
@@ -107,10 +118,8 @@ test/rails/schema.rb
107
118
  test/rails/test.sqlite3
108
119
  test/rails/test.swf
109
120
  test/rails/test_active_foo.rb
110
- test/rails/test_helper.rb
111
- test/rails/test_ruboss4ruby.rb
112
121
  test/rails/test_ruboss_rails_integration_functional.rb
113
- test/rails/test_swfobject_helper.rb
114
- test/rails/to_fxml_test.rb
122
+ test/rails/test_to_fxml.rb
123
+ test/rails/test_to_json.rb
115
124
  test/rails/views/notes/empty_params_action.html.erb
116
125
  test/rails/views/notes/index.html.erb
data/README.rdoc CHANGED
@@ -1,23 +1,25 @@
1
1
  = ruboss4ruby
2
2
 
3
- * FIX (url)
3
+ http://github.com/dima/ruboss4ruby/wikis
4
4
 
5
5
  == DESCRIPTION:
6
6
 
7
- FIX (describe your package)
7
+ Ruboss Framework Code Generation Engine / Rails 2.1+ and Merb 1.0 Integration Support
8
8
 
9
- == FEATURES/PROBLEMS:
10
-
11
- * FIX (list of features or problems)
9
+ == REQUIREMENTS:
12
10
 
13
- == SYNOPSIS:
11
+ The following gems are required to run Ruboss code generators:
14
12
 
15
- FIX (code sample of usage)
13
+ * RubiGen (rubigen)
14
+ * ActiveSupport (activesupport)
15
+ * Mr Bones (bones)
16
16
 
17
- == REQUIREMENTS:
17
+ If you are running a server the following configurations are known to work:
18
18
 
19
- * FIX (list of requirements)
19
+ * Rails 2.1+
20
+ * Merb 1.0+
21
+ * Sinatra
20
22
 
21
23
  == INSTALL:
22
24
 
23
- * FIX (sudo gem install, anything else)
25
+ sudo gem install dima-ruboss4ruby -s http://gems.github.com
data/Rakefile ADDED
@@ -0,0 +1,37 @@
1
+ # Look in the tasks/setup.rb file for the various options that can be
2
+ # configured in this Rakefile. The .rake files in the tasks directory
3
+ # are where the options are used.
4
+
5
+ begin
6
+ require 'bones'
7
+ Bones.setup
8
+ rescue LoadError
9
+ load 'tasks/setup.rb'
10
+ end
11
+
12
+ ensure_in_path 'lib'
13
+ require 'ruboss4ruby'
14
+
15
+ depend_on 'rubigen'
16
+ depend_on 'activesupport'
17
+
18
+ task :default => 'spec:run'
19
+
20
+ PROJ.name = 'ruboss4ruby'
21
+ PROJ.summary = 'Ruboss Framework Code Generation Engine / Rails 2.1+ and Merb 1.0 Integration Support'
22
+ PROJ.authors = 'Dima Berastau'
23
+ PROJ.email = 'dima@ruboss.com'
24
+ PROJ.url = 'http://github.com/dima/ruboss4ruby/wikis'
25
+ PROJ.version = Ruboss4Ruby::VERSION
26
+
27
+ PROJ.executables = ['bin/ruboss-gen']
28
+
29
+ PROJ.readme_file = 'README.rdoc'
30
+ PROJ.rubyforge.name = 'ruboss4ruby'
31
+
32
+ PROJ.exclude << %w(.DS_Store .gitignore)
33
+
34
+ PROJ.spec.opts << '--color'
35
+ PROJ.test.opts << '-W1'
36
+
37
+ # EOF
@@ -0,0 +1,13 @@
1
+ Description:
2
+ Generates the primary Ruboss directory structure, sets up Flex Builder
3
+ specific descriptor files
4
+
5
+ You can generate Flex Builder configuration for either *pure* Flex
6
+ project or an AIR project. To generate AIR configuration pass the -a
7
+ (--air) option to the generator.
8
+
9
+ Examples:
10
+ `ruboss-gen pomodo` # generates project structure and a
11
+ # default Flex app configuration.
12
+ `ruboss-gen -a pomodo` # as above but generates an AIR app
13
+ # and configuration
@@ -0,0 +1,88 @@
1
+ class RubossAppGenerator < RubiGen::Base
2
+ include Ruboss4Ruby::Configuration
3
+
4
+ attr_reader :project_name,
5
+ :flex_project_name,
6
+ :base_package,
7
+ :base_folder,
8
+ :command_controller_name,
9
+ :component_names,
10
+ :application_tag,
11
+ :use_air
12
+
13
+ def initialize(runtime_args, runtime_options = {})
14
+ super
15
+ usage if args.empty?
16
+ @destination_root = File.expand_path(args.shift)
17
+ @project_name, @flex_project_name, @command_controller_name, @base_package, @base_folder = extract_names(base_name)
18
+
19
+ @use_air = options[:air_config]
20
+ if @use_air
21
+ @application_tag = 'WindowedApplication'
22
+ else
23
+ @application_tag = 'Application'
24
+ end
25
+
26
+ @component_names = []
27
+ end
28
+
29
+ def manifest
30
+ record do |m|
31
+ m.directory ''
32
+
33
+ %w(script lib db bin-debug).each { |dir| m.directory dir }
34
+
35
+ m.file 'default_tasks.rake', 'Rakefile' unless File.exist?('Rakefile')
36
+ m.file 'flex.properties', '.flexProperties'
37
+ m.file 'generate.rb', 'script/generate', { :chmod => 0755 }
38
+ if @use_air
39
+ m.template 'actionscriptair.properties', '.actionScriptProperties'
40
+ m.template 'projectair.properties', '.project'
41
+ else
42
+ m.template 'actionscript.properties', '.actionScriptProperties'
43
+ m.template 'project.properties', '.project'
44
+
45
+ m.directory 'html-template/history'
46
+ %w(index.template.html AC_OETags.js playerProductInstall.swf).each do |file|
47
+ m.file "html-template/#{file}", "html-template/#{file}"
48
+ end
49
+
50
+ %w(history.css history.js historyFrame.html).each do |file|
51
+ m.file "html-template/history/#{file}", "html-template/history/#{file}"
52
+ end
53
+
54
+ m.directory 'public/javascripts'
55
+ m.file 'swfobject.js', 'public/javascripts/swfobject.js'
56
+ m.file 'expressInstall.swf', 'public/expressInstall.swf'
57
+ m.template 'index.html.erb', 'public/index.html'
58
+ end
59
+
60
+ %w(components controllers commands models events).each do |dir|
61
+ m.directory "app/flex/#{base_folder}/#{dir}"
62
+ end
63
+
64
+ m.directory "app/flex/#{base_folder}/components/generated"
65
+
66
+ m.template 'project-textmate.erb', "#{project_name.underscore}.tmproj"
67
+ m.template 'mainapp.mxml', File.join('app', 'flex', "#{project_name}.mxml")
68
+ m.template 'mainapp-config.xml', File.join('app', 'flex', "#{project_name}-config.xml")
69
+ m.template 'mainair-app.xml', File.join('app', 'flex', "#{project_name}-app.xml") if @use_air
70
+ end
71
+ end
72
+
73
+ protected
74
+ def add_options!(opt)
75
+ opt.separator ''
76
+ opt.separator 'Options:'
77
+ opt.on("-a", "--air", "Configure AIR project instead of Flex. Flex is default.",
78
+ "Default: false") { |v| options[:air_config] = v }
79
+ end
80
+
81
+ def banner
82
+ <<-EOS
83
+ Creates the skeleton for a new Ruboss app
84
+
85
+ USAGE: #{spec.name} (-a) app_name
86
+ EOS
87
+ end
88
+ end
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <actionScriptProperties mainApplicationPath="<%= project_name %>.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="public/bin" rootURL="http://localhost:4000/bin" sourceFolderPath="app/flex" strict="true" useApolloConfig="false" verifyDigests="true" warn="true">
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="public/bin" rootURL="http://localhost:3000/bin" sourceFolderPath="app/flex" strict="true" useApolloConfig="false" verifyDigests="true" warn="true">
4
4
  <compilerSourcePath/>
5
5
  <libraryPath defaultLinkType="1">
6
6
  <libraryPathEntry kind="4" path=""/>
@@ -0,0 +1,51 @@
1
+ require 'rubygems'
2
+ require 'ruboss4ruby/tasks'
3
+
4
+ TEST_APP_NAME = 'TestApp.mxml'
5
+
6
+ namespace :air do
7
+ desc "Build and run the AIR application"
8
+ task :run => ["ruboss:air:build", "ruboss:air:run"]
9
+ end
10
+
11
+ namespace :flex do
12
+ desc "Test flex application"
13
+ task :test => ["ruboss:test:build", "ruboss:test:run"]
14
+
15
+ desc "Build flex application"
16
+ task :build do
17
+ libs = [] # < '/Users/Dima/Projects/ruboss/ruboss_framework/framework/bin/ruboss.swc'
18
+ compile_app(get_executable('mxmlc'), 'bin-debug', "-library-path+=#{libs.join(',')}")
19
+ end
20
+ end
21
+
22
+ namespace :ruboss do
23
+ namespace :test do
24
+ desc "Build flex test swf file"
25
+ task :build do
26
+ project_path = File.join(APP_ROOT, "app/flex", TEST_APP_NAME)
27
+
28
+ libs = Dir.glob(File.join(APP_ROOT, 'lib', '*.swc'))
29
+ #libs << '/Users/Dima/Projects/ruboss/ruboss_framework/framework/bin/ruboss.swc'
30
+
31
+ target_project_path = File.join(APP_ROOT, "bin-debug", TEST_APP_NAME.sub(/.mxml$/, '.swf'))
32
+
33
+ cmd = "#{get_executable('mxmlc')} +configname=air -library-path+=#{libs.join(',')} " <<
34
+ "-output #{target_project_path} -debug=true #{project_path}"
35
+
36
+ if !system("#{cmd}")
37
+ puts "failed to compile test application"
38
+ end
39
+ end
40
+
41
+ desc "Run flex test application"
42
+ task :run do
43
+ project_path = File.join(APP_ROOT, "app/flex", TEST_APP_NAME)
44
+ target_project_air_descriptor = project_path.sub(/.mxml$/, '-app.xml')
45
+
46
+ if !system("#{get_executable('adl')} #{target_project_air_descriptor} #{APP_ROOT}")
47
+ puts "failed to run test application"
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.join(File.dirname(__FILE__), '..')
3
+
4
+ begin
5
+ require 'rubigen'
6
+ rescue LoadError
7
+ require 'rubygems'
8
+ require 'rubigen'
9
+ end
10
+ require 'rubigen/scripts/generate'
11
+ require 'activesupport'
12
+ require 'ruboss4ruby'
13
+
14
+ ARGV.shift if ['--help', '-h'].include?(ARGV[0])
15
+ source = RubiGen::PathSource.new(:component,
16
+ File.join(File.expand_path('ruboss4ruby'), "generators"))
17
+
18
+ RubiGen::Base.use_component_sources!
19
+ RubiGen::Base.append_sources source
20
+
21
+ RubiGen::Scripts::Generate.new.run(ARGV)
@@ -2,9 +2,9 @@
2
2
  <head>
3
3
  <title><%= project_name %></title>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
5
- <script type="text/javascript" src="/javascripts/swfobject.js"></script>
5
+ <script type="text/javascript" src="javascripts/swfobject.js"></script>
6
6
  <script type="text/javascript">
7
- swfobject.embedSWF("/bin/<%= project_name %>.swf", "mainApp", "100%", "100%", "9.0.0", "expressInstall.swf");
7
+ swfobject.embedSWF("bin/<%= project_name %>.swf", "mainApp", "100%", "100%", "9.0.0", "expressInstall.swf");
8
8
  </script>
9
9
  <style>
10
10
  body { margin: 0px; overflow: hidden; }
@@ -58,12 +58,12 @@
58
58
 
59
59
  <!-- Whether the user can resize the window. Optional. Default true. -->
60
60
  <!-- <resizable></resizable> -->
61
-
61
+
62
62
  <!-- The window's initial width. Optional. -->
63
- <!-- <width></width> -->
63
+ <width>800</width>
64
64
 
65
65
  <!-- The window's initial height. Optional. -->
66
- <!-- <height></height> -->
66
+ <height>600</height>
67
67
 
68
68
  <!-- The window's initial x position. Optional. -->
69
69
  <!-- <x></x> -->
@@ -0,0 +1,21 @@
1
+ <flex-config>
2
+ <benchmark>false</benchmark>
3
+ <default-background-color>#FFFFFF</default-background-color>
4
+ <compiler>
5
+ <incremental>false</incremental>
6
+ <keep-as3-metadata append="true">
7
+ <name>Resource</name>
8
+ <name>HasOne</name>
9
+ <name>HasMany</name>
10
+ <name>BelongsTo</name>
11
+ <name>DateTime</name>
12
+ <name>Lazy</name>
13
+ <name>Ignored</name>
14
+ </keep-as3-metadata>
15
+ <optimize>true</optimize>
16
+ <keep-generated-actionscript>false</keep-generated-actionscript>
17
+ <warn-no-constructor>false</warn-no-constructor>
18
+ <warn-no-explicit-super-call-in-constructor>false</warn-no-explicit-super-call-in-constructor>
19
+ <debug>false</debug>
20
+ </compiler>
21
+ </flex-config>
@@ -1,19 +1,18 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <mx:<%= application_tag %> xmlns:mx="http://www.adobe.com/2006/mxml"
3
3
  xmlns:generated="<%= base_package %>.components.generated.*"
4
- layout="vertical"
5
- styleName="plain"
6
- initialize="init()">
4
+ paddingBottom="8" paddingLeft="8" paddingRight="8" paddingTop="8"
5
+ layout="horizontal" styleName="plain" initialize="init()">
7
6
  <mx:Script>
8
7
  <![CDATA[
9
- <% if get_option(:air) -%>
8
+ <% if use_air -%>
10
9
  import org.ruboss.services.air.AIRServiceProvider;
11
10
  <% end -%>
12
- import org.ruboss.Ruboss;
11
+ import org.ruboss.Ruboss;
13
12
  import <%= base_package %>.controllers.<%= command_controller_name %>;
14
13
 
15
14
  private function init():void {
16
- <% if get_option(:air) -%>
15
+ <% if use_air -%>
17
16
  <%= command_controller_name %>.initialize([AIRServiceProvider], AIRServiceProvider.ID, "<%= base_package %>");
18
17
  <% else -%>
19
18
  <%= command_controller_name %>.initialize();
@@ -21,9 +20,7 @@
21
20
  }
22
21
  ]]>
23
22
  </mx:Script>
24
- <mx:ApplicationControlBar dock="true" width="100%">
25
- <mx:LinkBar dataProvider="{mainViewStack}"/>
26
- </mx:ApplicationControlBar>
23
+ <mx:LinkBar dataProvider="{mainViewStack}" direction="vertical" borderStyle="solid" backgroundColor="#EEEEEE"/>
27
24
  <mx:ViewStack id="mainViewStack" width="100%" height="100%">
28
25
  <!-- For a simple demo, put all the components here. -->
29
26
  <% for component in component_names -%>
@@ -0,0 +1,52 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>currentDocument</key>
6
+ <string>app/flex/<%= project_name %>.mxml</string>
7
+ <key>documents</key>
8
+ <array>
9
+ <dict>
10
+ <key>expanded</key>
11
+ <true/>
12
+ <key>name</key>
13
+ <string><%= project_name.underscore %></string>
14
+ <key>regexFolderFilter</key>
15
+ <string>!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$</string>
16
+ <key>sourceDirectory</key>
17
+ <string></string>
18
+ </dict>
19
+ </array>
20
+ <key>fileHierarchyDrawerWidth</key>
21
+ <integer>299</integer>
22
+ <key>metaData</key>
23
+ <dict/>
24
+ <key>openDocuments</key>
25
+ <array>
26
+ <string>app/flex/<%= project_name %>.mxml</string>
27
+ </array>
28
+ <key>shellVariables</key>
29
+ <array>
30
+ <dict>
31
+ <key>enabled</key>
32
+ <true/>
33
+ <key>value</key>
34
+ <string>app/flex/<%= project_name %>.mxml</string>
35
+ <key>variable</key>
36
+ <string>TM_FLEX_FILE_SPECS</string>
37
+ </dict>
38
+ <dict>
39
+ <key>enabled</key>
40
+ <true/>
41
+ <key>value</key>
42
+ <string>public/bin/<%= project_name %>.swf</string>
43
+ <key>variable</key>
44
+ <string>TM_FLEX_OUTPUT</string>
45
+ </dict>
46
+ </array>
47
+ <key>showFileHierarchyDrawer</key>
48
+ <false/>
49
+ <key>windowFrame</key>
50
+ <string>{{5, 15}, {1073, 860}}</string>
51
+ </dict>
52
+ </plist>
data/bin/ruboss-gen ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require 'rubigen'
5
+ require File.join(File.dirname(__FILE__), '..', 'lib', 'ruboss4ruby')
6
+
7
+ if %w(-v --version).include? ARGV.first
8
+ puts "#{File.basename($0)} #{Ruboss4Ruby::VERSION}"
9
+ exit(0)
10
+ end
11
+
12
+ require 'rubigen/scripts/generate'
13
+ source = RubiGen::PathSource.new(:application,
14
+ File.join(File.dirname(__FILE__), "../app_generators"))
15
+ RubiGen::Base.reset_sources
16
+ RubiGen::Base.append_sources source
17
+ RubiGen::Scripts::Generate.new.run(ARGV, :generator => 'ruboss_app')
@@ -0,0 +1,5 @@
1
+ Description:
2
+ Fetches the latest published Ruboss Framework SWC file.
3
+
4
+ Examples:
5
+ `./script/generate ruboss_config`
@@ -0,0 +1,24 @@
1
+ require 'open-uri'
2
+
3
+ class RubossConfigGenerator < RubiGen::Base
4
+ include Ruboss4Ruby::Configuration
5
+
6
+ def manifest
7
+ record do |m|
8
+ framework_release = Ruboss4Ruby::RUBOSS_FRAMEWORK_VERSION
9
+ framework_distribution_url = "http://ruboss.com/releases/ruboss-#{framework_release}.swc"
10
+ framework_destination_file = "lib/ruboss-#{framework_release}.swc"
11
+
12
+ if !options[:skip_framework] && !File.exist?(framework_destination_file)
13
+ puts "fetching #{framework_release} framework binary from: #{framework_distribution_url} ..."
14
+ open(framework_destination_file, "wb").write(open(framework_distribution_url).read)
15
+ puts "done. saved to #{framework_destination_file}"
16
+ end
17
+ end
18
+ end
19
+
20
+ protected
21
+ def banner
22
+ "Usage: #{$0} #{spec.name}"
23
+ end
24
+ end
@@ -0,0 +1,10 @@
1
+ Description:
2
+ Generates/updates the main Flex application controller, typically
3
+ app/flex/<yourappname>/controllers/ApplicationController.as
4
+
5
+ It pulls out all available models and commands from respective
6
+ folders and makes sure they'll be pulled into the Flex application
7
+ at runtime. Doesn't require any arguments or options.
8
+
9
+ Examples:
10
+ `./script/generate ruboss_controller`