From b2977d68066e29f0096bdd47bd526f754ad397cd Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 13 Nov 2016 11:01:31 +1300 Subject: [PATCH 1/4] Search contributors file, case insensitive. --- script/check_contributors_md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/check_contributors_md b/script/check_contributors_md index 131daf445..fdd484897 100755 --- a/script/check_contributors_md +++ b/script/check_contributors_md @@ -28,7 +28,7 @@ Please set it using end end -if !system("grep #{author} CONTRIBUTORS.md") then +if !system("grep -i #{author} CONTRIBUTORS.md") then abort %{ Thanks for your contribution, #{author}! Please add your name and GitHub handle to the file CONTRIBUTORS.md, From 9605ec6109b472a1b6057f7cd008ac46191fc961 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 13 Nov 2016 11:07:57 +1300 Subject: [PATCH 2/4] Pass args to system() to be escaped --- script/check_contributors_md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/check_contributors_md b/script/check_contributors_md index fdd484897..128c1c1cb 100755 --- a/script/check_contributors_md +++ b/script/check_contributors_md @@ -28,7 +28,7 @@ Please set it using end end -if !system("grep -i #{author} CONTRIBUTORS.md") then +if !system("grep", "-i", author, "CONTRIBUTORS.md") then abort %{ Thanks for your contribution, #{author}! Please add your name and GitHub handle to the file CONTRIBUTORS.md, From e1f0b649f53bc37b74a8ad8d9f976151b77fa2bb Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 13 Nov 2016 11:10:45 +1300 Subject: [PATCH 3/4] if! -> unless, as code climate suggests --- script/check_contributors_md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/check_contributors_md b/script/check_contributors_md index 128c1c1cb..c212c8147 100755 --- a/script/check_contributors_md +++ b/script/check_contributors_md @@ -28,7 +28,7 @@ Please set it using end end -if !system("grep", "-i", author, "CONTRIBUTORS.md") then +unless system("grep", "-i", author, "CONTRIBUTORS.md") then abort %{ Thanks for your contribution, #{author}! Please add your name and GitHub handle to the file CONTRIBUTORS.md, From eecd54c5ea185a1b7307895ac53392083b5e28b8 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 13 Nov 2016 11:12:24 +1300 Subject: [PATCH 4/4] Use single quotes, as code climate suggests --- script/check_contributors_md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/check_contributors_md b/script/check_contributors_md index c212c8147..d108ca56c 100755 --- a/script/check_contributors_md +++ b/script/check_contributors_md @@ -28,7 +28,7 @@ Please set it using end end -unless system("grep", "-i", author, "CONTRIBUTORS.md") then +unless system('grep', '-i', author, 'CONTRIBUTORS.md') then abort %{ Thanks for your contribution, #{author}! Please add your name and GitHub handle to the file CONTRIBUTORS.md,