push
travis-ci
2 of 2 new or added lines in 2 files covered. (100.0%)
307 of 428 relevant lines covered (71.73%)
11849.74 hits per line
1 |
# frozen_string_literal: true
|
|
2 |
|
|
3 |
module RouteTranslator |
17 all except 2.2.10, gemfiles/rails_5.2.gemfile ✔ |
4 |
module HostPathConsistencyLambdas |
17 all except 2.2.10, gemfiles/rails_5.2.gemfile ✔ |
5 |
class << self |
17 all except 2.2.10, gemfiles/rails_5.2.gemfile ✔ |
6 |
private |
17 all except 2.2.10, gemfiles/rails_5.2.gemfile ✔ |
7 |
|
|
8 |
def lambdas |
17 all except 2.2.10, gemfiles/rails_5.2.gemfile ✔ |
9 |
@lambdas ||= {}
|
816 all except 2.2.10, gemfiles/rails_5.2.gemfile ✔ |
10 |
end
|
× |
11 |
end
|
× |
12 |
|
|
13 |
module_function |
17 all except 2.2.10, gemfiles/rails_5.2.gemfile ✔ |
14 |
|
|
15 |
def for_locale(locale) |
17 all except 2.2.10, gemfiles/rails_5.2.gemfile ✔ |
16 |
sanitized_locale = RouteTranslator::LocaleSanitizer.sanitize(locale) |
816 all except 2.2.10, gemfiles/rails_5.2.gemfile ✔ |
17 |
|
|
18 |
lambdas[sanitized_locale] ||= ->(req) { sanitized_locale == RouteTranslator::Host.locale_from_host(req.host).to_s } |
901 all except 2.2.10, gemfiles/rails_5.2.gemfile ✔ |
19 |
end
|
× |
20 |
end
|
× |
21 |
end
|
× |