Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ language: ruby
sudo: false
cache: bundler
script: 'bundle exec rake test:coverage --trace'
before_install:
- rvm get head # required by JRuby > 9.0.1.0
- rvm reload
rvm:
- 2.0.0
- 2.1.0
Expand All @@ -19,6 +22,7 @@ rvm:
- rbx-2
- jruby-head
- jruby-9000
- jruby-9.0.1.0

matrix:
allow_failures:
Expand Down
3 changes: 3 additions & 0 deletions lib/lotus/action/mime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,9 @@ def best_q_match(q_value_header, available_mimes)
# See https://github.com/lotus/controller/issues/104
values = values.reverse unless Lotus::Utils.jruby?

# https://github.com/jruby/jruby/issues/3004
values.sort! if Lotus::Utils.jruby?

value = values.sort_by do |match, quality|
(match.split('/', 2).count('*') * -10) + quality
end.last
Expand Down