github-linguist 2.6.1 → 2.6.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -151,11 +151,11 @@ module Linguist
151
151
  ['.png', '.jpg', '.jpeg', '.gif'].include?(extname)
152
152
  end
153
153
 
154
- # Public: Is the blob a support 3D model format?
154
+ # Public: Is the blob a supported 3D model format?
155
155
  #
156
156
  # Return true or false
157
157
  def solid?
158
- ['.stl', '.obj'].include?(extname)
158
+ extname.downcase == '.stl'
159
159
  end
160
160
 
161
161
  MEGABYTE = 1024 * 1024
@@ -56,7 +56,8 @@ module Linguist
56
56
  compiled_coffeescript? ||
57
57
  xcode_project_file? ||
58
58
  generated_net_docfile? ||
59
- generated_parser?
59
+ generated_parser? ||
60
+ compiled_cython_file?
60
61
  end
61
62
 
62
63
  # Internal: Is the blob an XCode project file?
@@ -158,5 +159,17 @@ module Linguist
158
159
 
159
160
  false
160
161
  end
162
+
163
+ # Internal: Is this a compiled C/C++ file from Cython?
164
+ #
165
+ # Cython-compiled C/C++ files typically contain:
166
+ # /* Generated by Cython x.x.x on ... */
167
+ # on the first line.
168
+ #
169
+ # Return true or false
170
+ def compiled_cython_file?
171
+ return false unless ['.c', '.cpp'].include? extname
172
+ return lines[0].include?("Generated by Cython")
173
+ end
161
174
  end
162
175
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-linguist
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.6.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-25 00:00:00.000000000 Z
12
+ date: 2013-02-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: charlock_holmes
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - ~>
36
36
  - !ruby/object:Gem::Version
37
- version: 0.2.3
37
+ version: 0.3.1
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: 0.2.3
45
+ version: 0.3.1
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: mime-types
48
48
  requirement: !ruby/object:Gem::Requirement