augustl (owner)

Revisions

gist: 61633 Download_button fork
public
Description:
Rails 2.3 app template
Public Clone URL: git://gist.github.com/61633.git
Embed All Files: show embed
app_template.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Remove some files we don't need.
%w(public/javascripts/* public/index.html public/images/rails.png).each do |path_spec|
  run "rm #{path_spec}"
end
 
# jQuery!
run "curl http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js > public/javascripts/jquery.js"
file "public/javascripts/application.js"
 
# Create app/views/layouts/application.html.erb
file "app/views/layouts/application.html.erb", <<-END
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<%= javascript_include_tag "jquery", "application", :cache => true %>
<%= stylesheet_link_tag "screen" %>
<title></title>
</head>
<body>
<div id="wrapper">
<%= yield %>
</div>
</body>
</html>
END
 
file "public/stylesheets/screen.less"
 
run "echo 'Less::More.destination_path = \"public/stylesheets\"' > config/initializers/app.rb"
 
# Empty the README
run "echo '' > README"
 
# Clean routes.rb
run "echo 'ActionController::Routing::Routes.draw do |map|
end' > config/routes.rb"
 
# Git
run "git init"
run "echo '.DS_Store
*.log
*.pid
*.sqlite3
config/database.yml
config/settings.yml
db/schema.rb
public/stylesheets/*.css
tmp/**/*' > .gitignore"
 
run "git submodule add git://github.com/cloudhead/more.git vendor/plugins/more"