From 00de2b011d2859cb9fbec079eb14f9ffa9b1bde7 Mon Sep 17 00:00:00 2001 From: Douglas Adam Smith II Date: Fri, 13 Dec 2013 01:24:34 -0500 Subject: [PATCH 01/12] Updated language list to include HOW, and fixed the lack of lexer problem. Because HOW does not yet have a standardized lexer, I left the "lexer" field as "Text only". --- lib/linguist/languages.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index c737bec3..b653f4fb 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -723,6 +723,15 @@ Haxe: primary_extension: .hx extensions: - .hxsl + +HOW: + type: programming + coloe: "#CC0099" + lexer: Text only + primary_extension: .how + extensions: + - .howmeta + - .howproj INI: type: data From 92e1b1eb40d55f7a99be120c798a0c4539a17946 Mon Sep 17 00:00:00 2001 From: Miro Bezjak Date: Fri, 21 Feb 2014 11:27:47 +0100 Subject: [PATCH 02/12] Add gradle wrapper files to vendor.yml --- lib/linguist/vendor.yml | 7 +++++++ test/test_blob.rb | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/lib/linguist/vendor.yml b/lib/linguist/vendor.yml index 3609b466..135f367c 100644 --- a/lib/linguist/vendor.yml +++ b/lib/linguist/vendor.yml @@ -117,6 +117,13 @@ # Sparkle - (^|/)Sparkle/ +## Groovy ## + +# Gradle +- (^|/)gradlew$ +- (^|/)gradlew\.bat$ +- (^|/)gradle/wrapper/ + ## .NET ## # Visual Studio IntelliSense diff --git a/test/test_blob.rb b/test/test_blob.rb index 9f56265b..4ce248b0 100644 --- a/test/test_blob.rb +++ b/test/test_blob.rb @@ -343,6 +343,14 @@ class TestBlob < Test::Unit::TestCase # Vagrant assert blob("Vagrantfile").vendored? + + # Gradle + assert blob("gradlew").vendored? + assert blob("gradlew.bat").vendored? + assert blob("gradle/wrapper/gradle-wrapper.properties").vendored? + assert blob("subproject/gradlew").vendored? + assert blob("subproject/gradlew.bat").vendored? + assert blob("subproject/gradle/wrapper/gradle-wrapper.properties").vendored? end def test_language From 210ca9a86f9ad502dcf9b2f686bae50807ca1ecf Mon Sep 17 00:00:00 2001 From: Nayeem Syed Date: Thu, 6 Mar 2014 12:00:54 +0000 Subject: [PATCH 03/12] added VCR Cassette to the 'generated' list so they get suppressed --- lib/linguist/generated.rb | 11 ++++++++++- samples/YAML/vcr_cassette.yml | 20 ++++++++++++++++++++ test/test_blob.rb | 3 +++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 samples/YAML/vcr_cassette.yml diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb index 14c64444..f02e9b20 100644 --- a/lib/linguist/generated.rb +++ b/lib/linguist/generated.rb @@ -62,7 +62,8 @@ module Linguist generated_protocol_buffer? || generated_jni_header? || composer_lock? || - node_modules? + node_modules? || + vcr_cassette? end # Internal: Is the blob an XCode project file? @@ -235,5 +236,13 @@ module Linguist def composer_lock? !!name.match(/composer.lock/) end + + # Is the blob a VCR Cassette file? + # + # Returns true or false + def vcr_cassette? + # VCR Cassettes have "recorded_with: VCR" in the second last line. + return lines[-2].include?("recorded_with: VCR") + end end end diff --git a/samples/YAML/vcr_cassette.yml b/samples/YAML/vcr_cassette.yml new file mode 100644 index 00000000..cf21a3fb --- /dev/null +++ b/samples/YAML/vcr_cassette.yml @@ -0,0 +1,20 @@ +--- +http_interactions: +- request: + method: get + uri: http://example.com/ + body: '' + headers: {} + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/html;charset=utf-8 + Content-Length: + - '26' + body: This is the response body + http_version: '1.1' + recorded_at: Tue, 01 Nov 2011 04:58:44 GMT +recorded_with: VCR 2.0.0 diff --git a/test/test_blob.rb b/test/test_blob.rb index 9f56265b..a9d6e524 100644 --- a/test/test_blob.rb +++ b/test/test_blob.rb @@ -211,6 +211,9 @@ class TestBlob < Test::Unit::TestCase assert !blob("CSS/bootstrap.css").generated? assert blob("CSS/bootstrap.min.css").generated? + # Generated VCR + assert blob("YAML/vcr_cassette.yml").generated? + assert Linguist::Generated.generated?("node_modules/grunt/lib/grunt.js", nil) end From 68793b1f0f514c388055b21372eafa1eb183d861 Mon Sep 17 00:00:00 2001 From: Nayeem Syed Date: Sat, 8 Mar 2014 08:12:18 +0000 Subject: [PATCH 04/12] added check for extension and line count on vcr_cassette? in generated --- lib/linguist/generated.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb index f02e9b20..5c3de141 100644 --- a/lib/linguist/generated.rb +++ b/lib/linguist/generated.rb @@ -241,6 +241,8 @@ module Linguist # # Returns true or false def vcr_cassette? + return false unless extname == '.yml' + return false unless lines.count > 2 # VCR Cassettes have "recorded_with: VCR" in the second last line. return lines[-2].include?("recorded_with: VCR") end From 83234509580007013aafb93e3f723349d93200dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eXerigumo=20Clanjor=20=28=E5=93=86=E5=95=A6=E6=AF=94?= =?UTF-8?q?=E7=8C=AB/=E5=85=B0=E5=A8=81=E4=B8=BE=29?= Date: Sun, 9 Mar 2014 16:12:30 +0800 Subject: [PATCH 05/12] add extension .cc for c++ --- lib/linguist/languages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 9bd6450d..2b4c355c 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -254,6 +254,7 @@ C++: extensions: - .C - .c++ + - .cc - .cxx - .H - .h++ From 7c85c1194406d50f4d733f82d7ba1921f7f1d714 Mon Sep 17 00:00:00 2001 From: Douglas Adam Smith II Date: Tue, 11 Mar 2014 13:38:10 -0400 Subject: [PATCH 06/12] Updated How language to FLUX (name change) --- lib/linguist/languages.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index b653f4fb..2f928326 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -562,6 +562,16 @@ Fantom: type: programming color: "#dbded5" primary_extension: .fan + +FLUX: + type: programming + color: "#33CCFF" + primary_extension: .fx + lexer: Text only + extensions: + - .flux + - .FLUX + - .FX Forth: type: programming @@ -723,15 +733,6 @@ Haxe: primary_extension: .hx extensions: - .hxsl - -HOW: - type: programming - coloe: "#CC0099" - lexer: Text only - primary_extension: .how - extensions: - - .howmeta - - .howproj INI: type: data From e4c1cc572be2606c4007688782e96440c63cba0a Mon Sep 17 00:00:00 2001 From: Douglas Adam Smith II Date: Tue, 11 Mar 2014 13:51:16 -0400 Subject: [PATCH 07/12] Fixed order of languages. Forgot how ASCI works. This will (hopefully) fix the build. --- lib/linguist/languages.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 2f928326..edc10596 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -558,20 +558,20 @@ Fancy: filenames: - Fakefile -Fantom: - type: programming - color: "#dbded5" - primary_extension: .fan - FLUX: type: programming color: "#33CCFF" primary_extension: .fx lexer: Text only extensions: - - .flux - - .FLUX - .FX + - .FLUX + - .flux + +Fantom: + type: programming + color: "#dbded5" + primary_extension: .fan Forth: type: programming From 29510b26e00bed1207b430106cb16ae8edd49cd3 Mon Sep 17 00:00:00 2001 From: Douglas Adam Smith II Date: Tue, 11 Mar 2014 14:00:49 -0400 Subject: [PATCH 08/12] Fix --- lib/linguist/languages.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index edc10596..a41c0f59 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -541,6 +541,14 @@ FORTRAN: - .for - .fpp +FLUX: + type: programming + color: "#33CCFF" + primary_extension: .fx + lexer: Text only + extensions: + - .flux + Factor: type: programming color: "#636746" @@ -557,16 +565,6 @@ Fancy: - .fancypack filenames: - Fakefile - -FLUX: - type: programming - color: "#33CCFF" - primary_extension: .fx - lexer: Text only - extensions: - - .FX - - .FLUX - - .flux Fantom: type: programming From 645411e2566ff0706e3d474ad049e71ffc7b6928 Mon Sep 17 00:00:00 2001 From: Douglas Adam Smith II Date: Tue, 11 Mar 2014 14:23:28 -0400 Subject: [PATCH 09/12] Testing... --- lib/linguist/languages.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index a41c0f59..08437d86 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -519,6 +519,14 @@ F#: - .fsi - .fsx +FLUX: + type: programming + color: "#33CCFF" + primary_extension: .fx + lexer: Text only + extensions: + - .flux + FORTRAN: type: programming lexer: Fortran @@ -541,14 +549,6 @@ FORTRAN: - .for - .fpp -FLUX: - type: programming - color: "#33CCFF" - primary_extension: .fx - lexer: Text only - extensions: - - .flux - Factor: type: programming color: "#636746" From 957dd15d5b2bafda0884f60899166feed580bf6c Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Fri, 14 Mar 2014 22:03:31 +0700 Subject: [PATCH 10/12] Add .lid and .intr extensions for Dylan. --- lib/linguist/languages.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 01f4b4cd..6eb2a378 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -492,6 +492,9 @@ Dylan: type: programming color: "#3ebc27" primary_extension: .dylan + extensions: + - .intr + - .lid Ecere Projects: type: data From 3f96bcc32beb57109a543536be206bf155a41e1e Mon Sep 17 00:00:00 2001 From: Lucas Werkmeister Date: Sat, 12 Apr 2014 01:55:29 +0200 Subject: [PATCH 11/12] Add .osm extension for XML The OpenStreetMap project (openstreetmap.org) uses the .osm extension for the OSM XML format (http://wiki.openstreetmap.org/wiki/OSM_XML). --- lib/linguist/languages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 6eb2a378..95b94f20 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1858,6 +1858,7 @@ XML: - .kml - .launch - .mxml + - .osm - .plist - .pluginspec - .ps1xml From 97908204a385940e47251af9ecb689e8f6515c48 Mon Sep 17 00:00:00 2001 From: Rick Bradley Date: Thu, 17 Apr 2014 11:28:15 -0500 Subject: [PATCH 12/12] 2.10.12 --- github-linguist.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-linguist.gemspec b/github-linguist.gemspec index f10f8d1f..ca7647b8 100644 --- a/github-linguist.gemspec +++ b/github-linguist.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = 'github-linguist' - s.version = '2.10.11' + s.version = '2.10.12' s.summary = "GitHub Language detection" s.description = 'We use this library at GitHub to detect blob languages, highlight code, ignore binary files, suppress generated files in diffs, and generate language breakdown graphs.'