ruboss4ruby 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. data/History.txt +3 -0
  2. data/Manifest.txt +102 -0
  3. data/README.txt +37 -0
  4. data/Rakefile +4 -0
  5. data/config/hoe.rb +72 -0
  6. data/config/requirements.rb +15 -0
  7. data/gpl-3.0.txt +674 -0
  8. data/lib/ruboss4ruby/active_foo.rb +127 -0
  9. data/lib/ruboss4ruby/active_record_tasks.rb +75 -0
  10. data/lib/ruboss4ruby/configuration.rb +38 -0
  11. data/lib/ruboss4ruby/tasks.rb +81 -0
  12. data/lib/ruboss4ruby/version.rb +11 -0
  13. data/lib/ruboss4ruby.rb +61 -0
  14. data/merb_generators/ruboss_config/USAGE +18 -0
  15. data/merb_generators/ruboss_config/ruboss_config_generator.rb +135 -0
  16. data/merb_generators/ruboss_config/templates/actionscript.properties +16 -0
  17. data/merb_generators/ruboss_config/templates/actionscriptair.properties +16 -0
  18. data/merb_generators/ruboss_config/templates/expressInstall.swf +0 -0
  19. data/merb_generators/ruboss_config/templates/flex.properties +2 -0
  20. data/merb_generators/ruboss_config/templates/html-template/AC_OETags.js +276 -0
  21. data/merb_generators/ruboss_config/templates/html-template/history/history.css +6 -0
  22. data/merb_generators/ruboss_config/templates/html-template/history/history.js +645 -0
  23. data/merb_generators/ruboss_config/templates/html-template/history/historyFrame.html +29 -0
  24. data/merb_generators/ruboss_config/templates/html-template/index.template.html +121 -0
  25. data/merb_generators/ruboss_config/templates/html-template/playerProductInstall.swf +0 -0
  26. data/merb_generators/ruboss_config/templates/index.html.erb +19 -0
  27. data/merb_generators/ruboss_config/templates/mainair-app.xml +134 -0
  28. data/merb_generators/ruboss_config/templates/mainapp.mxml +34 -0
  29. data/merb_generators/ruboss_config/templates/project.properties +18 -0
  30. data/merb_generators/ruboss_config/templates/projectair.properties +24 -0
  31. data/merb_generators/ruboss_config/templates/swfobject.js +5 -0
  32. data/merb_generators/ruboss_controller/USAGE +11 -0
  33. data/merb_generators/ruboss_controller/ruboss_controller_generator.rb +32 -0
  34. data/merb_generators/ruboss_controller/templates/controller.as.erb +35 -0
  35. data/merb_generators/ruboss_resource_controller/USAGE +5 -0
  36. data/merb_generators/ruboss_resource_controller/ruboss_resource_controller_generator.rb +70 -0
  37. data/merb_generators/ruboss_resource_controller/templates/app/controllers/%controller_file_name%.rb +55 -0
  38. data/merb_generators/ruboss_resource_controller/templates/app/helpers/%controller_file_name%_helper.rb +16 -0
  39. data/merb_generators/ruboss_scaffold/USAGE +5 -0
  40. data/merb_generators/ruboss_scaffold/ruboss_scaffold_generator.rb +189 -0
  41. data/merb_generators/ruboss_scaffold/templates/component.mxml.erb +148 -0
  42. data/merb_generators/ruboss_scaffold/templates/fixtures.yml.erb +35 -0
  43. data/merb_generators/ruboss_scaffold/templates/migration.rb.erb +19 -0
  44. data/merb_generators/ruboss_scaffold/templates/model.as.erb +42 -0
  45. data/merb_generators/ruboss_scaffold/templates/model.rb.erb +11 -0
  46. data/merb_generators/ruboss_yaml_scaffold/USAGE +5 -0
  47. data/merb_generators/ruboss_yaml_scaffold/ruboss_yaml_scaffold_generator.rb +53 -0
  48. data/rails_generators/ruboss_config/USAGE +18 -0
  49. data/rails_generators/ruboss_config/ruboss_config_generator.rb +127 -0
  50. data/rails_generators/ruboss_config/templates/actionscript.properties +16 -0
  51. data/rails_generators/ruboss_config/templates/actionscriptair.properties +16 -0
  52. data/rails_generators/ruboss_config/templates/expressInstall.swf +0 -0
  53. data/rails_generators/ruboss_config/templates/flex.properties +2 -0
  54. data/rails_generators/ruboss_config/templates/html-template/AC_OETags.js +276 -0
  55. data/rails_generators/ruboss_config/templates/html-template/history/history.css +6 -0
  56. data/rails_generators/ruboss_config/templates/html-template/history/history.js +645 -0
  57. data/rails_generators/ruboss_config/templates/html-template/history/historyFrame.html +29 -0
  58. data/rails_generators/ruboss_config/templates/html-template/index.template.html +121 -0
  59. data/rails_generators/ruboss_config/templates/html-template/playerProductInstall.swf +0 -0
  60. data/rails_generators/ruboss_config/templates/index.html.erb +19 -0
  61. data/rails_generators/ruboss_config/templates/mainair-app.xml +134 -0
  62. data/rails_generators/ruboss_config/templates/mainapp.mxml +34 -0
  63. data/rails_generators/ruboss_config/templates/project.properties +18 -0
  64. data/rails_generators/ruboss_config/templates/projectair.properties +24 -0
  65. data/rails_generators/ruboss_config/templates/ruboss.yml +16 -0
  66. data/rails_generators/ruboss_config/templates/ruboss_tasks.rake +15 -0
  67. data/rails_generators/ruboss_config/templates/swfobject.js +5 -0
  68. data/rails_generators/ruboss_controller/USAGE +11 -0
  69. data/rails_generators/ruboss_controller/ruboss_controller_generator.rb +46 -0
  70. data/rails_generators/ruboss_controller/templates/controller.as.erb +35 -0
  71. data/rails_generators/ruboss_scaffold/USAGE +35 -0
  72. data/rails_generators/ruboss_scaffold/ruboss_scaffold_generator.rb +192 -0
  73. data/rails_generators/ruboss_scaffold/templates/component.mxml.erb +148 -0
  74. data/rails_generators/ruboss_scaffold/templates/controller.rb.erb +97 -0
  75. data/rails_generators/ruboss_scaffold/templates/fixtures.yml.erb +35 -0
  76. data/rails_generators/ruboss_scaffold/templates/migration.rb.erb +19 -0
  77. data/rails_generators/ruboss_scaffold/templates/model.as.erb +42 -0
  78. data/rails_generators/ruboss_scaffold/templates/model.rb.erb +11 -0
  79. data/rails_generators/ruboss_yaml_scaffold/USAGE +14 -0
  80. data/rails_generators/ruboss_yaml_scaffold/ruboss_yaml_scaffold_generator.rb +45 -0
  81. data/rcl-1.0.txt +0 -0
  82. data/script/console +10 -0
  83. data/script/destroy +14 -0
  84. data/script/generate +14 -0
  85. data/script/txt2html +82 -0
  86. data/setup.rb +1585 -0
  87. data/tasks/deployment.rake +34 -0
  88. data/tasks/environment.rake +7 -0
  89. data/tasks/website.rake +17 -0
  90. data/test/active_foo_test.rb +16 -0
  91. data/test/test_generator_helper.rb +29 -0
  92. data/test/test_helper.rb +2 -0
  93. data/test/test_ruboss_config_generator.rb +45 -0
  94. data/test/test_ruboss_controller_generator.rb +45 -0
  95. data/test/test_ruboss_on_ruby.rb +11 -0
  96. data/test/test_ruboss_scaffold_generator.rb +45 -0
  97. data/test/test_ruboss_yaml_scaffold_generator.rb +46 -0
  98. data/website/index.html +63 -0
  99. data/website/index.txt +34 -0
  100. data/website/javascripts/rounded_corners_lite.inc.js +285 -0
  101. data/website/stylesheets/screen.css +138 -0
  102. data/website/template.html.erb +47 -0
  103. metadata +167 -0
@@ -0,0 +1,34 @@
1
+ desc 'Release the website and new gem version'
2
+ task :deploy => [:check_version, :website, :release] do
3
+ puts "Remember to create SVN tag:"
4
+ puts "svn copy svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/trunk " +
5
+ "svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} "
6
+ puts "Suggested comment:"
7
+ puts "Tagging release #{CHANGES}"
8
+ end
9
+
10
+ desc 'Runs tasks website_generate and install_gem as a local deployment of the gem'
11
+ task :local_deploy => [:website_generate, :install_gem]
12
+
13
+ task :check_version do
14
+ unless ENV['VERSION']
15
+ puts 'Must pass a VERSION=x.y.z release version'
16
+ exit
17
+ end
18
+ unless ENV['VERSION'] == VERS
19
+ puts "Please update your version.rb to match the release version, currently #{VERS}"
20
+ exit
21
+ end
22
+ end
23
+
24
+ desc 'Install the package as a gem, without generating documentation(ri/rdoc)'
25
+ task :install_gem_no_doc => [:clean, :package] do
26
+ sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
27
+ end
28
+
29
+ namespace :manifest do
30
+ desc 'Recreate Manifest.txt to include ALL files'
31
+ task :refresh do
32
+ `rake check_manifest | patch -p0 > Manifest.txt`
33
+ end
34
+ end
@@ -0,0 +1,7 @@
1
+ task :ruby_env do
2
+ RUBY_APP = if RUBY_PLATFORM =~ /java/
3
+ "jruby"
4
+ else
5
+ "ruby"
6
+ end unless defined? RUBY_APP
7
+ end
@@ -0,0 +1,17 @@
1
+ desc 'Generate website files'
2
+ task :website_generate => :ruby_env do
3
+ (Dir['website/**/*.txt'] - Dir['website/version*.txt']).each do |txt|
4
+ sh %{ #{RUBY_APP} script/txt2html #{txt} > #{txt.gsub(/txt$/,'html')} }
5
+ end
6
+ end
7
+
8
+ desc 'Upload website files to rubyforge'
9
+ task :website_upload do
10
+ host = "#{rubyforge_username}@rubyforge.org"
11
+ remote_dir = "/var/www/gforge-projects/#{PATH}/"
12
+ local_dir = 'website'
13
+ sh %{rsync -aCv #{local_dir}/ #{host}:#{remote_dir}}
14
+ end
15
+
16
+ desc 'Generate and upload website files'
17
+ task :website => [:website_generate, :website_upload, :publish_docs]
@@ -0,0 +1,16 @@
1
+ require 'test/unit'
2
+ require 'rubygems'
3
+ require 'action_controller'
4
+ require 'active_support'
5
+ require 'active_record'
6
+ require File.join(File.dirname(__FILE__), '..', 'lib', 'ruboss4ruby', 'active_foo')
7
+
8
+ class ActiveFooTest < Test::Unit::TestCase
9
+
10
+ def test_to_fxml_with_args_on_empty_array_should_not_blow_up
11
+ a = ClassyEmptyArray.new(Object)
12
+ assert_nothing_raised {a.to_fxml}
13
+ assert_nothing_raised {a.to_fxml(:include => :test)}
14
+ end
15
+
16
+ end
@@ -0,0 +1,29 @@
1
+ begin
2
+ require File.dirname(__FILE__) + '/test_helper'
3
+ rescue LoadError
4
+ require 'test/unit'
5
+ end
6
+ require 'fileutils'
7
+
8
+ # Must set before requiring generator libs.
9
+ TMP_ROOT = File.dirname(__FILE__) + "/tmp" unless defined?(TMP_ROOT)
10
+ PROJECT_NAME = "myproject" unless defined?(PROJECT_NAME)
11
+ app_root = File.join(TMP_ROOT, PROJECT_NAME)
12
+ if defined?(APP_ROOT)
13
+ APP_ROOT.replace(app_root)
14
+ else
15
+ APP_ROOT = app_root
16
+ end
17
+ if defined?(RAILS_ROOT)
18
+ RAILS_ROOT.replace(app_root)
19
+ else
20
+ RAILS_ROOT = app_root
21
+ end
22
+
23
+ begin
24
+ require 'rubigen'
25
+ rescue LoadError
26
+ require 'rubygems'
27
+ require 'rubigen'
28
+ end
29
+ require 'rubigen/helpers/generator_test_helper'
@@ -0,0 +1,2 @@
1
+ require 'test/unit'
2
+ require File.dirname(__FILE__) + '/../lib/ruboss4ruby'
@@ -0,0 +1,45 @@
1
+ require File.join(File.dirname(__FILE__), "test_generator_helper.rb")
2
+
3
+ require 'rails_generator'
4
+
5
+ class TestRubossConfigGenerator < Test::Unit::TestCase
6
+ include RubiGen::GeneratorTestHelper
7
+
8
+ def setup
9
+ bare_setup
10
+ end
11
+
12
+ def teardown
13
+ bare_teardown
14
+ end
15
+
16
+ # Some generator-related assertions:
17
+ # assert_generated_file(name, &block) # block passed the file contents
18
+ # assert_directory_exists(name)
19
+ # assert_generated_class(name, &block)
20
+ # assert_generated_module(name, &block)
21
+ # assert_generated_test_for(name, &block)
22
+ # The assert_generated_(class|module|test_for) &block is passed the body of the class/module within the file
23
+ # assert_has_method(body, *methods) # check that the body has a list of methods (methods with parentheses not supported yet)
24
+ #
25
+ # Other helper methods are:
26
+ # app_root_files - put this in teardown to show files generated by the test method (e.g. p app_root_files)
27
+ # bare_setup - place this in setup method to create the APP_ROOT folder for each test
28
+ # bare_teardown - place this in teardown method to destroy the TMP_ROOT or APP_ROOT folder after each test
29
+
30
+ def test_generator_without_options
31
+ name = "myapp"
32
+ run_generator('ruboss_config', [name], sources)
33
+ assert_generated_file("some_file")
34
+ end
35
+
36
+ private
37
+ def sources
38
+ [RubiGen::PathSource.new(:test, File.join(File.dirname(__FILE__),"..", generator_path))
39
+ ]
40
+ end
41
+
42
+ def generator_path
43
+ "rails_generators"
44
+ end
45
+ end
@@ -0,0 +1,45 @@
1
+ require File.join(File.dirname(__FILE__), "test_generator_helper.rb")
2
+
3
+ require 'rails_generator'
4
+
5
+ class TestRubossControllerGenerator < Test::Unit::TestCase
6
+ include RubiGen::GeneratorTestHelper
7
+
8
+ def setup
9
+ bare_setup
10
+ end
11
+
12
+ def teardown
13
+ bare_teardown
14
+ end
15
+
16
+ # Some generator-related assertions:
17
+ # assert_generated_file(name, &block) # block passed the file contents
18
+ # assert_directory_exists(name)
19
+ # assert_generated_class(name, &block)
20
+ # assert_generated_module(name, &block)
21
+ # assert_generated_test_for(name, &block)
22
+ # The assert_generated_(class|module|test_for) &block is passed the body of the class/module within the file
23
+ # assert_has_method(body, *methods) # check that the body has a list of methods (methods with parentheses not supported yet)
24
+ #
25
+ # Other helper methods are:
26
+ # app_root_files - put this in teardown to show files generated by the test method (e.g. p app_root_files)
27
+ # bare_setup - place this in setup method to create the APP_ROOT folder for each test
28
+ # bare_teardown - place this in teardown method to destroy the TMP_ROOT or APP_ROOT folder after each test
29
+
30
+ def test_generator_without_options
31
+ name = "myapp"
32
+ run_generator('ruboss_controller', [name], sources)
33
+ assert_generated_file("some_file")
34
+ end
35
+
36
+ private
37
+ def sources
38
+ [RubiGen::PathSource.new(:test, File.join(File.dirname(__FILE__),"..", generator_path))
39
+ ]
40
+ end
41
+
42
+ def generator_path
43
+ "rails_generators"
44
+ end
45
+ end
@@ -0,0 +1,11 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+
3
+ class TestRuboss < Test::Unit::TestCase
4
+
5
+ def setup
6
+ end
7
+
8
+ def test_truth
9
+ assert true
10
+ end
11
+ end
@@ -0,0 +1,45 @@
1
+ require File.join(File.dirname(__FILE__), "test_generator_helper.rb")
2
+
3
+ require 'rails_generator'
4
+
5
+ class TestRubossScaffoldGenerator < Test::Unit::TestCase
6
+ include RubiGen::GeneratorTestHelper
7
+
8
+ def setup
9
+ bare_setup
10
+ end
11
+
12
+ def teardown
13
+ bare_teardown
14
+ end
15
+
16
+ # Some generator-related assertions:
17
+ # assert_generated_file(name, &block) # block passed the file contents
18
+ # assert_directory_exists(name)
19
+ # assert_generated_class(name, &block)
20
+ # assert_generated_module(name, &block)
21
+ # assert_generated_test_for(name, &block)
22
+ # The assert_generated_(class|module|test_for) &block is passed the body of the class/module within the file
23
+ # assert_has_method(body, *methods) # check that the body has a list of methods (methods with parentheses not supported yet)
24
+ #
25
+ # Other helper methods are:
26
+ # app_root_files - put this in teardown to show files generated by the test method (e.g. p app_root_files)
27
+ # bare_setup - place this in setup method to create the APP_ROOT folder for each test
28
+ # bare_teardown - place this in teardown method to destroy the TMP_ROOT or APP_ROOT folder after each test
29
+
30
+ def test_generator_without_options
31
+ name = "myapp"
32
+ run_generator('ruboss_scaffold', [name], sources)
33
+ assert_generated_file("some_file")
34
+ end
35
+
36
+ private
37
+ def sources
38
+ [RubiGen::PathSource.new(:test, File.join(File.dirname(__FILE__),"..", generator_path))
39
+ ]
40
+ end
41
+
42
+ def generator_path
43
+ "rails_generators"
44
+ end
45
+ end
@@ -0,0 +1,46 @@
1
+ require File.join(File.dirname(__FILE__), "test_generator_helper.rb")
2
+
3
+ require 'merb-core'
4
+ require 'merb-gen'
5
+
6
+ class TestRubossYamlScaffoldGenerator < Test::Unit::TestCase
7
+ include RubiGen::GeneratorTestHelper
8
+
9
+ def setup
10
+ bare_setup
11
+ end
12
+
13
+ def teardown
14
+ bare_teardown
15
+ end
16
+
17
+ # Some generator-related assertions:
18
+ # assert_generated_file(name, &block) # block passed the file contents
19
+ # assert_directory_exists(name)
20
+ # assert_generated_class(name, &block)
21
+ # assert_generated_module(name, &block)
22
+ # assert_generated_test_for(name, &block)
23
+ # The assert_generated_(class|module|test_for) &block is passed the body of the class/module within the file
24
+ # assert_has_method(body, *methods) # check that the body has a list of methods (methods with parentheses not supported yet)
25
+ #
26
+ # Other helper methods are:
27
+ # app_root_files - put this in teardown to show files generated by the test method (e.g. p app_root_files)
28
+ # bare_setup - place this in setup method to create the APP_ROOT folder for each test
29
+ # bare_teardown - place this in teardown method to destroy the TMP_ROOT or APP_ROOT folder after each test
30
+
31
+ def test_generator_without_options
32
+ name = "myapp"
33
+ run_generator('ruboss_yaml_scaffold', [name], sources)
34
+ assert_generated_file("some_file")
35
+ end
36
+
37
+ private
38
+ def sources
39
+ [RubiGen::PathSource.new(:test, File.join(File.dirname(__FILE__),"..", generator_path))
40
+ ]
41
+ end
42
+
43
+ def generator_path
44
+ "merb_generators"
45
+ end
46
+ end
@@ -0,0 +1,63 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+ <title>
8
+ ruboss4ruby
9
+ </title>
10
+ <script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
11
+ <style>
12
+
13
+ </style>
14
+ <script type="text/javascript">
15
+ window.onload = function() {
16
+ settings = {
17
+ tl: { radius: 10 },
18
+ tr: { radius: 10 },
19
+ bl: { radius: 10 },
20
+ br: { radius: 10 },
21
+ antiAlias: true,
22
+ autoPad: true,
23
+ validTags: ["div"]
24
+ }
25
+ var versionBox = new curvyCorners(settings, document.getElementById("version"));
26
+ versionBox.applyCornersToAll();
27
+ }
28
+ </script>
29
+ </head>
30
+ <body>
31
+ <div id="main">
32
+
33
+ <h1>ruboss4ruby</h1>
34
+ <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/ruboss4ruby"; return false'>
35
+ <p>Get Version</p>
36
+ <a href="http://rubyforge.org/projects/ruboss4ruby" class="numbers">1.0.1</a>
37
+ </div>
38
+ <h2>What</h2>
39
+ <p>Ruboss Framework Integration Support for Rails 2.+ and Merb 0.9.3+</p>
40
+ <h2>Installing</h2>
41
+ <p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">ruboss4ruby</span></pre></p>
42
+ <h2>Forum</h2>
43
+ <p><a href="http://groups.google.com/group/ruboss-framework">http://groups.google.com/group/ruboss-framework</a></p>
44
+ <h2>Source</h2>
45
+ <p>You can fetch the source from:</p>
46
+ <pre>git clone git://github.com/dima/ruboss4ruby.git</pre>
47
+ <h3>Build and test instructions</h3>
48
+ <pre>cd ruboss4ruby
49
+ rake test
50
+ rake install_gem</pre>
51
+ <h2>License</h2>
52
+ <p>This code is distributed under the terms of the GPLv3 license.</p>
53
+ <h2>Contact</h2>
54
+ <p>Comments are welcome. Send an email to <a href="mailto:dima@ruboss.com">Dima Berastau</a> or use the public <a href="http://groups.google.com/group/ruboss-framework">forum</a></p>
55
+ <p class="coda">
56
+ Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
57
+ </p>
58
+ </div>
59
+
60
+ <!-- insert site tracking codes here, like Google Urchin -->
61
+
62
+ </body>
63
+ </html>
data/website/index.txt ADDED
@@ -0,0 +1,34 @@
1
+ h1. ruboss4ruby
2
+
3
+ h2. What
4
+
5
+ Ruboss Framework Integration Support for Rails 2.+ and Merb 0.9.3+
6
+
7
+ h2. Installing
8
+
9
+ <pre syntax="ruby">sudo gem install ruboss4ruby</pre>
10
+
11
+ h2. Forum
12
+
13
+ "http://groups.google.com/group/ruboss-framework":http://groups.google.com/group/ruboss-framework
14
+
15
+ h2. Source
16
+
17
+ You can fetch the source from:
18
+
19
+ <pre>git clone git://github.com/dima/ruboss4ruby.git</pre>
20
+
21
+ h3. Build and test instructions
22
+
23
+ <pre>cd ruboss4ruby
24
+ rake test
25
+ rake install_gem</pre>
26
+
27
+ h2. License
28
+
29
+ This code is distributed under the terms of the GPLv3 license.
30
+
31
+ h2. Contact
32
+
33
+ Comments are welcome. Send an email to "Dima Berastau":mailto:dima@ruboss.com or use the public "forum":http://groups.google.com/group/ruboss-framework
34
+