Commit Graph

548 Commits

Author SHA1 Message Date
Brandon Keepers 850ab6dedb #all_extensions already includes primary extension 2014-11-18 15:10:07 -05:00
Brandon Keepers b20fa497b9 typo 2014-11-18 15:07:36 -05:00
Brandon Keepers 1abc7ee2ef remove unused assertion 2014-11-18 15:04:12 -05:00
Brandon Keepers 587c764950 Avoid shadowing variable name 2014-11-18 14:57:39 -05:00
Brandon Keepers 1abbcb6435 Update comment 2014-11-18 14:57:32 -05:00
Brandon Keepers 17f3d7005a Make missing sample failure message similar 2014-11-18 14:55:15 -05:00
Brandon Keepers ba8b55391d Fix sample tests 2014-11-18 14:48:21 -05:00
Brandon Keepers 757801e32f Merge remote-tracking branch 'origin/master' into filename-matches-multiple-langages
* origin/master:
  Allow mime-types 2.x to be used with Linguist
  Upgrade to rugged 0.22.0b1
  Mention that languages need to be quite popular
  fix vendor/cache
  Gemfile.lock is nolonger considered generated
  Tests for BlobHelper#empty?
  remove reference to empty.js
  Remove more empty samples
  Bail earlier if the file is empty.
  Moving comments
  Use heuristics earlier to inform the rest of the classification process
  Removing inconsistency of `find_by_heuristics` (was sometimes returning nil and sometimes returning and empty array)
  Removing unused array of candidate languages.
  Reworking most heuristics to only return one match
2014-11-18 14:09:15 -05:00
Arfon Smith 0443c4db2d Merge pull request #1674 from github/rework-heuristics
Rework heuristics
2014-11-18 10:43:01 -06:00
Brandon Keepers cd7549390e Extensions aren't actually required 2014-11-17 20:00:09 -05:00
Brandon Keepers b8e426d3a3 Make pedantic test actually pedantic
What do you call someone that thinks they are pedantic but actually
aren’t? All the crazy custom parsing in this test was making so it
wasn’t actually doing anything.
2014-11-17 18:52:53 -05:00
Arfon Smith 7d850d7c09 Gemfile.lock is nolonger considered generated 2014-11-17 16:31:47 -06:00
Brandon Keepers 07a6411a75 Link to contributing docs 2014-11-17 16:30:39 -05:00
Brandon Keepers b32bc5ef47 require samples if filename matches multiple languages 2014-11-17 16:18:56 -05:00
Brandon Keepers 6bf8243014 Fix tests for Makefile change 2014-11-17 08:15:17 -05:00
Vicent Marti 5969a8b679 More samples 2014-11-14 19:18:43 +01:00
Vicent Marti d12aff9776 Unused test 2014-11-14 17:37:12 +01:00
Vicent Marti 4a10b27611 Remove Pygments 2014-11-14 17:37:12 +01:00
Brandon Keepers 296473507f Add assert for Emacs lisp
/cc https://github.com/github/linguist/pull/1499
2014-11-13 10:40:58 -05:00
Adam Roben 160598b9ef Make it safe to pass nil to Language.find_by_name/alias again
This restores compatibility with v3.4.x.
2014-11-10 15:12:29 -05:00
Adam Roben de188126fb Merge pull request #1683 from github/find-by-ext
Extract Language.find_by_extension
2014-11-10 14:37:45 -05:00
Adam Roben 97a1adcef1 Allow extensions without a leading dot
This makes the API a little easier to use.
2014-11-10 14:30:37 -05:00
Adam Roben d54f86ae58 Add some tests for Language.find_by_extension 2014-11-10 14:12:29 -05:00
Adam Roben 751360ecf1 Make Language.[] and Language.find_by(alias|name) ignore case
This makes it easier to find a Linguist::Language for a fenced code
block in Markdown, where language names are often specified in
lowercase.
2014-11-07 10:09:55 -05:00
Brandon Keepers 33d75d9623 Tests for BlobHelper#empty? 2014-11-06 15:14:03 -06:00
Brandon Keepers a0cc2c4c86 remove reference to empty.js 2014-11-06 14:59:34 -06:00
Arfon Smith f22524a615 Moving comments 2014-11-06 14:27:49 -06:00
Arfon Smith 0ab88919c9 Removing unused array of candidate languages. 2014-11-06 13:31:34 -06:00
Arfon Smith 114fabd29a Test for Hack heuristic 2014-11-04 16:12:46 -06:00
Brandon Keepers 06bcdba9c4 Merge pull request #1654 from danijar/master
Exclude minified JavaScript and CSS
2014-11-03 14:20:59 -05:00
Danijar Hafner 1dbbcb73e7 Add tests for minified JavaScript and CSS
Also, exclude -min.css pattern, like already done for JavaScript files
2014-11-03 19:41:31 +01:00
Arfon Smith 9d8ab16a38 Merge branch 'master' into 1623-local
Conflicts:
	lib/linguist/heuristics.rb
2014-11-02 20:11:49 -06:00
Arfon Smith e8cf750e18 Merge pull request #1639 from pchaigno/asc
Heuristic rule to detect AsciiDoc files
2014-11-01 09:26:49 -05:00
Paul Chaignon ebabcfc84f Heuristic rule to detect AsciiDoc files 2014-10-27 10:50:18 -04:00
Paul Chaignon fd707ddf7e Heuristic rules to distinguish .sc files between SuperCollider and Scala 2014-10-23 14:22:12 -04:00
Brandon Keepers cd743332f4 Use yajl since it is already a dependency
Both JSON and Yajl were listed as dependencies. Pygments.rb already requires yajl, so let's just use that instead of using both.
2014-10-17 14:45:28 -04:00
Arfon Smith 037857623d Merge branch 'master' into cache-bustin
Conflicts:
	lib/linguist/version.rb
2014-10-14 19:45:09 -05:00
Arfon Smith 7aabc6a5ad A different approach 2014-10-13 17:01:53 -05:00
Arfon Smith 653314448c Bust that cache 2014-10-13 16:37:46 -05:00
Arfon Smith 4f14db10ea Merge pull request #933 from pchaigno/pro
Support of the .pro file extension for Prolog.
2014-10-13 14:57:19 -05:00
Arfon Smith 332d97b57f Removing generated override for now. 2014-10-10 15:32:08 -05:00
Arfon Smith e71eefe8fc Merge branch 'master' into 1515-local 2014-09-30 08:38:26 -05:00
Arfon Smith 77126e9e17 Removing fixture file 2014-09-29 16:28:23 -05:00
Arfon Smith d1d5c61df5 Updating ref for gitattribute testing 2014-09-29 16:27:20 -05:00
Arfon Smith 0cd7d85ec4 Using .gitattributes from test branch 2014-09-29 15:10:01 -05:00
Brandon Keepers 2b411aad90 Extract #read_index for tests 2014-09-29 15:04:48 -04:00
Brandon Keepers 1c6483a499 Simplify boolean attribute handling 2014-09-29 14:13:44 -04:00
Brandon Keepers b160a39678 Remove linguist_* prefix from vendored? and generated? 2014-09-29 13:48:40 -04:00
Arfon Smith 5284608942 Stubbing git attributes (for now) 2014-09-25 13:48:03 -05:00
Arfon Smith 3ff1e38f6c Adding support for overriding configurations in vendor.yml and generated? 2014-09-25 12:50:42 -05:00