user_notifier 0.3.1 → 0.4.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fb43297ae7fbecfc20ea9c37471237afbf16b6b8
4
- data.tar.gz: 68b52607ad8289e3e1e6d76eb48da5c0b94dbd5e
3
+ metadata.gz: 6a7f47e7eabe20902758effef386d9564b163d6c
4
+ data.tar.gz: c74d987b950d2326855e30a3b8311504ffe0893d
5
5
  SHA512:
6
- metadata.gz: 6bb8fde02cff53a27ca8b27bddffd2dbf7ea2de29f631bef2cc492e728bce929519e2dd4afb4737f03fd592b3a70200850ff2d7fa50fbb7ef6e4fdef4c16a650
7
- data.tar.gz: 963a06ce8d4dc32ec3063a32f449e4ffaee86aec7bc27a2e33962d6615d29d54e2050d210119e70e27b8f4ac6ea09cb73badcbc9c7a21d97397983265fc6bd42
6
+ metadata.gz: 99b858a8b15310ee588f7f5a551d00678cd0842d75ff86f8c830be968daf9218585abe2ad3dcfa06058499a90f9cd307502490f67a6b6cbf81b0a76b087a75b5
7
+ data.tar.gz: def43bcf4fa906474377858bf9db2050c6866ba3eb5f78777a7b2d768a7bf9f38c8404de548a9f8dae6629bc757ef0ba5fce6dc87f3cd8a5222a5da5b49dd896
@@ -21,6 +21,7 @@ class UserNotifier::Mailer < ActionMailer::Base
21
21
  from: address_format(UserNotifier.system_email, @notification.from_name),
22
22
  reply_to: address_format(@notification.from_email, @notification.from_name),
23
23
  to: @notification.user.email,
24
+ cc: @notification.cc,
24
25
  subject: subject,
25
26
  template_name: @notification.template_name
26
27
  }
@@ -7,6 +7,7 @@ class Create<%= notifications_table_name.camelize %> < ActiveRecord::Migration
7
7
  t.text :from_name, null: false
8
8
  t.text :template_name, null: false
9
9
  t.text :locale, null: false
10
+ t.text :cc
10
11
  t.timestamp :sent_at
11
12
  t.timestamp :deliver_at
12
13
  t.timestamps
@@ -1,8 +1,9 @@
1
1
  module UserNotifier
2
2
  module Configuration
3
- VALID_CONFIG_KEYS = [:system_email, :email_layout, :user_class_name, :from_email, :from_name, :use_xsmtp_api, :auto_deliver].freeze
3
+ VALID_CONFIG_KEYS = [:system_email, :email_layout, :user_class_name, :from_email, :from_name, :use_xsmtp_api, :auto_deliver, :cc].freeze
4
4
 
5
5
  DEFAULT_SYSTEM_EMAIL = nil
6
+ DEFAULT_CC = nil
6
7
  DEFAULT_EMAIL_LAYOUT = 'email'
7
8
  DEFAULT_USER_CLASS_NAME = 'User'
8
9
  DEFAULT_FROM_EMAIL = 'no-reply@yourdomain'
@@ -32,6 +33,7 @@ module UserNotifier
32
33
  self.email_layout = DEFAULT_EMAIL_LAYOUT
33
34
  self.user_class_name = DEFAULT_USER_CLASS_NAME
34
35
  self.from_email = DEFAULT_FROM_EMAIL
36
+ self.cc = DEFAULT_CC
35
37
  self.from_name = DEFAULT_FROM_NAME
36
38
  self.use_xsmtp_api = DEFAULT_USE_XSMTP_API
37
39
  self.auto_deliver = DEFAULT_AUTO_DELIVER
@@ -1,3 +1,3 @@
1
1
  module UserNotifier
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -0,0 +1,10 @@
1
+ class AddCcToUserNotification < ActiveRecord::Migration
2
+ def up
3
+ add_column :user_notifications, :cc, :text
4
+ end
5
+
6
+ def down
7
+ remove_column :user_notifications, :cc, :text
8
+ end
9
+
10
+ end
@@ -10,6 +10,7 @@ describe UserNotifier::Mailer do
10
10
  describe "#notify" do
11
11
  subject{ mailer.notify(notification) }
12
12
  its(:from){ should eq [] }
13
+ its(:cc){ should eq [] }
13
14
  its(:reply_to){ should eq ["no-reply@yourdomain"] }
14
15
  its(:to){ should eq ["foo@bar.com"] }
15
16
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: user_notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diogo Biazus
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-23 00:00:00.000000000 Z
11
+ date: 2016-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -161,6 +161,7 @@ files:
161
161
  - spec/dummy/db/migrate/20140709164530_create_orders.rb
162
162
  - spec/dummy/db/migrate/20140709170259_create_order_notifications.rb
163
163
  - spec/dummy/db/migrate/20150713180329_add_deliver_at_to_notifications.rb
164
+ - spec/dummy/db/migrate/20160426134347_add_cc_to_user_notification.rb
164
165
  - spec/dummy/db/schema.rb
165
166
  - spec/dummy/db/test.sqlite3
166
167
  - spec/dummy/log/development.log
@@ -237,6 +238,7 @@ test_files:
237
238
  - spec/dummy/db/migrate/20140709164530_create_orders.rb
238
239
  - spec/dummy/db/migrate/20140709170259_create_order_notifications.rb
239
240
  - spec/dummy/db/migrate/20150713180329_add_deliver_at_to_notifications.rb
241
+ - spec/dummy/db/migrate/20160426134347_add_cc_to_user_notification.rb
240
242
  - spec/dummy/db/schema.rb
241
243
  - spec/dummy/db/test.sqlite3
242
244
  - spec/dummy/log/development.log