From c454396c26f2c67570a2b71e08de4504afe3ae08 Mon Sep 17 00:00:00 2001 From: Farbod Salamat-Zadeh Date: Tue, 2 Feb 2016 19:41:05 +0000 Subject: [PATCH 1/5] Add CSV as data type to languages.xml Adds the .csv extension (and also .txt extension) so that this file type is shown when searching on GitHub. --- lib/linguist/languages.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 081da674..c4df6e56 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -474,6 +474,12 @@ CSS: color: "#563d7c" extensions: - .css + +CSV: + type: data + extensions: + - .csv + - .txt Cap'n Proto: type: programming From a0065febe25a4e705367c71492c0e0216c4974ea Mon Sep 17 00:00:00 2001 From: Farbod Salamat-Zadeh Date: Sat, 6 Feb 2016 16:34:33 +0000 Subject: [PATCH 2/5] Add ace_mode and tm_scope for CSV --- lib/linguist/languages.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index c4df6e56..4fe4390e 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -477,6 +477,8 @@ CSS: CSV: type: data + ace_mode: text + tm_scope: none extensions: - .csv - .txt From db994a119767f5f497a7f5fa674729b3d8c9d510 Mon Sep 17 00:00:00 2001 From: Farbod Salamat-Zadeh Date: Sat, 27 Feb 2016 00:42:03 +0000 Subject: [PATCH 3/5] Remove .txt extension for CSV format --- lib/linguist/languages.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 4fe4390e..4296c4df 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -481,7 +481,6 @@ CSV: tm_scope: none extensions: - .csv - - .txt Cap'n Proto: type: programming From 9bfbd0550c9d8761b434dec3864e13d1bbeb5f85 Mon Sep 17 00:00:00 2001 From: Farbod Salamat-Zadeh Date: Sat, 27 Feb 2016 14:32:50 +0000 Subject: [PATCH 4/5] Move cars.csv from test/fixtures/Data to samples/CSV --- {test/fixtures/Data => samples/CSV}/cars.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {test/fixtures/Data => samples/CSV}/cars.csv (63%) diff --git a/test/fixtures/Data/cars.csv b/samples/CSV/cars.csv similarity index 63% rename from test/fixtures/Data/cars.csv rename to samples/CSV/cars.csv index 73280e55..3c504cd2 100644 --- a/test/fixtures/Data/cars.csv +++ b/samples/CSV/cars.csv @@ -1,3 +1,3 @@ Year,Make,Model,Length 1997,Ford,E350,2.34 -2000,Mercury,Cougar,2.38 \ No newline at end of file +2000,Mercury,Cougar,2.38 From 3be007526cf43cc0a91504fe86d83af7db3e663a Mon Sep 17 00:00:00 2001 From: Farbod Salamat-Zadeh Date: Sat, 27 Feb 2016 15:30:22 +0000 Subject: [PATCH 5/5] Fix fixture_blob("Data/cars.csv") Changes `fixture_blob("Data/cars.csv")` to `sample_blob("CSV/cars.csv")` --- test/test_file_blob.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_file_blob.rb b/test/test_file_blob.rb index 08e2e49b..ebb0b7fc 100644 --- a/test/test_file_blob.rb +++ b/test/test_file_blob.rb @@ -152,7 +152,7 @@ class TestBlob < Minitest::Test end def test_csv - assert fixture_blob("Data/cars.csv").csv? + assert sample_blob("CSV/cars.csv").csv? end def test_pdf