cowtech-rails 2.8.3 → 2.8.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,66 +4,6 @@
4
4
  # Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
5
5
  #
6
6
 
7
- # To enable real SSL
8
- if defined?(Mail) then
9
- class Mail::SMTP
10
- def deliver!(mail)
11
-
12
- # Set the envelope from to be either the return-path, the sender or the first from address
13
- envelope_from = mail.return_path || mail.sender || mail.from_addrs.first
14
- if envelope_from.blank?
15
- raise ArgumentError.new('A sender (Return-Path, Sender or From) required to send a message')
16
- end
17
-
18
- destinations ||= mail.destinations if mail.respond_to?(:destinations) && mail.destinations
19
- if destinations.blank?
20
- raise ArgumentError.new('At least one recipient (To, Cc or Bcc) is required to send a message')
21
- end
22
-
23
- message ||= mail.encoded if mail.respond_to?(:encoded)
24
- if message.blank?
25
- raise ArgumentError.new('A encoded content is required to send a message')
26
- end
27
-
28
- smtp = Net::SMTP.new(settings[:address], settings[:port])
29
- if settings[:tls] || settings[:ssl]
30
- if smtp.respond_to?(:enable_tls)
31
- if !settings[:openssl_verify_mode]
32
- smtp.enable_tls
33
- else
34
- openssl_verify_mode = settings[:openssl_verify_mode]
35
- if openssl_verify_mode.kind_of?(String)
36
- openssl_verify_mode = "OpenSSL::SSL::VERIFY_#{openssl_verify_mode.upcase}".constantize
37
- end
38
- context = Net::SMTP.default_ssl_context
39
- context.verify_mode = openssl_verify_mode
40
- smtp.enable_tls(context)
41
- end
42
- end
43
- elsif settings[:enable_starttls_auto]
44
- if smtp.respond_to?(:enable_starttls_auto)
45
- if !settings[:openssl_verify_mode]
46
- smtp.enable_starttls_auto
47
- else
48
- openssl_verify_mode = settings[:openssl_verify_mode]
49
- if openssl_verify_mode.kind_of?(String)
50
- openssl_verify_mode = "OpenSSL::SSL::VERIFY_#{openssl_verify_mode.upcase}".constantize
51
- end
52
- context = Net::SMTP.default_ssl_context
53
- context.verify_mode = openssl_verify_mode
54
- smtp.enable_starttls_auto(context)
55
- end
56
- end
57
- end
58
- smtp.start(settings[:domain], settings[:user_name], settings[:password], settings[:authentication]) do |smtp|
59
- smtp.sendmail(message, envelope_from, destinations)
60
- end
61
-
62
- self
63
- end
64
- end
65
- end
66
-
67
7
  if defined?(ActiveRecord) then
68
8
  class ActiveRecord::Base
69
9
  include Cowtech::RubyOnRails::Extensions::AR
@@ -9,7 +9,7 @@ module Cowtech
9
9
  module Version
10
10
  MAJOR = 2
11
11
  MINOR = 8
12
- PATCH = 3
12
+ PATCH = 4
13
13
 
14
14
  STRING = [MAJOR, MINOR, PATCH].compact.join(".")
15
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cowtech-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.3
4
+ version: 2.8.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-04-15 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cowtech-extensions
16
- requirement: &70301460461200 !ruby/object:Gem::Requirement
16
+ requirement: &70186154123000 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70301460461200
24
+ version_requirements: *70186154123000
25
25
  description: A general purpose Rails utility plugin.
26
26
  email: shogun_panda@me.com
27
27
  executables: []