Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions app/helpers/reactjs_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ def global_js_tags(requested_plugins)
end
end

def css_tags_for(requested_plugins)
Foreman::Deprecation.deprecation_warning('3.12', '`css_tags_for` is deprecated, No need to load CSS separately, since it should be referenced from the corresponding JS file.')
[]
end

def locale_js_tags
locale = FastGettext.locale
::Foreman::Plugin.all.filter_map do |plugin|
Expand Down
10 changes: 0 additions & 10 deletions app/services/owner_classifier.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
class OwnerClassifier
def initialize(id_and_type)
@id_and_type = id_and_type
end

def self.classify_owner(id_and_type)
return nil if id_and_type.blank?

Expand All @@ -12,12 +8,6 @@ def self.classify_owner(id_and_type)
owner_type.find(id_and_type.to_i)
end

def user_or_usergroup
Foreman::Deprecation.deprecation_warning("3.12", "`user_or_usergroup` is deprecated, use `classify_owner` instead.")

OwnerClassifier.classify_owner(@id_and_type)
end

def self.validate_input_format!(id_and_type)
unless id_and_type.is_a?(String) && id_and_type.match?(/^\d+-(Users|Usergroups)$/)
raise ArgumentError, _("Invalid input format. Please use the format '${id}-[Users|Usergroups]'.")
Expand Down
6 changes: 0 additions & 6 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,5 @@
#
# Please ensure that all templates are submitted to community-templates, then they will be synced in.

# define all helpers here
def format_errors(model = nil)
Foreman::Deprecation.deprecation_warning('3.4', '`format_errors` is deprecated, use `SeedHelper.format_errors(model)` instead.')
SeedHelper.format_errors(model)
end

seeder = ForemanSeeder.new
seeder.execute
10 changes: 0 additions & 10 deletions test/unit/owner_classifier_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,4 @@ class OwnerClassifierTest < ActiveSupport::TestCase
id_and_type = "5-UsErS"
assert_raises(ArgumentError) { OwnerClassifier.classify_owner(id_and_type) }
end

test "Deprecated method: user_or_usergroup should return user if id_and_type is a user" do
user = FactoryBot.create(:user)
id_and_type = user.id_and_type

assert_deprecated do
owner = OwnerClassifier.new(id_and_type).user_or_usergroup
assert_equal user, owner
end
end
end
Loading