Created
July 13, 2010 09:42
-
-
Save nmerouze/473676 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem "mongoid", ">= 2.0.0.beta9" | |
gem "bson_ext", ">= 1.0.3" | |
gem "haml", ">= 3.0.12" | |
gem "rspec-rails", ">= 2.0.0.beta.15", :group => :test | |
generators = <<-GENERATORS | |
config.generators do |g| | |
g.orm :mongoid | |
g.template_engine :haml | |
g.test_framework :rspec, :fixture => true, :views => false | |
end | |
GENERATORS | |
application generators | |
get "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", "public/javascripts/jquery.js" | |
get "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js", "public/javascripts/jquery-ui.js" | |
get "http://github.com/rails/jquery-ujs/raw/master/src/rails.js", "public/javascripts/rails.js" | |
jquery = <<-JQUERY | |
module ActionView::Helpers::AssetTagHelper | |
remove_const :JAVASCRIPT_DEFAULT_SOURCES | |
JAVASCRIPT_DEFAULT_SOURCES = %w(jquery.js jquery-ui.js rails.js) | |
reset_javascript_include_default | |
end | |
JQUERY | |
initializer "jquery.rb", jquery | |
layout = <<-LAYOUT | |
!!! | |
%html | |
%head | |
%title #{app_name.humanize} | |
= stylesheet_link_tag :all | |
= javascript_include_tag :defaults | |
= csrf_meta_tag | |
%body | |
= yield | |
LAYOUT | |
remove_file "app/views/layouts/application.html.erb" | |
create_file "app/views/layouts/application.html.haml", layout | |
create_file "log/.gitkeep" | |
create_file "tmp/.gitkeep" | |
git :init | |
git :add => "." | |
docs = <<-DOCS | |
Run the following commands to complete the setup of #{app_name.humanize}: | |
% cd #{app_name} | |
% gem install bundler | |
% bundle install | |
% bundle lock | |
% script/rails generate mongoid:config | |
% script/rails generate rspec:install | |
DOCS | |
log docs |
Author
nmerouze
commented
Jul 15, 2010
- To follow the updates 2. To include jQuery UI 3. Because I took the template from Les Hill and modified it to match my needs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment