Skip to content

Commit

Permalink
Avoid ostruct usage
Browse files Browse the repository at this point in the history
...in order to avoid Ruby warnings in Ruby 3.5.0 about ostruct not being a built-in library.
  • Loading branch information
olleolleolle committed Sep 16, 2024
1 parent ab90dcb commit a463ccc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/foreman/export/base.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require "foreman/export"
require "ostruct"
require "pathname"
require "shellwords"

Expand All @@ -13,6 +12,9 @@ class Foreman::Export::Base
# deprecated
attr_reader :port

# deprecated
ProcessStruct = Struct.new(:name, :process)

def initialize(location, engine, options={})
@location = location
@engine = engine
Expand All @@ -35,10 +37,7 @@ def template
def @engine.procfile
Foreman::Export::Base.warn_deprecation!
@processes.map do |process|
OpenStruct.new(
:name => @names[process],
:process => process
)
ProcessStruct.new(@names[process], process)
end
end
end
Expand Down

0 comments on commit a463ccc

Please sign in to comment.