timeful 1.0.0 → 1.1.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: 7c555ab86512061afa72116a2d3c6592ff20301f
4
- data.tar.gz: de977270d049f3d14e4642848d0ff4da36fe3eab
3
+ metadata.gz: 20755247404f8c6000c30698ed23a7feb91c3813
4
+ data.tar.gz: 7ecce79736008b10d33f9e597c5f991b8094441a
5
5
  SHA512:
6
- metadata.gz: edb2c6b1c162b8e08b23dd2fafdd2651e9af2bd42751d6d3e4ab06ae584e31343feab39172513c0f52fd2f589a508badfc279fbae47f630865086857fcd92c4c
7
- data.tar.gz: 812e1dfd057b5cae6cf8a366b7c3b7ccb5f46980096a14c03a6c7ca8c15d115f64fd6f2919046b16b007a693b2b47d7b19232d93c24315295b3e47d846b1b4a8
6
+ metadata.gz: 14f7ad8b622872f9090ecc5edbe59e70d11a4d5033fe6e55b5d7abfc5459542944dc1e8383aee8577f27ba56e4219c625d1e83041271f261f16c05e87cb15360
7
+ data.tar.gz: cf6a524b2cb7579be3a168f1b1ad43aab8af66aeaa75417ef4691d4b9c87cf22007cbb97809a949e7b10bb098ac03385fc8c24bce1e265c5e681e2ba6f87f9f5
@@ -0,0 +1,13 @@
1
+ class ChangeForeignIdsToString < ActiveRecord::Migration
2
+ def up
3
+ change_column :timeful_feed_items, :subscriber_id, :string
4
+ change_column :timeful_activities, :actor_id, :string
5
+ change_column :timeful_activities, :object_id, :string
6
+ end
7
+
8
+ def down
9
+ change_column :timeful_feed_items, :subscriber_id, :integer
10
+ change_column :timeful_activities, :actor_id, :integer
11
+ change_column :timeful_activities, :object_id, :integer
12
+ end
13
+ end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Timeful
3
- VERSION = '1.0.0'
3
+ VERSION = '1.1.0'
4
4
  end
@@ -0,0 +1,14 @@
1
+ # This migration comes from timeful (originally 20160928113515)
2
+ class ChangeForeignIdsToString < ActiveRecord::Migration
3
+ def up
4
+ change_column :timeful_feed_items, :subscriber_id, :string
5
+ change_column :timeful_activities, :actor_id, :string
6
+ change_column :timeful_activities, :object_id, :string
7
+ end
8
+
9
+ def down
10
+ change_column :timeful_feed_items, :subscriber_id, :integer
11
+ change_column :timeful_activities, :actor_id, :integer
12
+ change_column :timeful_activities, :object_id, :integer
13
+ end
14
+ end
@@ -10,7 +10,7 @@
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(version: 20160928104634) do
13
+ ActiveRecord::Schema.define(version: 20160928113645) do
14
14
 
15
15
  # These are extensions that must be enabled in order to support this database
16
16
  enable_extension "plpgsql"
@@ -23,9 +23,9 @@ ActiveRecord::Schema.define(version: 20160928104634) do
23
23
  create_table "timeful_activities", force: :cascade do |t|
24
24
  t.string "type", null: false
25
25
  t.string "object_type", null: false
26
- t.integer "object_id", null: false
26
+ t.string "object_id", null: false
27
27
  t.string "actor_type", null: false
28
- t.integer "actor_id", null: false
28
+ t.string "actor_id", null: false
29
29
  t.datetime "created_at", null: false
30
30
  t.datetime "updated_at", null: false
31
31
  t.index ["actor_type", "actor_id"], name: "index_timeful_activities_on_actor_type_and_actor_id", using: :btree
@@ -34,7 +34,7 @@ ActiveRecord::Schema.define(version: 20160928104634) do
34
34
 
35
35
  create_table "timeful_feed_items", force: :cascade do |t|
36
36
  t.string "subscriber_type", null: false
37
- t.integer "subscriber_id", null: false
37
+ t.string "subscriber_id", null: false
38
38
  t.integer "activity_id", null: false
39
39
  t.datetime "created_at", null: false
40
40
  t.datetime "updated_at", null: false
@@ -421,4 +421,79 @@ WHERE c.contype = 'f'
421
421
  AND t1.relname = 'users'
422
422
  AND t3.nspname = ANY (current_schemas(false))
423
423
  ORDER BY c.conname
424
+ 
425
+  (0.4ms) SELECT pg_try_advisory_lock(339456620476877820);
426
+ ActiveRecord::SchemaMigration Load (1.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
427
+ Migrating to ChangeForeignIdsToString (20160928113645)
428
+  (0.3ms) BEGIN
429
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
430
+
431
+ class ChangeForeignIdsToString < ActiveRecord::Migration[4.2] (called from load at /home/alessandro/.rvm/gems/ruby-2.3.1@timeful/bin/rake:23)
432
+  (1.4ms) ALTER TABLE "feed_items" ALTER COLUMN "subscriber_id" TYPE character varying
433
+  (0.3ms) ROLLBACK
434
+  (0.4ms) SELECT pg_advisory_unlock(339456620476877820)
435
+  (0.4ms) SELECT pg_try_advisory_lock(339456620476877820);
436
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
437
+ Migrating to ChangeForeignIdsToString (20160928113645)
438
+  (0.2ms) BEGIN
439
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
440
+
441
+ class ChangeForeignIdsToString < ActiveRecord::Migration[4.2] (called from load at /home/alessandro/.rvm/gems/ruby-2.3.1@timeful/bin/rake:23)
442
+  (50.1ms) ALTER TABLE "timeful_feed_items" ALTER COLUMN "subscriber_id" TYPE character varying
443
+  (30.0ms) ALTER TABLE "timeful_activities" ALTER COLUMN "actor_id" TYPE character varying
444
+  (18.5ms) ALTER TABLE "timeful_activities" ALTER COLUMN "object_id" TYPE character varying
445
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20160928113645"]]
446
+  (6.1ms) COMMIT
447
+ ActiveRecord::InternalMetadata Load (2.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", :environment], ["LIMIT", 1]]
448
+  (0.4ms) BEGIN
449
+  (0.4ms) COMMIT
450
+  (0.6ms) SELECT pg_advisory_unlock(339456620476877820)
451
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
452
+  (2.5ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
453
+ FROM pg_constraint c
454
+ JOIN pg_class t1 ON c.conrelid = t1.oid
455
+ JOIN pg_class t2 ON c.confrelid = t2.oid
456
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
457
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
458
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
459
+ WHERE c.contype = 'f'
460
+ AND t1.relname = 'posts'
461
+ AND t3.nspname = ANY (current_schemas(false))
462
+ ORDER BY c.conname
463
+ 
464
+  (2.3ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
465
+ FROM pg_constraint c
466
+ JOIN pg_class t1 ON c.conrelid = t1.oid
467
+ JOIN pg_class t2 ON c.confrelid = t2.oid
468
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
469
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
470
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
471
+ WHERE c.contype = 'f'
472
+ AND t1.relname = 'timeful_activities'
473
+ AND t3.nspname = ANY (current_schemas(false))
474
+ ORDER BY c.conname
475
+ 
476
+  (2.4ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
477
+ FROM pg_constraint c
478
+ JOIN pg_class t1 ON c.conrelid = t1.oid
479
+ JOIN pg_class t2 ON c.confrelid = t2.oid
480
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
481
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
482
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
483
+ WHERE c.contype = 'f'
484
+ AND t1.relname = 'timeful_feed_items'
485
+ AND t3.nspname = ANY (current_schemas(false))
486
+ ORDER BY c.conname
487
+ 
488
+  (2.3ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
489
+ FROM pg_constraint c
490
+ JOIN pg_class t1 ON c.conrelid = t1.oid
491
+ JOIN pg_class t2 ON c.confrelid = t2.oid
492
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
493
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
494
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
495
+ WHERE c.contype = 'f'
496
+ AND t1.relname = 'users'
497
+ AND t3.nspname = ANY (current_schemas(false))
498
+ ORDER BY c.conname
424
499
  
@@ -4085,3 +4085,185 @@ FOREIGN KEY ("activity_id")
4085
4085
   (0.2ms) BEGIN
4086
4086
   (0.5ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "posts" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "timeful_activities" ENABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" ENABLE TRIGGER ALL
4087
4087
   (0.9ms) COMMIT
4088
+ ActiveRecord::SchemaMigration Load (2.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
4089
+ ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
4090
+  (5.3ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", :environment]]
4091
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
4092
+ ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
4093
+  (0.3ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", :environment]]
4094
+ ActiveRecord::InternalMetadata Load (0.6ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", :environment], ["LIMIT", 1]]
4095
+  (0.3ms) BEGIN
4096
+ SQL (0.7ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "test"], ["created_at", 2016-09-28 11:39:09 UTC], ["updated_at", 2016-09-28 11:39:09 UTC]]
4097
+  (2.7ms) COMMIT
4098
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
4099
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
4100
+  (0.5ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", :environment]]
4101
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
4102
+  (0.4ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", :environment]]
4103
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
4104
+  (0.4ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", :environment]]
4105
+  (122.4ms) DROP DATABASE IF EXISTS "timeful_test"
4106
+  (455.5ms) CREATE DATABASE "timeful_test" ENCODING = 'utf8'
4107
+ SQL (0.8ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
4108
+  (9.8ms) CREATE TABLE "posts" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4109
+  (11.4ms) CREATE TABLE "timeful_activities" ("id" serial primary key, "type" character varying NOT NULL, "object_type" character varying NOT NULL, "object_id" character varying NOT NULL, "actor_type" character varying NOT NULL, "actor_id" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4110
+  (6.0ms) CREATE INDEX "index_timeful_activities_on_actor_type_and_actor_id" ON "timeful_activities" USING btree ("actor_type", "actor_id")
4111
+  (5.9ms) CREATE INDEX "index_timeful_activities_on_object_type_and_object_id" ON "timeful_activities" USING btree ("object_type", "object_id")
4112
+  (11.2ms) CREATE TABLE "timeful_feed_items" ("id" serial primary key, "subscriber_type" character varying NOT NULL, "subscriber_id" character varying NOT NULL, "activity_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4113
+  (3.4ms) CREATE INDEX "index_timeful_feed_items_on_subscriber_type_and_subscriber_id" ON "timeful_feed_items" USING btree ("subscriber_type", "subscriber_id")
4114
+  (4.2ms) CREATE TABLE "users" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4115
+  (2.8ms) ALTER TABLE "timeful_feed_items" ADD CONSTRAINT "fk_rails_9bc442415c"
4116
+ FOREIGN KEY ("activity_id")
4117
+ REFERENCES "timeful_activities" ("id")
4118
+ ON DELETE CASCADE
4119
+  (5.8ms) CREATE TABLE "schema_migrations" ("version" character varying PRIMARY KEY)
4120
+  (0.5ms) SELECT version FROM "schema_migrations"
4121
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20160928113645')
4122
+  (0.9ms) INSERT INTO schema_migrations (version) VALUES ('20160927160031'), ('20160928104634'), ('20160927141815'), ('20160927155215'), ('20160927160026');
4123
+
4124
+ 
4125
+  (6.8ms) CREATE TABLE "ar_internal_metadata" ("key" character varying PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4126
+ ActiveRecord::InternalMetadata Load (0.6ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", :environment], ["LIMIT", 1]]
4127
+  (0.4ms) BEGIN
4128
+ SQL (0.7ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "test"], ["created_at", 2016-09-28 11:39:36 UTC], ["updated_at", 2016-09-28 11:39:36 UTC]]
4129
+  (1.3ms) COMMIT
4130
+ 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]]
4131
+  (0.3ms) BEGIN
4132
+  (0.3ms) COMMIT
4133
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
4134
+  (0.2ms) BEGIN
4135
+  (0.7ms) ALTER TABLE "posts" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "timeful_activities" DISABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL
4136
+  (1.1ms) COMMIT
4137
+  (1.8ms)  SELECT schemaname || '.' || tablename
4138
+ FROM pg_tables
4139
+ WHERE
4140
+ tablename !~ '_prt_' AND
4141
+ tablename <> 'schema_migrations' AND
4142
+ schemaname = ANY (current_schemas(false))
4143
+ 
4144
+  (1.1ms) select table_name from information_schema.views where table_schema = 'timeful_test'
4145
+  (28.6ms) TRUNCATE TABLE "public"."posts", "public"."users", "public"."timeful_activities", "public"."timeful_feed_items", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;
4146
+  (0.2ms) BEGIN
4147
+  (0.4ms) ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "timeful_activities" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "posts" ENABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL
4148
+  (0.9ms) COMMIT
4149
+  (0.3ms) BEGIN
4150
+  (0.6ms) ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "timeful_activities" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "posts" DISABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL
4151
+  (1.4ms) COMMIT
4152
+  (20.7ms) TRUNCATE TABLE "public"."posts", "public"."users", "public"."timeful_activities", "public"."timeful_feed_items", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;
4153
+  (0.3ms) BEGIN
4154
+  (0.6ms) ALTER TABLE "posts" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "timeful_activities" ENABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL
4155
+  (1.2ms) COMMIT
4156
+  (0.4ms) BEGIN
4157
+  (0.6ms) ALTER TABLE "posts" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "timeful_activities" DISABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL
4158
+  (1.3ms) COMMIT
4159
+  (21.6ms) TRUNCATE TABLE "public"."posts", "public"."users", "public"."timeful_activities", "public"."timeful_feed_items", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;
4160
+  (0.5ms) BEGIN
4161
+  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "posts" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "timeful_activities" ENABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL
4162
+  (1.2ms) COMMIT
4163
+  (0.2ms) BEGIN
4164
+  (0.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "posts" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "timeful_activities" DISABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL
4165
+  (1.3ms) COMMIT
4166
+  (45.8ms) TRUNCATE TABLE "public"."posts", "public"."users", "public"."timeful_activities", "public"."timeful_feed_items", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;
4167
+  (0.2ms) BEGIN
4168
+  (0.4ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "posts" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "timeful_activities" ENABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL
4169
+  (1.4ms) COMMIT
4170
+  (0.3ms) BEGIN
4171
+  (0.6ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "posts" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "timeful_activities" DISABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL
4172
+  (1.0ms) COMMIT
4173
+  (17.2ms) TRUNCATE TABLE "public"."posts", "public"."users", "public"."timeful_activities", "public"."timeful_feed_items", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;
4174
+  (0.4ms) BEGIN
4175
+  (0.5ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "posts" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "timeful_activities" ENABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL
4176
+  (1.0ms) COMMIT
4177
+  (0.1ms) BEGIN
4178
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", 2016-09-28 11:39:37 UTC], ["updated_at", 2016-09-28 11:39:37 UTC]]
4179
+  (1.0ms) COMMIT
4180
+  (0.2ms) BEGIN
4181
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", 2016-09-28 11:39:37 UTC], ["updated_at", 2016-09-28 11:39:37 UTC]]
4182
+ SQL (0.5ms) INSERT INTO "posts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", 2016-09-28 11:39:37 UTC], ["updated_at", 2016-09-28 11:39:37 UTC]]
4183
+ SQL (0.9ms) INSERT INTO "timeful_activities" ("type", "object_type", "object_id", "actor_type", "actor_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["type", "PostActivity"], ["object_type", "Post"], ["object_id", "1"], ["actor_type", "User"], ["actor_id", "2"], ["created_at", 2016-09-28 11:39:37 UTC], ["updated_at", 2016-09-28 11:39:37 UTC]]
4184
+ SQL (0.8ms) INSERT INTO "timeful_feed_items" ("subscriber_type", "subscriber_id", "activity_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["subscriber_type", "User"], ["subscriber_id", "1"], ["activity_id", 1], ["created_at", 2016-09-28 11:39:37 UTC], ["updated_at", 2016-09-28 11:39:37 UTC]]
4185
+  (0.9ms) COMMIT
4186
+  (0.3ms) BEGIN
4187
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", 2016-09-28 11:39:37 UTC], ["updated_at", 2016-09-28 11:39:37 UTC]]
4188
+ SQL (0.4ms) INSERT INTO "posts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", 2016-09-28 11:39:37 UTC], ["updated_at", 2016-09-28 11:39:37 UTC]]
4189
+ SQL (0.5ms) INSERT INTO "timeful_activities" ("type", "object_type", "object_id", "actor_type", "actor_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["type", "PostActivity"], ["object_type", "Post"], ["object_id", "2"], ["actor_type", "User"], ["actor_id", "3"], ["created_at", 2016-09-28 11:39:37 UTC], ["updated_at", 2016-09-28 11:39:37 UTC]]
4190
+ SQL (0.6ms) INSERT INTO "timeful_feed_items" ("subscriber_type", "subscriber_id", "activity_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["subscriber_type", "User"], ["subscriber_id", "1"], ["activity_id", 2], ["created_at", 2016-09-28 11:39:37 UTC], ["updated_at", 2016-09-28 11:39:37 UTC]]
4191
+  (3.8ms) COMMIT
4192
+ Timeful::FeedItem Load (0.4ms) SELECT "timeful_feed_items".* FROM "timeful_feed_items" WHERE "timeful_feed_items"."subscriber_id" = $1 AND "timeful_feed_items"."subscriber_type" = $2 ORDER BY "timeful_feed_items"."created_at" DESC [["subscriber_id", "1"], ["subscriber_type", "User"]]
4193
+  (0.1ms) BEGIN
4194
+  (0.3ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "posts" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "timeful_activities" DISABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL
4195
+  (1.1ms) COMMIT
4196
+  (19.8ms) TRUNCATE TABLE "public"."posts", "public"."users", "public"."timeful_activities", "public"."timeful_feed_items", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;
4197
+  (0.2ms) BEGIN
4198
+  (0.4ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "posts" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "timeful_activities" ENABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL
4199
+  (0.9ms) COMMIT
4200
+  (0.1ms) BEGIN
4201
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", 2016-09-28 11:39:37 UTC], ["updated_at", 2016-09-28 11:39:37 UTC]]
4202
+  (0.9ms) COMMIT
4203
+  (0.2ms) BEGIN
4204
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", 2016-09-28 11:39:37 UTC], ["updated_at", 2016-09-28 11:39:37 UTC]]
4205
+ SQL (0.5ms) INSERT INTO "posts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", 2016-09-28 11:39:37 UTC], ["updated_at", 2016-09-28 11:39:37 UTC]]
4206
+ SQL (0.6ms) INSERT INTO "timeful_activities" ("type", "object_type", "object_id", "actor_type", "actor_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["type", "PostActivity"], ["object_type", "Post"], ["object_id", "1"], ["actor_type", "User"], ["actor_id", "2"], ["created_at", 2016-09-28 11:39:37 UTC], ["updated_at", 2016-09-28 11:39:37 UTC]]
4207
+ SQL (0.7ms) INSERT INTO "timeful_feed_items" ("subscriber_type", "subscriber_id", "activity_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["subscriber_type", "User"], ["subscriber_id", "1"], ["activity_id", 1], ["created_at", 2016-09-28 11:39:37 UTC], ["updated_at", 2016-09-28 11:39:37 UTC]]
4208
+  (1.1ms) COMMIT
4209
+ Timeful::FeedItem Load (0.5ms) SELECT "timeful_feed_items".* FROM "timeful_feed_items" WHERE "timeful_feed_items"."subscriber_id" = $1 AND "timeful_feed_items"."subscriber_type" = $2 ORDER BY "timeful_feed_items"."created_at" DESC [["subscriber_id", "1"], ["subscriber_type", "User"]]
4210
+  (0.1ms) BEGIN
4211
+  (0.5ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "posts" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "timeful_activities" DISABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL
4212
+  (0.9ms) COMMIT
4213
+  (28.9ms) TRUNCATE TABLE "public"."posts", "public"."users", "public"."timeful_activities", "public"."timeful_feed_items", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;
4214
+  (0.2ms) BEGIN
4215
+  (0.4ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "posts" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "timeful_activities" ENABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL
4216
+  (1.0ms) COMMIT
4217
+  (0.7ms) SELECT COUNT(*) FROM "timeful_activities" WHERE "timeful_activities"."type" IN ('PostActivity')
4218
+  (0.3ms) BEGIN
4219
+ SQL (0.7ms) INSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", 2016-09-28 11:39:37 UTC], ["updated_at", 2016-09-28 11:39:37 UTC]]
4220
+  (1.1ms) COMMIT
4221
+  (0.3ms) BEGIN
4222
+ SQL (0.7ms) INSERT INTO "posts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", 2016-09-28 11:39:37 UTC], ["updated_at", 2016-09-28 11:39:37 UTC]]
4223
+  (1.2ms) COMMIT
4224
+  (1.6ms) BEGIN
4225
+ SQL (1.0ms) INSERT INTO "timeful_activities" ("type", "object_type", "object_id", "actor_type", "actor_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["type", "PostActivity"], ["object_type", "Post"], ["object_id", "1"], ["actor_type", "User"], ["actor_id", "1"], ["created_at", 2016-09-28 11:39:37 UTC], ["updated_at", 2016-09-28 11:39:37 UTC]]
4226
+  (3.3ms) COMMIT
4227
+ [ActiveJob] Enqueued Timeful::DeliverActivityToSubscribersJob (Job ID: b805c268-6789-4ecc-939f-df6ede930486) to Test(timeful) with arguments: #<GlobalID:0x00000003c8aa48 @uri=#<URI::GID gid://dummy/PostActivity/1>>
4228
+  (2.4ms) SELECT COUNT(*) FROM "timeful_activities" WHERE "timeful_activities"."type" IN ('PostActivity')
4229
+  (0.3ms) BEGIN
4230
+  (0.5ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "posts" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "timeful_activities" DISABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL
4231
+  (1.0ms) COMMIT
4232
+  (17.1ms) TRUNCATE TABLE "public"."posts", "public"."users", "public"."timeful_activities", "public"."timeful_feed_items", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;
4233
+  (0.3ms) BEGIN
4234
+  (0.5ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "posts" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "timeful_activities" ENABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL
4235
+  (0.9ms) COMMIT
4236
+  (0.2ms) BEGIN
4237
+ SQL (0.7ms) INSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", 2016-09-28 11:39:37 UTC], ["updated_at", 2016-09-28 11:39:37 UTC]]
4238
+  (0.9ms) COMMIT
4239
+  (0.3ms) BEGIN
4240
+ SQL (0.7ms) INSERT INTO "posts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", 2016-09-28 11:39:37 UTC], ["updated_at", 2016-09-28 11:39:37 UTC]]
4241
+  (1.0ms) COMMIT
4242
+  (0.3ms) BEGIN
4243
+ SQL (0.9ms) INSERT INTO "timeful_activities" ("type", "object_type", "object_id", "actor_type", "actor_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["type", "PostActivity"], ["object_type", "Post"], ["object_id", "1"], ["actor_type", "User"], ["actor_id", "1"], ["created_at", 2016-09-28 11:39:37 UTC], ["updated_at", 2016-09-28 11:39:37 UTC]]
4244
+  (0.8ms) COMMIT
4245
+ [ActiveJob] Enqueued Timeful::DeliverActivityToSubscribersJob (Job ID: 7a434b41-82f7-40b2-8783-32f1bb7aa816) to Test(timeful) with arguments: #<GlobalID:0x00000003bfb690 @uri=#<URI::GID gid://dummy/PostActivity/1>>
4246
+ PostActivity Load (0.5ms) SELECT "timeful_activities".* FROM "timeful_activities" WHERE "timeful_activities"."type" IN ('PostActivity') AND "timeful_activities"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
4247
+  (0.3ms) BEGIN
4248
+  (0.4ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "posts" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "timeful_activities" DISABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL
4249
+  (0.9ms) COMMIT
4250
+  (27.7ms) TRUNCATE TABLE "public"."posts", "public"."users", "public"."timeful_activities", "public"."timeful_feed_items", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;
4251
+  (1.1ms) BEGIN
4252
+  (0.4ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "posts" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "timeful_activities" ENABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL
4253
+  (0.9ms) COMMIT
4254
+  (0.1ms) BEGIN
4255
+  (0.4ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "posts" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "timeful_activities" DISABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL
4256
+  (0.9ms) COMMIT
4257
+  (26.7ms) TRUNCATE TABLE "public"."posts", "public"."users", "public"."timeful_activities", "public"."timeful_feed_items", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;
4258
+  (0.2ms) BEGIN
4259
+  (0.4ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "posts" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "timeful_activities" ENABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL
4260
+  (0.7ms) COMMIT
4261
+ [ActiveJob] [Timeful::DeliverActivityToSubscribersJob] [4ec9c90d-415a-456e-9af8-2fa782eff639] Performing Timeful::DeliverActivityToSubscribersJob from Test(timeful) with arguments: #<GlobalID:0x000000039dc378 @uri=#<URI::GID gid://dummy/Timeful::Activity/1009>>
4262
+ [ActiveJob] [Timeful::DeliverActivityToSubscribersJob] [4ec9c90d-415a-456e-9af8-2fa782eff639] Performed Timeful::DeliverActivityToSubscribersJob from Test(timeful) in 0.2ms
4263
+  (0.2ms) BEGIN
4264
+  (0.4ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "posts" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "timeful_activities" DISABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL
4265
+  (0.7ms) COMMIT
4266
+  (24.5ms) TRUNCATE TABLE "public"."posts", "public"."users", "public"."timeful_activities", "public"."timeful_feed_items", "public"."ar_internal_metadata" RESTART IDENTITY CASCADE;
4267
+  (0.6ms) BEGIN
4268
+  (0.9ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "posts" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "timeful_activities" ENABLE TRIGGER ALL;ALTER TABLE "timeful_feed_items" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL
4269
+  (3.6ms) COMMIT
data/spec/examples.txt CHANGED
@@ -1,12 +1,12 @@
1
1
  example_id | status | run_time |
2
2
  -------------------------------------------------------------------- | ------ | --------------- |
3
- ./spec/jobs/timeful/deliver_activity_to_subscribers_job_spec.rb[1:1] | passed | 0.0694 seconds |
4
- ./spec/models/timeful/activity_spec.rb[1:1] | passed | 0.06165 seconds |
5
- ./spec/models/timeful/feed_item_spec.rb[1:1] | passed | 0.03044 seconds |
6
- ./spec/timeful/model/actor_spec.rb[1:1:1] | passed | 0.07158 seconds |
7
- ./spec/timeful/model/actor_spec.rb[1:1:2] | passed | 0.06022 seconds |
8
- ./spec/timeful/model/subscriber_spec.rb[1:1:1] | passed | 0.07702 seconds |
9
- ./spec/timeful/model/subscriber_spec.rb[1:1:2] | passed | 0.16866 seconds |
10
- ./spec/timeful/relation_proxy_spec.rb[1:1:1:1] | passed | 0.02756 seconds |
11
- ./spec/timeful/relation_proxy_spec.rb[1:1:2:1] | passed | 0.05994 seconds |
12
- ./spec/timeful/timeful_spec.rb[1:1:1] | passed | 0.02453 seconds |
3
+ ./spec/jobs/timeful/deliver_activity_to_subscribers_job_spec.rb[1:1] | passed | 0.04836 seconds |
4
+ ./spec/models/timeful/activity_spec.rb[1:1] | passed | 0.09059 seconds |
5
+ ./spec/models/timeful/feed_item_spec.rb[1:1] | passed | 0.03481 seconds |
6
+ ./spec/timeful/model/actor_spec.rb[1:1:1] | passed | 0.07676 seconds |
7
+ ./spec/timeful/model/actor_spec.rb[1:1:2] | passed | 0.05446 seconds |
8
+ ./spec/timeful/model/subscriber_spec.rb[1:1:1] | passed | 0.06242 seconds |
9
+ ./spec/timeful/model/subscriber_spec.rb[1:1:2] | passed | 0.08846 seconds |
10
+ ./spec/timeful/relation_proxy_spec.rb[1:1:1:1] | passed | 0.03358 seconds |
11
+ ./spec/timeful/relation_proxy_spec.rb[1:1:2:1] | passed | 0.03147 seconds |
12
+ ./spec/timeful/timeful_spec.rb[1:1:1] | passed | 0.05844 seconds |
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timeful
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Desantis
@@ -174,6 +174,7 @@ files:
174
174
  - db/migrate/20160927141608_create_timeful_activities.rb
175
175
  - db/migrate/20160927154912_create_timeful_feed_items.rb
176
176
  - db/migrate/20160928104602_rename_feedable_to_subscriber_in_feed_items.rb
177
+ - db/migrate/20160928113515_change_foreign_ids_to_string.rb
177
178
  - lib/generators/timeful/install_generator.rb
178
179
  - lib/timeful.rb
179
180
  - lib/timeful/engine.rb
@@ -221,6 +222,7 @@ files:
221
222
  - spec/dummy/db/migrate/20160927160026_create_users.rb
222
223
  - spec/dummy/db/migrate/20160927160031_create_posts.rb
223
224
  - spec/dummy/db/migrate/20160928104634_rename_feedable_to_subscriber_in_feed_items.timeful.rb
225
+ - spec/dummy/db/migrate/20160928113645_change_foreign_ids_to_string.timeful.rb
224
226
  - spec/dummy/db/schema.rb
225
227
  - spec/dummy/log/development.log
226
228
  - spec/dummy/log/test.log
@@ -292,6 +294,7 @@ test_files:
292
294
  - spec/examples.txt
293
295
  - spec/rails_helper.rb
294
296
  - spec/dummy/db/migrate/20160927160031_create_posts.rb
297
+ - spec/dummy/db/migrate/20160928113645_change_foreign_ids_to_string.timeful.rb
295
298
  - spec/dummy/db/migrate/20160928104634_rename_feedable_to_subscriber_in_feed_items.timeful.rb
296
299
  - spec/dummy/db/migrate/20160927141815_create_timeful_activities.timeful.rb
297
300
  - spec/dummy/db/migrate/20160927155215_create_timeful_feed_items.timeful.rb