simplificator-tls-support 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/tls-support/tls-support.rb +12 -2
  2. metadata +2 -2
@@ -5,7 +5,17 @@ Net::SMTP.class_eval do
5
5
  private
6
6
  def do_start(helodomain, user, secret, authtype)
7
7
  raise IOError, 'SMTP session already started' if @started
8
- check_auth_args user, secret, authtype if user or secret
8
+
9
+ if user or secret
10
+ # ruby 1.8.7 introduced new check method for argument
11
+ if self.private_methods.include? 'check_auth_method'
12
+ check_auth_method(authtype || DEFAULT_AUTH_TYPE)
13
+ check_auth_args user, secret
14
+ else
15
+ # ruby < 1.8.7
16
+ check_auth_args user, secret, authtype if user or secret
17
+ end
18
+ end
9
19
 
10
20
  sock = timeout(@open_timeout) { TCPSocket.open(@address, @port) }
11
21
  @socket = Net::InternetMessageIO.new(sock)
@@ -62,4 +72,4 @@ Net::SMTP.class_eval do
62
72
  rescue EOFError
63
73
  end
64
74
  end
65
- end
75
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplificator-tls-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simplificator GmbH
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-09-03 00:00:00 -07:00
12
+ date: 2008-09-17 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15