Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions recipes/git.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@
# https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/git.rb

## Git
say_wizard "initialize git"
prefs[:git] = true unless prefs.has_key? :git
if prefer :git, true
copy_from 'https://raw.github.com/RailsApps/rails-composer/master/files/gitignore.txt', '.gitignore'
git :init
if !File.directory?('.git')
say_wizard "initialize git"
git :init
end
if !File.file?('.gitignore')
copy_from 'https://raw.github.com/RailsApps/rails-composer/master/files/gitignore.txt', '.gitignore'
end
git :add => '-A'
git :commit => '-qm "rails_apps_composer: initial commit"'
else
stage_three do
say_wizard "recipe stage three"
say_wizard "removing .gitignore and .gitkeep files"
git_files = Dir[File.join('**','.gitkeep')] + Dir[File.join('**','.gitignore')]
File.unlink git_files
end
end

__END__
Expand Down