multiple_mailers 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -20,21 +20,22 @@ Or install it yourself as:
20
20
 
21
21
  define your smtp mailer accounts in `config/mailers.yml`
22
22
 
23
- default: &default
24
- address: 'smtp.gmail.com'
25
- port: 587
26
- domain: 'railsbp.com'
27
- authentication: 'plain'
28
-
29
- notification:
30
- <<: *default
31
- user_name: 'notification@railsbp.com'
32
- password: 'password'
33
-
34
- exception.notifier:
35
- <<: *default
36
- user_name: 'exception.notifier@railsbp.com'
37
- password: 'password'
23
+ production:
24
+ default: &default
25
+ address: 'smtp.gmail.com'
26
+ port: 587
27
+ domain: 'railsbp.com'
28
+ authentication: 'plain'
29
+
30
+ notification:
31
+ <<: *default
32
+ user_name: 'notification@railsbp.com'
33
+ password: 'password'
34
+
35
+ exception.notifier:
36
+ <<: *default
37
+ user_name: 'exception.notifier@railsbp.com'
38
+ password: 'password'
38
39
 
39
40
  the default account is used for all mailer classes, if you want to
40
41
  override it, you can define mailer account for any mailer class you
@@ -4,7 +4,7 @@ module MultipleMailers
4
4
  class Configuration
5
5
  class <<self
6
6
  def load
7
- @configurations ||= YAML.load_file(Rails.root.join("config/mailers.yml"))
7
+ @configurations ||= YAML.load_file(Rails.root.join("config/mailers.yml"))[Rails.env]
8
8
  end
9
9
 
10
10
  def get(name)
@@ -1,3 +1,3 @@
1
1
  module MultipleMailers
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -1,15 +1,16 @@
1
- default: &default
2
- address: 'smtp.gmail.com'
3
- port: 587
4
- domain: 'railsbp.com'
5
- authentication: 'plain'
1
+ production:
2
+ default: &default
3
+ address: 'smtp.gmail.com'
4
+ port: 587
5
+ domain: 'railsbp.com'
6
+ authentication: 'plain'
6
7
 
7
- notification:
8
- <<: *default
9
- user_name: 'notification@railsbp.com'
10
- password: 'password'
8
+ notification:
9
+ <<: *default
10
+ user_name: 'notification@railsbp.com'
11
+ password: 'password'
11
12
 
12
- exception.notifier:
13
- <<: *default
14
- user_name: 'exception.notifier@railsbp.com'
15
- password: 'password'
13
+ exception.notifier:
14
+ <<: *default
15
+ user_name: 'exception.notifier@railsbp.com'
16
+ password: 'password'
@@ -4,6 +4,10 @@ class Rails
4
4
  def self.root
5
5
  Pathname.new(__FILE__).dirname
6
6
  end
7
+
8
+ def self.env
9
+ "production"
10
+ end
7
11
  end
8
12
 
9
13
  require 'multiple_mailers'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multiple_mailers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-03-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionmailer
16
- requirement: &70167355381020 !ruby/object:Gem::Requirement
16
+ requirement: &70164372870160 !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: :development
23
23
  prerelease: false
24
- version_requirements: *70167355381020
24
+ version_requirements: *70164372870160
25
25
  description: extend actionmailer to allow one smtp account per mailer class
26
26
  email:
27
27
  - flyerhzm@gmail.com