hertz 1.0.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +27 -42
- data/Rakefile +5 -3
- data/app/models/hertz/delivery.rb +1 -0
- data/app/models/hertz/notification.rb +2 -0
- data/db/migrate/20160415174901_create_hertz_notifications.rb +1 -1
- data/db/migrate/20160627084018_create_hertz_notification_deliveries.rb +1 -1
- data/db/migrate/20160628084342_rename_notification_deliveries_to_deliveries.rb +1 -1
- data/lib/generators/hertz/install_generator.rb +2 -1
- data/lib/generators/hertz/templates/initializer.rb +1 -0
- data/lib/hertz.rb +1 -0
- data/lib/hertz/engine.rb +1 -0
- data/lib/hertz/notifiable.rb +1 -0
- data/lib/hertz/notification_deliverer.rb +2 -1
- data/lib/hertz/version.rb +2 -1
- data/spec/dummy/config/database.travis.yml +4 -0
- data/spec/factories/hertz/deliveries.rb +3 -2
- data/spec/factories/hertz/notifications.rb +3 -2
- data/spec/factories/users.rb +2 -1
- data/spec/hertz/hertz_spec.rb +2 -1
- data/spec/hertz/notifiable_spec.rb +25 -26
- data/spec/hertz/notification_deliverer_spec.rb +40 -47
- data/spec/models/hertz/notification_spec.rb +67 -57
- data/spec/spec_helper.rb +3 -0
- data/spec/support/factory_bot.rb +5 -0
- metadata +57 -72
- data/app/assets/javascripts/hertz/application.js +0 -13
- data/app/assets/stylesheets/hertz/application.css +0 -15
- data/app/controllers/hertz/application_controller.rb +0 -6
- data/app/helpers/hertz/application_helper.rb +0 -5
- data/app/views/layouts/hertz/application.html.erb +0 -14
- data/spec/dummy/config/database.yml +0 -19
- data/spec/dummy/log/development.log +0 -61
- data/spec/dummy/log/test.log +0 -217
- data/spec/examples.txt +0 -20
- data/spec/models/hertz/delivery_spec.rb +0 -12
- data/spec/support/factory_girl.rb +0 -5
- data/spec/support/shoulda.rb +0 -8
@@ -1,14 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Hertz</title>
|
5
|
-
<%= stylesheet_link_tag "hertz/application", media: "all" %>
|
6
|
-
<%= javascript_include_tag "hertz/application" %>
|
7
|
-
<%= csrf_meta_tags %>
|
8
|
-
</head>
|
9
|
-
<body>
|
10
|
-
|
11
|
-
<%= yield %>
|
12
|
-
|
13
|
-
</body>
|
14
|
-
</html>
|
@@ -1,19 +0,0 @@
|
|
1
|
-
default: &default
|
2
|
-
adapter: postgresql
|
3
|
-
host: localhost
|
4
|
-
username: postgres
|
5
|
-
password: postgres
|
6
|
-
pool: 5
|
7
|
-
timeout: 5000
|
8
|
-
|
9
|
-
development:
|
10
|
-
<<: *default
|
11
|
-
database: hertz_development
|
12
|
-
|
13
|
-
test:
|
14
|
-
<<: *default
|
15
|
-
database: hertz_test
|
16
|
-
|
17
|
-
production:
|
18
|
-
<<: *default
|
19
|
-
database: hertz_production
|
@@ -1,61 +0,0 @@
|
|
1
|
-
[1m[35mSQL (1.1ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
2
|
-
[1m[35mSQL (12.8ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "hstore"[0m
|
3
|
-
[1m[35m (6.5ms)[0m [1m[35mCREATE TABLE "hertz_deliveries" ("id" serial primary key, "notification_id" integer NOT NULL, "courier" character varying NOT NULL, "created_at" timestamp NOT NULL)[0m
|
4
|
-
[1m[35m (1.8ms)[0m [1m[35mCREATE UNIQUE INDEX "index_hertz_notification_deliveries_on_notification_and_courier" ON "hertz_deliveries" USING btree ("notification_id", "courier")[0m
|
5
|
-
[1m[35m (1.4ms)[0m [1m[35mCREATE INDEX "index_hertz_deliveries_on_notification_id" ON "hertz_deliveries" USING btree ("notification_id")[0m
|
6
|
-
[1m[35m (3.6ms)[0m [1m[35mCREATE TABLE "hertz_notifications" ("id" serial primary key, "type" character varying NOT NULL, "receiver_type" character varying NOT NULL, "receiver_id" integer NOT NULL, "meta" hstore DEFAULT '' NOT NULL, "read_at" timestamp, "created_at" timestamp NOT NULL)[0m
|
7
|
-
[1m[35m (1.9ms)[0m [1m[35mCREATE TABLE "users" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
8
|
-
[1m[35m (3.2ms)[0m [1m[35mALTER TABLE "hertz_deliveries" ADD CONSTRAINT "fk_rails_eefe07f4cd"
|
9
|
-
FOREIGN KEY ("notification_id")
|
10
|
-
REFERENCES "hertz_notifications" ("id")
|
11
|
-
ON DELETE CASCADE[0m
|
12
|
-
[1m[35m (5.9ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying PRIMARY KEY)[0m
|
13
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT version FROM "schema_migrations"[0m
|
14
|
-
[1m[35m (0.5ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES ('20160628084413')[0m
|
15
|
-
[1m[35m (0.4ms)[0m [1m[32mINSERT INTO schema_migrations (version) VALUES
|
16
|
-
('20160508094342'),
|
17
|
-
('20160418122437'),
|
18
|
-
('20160415175358'),
|
19
|
-
('20160415175837'),
|
20
|
-
('20160627084119');
|
21
|
-
|
22
|
-
[0m
|
23
|
-
[1m[35m (2.4ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
24
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", :environment], ["LIMIT", 1]]
|
25
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
26
|
-
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "development"], ["created_at", 2017-01-19 15:22:12 UTC], ["updated_at", 2017-01-19 15:22:12 UTC]]
|
27
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
28
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", :environment], ["LIMIT", 1]]
|
29
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
30
|
-
[1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
|
31
|
-
[1m[35mSQL (0.2ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
32
|
-
[1m[35mSQL (10.1ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "hstore"[0m
|
33
|
-
[1m[35m (5.2ms)[0m [1m[35mCREATE TABLE "hertz_deliveries" ("id" serial primary key, "notification_id" integer NOT NULL, "courier" character varying NOT NULL, "created_at" timestamp NOT NULL)[0m
|
34
|
-
[1m[35m (1.7ms)[0m [1m[35mCREATE UNIQUE INDEX "index_hertz_notification_deliveries_on_notification_and_courier" ON "hertz_deliveries" USING btree ("notification_id", "courier")[0m
|
35
|
-
[1m[35m (2.8ms)[0m [1m[35mCREATE INDEX "index_hertz_deliveries_on_notification_id" ON "hertz_deliveries" USING btree ("notification_id")[0m
|
36
|
-
[1m[35m (4.2ms)[0m [1m[35mCREATE TABLE "hertz_notifications" ("id" serial primary key, "type" character varying NOT NULL, "receiver_type" character varying NOT NULL, "receiver_id" integer NOT NULL, "meta" hstore DEFAULT '' NOT NULL, "read_at" timestamp, "created_at" timestamp NOT NULL)[0m
|
37
|
-
[1m[35m (3.3ms)[0m [1m[35mCREATE TABLE "users" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
38
|
-
[1m[35m (1.4ms)[0m [1m[35mALTER TABLE "hertz_deliveries" ADD CONSTRAINT "fk_rails_eefe07f4cd"
|
39
|
-
FOREIGN KEY ("notification_id")
|
40
|
-
REFERENCES "hertz_notifications" ("id")
|
41
|
-
ON DELETE CASCADE[0m
|
42
|
-
[1m[35m (3.7ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying PRIMARY KEY)[0m
|
43
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT version FROM "schema_migrations"[0m
|
44
|
-
[1m[35m (0.4ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES ('20160628084413')[0m
|
45
|
-
[1m[35m (0.4ms)[0m [1m[32mINSERT INTO schema_migrations (version) VALUES
|
46
|
-
('20160508094342'),
|
47
|
-
('20160418122437'),
|
48
|
-
('20160415175358'),
|
49
|
-
('20160415175837'),
|
50
|
-
('20160627084119');
|
51
|
-
|
52
|
-
[0m
|
53
|
-
[1m[35m (3.3ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
54
|
-
[1m[36mActiveRecord::InternalMetadata Load (2.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", :environment], ["LIMIT", 1]]
|
55
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
56
|
-
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "development"], ["created_at", 2017-01-19 15:22:12 UTC], ["updated_at", 2017-01-19 15:22:12 UTC]]
|
57
|
-
[1m[35m (0.8ms)[0m [1m[35mCOMMIT[0m
|
58
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", :environment], ["LIMIT", 1]]
|
59
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
60
|
-
[1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
|
61
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
data/spec/dummy/log/test.log
DELETED
@@ -1,217 +0,0 @@
|
|
1
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3
|
-
[1m[35m (0.4ms)[0m [1m[35mALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" DISABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL[0m
|
4
|
-
[1m[35m (5.6ms)[0m [1m[35mCOMMIT[0m
|
5
|
-
[1m[35m (1.0ms)[0m [1m[34m SELECT schemaname || '.' || tablename
|
6
|
-
FROM pg_tables
|
7
|
-
WHERE
|
8
|
-
tablename !~ '_prt_' AND
|
9
|
-
tablename <> 'schema_migrations' AND
|
10
|
-
schemaname = ANY (current_schemas(false))
|
11
|
-
[0m
|
12
|
-
[1m[35m (1.1ms)[0m [1m[34mselect table_name from information_schema.views where table_schema = 'hertz_test'[0m
|
13
|
-
[1m[35m (15.3ms)[0m [1m[35mTRUNCATE TABLE "public"."users", "public"."hertz_notifications", "public"."hertz_deliveries", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;[0m
|
14
|
-
[1m[35m (1.7ms)[0m [1m[35mBEGIN[0m
|
15
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "hertz_deliveries" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL[0m
|
16
|
-
[1m[35m (1.4ms)[0m [1m[35mCOMMIT[0m
|
17
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
18
|
-
[1m[35m (0.3ms)[0m [1m[35mALTER TABLE "hertz_deliveries" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL[0m
|
19
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
20
|
-
[1m[35m (9.6ms)[0m [1m[35mTRUNCATE TABLE "public"."users", "public"."hertz_notifications", "public"."hertz_deliveries", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;[0m
|
21
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
22
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" ENABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL[0m
|
23
|
-
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
24
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
25
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" DISABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL[0m
|
26
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
27
|
-
[1m[35m (7.1ms)[0m [1m[35mTRUNCATE TABLE "public"."users", "public"."hertz_notifications", "public"."hertz_deliveries", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;[0m
|
28
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
29
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" ENABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL[0m
|
30
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
31
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
32
|
-
[1m[35m (14.5ms)[0m [1m[35mALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" DISABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL[0m
|
33
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
34
|
-
[1m[35m (15.7ms)[0m [1m[35mTRUNCATE TABLE "public"."users", "public"."hertz_notifications", "public"."hertz_deliveries", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;[0m
|
35
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
36
|
-
[1m[35m (0.3ms)[0m [1m[35mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" ENABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL[0m
|
37
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
38
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
39
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" DISABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL[0m
|
40
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
41
|
-
[1m[35m (8.4ms)[0m [1m[35mTRUNCATE TABLE "public"."users", "public"."hertz_notifications", "public"."hertz_deliveries", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;[0m
|
42
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
43
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" ENABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL[0m
|
44
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
45
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
46
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" DISABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL[0m
|
47
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
48
|
-
[1m[35m (7.6ms)[0m [1m[35mTRUNCATE TABLE "public"."users", "public"."hertz_notifications", "public"."hertz_deliveries", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;[0m
|
49
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
50
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" ENABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL[0m
|
51
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
52
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
53
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" DISABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL[0m
|
54
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
55
|
-
[1m[35m (7.3ms)[0m [1m[35mTRUNCATE TABLE "public"."users", "public"."hertz_notifications", "public"."hertz_deliveries", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;[0m
|
56
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
57
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" ENABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL[0m
|
58
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
59
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
60
|
-
[1m[35mSQL (11.2ms)[0m [1m[32mINSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2017-01-19 15:22:16 UTC], ["updated_at", 2017-01-19 15:22:16 UTC]]
|
61
|
-
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "hertz_notifications" ("type", "receiver_type", "receiver_id", "created_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["type", "Hertz::Notification"], ["receiver_type", "User"], ["receiver_id", 1], ["created_at", 2017-01-19 15:22:16 UTC]]
|
62
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
63
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
64
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" DISABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL[0m
|
65
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
66
|
-
[1m[35m (9.8ms)[0m [1m[35mTRUNCATE TABLE "public"."users", "public"."hertz_notifications", "public"."hertz_deliveries", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;[0m
|
67
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
68
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" ENABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL[0m
|
69
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
70
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
71
|
-
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2017-01-19 15:22:16 UTC], ["updated_at", 2017-01-19 15:22:16 UTC]]
|
72
|
-
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "hertz_notifications" ("type", "receiver_type", "receiver_id", "created_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["type", "Hertz::Notification"], ["receiver_type", "User"], ["receiver_id", 1], ["created_at", 2017-01-19 15:22:16 UTC]]
|
73
|
-
[1m[35m (0.8ms)[0m [1m[35mCOMMIT[0m
|
74
|
-
[1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "hertz_deliveries" WHERE "hertz_deliveries"."notification_id" = $1[0m [["notification_id", 1]]
|
75
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
76
|
-
[1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "hertz_deliveries" ("notification_id", "courier", "created_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["notification_id", 1], ["courier", "test"], ["created_at", 2017-01-19 15:22:16 UTC]]
|
77
|
-
[1m[35m (0.7ms)[0m [1m[35mCOMMIT[0m
|
78
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "hertz_deliveries" WHERE "hertz_deliveries"."notification_id" = $1[0m [["notification_id", 1]]
|
79
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
80
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" DISABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL[0m
|
81
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
82
|
-
[1m[35m (9.4ms)[0m [1m[35mTRUNCATE TABLE "public"."users", "public"."hertz_notifications", "public"."hertz_deliveries", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;[0m
|
83
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
84
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" ENABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL[0m
|
85
|
-
[1m[35m (0.7ms)[0m [1m[35mCOMMIT[0m
|
86
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
87
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" DISABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL[0m
|
88
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
89
|
-
[1m[35m (7.2ms)[0m [1m[35mTRUNCATE TABLE "public"."users", "public"."hertz_notifications", "public"."hertz_deliveries", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;[0m
|
90
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
91
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" ENABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL[0m
|
92
|
-
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
93
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
94
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" DISABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL[0m
|
95
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
96
|
-
[1m[35m (7.0ms)[0m [1m[35mTRUNCATE TABLE "public"."users", "public"."hertz_notifications", "public"."hertz_deliveries", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;[0m
|
97
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
98
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" ENABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL[0m
|
99
|
-
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
100
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
101
|
-
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2017-01-19 15:22:17 UTC], ["updated_at", 2017-01-19 15:22:17 UTC]]
|
102
|
-
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "hertz_notifications" ("type", "receiver_type", "receiver_id", "created_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["type", "Hertz::Notification"], ["receiver_type", "User"], ["receiver_id", 1], ["created_at", 2017-01-19 15:22:17 UTC]]
|
103
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
104
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
105
|
-
[1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "hertz_notifications" SET "read_at" = $1 WHERE "hertz_notifications"."id" = $2[0m [["read_at", 2017-01-19 15:22:17 UTC], ["id", 1]]
|
106
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
107
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
108
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" DISABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL[0m
|
109
|
-
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
110
|
-
[1m[35m (7.2ms)[0m [1m[35mTRUNCATE TABLE "public"."users", "public"."hertz_notifications", "public"."hertz_deliveries", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;[0m
|
111
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
112
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" ENABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL[0m
|
113
|
-
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
114
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
115
|
-
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2017-01-19 15:22:17 UTC], ["updated_at", 2017-01-19 15:22:17 UTC]]
|
116
|
-
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "hertz_notifications" ("type", "receiver_type", "receiver_id", "created_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["type", "Hertz::Notification"], ["receiver_type", "User"], ["receiver_id", 1], ["created_at", 2017-01-19 15:22:17 UTC]]
|
117
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
118
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
119
|
-
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2017-01-19 15:22:17 UTC], ["updated_at", 2017-01-19 15:22:17 UTC]]
|
120
|
-
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "hertz_notifications" ("type", "receiver_type", "receiver_id", "read_at", "created_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["type", "Hertz::Notification"], ["receiver_type", "User"], ["receiver_id", 2], ["read_at", 2017-01-19 15:22:17 UTC], ["created_at", 2017-01-19 15:22:17 UTC]]
|
121
|
-
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
122
|
-
[1m[36mHertz::Notification Load (0.1ms)[0m [1m[34mSELECT "hertz_notifications".* FROM "hertz_notifications" WHERE (read_at IS NULL)[0m
|
123
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
124
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" DISABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL[0m
|
125
|
-
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
126
|
-
[1m[35m (7.0ms)[0m [1m[35mTRUNCATE TABLE "public"."users", "public"."hertz_notifications", "public"."hertz_deliveries", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;[0m
|
127
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
128
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" ENABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL[0m
|
129
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
130
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
131
|
-
[1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2017-01-19 15:22:17 UTC], ["updated_at", 2017-01-19 15:22:17 UTC]]
|
132
|
-
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "hertz_notifications" ("type", "receiver_type", "receiver_id", "read_at", "created_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["type", "Hertz::Notification"], ["receiver_type", "User"], ["receiver_id", 1], ["read_at", 2017-01-19 15:22:17 UTC], ["created_at", 2017-01-19 15:22:17 UTC]]
|
133
|
-
[1m[35m (0.8ms)[0m [1m[35mCOMMIT[0m
|
134
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
135
|
-
[1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "hertz_notifications" SET "read_at" = $1 WHERE "hertz_notifications"."id" = $2[0m [["read_at", nil], ["id", 1]]
|
136
|
-
[1m[35m (0.7ms)[0m [1m[35mCOMMIT[0m
|
137
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
138
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" DISABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL[0m
|
139
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
140
|
-
[1m[35m (9.8ms)[0m [1m[35mTRUNCATE TABLE "public"."users", "public"."hertz_notifications", "public"."hertz_deliveries", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;[0m
|
141
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
142
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" ENABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL[0m
|
143
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
144
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
145
|
-
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2017-01-19 15:22:17 UTC], ["updated_at", 2017-01-19 15:22:17 UTC]]
|
146
|
-
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "hertz_notifications" ("type", "receiver_type", "receiver_id", "created_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["type", "Hertz::Notification"], ["receiver_type", "User"], ["receiver_id", 1], ["created_at", 2017-01-19 15:22:17 UTC]]
|
147
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
148
|
-
[1m[36mHertz::Delivery Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "hertz_deliveries" WHERE "hertz_deliveries"."notification_id" = $1 AND "hertz_deliveries"."courier" = $2 LIMIT $3[0m [["notification_id", 1], ["courier", :test], ["LIMIT", 1]]
|
149
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
150
|
-
[1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "hertz_deliveries" ("notification_id", "courier", "created_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["notification_id", 1], ["courier", "test"], ["created_at", 2017-01-19 15:22:17 UTC]]
|
151
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
152
|
-
[1m[36mHertz::Delivery Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "hertz_deliveries" WHERE "hertz_deliveries"."notification_id" = $1 AND "hertz_deliveries"."courier" = $2 LIMIT $3[0m [["notification_id", 1], ["courier", :test], ["LIMIT", 1]]
|
153
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
154
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" DISABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL[0m
|
155
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
156
|
-
[1m[35m (7.6ms)[0m [1m[35mTRUNCATE TABLE "public"."users", "public"."hertz_notifications", "public"."hertz_deliveries", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;[0m
|
157
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
158
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" ENABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL[0m
|
159
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
160
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
161
|
-
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2017-01-19 15:22:17 UTC], ["updated_at", 2017-01-19 15:22:17 UTC]]
|
162
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
163
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
164
|
-
[1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "hertz_notifications" ("type", "receiver_type", "receiver_id", "meta", "created_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["type", "Hertz::TestNotification"], ["receiver_type", "User"], ["receiver_id", 1], ["meta", "\"foo\"=>\"bar\""], ["created_at", 2017-01-19 15:22:17 UTC]]
|
165
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
166
|
-
[1m[36mHertz::Notification Load (0.2ms)[0m [1m[34mSELECT "hertz_notifications".* FROM "hertz_notifications" WHERE "hertz_notifications"."receiver_id" = $1 AND "hertz_notifications"."receiver_type" = $2 ORDER BY "hertz_notifications"."id" DESC LIMIT $3[0m [["receiver_id", 1], ["receiver_type", "User"], ["LIMIT", 1]]
|
167
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
168
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" DISABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL[0m
|
169
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
170
|
-
[1m[35m (7.3ms)[0m [1m[35mTRUNCATE TABLE "public"."users", "public"."hertz_notifications", "public"."hertz_deliveries", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;[0m
|
171
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
172
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" ENABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL[0m
|
173
|
-
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
174
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
175
|
-
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2017-01-19 15:22:17 UTC], ["updated_at", 2017-01-19 15:22:17 UTC]]
|
176
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
177
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "hertz_notifications" WHERE "hertz_notifications"."receiver_id" = $1 AND "hertz_notifications"."receiver_type" = $2[0m [["receiver_id", 1], ["receiver_type", "User"]]
|
178
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
179
|
-
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "hertz_notifications" ("type", "receiver_type", "receiver_id", "meta", "created_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["type", "Hertz::TestNotification"], ["receiver_type", "User"], ["receiver_id", 1], ["meta", "\"foo\"=>\"bar\""], ["created_at", 2017-01-19 15:22:17 UTC]]
|
180
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
181
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "hertz_notifications" WHERE "hertz_notifications"."receiver_id" = $1 AND "hertz_notifications"."receiver_type" = $2[0m [["receiver_id", 1], ["receiver_type", "User"]]
|
182
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
183
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" DISABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL[0m
|
184
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
185
|
-
[1m[35m (7.1ms)[0m [1m[35mTRUNCATE TABLE "public"."users", "public"."hertz_notifications", "public"."hertz_deliveries", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;[0m
|
186
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
187
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" ENABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL[0m
|
188
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
189
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
190
|
-
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2017-01-19 15:22:17 UTC], ["updated_at", 2017-01-19 15:22:17 UTC]]
|
191
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
192
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "hertz_notifications" WHERE "hertz_notifications"."receiver_id" = $1 AND "hertz_notifications"."receiver_type" = $2[0m [["receiver_id", 1], ["receiver_type", "User"]]
|
193
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
194
|
-
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "hertz_notifications" ("type", "receiver_type", "receiver_id", "created_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["type", "Hertz::TestNotification"], ["receiver_type", "User"], ["receiver_id", 1], ["created_at", 2017-01-19 15:22:17 UTC]]
|
195
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
196
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "hertz_notifications" WHERE "hertz_notifications"."receiver_id" = $1 AND "hertz_notifications"."receiver_type" = $2[0m [["receiver_id", 1], ["receiver_type", "User"]]
|
197
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
198
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" DISABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL[0m
|
199
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
200
|
-
[1m[35m (8.1ms)[0m [1m[35mTRUNCATE TABLE "public"."users", "public"."hertz_notifications", "public"."hertz_deliveries", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;[0m
|
201
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
202
|
-
[1m[35m (0.3ms)[0m [1m[35mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" ENABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL[0m
|
203
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
204
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
205
|
-
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2017-01-19 15:22:17 UTC], ["updated_at", 2017-01-19 15:22:17 UTC]]
|
206
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
207
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
208
|
-
[1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "hertz_notifications" ("type", "receiver_type", "receiver_id", "created_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["type", "Hertz::Notification"], ["receiver_type", "User"], ["receiver_id", 1], ["created_at", 2017-01-19 15:22:17 UTC]]
|
209
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
210
|
-
[1m[36mHertz::Notification Load (0.1ms)[0m [1m[34mSELECT "hertz_notifications".* FROM "hertz_notifications" WHERE "hertz_notifications"."receiver_id" = $1 AND "hertz_notifications"."receiver_type" = $2[0m [["receiver_id", 1], ["receiver_type", "User"]]
|
211
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
212
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" DISABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL[0m
|
213
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
214
|
-
[1m[35m (8.6ms)[0m [1m[35mTRUNCATE TABLE "public"."users", "public"."hertz_notifications", "public"."hertz_deliveries", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;[0m
|
215
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
216
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "hertz_notifications" ENABLE TRIGGER ALL;ALTER TABLE "hertz_deliveries" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL[0m
|
217
|
-
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
data/spec/examples.txt
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
example_id | status | run_time |
|
2
|
-
---------------------------------------------------- | ------ | --------------- |
|
3
|
-
./spec/hertz/hertz_spec.rb[1:1:1] | passed | 0.01802 seconds |
|
4
|
-
./spec/hertz/notifiable_spec.rb[1:1:1] | passed | 0.019 seconds |
|
5
|
-
./spec/hertz/notifiable_spec.rb[1:2:1:1] | passed | 0.01679 seconds |
|
6
|
-
./spec/hertz/notifiable_spec.rb[1:2:2:1] | passed | 0.01536 seconds |
|
7
|
-
./spec/hertz/notifiable_spec.rb[1:2:2:2] | passed | 0.01861 seconds |
|
8
|
-
./spec/hertz/notification_deliverer_spec.rb[1:1:1] | passed | 0.03229 seconds |
|
9
|
-
./spec/hertz/notification_deliverer_spec.rb[1:1:2:1] | passed | 0.03891 seconds |
|
10
|
-
./spec/hertz/notification_deliverer_spec.rb[1:1:2:2] | passed | 0.01805 seconds |
|
11
|
-
./spec/models/hertz/delivery_spec.rb[1:1] | passed | 0.01182 seconds |
|
12
|
-
./spec/models/hertz/delivery_spec.rb[1:2] | passed | 0.23544 seconds |
|
13
|
-
./spec/models/hertz/notification_spec.rb[1:1:1] | passed | 0.01033 seconds |
|
14
|
-
./spec/models/hertz/notification_spec.rb[1:2:1] | passed | 0.0108 seconds |
|
15
|
-
./spec/models/hertz/notification_spec.rb[1:3:1] | passed | 0.01516 seconds |
|
16
|
-
./spec/models/hertz/notification_spec.rb[1:4:1] | passed | 0.02185 seconds |
|
17
|
-
./spec/models/hertz/notification_spec.rb[1:5:1] | passed | 0.02218 seconds |
|
18
|
-
./spec/models/hertz/notification_spec.rb[1:6:1] | passed | 0.02557 seconds |
|
19
|
-
./spec/models/hertz/notification_spec.rb[1:7:1] | passed | 0.01615 seconds |
|
20
|
-
./spec/models/hertz/notification_spec.rb[1:8] | passed | 0.02893 seconds |
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
module Hertz
|
3
|
-
RSpec.describe Delivery do
|
4
|
-
subject { build_stubbed(:delivery) }
|
5
|
-
|
6
|
-
%w(notification courier).each do |attribute|
|
7
|
-
it "validates the presence of #{attribute}" do
|
8
|
-
expect(subject).to validate_presence_of(attribute)
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|