etc/rails/template.rb in zsh_dots-0.5.8 vs etc/rails/template.rb in zsh_dots-0.5.9
- old
+ new
@@ -14,10 +14,11 @@
gem_group :test do
gem 'rspec-rails'
gem 'capybara'
end
+# Template files
initializer "generators.rb", <<-RUBY
Rails.application.config.generators do |g|
g.template_engine :haml
g.test_framework :rspec, fixtures: true, fixture_location: "spec/fixtures"
end
@@ -35,12 +36,16 @@
file(name) { IO.read File.expand_path("~/etc/rails/template/#{name}") }
end
file("README.md") { "# #{app_name.titleize}" }
+# Set up the database
run "createuser -s #{app_name}"
-run "bundle install"
-run "bundle exec rails generate rspec:install"
rake 'db:create'
rake 'db:test:prepare'
+
+# Generate necessary code
+run "bundle install"
+run "bundle exec rails generate rspec:install"
+
run "rm -rf test/; rm -rf README.rdoc; rm -rf public/index.html"
run "git init && git add . && git commit -am 'Initial commit.'"