From 7956ddeec6097aa7ca5a01549b7e955d3746c5f0 Mon Sep 17 00:00:00 2001 From: mptap Date: Sat, 28 Oct 2017 14:20:04 -0700 Subject: [PATCH 1/3] Added unittest to check for specific repo files --- test/test_ruby_http_client.rb | 64 +++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/test/test_ruby_http_client.rb b/test/test_ruby_http_client.rb index 7bd73fc..a444da9 100644 --- a/test/test_ruby_http_client.rb +++ b/test/test_ruby_http_client.rb @@ -171,4 +171,68 @@ def test_method_missing assert_equal({'message' => 'success'}, response.body) assert_equal({'headers' => 'test'}, response.headers) end + + def test_docker_exists + assert(File.file?('./Docker') || File.file?('./docker/Docker')) + end + + def test_docker_compose_exists + assert(File.file?('./docker-compose.yml') || File.file?('./docker/docker-compose.yml')) + end + + def test_env_sample_exists + assert(File.file?('./.env_sample')) + end + + def test_gitignore_exists + assert(File.file?('./.gitignore')) + end + + def test_travis_exists + assert(File.file?('./.travis.yml')) + end + + def test_codeclimate_exists + assert(File.file?('./.codeclimate.yml')) + end + + def test_changelog_exists + assert(File.file?('./CHANGELOG.md')) + end + + def test_code_of_conduct_exists + assert(File.file?('./CODE_OF_CONDUCT.md')) + end + + def test_contributing_exists + assert(File.file?('./CONTRIBUTING.md')) + end + + def test_issue_template_exists + assert(File.file?('./.github/ISSUE_TEMPLATE')) + end + + def test_license_exists + assert(File.file?('./LICENSE.md')) + end + + def test_pull_request_template_exists + assert(File.file?('./.github/PULL_REQUEST_TEMPLATE')) + end + + def test_readme_exists + assert(File.file?('./README.md')) + end + + def test_troubleshooting_exists + assert(File.file?('./TROUBLESHOOTING.md')) + end + + def test_usage_exists + assert(File.file?('./USAGE.md')) + end + + def test_use_cases_exists + assert(File.file?('./USE_CASES.md')) + end end From 836e468091579e38657856f60898f4083d12e0a0 Mon Sep 17 00:00:00 2001 From: Matt Bernier Date: Mon, 30 Oct 2017 22:21:30 -0600 Subject: [PATCH 2/3] Dockerfile was incorrect in my original issue --- test/test_ruby_http_client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_ruby_http_client.rb b/test/test_ruby_http_client.rb index a444da9..6ac7619 100644 --- a/test/test_ruby_http_client.rb +++ b/test/test_ruby_http_client.rb @@ -173,7 +173,7 @@ def test_method_missing end def test_docker_exists - assert(File.file?('./Docker') || File.file?('./docker/Docker')) + assert(File.file?('./Dockerfile') || File.file?('./docker/Dockerfile')) end def test_docker_compose_exists From 753a2d95921fb5d7038bc1597de7522449e75adf Mon Sep 17 00:00:00 2001 From: Matt Bernier Date: Tue, 31 Oct 2017 21:57:21 -0600 Subject: [PATCH 3/3] Changed license to look for .txt or .md :) --- test/test_ruby_http_client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_ruby_http_client.rb b/test/test_ruby_http_client.rb index 6ac7619..9a4a62e 100644 --- a/test/test_ruby_http_client.rb +++ b/test/test_ruby_http_client.rb @@ -213,7 +213,7 @@ def test_issue_template_exists end def test_license_exists - assert(File.file?('./LICENSE.md')) + assert(File.file?('./LICENSE.md') || File.file?('./LICENSE.txt')) end def test_pull_request_template_exists