malone 1.0.0 → 1.0.1

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.
Files changed (4) hide show
  1. data/lib/malone.rb +4 -1
  2. data/malone.gemspec +1 -1
  3. data/test/malone.rb +3 -1
  4. metadata +16 -6
data/lib/malone.rb CHANGED
@@ -32,7 +32,7 @@ class Malone
32
32
  mail = envelope(dict)
33
33
 
34
34
  smtp = Net::SMTP.new(config.host, config.port)
35
- smtp.enable_starttls_auto
35
+ smtp.enable_starttls_auto if config.tls
36
36
 
37
37
  begin
38
38
  smtp.start(config.domain, config.user, config.password, config.auth)
@@ -60,9 +60,12 @@ class Malone
60
60
  attr_accessor :password
61
61
  attr_accessor :domain
62
62
  attr_accessor :auth
63
+ attr_accessor :tls
63
64
 
64
65
  def initialize(options)
65
66
  opts = options.dup
67
+
68
+ @tls = true
66
69
 
67
70
  url = opts.delete(:url) || ENV["MALONE_URL"]
68
71
 
data/malone.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'malone'
3
- s.version = "1.0.0"
3
+ s.version = "1.0.1"
4
4
  s.summary = %{Dead-simple Ruby mailing solution which always delivers.}
5
5
  s.date = "2011-01-10"
6
6
  s.author = "Cyril David"
data/test/malone.rb CHANGED
@@ -37,6 +37,7 @@ test "configuration via url and params" do
37
37
  assert_equal "foo@bar.com", c.user
38
38
  assert_equal "foo.com", c.domain
39
39
  assert_equal :login, c.auth
40
+ assert_equal true, c.tls
40
41
 
41
42
  # We verify that parameters passed takes precedence over the URL.
42
43
  assert_equal "barbaz123", c.password
@@ -45,7 +46,7 @@ end
45
46
  test "configuration via MALONE_URL" do
46
47
  ENV["MALONE_URL"] = "smtp://foo%40bar.com:pass1234@smtp.gmail.com:587"
47
48
 
48
- m = Malone.connect(domain: "foo.com", auth: "login")
49
+ m = Malone.connect(domain: "foo.com", auth: "login", tls: false)
49
50
  c = m.config
50
51
 
51
52
  assert_equal "smtp.gmail.com", c.host
@@ -53,6 +54,7 @@ test "configuration via MALONE_URL" do
53
54
  assert_equal "foo@bar.com", c.user
54
55
  assert_equal "foo.com", c.domain
55
56
  assert_equal :login, c.auth
57
+ assert_equal false, c.tls
56
58
  end
57
59
 
58
60
  test "typos in configuration" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: malone
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-01-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mailfactory
16
- requirement: &70338423965500 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '1.4'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70338423965500
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '1.4'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: cutest
27
- requirement: &70338423965000 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,7 +37,12 @@ dependencies:
32
37
  version: '0'
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *70338423965000
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  description:
37
47
  email: me@cyrildavid.com
38
48
  executables: []
@@ -67,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
77
  version: '0'
68
78
  requirements: []
69
79
  rubyforge_project:
70
- rubygems_version: 1.8.11
80
+ rubygems_version: 1.8.23
71
81
  signing_key:
72
82
  specification_version: 3
73
83
  summary: Dead-simple Ruby mailing solution which always delivers.