Skip to content

Commit

Permalink
Update more dependencies: bump github-linguist from 3.x to 6.x and up…
Browse files Browse the repository at this point in the history
…date code to match: drop usage of deprecated 'Linguist#interpreter_from_shebang'
  • Loading branch information
Marta Paciorkowska committed Apr 16, 2018
1 parent fa97c48 commit a11cb27
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 24 deletions.
6 changes: 3 additions & 3 deletions Gemfile
Expand Up @@ -5,7 +5,7 @@ source 'https://rubygems.org'
gem "coderay"
gem "deep_merge"
gem "erubis", "~> 2.7.0"
gem "github-linguist", "~> 3.0"
gem "github-linguist", "~> 6.0.1"
gem "github-markup"
gem "jrjackson", platforms: :jruby # to be used by multijson
gem "kramdown"
Expand All @@ -15,7 +15,7 @@ gem "pygments.rb"
gem "racc", platforms: :rbx
gem "ridley", "~> 5.1.1"
gem "rubysl", "~> 2.0", platforms: :rbx
gem 'rugged', '= 0.21.1b2' # github-linguist specifies (~> 0.21.1b2), but 0.21.4 breaks
gem 'rugged'
gem "sinatra"
gem "tinyconfig", "~> 0.1"

Expand All @@ -26,7 +26,7 @@ group :development do
gem "ffi"
gem "pry"
gem "rack-test"
gem "rubocop"
gem "rubocop", "~> 0.54.0"
gem "rubysl-test-unit", "~> 2.0", platforms: :rbx
gem "wrong", "= 0.7.1"
end
Expand Down
36 changes: 17 additions & 19 deletions Gemfile.lock
Expand Up @@ -13,7 +13,7 @@ GEM
buff-shell_out (1.1.0)
buff-ruby_engine (~> 1.0)
builder (3.2.3)
capybara (3.0.1)
capybara (3.0.2)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
Expand Down Expand Up @@ -53,7 +53,7 @@ GEM
deep_merge (1.2.1)
diff-lcs (1.2.5)
erubis (2.7.0)
escape_utils (1.0.1)
escape_utils (1.2.1)
faraday (0.14.0)
multipart-post (>= 1.2, < 3)
ffi (1.9.23)
Expand All @@ -62,12 +62,11 @@ GEM
ffi2-generators (0.1.1)
fuzzyurl (0.9.0)
gherkin (4.1.3)
github-linguist (3.5.2)
charlock_holmes (~> 0.7.3)
escape_utils (~> 1.0.1)
mime-types (~> 1.19)
pygments.rb (~> 0.6.0)
rugged (~> 0.21.1b2)
github-linguist (6.0.1)
charlock_holmes (~> 0.7.5)
escape_utils (~> 1.2.0)
mime-types (>= 1.19)
rugged (>= 0.25.1)
github-markup (2.0.0)
hashie (3.5.7)
hitimes (1.2.6)
Expand All @@ -76,7 +75,9 @@ GEM
kramdown (1.16.2)
libyajl2 (1.2.0)
method_source (0.9.0)
mime-types (1.25.1)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
minitest (4.7.5)
Expand All @@ -92,21 +93,19 @@ GEM
nio4r (2.3.0)
nokogiri (1.8.2)
mini_portile2 (~> 2.3.0)
oj (3.5.0)
oj (3.5.1)
parallel (1.12.1)
parser (2.5.1.0)
ast (~> 2.4.0)
posix-spawn (0.3.13)
powerpack (0.1.1)
predicated (0.2.6)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
public_suffix (3.0.2)
puma (3.11.4)
pygments.rb (0.6.3)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.2.0)
pygments.rb (1.2.1)
multi_json (>= 1.0.0)
racc (1.4.14)
rack (2.0.4)
rack-protection (2.0.1)
Expand Down Expand Up @@ -351,7 +350,7 @@ GEM
rubysl-xmlrpc (2.0.0)
rubysl-yaml (2.1.0)
rubysl-zlib (2.0.1)
rugged (0.21.1b2)
rugged (0.27.0)
semverse (2.0.0)
sexp_processor (4.11.0)
sinatra (2.0.1)
Expand All @@ -377,7 +376,6 @@ GEM
sexp_processor (>= 4.0)
xpath (3.0.0)
nokogiri (~> 1.8)
yajl-ruby (1.2.3)

PLATFORMS
ruby
Expand All @@ -390,7 +388,7 @@ DEPENDENCIES
deep_merge
erubis (~> 2.7.0)
ffi
github-linguist (~> 3.0)
github-linguist (~> 6.0.1)
github-markup
jrjackson
kramdown
Expand All @@ -402,10 +400,10 @@ DEPENDENCIES
rack-test
rake
ridley (~> 5.1.1)
rubocop
rubocop (~> 0.54.0)
rubysl (~> 2.0)
rubysl-test-unit (~> 2.0)
rugged (= 0.21.1b2)
rugged
sinatra
tinyconfig (~> 0.1)
wrong (= 0.7.1)
Expand Down
3 changes: 1 addition & 2 deletions lib/chef-browser/file_content.rb
Expand Up @@ -33,8 +33,7 @@ def show_file(file, uri_options = {})

def highlight_file(filename, extname, content)
lexer = (Linguist::Language[extname.gsub(/^\./, '')] ||
Linguist::Language.find_by_filename(filename).first ||
Linguist::Language[Linguist.interpreter_from_shebang(content)]
Linguist::Language.find_by_filename(filename).first
)
if lexer
lexer.colorize(content, options: @highlight_options)
Expand Down

0 comments on commit a11cb27

Please sign in to comment.