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 (155) hide show
  1. data/History.txt +2 -2
  2. data/Manifest.txt +86 -79
  3. data/README.rdoc +53 -0
  4. data/Rakefile +42 -5
  5. data/app_generators/ruboss_app/USAGE +22 -0
  6. data/app_generators/ruboss_app/ruboss_app_generator.rb +94 -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/app.yaml.erb +12 -0
  10. data/app_generators/ruboss_app/templates/default_tasks.rake +51 -0
  11. data/app_generators/ruboss_app/templates/empty.txt +0 -0
  12. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/expressInstall.swf +0 -0
  13. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/flex.properties +0 -0
  14. data/app_generators/ruboss_app/templates/generate.rb +17 -0
  15. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/html-template/AC_OETags.js +0 -0
  16. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/html-template/history/history.css +0 -0
  17. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/html-template/history/history.js +0 -0
  18. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/html-template/history/historyFrame.html +0 -0
  19. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/html-template/index.template.html +0 -0
  20. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/html-template/playerProductInstall.swf +0 -0
  21. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/index.html.erb +2 -2
  22. data/app_generators/ruboss_app/templates/index.yaml +11 -0
  23. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/mainair-app.xml +3 -3
  24. data/app_generators/ruboss_app/templates/mainapp-config.xml +21 -0
  25. data/{merb_generators/templates/ruboss_flex_app → app_generators/ruboss_app/templates}/mainapp.mxml +6 -9
  26. data/app_generators/ruboss_app/templates/project-textmate.erb +52 -0
  27. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/project.properties +0 -0
  28. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/projectair.properties +0 -0
  29. data/{merb_generators/templates/ruboss_config → app_generators/ruboss_app/templates}/swfobject.js +0 -0
  30. data/bin/ruboss-gen +31 -0
  31. data/generators/ruboss_config/USAGE +5 -0
  32. data/generators/ruboss_config/ruboss_config_generator.rb +19 -0
  33. data/generators/ruboss_controller/USAGE +10 -0
  34. data/generators/ruboss_controller/ruboss_controller_generator.rb +38 -0
  35. data/generators/ruboss_controller/templates/assist.py +65 -0
  36. data/{merb_generators/templates/ruboss_controller → generators/ruboss_controller/templates}/controller.as.erb +7 -6
  37. data/generators/ruboss_controller/templates/restful.py +136 -0
  38. data/generators/ruboss_main_app/USAGE +8 -0
  39. data/generators/ruboss_main_app/ruboss_main_app_generator.rb +60 -0
  40. data/generators/ruboss_main_app/templates/main.py.erb +29 -0
  41. data/generators/ruboss_main_app/templates/mainapp.mxml +35 -0
  42. data/generators/ruboss_scaffold/USAGE +29 -0
  43. data/generators/ruboss_scaffold/ruboss_scaffold_generator.rb +148 -0
  44. data/generators/ruboss_scaffold/templates/component.mxml.erb +149 -0
  45. data/generators/ruboss_scaffold/templates/controller.py.erb +27 -0
  46. data/generators/ruboss_scaffold/templates/model.as.erb +42 -0
  47. data/generators/ruboss_scaffold/templates/model.py.erb +14 -0
  48. data/generators/ruboss_yaml_scaffold/USAGE +45 -0
  49. data/generators/ruboss_yaml_scaffold/ruboss_yaml_scaffold_generator.rb +47 -0
  50. data/lib/ruboss4ruby/active_foo.rb +109 -86
  51. data/lib/ruboss4ruby/active_record_default_methods.rb +66 -0
  52. data/lib/ruboss4ruby/active_record_tasks.rb +10 -4
  53. data/lib/ruboss4ruby/configuration.rb +48 -34
  54. data/lib/ruboss4ruby/datamapper_foo.rb +31 -0
  55. data/lib/ruboss4ruby/{recipes.rb → rails/recipes.rb} +7 -9
  56. data/lib/ruboss4ruby/{ruboss_helper.rb → rails/swf_helper.rb} +14 -8
  57. data/lib/ruboss4ruby/tasks.rb +9 -4
  58. data/lib/ruboss4ruby.rb +72 -27
  59. data/rails_generators/ruboss_config/ruboss_config_generator.rb +3 -15
  60. data/rails_generators/ruboss_config/templates/mainair-app.xml +2 -2
  61. data/rails_generators/ruboss_config/templates/mainapp-config.xml +1 -1
  62. data/rails_generators/ruboss_config/templates/ruboss.yml +2 -4
  63. data/rails_generators/ruboss_config/templates/ruboss_tasks.rake +5 -15
  64. data/rails_generators/ruboss_controller/USAGE +1 -2
  65. data/rails_generators/ruboss_controller/ruboss_controller_generator.rb +3 -14
  66. data/rails_generators/ruboss_controller/templates/controller.as.erb +11 -6
  67. data/rails_generators/ruboss_scaffold/ruboss_scaffold_generator.rb +67 -76
  68. data/rails_generators/ruboss_scaffold/templates/component.mxml.erb +69 -69
  69. data/rails_generators/ruboss_scaffold/templates/model.as.erb +2 -2
  70. data/rails_generators/ruboss_yaml_scaffold/USAGE +38 -1
  71. data/rcl-1.0.txt +0 -0
  72. data/rdoc/generators/template/html/jamis.rb +588 -0
  73. data/ruboss4ruby.gemspec +43 -0
  74. data/spec/ruboss4ruby_spec.rb +7 -0
  75. data/spec/spec_helper.rb +16 -0
  76. data/tasks/ann.rake +80 -0
  77. data/tasks/bones.rake +20 -0
  78. data/tasks/gem.rake +201 -0
  79. data/tasks/git.rake +40 -0
  80. data/tasks/manifest.rake +48 -0
  81. data/tasks/notes.rake +27 -0
  82. data/tasks/post_load.rake +39 -0
  83. data/tasks/rdoc.rake +50 -0
  84. data/tasks/rubyforge.rake +55 -0
  85. data/tasks/setup.rb +279 -0
  86. data/tasks/spec.rake +54 -0
  87. data/tasks/svn.rake +47 -0
  88. data/tasks/test.rake +40 -0
  89. data/test/{controllers → rails/controllers}/application.rb +0 -0
  90. data/test/{controllers → rails/controllers}/locations_controller.rb +0 -0
  91. data/test/{controllers → rails/controllers}/notes_controller.rb +0 -0
  92. data/test/{controllers → rails/controllers}/projects_controller.rb +0 -0
  93. data/test/{controllers → rails/controllers}/tasks_controller.rb +0 -0
  94. data/test/{controllers → rails/controllers}/users_controller.rb +0 -0
  95. data/test/{database.yml → rails/database.yml} +0 -0
  96. data/test/{fixtures → rails/fixtures}/locations.yml +0 -0
  97. data/test/{fixtures → rails/fixtures}/notes.yml +0 -0
  98. data/test/{fixtures → rails/fixtures}/projects.yml +0 -0
  99. data/test/rails/fixtures/simple_properties.yml +19 -0
  100. data/test/{fixtures → rails/fixtures}/tasks.yml +0 -0
  101. data/test/{fixtures → rails/fixtures}/users.yml +0 -0
  102. data/test/{helpers → rails/helpers}/functional_test_helper.rb +0 -11
  103. data/test/rails/helpers/test_helper.rb +61 -0
  104. data/test/rails/helpers/unit_test_helper.rb +30 -0
  105. data/test/{model.yml → rails/model.yml} +0 -0
  106. data/test/{models → rails/models}/location.rb +0 -0
  107. data/test/{models → rails/models}/note.rb +0 -0
  108. data/test/{models → rails/models}/project.rb +1 -3
  109. data/test/rails/models/simple_property.rb +2 -0
  110. data/test/{models → rails/models}/task.rb +1 -1
  111. data/test/{models → rails/models}/user.rb +1 -2
  112. data/test/{playing_around_in_a_console.txt → rails/playing_around_in_a_console.txt} +0 -0
  113. data/test/{schema.rb → rails/schema.rb} +14 -0
  114. data/test/{test.swf → rails/test.swf} +0 -0
  115. data/test/rails/test_active_foo.rb +81 -0
  116. data/test/{test_ruboss_rails_integration_functional.rb → rails/test_ruboss_rails_integration_functional.rb} +4 -9
  117. data/test/{to_fxml_test.rb → rails/test_to_fxml.rb} +35 -37
  118. data/test/rails/test_to_json.rb +23 -0
  119. data/test/{views → rails/views}/notes/empty_params_action.html.erb +0 -0
  120. data/test/{views → rails/views}/notes/index.html.erb +0 -0
  121. metadata +138 -103
  122. data/Generators +0 -5
  123. data/README.txt +0 -37
  124. data/config/hoe.rb +0 -72
  125. data/config/requirements.rb +0 -15
  126. data/lib/ruboss4ruby/generated_attribute.rb +0 -61
  127. data/lib/ruboss4ruby/ruboss_test_helpers.rb +0 -31
  128. data/lib/ruboss4ruby/version.rb +0 -11
  129. data/merb_generators/ruboss_config.rb +0 -105
  130. data/merb_generators/ruboss_controller.rb +0 -61
  131. data/merb_generators/ruboss_flex_app.rb +0 -69
  132. data/merb_generators/ruboss_resource_controller.rb +0 -4
  133. data/merb_generators/ruboss_scaffold.rb +0 -158
  134. data/merb_generators/templates/ruboss_config/ruboss.yml +0 -16
  135. data/merb_generators/templates/ruboss_resource_controller/controller.rb.erb +0 -49
  136. data/script/console +0 -10
  137. data/script/destroy +0 -14
  138. data/script/generate +0 -14
  139. data/script/txt2html +0 -82
  140. data/setup.rb +0 -1585
  141. data/tasks/deployment.rake +0 -34
  142. data/tasks/environment.rake +0 -7
  143. data/tasks/website.rake +0 -17
  144. data/test/helpers/controllers.log +0 -8
  145. data/test/helpers/models.log +0 -170
  146. data/test/helpers/test_helper.rb +0 -25
  147. data/test/helpers/unit_test_helper.rb +0 -23
  148. data/test/test.sqlite3 +0 -0
  149. data/test/test_active_foo.rb +0 -79
  150. data/test/test_swfobject_helper.rb +0 -63
  151. data/website/index.html +0 -63
  152. data/website/index.txt +0 -34
  153. data/website/javascripts/rounded_corners_lite.inc.js +0 -285
  154. data/website/stylesheets/screen.css +0 -138
  155. data/website/template.html.erb +0 -47
data/History.txt CHANGED
@@ -1,3 +1,3 @@
1
- === 1.0.0 / 2008-07-10
1
+ == 1.1.0 / 2008-12-13
2
2
 
3
- * 1 major enhancement
3
+ * 1 major enhancement
data/Manifest.txt CHANGED
@@ -1,45 +1,62 @@
1
- Generators
2
1
  History.txt
3
2
  Manifest.txt
4
- README.txt
3
+ README.rdoc
5
4
  Rakefile
6
- config/hoe.rb
7
- config/requirements.rb
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/app.yaml.erb
10
+ app_generators/ruboss_app/templates/default_tasks.rake
11
+ app_generators/ruboss_app/templates/empty.txt
12
+ app_generators/ruboss_app/templates/expressInstall.swf
13
+ app_generators/ruboss_app/templates/flex.properties
14
+ app_generators/ruboss_app/templates/generate.rb
15
+ app_generators/ruboss_app/templates/html-template/AC_OETags.js
16
+ app_generators/ruboss_app/templates/html-template/history/history.css
17
+ app_generators/ruboss_app/templates/html-template/history/history.js
18
+ app_generators/ruboss_app/templates/html-template/history/historyFrame.html
19
+ app_generators/ruboss_app/templates/html-template/index.template.html
20
+ app_generators/ruboss_app/templates/html-template/playerProductInstall.swf
21
+ app_generators/ruboss_app/templates/index.html.erb
22
+ app_generators/ruboss_app/templates/index.yaml
23
+ app_generators/ruboss_app/templates/mainair-app.xml
24
+ app_generators/ruboss_app/templates/mainapp-config.xml
25
+ app_generators/ruboss_app/templates/mainapp.mxml
26
+ app_generators/ruboss_app/templates/project-textmate.erb
27
+ app_generators/ruboss_app/templates/project.properties
28
+ app_generators/ruboss_app/templates/projectair.properties
29
+ app_generators/ruboss_app/templates/swfobject.js
30
+ bin/ruboss-gen
31
+ generators/ruboss_config/USAGE
32
+ generators/ruboss_config/ruboss_config_generator.rb
33
+ generators/ruboss_controller/USAGE
34
+ generators/ruboss_controller/ruboss_controller_generator.rb
35
+ generators/ruboss_controller/templates/assist.py
36
+ generators/ruboss_controller/templates/controller.as.erb
37
+ generators/ruboss_controller/templates/restful.py
38
+ generators/ruboss_main_app/USAGE
39
+ generators/ruboss_main_app/ruboss_main_app_generator.rb
40
+ generators/ruboss_main_app/templates/main.py.erb
41
+ generators/ruboss_main_app/templates/mainapp.mxml
42
+ generators/ruboss_scaffold/USAGE
43
+ generators/ruboss_scaffold/ruboss_scaffold_generator.rb
44
+ generators/ruboss_scaffold/templates/component.mxml.erb
45
+ generators/ruboss_scaffold/templates/controller.py.erb
46
+ generators/ruboss_scaffold/templates/model.as.erb
47
+ generators/ruboss_scaffold/templates/model.py.erb
48
+ generators/ruboss_yaml_scaffold/USAGE
49
+ generators/ruboss_yaml_scaffold/ruboss_yaml_scaffold_generator.rb
8
50
  gpl-3.0.txt
9
51
  lib/ruboss4ruby.rb
10
52
  lib/ruboss4ruby/active_foo.rb
53
+ lib/ruboss4ruby/active_record_default_methods.rb
11
54
  lib/ruboss4ruby/active_record_tasks.rb
12
55
  lib/ruboss4ruby/configuration.rb
13
- lib/ruboss4ruby/generated_attribute.rb
14
- lib/ruboss4ruby/recipes.rb
15
- lib/ruboss4ruby/ruboss_helper.rb
16
- lib/ruboss4ruby/ruboss_test_helpers.rb
56
+ lib/ruboss4ruby/datamapper_foo.rb
57
+ lib/ruboss4ruby/rails/recipes.rb
58
+ lib/ruboss4ruby/rails/swf_helper.rb
17
59
  lib/ruboss4ruby/tasks.rb
18
- lib/ruboss4ruby/version.rb
19
- merb_generators/ruboss_config.rb
20
- merb_generators/ruboss_controller.rb
21
- merb_generators/ruboss_flex_app.rb
22
- merb_generators/ruboss_resource_controller.rb
23
- merb_generators/ruboss_scaffold.rb
24
- merb_generators/templates/ruboss_config/actionscript.properties
25
- merb_generators/templates/ruboss_config/actionscriptair.properties
26
- merb_generators/templates/ruboss_config/expressInstall.swf
27
- merb_generators/templates/ruboss_config/flex.properties
28
- merb_generators/templates/ruboss_config/html-template/AC_OETags.js
29
- merb_generators/templates/ruboss_config/html-template/history/history.css
30
- merb_generators/templates/ruboss_config/html-template/history/history.js
31
- merb_generators/templates/ruboss_config/html-template/history/historyFrame.html
32
- merb_generators/templates/ruboss_config/html-template/index.template.html
33
- merb_generators/templates/ruboss_config/html-template/playerProductInstall.swf
34
- merb_generators/templates/ruboss_config/index.html.erb
35
- merb_generators/templates/ruboss_config/mainair-app.xml
36
- merb_generators/templates/ruboss_config/project.properties
37
- merb_generators/templates/ruboss_config/projectair.properties
38
- merb_generators/templates/ruboss_config/ruboss.yml
39
- merb_generators/templates/ruboss_config/swfobject.js
40
- merb_generators/templates/ruboss_controller/controller.as.erb
41
- merb_generators/templates/ruboss_flex_app/mainapp.mxml
42
- merb_generators/templates/ruboss_resource_controller/controller.rb.erb
43
60
  rails_generators/ruboss_config/USAGE
44
61
  rails_generators/ruboss_config/ruboss_config_generator.rb
45
62
  rails_generators/ruboss_config/templates/actionscript.properties
@@ -76,49 +93,39 @@ rails_generators/ruboss_scaffold/templates/model.rb.erb
76
93
  rails_generators/ruboss_yaml_scaffold/USAGE
77
94
  rails_generators/ruboss_yaml_scaffold/ruboss_yaml_scaffold_generator.rb
78
95
  rcl-1.0.txt
79
- script/console
80
- script/destroy
81
- script/generate
82
- script/txt2html
83
- setup.rb
84
- tasks/deployment.rake
85
- tasks/environment.rake
86
- tasks/website.rake
87
- test/controllers/application.rb
88
- test/controllers/locations_controller.rb
89
- test/controllers/notes_controller.rb
90
- test/controllers/projects_controller.rb
91
- test/controllers/tasks_controller.rb
92
- test/controllers/users_controller.rb
93
- test/database.yml
94
- test/fixtures/locations.yml
95
- test/fixtures/notes.yml
96
- test/fixtures/projects.yml
97
- test/fixtures/tasks.yml
98
- test/fixtures/users.yml
99
- test/helpers/controllers.log
100
- test/helpers/functional_test_helper.rb
101
- test/helpers/models.log
102
- test/helpers/test_helper.rb
103
- test/helpers/unit_test_helper.rb
104
- test/model.yml
105
- test/models/location.rb
106
- test/models/note.rb
107
- test/models/project.rb
108
- test/models/task.rb
109
- test/models/user.rb
110
- test/playing_around_in_a_console.txt
111
- test/schema.rb
112
- test/test.sqlite3
113
- test/test.swf
114
- test/test_active_foo.rb
115
- test/test_ruboss_rails_integration_functional.rb
116
- test/test_swfobject_helper.rb
117
- test/to_fxml_test.rb
118
- test/views/notes/empty_params_action.html.erb
119
- test/views/notes/index.html.erb
120
- website/index.html
121
- website/index.txt
122
- website/javascripts/rounded_corners_lite.inc.js
123
- website/stylesheets/screen.css
124
- website/template.html.erb
96
+ rdoc/generators/template/html/jamis.rb
97
+ ruboss4ruby.gemspec
98
+ spec/ruboss4ruby_spec.rb
99
+ spec/spec_helper.rb
100
+ test/rails/controllers/application.rb
101
+ test/rails/controllers/locations_controller.rb
102
+ test/rails/controllers/notes_controller.rb
103
+ test/rails/controllers/projects_controller.rb
104
+ test/rails/controllers/tasks_controller.rb
105
+ test/rails/controllers/users_controller.rb
106
+ test/rails/database.yml
107
+ test/rails/fixtures/locations.yml
108
+ test/rails/fixtures/notes.yml
109
+ test/rails/fixtures/projects.yml
110
+ test/rails/fixtures/simple_properties.yml
111
+ test/rails/fixtures/tasks.yml
112
+ test/rails/fixtures/users.yml
113
+ test/rails/helpers/functional_test_helper.rb
114
+ test/rails/helpers/test_helper.rb
115
+ test/rails/helpers/unit_test_helper.rb
116
+ test/rails/model.yml
117
+ test/rails/models/location.rb
118
+ test/rails/models/note.rb
119
+ test/rails/models/project.rb
120
+ test/rails/models/simple_property.rb
121
+ test/rails/models/task.rb
122
+ test/rails/models/user.rb
123
+ test/rails/playing_around_in_a_console.txt
124
+ test/rails/schema.rb
125
+ test/rails/test.swf
126
+ test/rails/test_active_foo.rb
127
+ test/rails/test_ruboss_rails_integration_functional.rb
128
+ test/rails/test_to_fxml.rb
129
+ test/rails/test_to_json.rb
130
+ test/rails/views/notes/empty_params_action.html.erb
131
+ test/rails/views/notes/index.html.erb
data/README.rdoc ADDED
@@ -0,0 +1,53 @@
1
+ = Ruboss Framework Ruby Toolkit
2
+
3
+ == Description
4
+
5
+ The Ruboss Framework brings the design principles and productivity of
6
+ Rails to Flex development, and makes integration with RESTful APIs as simple as possible.
7
+
8
+ Here's some of the things you can do:
9
+
10
+ * *Create* a complete _Adobe_ _Flex_ or _AIR_ application in less than 5 minutes.
11
+
12
+ Use our lightweight Ruby-based code generation toolkit to create a fully functional
13
+ CRUD application. Simply do:
14
+
15
+ sudo gem install ruboss4ruby
16
+
17
+ And then run:
18
+
19
+ ruboss-gen -h
20
+
21
+ * *Integrate* with _Ruby_ _On_ _Rails_, _Merb_ or _Sinatra_ applications
22
+ that use _ActiveRecord_, _DataMapper_, _CouchRest_, _ActiveCouch_, etc.
23
+
24
+ * *Communicate* between your Flex/AIR rich client and service providers
25
+ using either _XML_ or _JSON_.
26
+
27
+ * *Persist* your data directly in Adobe AIR's _SQLite_ database or _CouchDB_
28
+ without any additional infrastructure or intermediate servers.
29
+
30
+ * *Deploy* your Ruboss application on the Google App Engine and use Google
31
+ DataStore for persistence.
32
+
33
+ == Getting Started
34
+
35
+ For details on how to get started with the Ruboss framework refer to:
36
+
37
+ http://github.com/dima/ruboss_framework/wikis/home
38
+
39
+ http://github.com/dima/ruboss4ruby/wikis/home
40
+
41
+ == Getting Involved
42
+
43
+ Report bugs or track framework development progress:
44
+
45
+ http://ruboss.lighthouseapp.com/projects/12668-ruboss-framework/overview
46
+
47
+ Get involved with the community:
48
+
49
+ http://groups.google.com/group/ruboss-framework
50
+
51
+ == License
52
+
53
+ Copyright (c) 2008 Ruboss Technology Corporation, released under dual GPLv3 and Ruboss Commercial License
data/Rakefile CHANGED
@@ -1,5 +1,42 @@
1
- require 'config/requirements'
2
- require 'config/hoe' # setup Hoe + all gem configuration
3
-
4
- Dir['tasks/**/*.rake'].each { |rake| load rake }
5
-
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', '1.4.0'
16
+ depend_on 'activesupport', '2.0.0'
17
+
18
+ task :default => 'spec:run'
19
+
20
+ PROJ.name = 'ruboss4ruby'
21
+ PROJ.summary = 'Ruboss Framework Code Generation Engine / Rails 2.1+ 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.rdoc.opts << '-Tjamis'
30
+ PROJ.rdoc.exclude << %w(.txt)
31
+ PROJ.rdoc.main = 'README.rdoc'
32
+ PROJ.rdoc.dir = 'doc/api'
33
+
34
+ PROJ.readme_file = 'README.rdoc'
35
+ PROJ.rubyforge.name = 'ruboss4ruby'
36
+
37
+ PROJ.exclude << %w(.DS_Store .gitignore .log, .sqlite3)
38
+
39
+ PROJ.spec.opts << '--color'
40
+ PROJ.test.opts << '-W1'
41
+
42
+ # EOF
@@ -0,0 +1,22 @@
1
+ Description:
2
+ Generates the primary Ruboss project directory structure and sets
3
+ up Flex Builder and TextMate 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
+ You can also choose to generate a simple Google App Engine back-end
10
+ along with your Flex front-end by passing the --gae option.
11
+
12
+ Examples:
13
+ `ruboss-gen pomodo` # generates project structure and a
14
+ # default Flex app configuration.
15
+ `ruboss-gen -a pomodo` # as above but generates an AIR app
16
+ # and configuration
17
+ `ruboss-gen --gae pomodo` # generate Flex + GAE application
18
+ # configuration
19
+
20
+ Next Steps:
21
+ In your new Ruboss project folder run `ruby script/generate` for
22
+ a list of available generators.
@@ -0,0 +1,94 @@
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
+
18
+ @project_name, @flex_project_name, @command_controller_name,
19
+ @base_package, @base_folder = extract_names(base_name)
20
+
21
+ @use_air = options[:air_config]
22
+ if @use_air
23
+ @application_tag = 'WindowedApplication'
24
+ else
25
+ @application_tag = 'Application'
26
+ end
27
+
28
+ @component_names = []
29
+ end
30
+
31
+ def manifest
32
+ record do |m|
33
+ m.directory ''
34
+
35
+ %w(script lib db bin-debug).each { |dir| m.directory dir }
36
+
37
+ if options[:gae]
38
+ m.file 'index.yaml', 'index.yaml' unless File.exist?('index.yaml')
39
+ m.template 'app.yaml.erb', 'app.yaml' unless File.exist?('app.yaml')
40
+ m.directory 'app/controllers'
41
+ m.file 'empty.txt', 'app/__init__.py'
42
+ m.file 'empty.txt', 'app/controllers/__init__.py'
43
+ m.directory 'app/models'
44
+ m.file 'empty.txt', 'app/models/__init__.py'
45
+ end
46
+
47
+ m.file 'default_tasks.rake', 'Rakefile' unless File.exist?('Rakefile')
48
+ m.file 'flex.properties', '.flexProperties'
49
+ m.file 'generate.rb', 'script/generate', { :chmod => 0755 }
50
+ if @use_air
51
+ m.template 'actionscriptair.properties', '.actionScriptProperties'
52
+ m.template 'projectair.properties', '.project'
53
+ else
54
+ m.template 'actionscript.properties', '.actionScriptProperties'
55
+ m.template 'project.properties', '.project'
56
+
57
+ m.directory 'html-template/history'
58
+ %w(index.template.html AC_OETags.js playerProductInstall.swf).each do |file|
59
+ m.file "html-template/#{file}", "html-template/#{file}"
60
+ end
61
+
62
+ %w(history.css history.js historyFrame.html).each do |file|
63
+ m.file "html-template/history/#{file}", "html-template/history/#{file}"
64
+ end
65
+
66
+ m.directory 'public/javascripts'
67
+ m.file 'swfobject.js', 'public/javascripts/swfobject.js'
68
+ m.file 'expressInstall.swf', 'public/expressInstall.swf'
69
+ m.template 'index.html.erb', 'public/index.html'
70
+ end
71
+
72
+ %w(components controllers commands models events).each do |dir|
73
+ m.directory "app/flex/#{base_folder}/#{dir}"
74
+ end
75
+
76
+ m.directory "app/flex/#{base_folder}/components/generated"
77
+
78
+ m.template 'project-textmate.erb', "#{project_name.underscore}.tmproj"
79
+ m.template 'mainapp.mxml', File.join('app', 'flex', "#{project_name}.mxml")
80
+ m.template 'mainapp-config.xml', File.join('app', 'flex', "#{project_name}-config.xml")
81
+ m.template 'mainair-app.xml', File.join('app', 'flex', "#{project_name}-app.xml") if @use_air
82
+ end
83
+ end
84
+
85
+ protected
86
+ def add_options!(opt)
87
+ opt.separator ''
88
+ opt.separator 'Options:'
89
+ opt.on("-a", "--air", "Configure AIR project instead of Flex. Flex is default.",
90
+ "Default: false") { |v| options[:air_config] = v }
91
+ opt.on("--gae", "Generate Google App Engine Python classes in addition to Ruboss Flex resources.",
92
+ "Default: false") { |v| options[:gae] = v }
93
+ end
94
+ 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,12 @@
1
+ application: <%= project_name.downcase %>
2
+ version: 1
3
+ runtime: python
4
+ api_version: 1
5
+
6
+ handlers:
7
+ - url: /public
8
+ static_dir: public
9
+ - url: .*
10
+ script: main.py
11
+
12
+
@@ -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
File without changes
@@ -0,0 +1,17 @@
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
+
16
+ RubiGen::Base.use_component_sources!
17
+ 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; }
@@ -0,0 +1,11 @@
1
+ indexes:
2
+
3
+ # AUTOGENERATED
4
+
5
+ # This index.yaml is automatically updated whenever the dev_appserver
6
+ # detects that a new type of query is run. If you want to manage the
7
+ # index.yaml file manually, remove the above marker line (the line
8
+ # saying "# AUTOGENERATED"). If you want to manage some indexes
9
+ # manually, move them above the marker line. The index.yaml file is
10
+ # automatically uploaded to the admin console when you next deploy
11
+ # your application using appcfg.py.
@@ -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 -%>