Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit b855cea

Browse files
authored
Extracts gitignore into a separate file (#17)
1 parent ccb15ec commit b855cea

File tree

2 files changed

+34
-25
lines changed

2 files changed

+34
-25
lines changed

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
!/log/.keep
2+
*.rdb
3+
.bundle
4+
config/application.yml
5+
config/database.yml
6+
config/secrets.yml
7+
config/secrets.*.yml
8+
log/*
9+
public/assets
10+
public/uploads
11+
tmp
12+
.DS_Store
13+
*.sublime-*
14+
.rvmrc
15+
stellar.yml
16+
.rubocop.yml
17+
18+
# Ignore generated test coverage
19+
/coverage
20+
21+
# Bower assets
22+
vendor/assets/.bowerrc
23+
vendor/assets/bower.json
24+
vendor/assets/bower_components
25+
26+
# Bundler files
27+
28+
vendor/bundler

recipes/git_ignore.rb

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,14 @@ class GitIgnore < Base
33

44
def init_file
55
@template.remove_file '.gitignore'
6-
@template.create_file '.gitignore' do <<-EOF
7-
!/log/.keep
8-
*.rdb
9-
.bundle
10-
config/application.yml
11-
config/database.yml
12-
config/secrets.yml
13-
config/secrets.*.yml
14-
log/*
15-
public/assets
16-
public/uploads
17-
tmp
18-
.DS_Store
19-
*.sublime-*
20-
.rvmrc
21-
stellar.yml
22-
.rubocop.yml
6+
@template.create_file '.gitignore', File.open(gitignore_path).read
7+
end
238

24-
# Ignore generated coverage
25-
/coverage
9+
private
2610

27-
# Bower stuff
28-
vendor/assets/.bowerrc
29-
vendor/assets/bower.json
30-
vendor/assets/bower_components
31-
EOF
32-
end
11+
def gitignore_path
12+
File.join(File.dirname(__FILE__), '..', '.gitignore')
3313
end
14+
3415
end
3516
end

0 commit comments

Comments
 (0)