Skip to content

Commit a022c65

Browse files
committed
remove ostruct along with deprecated exporter methods
1 parent ab36d9c commit a022c65

3 files changed

Lines changed: 0 additions & 40 deletions

File tree

Gemfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ source "http://rubygems.org"
22

33
gemspec
44

5-
gem 'ostruct'
6-
gem 'thor', '~> 1.4.0'
7-
85
group :test do
96
gem 'rake'
107
gem 'fakefs'

lib/foreman/export/base.rb

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
require "foreman/export"
2-
require "ostruct"
32
require "pathname"
43
require "shellwords"
54

@@ -18,29 +17,6 @@ def initialize(location, engine, options={})
1817
@engine = engine
1918
@options = options.dup
2019
@formation = engine.formation
21-
22-
# deprecated
23-
def port
24-
Foreman::Export::Base.warn_deprecation!
25-
engine.base_port
26-
end
27-
28-
# deprecated
29-
def template
30-
Foreman::Export::Base.warn_deprecation!
31-
options[:template]
32-
end
33-
34-
# deprecated
35-
def @engine.procfile
36-
Foreman::Export::Base.warn_deprecation!
37-
@processes.map do |process|
38-
OpenStruct.new(
39-
:name => @names[process],
40-
:process => process
41-
)
42-
end
43-
end
4420
end
4521

4622
def export
@@ -68,18 +44,6 @@ def user
6844

6945
private ######################################################################
7046

71-
def self.warn_deprecation!
72-
@@deprecation_warned ||= false
73-
return if @@deprecation_warned
74-
puts "WARNING: Using deprecated exporter interface. Please update your exporter"
75-
puts "the interface shown in the upstart exporter:"
76-
puts
77-
puts "https://github.com/ddollar/foreman/blob/main/lib/foreman/export/upstart.rb"
78-
puts "https://github.com/ddollar/foreman/blob/main/data/export/upstart/process.conf.erb"
79-
puts
80-
@@deprecation_warned = true
81-
end
82-
8347
def chown user, dir
8448
FileUtils.chown user, nil, dir
8549
rescue

spec/foreman/process_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
require 'spec_helper'
22
require 'foreman/process'
3-
require 'ostruct'
43
require 'timeout'
54
require 'tmpdir'
65

0 commit comments

Comments
 (0)