From 59f2784d60beab592c6a8ae3304d131a0d9dd94a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Cassel?= Date: Sat, 21 Mar 2026 08:36:54 +0100 Subject: [PATCH] Fix Style/HashSyntax by updating to Ruby 1.9 hash syntax --- Gemfile | 2 +- lib/smart_proxy_realm_ad/plugin.rb | 2 +- test/internal_api_test.rb | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 5644278..53dfd5b 100644 --- a/Gemfile +++ b/Gemfile @@ -5,5 +5,5 @@ gemspec group :development do gem 'rack-test' - gem 'smart_proxy', :git => 'https://github.com/theforeman/smart-proxy.git', :branch => 'develop' + gem 'smart_proxy', git: 'https://github.com/theforeman/smart-proxy.git', branch: 'develop' end diff --git a/lib/smart_proxy_realm_ad/plugin.rb b/lib/smart_proxy_realm_ad/plugin.rb index 1d140a6..6c70215 100644 --- a/lib/smart_proxy_realm_ad/plugin.rb +++ b/lib/smart_proxy_realm_ad/plugin.rb @@ -4,7 +4,7 @@ module Proxy::AdRealm class Plugin < Proxy::Provider - default_settings :computername_prefix => '', :computername_use_fqdn => false + default_settings computername_prefix: '', computername_use_fqdn: false load_classes ::Proxy::AdRealm::ConfigurationLoader load_dependency_injection_wirings ::Proxy::AdRealm::ConfigurationLoader diff --git a/test/internal_api_test.rb b/test/internal_api_test.rb index 60aa77a..26a51ac 100644 --- a/test/internal_api_test.rb +++ b/test/internal_api_test.rb @@ -27,14 +27,14 @@ def app end def setup - @server = Proxy::AdRealm::Provider.new(:realm => 'test.com') + @server = Proxy::AdRealm::Provider.new(realm: 'test.com') end def test_create_host realm = 'TEST.COM' hostname = 'test.com' @server.expects(:create).with(realm, hostname, is_a(Hash)) - post "/#{realm}", :hostname => 'test.com' + post "/#{realm}", hostname: 'test.com' assert last_response.ok?, "Last response was not ok: #{last_response.status} #{last_response.body}" end @@ -42,7 +42,7 @@ def test_rebuild_host realm = 'TEST.COM' hostname = 'test.com' @server.expects(:create).with(realm, hostname, has_entry('rebuild', 'true')) - post "/#{realm}", :hostname => 'test.com', :rebuild => true + post "/#{realm}", hostname: 'test.com', rebuild: true assert last_response.ok?, "Last response was not ok: #{last_response.status} #{last_response.body}" end