Skip to content

Commit

Permalink
Switch form Fixnum to Integer
Browse files Browse the repository at this point in the history
Fixnum was an implementation detail of older Ruby versions and have been
the same as Integer since Ruby 2.4.  Ruby 3.2 stopped to provide this
"alias" so use the proper class name.
  • Loading branch information
smortex committed Apr 19, 2023
1 parent 2315c3b commit e2f539b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/beaker-puppet/helpers/facter_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module FacterHelpers
# @!macro [new] common_opts
# @param [Hash{Symbol=>String}] opts Options to alter execution.
# @option opts [Boolean] :silent (false) Do not produce log output
# @option opts [Array<Fixnum>] :acceptable_exit_codes ([0]) An array
# @option opts [Array<Integer>] :acceptable_exit_codes ([0]) An array
# (or range) of integer exit codes that should be considered
# acceptable. An error will be thrown if the exit code does not
# match one of the values in this list.
Expand Down
14 changes: 7 additions & 7 deletions lib/beaker-puppet/helpers/puppet_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def resolve_hostname_on(host, hostname)
# @!macro [new] common_opts
# @param [Hash{Symbol=>String}] opts Options to alter execution.
# @option opts [Boolean] :silent (false) Do not produce log output
# @option opts [Array<Fixnum>] :acceptable_exit_codes ([0]) An array
# @option opts [Array<Integer>] :acceptable_exit_codes ([0]) An array
# (or range) of integer exit codes that should be considered
# acceptable. An error will be thrown if the exit code does not
# match one of the values in this list.
Expand Down Expand Up @@ -352,8 +352,8 @@ def puppet_conf_for host, conf_opts
#
# @param [Host] host Host the service runs on
# @param [String] service Name of the service to restart
# @param [Fixnum] curl_retries Number of seconds to wait for the restart to complete before failing
# @param [Fixnum] port Port to check status at
# @param [Integer] curl_retries Number of seconds to wait for the restart to complete before failing
# @param [Integer] port Port to check status at
#
# @return [Result] Result of last status check
# @!visibility private
Expand Down Expand Up @@ -706,8 +706,8 @@ def stub_forge(forge_host = nil)
# Waits until a successful curl check has happened against puppetdb
#
# @param [Host] host Host puppetdb is on
# @param [Fixnum] nonssl_port Port to make the HTTP status check over
# @param [Fixnum] ssl_port Port to make the HTTPS status check over
# @param [Integer] nonssl_port Port to make the HTTP status check over
# @param [Integer] ssl_port Port to make the HTTPS status check over
#
# @return [Result] Result of the last HTTPS status check
def sleep_until_puppetdb_started(host, nonssl_port = nil, ssl_port = nil)
Expand All @@ -733,7 +733,7 @@ def sleep_until_puppetdb_started(host, nonssl_port = nil, ssl_port = nil)
# Waits until a successful curl check has happened against puppetserver
#
# @param [Host] host Host puppetserver is on
# @param [Fixnum] port Port to make the HTTPS status check over
# @param [Integer] port Port to make the HTTPS status check over
#
# @return [Result] Result of the last HTTPS status check
def sleep_until_puppetserver_started(host, port = nil)
Expand All @@ -745,7 +745,7 @@ def sleep_until_puppetserver_started(host, port = nil)
# Waits until a successful curl check has happaned against node classifier
#
# @param [Host] host Host node classifier is on
# @param [Fixnum] port Port to make the HTTPS status check over
# @param [Integer] port Port to make the HTTPS status check over
#
# @return [Result] Result of the last HTTPS status check
def sleep_until_nc_started(host, port = nil)
Expand Down
2 changes: 1 addition & 1 deletion spec/beaker-puppet/helpers/facter_helpers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def logger
allow( subject ).to receive( :on ).and_return( result )
structured_fact = subject.fact_on('host','identity')

expect(structured_fact['uid'].class).to be Fixnum
expect(structured_fact['uid'].class).to be Integer
expect(structured_fact['user'].class).to be String
expect(structured_fact['privileged'].class).to be (TrueClass or FalseClass)
end
Expand Down

0 comments on commit e2f539b

Please sign in to comment.