Sha256: fc4cce6a24b904ddf2bc952361cc5ef5a5e95146a5d6377503f7f8c5dd3dc85b

Contents?: true

Size: 997 Bytes

Versions: 1

Compression:

Stored size: 997 Bytes

Contents

#
# Default Rails application template
#

gem 'haml'

gem_group :development do
  gem 'haml-rails'
  gem 'ruby_parser'
  gem 'hpricot'
  gem 'puma'
end

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
RUBY

rakefile "base.rake" do
  <<-RUBY
task :server do
  sh "rails server puma"
end
  RUBY
end

%w(.env .travis.yml).each do |name|
  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}"
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.'"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zsh_dots-0.5.9 etc/rails/template.rb