notifiable-rails 0.29.0 → 0.30.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f85de44140c5c9b4fac635511af09885d4b3f4b
4
- data.tar.gz: 596aaa1c50f3c6ee1688125b831309fbbf1dcbb7
3
+ metadata.gz: 1993ced83c86c7509813d70897155e9ffa44cfd1
4
+ data.tar.gz: 765fc02b67e921f38976fc47133b2a97ba22a4b5
5
5
  SHA512:
6
- metadata.gz: f923297cdc25561cc950740c50a60c6c45692538f3603103ddfa92205c3047aa963e7099566c7fc428c0d3b4e6d59cd33bfada0e60c516fd201ae506c7250f9d
7
- data.tar.gz: a1dc1dabf7dad4658606fa253d11bc8e4adab8f834de4d40896f287a87ba1cdde80be14d0a0a650e2bdf6ea6881d1f13ec422b9c281fd89736ef3f62792733f1
6
+ metadata.gz: 11699ab6bc4cb3b77108775b31d47d27fe33d85fea6dc87b5cbefa71771bff892e38c8cae8148b013a9a4140d861301e2ee59b3a23dd54cf70192632367447af
7
+ data.tar.gz: ff8c13353b13fed76d94c8fca240337926f995855db37cae21749f6cb421d7b24b2642636e983907c58acf7b81084257e34ccbb56838fb500c4b2c6e93382d98
@@ -1,11 +1,4 @@
1
1
  Notifiable.configure do |config|
2
-
3
- # The controller class that the DeviceTokenController should extend
4
- config.api_controller_class = ApplicationController
5
-
6
- # Set the params permitted for creation of device tokens
7
- # Defaults to [:token, :provider, :app_id]
8
- #config.api_device_token_params = [:token, :provider, :app_id, :locale]
9
2
 
10
3
  # The size of the batch of Notification Statuses kept in memory
11
4
  # before being saved. This should be varied with the heap size of the process
@@ -15,5 +8,11 @@ Notifiable.configure do |config|
15
8
  # Set the delivery method to test, preventing notifications from being sent
16
9
  # Defaults to :send
17
10
  #config.delivery_method = :test
11
+
12
+ # Custom function to select the class for a provider
13
+ # Defaults to nil
14
+ #config.find_notifier_class do |notification, device|
15
+ # Notifiable.notifier_classes[device.provider]
16
+ #end
18
17
 
19
18
  end
@@ -1,3 +1,5 @@
1
+ require 'active_record'
2
+
1
3
  class ActiveRecord::Base
2
4
 
3
5
  def self.bulk_insert!(record_list)
@@ -1,3 +1,5 @@
1
+ require 'rails'
2
+
1
3
  module Notifiable
2
4
 
3
5
  class Engine < ::Rails::Engine
@@ -2,10 +2,5 @@ require 'rails'
2
2
 
3
3
  module Notifiable
4
4
  class Railtie < Rails::Railtie
5
- initializer 'Notifiable.initialize' do
6
- ActiveSupport.on_load(:active_record) do
7
- ActiveRecord::Base.send :extend, Notifiable::Model
8
- end
9
- end
10
5
  end
11
6
  end
@@ -1,3 +1,3 @@
1
1
  module Notifiable
2
- VERSION = "0.29.0"
2
+ VERSION = "0.30.0"
3
3
  end
data/lib/notifiable.rb CHANGED
@@ -8,11 +8,6 @@ require 'notifiable/device_token'
8
8
  require 'notifiable/notifier_base'
9
9
 
10
10
  module Notifiable
11
-
12
- mattr_accessor :api_controller_class
13
-
14
- mattr_accessor :api_device_token_params
15
- @@api_device_token_params = [:token, :provider, :app_id, :locale, :name]
16
11
 
17
12
  mattr_accessor :delivery_method
18
13
  @@delivery_method = :send
@@ -26,16 +21,14 @@ module Notifiable
26
21
  mattr_accessor :notifier_classes
27
22
  @@notifier_classes = {}
28
23
 
24
+ mattr_accessor :find_notifier_class
25
+ @@find_notifier_class = nil
26
+
29
27
  def self.configure
30
28
  yield self
31
29
  end
32
-
33
- end
34
-
35
- module Notifiable
36
- module Model
37
- def notifiable(options = {})
38
- include Notifiable::Concern
39
- end
30
+
31
+ def self.notifier_class(notification, device)
32
+ Notifiable.find_notifier_class ? Notifiable.find_notifier_class(notification, device) : Notifiable.notifier_classes[device.provider.to_sym]
40
33
  end
41
- end
34
+ end
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,26 @@
1
+ require 'spec_helper'
2
+
3
+ describe Notifiable do
4
+
5
+ describe '.notifier_class' do
6
+ context 'no override' do
7
+ let(:notification) { create(:notification) }
8
+ let(:device) { create(:device_token, provider: :mock) }
9
+ before(:each) { Notifiable.notifier_classes[:mock] = MockNotifier }
10
+ it { expect(Notifiable.notifier_class(notification, device)).to eq MockNotifier }
11
+ end
12
+
13
+ context 'override' do
14
+ let(:notification) { create(:notification) }
15
+ let(:device) { create(:device_token, provider: :mock) }
16
+ before(:each) do
17
+ Notifiable.notifier_classes[:mock] = MockNotifier
18
+ Notifiable.find_notifier_class do |notification, device|
19
+ ConfigurableMockNotifier
20
+ end
21
+ end
22
+ it { expect(Notifiable.notifier_class(notification, device)).to eq MockNotifier }
23
+ end
24
+ end
25
+
26
+ end
@@ -1,7 +1,4 @@
1
1
  Notifiable.configure do |config|
2
-
3
- # The controller class that the DeviceTokenController should extend
4
- config.api_controller_class = ApplicationController
5
2
 
6
3
  # Set the delivery method to test, preventing notifications from being sent
7
4
  # Defaults to :send
@@ -7981,3 +7981,338 @@ Migrating to AddThreadIdToNotifications (201806182135000)
7981
7981
   (0.3ms) ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" ENABLE TRIGGER ALL
7982
7982
   (0.2ms) RELEASE SAVEPOINT active_record_1
7983
7983
   (5.6ms) ROLLBACK
7984
+  (1.3ms) SELECT pg_try_advisory_lock(5131134053504291175)
7985
+  (3.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
7986
+ ActiveRecord::InternalMetadata Load (3.0ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
7987
+  (0.2ms) BEGIN
7988
+  (0.2ms) COMMIT
7989
+  (0.3ms) SELECT pg_advisory_unlock(5131134053504291175)
7990
+  (0.2ms) BEGIN
7991
+  (0.1ms) SAVEPOINT active_record_1
7992
+  (12.1ms) ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" DISABLE TRIGGER ALL
7993
+  (1.2ms) RELEASE SAVEPOINT active_record_1
7994
+  (18.8ms)  SELECT schemaname || '.' || tablename
7995
+ FROM pg_tables
7996
+ WHERE
7997
+ tablename !~ '_prt_' AND
7998
+ tablename <> 'schema_migrations' AND tablename <> 'ar_internal_metadata' AND
7999
+ schemaname = ANY (current_schemas(false))
8000
+ 
8001
+  (5.7ms) select table_name from information_schema.views where table_schema = 'notifiable-rails-test'
8002
+  (19.6ms) TRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;
8003
+  (0.1ms) SAVEPOINT active_record_1
8004
+  (0.3ms) ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" ENABLE TRIGGER ALL
8005
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8006
+  (7.1ms) ROLLBACK
8007
+  (0.3ms) SELECT pg_try_advisory_lock(5131134053504291175)
8008
+  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
8009
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
8010
+  (0.1ms) BEGIN
8011
+  (0.1ms) COMMIT
8012
+  (0.2ms) SELECT pg_advisory_unlock(5131134053504291175)
8013
+  (0.2ms) BEGIN
8014
+  (0.1ms) SAVEPOINT active_record_1
8015
+  (0.8ms) ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" DISABLE TRIGGER ALL
8016
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8017
+  (2.4ms)  SELECT schemaname || '.' || tablename
8018
+ FROM pg_tables
8019
+ WHERE
8020
+ tablename !~ '_prt_' AND
8021
+ tablename <> 'schema_migrations' AND tablename <> 'ar_internal_metadata' AND
8022
+ schemaname = ANY (current_schemas(false))
8023
+ 
8024
+  (1.2ms) select table_name from information_schema.views where table_schema = 'notifiable-rails-test'
8025
+  (13.8ms) TRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;
8026
+  (0.2ms) SAVEPOINT active_record_1
8027
+  (0.3ms) ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" ENABLE TRIGGER ALL
8028
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8029
+  (4.6ms) ROLLBACK
8030
+  (0.3ms) SELECT pg_try_advisory_lock(5131134053504291175)
8031
+  (0.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
8032
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
8033
+  (0.2ms) BEGIN
8034
+  (0.2ms) COMMIT
8035
+  (0.3ms) SELECT pg_advisory_unlock(5131134053504291175)
8036
+  (0.2ms) BEGIN
8037
+  (0.2ms) SAVEPOINT active_record_1
8038
+  (0.9ms) ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" DISABLE TRIGGER ALL
8039
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8040
+  (2.5ms)  SELECT schemaname || '.' || tablename
8041
+ FROM pg_tables
8042
+ WHERE
8043
+ tablename !~ '_prt_' AND
8044
+ tablename <> 'schema_migrations' AND tablename <> 'ar_internal_metadata' AND
8045
+ schemaname = ANY (current_schemas(false))
8046
+ 
8047
+  (1.3ms) select table_name from information_schema.views where table_schema = 'notifiable-rails-test'
8048
+  (12.4ms) TRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;
8049
+  (0.2ms) SAVEPOINT active_record_1
8050
+  (0.4ms) ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" ENABLE TRIGGER ALL
8051
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8052
+  (3.9ms) ROLLBACK
8053
+  (0.3ms) SELECT pg_try_advisory_lock(5131134053504291175)
8054
+  (0.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
8055
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
8056
+  (0.1ms) BEGIN
8057
+  (0.1ms) COMMIT
8058
+  (0.2ms) SELECT pg_advisory_unlock(5131134053504291175)
8059
+  (0.2ms) BEGIN
8060
+  (0.1ms) SAVEPOINT active_record_1
8061
+  (0.8ms) ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" DISABLE TRIGGER ALL
8062
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8063
+  (2.6ms)  SELECT schemaname || '.' || tablename
8064
+ FROM pg_tables
8065
+ WHERE
8066
+ tablename !~ '_prt_' AND
8067
+ tablename <> 'schema_migrations' AND tablename <> 'ar_internal_metadata' AND
8068
+ schemaname = ANY (current_schemas(false))
8069
+ 
8070
+  (1.4ms) select table_name from information_schema.views where table_schema = 'notifiable-rails-test'
8071
+  (16.8ms) TRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;
8072
+  (0.2ms) SAVEPOINT active_record_1
8073
+  (0.3ms) ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" ENABLE TRIGGER ALL
8074
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8075
+  (5.6ms) ROLLBACK
8076
+  (0.3ms) SELECT pg_try_advisory_lock(5131134053504291175)
8077
+  (0.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
8078
+ ActiveRecord::InternalMetadata Load (0.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
8079
+  (0.2ms) BEGIN
8080
+  (0.2ms) COMMIT
8081
+  (0.4ms) SELECT pg_advisory_unlock(5131134053504291175)
8082
+  (0.2ms) SELECT pg_try_advisory_lock(5131134053504291175)
8083
+  (1.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
8084
+ ActiveRecord::InternalMetadata Load (0.9ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
8085
+  (0.3ms) BEGIN
8086
+  (0.2ms) COMMIT
8087
+  (0.2ms) SELECT pg_advisory_unlock(5131134053504291175)
8088
+  (0.2ms) BEGIN
8089
+  (0.4ms) SAVEPOINT active_record_1
8090
+ SQL (4.1ms) INSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["name", "App 1"], ["created_at", "2018-08-24 12:22:42.105881"], ["updated_at", "2018-08-24 12:22:42.105881"]]
8091
+  (0.4ms) RELEASE SAVEPOINT active_record_1
8092
+  (0.3ms) SAVEPOINT active_record_1
8093
+ SQL (4.2ms) INSERT INTO "notifiable_notifications" ("app_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["app_id", 477], ["created_at", "2018-08-24 12:22:42.120879"], ["updated_at", "2018-08-24 12:22:42.120879"]]
8094
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8095
+  (0.2ms) SAVEPOINT active_record_1
8096
+ SQL (0.3ms) INSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["name", "App 2"], ["created_at", "2018-08-24 12:22:42.155611"], ["updated_at", "2018-08-24 12:22:42.155611"]]
8097
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8098
+  (0.1ms) SAVEPOINT active_record_1
8099
+ Notifiable::DeviceToken Exists (3.2ms) SELECT 1 AS one FROM "notifiable_device_tokens" WHERE "notifiable_device_tokens"."token" = $1 AND "notifiable_device_tokens"."app_id" = 478 LIMIT $2 [["token", "ABCD1"], ["LIMIT", 1]]
8100
+ SQL (3.2ms) INSERT INTO "notifiable_device_tokens" ("token", "provider", "app_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["token", "ABCD1"], ["provider", "apns"], ["app_id", 478], ["created_at", "2018-08-24 12:22:42.165846"], ["updated_at", "2018-08-24 12:22:42.165846"]]
8101
+  (0.3ms) RELEASE SAVEPOINT active_record_1
8102
+  (0.3ms) SAVEPOINT active_record_1
8103
+  (1.5ms) ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" DISABLE TRIGGER ALL
8104
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8105
+  (3.1ms)  SELECT schemaname || '.' || tablename
8106
+ FROM pg_tables
8107
+ WHERE
8108
+ tablename !~ '_prt_' AND
8109
+ tablename <> 'schema_migrations' AND tablename <> 'ar_internal_metadata' AND
8110
+ schemaname = ANY (current_schemas(false))
8111
+ 
8112
+  (1.4ms) select table_name from information_schema.views where table_schema = 'notifiable-rails-test'
8113
+  (11.8ms) TRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;
8114
+  (0.2ms) SAVEPOINT active_record_1
8115
+  (0.3ms) ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" ENABLE TRIGGER ALL
8116
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8117
+  (3.8ms) ROLLBACK
8118
+  (0.2ms) SELECT pg_try_advisory_lock(5131134053504291175)
8119
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
8120
+ ActiveRecord::InternalMetadata Load (0.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
8121
+  (0.2ms) BEGIN
8122
+  (0.1ms) COMMIT
8123
+  (0.3ms) SELECT pg_advisory_unlock(5131134053504291175)
8124
+  (0.2ms) BEGIN
8125
+  (0.1ms) SAVEPOINT active_record_1
8126
+ SQL (0.6ms) INSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["name", "App 1"], ["created_at", "2018-08-24 12:23:16.340689"], ["updated_at", "2018-08-24 12:23:16.340689"]]
8127
+  (0.3ms) RELEASE SAVEPOINT active_record_1
8128
+  (0.2ms) SAVEPOINT active_record_1
8129
+ SQL (0.6ms) INSERT INTO "notifiable_notifications" ("app_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["app_id", 479], ["created_at", "2018-08-24 12:23:16.349483"], ["updated_at", "2018-08-24 12:23:16.349483"]]
8130
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8131
+  (0.2ms) SAVEPOINT active_record_1
8132
+ SQL (0.3ms) INSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["name", "App 2"], ["created_at", "2018-08-24 12:23:16.379014"], ["updated_at", "2018-08-24 12:23:16.379014"]]
8133
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8134
+  (0.1ms) SAVEPOINT active_record_1
8135
+ Notifiable::DeviceToken Exists (1.1ms) SELECT 1 AS one FROM "notifiable_device_tokens" WHERE "notifiable_device_tokens"."token" = $1 AND "notifiable_device_tokens"."app_id" = 480 LIMIT $2 [["token", "ABCD1"], ["LIMIT", 1]]
8136
+ SQL (0.7ms) INSERT INTO "notifiable_device_tokens" ("token", "provider", "app_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["token", "ABCD1"], ["provider", "apns"], ["app_id", 480], ["created_at", "2018-08-24 12:23:16.385475"], ["updated_at", "2018-08-24 12:23:16.385475"]]
8137
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8138
+  (1.6ms) SAVEPOINT active_record_1
8139
+  (2.0ms) ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" DISABLE TRIGGER ALL
8140
+  (1.2ms) RELEASE SAVEPOINT active_record_1
8141
+  (4.1ms)  SELECT schemaname || '.' || tablename
8142
+ FROM pg_tables
8143
+ WHERE
8144
+ tablename !~ '_prt_' AND
8145
+ tablename <> 'schema_migrations' AND tablename <> 'ar_internal_metadata' AND
8146
+ schemaname = ANY (current_schemas(false))
8147
+ 
8148
+  (4.1ms) select table_name from information_schema.views where table_schema = 'notifiable-rails-test'
8149
+  (14.5ms) TRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;
8150
+  (1.0ms) SAVEPOINT active_record_1
8151
+  (1.1ms) ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" ENABLE TRIGGER ALL
8152
+  (7.6ms) RELEASE SAVEPOINT active_record_1
8153
+  (0.3ms) SELECT pg_try_advisory_lock(5131134053504291175)
8154
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
8155
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
8156
+  (0.4ms) BEGIN
8157
+  (0.1ms) COMMIT
8158
+  (0.2ms) SELECT pg_advisory_unlock(5131134053504291175)
8159
+  (0.2ms) BEGIN
8160
+  (0.2ms) SAVEPOINT active_record_1
8161
+ SQL (0.7ms) INSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["name", "App 1"], ["created_at", "2018-08-24 12:24:09.282049"], ["updated_at", "2018-08-24 12:24:09.282049"]]
8162
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8163
+  (0.2ms) SAVEPOINT active_record_1
8164
+ SQL (0.6ms) INSERT INTO "notifiable_notifications" ("app_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["app_id", 481], ["created_at", "2018-08-24 12:24:09.290778"], ["updated_at", "2018-08-24 12:24:09.290778"]]
8165
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8166
+  (0.2ms) SAVEPOINT active_record_1
8167
+ SQL (0.3ms) INSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["name", "App 2"], ["created_at", "2018-08-24 12:24:09.320806"], ["updated_at", "2018-08-24 12:24:09.320806"]]
8168
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8169
+  (0.3ms) SAVEPOINT active_record_1
8170
+ Notifiable::DeviceToken Exists (0.7ms) SELECT 1 AS one FROM "notifiable_device_tokens" WHERE "notifiable_device_tokens"."token" = $1 AND "notifiable_device_tokens"."app_id" = 482 LIMIT $2 [["token", "ABCD1"], ["LIMIT", 1]]
8171
+ SQL (0.5ms) INSERT INTO "notifiable_device_tokens" ("token", "provider", "app_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["token", "ABCD1"], ["provider", "mock"], ["app_id", 482], ["created_at", "2018-08-24 12:24:09.327064"], ["updated_at", "2018-08-24 12:24:09.327064"]]
8172
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8173
+  (0.3ms) SAVEPOINT active_record_1
8174
+  (0.8ms) ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" DISABLE TRIGGER ALL
8175
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8176
+  (2.5ms)  SELECT schemaname || '.' || tablename
8177
+ FROM pg_tables
8178
+ WHERE
8179
+ tablename !~ '_prt_' AND
8180
+ tablename <> 'schema_migrations' AND tablename <> 'ar_internal_metadata' AND
8181
+ schemaname = ANY (current_schemas(false))
8182
+ 
8183
+  (1.7ms) select table_name from information_schema.views where table_schema = 'notifiable-rails-test'
8184
+  (8.8ms) TRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;
8185
+  (0.2ms) SAVEPOINT active_record_1
8186
+  (0.4ms) ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" ENABLE TRIGGER ALL
8187
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8188
+  (4.2ms) ROLLBACK
8189
+  (0.2ms) SELECT pg_try_advisory_lock(5131134053504291175)
8190
+  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
8191
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
8192
+  (0.3ms) BEGIN
8193
+  (0.2ms) COMMIT
8194
+  (0.2ms) SELECT pg_advisory_unlock(5131134053504291175)
8195
+  (0.2ms) BEGIN
8196
+  (0.2ms) SAVEPOINT active_record_1
8197
+ SQL (0.8ms) INSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["name", "App 1"], ["created_at", "2018-08-24 12:24:35.797000"], ["updated_at", "2018-08-24 12:24:35.797000"]]
8198
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8199
+  (0.2ms) SAVEPOINT active_record_1
8200
+ SQL (0.5ms) INSERT INTO "notifiable_notifications" ("app_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["app_id", 483], ["created_at", "2018-08-24 12:24:35.805884"], ["updated_at", "2018-08-24 12:24:35.805884"]]
8201
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8202
+  (0.1ms) SAVEPOINT active_record_1
8203
+ SQL (0.3ms) INSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["name", "App 2"], ["created_at", "2018-08-24 12:24:35.831639"], ["updated_at", "2018-08-24 12:24:35.831639"]]
8204
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8205
+  (0.1ms) SAVEPOINT active_record_1
8206
+ Notifiable::DeviceToken Exists (0.6ms) SELECT 1 AS one FROM "notifiable_device_tokens" WHERE "notifiable_device_tokens"."token" = $1 AND "notifiable_device_tokens"."app_id" = 484 LIMIT $2 [["token", "ABCD1"], ["LIMIT", 1]]
8207
+ SQL (0.4ms) INSERT INTO "notifiable_device_tokens" ("token", "provider", "app_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["token", "ABCD1"], ["provider", "mock"], ["app_id", 484], ["created_at", "2018-08-24 12:24:35.837192"], ["updated_at", "2018-08-24 12:24:35.837192"]]
8208
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8209
+  (0.1ms) SAVEPOINT active_record_1
8210
+  (0.5ms) ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" DISABLE TRIGGER ALL
8211
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8212
+  (2.3ms)  SELECT schemaname || '.' || tablename
8213
+ FROM pg_tables
8214
+ WHERE
8215
+ tablename !~ '_prt_' AND
8216
+ tablename <> 'schema_migrations' AND tablename <> 'ar_internal_metadata' AND
8217
+ schemaname = ANY (current_schemas(false))
8218
+ 
8219
+  (1.2ms) select table_name from information_schema.views where table_schema = 'notifiable-rails-test'
8220
+  (9.6ms) TRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;
8221
+  (0.1ms) SAVEPOINT active_record_1
8222
+  (0.3ms) ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" ENABLE TRIGGER ALL
8223
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8224
+  (3.5ms) ROLLBACK
8225
+  (0.2ms) SELECT pg_try_advisory_lock(5131134053504291175)
8226
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
8227
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
8228
+  (0.3ms) BEGIN
8229
+  (0.1ms) COMMIT
8230
+  (0.2ms) SELECT pg_advisory_unlock(5131134053504291175)
8231
+  (0.2ms) BEGIN
8232
+  (0.3ms) SAVEPOINT active_record_1
8233
+ SQL (0.7ms) INSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["name", "App 1"], ["created_at", "2018-08-24 12:27:53.107641"], ["updated_at", "2018-08-24 12:27:53.107641"]]
8234
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8235
+  (0.3ms) SAVEPOINT active_record_1
8236
+ SQL (0.6ms) INSERT INTO "notifiable_notifications" ("app_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["app_id", 485], ["created_at", "2018-08-24 12:27:53.116344"], ["updated_at", "2018-08-24 12:27:53.116344"]]
8237
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8238
+  (0.2ms) SAVEPOINT active_record_1
8239
+ SQL (0.3ms) INSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["name", "App 2"], ["created_at", "2018-08-24 12:27:53.142398"], ["updated_at", "2018-08-24 12:27:53.142398"]]
8240
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8241
+  (0.1ms) SAVEPOINT active_record_1
8242
+ Notifiable::DeviceToken Exists (0.7ms) SELECT 1 AS one FROM "notifiable_device_tokens" WHERE "notifiable_device_tokens"."token" = $1 AND "notifiable_device_tokens"."app_id" = 486 LIMIT $2 [["token", "ABCD1"], ["LIMIT", 1]]
8243
+ SQL (0.4ms) INSERT INTO "notifiable_device_tokens" ("token", "provider", "app_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["token", "ABCD1"], ["provider", "mock"], ["app_id", 486], ["created_at", "2018-08-24 12:27:53.148487"], ["updated_at", "2018-08-24 12:27:53.148487"]]
8244
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8245
+  (0.2ms) SAVEPOINT active_record_1
8246
+  (0.5ms) ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" DISABLE TRIGGER ALL
8247
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8248
+  (2.2ms)  SELECT schemaname || '.' || tablename
8249
+ FROM pg_tables
8250
+ WHERE
8251
+ tablename !~ '_prt_' AND
8252
+ tablename <> 'schema_migrations' AND tablename <> 'ar_internal_metadata' AND
8253
+ schemaname = ANY (current_schemas(false))
8254
+ 
8255
+  (1.2ms) select table_name from information_schema.views where table_schema = 'notifiable-rails-test'
8256
+  (12.5ms) TRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;
8257
+  (0.2ms) SAVEPOINT active_record_1
8258
+  (0.4ms) ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" ENABLE TRIGGER ALL
8259
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8260
+  (3.4ms) ROLLBACK
8261
+  (0.2ms) SELECT pg_try_advisory_lock(5131134053504291175)
8262
+  (2.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
8263
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
8264
+  (0.2ms) BEGIN
8265
+  (0.3ms) COMMIT
8266
+  (0.3ms) SELECT pg_advisory_unlock(5131134053504291175)
8267
+  (0.2ms) BEGIN
8268
+  (0.2ms) SAVEPOINT active_record_1
8269
+ SQL (1.6ms) INSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["name", "App 1"], ["created_at", "2018-08-24 12:36:29.004457"], ["updated_at", "2018-08-24 12:36:29.004457"]]
8270
+  (0.3ms) RELEASE SAVEPOINT active_record_1
8271
+  (0.2ms) SAVEPOINT active_record_1
8272
+ SQL (0.6ms) INSERT INTO "notifiable_notifications" ("app_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["app_id", 487], ["created_at", "2018-08-24 12:36:29.014317"], ["updated_at", "2018-08-24 12:36:29.014317"]]
8273
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8274
+  (0.2ms) SAVEPOINT active_record_1
8275
+ SQL (1.7ms) INSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["name", "App 2"], ["created_at", "2018-08-24 12:36:29.041179"], ["updated_at", "2018-08-24 12:36:29.041179"]]
8276
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8277
+  (0.1ms) SAVEPOINT active_record_1
8278
+ Notifiable::DeviceToken Exists (0.6ms) SELECT 1 AS one FROM "notifiable_device_tokens" WHERE "notifiable_device_tokens"."token" = $1 AND "notifiable_device_tokens"."app_id" = 488 LIMIT $2 [["token", "ABCD1"], ["LIMIT", 1]]
8279
+ SQL (0.9ms) INSERT INTO "notifiable_device_tokens" ("token", "provider", "app_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["token", "ABCD1"], ["provider", "mock"], ["app_id", 488], ["created_at", "2018-08-24 12:36:29.048531"], ["updated_at", "2018-08-24 12:36:29.048531"]]
8280
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8281
+  (0.2ms) SAVEPOINT active_record_1
8282
+  (0.6ms) ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" DISABLE TRIGGER ALL
8283
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8284
+  (2.8ms)  SELECT schemaname || '.' || tablename
8285
+ FROM pg_tables
8286
+ WHERE
8287
+ tablename !~ '_prt_' AND
8288
+ tablename <> 'schema_migrations' AND tablename <> 'ar_internal_metadata' AND
8289
+ schemaname = ANY (current_schemas(false))
8290
+ 
8291
+  (1.4ms) select table_name from information_schema.views where table_schema = 'notifiable-rails-test'
8292
+  (15.7ms) TRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;
8293
+  (0.3ms) SAVEPOINT active_record_1
8294
+  (0.3ms) ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" ENABLE TRIGGER ALL
8295
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8296
+  (4.8ms) ROLLBACK
8297
+  (0.2ms) BEGIN
8298
+  (0.2ms) SAVEPOINT active_record_1
8299
+ SQL (0.5ms) INSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["name", "App 3"], ["created_at", "2018-08-24 12:36:29.084654"], ["updated_at", "2018-08-24 12:36:29.084654"]]
8300
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8301
+  (0.2ms) SAVEPOINT active_record_1
8302
+ SQL (0.5ms) INSERT INTO "notifiable_notifications" ("app_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["app_id", 489], ["created_at", "2018-08-24 12:36:29.086904"], ["updated_at", "2018-08-24 12:36:29.086904"]]
8303
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8304
+  (0.1ms) SAVEPOINT active_record_1
8305
+ SQL (0.3ms) INSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["name", "App 4"], ["created_at", "2018-08-24 12:36:29.089239"], ["updated_at", "2018-08-24 12:36:29.089239"]]
8306
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8307
+  (0.1ms) SAVEPOINT active_record_1
8308
+ Notifiable::DeviceToken Exists (0.6ms) SELECT 1 AS one FROM "notifiable_device_tokens" WHERE "notifiable_device_tokens"."token" = $1 AND "notifiable_device_tokens"."app_id" = 490 LIMIT $2 [["token", "ABCD2"], ["LIMIT", 1]]
8309
+ SQL (0.3ms) INSERT INTO "notifiable_device_tokens" ("token", "provider", "app_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["token", "ABCD2"], ["provider", "mock"], ["app_id", 490], ["created_at", "2018-08-24 12:36:29.092045"], ["updated_at", "2018-08-24 12:36:29.092045"]]
8310
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8311
+  (0.1ms) SAVEPOINT active_record_1
8312
+  (0.3ms) ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" DISABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" DISABLE TRIGGER ALL
8313
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8314
+  (11.2ms) TRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;
8315
+  (0.2ms) SAVEPOINT active_record_1
8316
+  (0.3ms) ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "spatial_ref_sys" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_device_tokens" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_apps" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_notifications" ENABLE TRIGGER ALL;ALTER TABLE "notifiable_statuses" ENABLE TRIGGER ALL
8317
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8318
+  (4.2ms) ROLLBACK
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notifiable-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.29.0
4
+ version: 0.30.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brooke-Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-24 00:00:00.000000000 Z
11
+ date: 2018-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -214,10 +214,11 @@ files:
214
214
  - lib/notifiable/railtie.rb
215
215
  - lib/notifiable/version.rb
216
216
  - lib/tasks/brakeman.rake
217
- - spec/model/device_token_spec.rb
218
- - spec/model/notifiable_app_spec.rb
219
- - spec/model/notification_spec.rb
220
- - spec/model/notifier_base_spec.rb
217
+ - spec/notifiable/device_token_spec.rb
218
+ - spec/notifiable/notifiable_app_spec.rb
219
+ - spec/notifiable/notification_spec.rb
220
+ - spec/notifiable/notifier_base_spec.rb
221
+ - spec/notifiable_spec.rb
221
222
  - spec/spec_helper.rb
222
223
  - spec/support/engine_controller.rb
223
224
  - spec/support/factories.rb
@@ -320,10 +321,11 @@ test_files:
320
321
  - spec/test_app/log/test.log
321
322
  - spec/test_app/log/development.log
322
323
  - spec/test_app/README.rdoc
324
+ - spec/notifiable_spec.rb
323
325
  - spec/support/engine_controller.rb
324
326
  - spec/support/factories.rb
325
327
  - spec/support/request_helpers.rb
326
- - spec/model/notification_spec.rb
327
- - spec/model/notifiable_app_spec.rb
328
- - spec/model/notifier_base_spec.rb
329
- - spec/model/device_token_spec.rb
328
+ - spec/notifiable/notification_spec.rb
329
+ - spec/notifiable/notifiable_app_spec.rb
330
+ - spec/notifiable/notifier_base_spec.rb
331
+ - spec/notifiable/device_token_spec.rb