Skip to content

Instantly share code, notes, and snippets.

@dfreerksen
Last active April 15, 2016 05:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dfreerksen/0270bbb7cf153497d5dce6b691c747e2 to your computer and use it in GitHub Desktop.
Save dfreerksen/0270bbb7cf153497d5dce6b691c747e2 to your computer and use it in GitHub Desktop.
Rails application template
# coding: utf-8
# Rails init template
#
# Usage
#
# $ rails new app_name -m https://gist.githubusercontent.com/dfreerksen/0270bbb7cf153497d5dce6b691c747e2/raw/.template.rb
# Gemfile
run "rm Gemfile"
get "https://gist.githubusercontent.com/dfreerksen/0270bbb7cf153497d5dce6b691c747e2/raw/Gemfile", "Gemfile"
# .gitignore
run "rm .gitignore"
get "https://gist.githubusercontent.com/dfreerksen/0270bbb7cf153497d5dce6b691c747e2/raw/gitignore", ".gitignore"
# .rubocop.yml
get "https://gist.githubusercontent.com/dfreerksen/0270bbb7cf153497d5dce6b691c747e2/raw/rubocop.yml", ".rubocop.yml"
# .ruby-version
get "https://gist.githubusercontent.com/dfreerksen/0270bbb7cf153497d5dce6b691c747e2/raw/ruby-version", ".ruby-version"
# README
run "mv README.rdoc README.md"
source "https://rubygems.org"
gem "rails", "4.2"
# gem "therubyracer", platforms: :ruby
gem "bcrypt", "~> 3.1.7"
gem "sqlite3"
gem "coffee-rails", "~> 4.1.0"
gem "jbuilder", "~> 2.0"
gem "jquery-rails"
gem "sass-rails", "~> 5.0"
gem "turbolinks"
gem "uglifier", ">= 1.3.0"
group :development do
gem "spring"
# gem "capistrano-rails"
end
group :development, :test do
gem "pry-byebug", "~> 3.3"
end
group :test do
gem "capybara", "~> 2.6"
gem "database_cleaner", "~> 1.5"
gem "factory_girl_rails", "~> 4.6"
gem "launchy"
gem "poltergeist", "~> 1.9"
gem "pry-byebug", "~> 3.3"
gem "rspec-rails", "~> 3.4"
gem "simplecov", "~> 0.11"
gem "sqlite3"
end
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
.bundle/
tmp/
.DS_Store
.Trashes
Thumbs.db
coverage/
Desktop.ini
log/*.log
db/*.sqlite3
db/*.sqlite3-journal
AllCops:
Include:
- Rakefile
- config.ru
Exclude:
- "bin/**/*"
- "db/schema.rb"
- "db/migrate/**/*"
- "spec/dummy/**/*"
Documentation:
Enabled: false
DotPosition:
EnforcedStyle: leading
LineLength:
Max: 80
StringLiterals:
EnforcedStyle: double_quotes
StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
@dfreerksen
Copy link
Author

Usage

rails new app_name -m https://gist.githubusercontent.com/dfreerksen/0270bbb7cf153497d5dce6b691c747e2/raw/.template.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment