diff --git a/.travis.yml b/.travis.yml index fe3a2cd..f33ed99 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ rvm: - 2.4 - 2.5 - 2.6 + - 2.7 - ruby-head before_install: gem install bundler diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dd6b58..f08753d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,9 @@ # Changelog All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [0.4.0] - 2020-01-24 +### Added +- Support for Ruby 2.7 ## [0.3.0] - 2019-02-02 ### Added diff --git a/LICENSE.txt b/LICENSE.txt index 3457db0..f9415d8 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018-2019 Dmitry Gubitskiy +Copyright (c) 2018-2020 Dmitry Gubitskiy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 91b257f..26054b5 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Logger class patch for hourly log rotation support ## Requirements -Ruby 2.3, 2.4, 2.5 or 2.6 +Ruby 2.3, 2.4, 2.5, 2.6 or 2.7 ## Installation diff --git a/lib/hourly_logger_rotator/patch/ruby_2_4.rb b/lib/hourly_logger_rotator/patch/ruby_2_4.rb index 4d666b8..6fab496 100644 --- a/lib/hourly_logger_rotator/patch/ruby_2_4.rb +++ b/lib/hourly_logger_rotator/patch/ruby_2_4.rb @@ -5,7 +5,13 @@ module Patch module Ruby_2_4 # rubocop:disable Naming/ClassAndModuleCamelCase SiD = Logger::Period::SiD - def initialize(log = nil, shift_age: nil, shift_size: nil, shift_period_suffix: nil) + def initialize( + log = nil, + shift_age: nil, + shift_size: nil, + shift_period_suffix: nil, + binmode: nil + ) @dev = @filename = @shift_age = @shift_size = @shift_period_suffix = nil mon_initialize set_dev(log) diff --git a/lib/hourly_logger_rotator/patch/ruby_2_7.rb b/lib/hourly_logger_rotator/patch/ruby_2_7.rb new file mode 100644 index 0000000..48c63ee --- /dev/null +++ b/lib/hourly_logger_rotator/patch/ruby_2_7.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +require "hourly_logger_rotator/patch/ruby_2_4" + +module HourlyLoggerRotator + module Patch + # rubocop:disable Naming/ClassAndModuleCamelCase + module Ruby_2_7 + # rubocop:enable Naming/ClassAndModuleCamelCase + include Ruby_2_4 + end + end +end diff --git a/lib/hourly_logger_rotator/version.rb b/lib/hourly_logger_rotator/version.rb index 7352f44..2063efe 100644 --- a/lib/hourly_logger_rotator/version.rb +++ b/lib/hourly_logger_rotator/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module HourlyLoggerRotator - VERSION = "0.3.0" + VERSION = "0.4.0" end