File tree Expand file tree Collapse file tree 6 files changed +11
-11
lines changed
Expand file tree Collapse file tree 6 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33Puppet ::Type . type ( :alternative_entry ) . provide ( :chkconfig ) do
4- confine osfamily : :redhat
5- defaultfor osfamily : :redhat
4+ confine 'os.family' => :redhat
5+ defaultfor 'os.family' => :redhat
66
77 commands update : '/usr/sbin/alternatives'
88
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33Puppet ::Type . type ( :alternative_entry ) . provide ( :dpkg ) do
4- confine osfamily : %i[ debian suse ]
5- defaultfor [ operatingsystem : %i[ debian ubuntu ] , osfamily : :suse ]
4+ confine 'os.family' => %i[ debian suse ]
5+ defaultfor [ 'os.name' => %i[ debian ubuntu ] , 'os.family' => :suse ]
66
77 commands update : 'update-alternatives'
88
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33Puppet ::Type . type ( :alternatives ) . provide ( :chkconfig ) do
4- confine osfamily : :redhat
5- defaultfor osfamily : :redhat
4+ confine 'os.family' => :redhat
5+ defaultfor 'os.family' => :redhat
66
77 commands update : 'alternatives'
88
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33Puppet ::Type . type ( :alternatives ) . provide ( :dpkg ) do
4- confine osfamily : %i[ debian suse ]
5- defaultfor [ operatingsystem : %i[ debian ubuntu ] , osfamily : :suse ]
4+ confine 'os.family' => %i[ debian suse ]
5+ defaultfor [ 'os.name' => %i[ debian ubuntu ] , 'os.family' => :suse ]
66 commands update : 'update-alternatives'
77
88 has_feature :mode
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ def insync?(is)
1919 end
2020
2121 validate do |path |
22- raise ArgumentError , 'path must be a fully qualified path' unless ( absolute_path? path ) || ( Facter . value ( :osfamily ) == 'RedHat' )
22+ raise ArgumentError , 'path must be a fully qualified path' unless ( absolute_path? path ) || ( Facter . value ( 'os.family' ) == 'RedHat' )
2323 end
2424 end
2525
Original file line number Diff line number Diff line change 66 describe 'property `path`' do
77 context 'on Debian systems' do
88 before do
9- Facter . stubs ( :value ) . with ( :osfamily ) . returns ( 'Debian' )
9+ Facter . stubs ( :value ) . with ( 'os.family' ) . returns ( 'Debian' )
1010 end
1111
1212 it 'passes validation with an absolute path' do
2020
2121 context 'on RedHat systems' do
2222 before do
23- Facter . stubs ( :value ) . with ( :osfamily ) . returns ( 'RedHat' )
23+ Facter . stubs ( :value ) . with ( 'os.family' ) . returns ( 'RedHat' )
2424 end
2525
2626 it 'passes validation with an absolute path' do
You can’t perform that action at this time.
0 commit comments