The application builder allows you to override elements of the application
generator without being forced to reverse the operations of the default
generator.
This allows you to override entire operations, like the creation of the
Gemfile, README, or JavaScript files, without needing to know exactly what
those operations do so you can create another template action.
Methods
- A
-
- C
-
- D
-
- G
-
- L
-
- P
-
- R
-
- S
-
- T
-
- V
-
Instance Public methods
Source: show
| on GitHub
57: def app
58: directory 'app'
59: git_keep 'app/mailers'
60: git_keep 'app/models'
61: end
Source: show
| on GitHub
63: def config
64: empty_directory "config"
65:
66: inside "config" do
67: template "routes.rb"
68: template "application.rb"
69: template "environment.rb"
70:
71: directory "environments"
72: directory "initializers"
73: directory "locales"
74: end
75: end
Source: show
| on GitHub
49: def configru
50: template "config.ru"
51: end
Source: show
| on GitHub
77: def database_yml
78: template "config/databases/#{options[:database]}.yml", "config/database.yml"
79: end
Source: show
| on GitHub
45: def gemfile
46: template "Gemfile"
47: end
Source: show
| on GitHub
53: def gitignore
54: copy_file "gitignore", ".gitignore"
55: end
Source: show
| on GitHub
89: def lib
90: empty_directory "lib"
91: empty_directory_with_gitkeep "lib/tasks"
92: empty_directory_with_gitkeep "lib/assets"
93: end
Source: show
| on GitHub
95: def log
96: empty_directory_with_gitkeep "log"
97: end
Source: show
| on GitHub
99: def public_directory
100: directory "public", "public", :recursive => false
101: end
Source: show
| on GitHub
37: def rakefile
38: template "Rakefile"
39: end
Source: show
| on GitHub
41: def readme
42: copy_file "README", "README.rdoc"
43: end
Source: show
| on GitHub
103: def script
104: directory "script" do |content|
105: "#{shebang}\n" + content
106: end
107: chmod "script", 0755, :verbose => false
108: end
Source: show
| on GitHub
110: def test
111: empty_directory_with_gitkeep "test/fixtures"
112: empty_directory_with_gitkeep "test/functional"
113: empty_directory_with_gitkeep "test/integration"
114: empty_directory_with_gitkeep "test/unit"
115:
116: template "test/performance/browsing_test.rb"
117: template "test/test_helper.rb"
118: end
Source: show
| on GitHub
120: def tmp
121: empty_directory "tmp/cache"
122: empty_directory "tmp/cache/assets"
123: end
Source: show
| on GitHub
125: def vendor
126: vendor_javascripts
127: vendor_stylesheets
128: vendor_plugins
129: end
Source: show
| on GitHub
131: def vendor_javascripts
132: empty_directory_with_gitkeep "vendor/assets/javascripts"
133: end
Source: show
| on GitHub
139: def vendor_plugins
140: empty_directory_with_gitkeep "vendor/plugins"
141: end
Source: show
| on GitHub
135: def vendor_stylesheets
136: empty_directory_with_gitkeep "vendor/assets/stylesheets"
137: end