wupee 1.0.4 → 1.1.2

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: 0058861954977d8f19d45b5c2d2e01028934cc7d
4
- data.tar.gz: 3a69f93f993039ef5a3adca1d279cd124195dcee
3
+ metadata.gz: f0752fb6bb0db26777ee69c2669b83183b2f36d5
4
+ data.tar.gz: 06af3728f4138fd2a4e9af69c5af182762d32fc2
5
5
  SHA512:
6
- metadata.gz: e55954c18bbcafe24d9d271c1b27b8fd45a0977a5ce5d9d02fd604fcf1c186d8bab965c5306e27e2aefa10d6c9943a67aa0bf0cfa5b9b63aaeb9a7160114e556
7
- data.tar.gz: 76c258bb5ba911921fd8939eb6846351085b76936dc042a34d5bbbf54faec38be6364de353bb974d70f019430751a2dbe2af4f4024deb90bbd130b723fd0594c
6
+ metadata.gz: 4c8ba2b52d9413faea0b6ec4cd51c44f96871ca148b706fc1669f6d1379c33d0700b69535559c841bcc22e1135207e384b676b003f8252586bc71c633ce6d5d6
7
+ data.tar.gz: 8a9c26b59247407427a58480bacfdfdb6dc10ef6cacde0d996c079e0c6f0089c421aefc92a0adc5a5836368ca8c70267caea2f3fffd66925a3c110c8458499ec
@@ -2,11 +2,12 @@ module Wupee
2
2
  class NotificationsMailer < ActionMailer::Base
3
3
  after_action :mark_notification_as_sent
4
4
 
5
- def send_mail_for(notification, subject_interpolations = {})
5
+ def send_mail_for(notification, subject_interpolations = {}, locals_interpolations = {})
6
6
  @notification = notification
7
7
  @receiver = notification.receiver
8
8
  @attached_object = notification.attached_object
9
9
  @subject_interpolations = subject_interpolations
10
+ @locals = locals_interpolations
10
11
 
11
12
  if !respond_to?(notification.notification_type.name)
12
13
  class_eval %Q{
@@ -3,6 +3,7 @@ class Wupee::NotificationType < ActiveRecord::Base
3
3
  validates :name, uniqueness: true
4
4
 
5
5
  has_many :notification_type_configurations, foreign_key: :notification_type_id, dependent: :destroy
6
+ has_many :notifications, foreign_key: :notification_type_id, dependent: :destroy
6
7
 
7
8
  def self.create_configurations_for(*receivers)
8
9
  class_eval do
@@ -0,0 +1,16 @@
1
+ namespace :wupee do
2
+ desc "generate Wupee::NotificationTypeConfiguration objects for given Wupee::NotificationType name and for all receivers of given class (default to User)"
3
+ task :generate_notification_type_configurations, [:notification_type_name, :receiver_klass] => [:environment] do |t, args|
4
+
5
+ unless notification_type = Wupee::NotificationType.find_by(name: args[:notification_type_name])
6
+ warn "Wupee::NotificationType with name #{args[:notification_type_name]} not found."
7
+ next
8
+ end
9
+
10
+ receiver_klass = args[:receiver_klass] || 'User'
11
+
12
+ receiver_klass.constantize.pluck(:id).each do |id|
13
+ Wupee::NotificationTypeConfiguration.create!(receiver_type: receiver_klass, receiver_id: id, notification_type_id: notification_type.id)
14
+ end
15
+ end
16
+ end
@@ -1,4 +1,5 @@
1
1
  require "wupee/engine"
2
+ require "wupee/notifier"
2
3
 
3
4
  module Wupee
4
5
  mattr_accessor :mailer, :deliver_when
@@ -1,11 +1,16 @@
1
1
  module Wupee
2
2
  class Notifier
3
- attr_reader :deliver_when, :attached_object, :receiver_s, :notification_type, :subject_vars
3
+ attr_reader :deliver_when, :attached_object, :receiver_s, :notification_type, :subject_vars, :locals
4
4
 
5
5
  def initialize(opts = {})
6
6
  @attached_object = opts[:attached_object]
7
- @receiver_s = opts[:receiver] || opts[:receivers] || []
7
+
8
+ receiver_arg = opts[:receiver] || opts[:receivers]
9
+ receiver(receiver_arg) if receiver_arg
10
+
8
11
  @subject_vars = opts[:subject_vars] || {}
12
+ @locals = opts[:locals] || {}
13
+
9
14
  @deliver_when = opts[:deliver]
10
15
  notif_type(opts[:notif_type]) if opts[:notif_type]
11
16
  end
@@ -23,11 +28,11 @@ module Wupee
23
28
  end
24
29
 
25
30
  def receiver(receiver)
26
- @receiver_s = receiver
31
+ @receiver_s = [*receiver]
27
32
  end
28
33
 
29
34
  def receivers(receivers)
30
- @receiver_s = receivers
35
+ receiver(receivers)
31
36
  end
32
37
 
33
38
  def deliver(deliver_method)
@@ -38,7 +43,14 @@ module Wupee
38
43
  @subject_vars = subject_vars
39
44
  end
40
45
 
46
+ def locals(locals = {})
47
+ @locals = locals
48
+ end
49
+
41
50
  def execute
51
+ raise ArgumentError.new('receiver or receivers is missing') if @receiver_s.nil?
52
+ raise ArgumentError.new('notif_type is missing') if @notification_type.nil?
53
+
42
54
  notif_type_configs = Wupee::NotificationTypeConfiguration.includes(:receiver).where(receiver: @receiver_s, notification_type: @notification_type)
43
55
 
44
56
  notif_type_configs.each do |notif_type_config|
@@ -46,28 +58,30 @@ module Wupee
46
58
  notification.is_read = true unless notif_type_config.wants_notification?
47
59
  notification.save!
48
60
 
49
- subject_interpolations = interpolate_subject_vars(notification)
50
- send_email(notification, subject_interpolations) if notif_type_config.wants_email?
61
+ subject_interpolations = interpolate_vars(@subject_vars, notification)
62
+ locals_interpolations = interpolate_vars(@locals, notification)
63
+
64
+ send_email(notification, subject_interpolations, locals_interpolations) if notif_type_config.wants_email?
51
65
  end
52
66
  end
53
67
 
54
68
  private
55
- def send_email(notification, subject_interpolations)
69
+ def send_email(notification, subject_interpolations, locals_interpolations)
56
70
  deliver_method = "deliver_#{@deliver_when || Wupee.deliver_when}"
57
- Wupee.mailer.send_mail_for(notification, subject_interpolations).send(deliver_method)
71
+ Wupee.mailer.send_mail_for(notification, subject_interpolations, locals_interpolations).send(deliver_method)
58
72
  end
59
73
 
60
- def interpolate_subject_vars(notification)
61
- subject_vars_interpolated = {}
62
- @subject_vars.each do |key, value|
63
- subject_vars_interpolated[key] = if value.kind_of?(Proc)
74
+ def interpolate_vars(vars, notification)
75
+ vars_interpolated = {}
76
+ vars.each do |key, value|
77
+ vars_interpolated[key] = if value.kind_of?(Proc)
64
78
  notification.instance_eval(&value)
65
79
  else
66
80
  value.to_s
67
81
  end
68
82
  end
69
83
 
70
- subject_vars_interpolated
84
+ vars_interpolated
71
85
  end
72
86
  end
73
87
  end
@@ -1,3 +1,3 @@
1
1
  module Wupee
2
- VERSION = "1.0.4"
2
+ VERSION = "1.1.2"
3
3
  end
@@ -0,0 +1,2 @@
1
+ <%= @locals %>
2
+ <%= @subject_interpolations %>
@@ -1748,3 +1748,569 @@ Content-Transfer-Encoding: 7bit
1748
1748
  Wupee::Notification Load (0.3ms) SELECT "wupee_notifications".* FROM "wupee_notifications" ORDER BY "wupee_notifications"."id" DESC LIMIT 1
1749
1749
  Wupee::Notification Load (0.2ms) SELECT "wupee_notifications".* FROM "wupee_notifications" ORDER BY "wupee_notifications"."id" DESC LIMIT 1
1750
1750
  Wupee::NotificationType Load (0.2ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" WHERE "wupee_notification_types"."id" = ? LIMIT 1 [["id", 2]]
1751
+ User Load (1.9ms) SELECT "users".* FROM "users"
1752
+ Message Load (0.4ms) SELECT "messages".* FROM "messages"
1753
+ Wupee::NotificationType Load (4.9ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types"
1754
+ Wupee::NotificationType Load (0.2ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
1755
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
1756
+ Wupee::NotificationTypeConfiguration Load (0.6ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
1757
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
1758
+  (0.1ms) begin transaction
1759
+ SQL (1.1ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 14:21:57.662974"], ["updated_at", "2016-03-22 14:21:57.662974"]]
1760
+  (0.8ms) commit transaction
1761
+ Rendered notifications_mailer/notify_new_message.html.erb (3.4ms)
1762
+ SQL (0.9ms) UPDATE "wupee_notifications" SET "is_sent" = 't' WHERE "wupee_notifications"."id" = ? [["id", 3]]
1763
+
1764
+ NotificationsMailer#send_mail_for: processed outbound mail in 173.1ms
1765
+
1766
+ Sent mail to ewfwfe@wefwef.fr (8.6ms)
1767
+ Date: Tue, 22 Mar 2016 15:21:57 +0100
1768
+ From: contact@sleede.com
1769
+ To: ewfwfe@wefwef.fr
1770
+ Message-ID: <56f15505ce681_4b133fca34c601e097863@MBP-sleede-Nicolas.local.mail>
1771
+ Subject: notify_new_message
1772
+ Mime-Version: 1.0
1773
+ Content-Type: text/html;
1774
+ charset=UTF-8
1775
+ Content-Transfer-Encoding: 7bit
1776
+
1777
+
1778
+ Wupee::NotificationType Load (0.2ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
1779
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
1780
+ Wupee::NotificationTypeConfiguration Load (0.1ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
1781
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
1782
+  (0.1ms) begin transaction
1783
+ SQL (0.3ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 14:22:36.858158"], ["updated_at", "2016-03-22 14:22:36.858158"]]
1784
+  (0.8ms) commit transaction
1785
+ Rendered notifications_mailer/notify_new_message.html.erb (0.0ms)
1786
+ SQL (1.0ms) UPDATE "wupee_notifications" SET "is_sent" = 't' WHERE "wupee_notifications"."id" = ? [["id", 4]]
1787
+
1788
+ NotificationsMailer#send_mail_for: processed outbound mail in 11.9ms
1789
+
1790
+ Sent mail to ewfwfe@wefwef.fr (3.5ms)
1791
+ Date: Tue, 22 Mar 2016 15:22:36 +0100
1792
+ From: contact@sleede.com
1793
+ To: ewfwfe@wefwef.fr
1794
+ Message-ID: <56f1552cd5756_4b133fca34c601e0979f0@MBP-sleede-Nicolas.local.mail>
1795
+ Subject: notify_new_message
1796
+ Mime-Version: 1.0
1797
+ Content-Type: text/html;
1798
+ charset=UTF-8
1799
+ Content-Transfer-Encoding: 7bit
1800
+
1801
+
1802
+ Wupee::NotificationType Load (0.2ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
1803
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
1804
+ Wupee::NotificationTypeConfiguration Load (0.2ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
1805
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
1806
+  (0.1ms) begin transaction
1807
+ SQL (0.4ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 14:22:43.717602"], ["updated_at", "2016-03-22 14:22:43.717602"]]
1808
+  (0.7ms) commit transaction
1809
+ Rendered notifications_mailer/notify_new_message.html.erb (2.1ms)
1810
+ SQL (0.9ms) UPDATE "wupee_notifications" SET "is_sent" = 't' WHERE "wupee_notifications"."id" = ? [["id", 5]]
1811
+
1812
+ NotificationsMailer#send_mail_for: processed outbound mail in 158.3ms
1813
+
1814
+ Sent mail to ewfwfe@wefwef.fr (8.1ms)
1815
+ Date: Tue, 22 Mar 2016 15:22:43 +0100
1816
+ From: contact@sleede.com
1817
+ To: ewfwfe@wefwef.fr
1818
+ Message-ID: <56f15533d7d2a_4b343fdc790601e080815@MBP-sleede-Nicolas.local.mail>
1819
+ Subject: notify_new_message
1820
+ Mime-Version: 1.0
1821
+ Content-Type: text/html;
1822
+ charset=UTF-8
1823
+ Content-Transfer-Encoding: 7bit
1824
+
1825
+
1826
+ Wupee::NotificationType Load (0.2ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
1827
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
1828
+ Wupee::NotificationTypeConfiguration Load (0.1ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
1829
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
1830
+  (0.0ms) begin transaction
1831
+ SQL (0.3ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 14:23:21.036892"], ["updated_at", "2016-03-22 14:23:21.036892"]]
1832
+  (0.7ms) commit transaction
1833
+ Rendered notifications_mailer/notify_new_message.html.erb (0.0ms)
1834
+ SQL (0.8ms) UPDATE "wupee_notifications" SET "is_sent" = 't' WHERE "wupee_notifications"."id" = ? [["id", 6]]
1835
+
1836
+ NotificationsMailer#send_mail_for: processed outbound mail in 11.2ms
1837
+
1838
+ Sent mail to ewfwfe@wefwef.fr (2.3ms)
1839
+ Date: Tue, 22 Mar 2016 15:23:21 +0100
1840
+ From: contact@sleede.com
1841
+ To: ewfwfe@wefwef.fr
1842
+ Message-ID: <56f15559c8d2_4b343fdc790601e080933@MBP-sleede-Nicolas.local.mail>
1843
+ Subject: notify_new_message
1844
+ Mime-Version: 1.0
1845
+ Content-Type: text/html;
1846
+ charset=UTF-8
1847
+ Content-Transfer-Encoding: 7bit
1848
+
1849
+
1850
+ Wupee::NotificationType Load (0.2ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
1851
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
1852
+ Wupee::NotificationTypeConfiguration Load (0.2ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
1853
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
1854
+  (0.1ms) begin transaction
1855
+ SQL (0.3ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 14:23:29.356300"], ["updated_at", "2016-03-22 14:23:29.356300"]]
1856
+  (0.7ms) commit transaction
1857
+ Rendered notifications_mailer/notify_new_message.html.erb (1.1ms)
1858
+ SQL (0.9ms) UPDATE "wupee_notifications" SET "is_sent" = 't' WHERE "wupee_notifications"."id" = ? [["id", 7]]
1859
+
1860
+ NotificationsMailer#send_mail_for: processed outbound mail in 163.6ms
1861
+
1862
+ Sent mail to ewfwfe@wefwef.fr (8.2ms)
1863
+ Date: Tue, 22 Mar 2016 15:23:29 +0100
1864
+ From: contact@sleede.com
1865
+ To: ewfwfe@wefwef.fr
1866
+ Message-ID: <56f1556180fa2_4b413ff2a50601d024369@MBP-sleede-Nicolas.local.mail>
1867
+ Subject: notify_new_message bla
1868
+ Mime-Version: 1.0
1869
+ Content-Type: text/html;
1870
+ charset=UTF-8
1871
+ Content-Transfer-Encoding: 7bit
1872
+
1873
+
1874
+ Wupee::NotificationType Load (0.7ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
1875
+ User Load (1.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
1876
+ Wupee::NotificationTypeConfiguration Load (4.2ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
1877
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
1878
+  (0.1ms) begin transaction
1879
+ SQL (1.2ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 14:25:00.175911"], ["updated_at", "2016-03-22 14:25:00.175911"]]
1880
+  (0.7ms) commit transaction
1881
+ Rendered notifications_mailer/notify_new_message.html.erb (2.0ms)
1882
+ SQL (0.9ms) UPDATE "wupee_notifications" SET "is_sent" = 't' WHERE "wupee_notifications"."id" = ? [["id", 8]]
1883
+
1884
+ NotificationsMailer#send_mail_for: processed outbound mail in 238.3ms
1885
+
1886
+ Sent mail to ewfwfe@wefwef.fr (8.0ms)
1887
+ Date: Tue, 22 Mar 2016 15:25:00 +0100
1888
+ From: contact@sleede.com
1889
+ To: ewfwfe@wefwef.fr
1890
+ Message-ID: <56f155bc67557_4b553fe7254601d0833be@MBP-sleede-Nicolas.local.mail>
1891
+ Subject: notify_new_message
1892
+ Mime-Version: 1.0
1893
+ Content-Type: text/html;
1894
+ charset=UTF-8
1895
+ Content-Transfer-Encoding: 7bit
1896
+
1897
+
1898
+ Wupee::NotificationType Load (0.2ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
1899
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
1900
+ Wupee::NotificationTypeConfiguration Load (0.2ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
1901
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
1902
+  (0.1ms) begin transaction
1903
+ SQL (0.4ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 14:25:25.667068"], ["updated_at", "2016-03-22 14:25:25.667068"]]
1904
+  (0.7ms) commit transaction
1905
+ Rendered notifications_mailer/notify_new_message.html.erb (2.6ms)
1906
+ SQL (0.9ms) UPDATE "wupee_notifications" SET "is_sent" = 't' WHERE "wupee_notifications"."id" = ? [["id", 9]]
1907
+
1908
+ NotificationsMailer#send_mail_for: processed outbound mail in 160.2ms
1909
+
1910
+ Sent mail to ewfwfe@wefwef.fr (8.5ms)
1911
+ Date: Tue, 22 Mar 2016 15:25:25 +0100
1912
+ From: contact@sleede.com
1913
+ To: ewfwfe@wefwef.fr
1914
+ Message-ID: <56f155d5cc1e9_4b5e3fc409c241d01364a@MBP-sleede-Nicolas.local.mail>
1915
+ Subject: notify_new_message
1916
+ Mime-Version: 1.0
1917
+ Content-Type: text/html;
1918
+ charset=UTF-8
1919
+ Content-Transfer-Encoding: 7bit
1920
+
1921
+ Bonjour,
1922
+
1923
+ {}
1924
+
1925
+ Aurevoir.
1926
+
1927
+ Wupee::NotificationType Load (0.4ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
1928
+ User Load (0.5ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
1929
+ Wupee::NotificationTypeConfiguration Load (1.4ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
1930
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
1931
+  (0.1ms) begin transaction
1932
+ SQL (1.2ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 14:28:05.566910"], ["updated_at", "2016-03-22 14:28:05.566910"]]
1933
+  (0.7ms) commit transaction
1934
+ SQL (1.1ms) UPDATE "wupee_notifications" SET "is_sent" = 't' WHERE "wupee_notifications"."id" = ? [["id", 10]]
1935
+
1936
+ NotificationsMailer#send_mail_for: processed outbound mail in 2.7ms
1937
+ Wupee::NotificationType Load (0.1ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
1938
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
1939
+ Wupee::NotificationTypeConfiguration Load (0.3ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
1940
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
1941
+  (0.1ms) begin transaction
1942
+ SQL (0.5ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 14:28:22.365304"], ["updated_at", "2016-03-22 14:28:22.365304"]]
1943
+  (0.7ms) commit transaction
1944
+ Rendered notifications_mailer/notify_new_message.html.erb (1.2ms)
1945
+ SQL (1.0ms) UPDATE "wupee_notifications" SET "is_sent" = 't' WHERE "wupee_notifications"."id" = ? [["id", 11]]
1946
+
1947
+ NotificationsMailer#send_mail_for: processed outbound mail in 169.9ms
1948
+
1949
+ Sent mail to ewfwfe@wefwef.fr (8.3ms)
1950
+ Date: Tue, 22 Mar 2016 15:28:22 +0100
1951
+ From: contact@sleede.com
1952
+ To: ewfwfe@wefwef.fr
1953
+ Message-ID: <56f1568684b2b_4b8c3fec3d8601dc105cd@MBP-sleede-Nicolas.local.mail>
1954
+ Subject: notify_new_message
1955
+ Mime-Version: 1.0
1956
+ Content-Type: text/html;
1957
+ charset=UTF-8
1958
+ Content-Transfer-Encoding: 7bit
1959
+
1960
+ Bonjour,
1961
+
1962
+ {}
1963
+
1964
+ Aurevoir.
1965
+
1966
+ Wupee::NotificationType Load (0.5ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
1967
+ User Load (0.3ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
1968
+ Wupee::NotificationTypeConfiguration Load (1.2ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
1969
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
1970
+  (0.1ms) begin transaction
1971
+ SQL (0.9ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 14:30:04.612600"], ["updated_at", "2016-03-22 14:30:04.612600"]]
1972
+  (0.7ms) commit transaction
1973
+ Rendered notifications_mailer/notify_new_message.html.erb (2.4ms)
1974
+ SQL (0.9ms) UPDATE "wupee_notifications" SET "is_sent" = 't' WHERE "wupee_notifications"."id" = ? [["id", 12]]
1975
+
1976
+ NotificationsMailer#send_mail_for: processed outbound mail in 159.2ms
1977
+
1978
+ Sent mail to ewfwfe@wefwef.fr (8.1ms)
1979
+ Date: Tue, 22 Mar 2016 15:30:04 +0100
1980
+ From: contact@sleede.com
1981
+ To: ewfwfe@wefwef.fr
1982
+ Message-ID: <56f156ecbe8c8_4ba13fdec20601e0128f6@MBP-sleede-Nicolas.local.mail>
1983
+ Subject: notify_new_message
1984
+ Mime-Version: 1.0
1985
+ Content-Type: text/html;
1986
+ charset=UTF-8
1987
+ Content-Transfer-Encoding: 7bit
1988
+
1989
+ Bonjour,
1990
+
1991
+ {}
1992
+ {}
1993
+
1994
+
1995
+ Aurevoir.
1996
+
1997
+ Wupee::NotificationType Load (0.2ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
1998
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
1999
+ Wupee::NotificationTypeConfiguration Load (0.4ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
2000
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
2001
+  (0.1ms) begin transaction
2002
+ SQL (0.4ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 14:31:18.918327"], ["updated_at", "2016-03-22 14:31:18.918327"]]
2003
+  (0.7ms) commit transaction
2004
+ Rendered notifications_mailer/notify_new_message.html.erb (3.0ms)
2005
+ SQL (0.9ms) UPDATE "wupee_notifications" SET "is_sent" = 't' WHERE "wupee_notifications"."id" = ? [["id", 13]]
2006
+
2007
+ NotificationsMailer#send_mail_for: processed outbound mail in 164.0ms
2008
+
2009
+ Sent mail to ewfwfe@wefwef.fr (8.1ms)
2010
+ Date: Tue, 22 Mar 2016 15:31:19 +0100
2011
+ From: contact@sleede.com
2012
+ To: ewfwfe@wefwef.fr
2013
+ Message-ID: <56f157371615d_4bb33fe1d8c601d49808@MBP-sleede-Nicolas.local.mail>
2014
+ Subject: notify_new_message
2015
+ Mime-Version: 1.0
2016
+ Content-Type: text/html;
2017
+ charset=UTF-8
2018
+ Content-Transfer-Encoding: 7bit
2019
+
2020
+ Bonjour,
2021
+
2022
+ {}
2023
+ {}
2024
+
2025
+
2026
+ Aurevoir.
2027
+
2028
+ Wupee::NotificationType Load (0.1ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
2029
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
2030
+ Wupee::NotificationTypeConfiguration Load (0.3ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
2031
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
2032
+  (0.1ms) begin transaction
2033
+ SQL (0.4ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 14:31:51.188239"], ["updated_at", "2016-03-22 14:31:51.188239"]]
2034
+  (0.8ms) commit transaction
2035
+ Rendered notifications_mailer/notify_new_message.html.erb (2.3ms)
2036
+ SQL (1.0ms) UPDATE "wupee_notifications" SET "is_sent" = 't' WHERE "wupee_notifications"."id" = ? [["id", 14]]
2037
+
2038
+ NotificationsMailer#send_mail_for: processed outbound mail in 162.6ms
2039
+
2040
+ Sent mail to ewfwfe@wefwef.fr (8.5ms)
2041
+ Date: Tue, 22 Mar 2016 15:31:51 +0100
2042
+ From: contact@sleede.com
2043
+ To: ewfwfe@wefwef.fr
2044
+ Message-ID: <56f1575757bd6_4bbb3fc75d0601d07078@MBP-sleede-Nicolas.local.mail>
2045
+ Subject: notify_new_message
2046
+ Mime-Version: 1.0
2047
+ Content-Type: text/html;
2048
+ charset=UTF-8
2049
+ Content-Transfer-Encoding: 7bit
2050
+
2051
+ Bonjour,
2052
+
2053
+ {}
2054
+ {}
2055
+
2056
+
2057
+ Aurevoir.
2058
+
2059
+ Wupee::NotificationType Load (0.1ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
2060
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
2061
+ Wupee::NotificationTypeConfiguration Load (0.2ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
2062
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
2063
+  (0.1ms) begin transaction
2064
+ SQL (0.4ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 14:32:42.905487"], ["updated_at", "2016-03-22 14:32:42.905487"]]
2065
+  (0.8ms) commit transaction
2066
+ Rendered notifications_mailer/notify_new_message.html.erb (2.2ms)
2067
+ SQL (0.9ms) UPDATE "wupee_notifications" SET "is_sent" = 't' WHERE "wupee_notifications"."id" = ? [["id", 15]]
2068
+
2069
+ NotificationsMailer#send_mail_for: processed outbound mail in 161.8ms
2070
+
2071
+ Sent mail to ewfwfe@wefwef.fr (8.4ms)
2072
+ Date: Tue, 22 Mar 2016 15:32:43 +0100
2073
+ From: contact@sleede.com
2074
+ To: ewfwfe@wefwef.fr
2075
+ Message-ID: <56f1578b126ad_4bc53ff3bd4601e0644d1@MBP-sleede-Nicolas.local.mail>
2076
+ Subject: notify_new_message %{test}
2077
+ Mime-Version: 1.0
2078
+ Content-Type: text/html;
2079
+ charset=UTF-8
2080
+ Content-Transfer-Encoding: 7bit
2081
+
2082
+ Bonjour,
2083
+
2084
+ {}
2085
+ {}
2086
+
2087
+
2088
+ Aurevoir.
2089
+
2090
+ Wupee::NotificationType Load (0.1ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
2091
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
2092
+ Wupee::NotificationTypeConfiguration Load (0.2ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
2093
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
2094
+  (0.1ms) begin transaction
2095
+ SQL (0.4ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 14:35:01.494991"], ["updated_at", "2016-03-22 14:35:01.494991"]]
2096
+  (0.8ms) commit transaction
2097
+ Rendered notifications_mailer/notify_new_message.html.erb (1.4ms)
2098
+ SQL (1.0ms) UPDATE "wupee_notifications" SET "is_sent" = 't' WHERE "wupee_notifications"."id" = ? [["id", 16]]
2099
+
2100
+ NotificationsMailer#send_mail_for: processed outbound mail in 167.8ms
2101
+
2102
+ Sent mail to ewfwfe@wefwef.fr (8.9ms)
2103
+ Date: Tue, 22 Mar 2016 15:35:01 +0100
2104
+ From: contact@sleede.com
2105
+ To: ewfwfe@wefwef.fr
2106
+ Message-ID: <56f15815a3fbe_4c273fdce08601d09057e@MBP-sleede-Nicolas.local.mail>
2107
+ Subject: notify_new_message %{test}
2108
+ Mime-Version: 1.0
2109
+ Content-Type: text/html;
2110
+ charset=UTF-8
2111
+ Content-Transfer-Encoding: 7bit
2112
+
2113
+ Bonjour,
2114
+
2115
+ {}
2116
+ {}
2117
+
2118
+
2119
+ Aurevoir.
2120
+
2121
+ Wupee::NotificationType Load (0.1ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
2122
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
2123
+ Wupee::NotificationTypeConfiguration Load (0.2ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
2124
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
2125
+  (0.1ms) begin transaction
2126
+ SQL (0.5ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 14:35:56.550880"], ["updated_at", "2016-03-22 14:35:56.550880"]]
2127
+  (0.7ms) commit transaction
2128
+ Rendered notifications_mailer/notify_new_message.html.erb (1.3ms)
2129
+ SQL (0.8ms) UPDATE "wupee_notifications" SET "is_sent" = 't' WHERE "wupee_notifications"."id" = ? [["id", 17]]
2130
+
2131
+ NotificationsMailer#send_mail_for: processed outbound mail in 160.2ms
2132
+
2133
+ Sent mail to ewfwfe@wefwef.fr (8.1ms)
2134
+ Date: Tue, 22 Mar 2016 15:35:56 +0100
2135
+ From: contact@sleede.com
2136
+ To: ewfwfe@wefwef.fr
2137
+ Message-ID: <56f1584cafa57_4c333fc1858601d889037@MBP-sleede-Nicolas.local.mail>
2138
+ Subject: notify_new_message %{test}
2139
+ Mime-Version: 1.0
2140
+ Content-Type: text/html;
2141
+ charset=UTF-8
2142
+ Content-Transfer-Encoding: 7bit
2143
+
2144
+ Bonjour,
2145
+
2146
+ {}
2147
+ {}
2148
+
2149
+
2150
+ Aurevoir.
2151
+
2152
+ Wupee::NotificationType Load (0.3ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
2153
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
2154
+ Wupee::NotificationTypeConfiguration Load (0.1ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
2155
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
2156
+  (0.1ms) begin transaction
2157
+ SQL (0.3ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 14:36:43.135932"], ["updated_at", "2016-03-22 14:36:43.135932"]]
2158
+  (0.8ms) commit transaction
2159
+ Rendered notifications_mailer/notify_new_message.html.erb (0.0ms)
2160
+ SQL (1.0ms) UPDATE "wupee_notifications" SET "is_sent" = 't' WHERE "wupee_notifications"."id" = ? [["id", 18]]
2161
+
2162
+ NotificationsMailer#send_mail_for: processed outbound mail in 11.4ms
2163
+
2164
+ Sent mail to ewfwfe@wefwef.fr (2.6ms)
2165
+ Date: Tue, 22 Mar 2016 15:36:43 +0100
2166
+ From: contact@sleede.com
2167
+ To: ewfwfe@wefwef.fr
2168
+ Message-ID: <56f1587b24de3_4c333fc1858601d8891a5@MBP-sleede-Nicolas.local.mail>
2169
+ Subject: notify_new_message %{test}
2170
+ Mime-Version: 1.0
2171
+ Content-Type: text/html;
2172
+ charset=UTF-8
2173
+ Content-Transfer-Encoding: 7bit
2174
+
2175
+ Bonjour,
2176
+
2177
+ {}
2178
+ {}
2179
+
2180
+
2181
+ Aurevoir.
2182
+
2183
+ Wupee::NotificationType Load (0.1ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
2184
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
2185
+ Wupee::NotificationTypeConfiguration Load (0.2ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
2186
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
2187
+  (0.1ms) begin transaction
2188
+ SQL (0.4ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 14:36:48.431225"], ["updated_at", "2016-03-22 14:36:48.431225"]]
2189
+  (0.7ms) commit transaction
2190
+ Rendered notifications_mailer/notify_new_message.html.erb (1.6ms)
2191
+ SQL (0.9ms) UPDATE "wupee_notifications" SET "is_sent" = 't' WHERE "wupee_notifications"."id" = ? [["id", 19]]
2192
+
2193
+ NotificationsMailer#send_mail_for: processed outbound mail in 167.3ms
2194
+
2195
+ Sent mail to ewfwfe@wefwef.fr (8.5ms)
2196
+ Date: Tue, 22 Mar 2016 15:36:48 +0100
2197
+ From: contact@sleede.com
2198
+ To: ewfwfe@wefwef.fr
2199
+ Message-ID: <56f15880942e2_4c3f3fe8dd0601d4269f6@MBP-sleede-Nicolas.local.mail>
2200
+ Subject: notify_new_message %{test}
2201
+ Mime-Version: 1.0
2202
+ Content-Type: text/html;
2203
+ charset=UTF-8
2204
+ Content-Transfer-Encoding: 7bit
2205
+
2206
+ Bonjour,
2207
+
2208
+ {}
2209
+ {}
2210
+
2211
+
2212
+ Aurevoir.
2213
+
2214
+ Wupee::NotificationType Load (0.3ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
2215
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
2216
+ Wupee::NotificationTypeConfiguration Load (0.3ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
2217
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
2218
+  (0.1ms) begin transaction
2219
+ SQL (1.2ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 14:37:51.879327"], ["updated_at", "2016-03-22 14:37:51.879327"]]
2220
+  (0.9ms) commit transaction
2221
+
2222
+ NotificationsMailer#send_mail_for: processed outbound mail in 1.6ms
2223
+ Wupee::NotificationType Load (0.2ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
2224
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
2225
+ Wupee::NotificationTypeConfiguration Load (0.2ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
2226
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
2227
+  (0.0ms) begin transaction
2228
+ SQL (0.3ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 14:38:04.235558"], ["updated_at", "2016-03-22 14:38:04.235558"]]
2229
+  (0.8ms) commit transaction
2230
+
2231
+ NotificationsMailer#send_mail_for: processed outbound mail in 0.9ms
2232
+ Wupee::NotificationType Load (0.1ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
2233
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
2234
+ Wupee::NotificationTypeConfiguration Load (0.2ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
2235
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
2236
+  (0.1ms) begin transaction
2237
+ SQL (0.4ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 14:38:14.789569"], ["updated_at", "2016-03-22 14:38:14.789569"]]
2238
+  (0.7ms) commit transaction
2239
+ Rendered notifications_mailer/notify_new_message.html.erb (1.4ms)
2240
+ SQL (0.9ms) UPDATE "wupee_notifications" SET "is_sent" = 't' WHERE "wupee_notifications"."id" = ? [["id", 22]]
2241
+
2242
+ NotificationsMailer#send_mail_for: processed outbound mail in 171.3ms
2243
+
2244
+ Sent mail to ewfwfe@wefwef.fr (8.5ms)
2245
+ Date: Tue, 22 Mar 2016 15:38:14 +0100
2246
+ From: contact@sleede.com
2247
+ To: ewfwfe@wefwef.fr
2248
+ Message-ID: <56f158d6ecad6_4c513ffd2a45e1d0183b4@MBP-sleede-Nicolas.local.mail>
2249
+ Subject: notify_new_message lapute
2250
+ Mime-Version: 1.0
2251
+ Content-Type: text/html;
2252
+ charset=UTF-8
2253
+ Content-Transfer-Encoding: 7bit
2254
+
2255
+ Bonjour,
2256
+
2257
+ {:bla=&gt;&quot;test&quot;}
2258
+ {:test=&gt;&quot;lapute&quot;}
2259
+
2260
+
2261
+ Aurevoir.
2262
+
2263
+ Wupee::NotificationType Load (2.2ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
2264
+ User Load (5.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
2265
+ Wupee::NotificationTypeConfiguration Load (0.7ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
2266
+ User Load (6.6ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
2267
+  (0.3ms) begin transaction
2268
+ SQL (0.9ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 15:51:01.878828"], ["updated_at", "2016-03-22 15:51:01.878828"]]
2269
+  (0.7ms) commit transaction
2270
+ Rendered notifications_mailer/notify_new_message.html.erb (3.4ms)
2271
+ SQL (1.0ms) UPDATE "wupee_notifications" SET "is_sent" = 't' WHERE "wupee_notifications"."id" = ? [["id", 23]]
2272
+
2273
+ NotificationsMailer#send_mail_for: processed outbound mail in 27.8ms
2274
+
2275
+ Sent mail to ewfwfe@wefwef.fr (9.4ms)
2276
+ Date: Tue, 22 Mar 2016 16:51:01 +0100
2277
+ From: contact@sleede.com
2278
+ To: ewfwfe@wefwef.fr
2279
+ Message-ID: <56f169e5e0948_4c513ffd2a45e1d01845e@MBP-sleede-Nicolas.local.mail>
2280
+ Subject: notify_new_message lapute
2281
+ Mime-Version: 1.0
2282
+ Content-Type: text/html;
2283
+ charset=UTF-8
2284
+ Content-Transfer-Encoding: 7bit
2285
+
2286
+ {:bla=&gt;&quot;test&quot;}
2287
+ {:test=&gt;&quot;lapute&quot;}
2288
+
2289
+ Wupee::NotificationType Load (0.5ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
2290
+ User Load (0.5ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
2291
+ Wupee::NotificationType Load (0.4ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" ASC LIMIT 1
2292
+ User Load (0.4ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
2293
+ Wupee::NotificationTypeConfiguration Load (0.7ms) SELECT "wupee_notification_type_configurations".* FROM "wupee_notification_type_configurations" WHERE "wupee_notification_type_configurations"."receiver_type" = 'User' AND "wupee_notification_type_configurations"."receiver_id" = 1 AND "wupee_notification_type_configurations"."notification_type_id" = 2
2294
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
2295
+  (0.1ms) begin transaction
2296
+ SQL (0.9ms) INSERT INTO "wupee_notifications" ("receiver_id", "receiver_type", "notification_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["receiver_id", 1], ["receiver_type", "User"], ["notification_type_id", 2], ["created_at", "2016-03-22 16:24:35.577276"], ["updated_at", "2016-03-22 16:24:35.577276"]]
2297
+  (0.7ms) commit transaction
2298
+ Rendered notifications_mailer/notify_new_message.html.erb (1.5ms)
2299
+ SQL (0.9ms) UPDATE "wupee_notifications" SET "is_sent" = 't' WHERE "wupee_notifications"."id" = ? [["id", 24]]
2300
+
2301
+ NotificationsMailer#send_mail_for: processed outbound mail in 154.9ms
2302
+
2303
+ Sent mail to ewfwfe@wefwef.fr (8.2ms)
2304
+ Date: Tue, 22 Mar 2016 17:24:35 +0100
2305
+ From: contact@sleede.com
2306
+ To: ewfwfe@wefwef.fr
2307
+ Message-ID: <56f171c3b4faf_55d23fc7958601e091712@MBP-sleede-Nicolas.local.mail>
2308
+ Subject: notify_new_message
2309
+ Mime-Version: 1.0
2310
+ Content-Type: text/html;
2311
+ charset=UTF-8
2312
+ Content-Transfer-Encoding: 7bit
2313
+
2314
+ {:bla=&gt;&quot;test&quot;}
2315
+ {:test=&gt;&quot;lapute&quot;}
2316
+