merb-gen 0.9.8 → 0.9.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. data/README +6 -3
  2. data/Rakefile +6 -4
  3. data/bin/merb-gen +1 -23
  4. data/lib/generators/controller.rb +4 -2
  5. data/lib/generators/helper.rb +0 -5
  6. data/lib/generators/merb/merb_core.rb +95 -0
  7. data/lib/generators/merb/merb_flat.rb +70 -69
  8. data/lib/generators/merb/merb_stack.rb +110 -0
  9. data/lib/generators/merb/merb_very_flat.rb +61 -64
  10. data/lib/generators/merb_plugin.rb +5 -0
  11. data/lib/generators/model.rb +5 -2
  12. data/lib/generators/resource.rb +7 -2
  13. data/lib/generators/resource_controller.rb +4 -4
  14. data/lib/generators/templates/application/common/Rakefile +2 -6
  15. data/lib/generators/templates/application/common/doc.thor +149 -0
  16. data/lib/generators/templates/application/common/dothtaccess +17 -0
  17. data/lib/generators/templates/application/common/jquery.js +32 -0
  18. data/lib/generators/templates/application/common/merb.thor +1550 -861
  19. data/lib/generators/templates/application/{merb → merb_core}/app/controllers/application.rb +0 -0
  20. data/lib/generators/templates/application/{merb → merb_core}/app/controllers/exceptions.rb +0 -0
  21. data/lib/generators/templates/application/{merb → merb_core}/app/helpers/global_helpers.rb +0 -0
  22. data/lib/generators/templates/application/{merb → merb_core}/app/views/exceptions/internal_server_error.html.erb +0 -0
  23. data/lib/generators/templates/application/{merb → merb_core}/app/views/exceptions/not_acceptable.html.erb +0 -0
  24. data/lib/generators/templates/application/{merb → merb_core}/app/views/exceptions/not_found.html.erb +0 -0
  25. data/lib/generators/templates/application/{merb → merb_core}/autotest/discover.rb +0 -0
  26. data/lib/generators/templates/application/{merb → merb_core}/autotest/merb.rb +0 -0
  27. data/lib/generators/templates/application/{merb → merb_core}/autotest/merb_rspec.rb +0 -0
  28. data/lib/generators/templates/application/{merb → merb_core}/config/environments/development.rb +7 -2
  29. data/lib/generators/templates/application/{merb → merb_core}/config/environments/production.rb +5 -2
  30. data/lib/generators/templates/application/{merb → merb_core}/config/environments/rake.rb +6 -2
  31. data/lib/generators/templates/application/merb_core/config/environments/staging.rb +10 -0
  32. data/lib/generators/templates/application/merb_core/config/environments/test.rb +12 -0
  33. data/lib/generators/templates/application/{merb → merb_core}/config/init.rb +6 -6
  34. data/lib/generators/templates/application/{merb → merb_core}/config/rack.rb +0 -0
  35. data/lib/generators/templates/application/{merb → merb_core}/config/router.rb +0 -0
  36. data/lib/generators/templates/application/merb_core/doc/rdoc/generators/merb_generator.rb +1362 -0
  37. data/lib/generators/templates/application/merb_core/doc/rdoc/generators/template/merb/api_grease.js +640 -0
  38. data/lib/generators/templates/application/merb_core/doc/rdoc/generators/template/merb/index.html.erb +37 -0
  39. data/lib/generators/templates/application/merb_core/doc/rdoc/generators/template/merb/merb.css +252 -0
  40. data/lib/generators/templates/application/merb_core/doc/rdoc/generators/template/merb/merb.rb +351 -0
  41. data/lib/generators/templates/application/merb_core/doc/rdoc/generators/template/merb/merb_doc_styles.css +492 -0
  42. data/lib/generators/templates/application/merb_core/doc/rdoc/generators/template/merb/prototype.js +2515 -0
  43. data/lib/generators/templates/application/{merb/app/models → merb_core/lib}/merb/session.rb +0 -0
  44. data/lib/generators/templates/application/{merb → merb_core}/public/favicon.ico +0 -0
  45. data/lib/generators/templates/application/{merb → merb_core}/public/images/merb.jpg +0 -0
  46. data/lib/generators/templates/application/merb_core/public/javascripts/application.js +1 -0
  47. data/lib/generators/templates/application/{merb → merb_core}/public/merb.fcgi +0 -0
  48. data/lib/generators/templates/application/{merb → merb_core}/public/robots.txt +0 -0
  49. data/lib/generators/templates/application/{merb → merb_core}/public/stylesheets/master.css +0 -0
  50. data/lib/generators/templates/application/{merb → merb_core}/spec/spec.opts +0 -0
  51. data/lib/generators/templates/application/{merb → merb_core}/spec/spec_helper.rb +0 -0
  52. data/lib/generators/templates/application/{merb → merb_core}/test/test_helper.rb +0 -0
  53. data/lib/generators/templates/application/merb_flat/application.rbt +1 -1
  54. data/lib/generators/templates/application/merb_flat/config/init.rb +8 -3
  55. data/lib/generators/templates/application/merb_plugin/LICENSE +1 -1
  56. data/lib/generators/templates/application/merb_stack/app/controllers/application.rb +2 -0
  57. data/lib/generators/templates/application/merb_stack/app/controllers/exceptions.rb +13 -0
  58. data/lib/generators/templates/application/merb_stack/app/helpers/global_helpers.rb +5 -0
  59. data/lib/generators/templates/application/merb_stack/app/models/user.rb +17 -0
  60. data/lib/generators/templates/application/merb_stack/app/views/exceptions/internal_server_error.html.erb +216 -0
  61. data/lib/generators/templates/application/merb_stack/app/views/exceptions/not_acceptable.html.erb +63 -0
  62. data/lib/generators/templates/application/merb_stack/app/views/exceptions/not_found.html.erb +47 -0
  63. data/lib/generators/templates/application/merb_stack/autotest/discover.rb +1 -0
  64. data/lib/generators/templates/application/merb_stack/autotest/merb.rb +149 -0
  65. data/lib/generators/templates/application/merb_stack/autotest/merb_rspec.rb +165 -0
  66. data/lib/generators/templates/application/merb_stack/config/database.yml +33 -0
  67. data/lib/generators/templates/application/merb_stack/config/dependencies.rb +15 -0
  68. data/lib/generators/templates/application/merb_stack/config/environments/development.rb +15 -0
  69. data/lib/generators/templates/application/merb_stack/config/environments/production.rb +10 -0
  70. data/lib/generators/templates/application/merb_stack/config/environments/rake.rb +11 -0
  71. data/lib/generators/templates/application/merb_stack/config/environments/staging.rb +10 -0
  72. data/lib/generators/templates/application/merb_stack/config/environments/test.rb +12 -0
  73. data/lib/generators/templates/application/merb_stack/config/init.rb +24 -0
  74. data/lib/generators/templates/application/merb_stack/config/rack.rb +12 -0
  75. data/lib/generators/templates/application/merb_stack/config/router.rb +44 -0
  76. data/lib/generators/templates/application/merb_stack/doc/rdoc/generators/merb_generator.rb +1362 -0
  77. data/lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/api_grease.js +640 -0
  78. data/lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/index.html.erb +37 -0
  79. data/lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/merb.css +252 -0
  80. data/lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/merb.rb +351 -0
  81. data/lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/merb_doc_styles.css +492 -0
  82. data/lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/prototype.js +2515 -0
  83. data/lib/generators/templates/application/merb_stack/merb/merb-auth/setup.rb +44 -0
  84. data/lib/generators/templates/application/merb_stack/merb/merb-auth/strategies.rb +11 -0
  85. data/lib/generators/templates/application/merb_stack/merb/session/session.rb +9 -0
  86. data/lib/generators/templates/application/merb_stack/public/favicon.ico +0 -0
  87. data/lib/generators/templates/application/merb_stack/public/images/merb.jpg +0 -0
  88. data/lib/generators/templates/application/merb_stack/public/javascripts/application.js +1 -0
  89. data/lib/generators/templates/application/merb_stack/public/merb.fcgi +22 -0
  90. data/lib/generators/templates/application/merb_stack/public/robots.txt +5 -0
  91. data/lib/generators/templates/application/merb_stack/public/stylesheets/master.css +119 -0
  92. data/lib/generators/templates/application/merb_stack/spec/spec.opts +0 -0
  93. data/lib/generators/templates/application/merb_stack/spec/spec_helper.rb +20 -0
  94. data/lib/generators/templates/application/merb_stack/test/test_helper.rb +19 -0
  95. data/lib/generators/templates/application/merb_very_flat/application.rbt +11 -5
  96. data/lib/generators/templates/component/layout/app/views/layout/%file_name%.html.erb +1 -0
  97. data/lib/generators/templates/component/resource_controller/spec/requests/%file_name%_spec.rb +53 -0
  98. data/lib/merb-gen/app_generator.rb +13 -0
  99. data/lib/merb-gen/generator.rb +36 -1
  100. data/lib/merb-gen/named_generator.rb +5 -2
  101. data/lib/merb-gen.rb +6 -8
  102. data/spec/controller_spec.rb +0 -20
  103. data/spec/{merb_full_spec.rb → merb_core_spec.rb} +11 -3
  104. data/spec/merb_stack_spec.rb +47 -0
  105. data/spec/part_controller_spec.rb +0 -39
  106. data/spec/resource_controller_spec.rb +1 -35
  107. data/spec/spec_helper.rb +4 -2
  108. metadata +133 -111
  109. data/lib/generators/merb/merb_full.rb +0 -85
  110. data/lib/generators/merb.rb +0 -24
  111. data/lib/generators/templates/application/merb/config/environments/staging.rb +0 -7
  112. data/lib/generators/templates/application/merb/config/environments/test.rb +0 -7
  113. data/lib/generators/templates/component/helper/spec/helpers/%file_name%_helper_spec.rb +0 -5
  114. data/lib/generators/templates/component/resource_controller/spec/controllers/%file_name%_spec.rb +0 -7
  115. data/spec/helper_spec.rb +0 -43
  116. data/spec/merb_spec.rb +0 -20
@@ -46,26 +46,8 @@ describe Merb::Generators::ResourceControllerGenerator do
46
46
  @generator.should create('/tmp/app/views/stuff/edit.html.erb')
47
47
  @generator.should create('/tmp/app/views/stuff/show.html.erb')
48
48
  end
49
-
50
- it "should create a helper" do
51
- @generator.should create('/tmp/app/helpers/stuff_helper.rb')
52
- end
53
-
54
- describe "with rspec" do
55
-
56
- it "should create a controller spec"
57
49
 
58
- it "should create a helper spec" do
59
- @generator.should create('/tmp/spec/helpers/stuff_helper_spec.rb')
60
- end
61
-
62
- end
63
-
64
- describe "with test_unit" do
65
-
66
- it "should create a controller test"
67
-
68
- end
50
+
69
51
 
70
52
  describe "with a namespace" do
71
53
 
@@ -87,22 +69,6 @@ describe Merb::Generators::ResourceControllerGenerator do
87
69
  it "should create a helper" do
88
70
  @generator.should create('/tmp/app/helpers/john/monkey/stuff_helper.rb')
89
71
  end
90
-
91
- describe "with rspec" do
92
-
93
- it "should create a controller spec"
94
-
95
- it "should create a helper spec" do
96
- @generator.should create('/tmp/spec/helpers/john/monkey/stuff_helper_spec.rb')
97
- end
98
-
99
- end
100
-
101
- describe "with test_unit" do
102
-
103
- it "should create a controller test"
104
-
105
- end
106
72
 
107
73
  end
108
74
 
data/spec/spec_helper.rb CHANGED
@@ -6,11 +6,13 @@ require 'merb-core'
6
6
  require 'merb-gen'
7
7
  require 'templater/spec/helpers'
8
8
 
9
+ Merb.disable(:initfile)
10
+
9
11
  Spec::Runner.configure do |config|
10
12
  config.include Templater::Spec::Helpers
11
13
  end
12
14
 
13
- shared_examples_for "named generator" do
15
+ describe "named generator", :shared => true do
14
16
 
15
17
  describe '#file_name' do
16
18
 
@@ -268,4 +270,4 @@ shared_examples_for "namespaced generator" do
268
270
  end
269
271
  end
270
272
 
271
- end
273
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merb-gen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8
4
+ version: 0.9.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Nicklas
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-06 00:00:00 +03:00
12
+ date: 2008-10-13 00:00:00 +03:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 0.9.8
23
+ version: 0.9.9
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: templater
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.3.0
33
+ version: 0.3.3
34
34
  version:
35
35
  description: Generators suite for Merb.
36
36
  email: jonas.nicklas@gmail.com
@@ -52,10 +52,10 @@ files:
52
52
  - lib/generators/helper.rb
53
53
  - lib/generators/layout.rb
54
54
  - lib/generators/merb
55
+ - lib/generators/merb/merb_core.rb
55
56
  - lib/generators/merb/merb_flat.rb
56
- - lib/generators/merb/merb_full.rb
57
+ - lib/generators/merb/merb_stack.rb
57
58
  - lib/generators/merb/merb_very_flat.rb
58
- - lib/generators/merb.rb
59
59
  - lib/generators/merb_plugin.rb
60
60
  - lib/generators/migration.rb
61
61
  - lib/generators/model.rb
@@ -66,51 +66,68 @@ files:
66
66
  - lib/generators/templates
67
67
  - lib/generators/templates/application
68
68
  - lib/generators/templates/application/common
69
+ - lib/generators/templates/application/common/doc.thor
69
70
  - lib/generators/templates/application/common/dotgitignore
71
+ - lib/generators/templates/application/common/dothtaccess
72
+ - lib/generators/templates/application/common/jquery.js
70
73
  - lib/generators/templates/application/common/merb.thor
71
74
  - lib/generators/templates/application/common/Rakefile
72
- - lib/generators/templates/application/merb
73
- - lib/generators/templates/application/merb/app
74
- - lib/generators/templates/application/merb/app/controllers
75
- - lib/generators/templates/application/merb/app/controllers/application.rb
76
- - lib/generators/templates/application/merb/app/controllers/exceptions.rb
77
- - lib/generators/templates/application/merb/app/helpers
78
- - lib/generators/templates/application/merb/app/helpers/global_helpers.rb
79
- - lib/generators/templates/application/merb/app/models
80
- - lib/generators/templates/application/merb/app/models/merb
81
- - lib/generators/templates/application/merb/app/models/merb/session.rb
82
- - lib/generators/templates/application/merb/app/views
83
- - lib/generators/templates/application/merb/app/views/exceptions
84
- - lib/generators/templates/application/merb/app/views/exceptions/internal_server_error.html.erb
85
- - lib/generators/templates/application/merb/app/views/exceptions/not_acceptable.html.erb
86
- - lib/generators/templates/application/merb/app/views/exceptions/not_found.html.erb
87
- - lib/generators/templates/application/merb/autotest
88
- - lib/generators/templates/application/merb/autotest/discover.rb
89
- - lib/generators/templates/application/merb/autotest/merb.rb
90
- - lib/generators/templates/application/merb/autotest/merb_rspec.rb
91
- - lib/generators/templates/application/merb/config
92
- - lib/generators/templates/application/merb/config/environments
93
- - lib/generators/templates/application/merb/config/environments/development.rb
94
- - lib/generators/templates/application/merb/config/environments/production.rb
95
- - lib/generators/templates/application/merb/config/environments/rake.rb
96
- - lib/generators/templates/application/merb/config/environments/staging.rb
97
- - lib/generators/templates/application/merb/config/environments/test.rb
98
- - lib/generators/templates/application/merb/config/init.rb
99
- - lib/generators/templates/application/merb/config/rack.rb
100
- - lib/generators/templates/application/merb/config/router.rb
101
- - lib/generators/templates/application/merb/public
102
- - lib/generators/templates/application/merb/public/favicon.ico
103
- - lib/generators/templates/application/merb/public/images
104
- - lib/generators/templates/application/merb/public/images/merb.jpg
105
- - lib/generators/templates/application/merb/public/merb.fcgi
106
- - lib/generators/templates/application/merb/public/robots.txt
107
- - lib/generators/templates/application/merb/public/stylesheets
108
- - lib/generators/templates/application/merb/public/stylesheets/master.css
109
- - lib/generators/templates/application/merb/spec
110
- - lib/generators/templates/application/merb/spec/spec.opts
111
- - lib/generators/templates/application/merb/spec/spec_helper.rb
112
- - lib/generators/templates/application/merb/test
113
- - lib/generators/templates/application/merb/test/test_helper.rb
75
+ - lib/generators/templates/application/merb_core
76
+ - lib/generators/templates/application/merb_core/app
77
+ - lib/generators/templates/application/merb_core/app/controllers
78
+ - lib/generators/templates/application/merb_core/app/controllers/application.rb
79
+ - lib/generators/templates/application/merb_core/app/controllers/exceptions.rb
80
+ - lib/generators/templates/application/merb_core/app/helpers
81
+ - lib/generators/templates/application/merb_core/app/helpers/global_helpers.rb
82
+ - lib/generators/templates/application/merb_core/app/views
83
+ - lib/generators/templates/application/merb_core/app/views/exceptions
84
+ - lib/generators/templates/application/merb_core/app/views/exceptions/internal_server_error.html.erb
85
+ - lib/generators/templates/application/merb_core/app/views/exceptions/not_acceptable.html.erb
86
+ - lib/generators/templates/application/merb_core/app/views/exceptions/not_found.html.erb
87
+ - lib/generators/templates/application/merb_core/autotest
88
+ - lib/generators/templates/application/merb_core/autotest/discover.rb
89
+ - lib/generators/templates/application/merb_core/autotest/merb.rb
90
+ - lib/generators/templates/application/merb_core/autotest/merb_rspec.rb
91
+ - lib/generators/templates/application/merb_core/config
92
+ - lib/generators/templates/application/merb_core/config/environments
93
+ - lib/generators/templates/application/merb_core/config/environments/development.rb
94
+ - lib/generators/templates/application/merb_core/config/environments/production.rb
95
+ - lib/generators/templates/application/merb_core/config/environments/rake.rb
96
+ - lib/generators/templates/application/merb_core/config/environments/staging.rb
97
+ - lib/generators/templates/application/merb_core/config/environments/test.rb
98
+ - lib/generators/templates/application/merb_core/config/init.rb
99
+ - lib/generators/templates/application/merb_core/config/rack.rb
100
+ - lib/generators/templates/application/merb_core/config/router.rb
101
+ - lib/generators/templates/application/merb_core/doc
102
+ - lib/generators/templates/application/merb_core/doc/rdoc
103
+ - lib/generators/templates/application/merb_core/doc/rdoc/generators
104
+ - lib/generators/templates/application/merb_core/doc/rdoc/generators/merb_generator.rb
105
+ - lib/generators/templates/application/merb_core/doc/rdoc/generators/template
106
+ - lib/generators/templates/application/merb_core/doc/rdoc/generators/template/merb
107
+ - lib/generators/templates/application/merb_core/doc/rdoc/generators/template/merb/api_grease.js
108
+ - lib/generators/templates/application/merb_core/doc/rdoc/generators/template/merb/index.html.erb
109
+ - lib/generators/templates/application/merb_core/doc/rdoc/generators/template/merb/merb.css
110
+ - lib/generators/templates/application/merb_core/doc/rdoc/generators/template/merb/merb.rb
111
+ - lib/generators/templates/application/merb_core/doc/rdoc/generators/template/merb/merb_doc_styles.css
112
+ - lib/generators/templates/application/merb_core/doc/rdoc/generators/template/merb/prototype.js
113
+ - lib/generators/templates/application/merb_core/lib
114
+ - lib/generators/templates/application/merb_core/lib/merb
115
+ - lib/generators/templates/application/merb_core/lib/merb/session.rb
116
+ - lib/generators/templates/application/merb_core/public
117
+ - lib/generators/templates/application/merb_core/public/favicon.ico
118
+ - lib/generators/templates/application/merb_core/public/images
119
+ - lib/generators/templates/application/merb_core/public/images/merb.jpg
120
+ - lib/generators/templates/application/merb_core/public/javascripts
121
+ - lib/generators/templates/application/merb_core/public/javascripts/application.js
122
+ - lib/generators/templates/application/merb_core/public/merb.fcgi
123
+ - lib/generators/templates/application/merb_core/public/robots.txt
124
+ - lib/generators/templates/application/merb_core/public/stylesheets
125
+ - lib/generators/templates/application/merb_core/public/stylesheets/master.css
126
+ - lib/generators/templates/application/merb_core/spec
127
+ - lib/generators/templates/application/merb_core/spec/spec.opts
128
+ - lib/generators/templates/application/merb_core/spec/spec_helper.rb
129
+ - lib/generators/templates/application/merb_core/test
130
+ - lib/generators/templates/application/merb_core/test/test_helper.rb
114
131
  - lib/generators/templates/application/merb_flat
115
132
  - lib/generators/templates/application/merb_flat/application.rbt
116
133
  - lib/generators/templates/application/merb_flat/config
@@ -138,6 +155,69 @@ files:
138
155
  - lib/generators/templates/application/merb_plugin/test/%base_name%_test.rb
139
156
  - lib/generators/templates/application/merb_plugin/test/test_helper.rb
140
157
  - lib/generators/templates/application/merb_plugin/TODO
158
+ - lib/generators/templates/application/merb_stack
159
+ - lib/generators/templates/application/merb_stack/app
160
+ - lib/generators/templates/application/merb_stack/app/controllers
161
+ - lib/generators/templates/application/merb_stack/app/controllers/application.rb
162
+ - lib/generators/templates/application/merb_stack/app/controllers/exceptions.rb
163
+ - lib/generators/templates/application/merb_stack/app/helpers
164
+ - lib/generators/templates/application/merb_stack/app/helpers/global_helpers.rb
165
+ - lib/generators/templates/application/merb_stack/app/models
166
+ - lib/generators/templates/application/merb_stack/app/models/user.rb
167
+ - lib/generators/templates/application/merb_stack/app/views
168
+ - lib/generators/templates/application/merb_stack/app/views/exceptions
169
+ - lib/generators/templates/application/merb_stack/app/views/exceptions/internal_server_error.html.erb
170
+ - lib/generators/templates/application/merb_stack/app/views/exceptions/not_acceptable.html.erb
171
+ - lib/generators/templates/application/merb_stack/app/views/exceptions/not_found.html.erb
172
+ - lib/generators/templates/application/merb_stack/autotest
173
+ - lib/generators/templates/application/merb_stack/autotest/discover.rb
174
+ - lib/generators/templates/application/merb_stack/autotest/merb.rb
175
+ - lib/generators/templates/application/merb_stack/autotest/merb_rspec.rb
176
+ - lib/generators/templates/application/merb_stack/config
177
+ - lib/generators/templates/application/merb_stack/config/database.yml
178
+ - lib/generators/templates/application/merb_stack/config/dependencies.rb
179
+ - lib/generators/templates/application/merb_stack/config/environments
180
+ - lib/generators/templates/application/merb_stack/config/environments/development.rb
181
+ - lib/generators/templates/application/merb_stack/config/environments/production.rb
182
+ - lib/generators/templates/application/merb_stack/config/environments/rake.rb
183
+ - lib/generators/templates/application/merb_stack/config/environments/staging.rb
184
+ - lib/generators/templates/application/merb_stack/config/environments/test.rb
185
+ - lib/generators/templates/application/merb_stack/config/init.rb
186
+ - lib/generators/templates/application/merb_stack/config/rack.rb
187
+ - lib/generators/templates/application/merb_stack/config/router.rb
188
+ - lib/generators/templates/application/merb_stack/doc
189
+ - lib/generators/templates/application/merb_stack/doc/rdoc
190
+ - lib/generators/templates/application/merb_stack/doc/rdoc/generators
191
+ - lib/generators/templates/application/merb_stack/doc/rdoc/generators/merb_generator.rb
192
+ - lib/generators/templates/application/merb_stack/doc/rdoc/generators/template
193
+ - lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb
194
+ - lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/api_grease.js
195
+ - lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/index.html.erb
196
+ - lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/merb.css
197
+ - lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/merb.rb
198
+ - lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/merb_doc_styles.css
199
+ - lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/prototype.js
200
+ - lib/generators/templates/application/merb_stack/merb
201
+ - lib/generators/templates/application/merb_stack/merb/merb-auth
202
+ - lib/generators/templates/application/merb_stack/merb/merb-auth/setup.rb
203
+ - lib/generators/templates/application/merb_stack/merb/merb-auth/strategies.rb
204
+ - lib/generators/templates/application/merb_stack/merb/session
205
+ - lib/generators/templates/application/merb_stack/merb/session/session.rb
206
+ - lib/generators/templates/application/merb_stack/public
207
+ - lib/generators/templates/application/merb_stack/public/favicon.ico
208
+ - lib/generators/templates/application/merb_stack/public/images
209
+ - lib/generators/templates/application/merb_stack/public/images/merb.jpg
210
+ - lib/generators/templates/application/merb_stack/public/javascripts
211
+ - lib/generators/templates/application/merb_stack/public/javascripts/application.js
212
+ - lib/generators/templates/application/merb_stack/public/merb.fcgi
213
+ - lib/generators/templates/application/merb_stack/public/robots.txt
214
+ - lib/generators/templates/application/merb_stack/public/stylesheets
215
+ - lib/generators/templates/application/merb_stack/public/stylesheets/master.css
216
+ - lib/generators/templates/application/merb_stack/spec
217
+ - lib/generators/templates/application/merb_stack/spec/spec.opts
218
+ - lib/generators/templates/application/merb_stack/spec/spec_helper.rb
219
+ - lib/generators/templates/application/merb_stack/test
220
+ - lib/generators/templates/application/merb_stack/test/test_helper.rb
141
221
  - lib/generators/templates/application/merb_very_flat
142
222
  - lib/generators/templates/application/merb_very_flat/application.rbt
143
223
  - lib/generators/templates/application/merb_very_flat/spec
@@ -162,9 +242,6 @@ files:
162
242
  - lib/generators/templates/component/helper/app
163
243
  - lib/generators/templates/component/helper/app/helpers
164
244
  - lib/generators/templates/component/helper/app/helpers/%file_name%_helper.rb
165
- - lib/generators/templates/component/helper/spec
166
- - lib/generators/templates/component/helper/spec/helpers
167
- - lib/generators/templates/component/helper/spec/helpers/%file_name%_helper_spec.rb
168
245
  - lib/generators/templates/component/layout
169
246
  - lib/generators/templates/component/layout/app
170
247
  - lib/generators/templates/component/layout/app/views
@@ -174,44 +251,16 @@ files:
174
251
  - lib/generators/templates/component/layout/spec/views
175
252
  - lib/generators/templates/component/layout/spec/views/layout
176
253
  - lib/generators/templates/component/layout/spec/views/layout/%file_name%.html.erb_spec.rb
177
- - lib/generators/templates/component/migration
178
- - lib/generators/templates/component/migration/activerecord
179
- - lib/generators/templates/component/migration/activerecord/schema
180
- - lib/generators/templates/component/migration/activerecord/schema/migrations
181
- - lib/generators/templates/component/migration/datamapper
182
- - lib/generators/templates/component/migration/datamapper/schema
183
- - lib/generators/templates/component/migration/datamapper/schema/migrations
184
- - lib/generators/templates/component/migration/sequel
185
- - lib/generators/templates/component/migration/sequel/schema
186
- - lib/generators/templates/component/migration/sequel/schema/migrations
187
254
  - lib/generators/templates/component/model
188
- - lib/generators/templates/component/model/activerecord
189
- - lib/generators/templates/component/model/activerecord/app
190
- - lib/generators/templates/component/model/activerecord/app/models
191
255
  - lib/generators/templates/component/model/app
192
256
  - lib/generators/templates/component/model/app/models
193
257
  - lib/generators/templates/component/model/app/models/%file_name%.rb
194
- - lib/generators/templates/component/model/datamapper
195
- - lib/generators/templates/component/model/datamapper/app
196
- - lib/generators/templates/component/model/datamapper/app/models
197
- - lib/generators/templates/component/model/none
198
- - lib/generators/templates/component/model/none/app
199
- - lib/generators/templates/component/model/none/app/models
200
- - lib/generators/templates/component/model/rspec
201
- - lib/generators/templates/component/model/rspec/spec
202
- - lib/generators/templates/component/model/rspec/spec/models
203
- - lib/generators/templates/component/model/sequel
204
- - lib/generators/templates/component/model/sequel/app
205
- - lib/generators/templates/component/model/sequel/app/models
206
258
  - lib/generators/templates/component/model/spec
207
259
  - lib/generators/templates/component/model/spec/models
208
260
  - lib/generators/templates/component/model/spec/models/%file_name%_spec.rb
209
261
  - lib/generators/templates/component/model/test
210
262
  - lib/generators/templates/component/model/test/models
211
263
  - lib/generators/templates/component/model/test/models/%file_name%_test.rb
212
- - lib/generators/templates/component/model/test_unit
213
- - lib/generators/templates/component/model/test_unit/test
214
- - lib/generators/templates/component/model/test_unit/test/models
215
264
  - lib/generators/templates/component/part_controller
216
265
  - lib/generators/templates/component/part_controller/app
217
266
  - lib/generators/templates/component/part_controller/app/parts
@@ -220,11 +269,6 @@ files:
220
269
  - lib/generators/templates/component/part_controller/app/parts/views/%file_name%_part
221
270
  - lib/generators/templates/component/part_controller/app/parts/views/%file_name%_part/index.html.erb
222
271
  - lib/generators/templates/component/resource_controller
223
- - lib/generators/templates/component/resource_controller/activerecord
224
- - lib/generators/templates/component/resource_controller/activerecord/app
225
- - lib/generators/templates/component/resource_controller/activerecord/app/controllers
226
- - lib/generators/templates/component/resource_controller/activerecord/app/views
227
- - lib/generators/templates/component/resource_controller/activerecord/app/views/%file_name%
228
272
  - lib/generators/templates/component/resource_controller/app
229
273
  - lib/generators/templates/component/resource_controller/app/controllers
230
274
  - lib/generators/templates/component/resource_controller/app/controllers/%file_name%.rb
@@ -234,35 +278,14 @@ files:
234
278
  - lib/generators/templates/component/resource_controller/app/views/%file_name%/index.html.erb
235
279
  - lib/generators/templates/component/resource_controller/app/views/%file_name%/new.html.erb
236
280
  - lib/generators/templates/component/resource_controller/app/views/%file_name%/show.html.erb
237
- - lib/generators/templates/component/resource_controller/datamapper
238
- - lib/generators/templates/component/resource_controller/datamapper/app
239
- - lib/generators/templates/component/resource_controller/datamapper/app/controllers
240
- - lib/generators/templates/component/resource_controller/datamapper/app/views
241
- - lib/generators/templates/component/resource_controller/datamapper/app/views/%file_name%
242
- - lib/generators/templates/component/resource_controller/none
243
- - lib/generators/templates/component/resource_controller/none/app
244
- - lib/generators/templates/component/resource_controller/none/app/controllers
245
- - lib/generators/templates/component/resource_controller/none/app/views
246
- - lib/generators/templates/component/resource_controller/none/app/views/%file_name%
247
- - lib/generators/templates/component/resource_controller/sequel
248
- - lib/generators/templates/component/resource_controller/sequel/app
249
- - lib/generators/templates/component/resource_controller/sequel/app/controllers
250
- - lib/generators/templates/component/resource_controller/sequel/app/views
251
- - lib/generators/templates/component/resource_controller/sequel/app/views/%file_name%
252
281
  - lib/generators/templates/component/resource_controller/spec
253
- - lib/generators/templates/component/resource_controller/spec/controllers
254
- - lib/generators/templates/component/resource_controller/spec/controllers/%file_name%_spec.rb
282
+ - lib/generators/templates/component/resource_controller/spec/requests
283
+ - lib/generators/templates/component/resource_controller/spec/requests/%file_name%_spec.rb
255
284
  - lib/generators/templates/component/resource_controller/test
256
285
  - lib/generators/templates/component/resource_controller/test/controllers
257
286
  - lib/generators/templates/component/resource_controller/test/controllers/%file_name%_test.rb
258
- - lib/generators/templates/component/session_migration
259
- - lib/generators/templates/component/session_migration/activerecord
260
- - lib/generators/templates/component/session_migration/activerecord/schema
261
- - lib/generators/templates/component/session_migration/activerecord/schema/migrations
262
- - lib/generators/templates/component/session_migration/sequel
263
- - lib/generators/templates/component/session_migration/sequel/schema
264
- - lib/generators/templates/component/session_migration/sequel/schema/migrations
265
287
  - lib/merb-gen
288
+ - lib/merb-gen/app_generator.rb
266
289
  - lib/merb-gen/generator.rb
267
290
  - lib/merb-gen/named_generator.rb
268
291
  - lib/merb-gen/namespaced_generator.rb
@@ -277,12 +300,11 @@ files:
277
300
  - spec/fixtures/templates/no_modules.test
278
301
  - spec/fixtures/templates/some_modules.test
279
302
  - spec/generator_spec.rb
280
- - spec/helper_spec.rb
281
303
  - spec/layout_spec.rb
304
+ - spec/merb_core_spec.rb
282
305
  - spec/merb_flat_spec.rb
283
- - spec/merb_full_spec.rb
284
306
  - spec/merb_plugin_spec.rb
285
- - spec/merb_spec.rb
307
+ - spec/merb_stack_spec.rb
286
308
  - spec/merb_very_flat_spec.rb
287
309
  - spec/migration_spec.rb
288
310
  - spec/model_spec.rb
@@ -1,85 +0,0 @@
1
- module Merb::Generators
2
- class MerbFullGenerator < NamedGenerator
3
- #
4
- # ==== Paths
5
- #
6
-
7
- def self.source_root
8
- File.join(super, 'application', 'merb')
9
- end
10
-
11
- def self.common_templates_dir
12
- File.expand_path(File.join(File.dirname(__FILE__), '..',
13
- 'templates', 'application', 'common'))
14
- end
15
-
16
- def destination_root
17
- File.join(@destination_root, base_name)
18
- end
19
-
20
- def common_templates_dir
21
- self.class.common_templates_dir
22
- end
23
-
24
- #
25
- # ==== Generator options
26
- #
27
-
28
- option :testing_framework, :default => :rspec,
29
- :desc => 'Testing framework to use (one of: rspec, test_unit).'
30
- option :orm, :default => :none,
31
- :desc => 'Object-Relation Mapper to use (one of: none, activerecord, datamapper, sequel).'
32
- option :template_engine, :default => :erb,
33
- :desc => 'Template engine to prefer for this application (one of: erb, haml).'
34
-
35
- desc <<-DESC
36
- This generates a Merb application with Ruby on Rails like structure.
37
- Generator lets you configure your ORM and testing framework of choice.
38
- DESC
39
-
40
- first_argument :name, :required => true, :desc => "Application name"
41
-
42
- #
43
- # ==== Common directories & files
44
- #
45
-
46
- empty_directory :gems, 'gems'
47
- file :thorfile do |file|
48
- file.source = File.join(common_templates_dir, "merb.thor")
49
- file.destination = "merb.thor"
50
- end
51
-
52
- template :rakefile do |template|
53
- template.source = File.join(common_templates_dir, "Rakefile")
54
- template.destination = "Rakefile"
55
- end
56
-
57
- template :gitignore do |template|
58
- template.source = File.join(common_templates_dir, 'dotgitignore')
59
- template.destination = ".gitignore"
60
- end
61
-
62
- directory :test_dir do |directory|
63
- dir = testing_framework == :rspec ? "spec" : "test"
64
-
65
- directory.source = File.join(source_root, dir)
66
- directory.destination = dir
67
- end
68
-
69
- #
70
- # ==== Layout specific things
71
- #
72
-
73
- glob! "app"
74
- glob! "autotest"
75
- glob! "config"
76
- glob! "public"
77
-
78
- invoke :layout do |generator|
79
- generator.new(destination_root, options, 'application')
80
- end
81
- end
82
-
83
- add_private :app_full, MerbFullGenerator
84
-
85
- end
@@ -1,24 +0,0 @@
1
- module Merb::Generators
2
-
3
- class MerbGenerator < Generator
4
-
5
- option :testing_framework, :default => :rspec, :desc => 'Testing framework to use (one of: rspec, test_unit)'
6
- option :orm, :default => :none, :desc => 'Object-Relation Mapper to use (one of: none, activerecord, datamapper, sequel)'
7
- option :flat, :as => :boolean, :desc => "Generate a flat application: one file + configs + templates directory."
8
- option :very_flat, :as => :boolean, :desc => "Generate a very flat, Sinatra-like one file application."
9
-
10
- desc <<-DESC
11
- Generates a merb application.
12
- DESC
13
-
14
- first_argument :name, :required => true, :desc => "Application name"
15
-
16
- invoke :app_full, :flat => nil, :very_flat => nil
17
- invoke :app_flat, :flat => true
18
- invoke :app_very_flat, :very_flat => true
19
-
20
- end
21
-
22
- add :app, MerbGenerator
23
-
24
- end
@@ -1,7 +0,0 @@
1
- Merb.logger.info("Loaded STAGING Environment...")
2
- Merb::Config.use { |c|
3
- c[:exception_details] = false
4
- c[:reload_classes] = false
5
- c[:log_level] = :error
6
- c[:log_file] = Merb.log_path + "/staging.log"
7
- }
@@ -1,7 +0,0 @@
1
- Merb.logger.info("Loaded TEST Environment...")
2
- Merb::Config.use { |c|
3
- c[:testing] = true
4
- c[:exception_details] = true
5
- c[:log_auto_flush ] = true
6
- c[:log_level] = :fatal
7
- }
@@ -1,5 +0,0 @@
1
- require File.join(File.dirname(__FILE__), <%= go_up(modules.size + 1) %>, 'spec_helper.rb')
2
-
3
- describe Merb::<%= full_class_name %>Helper do
4
-
5
- end
@@ -1,7 +0,0 @@
1
- require File.join(File.dirname(__FILE__), <%= go_up(modules.size + 1) %>, 'spec_helper.rb')
2
-
3
- describe <%= full_class_name %>, "index action" do
4
- before(:each) do
5
- dispatch_to(<%= full_class_name %>, :index)
6
- end
7
- end
data/spec/helper_spec.rb DELETED
@@ -1,43 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- describe Merb::Generators::HelperGenerator do
4
-
5
- before(:each) do
6
- @generator = Merb::Generators::HelperGenerator.new('/tmp', {}, 'Stuff')
7
- end
8
-
9
- it_should_behave_like "namespaced generator"
10
-
11
- it "should create a helper" do
12
- @generator.should create('/tmp/app/helpers/stuff_helper.rb')
13
- end
14
-
15
- describe "with rspec" do
16
-
17
- it "should create a helper spec" do
18
- @generator.should create('/tmp/spec/helpers/stuff_helper_spec.rb')
19
- end
20
-
21
- end
22
-
23
- describe "with a namespace" do
24
-
25
- before(:each) do
26
- @generator = Merb::Generators::HelperGenerator.new('/tmp', {}, 'John::Monkey::Stuff')
27
- end
28
-
29
- it "should create a helper" do
30
- @generator.should create('/tmp/app/helpers/john/monkey/stuff_helper.rb')
31
- end
32
-
33
- describe "with rspec" do
34
-
35
- it "should create a helper spec" do
36
- @generator.should create('/tmp/spec/helpers/john/monkey/stuff_helper_spec.rb')
37
- end
38
-
39
- end
40
-
41
- end
42
-
43
- end
data/spec/merb_spec.rb DELETED
@@ -1,20 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- describe Merb::Generators::MerbGenerator do
4
-
5
- it "should invoke the full generator by default" do
6
- @generator = Merb::Generators::MerbGenerator.new('/tmp', {}, 'testing')
7
- @generator.should invoke(Merb::Generators::MerbFullGenerator).with('testing')
8
- end
9
-
10
- it "should invoke the flat generator if flat is true" do
11
- @generator = Merb::Generators::MerbGenerator.new('/tmp', { :flat => true }, 'testing')
12
- @generator.should invoke(Merb::Generators::MerbFlatGenerator).with('testing')
13
- end
14
-
15
- it "should invoke the very flat generator if very flat is true" do
16
- @generator = Merb::Generators::MerbGenerator.new('/tmp', { :very_flat => true }, 'testing')
17
- @generator.should invoke(Merb::Generators::MerbVeryFlatGenerator).with('testing')
18
- end
19
-
20
- end