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 authored and dentarg committed Feb 13, 2025
1 parent fd57a45 commit 96002f8
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 96002f8

Please sign in to comment.