From dae34c00a6dc153b3ebf5ae6761097dc92c7bc05 Mon Sep 17 00:00:00 2001 From: Mike Perham Date: Fri, 4 Jan 2019 09:31:56 -0800 Subject: [PATCH] Require Ruby 2.5.0+ Since Rails 6.0 will require Ruby 2.5.0+ it's easiest to match their requirement. --- 6.0-Upgrade.md | 10 ++++++++-- lib/sidekiq.rb | 2 +- sidekiq.gemspec | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/6.0-Upgrade.md b/6.0-Upgrade.md index c50266f1..fcd85af3 100644 --- a/6.0-Upgrade.md +++ b/6.0-Upgrade.md @@ -7,7 +7,13 @@ of Sidekiq. It also drops support for EOL versions of Ruby and Rails. This release has major breaking changes. Read and test carefully in production. -- Include **new JSON log format** for use where you want machine-ingestible log output. Enable with: +- Logging has been redesigned to allow pluggable formats and several + formats ship with Sidekiq: + * default - your typical output on macOS + * json - a new format with key=value pairs for search indexing + * heroku - a Heroku-specific formatter +Sidekiq will enable the best formatter for the detected environment but +you can override it by configuring the log format explicitly: ``` Sidekiq.configure_server do |config| config.log_format = :json # or nil for default @@ -29,7 +35,7 @@ by default and we want Sidekiq to take advantage of this time. If you have deployment scripts which depend on the old default timeout, use `-t 8` to get the old behavior. [#3968] * **Rails <5** is no longer supported. -* **Ruby <2.4** is no longer supported. +* **Ruby <2.5** is no longer supported. ## Upgrade diff --git a/lib/sidekiq.rb b/lib/sidekiq.rb index bfd0d802..6ef91cd8 100644 --- a/lib/sidekiq.rb +++ b/lib/sidekiq.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'sidekiq/version' -fail "Sidekiq #{Sidekiq::VERSION} does not support Ruby versions below 2.4.0." if RUBY_PLATFORM != 'java' && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.4.0') +fail "Sidekiq #{Sidekiq::VERSION} does not support Ruby versions below 2.5.0." if RUBY_PLATFORM != 'java' && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.5.0') require 'sidekiq/logger' require 'sidekiq/client' diff --git a/sidekiq.gemspec b/sidekiq.gemspec index 5bd2a51f..26d0b727 100644 --- a/sidekiq.gemspec +++ b/sidekiq.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |gem| gem.files = `git ls-files | grep -Ev '^(test|myapp|examples)'`.split("\n") gem.name = "sidekiq" gem.version = Sidekiq::VERSION - gem.required_ruby_version = ">= 2.4.0" + gem.required_ruby_version = ">= 2.5.0" gem.add_dependency 'redis', '>= 3.3.5', '< 5' gem.add_dependency 'connection_pool', '~> 2.2', '>= 2.2.2'