Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix .gitignore master.key bug. #374

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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