From 8f3a341b949f1a556f7a1b8637a91501909f2a42 Mon Sep 17 00:00:00 2001 From: Alexander Olofsson <alexander.olofsson@liu.se> Date: Fri, 7 Jul 2023 14:47:05 +0200 Subject: [PATCH] Improve Ruby 2.7 support for Foreman --- lib/liudesk_cmdb/client.rb | 4 +++- lib/liudesk_cmdb/model.rb | 4 +++- liudesk_cmdb.gemspec | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/liudesk_cmdb/client.rb b/lib/liudesk_cmdb/client.rb index dc97fec..64079c4 100644 --- a/lib/liudesk_cmdb/client.rb +++ b/lib/liudesk_cmdb/client.rb @@ -98,7 +98,9 @@ module LiudeskCMDB pp.pp_object(self) end - alias inspect pretty_print_inspect + def pretty_print_inspect + inspect + end private diff --git a/lib/liudesk_cmdb/model.rb b/lib/liudesk_cmdb/model.rb index 199881c..3ad449b 100644 --- a/lib/liudesk_cmdb/model.rb +++ b/lib/liudesk_cmdb/model.rb @@ -227,7 +227,9 @@ module LiudeskCMDB pp.pp_object(self) end - alias inspect pretty_print_inspect + def pretty_print_inspect + inspect + end protected diff --git a/liudesk_cmdb.gemspec b/liudesk_cmdb.gemspec index 7981676..e67f4f2 100644 --- a/liudesk_cmdb.gemspec +++ b/liudesk_cmdb.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |spec| spec.metadata["source_code_uri"] = spec.homepage spec.metadata["changelog_uri"] = [spec.homepage, "-", "blob", "master", "CHANGELOG.md"].join "/" - spec.files = Dir["{lib,sig}/**/*.rb"] + %w[Gemfile Rakefile README.md CHANGELOG.md LICENSE.txt liudesk_cmb.gemspec] + spec.files = Dir["{lib,sig}/**/*.rb"] + %w[Gemfile Rakefile README.md CHANGELOG.md LICENSE.txt liudesk_cmdb.gemspec] spec.require_paths = ["lib"] spec.add_dependency "logging" -- GitLab