File tree Expand file tree Collapse file tree 1 file changed +10
-15
lines changed
test/integration/passenger/controls Expand file tree Collapse file tree 1 file changed +10
-15
lines changed Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
3- case os . family
3+ case platform . family
44when 'redhat'
55 repo_file = '/etc/yum.repos.d/passenger.repo'
66 repo_url = 'https://oss-binaries.phusionpassenger.com/yum/passenger/el/$releasever/$basearch'
77when 'debian'
88 # Inspec does not provide a `codename` matcher, so we add ours
9- case platform [ :release ] . to_f . truncate
10- # ubuntu
11- when 18
12- codename = 'bionic'
13- when 20
14- codename = 'focal'
15- # debian
16- when 9
17- codename = 'stretch'
18- when 10
19- codename = 'buster'
20- when 11
21- codename = 'bullseye'
22- end
9+ finger_codename = {
10+ 'ubuntu-18.04' => 'bionic' ,
11+ 'ubuntu-20.04' => 'focal' ,
12+ 'debian-9' => 'stretch' ,
13+ 'debian-10' => 'buster' ,
14+ 'debian-11' => 'bullseye'
15+ }
16+ codename = finger_codename [ system . platform [ :finger ] ]
17+
2318 repo_keyring = '/usr/share/keyrings/phusionpassenger-archive-keyring.gpg'
2419 repo_file = "/etc/apt/sources.list.d/phusionpassenger-official-#{ codename } .list"
2520 # rubocop:disable Metrics/LineLength
You can’t perform that action at this time.
0 commit comments