From fd7633518f1aff15eee5338fd6715fa2717341fe Mon Sep 17 00:00:00 2001 From: Charlie Somerville Date: Wed, 25 Feb 2015 12:34:07 +1100 Subject: [PATCH 01/17] add instrumentation to detection and classification --- lib/linguist.rb | 12 ++++++++++++ lib/linguist/classifier.rb | 8 +++++--- lib/linguist/language.rb | 28 +++++++++++++++------------- 3 files changed, 32 insertions(+), 16 deletions(-) diff --git a/lib/linguist.rb b/lib/linguist.rb index ff9fc3a2..4419ff5b 100644 --- a/lib/linguist.rb +++ b/lib/linguist.rb @@ -6,3 +6,15 @@ require 'linguist/repository' require 'linguist/samples' require 'linguist/shebang' require 'linguist/version' + +class << Linguist + attr_accessor :instrumenter + + def instrument(*args, &bk) + if instrumenter + instrumenter.instrument(*args, &bk) + else + yield + end + end +end diff --git a/lib/linguist/classifier.rb b/lib/linguist/classifier.rb index 89a0df2f..208467e4 100644 --- a/lib/linguist/classifier.rb +++ b/lib/linguist/classifier.rb @@ -16,9 +16,11 @@ module Linguist # # Returns an Array of Language objects, most probable first. def self.call(blob, possible_languages) - language_names = possible_languages.map(&:name) - classify(Samples.cache, blob.data, language_names).map do |name, _| - Language[name] # Return the actual Language objects + Linguist.instrument("linguist.bayesian_classification") do + language_names = possible_languages.map(&:name) + classify(Samples.cache, blob.data, language_names).map do |name, _| + Language[name] # Return the actual Language objects + end end end diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index 2490a9f6..68b4c4fc 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -105,19 +105,21 @@ module Linguist # Bail early if the blob is binary or empty. return nil if blob.likely_binary? || blob.binary? || blob.empty? - # Call each strategy until one candidate is returned. - STRATEGIES.reduce([]) do |languages, strategy| - candidates = strategy.call(blob, languages) - if candidates.size == 1 - return candidates.first - elsif candidates.size > 1 - # More than one candidate was found, pass them to the next strategy. - candidates - else - # No candiates were found, pass on languages from the previous strategy. - languages - end - end.first + Linguist.instrument("linguist.detection") do + # Call each strategy until one candidate is returned. + STRATEGIES.reduce([]) do |languages, strategy| + candidates = strategy.call(blob, languages) + if candidates.size == 1 + return candidates.first + elsif candidates.size > 1 + # More than one candidate was found, pass them to the next strategy. + candidates + else + # No candiates were found, pass on languages from the previous strategy. + languages + end + end.first + end end # Public: Get all Languages From 9a86b9ad753c6073825dff543cdf38496243a59b Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 26 Feb 2015 15:27:33 -0600 Subject: [PATCH 02/17] Instrument all calls and pass the blob, strategy and language candidates in the payload. --- lib/linguist/classifier.rb | 8 +++----- lib/linguist/language.rb | 23 ++++++++++++++++------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/lib/linguist/classifier.rb b/lib/linguist/classifier.rb index 208467e4..89a0df2f 100644 --- a/lib/linguist/classifier.rb +++ b/lib/linguist/classifier.rb @@ -16,11 +16,9 @@ module Linguist # # Returns an Array of Language objects, most probable first. def self.call(blob, possible_languages) - Linguist.instrument("linguist.bayesian_classification") do - language_names = possible_languages.map(&:name) - classify(Samples.cache, blob.data, language_names).map do |name, _| - Language[name] # Return the actual Language objects - end + language_names = possible_languages.map(&:name) + classify(Samples.cache, blob.data, language_names).map do |name, _| + Language[name] # Return the actual Language objects end end diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index 68b4c4fc..bf0dfc33 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -107,18 +107,27 @@ module Linguist Linguist.instrument("linguist.detection") do # Call each strategy until one candidate is returned. - STRATEGIES.reduce([]) do |languages, strategy| - candidates = strategy.call(blob, languages) + languages = [] + strategy = nil + + STRATEGIES.each do |strategy| + candidates = Linguist.instrument("linguist.strategy", :blob => blob, :strategy => strategy, :candidates => languages) do + strategy.call(blob, languages) + end if candidates.size == 1 - return candidates.first + languages = candidates + break elsif candidates.size > 1 # More than one candidate was found, pass them to the next strategy. - candidates + languages = candidates else - # No candiates were found, pass on languages from the previous strategy. - languages + # No candidates, try the next strategy end - end.first + end + + Linguist.instrument("linguist.detected", :blob => blob, :strategy => strategy, :language => languages.first) do + languages.first + end end end From b358a22d320190d5724797e3a7fc85a39181b894 Mon Sep 17 00:00:00 2001 From: Zach Munro-Cape Date: Fri, 27 Feb 2015 23:02:13 -0400 Subject: [PATCH 03/17] Standardized color hexcode length to 6 C was the only language to have a hex code length of 3. #555555 == #555 == rgb(85, 85, 85) --- lib/linguist/languages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 4bd9f71c..f93bdbc3 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -356,7 +356,7 @@ Bro: C: type: programming - color: "#555" + color: "#555555" extensions: - .c - .cats From c22a6563d953b04e3ae591ad027038aa486c045d Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 1 Mar 2015 22:13:26 -0600 Subject: [PATCH 04/17] Writing some (failing) tests for instrumentation --- test/test_instrumentation.rb | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 test/test_instrumentation.rb diff --git a/test/test_instrumentation.rb b/test/test_instrumentation.rb new file mode 100644 index 00000000..9078680c --- /dev/null +++ b/test/test_instrumentation.rb @@ -0,0 +1,43 @@ +require_relative "./helper" + +class TestInstrumentation < Minitest::Test + include Linguist + + class LocalInstrumenter + Event = Struct.new(:name, :args) + + attr_reader :events + + def initialize + @events = [] + end + + def instrument(name, *args) + @events << Event.new(name, args) + end + end + + def setup + Linguist.instrumenter = LocalInstrumenter.new + end + + def teardown + Linguist.instrumenter = nil + end + + def test_detection_instrumentation_with_binary_blob + binary_blob = fixture_blob("Binary/octocat.ai") + Language.detect(binary_blob) + + # Shouldn't instrument this (as it's binary) + assert_equal 0, Linguist.instrumenter.events.size + end + + def test_modeline_instrumentation + blob = fixture_blob("Data/Modelines/ruby") + Language.detect(blob) + + assert_equal 3, Linguist.instrumenter.events.size + assert_equal "linguist.detected", Linguist.instrumenter.events.last.name + end +end From c7b4cf636f821955354a4958e943c018cdf7b816 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Wed, 4 Mar 2015 21:25:12 +0100 Subject: [PATCH 05/17] GLSL should not be in the C group. --- lib/linguist/languages.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 52bbaa36..9f2a742a 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -994,7 +994,6 @@ GDScript: ace_mode: text GLSL: - group: C type: programming extensions: - .glsl From 2d5476f6c844fcae21858c39c8a120e2d3fdf632 Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Thu, 5 Mar 2015 10:01:28 -0800 Subject: [PATCH 06/17] Yield the block in LocalInstrumenter --- test/test_instrumentation.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_instrumentation.rb b/test/test_instrumentation.rb index 9078680c..b9e5c3e9 100644 --- a/test/test_instrumentation.rb +++ b/test/test_instrumentation.rb @@ -14,6 +14,7 @@ class TestInstrumentation < Minitest::Test def instrument(name, *args) @events << Event.new(name, args) + yield end end From e8326529b5121f80c80b58216c554f5de4982cd6 Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Thu, 5 Mar 2015 10:03:01 -0800 Subject: [PATCH 07/17] Pass blob to instrumentation --- lib/linguist/language.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index bf0dfc33..e0e35602 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -105,7 +105,7 @@ module Linguist # Bail early if the blob is binary or empty. return nil if blob.likely_binary? || blob.binary? || blob.empty? - Linguist.instrument("linguist.detection") do + Linguist.instrument("linguist.detection", :blob => blob) do # Call each strategy until one candidate is returned. languages = [] strategy = nil From 3dcdc11c1b6cf28c2b78d2dba83de4cfce58d132 Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Thu, 5 Mar 2015 10:03:51 -0800 Subject: [PATCH 08/17] Avoid passing block to detected instrumenter --- lib/linguist/language.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index e0e35602..6c551bf7 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -125,9 +125,9 @@ module Linguist end end - Linguist.instrument("linguist.detected", :blob => blob, :strategy => strategy, :language => languages.first) do - languages.first - end + Linguist.instrument("linguist.detected", :blob => blob, :strategy => strategy, :language => languages.first) + + languages.first end end From 7fdead01009570298d4d6777192880b2d1422a90 Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Thu, 5 Mar 2015 10:11:08 -0800 Subject: [PATCH 09/17] Only yield if block given --- test/test_instrumentation.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_instrumentation.rb b/test/test_instrumentation.rb index b9e5c3e9..9fd5dc66 100644 --- a/test/test_instrumentation.rb +++ b/test/test_instrumentation.rb @@ -14,7 +14,7 @@ class TestInstrumentation < Minitest::Test def instrument(name, *args) @events << Event.new(name, args) - yield + yield if block_given? end end From 1bc1803628e5b74d813d2db46ffd0756d6c582f3 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 5 Mar 2015 12:50:12 -0600 Subject: [PATCH 10/17] Check for block here too --- lib/linguist.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist.rb b/lib/linguist.rb index 4419ff5b..3929efb9 100644 --- a/lib/linguist.rb +++ b/lib/linguist.rb @@ -14,7 +14,7 @@ class << Linguist if instrumenter instrumenter.instrument(*args, &bk) else - yield + yield if block_given? end end end From a1010b8cf810f09a066937011928d2d4ebc00415 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 5 Mar 2015 13:21:07 -0600 Subject: [PATCH 11/17] Actually return the strategy --- lib/linguist/language.rb | 5 +++-- test/test_instrumentation.rb | 8 +++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index 6c551bf7..a1ff3318 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -108,9 +108,10 @@ module Linguist Linguist.instrument("linguist.detection", :blob => blob) do # Call each strategy until one candidate is returned. languages = [] - strategy = nil + returning_strategy = nil STRATEGIES.each do |strategy| + returning_strategy = strategy candidates = Linguist.instrument("linguist.strategy", :blob => blob, :strategy => strategy, :candidates => languages) do strategy.call(blob, languages) end @@ -125,7 +126,7 @@ module Linguist end end - Linguist.instrument("linguist.detected", :blob => blob, :strategy => strategy, :language => languages.first) + Linguist.instrument("linguist.detected", :blob => blob, :strategy => returning_strategy, :language => languages.first) languages.first end diff --git a/test/test_instrumentation.rb b/test/test_instrumentation.rb index 9fd5dc66..ab0615e5 100644 --- a/test/test_instrumentation.rb +++ b/test/test_instrumentation.rb @@ -38,7 +38,13 @@ class TestInstrumentation < Minitest::Test blob = fixture_blob("Data/Modelines/ruby") Language.detect(blob) + detect_event = Linguist.instrumenter.events.last + detect_event_payload = detect_event[:args].first + assert_equal 3, Linguist.instrumenter.events.size - assert_equal "linguist.detected", Linguist.instrumenter.events.last.name + assert_equal "linguist.detected", detect_event.name + assert_equal Language['Ruby'], detect_event_payload[:language] + assert_equal blob, detect_event_payload[:blob] + assert_equal Linguist::Strategy::Modeline, detect_event_payload[:strategy] end end From 44f505e687f06981fe02a660aafddf476ba3180e Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 5 Mar 2015 15:08:05 -0600 Subject: [PATCH 12/17] Grammars update --- vendor/grammars/NimLime | 2 +- vendor/grammars/PHP-Twig.tmbundle | 2 +- vendor/grammars/SublimePapyrus | 2 +- vendor/grammars/dart-sublime-bundle | 2 +- vendor/grammars/elixir-tmbundle | 2 +- vendor/grammars/factor | 2 +- vendor/grammars/fsharpbinding | 2 +- vendor/grammars/grace-tmbundle | 2 +- vendor/grammars/haxe-sublime-bundle | 2 +- vendor/grammars/language-gfm | 2 +- vendor/grammars/mercury-tmlanguage | 2 +- vendor/grammars/restructuredtext.tmbundle | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/vendor/grammars/NimLime b/vendor/grammars/NimLime index fac6b182..ae0b75d9 160000 --- a/vendor/grammars/NimLime +++ b/vendor/grammars/NimLime @@ -1 +1 @@ -Subproject commit fac6b182e8a92a65c9e144c578948d7b51048f26 +Subproject commit ae0b75d99a60f555e1b5cbab53eaed2ca9ca9101 diff --git a/vendor/grammars/PHP-Twig.tmbundle b/vendor/grammars/PHP-Twig.tmbundle index ad0f5147..f4f7529a 160000 --- a/vendor/grammars/PHP-Twig.tmbundle +++ b/vendor/grammars/PHP-Twig.tmbundle @@ -1 +1 @@ -Subproject commit ad0f5147e6d7ae70469084659cffcfd22575869e +Subproject commit f4f7529ac2a07527caa7c9154b87c96d17e18aa1 diff --git a/vendor/grammars/SublimePapyrus b/vendor/grammars/SublimePapyrus index e1b78aac..6f4e954f 160000 --- a/vendor/grammars/SublimePapyrus +++ b/vendor/grammars/SublimePapyrus @@ -1 +1 @@ -Subproject commit e1b78aacb6b0ab8b4c26ea897b128335f8ed939c +Subproject commit 6f4e954f35976f72f2a620af68aa0ba73e48478b diff --git a/vendor/grammars/dart-sublime-bundle b/vendor/grammars/dart-sublime-bundle index 21096f24..65c9cd9a 160000 --- a/vendor/grammars/dart-sublime-bundle +++ b/vendor/grammars/dart-sublime-bundle @@ -1 +1 @@ -Subproject commit 21096f24d8a34668d54ad31b8902ab5c709c1c07 +Subproject commit 65c9cd9a6540f6e47e5770314e13de7df05b2d2b diff --git a/vendor/grammars/elixir-tmbundle b/vendor/grammars/elixir-tmbundle index 9c63ff09..99910870 160000 --- a/vendor/grammars/elixir-tmbundle +++ b/vendor/grammars/elixir-tmbundle @@ -1 +1 @@ -Subproject commit 9c63ff09bd411d3e5c5a737145fc33d288804c9c +Subproject commit 99910870bb1cd095fc0af9010f018f1ae9e95b4e diff --git a/vendor/grammars/factor b/vendor/grammars/factor index fe2c2d23..e237b49f 160000 --- a/vendor/grammars/factor +++ b/vendor/grammars/factor @@ -1 +1 @@ -Subproject commit fe2c2d23de9e300d7cd1b04e139dfbdd2069d00a +Subproject commit e237b49f83c12aff3070c570404ef6bb19d1cc95 diff --git a/vendor/grammars/fsharpbinding b/vendor/grammars/fsharpbinding index a008fe9c..513db1c4 160000 --- a/vendor/grammars/fsharpbinding +++ b/vendor/grammars/fsharpbinding @@ -1 +1 @@ -Subproject commit a008fe9c64d454132941eb72334c52e4ad93266e +Subproject commit 513db1c44390c4967afe4dd220b9ec4f6a52cc3e diff --git a/vendor/grammars/grace-tmbundle b/vendor/grammars/grace-tmbundle index 6bea212a..2fba162c 160000 --- a/vendor/grammars/grace-tmbundle +++ b/vendor/grammars/grace-tmbundle @@ -1 +1 @@ -Subproject commit 6bea212a5843e152cd605ec6075eb7352cbeaf0d +Subproject commit 2fba162ce7cfb37421acb097be6aa31aaf414155 diff --git a/vendor/grammars/haxe-sublime-bundle b/vendor/grammars/haxe-sublime-bundle index 50c5aa0e..84a4fab1 160000 --- a/vendor/grammars/haxe-sublime-bundle +++ b/vendor/grammars/haxe-sublime-bundle @@ -1 +1 @@ -Subproject commit 50c5aa0e10f277f83dfe3d0e269a1043271be4df +Subproject commit 84a4fab144c185f4430f68cf10de35a7dfc79cb7 diff --git a/vendor/grammars/language-gfm b/vendor/grammars/language-gfm index 5f5df306..6ca2ea2a 160000 --- a/vendor/grammars/language-gfm +++ b/vendor/grammars/language-gfm @@ -1 +1 @@ -Subproject commit 5f5df3064c9dccbfd8dac8d260b0d4a843ac88a5 +Subproject commit 6ca2ea2ac50fe02cde1bcec114c66101129daab6 diff --git a/vendor/grammars/mercury-tmlanguage b/vendor/grammars/mercury-tmlanguage index 1cb8e949..cb57d42d 160000 --- a/vendor/grammars/mercury-tmlanguage +++ b/vendor/grammars/mercury-tmlanguage @@ -1 +1 @@ -Subproject commit 1cb8e94922803658040bc29aa732c1671e2afe5b +Subproject commit cb57d42dbe343d3809c3dd7946f28f6354a2687e diff --git a/vendor/grammars/restructuredtext.tmbundle b/vendor/grammars/restructuredtext.tmbundle index 43fc7b1f..608d8bcd 160000 --- a/vendor/grammars/restructuredtext.tmbundle +++ b/vendor/grammars/restructuredtext.tmbundle @@ -1 +1 @@ -Subproject commit 43fc7b1ff351d6733f7ce136aafe3091e77b4347 +Subproject commit 608d8bcdea179d4bf3def6244e0d9cf7705f2fea From bdb2a221a5ca81b8a75028a0aa5efbb33d26e2a8 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 5 Mar 2015 15:13:54 -0600 Subject: [PATCH 13/17] Bumping version to 4.4.3 --- lib/linguist/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb index 86dd6961..9a84798b 100644 --- a/lib/linguist/version.rb +++ b/lib/linguist/version.rb @@ -1,3 +1,3 @@ module Linguist - VERSION = "4.4.2" + VERSION = "4.4.3" end From 0d848b342fac474e754b3d969cbef821f9157510 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Fri, 6 Mar 2015 07:07:41 +0100 Subject: [PATCH 14/17] .jbuilder as a Ruby extension --- lib/linguist/languages.yml | 1 + samples/Ruby/index.json.jbuilder | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 samples/Ruby/index.json.jbuilder diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 9f2a742a..1cc8f347 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2666,6 +2666,7 @@ Ruby: - .gemspec - .god - .irbrc + - .jbuilder - .mspec - .pluginspec - .podspec diff --git a/samples/Ruby/index.json.jbuilder b/samples/Ruby/index.json.jbuilder new file mode 100644 index 00000000..26c7bc67 --- /dev/null +++ b/samples/Ruby/index.json.jbuilder @@ -0,0 +1,4 @@ +json.array!(@courts) do |court| + json.extract! court, :id, :name_r, :region, :region_r, :email, :website + json.url court_url(court, format: :json) +end From 2d03eae413a27c478a8f5686be01d1640b464cd2 Mon Sep 17 00:00:00 2001 From: aquileia Date: Fri, 6 Mar 2015 13:34:19 +0100 Subject: [PATCH 15/17] Exclude gettext catalogues from statistics Gettext catalogues are used for translations and are thus essentially prose, but were classified as "programming" in 507d191d7d. In large projects like e.g. wesnoth/wesnoth, gettext can dominate the language statistics with about 95% although the actual code is C++. --- lib/linguist/languages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 9f2a742a..2dfb611e 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1047,7 +1047,7 @@ Gentoo Eclass: ace_mode: sh Gettext Catalog: - type: programming + type: prose search_term: pot searchable: false aliases: From 866466852479fc11fe6bacc3b7460f51eb6ce271 Mon Sep 17 00:00:00 2001 From: Adam Roben Date: Fri, 6 Mar 2015 14:26:09 -0500 Subject: [PATCH 16/17] Update popular languages I took all non-fork repositories on github.com, grouped them by their primary language, and took the 25 most popular. --- lib/linguist/popular.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/linguist/popular.yml b/lib/linguist/popular.yml index 1a5cb750..afb68021 100644 --- a/lib/linguist/popular.yml +++ b/lib/linguist/popular.yml @@ -9,21 +9,21 @@ - CSS - Clojure - CoffeeScript -- Common Lisp -- Diff -- Emacs Lisp -- Erlang +- Go - HTML - Haskell - Java - JavaScript - Lua +- Matlab - Objective-C - PHP - Perl - Python +- R - Ruby -- SQL - Scala -- Scheme - Shell +- Swift +- TeX +- VimL From 8da458e1a85ba72dcb1a36a4d51d0b7a05693328 Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Sun, 8 Mar 2015 16:22:41 -0700 Subject: [PATCH 17/17] apt-get update before downloading deps --- .travis.yml | 1 - script/travis/before_install | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4d0c2351..52540b57 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,3 @@ -sudo: false before_install: script/travis/before_install rvm: - 1.9.3 diff --git a/script/travis/before_install b/script/travis/before_install index 442f6718..93ef383c 100755 --- a/script/travis/before_install +++ b/script/travis/before_install @@ -5,6 +5,8 @@ set -ex # Fetch all commits/refs needed to run our tests. git fetch origin master:master v2.0.0:v2.0.0 test/attributes:test/attributes test/master:test/master +sudo apt-get update + script/vendor-deb libicu48 libicu-dev if ruby -e 'exit RUBY_VERSION >= "2.0" && RUBY_VERSION < "2.1"'; then # Workaround for https://bugs.ruby-lang.org/issues/8074. We can't use this