Skip to content

Commit

Permalink
Update .gitignore and .keep files
Browse files Browse the repository at this point in the history
* These directories already exist and have a `.keep` file.
* Follow Rails' convention of `.keep` instead of `.gitkeep`.
* Totally replace `.gitignore` for cleanliness and to allow Suspenders
  to be run with thor's `-G` flag.

Fixes:

#183
  • Loading branch information
Dan Croak committed Aug 3, 2013
1 parent f11c795 commit 937459a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 3 additions & 9 deletions lib/suspenders/app_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,25 +183,19 @@ def setup_stylesheets
end

def gitignore_files
concat_file 'suspenders_gitignore', '.gitignore'
remove_file '.gitignore'
copy_file 'suspenders_gitignore', '.gitignore'
[
'app/models',
'app/assets/images',
'app/views/pages',
'db/migrate',
'log',
'spec/support',
'spec/lib',
'spec/models',
'spec/views',
'spec/controllers',
'spec/helpers',
'spec/support/matchers',
'spec/support/mixins',
'spec/support/shared_examples'
].each do |dir|
run "mkdir #{dir}"
run "touch #{dir}/.gitkeep"
run "touch #{dir}/.keep"
end
end

Expand Down
10 changes: 8 additions & 2 deletions templates/suspenders_gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
!.keep
*.DS_Store
*.swo
*.swp
.env
.bundle
.sass-cache/
bin/stubs
coverage/*
db/*.sqlite3
db/schema.rb
log/*
public/system
rerun.txt
tags
vendor/bundler_gems
tmp/*
tmp/**/*

0 comments on commit 937459a

Please sign in to comment.