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 +4 -4
- data/lib/generators/notifiable/install/templates/initializer.rb +6 -7
- data/lib/notifiable/active_record.rb +2 -0
- data/lib/notifiable/engine.rb +2 -0
- data/lib/notifiable/railtie.rb +0 -5
- data/lib/notifiable/version.rb +1 -1
- data/lib/notifiable.rb +7 -14
- data/spec/{model → notifiable}/device_token_spec.rb +0 -0
- data/spec/{model → notifiable}/notifiable_app_spec.rb +0 -0
- data/spec/{model → notifiable}/notification_spec.rb +0 -0
- data/spec/{model → notifiable}/notifier_base_spec.rb +0 -0
- data/spec/notifiable_spec.rb +26 -0
- data/spec/test_app/config/initializers/notifiable.rb +0 -3
- data/spec/test_app/log/test.log +335 -0
- metadata +12 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1993ced83c86c7509813d70897155e9ffa44cfd1
|
4
|
+
data.tar.gz: 765fc02b67e921f38976fc47133b2a97ba22a4b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/notifiable/engine.rb
CHANGED
data/lib/notifiable/railtie.rb
CHANGED
data/lib/notifiable/version.rb
CHANGED
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
|
-
|
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
|
data/spec/test_app/log/test.log
CHANGED
@@ -7981,3 +7981,338 @@ Migrating to AddThreadIdToNotifications (201806182135000)
|
|
7981
7981
|
[1m[35m (0.3ms)[0m [1m[35mALTER 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[0m
|
7982
7982
|
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
7983
7983
|
[1m[35m (5.6ms)[0m [1m[31mROLLBACK[0m
|
7984
|
+
[1m[35m (1.3ms)[0m [1m[34mSELECT pg_try_advisory_lock(5131134053504291175)[0m
|
7985
|
+
[1m[35m (3.9ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
7986
|
+
[1m[36mActiveRecord::InternalMetadata Load (3.0ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
7987
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
7988
|
+
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
7989
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_advisory_unlock(5131134053504291175)[0m
|
7990
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
7991
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
7992
|
+
[1m[35m (12.1ms)[0m [1m[35mALTER 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[0m
|
7993
|
+
[1m[35m (1.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
7994
|
+
[1m[35m (18.8ms)[0m [1m[34m 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
|
+
[0m
|
8001
|
+
[1m[35m (5.7ms)[0m [1m[34mselect table_name from information_schema.views where table_schema = 'notifiable-rails-test'[0m
|
8002
|
+
[1m[35m (19.6ms)[0m [1m[35mTRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;[0m
|
8003
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8004
|
+
[1m[35m (0.3ms)[0m [1m[35mALTER 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[0m
|
8005
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8006
|
+
[1m[35m (7.1ms)[0m [1m[31mROLLBACK[0m
|
8007
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_try_advisory_lock(5131134053504291175)[0m
|
8008
|
+
[1m[35m (0.8ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
8009
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
8010
|
+
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
8011
|
+
[1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
|
8012
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(5131134053504291175)[0m
|
8013
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
8014
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8015
|
+
[1m[35m (0.8ms)[0m [1m[35mALTER 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[0m
|
8016
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8017
|
+
[1m[35m (2.4ms)[0m [1m[34m 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
|
+
[0m
|
8024
|
+
[1m[35m (1.2ms)[0m [1m[34mselect table_name from information_schema.views where table_schema = 'notifiable-rails-test'[0m
|
8025
|
+
[1m[35m (13.8ms)[0m [1m[35mTRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;[0m
|
8026
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8027
|
+
[1m[35m (0.3ms)[0m [1m[35mALTER 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[0m
|
8028
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8029
|
+
[1m[35m (4.6ms)[0m [1m[31mROLLBACK[0m
|
8030
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_try_advisory_lock(5131134053504291175)[0m
|
8031
|
+
[1m[35m (0.9ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
8032
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
8033
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
8034
|
+
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
8035
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_advisory_unlock(5131134053504291175)[0m
|
8036
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
8037
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8038
|
+
[1m[35m (0.9ms)[0m [1m[35mALTER 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[0m
|
8039
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8040
|
+
[1m[35m (2.5ms)[0m [1m[34m 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
|
+
[0m
|
8047
|
+
[1m[35m (1.3ms)[0m [1m[34mselect table_name from information_schema.views where table_schema = 'notifiable-rails-test'[0m
|
8048
|
+
[1m[35m (12.4ms)[0m [1m[35mTRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;[0m
|
8049
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8050
|
+
[1m[35m (0.4ms)[0m [1m[35mALTER 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[0m
|
8051
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8052
|
+
[1m[35m (3.9ms)[0m [1m[31mROLLBACK[0m
|
8053
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_try_advisory_lock(5131134053504291175)[0m
|
8054
|
+
[1m[35m (0.9ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
8055
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
8056
|
+
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
8057
|
+
[1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
|
8058
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(5131134053504291175)[0m
|
8059
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
8060
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8061
|
+
[1m[35m (0.8ms)[0m [1m[35mALTER 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[0m
|
8062
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8063
|
+
[1m[35m (2.6ms)[0m [1m[34m 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
|
+
[0m
|
8070
|
+
[1m[35m (1.4ms)[0m [1m[34mselect table_name from information_schema.views where table_schema = 'notifiable-rails-test'[0m
|
8071
|
+
[1m[35m (16.8ms)[0m [1m[35mTRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;[0m
|
8072
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8073
|
+
[1m[35m (0.3ms)[0m [1m[35mALTER 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[0m
|
8074
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8075
|
+
[1m[35m (5.6ms)[0m [1m[31mROLLBACK[0m
|
8076
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_try_advisory_lock(5131134053504291175)[0m
|
8077
|
+
[1m[35m (0.9ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
8078
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.5ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
8079
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
8080
|
+
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
8081
|
+
[1m[35m (0.4ms)[0m [1m[34mSELECT pg_advisory_unlock(5131134053504291175)[0m
|
8082
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(5131134053504291175)[0m
|
8083
|
+
[1m[35m (1.4ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
8084
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.9ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
8085
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
8086
|
+
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
8087
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(5131134053504291175)[0m
|
8088
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
8089
|
+
[1m[35m (0.4ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8090
|
+
[1m[35mSQL (4.1ms)[0m [1m[32mINSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["name", "App 1"], ["created_at", "2018-08-24 12:22:42.105881"], ["updated_at", "2018-08-24 12:22:42.105881"]]
|
8091
|
+
[1m[35m (0.4ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8092
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8093
|
+
[1m[35mSQL (4.2ms)[0m [1m[32mINSERT INTO "notifiable_notifications" ("app_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["app_id", 477], ["created_at", "2018-08-24 12:22:42.120879"], ["updated_at", "2018-08-24 12:22:42.120879"]]
|
8094
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8095
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8096
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["name", "App 2"], ["created_at", "2018-08-24 12:22:42.155611"], ["updated_at", "2018-08-24 12:22:42.155611"]]
|
8097
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8098
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8099
|
+
[1m[36mNotifiable::DeviceToken Exists (3.2ms)[0m [1m[34mSELECT 1 AS one FROM "notifiable_device_tokens" WHERE "notifiable_device_tokens"."token" = $1 AND "notifiable_device_tokens"."app_id" = 478 LIMIT $2[0m [["token", "ABCD1"], ["LIMIT", 1]]
|
8100
|
+
[1m[35mSQL (3.2ms)[0m [1m[32mINSERT INTO "notifiable_device_tokens" ("token", "provider", "app_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["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
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8102
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8103
|
+
[1m[35m (1.5ms)[0m [1m[35mALTER 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[0m
|
8104
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8105
|
+
[1m[35m (3.1ms)[0m [1m[34m 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
|
+
[0m
|
8112
|
+
[1m[35m (1.4ms)[0m [1m[34mselect table_name from information_schema.views where table_schema = 'notifiable-rails-test'[0m
|
8113
|
+
[1m[35m (11.8ms)[0m [1m[35mTRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;[0m
|
8114
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8115
|
+
[1m[35m (0.3ms)[0m [1m[35mALTER 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[0m
|
8116
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8117
|
+
[1m[35m (3.8ms)[0m [1m[31mROLLBACK[0m
|
8118
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(5131134053504291175)[0m
|
8119
|
+
[1m[35m (0.7ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
8120
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.5ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
8121
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
8122
|
+
[1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
|
8123
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_advisory_unlock(5131134053504291175)[0m
|
8124
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
8125
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8126
|
+
[1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["name", "App 1"], ["created_at", "2018-08-24 12:23:16.340689"], ["updated_at", "2018-08-24 12:23:16.340689"]]
|
8127
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8128
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8129
|
+
[1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "notifiable_notifications" ("app_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["app_id", 479], ["created_at", "2018-08-24 12:23:16.349483"], ["updated_at", "2018-08-24 12:23:16.349483"]]
|
8130
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8131
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8132
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["name", "App 2"], ["created_at", "2018-08-24 12:23:16.379014"], ["updated_at", "2018-08-24 12:23:16.379014"]]
|
8133
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8134
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8135
|
+
[1m[36mNotifiable::DeviceToken Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "notifiable_device_tokens" WHERE "notifiable_device_tokens"."token" = $1 AND "notifiable_device_tokens"."app_id" = 480 LIMIT $2[0m [["token", "ABCD1"], ["LIMIT", 1]]
|
8136
|
+
[1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "notifiable_device_tokens" ("token", "provider", "app_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["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
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8138
|
+
[1m[35m (1.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8139
|
+
[1m[35m (2.0ms)[0m [1m[35mALTER 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[0m
|
8140
|
+
[1m[35m (1.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8141
|
+
[1m[35m (4.1ms)[0m [1m[34m 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
|
+
[0m
|
8148
|
+
[1m[35m (4.1ms)[0m [1m[34mselect table_name from information_schema.views where table_schema = 'notifiable-rails-test'[0m
|
8149
|
+
[1m[35m (14.5ms)[0m [1m[35mTRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;[0m
|
8150
|
+
[1m[35m (1.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8151
|
+
[1m[35m (1.1ms)[0m [1m[35mALTER 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[0m
|
8152
|
+
[1m[35m (7.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8153
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_try_advisory_lock(5131134053504291175)[0m
|
8154
|
+
[1m[35m (0.7ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
8155
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
8156
|
+
[1m[35m (0.4ms)[0m [1m[35mBEGIN[0m
|
8157
|
+
[1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
|
8158
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(5131134053504291175)[0m
|
8159
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
8160
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8161
|
+
[1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["name", "App 1"], ["created_at", "2018-08-24 12:24:09.282049"], ["updated_at", "2018-08-24 12:24:09.282049"]]
|
8162
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8163
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8164
|
+
[1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "notifiable_notifications" ("app_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["app_id", 481], ["created_at", "2018-08-24 12:24:09.290778"], ["updated_at", "2018-08-24 12:24:09.290778"]]
|
8165
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8166
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8167
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["name", "App 2"], ["created_at", "2018-08-24 12:24:09.320806"], ["updated_at", "2018-08-24 12:24:09.320806"]]
|
8168
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8169
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8170
|
+
[1m[36mNotifiable::DeviceToken Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "notifiable_device_tokens" WHERE "notifiable_device_tokens"."token" = $1 AND "notifiable_device_tokens"."app_id" = 482 LIMIT $2[0m [["token", "ABCD1"], ["LIMIT", 1]]
|
8171
|
+
[1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "notifiable_device_tokens" ("token", "provider", "app_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["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
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8173
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8174
|
+
[1m[35m (0.8ms)[0m [1m[35mALTER 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[0m
|
8175
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8176
|
+
[1m[35m (2.5ms)[0m [1m[34m 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
|
+
[0m
|
8183
|
+
[1m[35m (1.7ms)[0m [1m[34mselect table_name from information_schema.views where table_schema = 'notifiable-rails-test'[0m
|
8184
|
+
[1m[35m (8.8ms)[0m [1m[35mTRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;[0m
|
8185
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8186
|
+
[1m[35m (0.4ms)[0m [1m[35mALTER 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[0m
|
8187
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8188
|
+
[1m[35m (4.2ms)[0m [1m[31mROLLBACK[0m
|
8189
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(5131134053504291175)[0m
|
8190
|
+
[1m[35m (0.8ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
8191
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
8192
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
8193
|
+
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
8194
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(5131134053504291175)[0m
|
8195
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
8196
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8197
|
+
[1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["name", "App 1"], ["created_at", "2018-08-24 12:24:35.797000"], ["updated_at", "2018-08-24 12:24:35.797000"]]
|
8198
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8199
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8200
|
+
[1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "notifiable_notifications" ("app_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["app_id", 483], ["created_at", "2018-08-24 12:24:35.805884"], ["updated_at", "2018-08-24 12:24:35.805884"]]
|
8201
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8202
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8203
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["name", "App 2"], ["created_at", "2018-08-24 12:24:35.831639"], ["updated_at", "2018-08-24 12:24:35.831639"]]
|
8204
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8205
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8206
|
+
[1m[36mNotifiable::DeviceToken Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "notifiable_device_tokens" WHERE "notifiable_device_tokens"."token" = $1 AND "notifiable_device_tokens"."app_id" = 484 LIMIT $2[0m [["token", "ABCD1"], ["LIMIT", 1]]
|
8207
|
+
[1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "notifiable_device_tokens" ("token", "provider", "app_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["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
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8209
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8210
|
+
[1m[35m (0.5ms)[0m [1m[35mALTER 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[0m
|
8211
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8212
|
+
[1m[35m (2.3ms)[0m [1m[34m 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
|
+
[0m
|
8219
|
+
[1m[35m (1.2ms)[0m [1m[34mselect table_name from information_schema.views where table_schema = 'notifiable-rails-test'[0m
|
8220
|
+
[1m[35m (9.6ms)[0m [1m[35mTRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;[0m
|
8221
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8222
|
+
[1m[35m (0.3ms)[0m [1m[35mALTER 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[0m
|
8223
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8224
|
+
[1m[35m (3.5ms)[0m [1m[31mROLLBACK[0m
|
8225
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(5131134053504291175)[0m
|
8226
|
+
[1m[35m (0.7ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
8227
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
8228
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
8229
|
+
[1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
|
8230
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(5131134053504291175)[0m
|
8231
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
8232
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8233
|
+
[1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["name", "App 1"], ["created_at", "2018-08-24 12:27:53.107641"], ["updated_at", "2018-08-24 12:27:53.107641"]]
|
8234
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8235
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8236
|
+
[1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "notifiable_notifications" ("app_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["app_id", 485], ["created_at", "2018-08-24 12:27:53.116344"], ["updated_at", "2018-08-24 12:27:53.116344"]]
|
8237
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8238
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8239
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["name", "App 2"], ["created_at", "2018-08-24 12:27:53.142398"], ["updated_at", "2018-08-24 12:27:53.142398"]]
|
8240
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8241
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8242
|
+
[1m[36mNotifiable::DeviceToken Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "notifiable_device_tokens" WHERE "notifiable_device_tokens"."token" = $1 AND "notifiable_device_tokens"."app_id" = 486 LIMIT $2[0m [["token", "ABCD1"], ["LIMIT", 1]]
|
8243
|
+
[1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "notifiable_device_tokens" ("token", "provider", "app_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["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
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8245
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8246
|
+
[1m[35m (0.5ms)[0m [1m[35mALTER 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[0m
|
8247
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8248
|
+
[1m[35m (2.2ms)[0m [1m[34m 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
|
+
[0m
|
8255
|
+
[1m[35m (1.2ms)[0m [1m[34mselect table_name from information_schema.views where table_schema = 'notifiable-rails-test'[0m
|
8256
|
+
[1m[35m (12.5ms)[0m [1m[35mTRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;[0m
|
8257
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8258
|
+
[1m[35m (0.4ms)[0m [1m[35mALTER 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[0m
|
8259
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8260
|
+
[1m[35m (3.4ms)[0m [1m[31mROLLBACK[0m
|
8261
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(5131134053504291175)[0m
|
8262
|
+
[1m[35m (2.5ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
8263
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
8264
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
8265
|
+
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
8266
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_advisory_unlock(5131134053504291175)[0m
|
8267
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
8268
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8269
|
+
[1m[35mSQL (1.6ms)[0m [1m[32mINSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["name", "App 1"], ["created_at", "2018-08-24 12:36:29.004457"], ["updated_at", "2018-08-24 12:36:29.004457"]]
|
8270
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8271
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8272
|
+
[1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "notifiable_notifications" ("app_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["app_id", 487], ["created_at", "2018-08-24 12:36:29.014317"], ["updated_at", "2018-08-24 12:36:29.014317"]]
|
8273
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8274
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8275
|
+
[1m[35mSQL (1.7ms)[0m [1m[32mINSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["name", "App 2"], ["created_at", "2018-08-24 12:36:29.041179"], ["updated_at", "2018-08-24 12:36:29.041179"]]
|
8276
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8277
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8278
|
+
[1m[36mNotifiable::DeviceToken Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "notifiable_device_tokens" WHERE "notifiable_device_tokens"."token" = $1 AND "notifiable_device_tokens"."app_id" = 488 LIMIT $2[0m [["token", "ABCD1"], ["LIMIT", 1]]
|
8279
|
+
[1m[35mSQL (0.9ms)[0m [1m[32mINSERT INTO "notifiable_device_tokens" ("token", "provider", "app_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["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
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8281
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8282
|
+
[1m[35m (0.6ms)[0m [1m[35mALTER 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[0m
|
8283
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8284
|
+
[1m[35m (2.8ms)[0m [1m[34m 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
|
+
[0m
|
8291
|
+
[1m[35m (1.4ms)[0m [1m[34mselect table_name from information_schema.views where table_schema = 'notifiable-rails-test'[0m
|
8292
|
+
[1m[35m (15.7ms)[0m [1m[35mTRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;[0m
|
8293
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8294
|
+
[1m[35m (0.3ms)[0m [1m[35mALTER 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[0m
|
8295
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8296
|
+
[1m[35m (4.8ms)[0m [1m[31mROLLBACK[0m
|
8297
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
8298
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8299
|
+
[1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["name", "App 3"], ["created_at", "2018-08-24 12:36:29.084654"], ["updated_at", "2018-08-24 12:36:29.084654"]]
|
8300
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8301
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8302
|
+
[1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "notifiable_notifications" ("app_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["app_id", 489], ["created_at", "2018-08-24 12:36:29.086904"], ["updated_at", "2018-08-24 12:36:29.086904"]]
|
8303
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8304
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8305
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "notifiable_apps" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["name", "App 4"], ["created_at", "2018-08-24 12:36:29.089239"], ["updated_at", "2018-08-24 12:36:29.089239"]]
|
8306
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8307
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8308
|
+
[1m[36mNotifiable::DeviceToken Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "notifiable_device_tokens" WHERE "notifiable_device_tokens"."token" = $1 AND "notifiable_device_tokens"."app_id" = 490 LIMIT $2[0m [["token", "ABCD2"], ["LIMIT", 1]]
|
8309
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "notifiable_device_tokens" ("token", "provider", "app_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["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
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8311
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8312
|
+
[1m[35m (0.3ms)[0m [1m[35mALTER 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[0m
|
8313
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8314
|
+
[1m[35m (11.2ms)[0m [1m[35mTRUNCATE TABLE "public"."spatial_ref_sys", "public"."notifiable_device_tokens", "public"."notifiable_apps", "public"."notifiable_notifications", "public"."notifiable_statuses" RESTART IDENTITY CASCADE;[0m
|
8315
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
8316
|
+
[1m[35m (0.3ms)[0m [1m[35mALTER 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[0m
|
8317
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
8318
|
+
[1m[35m (4.2ms)[0m [1m[31mROLLBACK[0m
|
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.
|
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-
|
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/
|
218
|
-
- spec/
|
219
|
-
- spec/
|
220
|
-
- spec/
|
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/
|
327
|
-
- spec/
|
328
|
-
- spec/
|
329
|
-
- spec/
|
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
|