push
github
0 of 30 new or added lines in 2 files covered. (0.0%)
1853 existing lines in 54 files now uncovered.0 of 2026 relevant lines covered (0.0%)
0.0 hits per line
UNCOV
1
|
require 'socket'
|
× |
2 |
|
|
UNCOV
3
|
module Unleash |
× |
UNCOV
4
|
module Strategy |
× |
UNCOV
5
|
class ApplicationHostname < Base |
× |
UNCOV
6
|
attr_accessor :hostname
|
× |
7 |
|
|
UNCOV
8
|
PARAM = 'hostnames'.freeze |
× |
9 |
|
|
UNCOV
10
|
def initialize |
× |
UNCOV
11
|
self.hostname = Socket.gethostname || 'undefined' |
× |
12 |
end
|
|
13 |
|
|
UNCOV
14
|
def name |
× |
15 |
'applicationHostname'
|
× |
16 |
end
|
|
17 |
|
|
18 |
# need: :params['hostnames']
|
|
UNCOV
19
|
def is_enabled?(params = {}, _context = nil) |
× |
UNCOV
20
|
return false unless params.is_a?(Hash) && params.has_key?(PARAM) |
× |
21 |
|
|
UNCOV
22
|
params[PARAM].split(",").map(&:strip).map(&:downcase).include?(self.hostname) |
× |
23 |
end
|
|
24 |
end
|
|
25 |
end
|
|
26 |
end
|