diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-01-18 02:00:41 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-01-18 02:00:41 -0500 |
commit | aa70abbc55463fa4f4361ac0def809d4e29d7e3b (patch) | |
tree | 74a83415f2da32e46c7af316b22eb63d70bbfe11 /railties/lib | |
parent | 8d009674af182f369b5e9d2a587dbf625dcdd0c4 (diff) | |
parent | 8989a5057b6dc0e287a8b27ded31f08c5e56d0a7 (diff) | |
download | rails-aa70abbc55463fa4f4361ac0def809d4e29d7e3b.tar.gz rails-aa70abbc55463fa4f4361ac0def809d4e29d7e3b.tar.bz2 rails-aa70abbc55463fa4f4361ac0def809d4e29d7e3b.zip |
Merge pull request #27632 from dixpac/repo_initialize
Initalize git repo when creatin new rails app
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/rails/app/app_generator.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index 8efdfdcb44..bdeebbb8b5 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -53,6 +53,12 @@ module Rails template "gitignore", ".gitignore" end + def version_control + unless options[:skip_git] + run "git init" + end + end + def app directory "app" @@ -205,6 +211,7 @@ module Rails build(:configru) build(:gitignore) unless options[:skip_git] build(:gemfile) unless options[:skip_gemfile] + build(:version_control) end def create_app_files |