has_public_id 1.1.7 → 1.1.8

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: 8ea2c8cf8863054f545e3071ba2490ef30871089
4
- data.tar.gz: 7159ac694c7f9b4fb4cd6842e86633e2830ad11c
3
+ metadata.gz: 17681068cf9fad1ccde3d640318e89bd52aa65f3
4
+ data.tar.gz: 07c0360bd448332778f07c3951294a9834632473
5
5
  SHA512:
6
- metadata.gz: 6a5b671ee2443a836c2cb66c34fd6f58556ec635ff76320c710926fc67404a021a65248cf305d72740c6f6e1c17d0539b9390836ce45167c6258e5f350340d82
7
- data.tar.gz: dd67c146b0b2ed87618b65026675318a7eb77e74f400ac08343b291fefe699301abc9242f7d855fd9ed746deba7b812defede538e4c69938b76018948c77ffa6
6
+ metadata.gz: 31fa3a91d4685fd1e85f24b07a0876e553928efe74d997120ed59598d30370cc197436456de4310f32f53871d7a3753682d48f0d076233903d3702ad9f9b1e03
7
+ data.tar.gz: ee1967309c8233ccd9ea209136b18a6dd57770e832f21452b3bcbcf4cef1c02921a97bace4965657f5fe41d533c95c98e72ea58fbe34b28b28b247813e983cc1
@@ -8,8 +8,10 @@ module HasPublicId
8
8
  self.class.public_id_attr
9
9
  end
10
10
  def initialize_public_id
11
- read_attribute(public_id_attr) or
12
- write_attribute(public_id_attr, self.class.new_public_id)
11
+ if has_attribute?(public_id_attr)
12
+ read_attribute(public_id_attr) or
13
+ write_attribute(public_id_attr, self.class.new_public_id)
14
+ end
13
15
  end
14
16
  end
15
17
  module Mixin
@@ -1,3 +1,3 @@
1
1
  module HasPublicId
2
- VERSION = "1.1.7"
2
+ VERSION = "1.1.8"
3
3
  end
Binary file
@@ -6448,3 +6448,702 @@ HasPublicId::UtilTest: test_new_public_id(with_nil_prefix)
6448
6448
  HasPublicId::UtilTest: test_new_public_id(with_prefix)
6449
6449
  ------------------------------------------------------
6450
6450
   (0.1ms) rollback transaction
6451
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
6452
+  (0.2ms) begin transaction
6453
+ Fixture Delete (0.9ms) DELETE FROM "users"
6454
+ Fixture Insert (1.0ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-11-22 15:05:28', '2014-11-22 15:05:28', 980190962)
6455
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-11-22 15:05:28', '2014-11-22 15:05:28', 298486374)
6456
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-11-22 15:05:28', '2014-11-22 15:05:28', 113629430)
6457
+  (1.1ms) commit transaction
6458
+  (0.1ms) begin transaction
6459
+ ----------------------------------------
6460
+ AdminTest: test_identifier_doesnt_change
6461
+ ----------------------------------------
6462
+ Admin Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-CWgjw4lQ9UHs' LIMIT 1
6463
+  (0.1ms) SAVEPOINT active_record_1
6464
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "ident", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-22 15:05:28.864804"], ["ident", "user-CWgjw4lQ9UHs"], ["updated_at", "2014-11-22 15:05:28.864804"]]
6465
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6466
+ Admin Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
6467
+  (0.1ms) SAVEPOINT active_record_1
6468
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6469
+ Admin Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
6470
+  (0.5ms) rollback transaction
6471
+  (0.1ms) begin transaction
6472
+ --------------------------------------------------
6473
+ AdminTest: test_identifier_initializes_from_parent
6474
+ --------------------------------------------------
6475
+ Admin Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-5zvK2bqpk6Cy' LIMIT 1
6476
+ Admin Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-95pQl1FB5t8p' LIMIT 1
6477
+  (0.1ms) rollback transaction
6478
+  (0.1ms) begin transaction
6479
+ --------------------------------------------------
6480
+ AdminTest: test_inherited_class_has_public_id_attr
6481
+ --------------------------------------------------
6482
+  (0.2ms) rollback transaction
6483
+  (0.1ms) begin transaction
6484
+ ---------------------------
6485
+ HasPublicIdTest: test_Mixin
6486
+ ---------------------------
6487
+  (0.1ms) rollback transaction
6488
+  (0.1ms) begin transaction
6489
+ -------------------------------------------
6490
+ HasPublicId::UtilTest: test_char_set.length
6491
+ -------------------------------------------
6492
+  (0.1ms) rollback transaction
6493
+  (0.1ms) begin transaction
6494
+ --------------------------------------------------
6495
+ HasPublicId::UtilTest: test_generate_random_suffix
6496
+ --------------------------------------------------
6497
+  (0.1ms) rollback transaction
6498
+  (0.2ms) begin transaction
6499
+ ----------------------------------------------------------
6500
+ HasPublicId::UtilTest: test_generate_random_suffix(length)
6501
+ ----------------------------------------------------------
6502
+  (0.1ms) rollback transaction
6503
+  (0.1ms) begin transaction
6504
+ ------------------------------------------------------------
6505
+ HasPublicId::UtilTest: test_new_public_id(with_blank_prefix)
6506
+ ------------------------------------------------------------
6507
+  (0.1ms) rollback transaction
6508
+  (0.1ms) begin transaction
6509
+ ------------------------------------------------------------
6510
+ HasPublicId::UtilTest: test_new_public_id(with_false_prefix)
6511
+ ------------------------------------------------------------
6512
+  (0.1ms) rollback transaction
6513
+  (0.1ms) begin transaction
6514
+ ---------------------------------------------------------
6515
+ HasPublicId::UtilTest: test_new_public_id(with_join_with)
6516
+ ---------------------------------------------------------
6517
+  (0.1ms) rollback transaction
6518
+  (0.1ms) begin transaction
6519
+ ----------------------------------------------------------
6520
+ HasPublicId::UtilTest: test_new_public_id(with_nil_prefix)
6521
+ ----------------------------------------------------------
6522
+  (0.1ms) rollback transaction
6523
+  (0.1ms) begin transaction
6524
+ ------------------------------------------------------
6525
+ HasPublicId::UtilTest: test_new_public_id(with_prefix)
6526
+ ------------------------------------------------------
6527
+  (0.1ms) rollback transaction
6528
+  (0.1ms) begin transaction
6529
+ Fixture Delete (0.4ms) DELETE FROM "users"
6530
+ Fixture Insert (0.2ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-11-22 15:05:29', '2014-11-22 15:05:29', 980190962)
6531
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-11-22 15:05:29', '2014-11-22 15:05:29', 298486374)
6532
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-11-22 15:05:29', '2014-11-22 15:05:29', 113629430)
6533
+  (1.0ms) commit transaction
6534
+  (0.0ms) begin transaction
6535
+ --------------------------------
6536
+ UserTest: test_find_by_public_id
6537
+ --------------------------------
6538
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-vb2mr89t5EWm' LIMIT 1
6539
+  (0.0ms) SAVEPOINT active_record_1
6540
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-22 15:05:29.066777"], ["ident", "user-vb2mr89t5EWm"], ["name", "joey"], ["updated_at", "2014-11-22 15:05:29.066777"]]
6541
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6542
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'user-vb2mr89t5EWm' ORDER BY "users"."id" ASC LIMIT 1
6543
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
6544
+  (0.6ms) rollback transaction
6545
+  (0.1ms) begin transaction
6546
+ ---------------------------------
6547
+ UserTest: test_find_by_public_id!
6548
+ ---------------------------------
6549
+ User Exists (0.6ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-4Dl3hM5mH0ko' LIMIT 1
6550
+  (0.1ms) SAVEPOINT active_record_1
6551
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-22 15:05:29.073656"], ["ident", "user-4Dl3hM5mH0ko"], ["name", "joey"], ["updated_at", "2014-11-22 15:05:29.073656"]]
6552
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6553
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'user-4Dl3hM5mH0ko' ORDER BY "users"."id" ASC LIMIT 1
6554
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
6555
+  (0.6ms) rollback transaction
6556
+  (0.1ms) begin transaction
6557
+ ---------------------------------------
6558
+ UserTest: test_identifier_doesnt_change
6559
+ ---------------------------------------
6560
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-LSkpcwzlNQPp' LIMIT 1
6561
+  (0.1ms) SAVEPOINT active_record_1
6562
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "ident", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-22 15:05:29.079009"], ["ident", "user-LSkpcwzlNQPp"], ["updated_at", "2014-11-22 15:05:29.079009"]]
6563
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6564
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
6565
+  (0.0ms) SAVEPOINT active_record_1
6566
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6567
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
6568
+  (0.5ms) rollback transaction
6569
+  (0.1ms) begin transaction
6570
+ -------------------------------------
6571
+ UserTest: test_identifier_initializes
6572
+ -------------------------------------
6573
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-uvKT7B6rOoQV' LIMIT 1
6574
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-p2UypYtH3vH8' LIMIT 1
6575
+  (0.1ms) rollback transaction
6576
+  (0.1ms) begin transaction
6577
+ -------------------------------------
6578
+ UserTest: test_initialize_public_ids!
6579
+ -------------------------------------
6580
+  (0.3ms) SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
6581
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."ident" IS NULL ORDER BY "users"."id" ASC LIMIT 1000
6582
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-smTFfBHclB1t' LIMIT 1
6583
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-WodIlT28IiDh' LIMIT 1
6584
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-O3vUc47p0aUt' LIMIT 1
6585
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-5qiRVFT41SQW' LIMIT 1
6586
+  (0.0ms) SAVEPOINT active_record_1
6587
+ SQL (0.5ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 113629430 [["ident", "user-5qiRVFT41SQW"], ["updated_at", "2014-11-22 15:05:29.098261"]]
6588
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6589
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-3ncYWr6EoCwV' LIMIT 1
6590
+  (0.0ms) SAVEPOINT active_record_1
6591
+ SQL (1.4ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 298486374 [["ident", "user-3ncYWr6EoCwV"], ["updated_at", "2014-11-22 15:05:29.102020"]]
6592
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6593
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-kOjHuvaOezwn' LIMIT 1
6594
+  (0.1ms) SAVEPOINT active_record_1
6595
+ SQL (0.2ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 980190962 [["ident", "user-kOjHuvaOezwn"], ["updated_at", "2014-11-22 15:05:29.105969"]]
6596
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6597
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
6598
+  (0.6ms) rollback transaction
6599
+  (0.1ms) begin transaction
6600
+ ----------------------------
6601
+ UserTest: test_new_public_id
6602
+ ----------------------------
6603
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-ddM8P2ixWO4N' LIMIT 1
6604
+  (0.1ms) rollback transaction
6605
+  (0.1ms) begin transaction
6606
+ ------------------------------------------
6607
+ UserTest: test_to_param_matches_identifier
6608
+ ------------------------------------------
6609
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-oFCVnDKFW9JT' LIMIT 1
6610
+  (0.1ms) rollback transaction
6611
+  (0.1ms) begin transaction
6612
+ -------------------------------
6613
+ UserTest: test_use_group-by_sql
6614
+ -------------------------------
6615
+ User Load (0.2ms) SELECT name, count(name) as count FROM "users" GROUP BY name
6616
+ User Load (0.1ms) SELECT "users".* FROM "users"
6617
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-z7A6WfijmWXs' LIMIT 1
6618
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-mIwaAEf1fXzi' LIMIT 1
6619
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-E2ZjCq799KcX' LIMIT 1
6620
+ User Load (0.1ms) SELECT "users".* FROM "users"
6621
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-soyNnZOwzxlL' LIMIT 1
6622
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-7a9uIt0rmjRm' LIMIT 1
6623
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-cxO2ojj7fADG' LIMIT 1
6624
+  (0.1ms) rollback transaction
6625
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
6626
+  (0.2ms) begin transaction
6627
+ Fixture Delete (0.8ms) DELETE FROM "users"
6628
+ Fixture Insert (0.8ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-11-22 15:06:03', '2014-11-22 15:06:03', 980190962)
6629
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-11-22 15:06:03', '2014-11-22 15:06:03', 298486374)
6630
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-11-22 15:06:03', '2014-11-22 15:06:03', 113629430)
6631
+  (0.9ms) commit transaction
6632
+  (0.1ms) begin transaction
6633
+ ----------------------------------------
6634
+ AdminTest: test_identifier_doesnt_change
6635
+ ----------------------------------------
6636
+ Admin Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-RsQKGsW68Kdv' LIMIT 1
6637
+  (0.1ms) SAVEPOINT active_record_1
6638
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "ident", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-22 15:06:03.357653"], ["ident", "user-RsQKGsW68Kdv"], ["updated_at", "2014-11-22 15:06:03.357653"]]
6639
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6640
+ Admin Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
6641
+  (0.1ms) SAVEPOINT active_record_1
6642
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6643
+ Admin Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
6644
+  (0.6ms) rollback transaction
6645
+  (0.1ms) begin transaction
6646
+ --------------------------------------------------
6647
+ AdminTest: test_identifier_initializes_from_parent
6648
+ --------------------------------------------------
6649
+ Admin Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-yyesTDSCSXlZ' LIMIT 1
6650
+ Admin Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-GeR7BYzJQQCW' LIMIT 1
6651
+  (0.1ms) rollback transaction
6652
+  (0.1ms) begin transaction
6653
+ --------------------------------------------------
6654
+ AdminTest: test_inherited_class_has_public_id_attr
6655
+ --------------------------------------------------
6656
+  (0.1ms) rollback transaction
6657
+  (0.1ms) begin transaction
6658
+ -------------------------------------------
6659
+ HasPublicId::UtilTest: test_char_set.length
6660
+ -------------------------------------------
6661
+  (0.1ms) rollback transaction
6662
+  (0.1ms) begin transaction
6663
+ --------------------------------------------------
6664
+ HasPublicId::UtilTest: test_generate_random_suffix
6665
+ --------------------------------------------------
6666
+  (0.1ms) rollback transaction
6667
+  (0.1ms) begin transaction
6668
+ ----------------------------------------------------------
6669
+ HasPublicId::UtilTest: test_generate_random_suffix(length)
6670
+ ----------------------------------------------------------
6671
+  (0.0ms) rollback transaction
6672
+  (0.1ms) begin transaction
6673
+ ------------------------------------------------------------
6674
+ HasPublicId::UtilTest: test_new_public_id(with_blank_prefix)
6675
+ ------------------------------------------------------------
6676
+  (0.1ms) rollback transaction
6677
+  (0.1ms) begin transaction
6678
+ ------------------------------------------------------------
6679
+ HasPublicId::UtilTest: test_new_public_id(with_false_prefix)
6680
+ ------------------------------------------------------------
6681
+  (0.1ms) rollback transaction
6682
+  (0.0ms) begin transaction
6683
+ ---------------------------------------------------------
6684
+ HasPublicId::UtilTest: test_new_public_id(with_join_with)
6685
+ ---------------------------------------------------------
6686
+  (0.1ms) rollback transaction
6687
+  (0.1ms) begin transaction
6688
+ ----------------------------------------------------------
6689
+ HasPublicId::UtilTest: test_new_public_id(with_nil_prefix)
6690
+ ----------------------------------------------------------
6691
+  (0.1ms) rollback transaction
6692
+  (0.1ms) begin transaction
6693
+ ------------------------------------------------------
6694
+ HasPublicId::UtilTest: test_new_public_id(with_prefix)
6695
+ ------------------------------------------------------
6696
+  (0.1ms) rollback transaction
6697
+  (0.1ms) begin transaction
6698
+ ---------------------------
6699
+ HasPublicIdTest: test_Mixin
6700
+ ---------------------------
6701
+  (0.1ms) rollback transaction
6702
+  (0.1ms) begin transaction
6703
+ Fixture Delete (0.4ms) DELETE FROM "users"
6704
+ Fixture Insert (0.2ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-11-22 15:06:03', '2014-11-22 15:06:03', 980190962)
6705
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-11-22 15:06:03', '2014-11-22 15:06:03', 298486374)
6706
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-11-22 15:06:03', '2014-11-22 15:06:03', 113629430)
6707
+  (0.9ms) commit transaction
6708
+  (0.1ms) begin transaction
6709
+ --------------------------------
6710
+ UserTest: test_find_by_public_id
6711
+ --------------------------------
6712
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-d2VbYMUeibnG' LIMIT 1
6713
+  (0.1ms) SAVEPOINT active_record_1
6714
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-22 15:06:03.555126"], ["ident", "user-d2VbYMUeibnG"], ["name", "joey"], ["updated_at", "2014-11-22 15:06:03.555126"]]
6715
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6716
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'user-d2VbYMUeibnG' ORDER BY "users"."id" ASC LIMIT 1
6717
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
6718
+  (0.5ms) rollback transaction
6719
+  (0.1ms) begin transaction
6720
+ ---------------------------------
6721
+ UserTest: test_find_by_public_id!
6722
+ ---------------------------------
6723
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-KAH84noXH5dl' LIMIT 1
6724
+  (0.0ms) SAVEPOINT active_record_1
6725
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-22 15:06:03.562028"], ["ident", "user-KAH84noXH5dl"], ["name", "joey"], ["updated_at", "2014-11-22 15:06:03.562028"]]
6726
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6727
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'user-KAH84noXH5dl' ORDER BY "users"."id" ASC LIMIT 1
6728
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
6729
+  (0.6ms) rollback transaction
6730
+  (0.1ms) begin transaction
6731
+ ---------------------------------------
6732
+ UserTest: test_identifier_doesnt_change
6733
+ ---------------------------------------
6734
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-UIpFybegvkGi' LIMIT 1
6735
+  (0.1ms) SAVEPOINT active_record_1
6736
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "ident", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-22 15:06:03.568978"], ["ident", "user-UIpFybegvkGi"], ["updated_at", "2014-11-22 15:06:03.568978"]]
6737
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6738
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
6739
+  (0.1ms) SAVEPOINT active_record_1
6740
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6741
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
6742
+  (0.6ms) rollback transaction
6743
+  (0.1ms) begin transaction
6744
+ -------------------------------------
6745
+ UserTest: test_identifier_initializes
6746
+ -------------------------------------
6747
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-qYo2DdP8NXDa' LIMIT 1
6748
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-i8oGcjWhCUIJ' LIMIT 1
6749
+  (0.1ms) rollback transaction
6750
+  (0.0ms) begin transaction
6751
+ -------------------------------------
6752
+ UserTest: test_initialize_public_ids!
6753
+ -------------------------------------
6754
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
6755
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."ident" IS NULL ORDER BY "users"."id" ASC LIMIT 1000
6756
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-fOFgkdTmc8cf' LIMIT 1
6757
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-92il8c19DhG7' LIMIT 1
6758
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-lJhjqTgMZ0mf' LIMIT 1
6759
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-QJaGYfIq8zV4' LIMIT 1
6760
+  (0.0ms) SAVEPOINT active_record_1
6761
+ SQL (0.4ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 113629430 [["ident", "user-QJaGYfIq8zV4"], ["updated_at", "2014-11-22 15:06:03.583862"]]
6762
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6763
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-WSUuUQTfwsrM' LIMIT 1
6764
+  (0.1ms) SAVEPOINT active_record_1
6765
+ SQL (1.6ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 298486374 [["ident", "user-WSUuUQTfwsrM"], ["updated_at", "2014-11-22 15:06:03.587252"]]
6766
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6767
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-UW5H6ZrKlDe6' LIMIT 1
6768
+  (0.1ms) SAVEPOINT active_record_1
6769
+ SQL (0.1ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 980190962 [["ident", "user-UW5H6ZrKlDe6"], ["updated_at", "2014-11-22 15:06:03.591599"]]
6770
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6771
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
6772
+  (0.5ms) rollback transaction
6773
+  (0.1ms) begin transaction
6774
+ ----------------------------
6775
+ UserTest: test_new_public_id
6776
+ ----------------------------
6777
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-7eVHgb1z8Md0' LIMIT 1
6778
+  (0.1ms) rollback transaction
6779
+  (0.0ms) begin transaction
6780
+ ------------------------------------------
6781
+ UserTest: test_to_param_matches_identifier
6782
+ ------------------------------------------
6783
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-LSakXIQW85vi' LIMIT 1
6784
+  (0.1ms) rollback transaction
6785
+  (0.1ms) begin transaction
6786
+ -------------------------------
6787
+ UserTest: test_use_group-by_sql
6788
+ -------------------------------
6789
+ User Load (0.3ms) SELECT name, count(name) as count FROM "users" GROUP BY name
6790
+ User Load (0.1ms) SELECT "users".* FROM "users"
6791
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-fLzKTihj9bCh' LIMIT 1
6792
+ User Exists (0.6ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-B28gtrTJ4G9s' LIMIT 1
6793
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-FhtjBF94GMoT' LIMIT 1
6794
+ User Load (0.2ms) SELECT "users".* FROM "users"
6795
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-Tmv9stEj14I5' LIMIT 1
6796
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-sJ0HIcgnrgpF' LIMIT 1
6797
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-O8AlZ0znNhZu' LIMIT 1
6798
+  (0.1ms) rollback transaction
6799
+ ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
6800
+  (0.1ms) begin transaction
6801
+ Fixture Delete (0.8ms) DELETE FROM "users"
6802
+ Fixture Insert (0.5ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-11-22 15:06:57', '2014-11-22 15:06:57', 980190962)
6803
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-11-22 15:06:57', '2014-11-22 15:06:57', 298486374)
6804
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-11-22 15:06:57', '2014-11-22 15:06:57', 113629430)
6805
+  (0.9ms) commit transaction
6806
+  (0.1ms) begin transaction
6807
+ ----------------------------------------
6808
+ AdminTest: test_identifier_doesnt_change
6809
+ ----------------------------------------
6810
+ Admin Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-e5IDeb4mzwEw' LIMIT 1
6811
+  (0.1ms) SAVEPOINT active_record_1
6812
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "ident", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-22 15:06:57.826180"], ["ident", "user-e5IDeb4mzwEw"], ["updated_at", "2014-11-22 15:06:57.826180"]]
6813
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6814
+ Admin Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
6815
+  (0.1ms) SAVEPOINT active_record_1
6816
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6817
+ Admin Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
6818
+  (0.6ms) rollback transaction
6819
+  (0.1ms) begin transaction
6820
+ --------------------------------------------------
6821
+ AdminTest: test_identifier_initializes_from_parent
6822
+ --------------------------------------------------
6823
+ Admin Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-UCkjDckA1T2j' LIMIT 1
6824
+ Admin Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-OpQJoQcmQCZC' LIMIT 1
6825
+  (0.1ms) rollback transaction
6826
+  (0.1ms) begin transaction
6827
+ --------------------------------------------------
6828
+ AdminTest: test_inherited_class_has_public_id_attr
6829
+ --------------------------------------------------
6830
+  (0.1ms) rollback transaction
6831
+  (0.1ms) begin transaction
6832
+ -------------------------------------------
6833
+ HasPublicId::UtilTest: test_char_set.length
6834
+ -------------------------------------------
6835
+  (0.1ms) rollback transaction
6836
+  (0.1ms) begin transaction
6837
+ --------------------------------------------------
6838
+ HasPublicId::UtilTest: test_generate_random_suffix
6839
+ --------------------------------------------------
6840
+  (0.1ms) rollback transaction
6841
+  (0.1ms) begin transaction
6842
+ ----------------------------------------------------------
6843
+ HasPublicId::UtilTest: test_generate_random_suffix(length)
6844
+ ----------------------------------------------------------
6845
+  (0.0ms) rollback transaction
6846
+  (0.1ms) begin transaction
6847
+ ------------------------------------------------------------
6848
+ HasPublicId::UtilTest: test_new_public_id(with_blank_prefix)
6849
+ ------------------------------------------------------------
6850
+  (0.1ms) rollback transaction
6851
+  (0.1ms) begin transaction
6852
+ ------------------------------------------------------------
6853
+ HasPublicId::UtilTest: test_new_public_id(with_false_prefix)
6854
+ ------------------------------------------------------------
6855
+  (0.1ms) rollback transaction
6856
+  (0.1ms) begin transaction
6857
+ ---------------------------------------------------------
6858
+ HasPublicId::UtilTest: test_new_public_id(with_join_with)
6859
+ ---------------------------------------------------------
6860
+  (0.1ms) rollback transaction
6861
+  (0.1ms) begin transaction
6862
+ ----------------------------------------------------------
6863
+ HasPublicId::UtilTest: test_new_public_id(with_nil_prefix)
6864
+ ----------------------------------------------------------
6865
+  (0.1ms) rollback transaction
6866
+  (0.1ms) begin transaction
6867
+ ------------------------------------------------------
6868
+ HasPublicId::UtilTest: test_new_public_id(with_prefix)
6869
+ ------------------------------------------------------
6870
+  (0.1ms) rollback transaction
6871
+  (0.1ms) begin transaction
6872
+ ---------------------------
6873
+ HasPublicIdTest: test_Mixin
6874
+ ---------------------------
6875
+  (0.0ms) rollback transaction
6876
+  (0.1ms) begin transaction
6877
+ Fixture Delete (0.3ms) DELETE FROM "users"
6878
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-11-22 15:06:58', '2014-11-22 15:06:58', 980190962)
6879
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-11-22 15:06:58', '2014-11-22 15:06:58', 298486374)
6880
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-11-22 15:06:58', '2014-11-22 15:06:58', 113629430)
6881
+  (1.0ms) commit transaction
6882
+  (0.1ms) begin transaction
6883
+ --------------------------------
6884
+ UserTest: test_find_by_public_id
6885
+ --------------------------------
6886
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-OopbRfjolVbZ' LIMIT 1
6887
+  (0.0ms) SAVEPOINT active_record_1
6888
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-22 15:06:58.045623"], ["ident", "user-OopbRfjolVbZ"], ["name", "joey"], ["updated_at", "2014-11-22 15:06:58.045623"]]
6889
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6890
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'user-OopbRfjolVbZ' ORDER BY "users"."id" ASC LIMIT 1
6891
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
6892
+  (0.4ms) rollback transaction
6893
+  (0.1ms) begin transaction
6894
+ ---------------------------------
6895
+ UserTest: test_find_by_public_id!
6896
+ ---------------------------------
6897
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-rvqZ9MAdX7zQ' LIMIT 1
6898
+  (0.0ms) SAVEPOINT active_record_1
6899
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-22 15:06:58.050994"], ["ident", "user-rvqZ9MAdX7zQ"], ["name", "joey"], ["updated_at", "2014-11-22 15:06:58.050994"]]
6900
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6901
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'user-rvqZ9MAdX7zQ' ORDER BY "users"."id" ASC LIMIT 1
6902
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
6903
+  (0.9ms) rollback transaction
6904
+  (0.1ms) begin transaction
6905
+ ---------------------------------------
6906
+ UserTest: test_identifier_doesnt_change
6907
+ ---------------------------------------
6908
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-4n2XoK9gLiWU' LIMIT 1
6909
+  (0.0ms) SAVEPOINT active_record_1
6910
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "ident", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-22 15:06:58.056937"], ["ident", "user-4n2XoK9gLiWU"], ["updated_at", "2014-11-22 15:06:58.056937"]]
6911
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6912
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
6913
+  (0.1ms) SAVEPOINT active_record_1
6914
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6915
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
6916
+  (0.4ms) rollback transaction
6917
+  (0.1ms) begin transaction
6918
+ -------------------------------------
6919
+ UserTest: test_identifier_initializes
6920
+ -------------------------------------
6921
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-uokE7trBfncT' LIMIT 1
6922
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-ignZcmdTdXtR' LIMIT 1
6923
+  (0.1ms) rollback transaction
6924
+  (0.1ms) begin transaction
6925
+ -------------------------------------
6926
+ UserTest: test_initialize_public_ids!
6927
+ -------------------------------------
6928
+  (0.2ms) SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
6929
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."ident" IS NULL ORDER BY "users"."id" ASC LIMIT 1000
6930
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-QquiO4zPTsUD' LIMIT 1
6931
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-jPim6UUwCXGf' LIMIT 1
6932
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-0PErvXej34Tj' LIMIT 1
6933
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-55slCzcTQeJ8' LIMIT 1
6934
+  (0.1ms) SAVEPOINT active_record_1
6935
+ SQL (0.4ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 113629430 [["ident", "user-55slCzcTQeJ8"], ["updated_at", "2014-11-22 15:06:58.072608"]]
6936
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6937
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-qB40Tq0tvw8s' LIMIT 1
6938
+  (0.1ms) SAVEPOINT active_record_1
6939
+ SQL (1.2ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 298486374 [["ident", "user-qB40Tq0tvw8s"], ["updated_at", "2014-11-22 15:06:58.076905"]]
6940
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6941
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-Qqs0qyesPs2X' LIMIT 1
6942
+  (0.0ms) SAVEPOINT active_record_1
6943
+ SQL (0.1ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 980190962 [["ident", "user-Qqs0qyesPs2X"], ["updated_at", "2014-11-22 15:06:58.079996"]]
6944
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6945
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
6946
+  (0.5ms) rollback transaction
6947
+  (0.1ms) begin transaction
6948
+ ----------------------------
6949
+ UserTest: test_new_public_id
6950
+ ----------------------------
6951
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-zRxHQiEzoCqD' LIMIT 1
6952
+  (0.1ms) rollback transaction
6953
+  (0.1ms) begin transaction
6954
+ ------------------------------------------
6955
+ UserTest: test_to_param_matches_identifier
6956
+ ------------------------------------------
6957
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-eOiNvKLf4hAK' LIMIT 1
6958
+  (0.1ms) rollback transaction
6959
+  (0.1ms) begin transaction
6960
+ -------------------------------
6961
+ UserTest: test_use_group-by_sql
6962
+ -------------------------------
6963
+ User Load (0.3ms) SELECT name, count(name) as count FROM "users" GROUP BY name
6964
+ User Load (0.2ms) SELECT "users".* FROM "users"
6965
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-Z8rjVS6wfSpM' LIMIT 1
6966
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-ODA3EMDuuuGk' LIMIT 1
6967
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-gxc1EDulylZw' LIMIT 1
6968
+ User Load (0.1ms) SELECT "users".* FROM "users"
6969
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-D5z9vgoYpB9u' LIMIT 1
6970
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-0rgE02ltVBxE' LIMIT 1
6971
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-tFcXZVMCpRjp' LIMIT 1
6972
+  (0.1ms) rollback transaction
6973
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
6974
+  (0.1ms) begin transaction
6975
+ ---------------------------
6976
+ HasPublicIdTest: test_Mixin
6977
+ ---------------------------
6978
+  (0.0ms) rollback transaction
6979
+  (0.1ms) begin transaction
6980
+ -------------------------------------------
6981
+ HasPublicId::UtilTest: test_char_set.length
6982
+ -------------------------------------------
6983
+  (0.0ms) rollback transaction
6984
+  (0.1ms) begin transaction
6985
+ --------------------------------------------------
6986
+ HasPublicId::UtilTest: test_generate_random_suffix
6987
+ --------------------------------------------------
6988
+  (0.1ms) rollback transaction
6989
+  (0.1ms) begin transaction
6990
+ ----------------------------------------------------------
6991
+ HasPublicId::UtilTest: test_generate_random_suffix(length)
6992
+ ----------------------------------------------------------
6993
+  (0.1ms) rollback transaction
6994
+  (0.1ms) begin transaction
6995
+ ------------------------------------------------------------
6996
+ HasPublicId::UtilTest: test_new_public_id(with_blank_prefix)
6997
+ ------------------------------------------------------------
6998
+  (0.1ms) rollback transaction
6999
+  (0.1ms) begin transaction
7000
+ ------------------------------------------------------------
7001
+ HasPublicId::UtilTest: test_new_public_id(with_false_prefix)
7002
+ ------------------------------------------------------------
7003
+  (0.1ms) rollback transaction
7004
+  (0.1ms) begin transaction
7005
+ ---------------------------------------------------------
7006
+ HasPublicId::UtilTest: test_new_public_id(with_join_with)
7007
+ ---------------------------------------------------------
7008
+  (0.1ms) rollback transaction
7009
+  (0.1ms) begin transaction
7010
+ ----------------------------------------------------------
7011
+ HasPublicId::UtilTest: test_new_public_id(with_nil_prefix)
7012
+ ----------------------------------------------------------
7013
+  (0.1ms) rollback transaction
7014
+  (0.1ms) begin transaction
7015
+ ------------------------------------------------------
7016
+ HasPublicId::UtilTest: test_new_public_id(with_prefix)
7017
+ ------------------------------------------------------
7018
+  (0.1ms) rollback transaction
7019
+  (0.2ms) begin transaction
7020
+ Fixture Delete (0.5ms) DELETE FROM "users"
7021
+ Fixture Insert (0.5ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-11-22 15:07:18', '2014-11-22 15:07:18', 980190962)
7022
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-11-22 15:07:18', '2014-11-22 15:07:18', 298486374)
7023
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-11-22 15:07:18', '2014-11-22 15:07:18', 113629430)
7024
+  (0.8ms) commit transaction
7025
+  (0.1ms) begin transaction
7026
+ ----------------------------------------
7027
+ AdminTest: test_identifier_doesnt_change
7028
+ ----------------------------------------
7029
+ Admin Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-2Kc37uMfLo0C' LIMIT 1
7030
+  (0.1ms) SAVEPOINT active_record_1
7031
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "ident", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-22 15:07:18.210078"], ["ident", "user-2Kc37uMfLo0C"], ["updated_at", "2014-11-22 15:07:18.210078"]]
7032
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7033
+ Admin Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
7034
+  (0.1ms) SAVEPOINT active_record_1
7035
+  (0.0ms) RELEASE SAVEPOINT active_record_1
7036
+ Admin Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
7037
+  (0.5ms) rollback transaction
7038
+  (0.1ms) begin transaction
7039
+ --------------------------------------------------
7040
+ AdminTest: test_identifier_initializes_from_parent
7041
+ --------------------------------------------------
7042
+ Admin Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-sjtWg1bsLuoV' LIMIT 1
7043
+ Admin Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-5W0kNn0j83uG' LIMIT 1
7044
+  (0.1ms) rollback transaction
7045
+  (0.1ms) begin transaction
7046
+ --------------------------------------------------
7047
+ AdminTest: test_inherited_class_has_public_id_attr
7048
+ --------------------------------------------------
7049
+  (0.0ms) rollback transaction
7050
+  (0.1ms) begin transaction
7051
+ Fixture Delete (0.3ms) DELETE FROM "users"
7052
+ Fixture Insert (0.2ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-11-22 15:07:18', '2014-11-22 15:07:18', 980190962)
7053
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-11-22 15:07:18', '2014-11-22 15:07:18', 298486374)
7054
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-11-22 15:07:18', '2014-11-22 15:07:18', 113629430)
7055
+  (0.8ms) commit transaction
7056
+  (0.1ms) begin transaction
7057
+ --------------------------------
7058
+ UserTest: test_find_by_public_id
7059
+ --------------------------------
7060
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-XBDHOLVp1gxG' LIMIT 1
7061
+  (0.1ms) SAVEPOINT active_record_1
7062
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-22 15:07:18.228854"], ["ident", "user-XBDHOLVp1gxG"], ["name", "joey"], ["updated_at", "2014-11-22 15:07:18.228854"]]
7063
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7064
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'user-XBDHOLVp1gxG' ORDER BY "users"."id" ASC LIMIT 1
7065
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
7066
+  (0.5ms) rollback transaction
7067
+  (0.1ms) begin transaction
7068
+ ---------------------------------
7069
+ UserTest: test_find_by_public_id!
7070
+ ---------------------------------
7071
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-qSZvT8U94i0Q' LIMIT 1
7072
+  (0.1ms) SAVEPOINT active_record_1
7073
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-22 15:07:18.236201"], ["ident", "user-qSZvT8U94i0Q"], ["name", "joey"], ["updated_at", "2014-11-22 15:07:18.236201"]]
7074
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7075
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'user-qSZvT8U94i0Q' ORDER BY "users"."id" ASC LIMIT 1
7076
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
7077
+  (0.4ms) rollback transaction
7078
+  (0.1ms) begin transaction
7079
+ ---------------------------------------
7080
+ UserTest: test_identifier_doesnt_change
7081
+ ---------------------------------------
7082
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-54nQm7yWR1rc' LIMIT 1
7083
+  (0.1ms) SAVEPOINT active_record_1
7084
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "ident", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-22 15:07:18.242670"], ["ident", "user-54nQm7yWR1rc"], ["updated_at", "2014-11-22 15:07:18.242670"]]
7085
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7086
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
7087
+  (0.0ms) SAVEPOINT active_record_1
7088
+  (0.0ms) RELEASE SAVEPOINT active_record_1
7089
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
7090
+  (0.4ms) rollback transaction
7091
+  (0.1ms) begin transaction
7092
+ -------------------------------------
7093
+ UserTest: test_identifier_initializes
7094
+ -------------------------------------
7095
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-kU0GCspG3CHe' LIMIT 1
7096
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-rc9uKsb9JuZ4' LIMIT 1
7097
+  (0.1ms) rollback transaction
7098
+  (0.1ms) begin transaction
7099
+ -------------------------------------
7100
+ UserTest: test_initialize_public_ids!
7101
+ -------------------------------------
7102
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
7103
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" IS NULL ORDER BY "users"."id" ASC LIMIT 1000
7104
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-v11QrqISKrKR' LIMIT 1
7105
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-vIh2ldaQp77a' LIMIT 1
7106
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-EAMZx37JPiVv' LIMIT 1
7107
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-3HiV6oMuVXR8' LIMIT 1
7108
+  (0.1ms) SAVEPOINT active_record_1
7109
+ SQL (0.5ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 113629430 [["ident", "user-3HiV6oMuVXR8"], ["updated_at", "2014-11-22 15:07:18.256886"]]
7110
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7111
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-tqI8KJEwH1Aj' LIMIT 1
7112
+  (0.0ms) SAVEPOINT active_record_1
7113
+ SQL (1.7ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 298486374 [["ident", "user-tqI8KJEwH1Aj"], ["updated_at", "2014-11-22 15:07:18.261503"]]
7114
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7115
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-6oeIPQgKsTBf' LIMIT 1
7116
+  (0.1ms) SAVEPOINT active_record_1
7117
+ SQL (0.1ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 980190962 [["ident", "user-6oeIPQgKsTBf"], ["updated_at", "2014-11-22 15:07:18.266249"]]
7118
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7119
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
7120
+  (0.5ms) rollback transaction
7121
+  (0.1ms) begin transaction
7122
+ ----------------------------
7123
+ UserTest: test_new_public_id
7124
+ ----------------------------
7125
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-nKOyJEqH03tF' LIMIT 1
7126
+  (0.1ms) rollback transaction
7127
+  (0.1ms) begin transaction
7128
+ ------------------------------------------
7129
+ UserTest: test_to_param_matches_identifier
7130
+ ------------------------------------------
7131
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-VYC7kOIiF448' LIMIT 1
7132
+  (0.1ms) rollback transaction
7133
+  (0.1ms) begin transaction
7134
+ -------------------------------
7135
+ UserTest: test_use_group-by_sql
7136
+ -------------------------------
7137
+ User Load (0.2ms) SELECT name, count(name) as count FROM "users" GROUP BY name
7138
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-icEDNPUJCrWM' LIMIT 1
7139
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-EALGWjrdlHmH' LIMIT 1
7140
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-Hz1tTYaXfUwA' LIMIT 1
7141
+ User Load (0.1ms) SELECT "users".* FROM "users"
7142
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-zUWtNexFseK3' LIMIT 1
7143
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-uH3NpvRyRy13' LIMIT 1
7144
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-oMQEDPvZGtdr' LIMIT 1
7145
+ User Load (0.1ms) SELECT "users".* FROM "users"
7146
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-I6F4ZnZCRfGv' LIMIT 1
7147
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-OBqHyC44GUiE' LIMIT 1
7148
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-HOYx0L8WNR4H' LIMIT 1
7149
+  (0.1ms) rollback transaction
@@ -57,6 +57,7 @@ class UserTest < ActiveSupport::TestCase
57
57
  grouped.map(&:count).each do |count|
58
58
  assert_equal count, 1
59
59
  end
60
+ assert_equal grouped[0].has_attribute?(:ident), false
60
61
  end
61
62
 
62
63
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_public_id
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.7
4
+ version: 1.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Graham Melcher