public
Fork of wycats/merb-more
Description: Merb More: The Full Stack. Take what you need; leave what you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/jnicklas/merb-more.git
moved helper to own generator
jnicklas (author)
Mon Jun 30 07:03:44 -0700 2008
commit  1a2575b78c1084f31b203fe820f80175a65cf167
tree    62e71b44d84bbade860d622d5c32d2c3c75c37c8
parent  47f11afad6136f89c8dc98d8a64ecfff3dc5bbcc
...
11
12
13
 
14
15
16
...
11
12
13
14
15
16
17
0
@@ -11,6 +11,7 @@ require path / "merb_flat"
0
 require path / "merb_very_flat"
0
 require path / "merb_plugin"
0
 require path / "controller"
0
+require path / "helper"
0
 require path / "part_controller"
0
 require path / "migration"
0
 require path / "model"
...
14
15
16
 
 
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
...
14
15
16
17
18
19
20
21
22
23
 
 
 
 
 
24
25
26
27
28
 
 
 
 
 
29
30
31
0
@@ -14,26 +14,18 @@ module Merb::Generators
0
     
0
     first_argument :name, :required => true
0
     
0
+ invoke :helper
0
+
0
     template :controller do
0
       source('controller.rbt')
0
       destination("app/controllers/#{file_name}.rb")
0
     end
0
     
0
- template :helper do
0
- source('helper.rbt')
0
- destination("app/helpers/#{file_name}_helper.rb")
0
- end
0
-
0
     template :index do
0
       source('index.html.erbt')
0
       destination("app/views/#{file_name}/index.html.erb")
0
     end
0
     
0
- template :helper_spec, :testing_framework => :rspec do
0
- source('helper_spec.rbt')
0
- destination("spec/helpers/#{file_name}_helper_spec.rb")
0
- end
0
-
0
     template :controller_spec, :testing_framework => :rspec do
0
       source('controller_spec.rbt')
0
       destination("spec/controllers/#{file_name}_spec.rb")
...
16
17
18
 
 
 
 
19
20
21
...
33
34
35
36
37
38
39
40
41
42
43
...
16
17
18
19
20
21
22
23
24
25
...
37
38
39
 
 
 
 
 
40
41
42
0
@@ -16,6 +16,10 @@ module Merb::Generators
0
     first_argument :name, :required => true
0
     second_argument :attributes, :as => :hash, :default => {}
0
     
0
+ invoke :helper do |generator|
0
+ generator.new(destination_root, options, name)
0
+ end
0
+
0
     # add controller and view templates for each of the four big ORM's
0
     [:none, :activerecord, :sequel, :datamapper].each do |orm|
0
     
0
@@ -33,11 +37,6 @@ module Merb::Generators
0
     
0
     end
0
     
0
- template :helpers do
0
- source("helpers.rbt")
0
- destination("app/helpers/#{file_name}_helper.rb")
0
- end
0
-
0
     def controller_modules
0
       chunks[0..-2]
0
     end

Comments

    No one has commented yet.