Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Engle committed Mar 9, 2009
0 parents commit fbcf185
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
.DS_STORE
Empty file added README
Empty file.
133 changes: 133 additions & 0 deletions base_template.rb
@@ -0,0 +1,133 @@
run "touch public/stylesheets/styles.css"
run "cp config/database.yml condig/database.yml.example"
run "touch tmp/.gitignore log/.gitignore vendor/.gitignore"

if yes?("Use mysql for development?")
# how do you access the app name from the rails command?
app_name = ask("Enter the name of the database to create")
file "config/database.yml", <<-END
development:
adapter: mysql
database: #{app_name}_development
username: root
password:
host: localhost
test:
adapter: sqlite3
database: db/test.sqlite3
timeout: 5000
production:
adapter: sqlite3
database: db/test.sqlite3
timeout: 5000
END
run "mysqladmin -u root create #{app_name}_development"
end

run "echo TODO > README"
run "rm public/index.html"

plugin "will_paginate", :git => "git://github.com/engled68/will_paginate.git"
plugin "rspec", :git => "git://github.com/dchelimsky/rspec.git"
plugin "rspec-rails", :git => "git://github.com/dchelimsky/rspec-rails.git"
plugin "aasm", :git => "git://github.com/rubyist/aasm.git"
plugin "restful-authentication", :git => "git://github.com/technoweenie/restful-authentication.git"
plugin "exception_notification", :git => "git://github.com/rails/exception_notification.git"

if yes?("Do you want to use query_reviewer?")
plugin "query_reviewer", :git => "git://github.com/dsboulder/query_reviewer.git"
end

generate :rspec
generate :authenticated, "user sessions --include-activation --aasm --rspec"

generate :controller, "welcome index"
route "map.root :controller => 'welcome'"

# reset css from http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/
file "public/stylesheets/reset.css", <<-END
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
/* remember to define focus styles! */
:focus {
outline: 0;
}
body {
line-height: 1;
color: black;
background: white;
}
ol, ul {
list-style: none;
}
/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse: separate;
border-spacing: 0;
}
caption, th, td {
text-align: left;
font-weight: normal;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: "";
}
blockquote, q {
quotes: "" "";
}
END

run "curl http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js > public/javascripts/jquery-1.3.2.min.js"

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" />
<title><%= controller.controller_name %>: <%= controller.action_name %></title>
<%= javascript_include_tag "jquery-1.3.2.min.js", "application" %>
<%= stylesheet_link_tag "reset", "styles" %>
</head>
<body>
<p style="color: green"><%= flash[:notice] %></p>
<%= yield %>
</body>
</html>
END

git :init

file ".gitignore", <<-END
.DS_STORE
log/*.log
tmp/**/*
config/database.yml
db/*.sqlite3
END

git :add => ".", :commit => "-m 'initial commit'"

0 comments on commit fbcf185

Please sign in to comment.