github-linguist 4.8.18 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/grammars/hint.haskell.json +11 -8
- data/grammars/hint.message.haskell.json +11 -8
- data/grammars/hint.type.haskell.json +11 -8
- data/grammars/source.abnf.json +20 -9
- data/grammars/source.ahk.json +1 -1
- data/grammars/source.bsl.json +1 -1
- data/grammars/source.c.json +0 -4
- data/grammars/source.c.platform.json +93 -14
- data/grammars/source.coffee.json +2 -2
- data/grammars/source.cs.json +29 -5
- data/grammars/source.csound-score.json +57 -30
- data/grammars/source.csound.json +44 -4
- data/grammars/source.dm.json +1 -1
- data/grammars/source.haskell.json +11 -8
- data/grammars/source.js.json +116 -62
- data/grammars/source.lean.json +1 -1
- data/grammars/source.llvm.json +2 -2
- data/grammars/source.mask.json +27 -1
- data/grammars/source.objc.platform.json +57 -14
- data/grammars/source.perl.json +1 -1
- data/grammars/source.perl6fe.json +165 -54
- data/grammars/source.pony.json +1 -1
- data/grammars/source.python.json +2061 -289
- data/grammars/source.rascal.json +3 -4
- data/grammars/source.regexp.python.json +34 -4
- data/grammars/source.sdbl.json +6 -2
- data/grammars/source.swift.json +182 -58
- data/grammars/source.viml.json +1 -1
- data/grammars/source.yaml.json +2 -0
- data/grammars/text.html.handlebars.json +3 -3
- data/grammars/text.html.php.json +2 -2
- data/grammars/text.html.vue.json +42 -1
- data/grammars/text.tex.latex.haskell.json +11 -8
- data/lib/linguist.rb +2 -1
- data/lib/linguist/language.rb +20 -69
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +95 -119
- data/lib/linguist/popular.yml +1 -1
- data/lib/linguist/samples.json +2330 -2330
- data/lib/linguist/strategy/extension.rb +10 -0
- data/lib/linguist/strategy/filename.rb +3 -2
- data/lib/linguist/version.rb +1 -1
- metadata +3 -3
- data/grammars/source.js.embedded.html.json +0 -10
@@ -1,9 +1,10 @@
|
|
1
1
|
module Linguist
|
2
2
|
module Strategy
|
3
|
-
# Detects language based on filename
|
3
|
+
# Detects language based on filename
|
4
4
|
class Filename
|
5
5
|
def self.call(blob, _)
|
6
|
-
|
6
|
+
name = blob.name.to_s
|
7
|
+
Language.find_by_filename(name)
|
7
8
|
end
|
8
9
|
end
|
9
10
|
end
|
data/lib/linguist/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github-linguist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: charlock_holmes
|
@@ -361,7 +361,6 @@ files:
|
|
361
361
|
- grammars/source.jcl.json
|
362
362
|
- grammars/source.jflex.json
|
363
363
|
- grammars/source.jq.json
|
364
|
-
- grammars/source.js.embedded.html.json
|
365
364
|
- grammars/source.js.json
|
366
365
|
- grammars/source.js.jsx.json
|
367
366
|
- grammars/source.js.objj.json
|
@@ -618,6 +617,7 @@ files:
|
|
618
617
|
- lib/linguist/samples.json
|
619
618
|
- lib/linguist/samples.rb
|
620
619
|
- lib/linguist/shebang.rb
|
620
|
+
- lib/linguist/strategy/extension.rb
|
621
621
|
- lib/linguist/strategy/filename.rb
|
622
622
|
- lib/linguist/strategy/modeline.rb
|
623
623
|
- lib/linguist/tokenizer.rb
|