Skip to content

Commit

Permalink
Upgrade to Ruby 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
archanaserver committed Mar 10, 2023
1 parent 5a60321 commit 2b5acd4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require:

AllCops:
NewCops: enable
TargetRubyVersion: 2.5
TargetRubyVersion: 3.0
Exclude:
- 'test/**/*'
- 'vendor/**/*'
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ group :test do
gem 'rack-test'
gem 'rake'
gem 'smart_proxy', github: 'theforeman/smart-proxy', branch: 'develop'
gem 'test-unit'
gem 'test-unit', '~> 3'
gem 'webmock'
end
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def set_downtime_host(host, author, comment, start_time, end_time, all_services:
private

def uri_encode_filter(filter)
URI.encode(filter)
CGI.escape(filter)
end

def host_attributes(host, data)
Expand Down
2 changes: 1 addition & 1 deletion smart_proxy_monitoring.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ Gem::Specification.new do |s|
s.add_dependency 'json'
s.add_dependency 'rest-client'

s.required_ruby_version = '>= 2.5', '< 3'
s.required_ruby_version = '>= 3.0'
end
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def test_set_downtime_host_all_services

def test_remove_downtime_host
icinga_result = '{"results":[{"code":200.0,"status":"Successfully removed all downtimes for object \'xyz.example.com\'."}]}'
stub_request(:post, "https://localhost:5665/v1/actions/remove-downtime?author==%22Foreman%22&comment=%22Downtime%20by%20Foreman%22&filter=host.name==%22xyz.example.com%22&type=Host").
stub_request(:post, "https://localhost:5665/v1/actions/remove-downtime?filter=host.name==%22xyz.example.com%22%26%26author==%22Foreman%22%26%26comment=%22Downtime%20by%20Foreman%22&type=Host").
with(:body => "{}").
to_return(:status => 200, :body => icinga_result)
@provider.remove_downtime_host('xyz.example.com', 'Foreman', 'Downtime by Foreman')
Expand Down

0 comments on commit 2b5acd4

Please sign in to comment.