Skip to content

Commit 01c6706

Browse files
committed
Add docker-compose folder to .gitignore
1 parent f424e00 commit 01c6706

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/matrixeval/ruby/gitignore.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def add_docker_compose
1414
return if docker_compose_included?
1515

1616
File.open(gitignore_path, 'a+') do |file|
17-
file.puts docker_compose_yaml
17+
file.puts docker_compose
1818
end
1919
end
2020

@@ -28,16 +28,16 @@ def add_gemfile_locks
2828

2929
def docker_compose_included?
3030
File.exist?(gitignore_path) &&
31-
File.read(gitignore_path).include?(docker_compose_yaml)
31+
File.read(gitignore_path).include?(docker_compose)
3232
end
3333

3434
def gemfile_locks_included?
3535
File.exist?(gitignore_path) &&
3636
File.read(gitignore_path).include?(gemfile_locks)
3737
end
3838

39-
def docker_compose_yaml
40-
".matrixeval/docker-compose.yml"
39+
def docker_compose
40+
".matrixeval/docker-compose"
4141
end
4242

4343
def gemfile_locks

test/matrixeval/ruby/gitignore_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def test_create
1515
Matrixeval::Ruby::Gitignore.update
1616

1717
expected_gitignore_content = <<~GITIGNORE
18-
.matrixeval/docker-compose.yml
18+
.matrixeval/docker-compose
1919
.matrixeval/gemfile_locks
2020
GITIGNORE
2121
gitignore_content = File.read dummy_gem_working_dir.join(".gitignore")
@@ -31,7 +31,7 @@ def test_update
3131

3232
expected_gitignore_content = <<~GITIGNORE
3333
.env
34-
.matrixeval/docker-compose.yml
34+
.matrixeval/docker-compose
3535
.matrixeval/gemfile_locks
3636
GITIGNORE
3737
gitignore_content = File.read dummy_gem_working_dir.join(".gitignore")
@@ -49,7 +49,7 @@ def test_update_duplicate_check
4949
expected_gitignore_content = <<~GITIGNORE
5050
.env
5151
.matrixeval/gemfile_locks
52-
.matrixeval/docker-compose.yml
52+
.matrixeval/docker-compose
5353
GITIGNORE
5454
gitignore_content = File.read dummy_gem_working_dir.join(".gitignore")
5555
assert_equal expected_gitignore_content, gitignore_content

0 commit comments

Comments
 (0)