github-linguist 2.7.0 → 2.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -147,16 +147,20 @@ module Linguist
147
147
  # indicate the least-likely language (and zero points) for each token.
148
148
  def dump_all_tokens(tokens, languages)
149
149
  maxlen = tokens.map { |tok| tok.size }.max
150
+
150
151
  printf "%#{maxlen}s", ""
151
152
  puts " #" + languages.map { |lang| sprintf("%10s", lang) }.join
153
+
152
154
  tokmap = Hash.new(0)
153
155
  tokens.each { |tok| tokmap[tok] += 1 }
156
+
154
157
  tokmap.sort.each { |tok, count|
155
158
  arr = languages.map { |lang| [lang, token_probability(tok, lang)] }
156
159
  min = arr.map { |a,b| b }.min
157
160
  minlog = Math.log(min)
158
161
  if !arr.inject(true) { |result, n| result && n[1] == arr[0][1] }
159
162
  printf "%#{maxlen}s%5d", tok, count
163
+
160
164
  puts arr.map { |ent|
161
165
  ent[1] == min ? " -" : sprintf("%10.3f", count * (Math.log(ent[1]) - minlog))
162
166
  }.join
@@ -1044,6 +1044,7 @@ Python:
1044
1044
  primary_extension: .py
1045
1045
  extensions:
1046
1046
  - .gyp
1047
+ - .pyt
1047
1048
  - .pyw
1048
1049
  - .wsgi
1049
1050
  - .xpy
@@ -1345,6 +1346,13 @@ Visual Basic:
1345
1346
  - .vba
1346
1347
  - .vbs
1347
1348
 
1349
+ XC:
1350
+ type: programming
1351
+ lexer: C
1352
+ primary_extension: .xc
1353
+ extensions:
1354
+ - .xc
1355
+
1348
1356
  XML:
1349
1357
  type: markup
1350
1358
  ace_mode: xml
@@ -1373,6 +1381,7 @@ XML:
1373
1381
  - .tmLanguage
1374
1382
  - .tmPreferences
1375
1383
  - .tmSnippet
1384
+ - .tmTheme
1376
1385
  - .tml
1377
1386
  - .ui
1378
1387
  - .vxml
@@ -309,6 +309,9 @@
309
309
  "wisp": [
310
310
  ".wisp"
311
311
  ],
312
+ "XC": [
313
+ ".xc"
314
+ ],
312
315
  "XML": [
313
316
  ".ant",
314
317
  ".ivy",
@@ -380,8 +383,8 @@
380
383
  ".gemrc"
381
384
  ]
382
385
  },
383
- "tokens_total": 359968,
384
- "languages_total": 425,
386
+ "tokens_total": 360152,
387
+ "languages_total": 427,
385
388
  "tokens": {
386
389
  "ABAP": {
387
390
  "*/**": 1,
@@ -32447,16 +32450,16 @@
32447
32450
  "Python": {
32448
32451
  "from": 33,
32449
32452
  "__future__": 2,
32450
- "import": 40,
32453
+ "import": 42,
32451
32454
  "unicode_literals": 1,
32452
32455
  "copy": 1,
32453
- "sys": 1,
32456
+ "sys": 2,
32454
32457
  "functools": 1,
32455
32458
  "update_wrapper": 2,
32456
32459
  "future_builtins": 1,
32457
32460
  "zip": 3,
32458
32461
  "django.db.models.manager": 1,
32459
- "#": 10,
32462
+ "#": 13,
32460
32463
  "Imported": 1,
32461
32464
  "to": 4,
32462
32465
  "register": 1,
@@ -32465,13 +32468,13 @@
32465
32468
  "django.conf": 1,
32466
32469
  "settings": 1,
32467
32470
  "django.core.exceptions": 1,
32468
- "(": 487,
32471
+ "(": 508,
32469
32472
  "ObjectDoesNotExist": 2,
32470
32473
  "MultipleObjectsReturned": 2,
32471
32474
  "FieldError": 4,
32472
32475
  "ValidationError": 8,
32473
32476
  "NON_FIELD_ERRORS": 3,
32474
- ")": 498,
32477
+ ")": 519,
32475
32478
  "django.core": 1,
32476
32479
  "validators": 1,
32477
32480
  "django.db.models.fields": 1,
@@ -32514,7 +32517,7 @@
32514
32517
  "class": 14,
32515
32518
  "ModelBase": 4,
32516
32519
  "type": 4,
32517
- "def": 59,
32520
+ "def": 63,
32518
32521
  "__new__": 2,
32519
32522
  "cls": 32,
32520
32523
  "name": 39,
@@ -32524,29 +32527,29 @@
32524
32527
  "super": 2,
32525
32528
  ".__new__": 1,
32526
32529
  "parents": 8,
32527
- "[": 62,
32530
+ "[": 66,
32528
32531
  "b": 9,
32529
- "for": 49,
32530
- "in": 68,
32531
- "if": 140,
32532
+ "for": 52,
32533
+ "in": 72,
32534
+ "if": 144,
32532
32535
  "isinstance": 11,
32533
- "]": 62,
32536
+ "]": 66,
32534
32537
  "not": 64,
32535
- "return": 50,
32538
+ "return": 53,
32536
32539
  "module": 6,
32537
32540
  "attrs.pop": 2,
32538
32541
  "new_class": 9,
32539
32542
  "{": 24,
32540
32543
  "}": 24,
32541
32544
  "attr_meta": 5,
32542
- "None": 84,
32545
+ "None": 86,
32543
32546
  "abstract": 3,
32544
32547
  "getattr": 30,
32545
32548
  "False": 28,
32546
32549
  "meta": 12,
32547
- "else": 29,
32550
+ "else": 30,
32548
32551
  "base_meta": 2,
32549
- "is": 28,
32552
+ "is": 29,
32550
32553
  "model_module": 1,
32551
32554
  "sys.modules": 1,
32552
32555
  "new_class.__module__": 1,
@@ -32584,7 +32587,7 @@
32584
32587
  "attrs.items": 1,
32585
32588
  "new_fields": 2,
32586
32589
  "new_class._meta.local_fields": 3,
32587
- "+": 7,
32590
+ "+": 15,
32588
32591
  "new_class._meta.local_many_to_many": 2,
32589
32592
  "new_class._meta.virtual_fields": 1,
32590
32593
  "field_names": 5,
@@ -32592,7 +32595,7 @@
32592
32595
  "f.name": 5,
32593
32596
  "f": 19,
32594
32597
  "base": 13,
32595
- "parent": 4,
32598
+ "parent": 5,
32596
32599
  "parent._meta.abstract": 1,
32597
32600
  "parent._meta.fields": 1,
32598
32601
  "raise": 22,
@@ -32661,7 +32664,7 @@
32661
32664
  "opts.order_with_respect_to.rel.to": 1,
32662
32665
  "cls.__doc__": 3,
32663
32666
  "cls.__name__": 1,
32664
- ".join": 2,
32667
+ ".join": 3,
32665
32668
  "f.attname": 5,
32666
32669
  "opts.fields": 1,
32667
32670
  "cls.get_absolute_url": 3,
@@ -32684,7 +32687,7 @@
32684
32687
  "args": 8,
32685
32688
  "self._state": 1,
32686
32689
  "args_len": 2,
32687
- "len": 8,
32690
+ "len": 9,
32688
32691
  "self._meta.fields": 5,
32689
32692
  "IndexError": 2,
32690
32693
  "fields_iter": 4,
@@ -32784,7 +32787,7 @@
32784
32787
  "._update": 1,
32785
32788
  "meta.order_with_respect_to": 2,
32786
32789
  "order_value": 2,
32787
- "*": 8,
32790
+ "*": 9,
32788
32791
  ".count": 1,
32789
32792
  "self._order": 1,
32790
32793
  "fields": 10,
@@ -32858,7 +32861,7 @@
32858
32861
  "unique_togethers.append": 1,
32859
32862
  "model_class": 11,
32860
32863
  "unique_together": 2,
32861
- "check": 3,
32864
+ "check": 4,
32862
32865
  "break": 2,
32863
32866
  "unique_checks.append": 2,
32864
32867
  "fields_with_class": 2,
@@ -32927,7 +32930,7 @@
32927
32930
  "ordered_obj._meta.order_with_respect_to.rel.field_name": 2,
32928
32931
  "order_name": 4,
32929
32932
  "ordered_obj._meta.order_with_respect_to.name": 2,
32930
- "i": 2,
32933
+ "i": 7,
32931
32934
  "j": 2,
32932
32935
  "enumerate": 1,
32933
32936
  "ordered_obj.objects.filter": 2,
@@ -32964,8 +32967,8 @@
32964
32967
  "decorate": 2,
32965
32968
  "based": 1,
32966
32969
  "views": 1,
32967
- "the": 4,
32968
- "of": 2,
32970
+ "the": 5,
32971
+ "of": 3,
32969
32972
  "as_view": 1,
32970
32973
  ".": 1,
32971
32974
  "However": 1,
@@ -33042,8 +33045,38 @@
33042
33045
  "Person": 1,
33043
33046
  "_message.Message": 1,
33044
33047
  "_reflection.GeneratedProtocolMessageType": 1,
33045
- "SHEBANG#!python": 2,
33046
- "print": 1,
33048
+ "SHEBANG#!python": 3,
33049
+ "print": 6,
33050
+ "os": 1,
33051
+ "main": 2,
33052
+ "usage": 3,
33053
+ "string": 1,
33054
+ "command": 4,
33055
+ "sys.argv": 2,
33056
+ "<": 1,
33057
+ "sys.exit": 1,
33058
+ "printDelimiter": 4,
33059
+ "get": 1,
33060
+ "a": 1,
33061
+ "list": 1,
33062
+ "git": 1,
33063
+ "directories": 1,
33064
+ "specified": 1,
33065
+ "gitDirectories": 2,
33066
+ "getSubdirectories": 2,
33067
+ "isGitDirectory": 2,
33068
+ "gitDirectory": 2,
33069
+ "os.chdir": 1,
33070
+ "os.getcwd": 1,
33071
+ "os.system": 1,
33072
+ "directory": 9,
33073
+ "filter": 3,
33074
+ "os.path.abspath": 1,
33075
+ "subdirectories": 3,
33076
+ "os.walk": 1,
33077
+ ".next": 1,
33078
+ "os.path.isdir": 1,
33079
+ "__name__": 1,
33047
33080
  "absolute_import": 1,
33048
33081
  "division": 1,
33049
33082
  "with_statement": 1,
@@ -37640,6 +37673,22 @@
37640
37673
  "input": 1,
37641
37674
  "text": 1
37642
37675
  },
37676
+ "XC": {
37677
+ "int": 2,
37678
+ "main": 1,
37679
+ "(": 1,
37680
+ ")": 1,
37681
+ "{": 2,
37682
+ "x": 3,
37683
+ ";": 4,
37684
+ "chan": 1,
37685
+ "c": 3,
37686
+ "par": 1,
37687
+ "<:>": 1,
37688
+ "0": 1,
37689
+ "}": 2,
37690
+ "return": 1
37691
+ },
37643
37692
  "XML": {
37644
37693
  "<?xml>": 3,
37645
37694
  "version=": 4,
@@ -38816,7 +38865,7 @@
38816
38865
  "PowerShell": 12,
38817
38866
  "Processing": 74,
38818
38867
  "Prolog": 4040,
38819
- "Python": 4088,
38868
+ "Python": 4248,
38820
38869
  "R": 14,
38821
38870
  "Racket": 360,
38822
38871
  "Ragel in Ruby Host": 593,
@@ -38841,6 +38890,7 @@
38841
38890
  "VimL": 20,
38842
38891
  "Visual Basic": 345,
38843
38892
  "wisp": 1363,
38893
+ "XC": 24,
38844
38894
  "XML": 5622,
38845
38895
  "XProc": 22,
38846
38896
  "XQuery": 801,
@@ -38916,7 +38966,7 @@
38916
38966
  "PowerShell": 2,
38917
38967
  "Processing": 1,
38918
38968
  "Prolog": 6,
38919
- "Python": 5,
38969
+ "Python": 6,
38920
38970
  "R": 1,
38921
38971
  "Racket": 3,
38922
38972
  "Ragel in Ruby Host": 3,
@@ -38941,6 +38991,7 @@
38941
38991
  "VimL": 2,
38942
38992
  "Visual Basic": 1,
38943
38993
  "wisp": 1,
38994
+ "XC": 1,
38944
38995
  "XML": 3,
38945
38996
  "XProc": 1,
38946
38997
  "XQuery": 1,
@@ -38948,5 +38999,5 @@
38948
38999
  "Xtend": 2,
38949
39000
  "YAML": 1
38950
39001
  },
38951
- "md5": "d233899b021f2ee7af2d7ff73c37a2b3"
39002
+ "md5": "06f04376114dadff4923b1138204a240"
38952
39003
  }
@@ -36,6 +36,10 @@
36
36
  - (^|/)jquery([^.]*)(\.min)?\.js$
37
37
  - (^|/)jquery\-\d\.\d(\.\d)?(\.min)?\.js$
38
38
 
39
+ # jQuery UI
40
+ - (^|/)jquery\-ui(\-\d\.\d+(\.\d+)?)?(\.\w+)?(\.min)?\.(js|css)$
41
+ - (^|/)jquery\.(ui|effects)\.([^.]*)(\.min)?\.(js|css)$
42
+
39
43
  # Prototype
40
44
  - (^|/)prototype(.*)\.js$
41
45
  - (^|/)effects\.js$
@@ -95,7 +99,8 @@
95
99
  - -vsdoc\.js$
96
100
 
97
101
  # jQuery validation plugin (MS bundles this with asp.net mvc)
98
- - (^|/)jquery([^.]*)\.validate(\.min)?\.js$
102
+ - (^|/)jquery([^.]*)\.validate(\.unobtrusive)?(\.min)?\.js$
103
+ - (^|/)jquery([^.]*)\.unobtrusive\-ajax(\.min)?\.js$
99
104
 
100
105
  # Microsoft Ajax
101
106
  - (^|/)[Mm]icrosoft([Mm]vc)?([Aa]jax|[Vv]alidation)(\.debug)?\.js$
@@ -109,5 +114,8 @@
109
114
  # Samples folders
110
115
  - ^[Ss]amples/
111
116
 
117
+ # LICENSE files
118
+ - ^LICENSE$
119
+
112
120
  # Test fixtures
113
121
  - ^[Tt]est/fixtures/
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-linguist
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.0
4
+ version: 2.8.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - GitHub
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-06-10 00:00:00.000000000 Z
12
+ date: 2013-07-07 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: charlock_holmes
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: escape_utils
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ~>
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ~>
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: mime-types
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ~>
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ~>
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: pygments.rb
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ~>
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :runtime
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ~>
67
76
  - !ruby/object:Gem::Version
@@ -69,57 +78,65 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: mocha
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
- - - '>='
83
+ - - ! '>='
74
84
  - !ruby/object:Gem::Version
75
85
  version: '0'
76
86
  type: :development
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
- - - '>='
91
+ - - ! '>='
81
92
  - !ruby/object:Gem::Version
82
93
  version: '0'
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: json
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
- - - '>='
99
+ - - ! '>='
88
100
  - !ruby/object:Gem::Version
89
101
  version: '0'
90
102
  type: :development
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
- - - '>='
107
+ - - ! '>='
95
108
  - !ruby/object:Gem::Version
96
109
  version: '0'
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: rake
99
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
100
114
  requirements:
101
- - - '>='
115
+ - - ! '>='
102
116
  - !ruby/object:Gem::Version
103
117
  version: '0'
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
107
122
  requirements:
108
- - - '>='
123
+ - - ! '>='
109
124
  - !ruby/object:Gem::Version
110
125
  version: '0'
111
126
  - !ruby/object:Gem::Dependency
112
127
  name: yajl-ruby
113
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
114
130
  requirements:
115
- - - '>='
131
+ - - ! '>='
116
132
  - !ruby/object:Gem::Version
117
133
  version: '0'
118
134
  type: :development
119
135
  prerelease: false
120
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
121
138
  requirements:
122
- - - '>='
139
+ - - ! '>='
123
140
  - !ruby/object:Gem::Version
124
141
  version: '0'
125
142
  description:
@@ -146,25 +163,26 @@ files:
146
163
  - bin/linguist
147
164
  homepage: https://github.com/github/linguist
148
165
  licenses: []
149
- metadata: {}
150
166
  post_install_message:
151
167
  rdoc_options: []
152
168
  require_paths:
153
169
  - lib
154
170
  required_ruby_version: !ruby/object:Gem::Requirement
171
+ none: false
155
172
  requirements:
156
- - - '>='
173
+ - - ! '>='
157
174
  - !ruby/object:Gem::Version
158
175
  version: '0'
159
176
  required_rubygems_version: !ruby/object:Gem::Requirement
177
+ none: false
160
178
  requirements:
161
- - - '>='
179
+ - - ! '>='
162
180
  - !ruby/object:Gem::Version
163
181
  version: '0'
164
182
  requirements: []
165
183
  rubyforge_project:
166
- rubygems_version: 2.0.0
184
+ rubygems_version: 1.8.23
167
185
  signing_key:
168
- specification_version: 4
186
+ specification_version: 3
169
187
  summary: GitHub Language detection
170
188
  test_files: []
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 789e8e8dfc4f96259ffed9de8868446353de11ee
4
- data.tar.gz: 13798b197cea4a036f37a9ecc91b16711b8fdcb8
5
- SHA512:
6
- metadata.gz: 96e95e95d4461aea389aa04be55713dac0f4a97271bce88d29a9a5830afabfda9470d9872c9ef2e1101e7608b04e56fd226164d820915bd62531fa4d2be9b66a
7
- data.tar.gz: 034e2810de4628f0c521f5c9a62c9efb78e830d2111cc98e7d83fe77a4791545837ecd53f9cce460d9dbdfe958ed5e0ace4867947c6105added837686d3b0e6d