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/script/txt2html DELETED
@@ -1,82 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- GEM_NAME = 'ruboss4ruby' # what ppl will type to install your gem
4
- RUBYFORGE_PROJECT = 'ruboss4ruby'
5
-
6
- require 'rubygems'
7
- begin
8
- require 'newgem'
9
- require 'rubyforge'
10
- rescue LoadError
11
- puts "\n\nGenerating the website requires the newgem RubyGem"
12
- puts "Install: gem install newgem\n\n"
13
- exit(1)
14
- end
15
- require 'redcloth'
16
- require 'syntax/convertors/html'
17
- require 'erb'
18
- require File.dirname(__FILE__) + "/../lib/#{GEM_NAME}/version.rb"
19
-
20
- version = Ruboss::VERSION::STRING
21
- download = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
22
-
23
- def rubyforge_project_id
24
- RubyForge.new.autoconfig["group_ids"][RUBYFORGE_PROJECT]
25
- end
26
-
27
- class Fixnum
28
- def ordinal
29
- # teens
30
- return 'th' if (10..19).include?(self % 100)
31
- # others
32
- case self % 10
33
- when 1: return 'st'
34
- when 2: return 'nd'
35
- when 3: return 'rd'
36
- else return 'th'
37
- end
38
- end
39
- end
40
-
41
- class Time
42
- def pretty
43
- return "#{mday}#{mday.ordinal} #{strftime('%B')} #{year}"
44
- end
45
- end
46
-
47
- def convert_syntax(syntax, source)
48
- return Syntax::Convertors::HTML.for_syntax(syntax).convert(source).gsub(%r!^<pre>|</pre>$!,'')
49
- end
50
-
51
- if ARGV.length >= 1
52
- src, template = ARGV
53
- template ||= File.join(File.dirname(__FILE__), '/../website/template.html.erb')
54
- else
55
- puts("Usage: #{File.split($0).last} source.txt [template.html.erb] > output.html")
56
- exit!
57
- end
58
-
59
- template = ERB.new(File.open(template).read)
60
-
61
- title = nil
62
- body = nil
63
- File.open(src) do |fsrc|
64
- title_text = fsrc.readline
65
- body_text_template = fsrc.read
66
- body_text = ERB.new(body_text_template).result(binding)
67
- syntax_items = []
68
- body_text.gsub!(%r!<(pre|code)[^>]*?syntax=['"]([^'"]+)[^>]*>(.*?)</\1>!m){
69
- ident = syntax_items.length
70
- element, syntax, source = $1, $2, $3
71
- syntax_items << "<#{element} class='syntax'>#{convert_syntax(syntax, source)}</#{element}>"
72
- "syntax-temp-#{ident}"
73
- }
74
- title = RedCloth.new(title_text).to_html.gsub(%r!<.*?>!,'').strip
75
- body = RedCloth.new(body_text).to_html
76
- body.gsub!(%r!(?:<pre><code>)?syntax-temp-(\d+)(?:</code></pre>)?!){ syntax_items[$1.to_i] }
77
- end
78
- stat = File.stat(src)
79
- created = stat.ctime
80
- modified = stat.mtime
81
-
82
- $stdout << template.result(binding)