net-imap 0.3.4 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of net-imap might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7942e0dcda47ac417806fb03aec58b66b8bac3ccf51f53f2f7ac2c6a588e35af
4
- data.tar.gz: 38530b6af862085a9d1ff3c59c6536152acc15bb7d925d8547cd4feebea42872
3
+ metadata.gz: 05eb3b47c01896129677f14fe30217296fed8ff9210f20b4ce014fa764f9ea9f
4
+ data.tar.gz: d1e192b5b02b97c86ae169f483a99c12418dd21e99099f41aeb3fb78d6fd8b67
5
5
  SHA512:
6
- metadata.gz: 5bd29fb28b2b3ed9b1a0589e38f8844c47e671006d50deb4462fe5e8cfd97ad923ef0af3114a094d31cbb5943ff0ac9a15e549e67ac08be68eb04a0915eae67f
7
- data.tar.gz: 7562e44288caa3538203d415f4d0b1dc4a44a77428e40c4b44046b86fb26b1abc2a4226229f4f494e54f21240cc96dea9106afded971829ec5873f507adab7c9
6
+ metadata.gz: 680a7026072572443ec292a6b90d71eb0efa377e9b276acc8bbe62fe471bb1cf94ed0c0e97e860666ac84346d4c1bb2f05eef6e84aeef4286658b39b53f27b96
7
+ data.tar.gz: e69f7938863ff664a10a91d516484976573f60b7abff45475dbfdc3e3e674aeed1ce1dce562fc90338cbcaff4f430fa05918b05dd4c799d4ab1e686e97faf418
@@ -3,11 +3,18 @@ name: ubuntu
3
3
  on: [push, pull_request]
4
4
 
5
5
  jobs:
6
+ ruby-versions:
7
+ uses: ruby/actions/.github/workflows/ruby_versions.yml@master
8
+ with:
9
+ engine: cruby
10
+ min_version: 2.6
11
+
6
12
  build:
13
+ needs: ruby-versions
7
14
  name: build (${{ matrix.ruby }} / ${{ matrix.os }})
8
15
  strategy:
9
16
  matrix:
10
- ruby: [ head, '3.1', '3.0', '2.7' ]
17
+ ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
11
18
  os: [ ubuntu-latest, macos-latest ]
12
19
  experimental: [false]
13
20
  include:
@@ -7,7 +7,7 @@ class Net::IMAP::XOauth2Authenticator
7
7
 
8
8
  private
9
9
 
10
- def initialize(user, oauth2_token)
10
+ def initialize(user, oauth2_token, **_)
11
11
  @user = user
12
12
  @oauth2_token = oauth2_token
13
13
  end
@@ -54,9 +54,9 @@ module Net
54
54
  # Net::IMAP does _not_ automatically encode and decode
55
55
  # mailbox names to and from UTF-7.
56
56
  def self.decode_utf7(s)
57
- return s.gsub(/&([^-]+)?-/n) {
58
- if $1
59
- ($1.tr(",", "/") + "===").unpack1("m").encode(Encoding::UTF_8, Encoding::UTF_16BE)
57
+ return s.gsub(/&([A-Za-z0-9+,]+)?-/n) {
58
+ if base64 = $1
59
+ (base64.tr(",", "/") + "===").unpack1("m").encode(Encoding::UTF_8, Encoding::UTF_16BE)
60
60
  else
61
61
  "&"
62
62
  end
data/lib/net/imap.rb CHANGED
@@ -511,10 +511,8 @@ module Net
511
511
  #
512
512
  # - #greeting: The server's initial untagged response, which can indicate a
513
513
  # pre-authenticated connection.
514
- # - #responses: The untagged responses, as a hash. Keys are the untagged
515
- # response type (e.g. "OK", "FETCH", "FLAGS") and response code (e.g.
516
- # "ALERT", "UIDVALIDITY", "UIDNEXT", "TRYCREATE", etc). Values are arrays
517
- # of UntaggedResponse or ResponseCode.
514
+ # - #responses: A hash with arrays of unhandled <em>non-+nil+</em>
515
+ # UntaggedResponse and ResponseCode +#data+, keyed by +#name+.
518
516
  # - #add_response_handler: Add a block to be called inside the receiver thread
519
517
  # with every server response.
520
518
  # - #remove_response_handler: Remove a previously added response handler.
@@ -701,7 +699,7 @@ module Net
701
699
  # * {Character sets}[https://www.iana.org/assignments/character-sets/character-sets.xhtml]
702
700
  #
703
701
  class IMAP < Protocol
704
- VERSION = "0.3.4"
702
+ VERSION = "0.3.6"
705
703
 
706
704
  include MonitorMixin
707
705
  if defined?(OpenSSL::SSL)
@@ -712,7 +710,9 @@ module Net
712
710
  # Returns the initial greeting the server, an UntaggedResponse.
713
711
  attr_reader :greeting
714
712
 
715
- # Returns recorded untagged responses.
713
+ # Returns a hash with arrays of unhandled <em>non-+nil+</em>
714
+ # UntaggedResponse#data keyed by UntaggedResponse#name, and
715
+ # ResponseCode#data keyed by ResponseCode#name.
716
716
  #
717
717
  # For example:
718
718
  #
data/net-imap.gemspec CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  # Specify which files should be added to the gem when it is released.
26
26
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
27
27
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
28
- `git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(bin|test|spec|features)/}) }
28
+ `git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(bin|test|spec|features|rfcs)/}) }
29
29
  end
30
30
  spec.bindir = "exe"
31
31
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-imap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shugo Maeda
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-12-23 00:00:00.000000000 Z
12
+ date: 2023-06-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: net-protocol
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  requirements: []
133
- rubygems_version: 3.4.0.dev
133
+ rubygems_version: 3.4.10
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: Ruby client api for Internet Message Access Protocol