net-smtp 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/net/smtp.rb +10 -5
  3. data/net-smtp.gemspec +0 -2
  4. metadata +3 -31
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fbf12984985ffef0271f09805060b2cfa5e72eb3955c8ce51ee8076b427e1a02
4
- data.tar.gz: 17c6420b495abe8b17446b1e667681b2680b02d894b3ce1e4ef6cffaa26ad1df
3
+ metadata.gz: 642b3ab1e326ac890c33653e8293421558c50a8d6cdc3483b5c41edb26bdaebe
4
+ data.tar.gz: 8c31ba69f42e11a41eda04a31cffe375bcca4cee447b9bc1b1cda218a8f905f3
5
5
  SHA512:
6
- metadata.gz: 4d9372a9673256cc280600a1367a0c92bed91250209736b4b54c7219c115b1006e9fc66d465367729f53ef393b9a8077b33f11f7578365d9cb84051e44b86976
7
- data.tar.gz: 0f7da80c1d40216684ff0927637b14dfb5597638913a0aa3a8f2ca68a3fc89724926736c719715171b7bcab915a9504016f10356b2622bc6da9e5f51238f8e52
6
+ metadata.gz: a2b5433005fe906635edee7e0bb1c9d0d81a6fff1da5af97ad39b16bf7e8a3330dafa9d9a513a3e83b17fe5a53c1489e07f52445c8cdefd81192f83a8cc4f6e7
7
+ data.tar.gz: be1a223db50575fbb0f14ebac46af142b0f109d422049d5ae49c57a0548c4560904931d8b8c75cc35e95c1978ad9c620ed059bee541d7b443f7a3668e1df2a43
data/lib/net/smtp.rb CHANGED
@@ -35,8 +35,13 @@ module Net
35
35
  attr_reader :response
36
36
 
37
37
  def initialize(response, message: nil)
38
- @response = response
39
- @message = message
38
+ if response.is_a?(::Net::SMTP::Response)
39
+ @response = response
40
+ @message = message
41
+ else
42
+ @response = nil
43
+ @message = message || response
44
+ end
40
45
  end
41
46
 
42
47
  def message
@@ -179,7 +184,7 @@ module Net
179
184
  # user: 'Your Account', secret: 'Your Password', authtype: :cram_md5)
180
185
  #
181
186
  class SMTP < Protocol
182
- VERSION = "0.3.1"
187
+ VERSION = "0.3.2"
183
188
 
184
189
  Revision = %q$Revision$.split[1]
185
190
 
@@ -643,7 +648,7 @@ module Net
643
648
  do_helo helo_domain
644
649
  if ! tls? and (starttls_always? or (capable_starttls? and starttls_auto?))
645
650
  unless capable_starttls?
646
- raise SMTPUnsupportedCommand.new(nil, message: "STARTTLS is not supported on this server")
651
+ raise SMTPUnsupportedCommand, "STARTTLS is not supported on this server"
647
652
  end
648
653
  starttls
649
654
  @socket = new_internet_message_io(tlsconnect(s, @ssl_context_starttls))
@@ -1165,7 +1170,7 @@ module Net
1165
1170
  class Address
1166
1171
  # mail address [String]
1167
1172
  attr_reader :address
1168
- # paramters [Array<String>]
1173
+ # parameters [Array<String>]
1169
1174
  attr_reader :parameters
1170
1175
 
1171
1176
  # :call-seq:
data/net-smtp.gemspec CHANGED
@@ -30,6 +30,4 @@ Gem::Specification.new do |spec|
30
30
  spec.require_paths = ["lib"]
31
31
 
32
32
  spec.add_dependency "net-protocol"
33
- spec.add_dependency "digest"
34
- spec.add_dependency "timeout"
35
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-smtp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yukihiro Matsumoto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-12 00:00:00.000000000 Z
11
+ date: 2022-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-protocol
@@ -24,34 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: digest
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: timeout
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
27
  description: Simple Mail Transfer Protocol client library for Ruby.
56
28
  email:
57
29
  - matz@ruby-lang.org
@@ -84,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
56
  - !ruby/object:Gem::Version
85
57
  version: '0'
86
58
  requirements: []
87
- rubygems_version: 3.3.0.dev
59
+ rubygems_version: 3.4.0.dev
88
60
  signing_key:
89
61
  specification_version: 4
90
62
  summary: Simple Mail Transfer Protocol client library for Ruby.