merb-gen 1.0.15 → 1.1.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/Rakefile +59 -69
  2. data/bin/merb-gen +14 -2
  3. data/lib/generators/fcgi.rb +16 -0
  4. data/lib/generators/merb/merb_core.rb +14 -12
  5. data/lib/generators/merb/merb_flat.rb +11 -6
  6. data/lib/generators/merb/merb_stack.rb +14 -22
  7. data/lib/generators/merb/merb_very_flat.rb +32 -11
  8. data/lib/generators/passenger.rb +15 -0
  9. data/lib/generators/resource_controller.rb +1 -1
  10. data/lib/generators/templates/application/common/Gemfile +12 -0
  11. data/lib/generators/templates/application/common/Rakefile +10 -1
  12. data/lib/generators/templates/application/common/dotgitignore +3 -3
  13. data/lib/generators/templates/application/common/merb +20 -0
  14. data/lib/generators/templates/application/merb_core/autotest/merb_rspec.rb +9 -9
  15. data/lib/generators/templates/application/merb_core/config/init.rb +3 -5
  16. data/lib/generators/templates/application/merb_core/spec/spec.opts +1 -1
  17. data/lib/generators/templates/application/merb_core/spec/spec_helper.rb +9 -7
  18. data/lib/generators/templates/application/merb_core/test/test_helper.rb +9 -7
  19. data/lib/generators/templates/application/merb_flat/application.rbt +3 -0
  20. data/lib/generators/templates/application/merb_flat/config/init.rb +23 -19
  21. data/lib/generators/templates/application/merb_flat/spec/spec_helper.rb +8 -6
  22. data/lib/generators/templates/application/merb_flat/test/test_helper.rb +9 -7
  23. data/lib/generators/templates/application/merb_plugin/Rakefile +35 -4
  24. data/lib/generators/templates/application/merb_stack/Gemfile +48 -0
  25. data/lib/generators/templates/application/merb_stack/autotest/merb_rspec.rb +7 -7
  26. data/lib/generators/templates/application/merb_stack/config/init.rb +2 -2
  27. data/lib/generators/templates/application/merb_stack/config.ru +23 -0
  28. data/lib/generators/templates/application/merb_stack/spec/spec.opts +1 -1
  29. data/lib/generators/templates/application/merb_stack/spec/spec_helper.rb +9 -7
  30. data/lib/generators/templates/application/merb_stack/test/test_helper.rb +9 -7
  31. data/lib/generators/templates/application/merb_very_flat/application.rbt +1 -8
  32. data/lib/generators/templates/application/merb_very_flat/spec/spec_helper.rb +8 -6
  33. data/lib/generators/templates/application/merb_very_flat/test/test_helper.rb +9 -7
  34. data/lib/generators/templates/{application/common → component/fcgi}/dothtaccess +1 -2
  35. data/lib/generators/templates/{application/merb_stack/public → component/fcgi}/merb.fcgi +10 -4
  36. data/lib/generators/templates/component/model/spec/models/%file_name%_spec.rb +1 -1
  37. data/lib/merb-gen/app_generator.rb +58 -0
  38. data/lib/merb-gen/generator.rb +1 -1
  39. data/lib/merb-gen/version.rb +17 -0
  40. data/lib/merb-gen.rb +27 -25
  41. data/spec/controller_spec.rb +1 -1
  42. data/spec/fcgi_spec.rb +24 -0
  43. data/spec/generator_spec.rb +1 -1
  44. data/spec/layout_spec.rb +1 -1
  45. data/spec/merb_core_spec.rb +17 -5
  46. data/spec/merb_flat_spec.rb +10 -1
  47. data/spec/merb_plugin_spec.rb +3 -3
  48. data/spec/merb_stack_spec.rb +23 -10
  49. data/spec/merb_very_flat_spec.rb +13 -2
  50. data/spec/migration_spec.rb +1 -1
  51. data/spec/model_spec.rb +1 -1
  52. data/spec/named_generator_spec.rb +1 -1
  53. data/spec/namespaced_generator_spec.rb +1 -1
  54. data/spec/part_controller_spec.rb +1 -1
  55. data/spec/passenger_spec.rb +20 -0
  56. data/spec/resource_controller_spec.rb +1 -1
  57. data/spec/resource_spec.rb +1 -1
  58. data/spec/session_migration_spec.rb +1 -1
  59. data/spec/spec.opts +2 -0
  60. data/spec/spec_helper.rb +53 -4
  61. metadata +78 -45
  62. data/lib/generators/templates/application/common/doc.thor +0 -149
  63. data/lib/generators/templates/application/common/merb_thor/app_script.rb +0 -31
  64. data/lib/generators/templates/application/common/merb_thor/common.rb +0 -68
  65. data/lib/generators/templates/application/common/merb_thor/gem_ext.rb +0 -125
  66. data/lib/generators/templates/application/common/merb_thor/main.thor +0 -151
  67. data/lib/generators/templates/application/common/merb_thor/ops.rb +0 -93
  68. data/lib/generators/templates/application/common/merb_thor/utils.rb +0 -40
  69. data/lib/generators/templates/application/merb_core/public/merb.fcgi +0 -22
  70. data/lib/generators/templates/application/merb_stack/config/dependencies.rb +0 -34
  71. data/lib/generators/thor.rb +0 -33
@@ -1,34 +0,0 @@
1
- # dependencies are generated using a strict version, don't forget to edit the dependency versions when upgrading.
2
- merb_gems_version = "<%= merb_gems_version %>"
3
- dm_gems_version = "~> <%= dm_gems_version %>"
4
- do_gems_version = "~> <%= do_gems_version %>"
5
-
6
- # For more information about each component, please read http://wiki.merbivore.com/faqs/merb_components
7
- dependency "merb-core", merb_gems_version
8
- dependency "merb-action-args", merb_gems_version
9
- dependency "merb-assets", merb_gems_version
10
- dependency("merb-cache", merb_gems_version) do
11
- Merb::Cache.setup do
12
- register(Merb::Cache::FileStore) unless Merb.cache
13
- end
14
- end
15
- dependency "merb-helpers", merb_gems_version
16
- dependency "merb-mailer", merb_gems_version
17
- dependency "merb-slices", merb_gems_version
18
- dependency "merb-auth-core", merb_gems_version
19
- dependency "merb-auth-more", merb_gems_version
20
- dependency "merb-auth-slice-password", merb_gems_version
21
- dependency "merb-param-protection", merb_gems_version
22
- dependency "merb-exceptions", merb_gems_version
23
-
24
- dependency "data_objects", do_gems_version
25
- dependency "do_sqlite3", do_gems_version # If using another database, replace this
26
- dependency "dm-core", dm_gems_version
27
- dependency "dm-aggregates", dm_gems_version
28
- dependency "dm-migrations", dm_gems_version
29
- dependency "dm-timestamps", dm_gems_version
30
- dependency "dm-types", dm_gems_version
31
- dependency "dm-validations", dm_gems_version
32
- dependency "dm-serializer", dm_gems_version
33
-
34
- dependency "merb_datamapper", merb_gems_version
@@ -1,33 +0,0 @@
1
- module Merb
2
- module Generators
3
- class ThorGenerator < AppGenerator
4
- #
5
- # ==== Paths
6
- #
7
-
8
- def self.source_root
9
- File.join(super, 'application', 'common', 'merb_thor')
10
- end
11
-
12
- def destination_root
13
- File.join(@destination_root)
14
- end
15
-
16
- def common_templates_dir
17
- File.expand_path(File.join(File.dirname(__FILE__),
18
- 'templates', 'application', 'common'))
19
- end
20
-
21
- file :common_file do |file|
22
- file.source = File.join(common_templates_dir, "merb_thor", "common.rb")
23
- file.destination = File.join("bin", "common.rb")
24
- end
25
-
26
- directory :thor_file do |directory|
27
- directory.source = File.join(common_templates_dir, "merb_thor")
28
- directory.destination = File.join("tasks", "merb.thor")
29
- end
30
- end
31
- add :thor, ThorGenerator
32
- end
33
- end