Project

General

Profile

Actions

Refactor #18719

closed

Replace deprecated Fixnum constants

Added by Dominic Cleal over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Rails
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

There are references in Foreman's codebase to the constant Fixnum, which is deprecated in Ruby 2.4. It is likely that replacing these with Integer is sufficient, as Fixnum is derived from Integer.

app/services/authorizer.rb
184:    @base_ids ||= @base_collection.all? { |i| i.is_a?(Fixnum) } ? @base_collection : @base_collection.map(&:id)

app/controllers/api/v2/interfaces_controller.rb
41:        param :subnet_id, Fixnum, :desc => N_("Foreman subnet ID of IPv4 interface")
42:        param :subnet6_id, Fixnum, :desc => N_("Foreman subnet ID of IPv6 interface")
43:        param :domain_id, Fixnum, :desc => N_("Foreman domain ID of interface. Required for primary interfaces on managed hosts.")

app/controllers/api/v2/external_usergroups_controller.rb
30:          param :auth_source_id, Fixnum, :required => true, :desc => N_('ID of linked authentication source')

app/models/config_report.rb
39:          when Integer, Fixnum

lib/foreman/cast.rb
11:      when Fixnum
Actions

Also available in: Atom PDF