github-linguist 2.11.2 → 2.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/linguist/blob_helper.rb +10 -4
- data/lib/linguist/languages.yml +9 -0
- data/lib/linguist/samples.json +51 -5
- data/lib/linguist/version.rb +1 -1
- metadata +23 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 261be2db38bc4cb745e0daa40d88828b4da7d4b8
|
4
|
+
data.tar.gz: 8a4d226fbae6ffedb7802cef37bc8d05a5e53cc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b091e44a42a0cf2aaa35de7976460d125dbccea7d7955b51191cc80ae394c065d0a39cbfa2b5cea0d80d2989155cb11d3fedbda2e3d60ad98cd080ee6727ea59
|
7
|
+
data.tar.gz: 2b9953cb4bf6e268c31c6e38af6ab024a754db16c6bd90e8cba1802abde97ee8ba90c24bcebe598eed2c572cc3743d42be31729362286bdfd95f733d33f2a863
|
data/lib/linguist/blob_helper.rb
CHANGED
@@ -256,10 +256,16 @@ module Linguist
|
|
256
256
|
# without changing the encoding of `data`, and
|
257
257
|
# also--importantly--without having to duplicate many (potentially
|
258
258
|
# large) strings.
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
259
|
+
begin
|
260
|
+
encoded_newlines = ["\r\n", "\r", "\n"].
|
261
|
+
map { |nl| nl.encode(encoding, "ASCII-8BIT").force_encoding(data.encoding) }
|
262
|
+
|
263
|
+
data.split(Regexp.union(encoded_newlines), -1)
|
264
|
+
rescue Encoding::ConverterNotFoundError
|
265
|
+
# The data is not splittable in the detected encoding. Assume it's
|
266
|
+
# one big line.
|
267
|
+
[data]
|
268
|
+
end
|
263
269
|
else
|
264
270
|
[]
|
265
271
|
end
|
data/lib/linguist/languages.yml
CHANGED
@@ -2048,6 +2048,7 @@ SuperCollider:
|
|
2048
2048
|
|
2049
2049
|
Swift:
|
2050
2050
|
type: programming
|
2051
|
+
color: "#ffac45"
|
2051
2052
|
lexer: Text only
|
2052
2053
|
extensions:
|
2053
2054
|
- .swift
|
@@ -2348,6 +2349,14 @@ Zephir:
|
|
2348
2349
|
extensions:
|
2349
2350
|
- .zep
|
2350
2351
|
|
2352
|
+
Zimpl:
|
2353
|
+
type: programming
|
2354
|
+
lexer: Text only
|
2355
|
+
extensions:
|
2356
|
+
- .zimpl
|
2357
|
+
- .zmpl
|
2358
|
+
- .zpl
|
2359
|
+
|
2351
2360
|
eC:
|
2352
2361
|
type: programming
|
2353
2362
|
search_term: ec
|
data/lib/linguist/samples.json
CHANGED
@@ -660,6 +660,9 @@
|
|
660
660
|
],
|
661
661
|
"Zephir": [
|
662
662
|
".zep"
|
663
|
+
],
|
664
|
+
"Zimpl": [
|
665
|
+
".zmpl"
|
663
666
|
]
|
664
667
|
},
|
665
668
|
"interpreters": {
|
@@ -726,8 +729,8 @@
|
|
726
729
|
".gemrc"
|
727
730
|
]
|
728
731
|
},
|
729
|
-
"tokens_total":
|
730
|
-
"languages_total":
|
732
|
+
"tokens_total": 612725,
|
733
|
+
"languages_total": 799,
|
731
734
|
"tokens": {
|
732
735
|
"ABAP": {
|
733
736
|
"*/**": 1,
|
@@ -66571,6 +66574,47 @@
|
|
66571
66574
|
"convert": 1,
|
66572
66575
|
"converter": 2,
|
66573
66576
|
"getConverters": 1
|
66577
|
+
},
|
66578
|
+
"Zimpl": {
|
66579
|
+
"#": 2,
|
66580
|
+
"param": 1,
|
66581
|
+
"columns": 2,
|
66582
|
+
";": 7,
|
66583
|
+
"set": 3,
|
66584
|
+
"I": 3,
|
66585
|
+
"{": 2,
|
66586
|
+
"..": 1,
|
66587
|
+
"}": 2,
|
66588
|
+
"IxI": 6,
|
66589
|
+
"*": 2,
|
66590
|
+
"TABU": 4,
|
66591
|
+
"[": 8,
|
66592
|
+
"<i,j>": 3,
|
66593
|
+
"in": 5,
|
66594
|
+
"]": 8,
|
66595
|
+
"<m,n>": 2,
|
66596
|
+
"with": 1,
|
66597
|
+
"(": 6,
|
66598
|
+
"m": 4,
|
66599
|
+
"i": 8,
|
66600
|
+
"or": 3,
|
66601
|
+
"n": 4,
|
66602
|
+
"j": 8,
|
66603
|
+
")": 6,
|
66604
|
+
"and": 1,
|
66605
|
+
"abs": 2,
|
66606
|
+
"-": 3,
|
66607
|
+
"var": 1,
|
66608
|
+
"x": 4,
|
66609
|
+
"binary": 1,
|
66610
|
+
"maximize": 1,
|
66611
|
+
"queens": 1,
|
66612
|
+
"sum": 2,
|
66613
|
+
"subto": 1,
|
66614
|
+
"c1": 1,
|
66615
|
+
"forall": 1,
|
66616
|
+
"do": 1,
|
66617
|
+
"card": 2
|
66574
66618
|
}
|
66575
66619
|
},
|
66576
66620
|
"language_tokens": {
|
@@ -66757,7 +66801,8 @@
|
|
66757
66801
|
"XSLT": 44,
|
66758
66802
|
"Xtend": 399,
|
66759
66803
|
"YAML": 77,
|
66760
|
-
"Zephir": 1026
|
66804
|
+
"Zephir": 1026,
|
66805
|
+
"Zimpl": 123
|
66761
66806
|
},
|
66762
66807
|
"languages": {
|
66763
66808
|
"ABAP": 1,
|
@@ -66943,7 +66988,8 @@
|
|
66943
66988
|
"XSLT": 1,
|
66944
66989
|
"Xtend": 2,
|
66945
66990
|
"YAML": 2,
|
66946
|
-
"Zephir": 2
|
66991
|
+
"Zephir": 2,
|
66992
|
+
"Zimpl": 1
|
66947
66993
|
},
|
66948
|
-
"md5": "
|
66994
|
+
"md5": "482e5e1de8ec47e0b556809c8fe6f62b"
|
66949
66995
|
}
|
data/lib/linguist/version.rb
CHANGED
metadata
CHANGED
@@ -1,125 +1,125 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github-linguist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.11.
|
4
|
+
version: 2.11.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: charlock_holmes
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.7.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.7.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: escape_utils
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.0.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 1.0.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: mime-types
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.19'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.19'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: pygments.rb
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 0.5.4
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.5.4
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: json
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: mocha
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rake
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: yajl-ruby
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
description: We use this library at GitHub to detect blob languages, highlight code,
|
@@ -131,6 +131,8 @@ executables:
|
|
131
131
|
extensions: []
|
132
132
|
extra_rdoc_files: []
|
133
133
|
files:
|
134
|
+
- bin/linguist
|
135
|
+
- lib/linguist.rb
|
134
136
|
- lib/linguist/blob_helper.rb
|
135
137
|
- lib/linguist/classifier.rb
|
136
138
|
- lib/linguist/file_blob.rb
|
@@ -146,8 +148,6 @@ files:
|
|
146
148
|
- lib/linguist/tokenizer.rb
|
147
149
|
- lib/linguist/vendor.yml
|
148
150
|
- lib/linguist/version.rb
|
149
|
-
- lib/linguist.rb
|
150
|
-
- bin/linguist
|
151
151
|
homepage: https://github.com/github/linguist
|
152
152
|
licenses:
|
153
153
|
- MIT
|
@@ -158,17 +158,17 @@ require_paths:
|
|
158
158
|
- lib
|
159
159
|
required_ruby_version: !ruby/object:Gem::Requirement
|
160
160
|
requirements:
|
161
|
-
- -
|
161
|
+
- - ">="
|
162
162
|
- !ruby/object:Gem::Version
|
163
163
|
version: '0'
|
164
164
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
165
|
requirements:
|
166
|
-
- -
|
166
|
+
- - ">="
|
167
167
|
- !ruby/object:Gem::Version
|
168
168
|
version: '0'
|
169
169
|
requirements: []
|
170
170
|
rubyforge_project:
|
171
|
-
rubygems_version: 2.0
|
171
|
+
rubygems_version: 2.2.0
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: GitHub Language detection
|