Skip to content

Instantly share code, notes, and snippets.

@ursm
Created July 12, 2010 05:36
Show Gist options
  • Save ursm/472152 to your computer and use it in GitHub Desktop.
Save ursm/472152 to your computer and use it in GitHub Desktop.
gem 'rails3-generators'
gem 'mongoid', '>= 2.0.0.beta'
gem 'bson_ext'
gem 'haml'
gem 'hirb', :group => :development
gem 'what_methods', :group => :development
gem 'rspec-rails', '>= 2.0.0.beta', :group => :test
gem 'rr', :group => :test
gem 'machinist_mongo', :require => 'machinist/mongoid', :group => :test
gem 'tapp', :group => %w(development test)
run 'bundle install'
run 'bundle lock'
generate 'mongoid:config'
generate 'haml:install'
generate 'rspec:install'
application <<-'CONF'
config.generators do |g|
g.orm :mongoid
g.template_engine :haml
g.test_framework :rspec, :fixture => false, :views => false
g.fixture_replacement :machinist, :dir => 'spec/blueprints'
end
CONF
initializer 'mongoid.rb' do
<<-'CONF'
if defined?(PhusionPassenger)
PhusionPassenger.on_event(:starting_worker_process) do |forked|
Mongoid.master.connection.connect_to_master if forked
end
end
CONF
end
initializer 'logger.rb' do
<<-'CONF'
unless Rails.env.production?
Rails.logger = Logger.new(Rails.root.join("log/#{Rails.env}.log"), 2, 200.megabytes)
end
CONF
end
git :init
git :add => '.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment