From 4a5d3054856c531fcbf1e8fecd32675582813a74 Mon Sep 17 00:00:00 2001 From: Aboodchei Date: Mon, 30 Sep 2024 15:51:59 +0300 Subject: [PATCH] Ruby 3.2 compatibility, revert imap monkey patch --- .travis.yml | 1 + CHANGELOG.md | 4 ++++ lib/gmail/client.rb | 1 - lib/gmail/client/base.rb | 1 - lib/gmail/imap_extensions.rb | 2 +- lib/gmail/version.rb | 2 +- 6 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1bd1cae..8af28c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ rvm: - 2.0.0 - 2.1.5 - 2.2.0 + - 3.2.0 - rbx - jruby diff --git a/CHANGELOG.md b/CHANGELOG.md index 22bfa00..a0861d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Gmail Gem Changelog +## 0.7.2 - 2023-01-25 + +* Fix issue related to Ruby 3.2 - String#untaint was deprecated + ## 0.7.1 - 2018-07-19 * Fix issue related to Net::IMAP.format_date change (@mnohai-mdsol) diff --git a/lib/gmail/client.rb b/lib/gmail/client.rb index 220002f..5c77f10 100644 --- a/lib/gmail/client.rb +++ b/lib/gmail/client.rb @@ -26,7 +26,6 @@ def self.new(name, *args) raise UnknownClient, "No such client: #{name}" end - require 'gmail/imap_extensions' require 'gmail/client/base' require 'gmail/client/plain' require 'gmail/client/xoauth' diff --git a/lib/gmail/client/base.rb b/lib/gmail/client/base.rb index 8238ac0..905701f 100644 --- a/lib/gmail/client/base.rb +++ b/lib/gmail/client/base.rb @@ -22,7 +22,6 @@ def initialize(username, options = {}) # Connect to gmail service. def connect(raise_errors = false) @imap = Net::IMAP.new(GMAIL_IMAP_HOST, GMAIL_IMAP_PORT, true, nil, false) - Gmail::ImapExtensions.patch_net_imap_response_parser @imap rescue SocketError raise_errors and raise ConnectionError, "Couldn't establish connection with Gmail IMAP service" diff --git a/lib/gmail/imap_extensions.rb b/lib/gmail/imap_extensions.rb index feacebc..12a3297 100644 --- a/lib/gmail/imap_extensions.rb +++ b/lib/gmail/imap_extensions.rb @@ -78,7 +78,7 @@ def x_gm_label_list if flag.empty? x else - flag.first.first.capitalize.untaint.intern + flag.first.first.capitalize.intern end end else diff --git a/lib/gmail/version.rb b/lib/gmail/version.rb index 9d24b0d..20ced81 100644 --- a/lib/gmail/version.rb +++ b/lib/gmail/version.rb @@ -1,3 +1,3 @@ module Gmail - VERSION = "0.7.1".freeze + VERSION = "0.7.2".freeze end