broadcast 0.2.2 → 0.2.3

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.
@@ -13,7 +13,13 @@ class Broadcast::Medium::Email < Broadcast::Medium
13
13
  body message.body
14
14
  end
15
15
  if options.delivery_method
16
- mail.delivery_method options.delivery_method, options.delivery_options || {}
16
+ # ensure the delivery options has symbolized keys
17
+ # Addresses https://github.com/futuresimple/broadcast/issues/9
18
+ delivery_options = options.delivery_options.inject({}) do |memo, setting|
19
+ memo[setting[0].to_s.to_sym] = setting[1]
20
+ memo
21
+ end
22
+ mail.delivery_method options.delivery_method, delivery_options || {}
17
23
  end
18
24
  mail.deliver
19
25
  end
@@ -1,5 +1,5 @@
1
1
  class Broadcast
2
2
 
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
 
5
5
  end
@@ -31,9 +31,9 @@ describe Broadcast::Medium::Email do
31
31
  def mail.deliver; end
32
32
  Mail.should_receive(:new).and_return(mail)
33
33
  @medium.publish(@message)
34
- mail.delivery_method.settings['user_name'].should == '<username>'
35
- mail.delivery_method.settings['password'].should == '<password>'
36
- mail.delivery_method.settings['address'].should == 'smtp.gmail.com'
34
+ mail.delivery_method.settings[:user_name].should == '<username>'
35
+ mail.delivery_method.settings[:password].should == '<password>'
36
+ mail.delivery_method.settings[:address].should == 'smtp.gmail.com'
37
37
  end
38
38
 
39
39
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: broadcast
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 2
10
- version: 0.2.2
9
+ - 3
10
+ version: 0.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Marcin Bunsch