Created
July 9, 2017 13:40
-
-
Save jacoyutorius/287be5b7a99825ed89c1a054e0aca872 to your computer and use it in GitHub Desktop.
rails template
This file contains hidden or 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
| # rails template | |
| # rails new testapp -m ./template.rb --skip-bundle --skip-test | |
| # development, test | |
| gem_group :development, :test do | |
| gem "better_errors" | |
| gem "binding_of_caller" | |
| gem "pry-byebug" | |
| gem "pry-doc" | |
| gem "bullet" | |
| gem "awesome_print" | |
| gem "yard" | |
| gem "letter_opener" | |
| gem "letter_opener_web" | |
| gem "hirb" | |
| gem "hirb-unicode" | |
| gem "rubocop" | |
| gem "rubocop-rspec" | |
| end | |
| # test | |
| gem_group :test do | |
| gem "rspec-rails" | |
| gem "rails-controller-testing" | |
| gem "spring-commands-rspec" | |
| gem "factory_girl_rails" | |
| gem "database_cleaner" | |
| gem "delorean" | |
| gem "autodoc" | |
| gem "redcarpet" | |
| gem "guard-rspec" | |
| gem "email_spec" | |
| end | |
| # deploy | |
| gem_group :deployment do | |
| gem "capistrano" | |
| gem "capistrano-rails" | |
| gem "rvm-capistrano" | |
| gem "capistrano-bundler" | |
| gem "capistrano3-unicorn" | |
| gem "capistrano-rails-console" | |
| gem "unicorn-worker-killer" | |
| end | |
| gem "unicorn" | |
| gem "date_validator" | |
| gem "email_validator" | |
| gem "rails-i18n" | |
| gem "hashie" | |
| gem "lograge" | |
| gem "logstash-event" | |
| gem "yaml_db" | |
| gem "whenever" | |
| gem "rack-mini-profiler", require: false | |
| environment <<-EOF | |
| config.generators do |g| | |
| g.orm :active_record | |
| g.helper false | |
| g.assets false | |
| g.test_framework :rspec | |
| g.controller_specs true | |
| g.helper_specs true | |
| g.view_specs false | |
| g.fixture_replacement :factory_girl, dir: "spec/support/factories" | |
| end | |
| EOF | |
| environment <<-EOF | |
| config.time_zone = "Tokyo" | |
| config.i18n.load_path += Dir[Rails.root.join("config", "locales", "**", "*.{rb, yml}").to_s] | |
| config.i18n.default_locale = :ja | |
| EOF | |
| after_bundle do | |
| run("bundle install --path .bundle --jobs=4") | |
| # users | |
| generate(:scaffold, "user name:string age:numeric birth:date note:text") | |
| route "root to: 'users#index' " | |
| rake("db:migrate") | |
| # initialize rspec | |
| run("bin/rails generate rspec:install") | |
| run("bin/bundle binstubs rspec-core") | |
| # run rubocop | |
| run("bin/bundle exec rubocop --auto-correct --auto-gen-config") | |
| # run spec | |
| run("bin/rspec") | |
| git :init | |
| git add: "." | |
| git commit: %Q{ -m "first commit" } | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment