Created
August 30, 2010 21:17
-
-
Save madebydna/558067 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
rvmrc = <<-RVMRC | |
rvm_gemset_create_on_use_flag=1 | |
rvm_trust_rvmrcs=1 | |
rvm gemset use #{app_name} | |
RVMRC | |
create_file ".rvmrc", rvmrc | |
# Attempting to create/activate gemset and install gems via Bundler | |
# 1st attempt (what I would do in the console) | |
run "cd path/to/new/app" | |
run 'gem install bundler --pre' | |
run 'bundle install' | |
# 2nd attempt (using inside(path, &block)) | |
inside app_name do | |
run 'gem install bundler --pre' | |
run 'bundle install' | |
end | |
# 3rd attempt (actually creating and switching to new rvm gemset) | |
inside app_name do | |
run "rvm gemset create #{app_name} && rvm gemset use #{app_name}" | |
run 'gem install bundler --pre' | |
run 'bundle install' | |
end | |
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
require File.join(File.dirname(__FILE__), 'core_extensions.rb') | |
#Create Gemspec | |
rvmrc = <<-RVMRC | |
rvm_gemset_create_on_use_flag=1 | |
rvm_trust_rvmrcs=1 | |
rvm gemset use #{app_name} | |
RVMRC | |
create_file ".rvmrc", rvmrc | |
initialize_templater | |
required_recipes = %w(default jquery haml rspec factory_girl remarkable) | |
required_recipes.each {|required_recipe| apply recipe(required_recipe)} | |
load_options | |
apply(recipe('cucumber')) if yes?("Do you want to some cukes?") | |
apply recipe('design') | |
apply recipe('mongoid') | |
#run "cd ~/rails3_sites/#{app_name}" | |
inside app_name do | |
run 'gem install bundler --pre' | |
run 'bundle install' | |
end | |
execute_stategies | |
generators_configuration = <<-END | |
config.generators do |g| | |
g.template_engine :haml | |
g.test_framework :rspec, :fixture => true, :views => false | |
g.fixture_replacement :factory_girl, :dir => "spec/factories" | |
g.stylesheets false | |
end | |
END | |
environment generators_configuration | |
git :add => "." | |
git :commit => "-m 'Initial commit'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment