mandrill_mailer 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1 +1 @@
1
- mandrill_mailer-0.0.1.gem
1
+ *.gem
data/README.md CHANGED
@@ -17,7 +17,7 @@ ActionMailer::Base.smtp_settings = {
17
17
  :domain => 'heroku.com'
18
18
  }
19
19
  ActionMailer::Base.delivery_method = :smtp
20
- MandrillMailer.api_key = ENV['MANDRILL_API_KEY']
20
+ MandrillMailer::Config.api_key = ENV['MANDRILL_API_KEY']
21
21
  ```
22
22
 
23
23
  Don't forget to setup your ENV variables on your server
@@ -46,7 +46,7 @@ Creating a new Mandrill Mailer is similar to a normal Rails mailer:
46
46
  end
47
47
  ```
48
48
 
49
- * `#default:`
49
+ * `#default:`
50
50
  * `:from` - set the default from email address for the mailer
51
51
 
52
52
  * `.mandrill_mail`
@@ -0,0 +1,21 @@
1
+ module MandrillMailer
2
+ class Config
3
+ # Public: this enables the api key to be set in an initializer
4
+ # ex. MandrillMailer.api_key = ENV[MANDRILL_API_KEY]
5
+ #
6
+ # key - Api key for the Mandrill api
7
+ #
8
+ #
9
+ # Returns
10
+ def self.api_key=(key)
11
+ @@api_key = key
12
+ end
13
+
14
+ # Public: Returns the api key
15
+ #
16
+ # Returns the api key
17
+ def self.api_key
18
+ @@api_key || ''
19
+ end
20
+ end
21
+ end
@@ -125,17 +125,6 @@ module MandrillMailer
125
125
 
126
126
  end
127
127
 
128
- # Public: this enables the api key to be set in an initializer
129
- # ex. MandrillMailer.api_key = ENV[MANDRILL_API_KEY]
130
- #
131
- # key - Api key for the Mandrill api
132
- #
133
- #
134
- # Returns the key(String)
135
- def self.api_key=(key)
136
- @@api_key = key
137
- end
138
-
139
128
  def default_url_options=(options={})
140
129
  @@url_host = options[:host]
141
130
  end
@@ -292,7 +281,7 @@ module MandrillMailer
292
281
  end
293
282
 
294
283
  def api_key
295
- @@api_key || ''
284
+ MandrillMailer::Config.api_key
296
285
  end
297
286
  end
298
287
  end
@@ -1,3 +1,3 @@
1
1
  module MandrillMailer
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mandrill_mailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-24 00:00:00.000000000 Z
12
+ date: 2012-09-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -87,6 +87,7 @@ files:
87
87
  - Gemfile.lock
88
88
  - README.md
89
89
  - lib/mandrill_mailer.rb
90
+ - lib/mandrill_mailer/config.rb
90
91
  - lib/mandrill_mailer/mock.rb
91
92
  - lib/mandrill_mailer/transactional_mailer.rb
92
93
  - lib/mandrill_mailer/version.rb