has_public_id 1.1.6 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/has_public_id/activerecord/mixin.rb +9 -9
- data/lib/has_public_id/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +906 -0
- data/test/dummy/test/models/user_test.rb +9 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ea2c8cf8863054f545e3071ba2490ef30871089
|
4
|
+
data.tar.gz: 7159ac694c7f9b4fb4cd6842e86633e2830ad11c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a5b671ee2443a836c2cb66c34fd6f58556ec635ff76320c710926fc67404a021a65248cf305d72740c6f6e1c17d0539b9390836ce45167c6258e5f350340d82
|
7
|
+
data.tar.gz: dd67c146b0b2ed87618b65026675318a7eb77e74f400ac08343b291fefe699301abc9242f7d855fd9ed746deba7b812defede538e4c69938b76018948c77ffa6
|
@@ -8,8 +8,8 @@ module HasPublicId
|
|
8
8
|
self.class.public_id_attr
|
9
9
|
end
|
10
10
|
def initialize_public_id
|
11
|
-
|
12
|
-
|
11
|
+
read_attribute(public_id_attr) or
|
12
|
+
write_attribute(public_id_attr, self.class.new_public_id)
|
13
13
|
end
|
14
14
|
end
|
15
15
|
module Mixin
|
@@ -20,25 +20,25 @@ module HasPublicId
|
|
20
20
|
def has_public_id(attribute_name, *args)
|
21
21
|
return if respond_to?(:public_id_attribute)
|
22
22
|
options = args.extract_options!
|
23
|
+
|
24
|
+
class_attribute :public_id_attr, :public_id_options
|
25
|
+
|
23
26
|
class << self
|
24
|
-
|
25
|
-
# def public_identifier
|
26
|
-
# @public_identifier
|
27
|
-
# end
|
28
|
-
# def public_identifier=(attribute_name)
|
29
|
-
# @public_identifier = attribute_name
|
30
|
-
# end
|
27
|
+
|
31
28
|
def initialize_public_ids!
|
32
29
|
self.where(self.public_id_attr => nil).find_each do |obj|
|
33
30
|
obj.update_attribute(self.public_id_attr, self.new_public_id)
|
34
31
|
end
|
35
32
|
end
|
33
|
+
|
36
34
|
def find_by_public_id(public_id)
|
37
35
|
where(self.public_id_attr => public_id).first
|
38
36
|
end
|
37
|
+
|
39
38
|
def find_by_public_id!(public_id)
|
40
39
|
where(self.public_id_attr => public_id).first!
|
41
40
|
end
|
41
|
+
|
42
42
|
def new_public_id
|
43
43
|
while(true)
|
44
44
|
new_id = ::HasPublicId::Util.new_public_id(self, self.public_id_options)
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/test/dummy/log/test.log
CHANGED
@@ -5542,3 +5542,909 @@ UserTest: test_to_param_matches_identifier
|
|
5542
5542
|
------------------------------------------
|
5543
5543
|
[1m[36mUser Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-UZUbiOQs0Ho4' LIMIT 1[0m
|
5544
5544
|
[1m[35m (0.1ms)[0m rollback transaction
|
5545
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.5ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5546
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5547
|
+
---------------------------
|
5548
|
+
HasPublicIdTest: test_Mixin
|
5549
|
+
---------------------------
|
5550
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5551
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5552
|
+
[1m[36mFixture Delete (1.4ms)[0m [1mDELETE FROM "users"[0m
|
5553
|
+
[1m[35mFixture Insert (0.6ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-11-22 14:25:57', '2014-11-22 14:25:57', 980190962)
|
5554
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-11-22 14:25:57', '2014-11-22 14:25:57', 298486374)[0m
|
5555
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-11-22 14:25:57', '2014-11-22 14:25:57', 113629430)
|
5556
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
5557
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5558
|
+
--------------------------------
|
5559
|
+
UserTest: test_find_by_public_id
|
5560
|
+
--------------------------------
|
5561
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-L2gihEJYDxPA' LIMIT 1[0m
|
5562
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5563
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-22 14:25:57.556367"], ["ident", "user-L2gihEJYDxPA"], ["name", "joey"], ["updated_at", "2014-11-22 14:25:57.556367"]]
|
5564
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5565
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."ident" = 'user-L2gihEJYDxPA' ORDER BY "users"."id" ASC LIMIT 1[0m
|
5566
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
|
5567
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
5568
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5569
|
+
---------------------------------
|
5570
|
+
UserTest: test_find_by_public_id!
|
5571
|
+
---------------------------------
|
5572
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-FtGgDJb4cXo8' LIMIT 1[0m
|
5573
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5574
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-22 14:25:57.564323"], ["ident", "user-FtGgDJb4cXo8"], ["name", "joey"], ["updated_at", "2014-11-22 14:25:57.564323"]]
|
5575
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5576
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."ident" = 'user-FtGgDJb4cXo8' ORDER BY "users"."id" ASC LIMIT 1[0m
|
5577
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
|
5578
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
5579
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5580
|
+
---------------------------------------
|
5581
|
+
UserTest: test_identifier_doesnt_change
|
5582
|
+
---------------------------------------
|
5583
|
+
[1m[36mUser Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-GFYfe7bj1k8z' LIMIT 1[0m
|
5584
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5585
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "ident", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-11-22 14:25:57.570559"], ["ident", "user-GFYfe7bj1k8z"], ["updated_at", "2014-11-22 14:25:57.570559"]]
|
5586
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5587
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190963]]
|
5588
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5589
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5590
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
|
5591
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
5592
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5593
|
+
-------------------------------------
|
5594
|
+
UserTest: test_identifier_initializes
|
5595
|
+
-------------------------------------
|
5596
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-HSr44N7VcfCK' LIMIT 1[0m
|
5597
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-qifSXIQaNWKK' LIMIT 1
|
5598
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5599
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5600
|
+
-------------------------------------
|
5601
|
+
UserTest: test_initialize_public_ids!
|
5602
|
+
-------------------------------------
|
5603
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL[0m
|
5604
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."ident" IS NULL ORDER BY "users"."id" ASC LIMIT 1000
|
5605
|
+
[1m[36mUser Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-iSjJdtF0Zhpv' LIMIT 1[0m
|
5606
|
+
[1m[35mUser Exists (0.2ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-pyx9McvRJ15M' LIMIT 1
|
5607
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-GFjRYjxHUhLo' LIMIT 1[0m
|
5608
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-paxcLdtkPaW5' LIMIT 1
|
5609
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5610
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 113629430 [["ident", "user-paxcLdtkPaW5"], ["updated_at", "2014-11-22 14:25:57.586482"]]
|
5611
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5612
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-YWyfGkpb5Rls' LIMIT 1
|
5613
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5614
|
+
[1m[35mSQL (1.3ms)[0m UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 298486374 [["ident", "user-YWyfGkpb5Rls"], ["updated_at", "2014-11-22 14:25:57.589984"]]
|
5615
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5616
|
+
[1m[35mUser Exists (0.2ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-7u7V9WB3TRvZ' LIMIT 1
|
5617
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5618
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 980190962 [["ident", "user-7u7V9WB3TRvZ"], ["updated_at", "2014-11-22 14:25:57.594212"]]
|
5619
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5620
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
|
5621
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
5622
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5623
|
+
----------------------------
|
5624
|
+
UserTest: test_new_public_id
|
5625
|
+
----------------------------
|
5626
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-xIwIfua7odHH' LIMIT 1[0m
|
5627
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
5628
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
5629
|
+
------------------------------------------
|
5630
|
+
UserTest: test_to_param_matches_identifier
|
5631
|
+
------------------------------------------
|
5632
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-lfaeY8BHHi3J' LIMIT 1
|
5633
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5634
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5635
|
+
[1m[36mFixture Delete (0.3ms)[0m [1mDELETE FROM "users"[0m
|
5636
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-11-22 14:25:57', '2014-11-22 14:25:57', 980190962)
|
5637
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-11-22 14:25:57', '2014-11-22 14:25:57', 298486374)[0m
|
5638
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-11-22 14:25:57', '2014-11-22 14:25:57', 113629430)
|
5639
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
5640
|
+
[1m[35m (0.2ms)[0m begin transaction
|
5641
|
+
----------------------------------------
|
5642
|
+
AdminTest: test_identifier_doesnt_change
|
5643
|
+
----------------------------------------
|
5644
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5645
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5646
|
+
--------------------------------------------------
|
5647
|
+
AdminTest: test_identifier_initializes_from_parent
|
5648
|
+
--------------------------------------------------
|
5649
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5650
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5651
|
+
--------------------------------------------------
|
5652
|
+
AdminTest: test_inherited_class_has_public_id_attr
|
5653
|
+
--------------------------------------------------
|
5654
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5655
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5656
|
+
-------------------------------------------
|
5657
|
+
HasPublicId::UtilTest: test_char_set.length
|
5658
|
+
-------------------------------------------
|
5659
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5660
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5661
|
+
--------------------------------------------------
|
5662
|
+
HasPublicId::UtilTest: test_generate_random_suffix
|
5663
|
+
--------------------------------------------------
|
5664
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5665
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5666
|
+
----------------------------------------------------------
|
5667
|
+
HasPublicId::UtilTest: test_generate_random_suffix(length)
|
5668
|
+
----------------------------------------------------------
|
5669
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5670
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5671
|
+
------------------------------------------------------------
|
5672
|
+
HasPublicId::UtilTest: test_new_public_id(with_blank_prefix)
|
5673
|
+
------------------------------------------------------------
|
5674
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5675
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5676
|
+
------------------------------------------------------------
|
5677
|
+
HasPublicId::UtilTest: test_new_public_id(with_false_prefix)
|
5678
|
+
------------------------------------------------------------
|
5679
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5680
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5681
|
+
---------------------------------------------------------
|
5682
|
+
HasPublicId::UtilTest: test_new_public_id(with_join_with)
|
5683
|
+
---------------------------------------------------------
|
5684
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5685
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5686
|
+
----------------------------------------------------------
|
5687
|
+
HasPublicId::UtilTest: test_new_public_id(with_nil_prefix)
|
5688
|
+
----------------------------------------------------------
|
5689
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5690
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5691
|
+
------------------------------------------------------
|
5692
|
+
HasPublicId::UtilTest: test_new_public_id(with_prefix)
|
5693
|
+
------------------------------------------------------
|
5694
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5695
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.5ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5696
|
+
[1m[35m (0.2ms)[0m begin transaction
|
5697
|
+
[1m[36mFixture Delete (0.9ms)[0m [1mDELETE FROM "users"[0m
|
5698
|
+
[1m[35mFixture Insert (0.6ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-11-22 14:31:21', '2014-11-22 14:31:21', 980190962)
|
5699
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-11-22 14:31:21', '2014-11-22 14:31:21', 298486374)[0m
|
5700
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-11-22 14:31:21', '2014-11-22 14:31:21', 113629430)
|
5701
|
+
[1m[36m (1.6ms)[0m [1mcommit transaction[0m
|
5702
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5703
|
+
----------------------------------------
|
5704
|
+
AdminTest: test_identifier_doesnt_change
|
5705
|
+
----------------------------------------
|
5706
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5707
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5708
|
+
--------------------------------------------------
|
5709
|
+
AdminTest: test_identifier_initializes_from_parent
|
5710
|
+
--------------------------------------------------
|
5711
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5712
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5713
|
+
--------------------------------------------------
|
5714
|
+
AdminTest: test_inherited_class_has_public_id_attr
|
5715
|
+
--------------------------------------------------
|
5716
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5717
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5718
|
+
---------------------------
|
5719
|
+
HasPublicIdTest: test_Mixin
|
5720
|
+
---------------------------
|
5721
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5722
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5723
|
+
-------------------------------------------
|
5724
|
+
HasPublicId::UtilTest: test_char_set.length
|
5725
|
+
-------------------------------------------
|
5726
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5727
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5728
|
+
--------------------------------------------------
|
5729
|
+
HasPublicId::UtilTest: test_generate_random_suffix
|
5730
|
+
--------------------------------------------------
|
5731
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5732
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5733
|
+
----------------------------------------------------------
|
5734
|
+
HasPublicId::UtilTest: test_generate_random_suffix(length)
|
5735
|
+
----------------------------------------------------------
|
5736
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5737
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5738
|
+
------------------------------------------------------------
|
5739
|
+
HasPublicId::UtilTest: test_new_public_id(with_blank_prefix)
|
5740
|
+
------------------------------------------------------------
|
5741
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5742
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5743
|
+
------------------------------------------------------------
|
5744
|
+
HasPublicId::UtilTest: test_new_public_id(with_false_prefix)
|
5745
|
+
------------------------------------------------------------
|
5746
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5747
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5748
|
+
---------------------------------------------------------
|
5749
|
+
HasPublicId::UtilTest: test_new_public_id(with_join_with)
|
5750
|
+
---------------------------------------------------------
|
5751
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5752
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5753
|
+
----------------------------------------------------------
|
5754
|
+
HasPublicId::UtilTest: test_new_public_id(with_nil_prefix)
|
5755
|
+
----------------------------------------------------------
|
5756
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5757
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5758
|
+
------------------------------------------------------
|
5759
|
+
HasPublicId::UtilTest: test_new_public_id(with_prefix)
|
5760
|
+
------------------------------------------------------
|
5761
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5762
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5763
|
+
[1m[36mFixture Delete (0.4ms)[0m [1mDELETE FROM "users"[0m
|
5764
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-11-22 14:31:22', '2014-11-22 14:31:22', 980190962)
|
5765
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-11-22 14:31:22', '2014-11-22 14:31:22', 298486374)[0m
|
5766
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-11-22 14:31:22', '2014-11-22 14:31:22', 113629430)
|
5767
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
5768
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5769
|
+
--------------------------------
|
5770
|
+
UserTest: test_find_by_public_id
|
5771
|
+
--------------------------------
|
5772
|
+
[1m[36mUser Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-QaZjWnJbDF0k' LIMIT 1[0m
|
5773
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5774
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-22 14:31:22.076256"], ["ident", "user-QaZjWnJbDF0k"], ["name", "joey"], ["updated_at", "2014-11-22 14:31:22.076256"]]
|
5775
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5776
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."ident" = 'user-QaZjWnJbDF0k' ORDER BY "users"."id" ASC LIMIT 1[0m
|
5777
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
|
5778
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
5779
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5780
|
+
---------------------------------
|
5781
|
+
UserTest: test_find_by_public_id!
|
5782
|
+
---------------------------------
|
5783
|
+
[1m[36mUser Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-o3K2i2AXEbKl' LIMIT 1[0m
|
5784
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5785
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-22 14:31:22.085049"], ["ident", "user-o3K2i2AXEbKl"], ["name", "joey"], ["updated_at", "2014-11-22 14:31:22.085049"]]
|
5786
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5787
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."ident" = 'user-o3K2i2AXEbKl' ORDER BY "users"."id" ASC LIMIT 1[0m
|
5788
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
|
5789
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
5790
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5791
|
+
---------------------------------------
|
5792
|
+
UserTest: test_identifier_doesnt_change
|
5793
|
+
---------------------------------------
|
5794
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-JOXc88s4qJtk' LIMIT 1[0m
|
5795
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5796
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "ident", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-11-22 14:31:22.092166"], ["ident", "user-JOXc88s4qJtk"], ["updated_at", "2014-11-22 14:31:22.092166"]]
|
5797
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5798
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190963]]
|
5799
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5800
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5801
|
+
[1m[35mUser Load (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
|
5802
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
5803
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5804
|
+
-------------------------------------
|
5805
|
+
UserTest: test_identifier_initializes
|
5806
|
+
-------------------------------------
|
5807
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-HuMUyqfGJx3y' LIMIT 1[0m
|
5808
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-ysA56O5DCngu' LIMIT 1
|
5809
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5810
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5811
|
+
-------------------------------------
|
5812
|
+
UserTest: test_initialize_public_ids!
|
5813
|
+
-------------------------------------
|
5814
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL[0m
|
5815
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."ident" IS NULL ORDER BY "users"."id" ASC LIMIT 1000
|
5816
|
+
[1m[36mUser Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-EpkjrDFbDkPW' LIMIT 1[0m
|
5817
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-UNZ2d5YlLu96' LIMIT 1
|
5818
|
+
[1m[36mUser Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-K6aE3cyjGvzR' LIMIT 1[0m
|
5819
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-X0xeulfUhtzJ' LIMIT 1
|
5820
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5821
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 113629430 [["ident", "user-X0xeulfUhtzJ"], ["updated_at", "2014-11-22 14:31:22.106798"]]
|
5822
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5823
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-ZujZVJOvFTzk' LIMIT 1
|
5824
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5825
|
+
[1m[35mSQL (1.1ms)[0m UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 298486374 [["ident", "user-ZujZVJOvFTzk"], ["updated_at", "2014-11-22 14:31:22.110192"]]
|
5826
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5827
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-DEejpFgRUZAt' LIMIT 1
|
5828
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5829
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 980190962 [["ident", "user-DEejpFgRUZAt"], ["updated_at", "2014-11-22 14:31:22.113850"]]
|
5830
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5831
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
|
5832
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
5833
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5834
|
+
----------------------------
|
5835
|
+
UserTest: test_new_public_id
|
5836
|
+
----------------------------
|
5837
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-Ncp2zCySyFjP' LIMIT 1[0m
|
5838
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
5839
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
5840
|
+
------------------------------------------
|
5841
|
+
UserTest: test_to_param_matches_identifier
|
5842
|
+
------------------------------------------
|
5843
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-QsVyJJ5TMPZX' LIMIT 1
|
5844
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5845
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5846
|
+
-------------------------------
|
5847
|
+
UserTest: test_use_group-by_sql
|
5848
|
+
-------------------------------
|
5849
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT name, count(name) as count FROM "users" GROUP BY name[0m
|
5850
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
5851
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.6ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5852
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5853
|
+
-------------------------------------------
|
5854
|
+
HasPublicId::UtilTest: test_char_set.length
|
5855
|
+
-------------------------------------------
|
5856
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5857
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5858
|
+
--------------------------------------------------
|
5859
|
+
HasPublicId::UtilTest: test_generate_random_suffix
|
5860
|
+
--------------------------------------------------
|
5861
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5862
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5863
|
+
----------------------------------------------------------
|
5864
|
+
HasPublicId::UtilTest: test_generate_random_suffix(length)
|
5865
|
+
----------------------------------------------------------
|
5866
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5867
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5868
|
+
------------------------------------------------------------
|
5869
|
+
HasPublicId::UtilTest: test_new_public_id(with_blank_prefix)
|
5870
|
+
------------------------------------------------------------
|
5871
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5872
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5873
|
+
------------------------------------------------------------
|
5874
|
+
HasPublicId::UtilTest: test_new_public_id(with_false_prefix)
|
5875
|
+
------------------------------------------------------------
|
5876
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5877
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5878
|
+
---------------------------------------------------------
|
5879
|
+
HasPublicId::UtilTest: test_new_public_id(with_join_with)
|
5880
|
+
---------------------------------------------------------
|
5881
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5882
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5883
|
+
----------------------------------------------------------
|
5884
|
+
HasPublicId::UtilTest: test_new_public_id(with_nil_prefix)
|
5885
|
+
----------------------------------------------------------
|
5886
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5887
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5888
|
+
------------------------------------------------------
|
5889
|
+
HasPublicId::UtilTest: test_new_public_id(with_prefix)
|
5890
|
+
------------------------------------------------------
|
5891
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5892
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5893
|
+
---------------------------
|
5894
|
+
HasPublicIdTest: test_Mixin
|
5895
|
+
---------------------------
|
5896
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5897
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5898
|
+
[1m[36mFixture Delete (0.7ms)[0m [1mDELETE FROM "users"[0m
|
5899
|
+
[1m[35mFixture Insert (0.5ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-11-22 14:36:50', '2014-11-22 14:36:50', 980190962)
|
5900
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-11-22 14:36:50', '2014-11-22 14:36:50', 298486374)[0m
|
5901
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-11-22 14:36:50', '2014-11-22 14:36:50', 113629430)
|
5902
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
5903
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5904
|
+
--------------------------------
|
5905
|
+
UserTest: test_find_by_public_id
|
5906
|
+
--------------------------------
|
5907
|
+
[1m[36mUser Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-C29mcSI3DRb6' LIMIT 1[0m
|
5908
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
5909
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
5910
|
+
---------------------------------
|
5911
|
+
UserTest: test_find_by_public_id!
|
5912
|
+
---------------------------------
|
5913
|
+
[1m[35mUser Exists (0.2ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-xjXFMGgSb2jV' LIMIT 1
|
5914
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5915
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5916
|
+
---------------------------------------
|
5917
|
+
UserTest: test_identifier_doesnt_change
|
5918
|
+
---------------------------------------
|
5919
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-ErytoSe58yqd' LIMIT 1[0m
|
5920
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
5921
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
5922
|
+
-------------------------------------
|
5923
|
+
UserTest: test_identifier_initializes
|
5924
|
+
-------------------------------------
|
5925
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-fjnJLoKzoald' LIMIT 1
|
5926
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5927
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5928
|
+
-------------------------------------
|
5929
|
+
UserTest: test_initialize_public_ids!
|
5930
|
+
-------------------------------------
|
5931
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL[0m
|
5932
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."ident" IS NULL ORDER BY "users"."id" ASC LIMIT 1000
|
5933
|
+
[1m[36mUser Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-ZpibVUiiG4Xr' LIMIT 1[0m
|
5934
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
5935
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
5936
|
+
----------------------------
|
5937
|
+
UserTest: test_new_public_id
|
5938
|
+
----------------------------
|
5939
|
+
[1m[35mUser Exists (0.2ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-UUk4gg5GrP6D' LIMIT 1
|
5940
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5941
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5942
|
+
------------------------------------------
|
5943
|
+
UserTest: test_to_param_matches_identifier
|
5944
|
+
------------------------------------------
|
5945
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-RXWB0l3qVjqv' LIMIT 1[0m
|
5946
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
5947
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
5948
|
+
-------------------------------
|
5949
|
+
UserTest: test_use_group-by_sql
|
5950
|
+
-------------------------------
|
5951
|
+
[1m[35mUser Load (0.2ms)[0m SELECT name, count(name) as count FROM "users" GROUP BY name
|
5952
|
+
[1m[36mUser Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-mSz17mHlmLd0' LIMIT 1[0m
|
5953
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
5954
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
5955
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "users"
|
5956
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-11-22 14:36:50', '2014-11-22 14:36:50', 980190962)[0m
|
5957
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-11-22 14:36:50', '2014-11-22 14:36:50', 298486374)
|
5958
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-11-22 14:36:50', '2014-11-22 14:36:50', 113629430)[0m
|
5959
|
+
[1m[35m (0.8ms)[0m commit transaction
|
5960
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
5961
|
+
----------------------------------------
|
5962
|
+
AdminTest: test_identifier_doesnt_change
|
5963
|
+
----------------------------------------
|
5964
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
5965
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5966
|
+
--------------------------------------------------
|
5967
|
+
AdminTest: test_identifier_initializes_from_parent
|
5968
|
+
--------------------------------------------------
|
5969
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
5970
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
5971
|
+
--------------------------------------------------
|
5972
|
+
AdminTest: test_inherited_class_has_public_id_attr
|
5973
|
+
--------------------------------------------------
|
5974
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
5975
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.5ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5976
|
+
[1m[35m (0.2ms)[0m begin transaction
|
5977
|
+
[1m[36mFixture Delete (0.8ms)[0m [1mDELETE FROM "users"[0m
|
5978
|
+
[1m[35mFixture Insert (0.6ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-11-22 14:38:26', '2014-11-22 14:38:26', 980190962)
|
5979
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-11-22 14:38:26', '2014-11-22 14:38:26', 298486374)[0m
|
5980
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-11-22 14:38:26', '2014-11-22 14:38:26', 113629430)
|
5981
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
5982
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5983
|
+
----------------------------------------
|
5984
|
+
AdminTest: test_identifier_doesnt_change
|
5985
|
+
----------------------------------------
|
5986
|
+
[1m[36mAdmin Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-Bo6FQVNAxM1C' LIMIT 1[0m
|
5987
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
5988
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
5989
|
+
--------------------------------------------------
|
5990
|
+
AdminTest: test_identifier_initializes_from_parent
|
5991
|
+
--------------------------------------------------
|
5992
|
+
[1m[35mAdmin Exists (0.3ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-4nrmu0Mnfzyj' LIMIT 1
|
5993
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
5994
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5995
|
+
--------------------------------------------------
|
5996
|
+
AdminTest: test_inherited_class_has_public_id_attr
|
5997
|
+
--------------------------------------------------
|
5998
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5999
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6000
|
+
[1m[36mFixture Delete (0.3ms)[0m [1mDELETE FROM "users"[0m
|
6001
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-11-22 14:38:26', '2014-11-22 14:38:26', 980190962)
|
6002
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-11-22 14:38:26', '2014-11-22 14:38:26', 298486374)[0m
|
6003
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-11-22 14:38:26', '2014-11-22 14:38:26', 113629430)
|
6004
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
6005
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6006
|
+
--------------------------------
|
6007
|
+
UserTest: test_find_by_public_id
|
6008
|
+
--------------------------------
|
6009
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-3fdzCE675TLv' LIMIT 1[0m
|
6010
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6011
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6012
|
+
---------------------------------
|
6013
|
+
UserTest: test_find_by_public_id!
|
6014
|
+
---------------------------------
|
6015
|
+
[1m[35mUser Exists (0.3ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-2AaeCTFSOcjS' LIMIT 1
|
6016
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6017
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6018
|
+
---------------------------------------
|
6019
|
+
UserTest: test_identifier_doesnt_change
|
6020
|
+
---------------------------------------
|
6021
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-CureU9rxZAtA' LIMIT 1[0m
|
6022
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6023
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6024
|
+
-------------------------------------
|
6025
|
+
UserTest: test_identifier_initializes
|
6026
|
+
-------------------------------------
|
6027
|
+
[1m[35mUser Exists (0.2ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-T63tLz2x1giY' LIMIT 1
|
6028
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6029
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6030
|
+
-------------------------------------
|
6031
|
+
UserTest: test_initialize_public_ids!
|
6032
|
+
-------------------------------------
|
6033
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL[0m
|
6034
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."ident" IS NULL ORDER BY "users"."id" ASC LIMIT 1000
|
6035
|
+
[1m[36mUser Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-8qZpvK4diqtv' LIMIT 1[0m
|
6036
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6037
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6038
|
+
----------------------------
|
6039
|
+
UserTest: test_new_public_id
|
6040
|
+
----------------------------
|
6041
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-sFAudOd2q2W9' LIMIT 1
|
6042
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6043
|
+
[1m[35m (0.0ms)[0m begin transaction
|
6044
|
+
------------------------------------------
|
6045
|
+
UserTest: test_to_param_matches_identifier
|
6046
|
+
------------------------------------------
|
6047
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-Ez7g4GbFAFVf' LIMIT 1[0m
|
6048
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6049
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6050
|
+
-------------------------------
|
6051
|
+
UserTest: test_use_group-by_sql
|
6052
|
+
-------------------------------
|
6053
|
+
[1m[35mUser Load (0.3ms)[0m SELECT name, count(name) as count FROM "users" GROUP BY name
|
6054
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-kizWBC4UCRIJ' LIMIT 1[0m
|
6055
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6056
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6057
|
+
-------------------------------------------
|
6058
|
+
HasPublicId::UtilTest: test_char_set.length
|
6059
|
+
-------------------------------------------
|
6060
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6061
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6062
|
+
--------------------------------------------------
|
6063
|
+
HasPublicId::UtilTest: test_generate_random_suffix
|
6064
|
+
--------------------------------------------------
|
6065
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6066
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6067
|
+
----------------------------------------------------------
|
6068
|
+
HasPublicId::UtilTest: test_generate_random_suffix(length)
|
6069
|
+
----------------------------------------------------------
|
6070
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
6071
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6072
|
+
------------------------------------------------------------
|
6073
|
+
HasPublicId::UtilTest: test_new_public_id(with_blank_prefix)
|
6074
|
+
------------------------------------------------------------
|
6075
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6076
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6077
|
+
------------------------------------------------------------
|
6078
|
+
HasPublicId::UtilTest: test_new_public_id(with_false_prefix)
|
6079
|
+
------------------------------------------------------------
|
6080
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6081
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6082
|
+
---------------------------------------------------------
|
6083
|
+
HasPublicId::UtilTest: test_new_public_id(with_join_with)
|
6084
|
+
---------------------------------------------------------
|
6085
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6086
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6087
|
+
----------------------------------------------------------
|
6088
|
+
HasPublicId::UtilTest: test_new_public_id(with_nil_prefix)
|
6089
|
+
----------------------------------------------------------
|
6090
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
6091
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6092
|
+
------------------------------------------------------
|
6093
|
+
HasPublicId::UtilTest: test_new_public_id(with_prefix)
|
6094
|
+
------------------------------------------------------
|
6095
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6096
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6097
|
+
---------------------------
|
6098
|
+
HasPublicIdTest: test_Mixin
|
6099
|
+
---------------------------
|
6100
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6101
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.5ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6102
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6103
|
+
[1m[36mFixture Delete (0.6ms)[0m [1mDELETE FROM "users"[0m
|
6104
|
+
[1m[35mFixture Insert (0.6ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-11-22 14:38:52', '2014-11-22 14:38:52', 980190962)
|
6105
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-11-22 14:38:52', '2014-11-22 14:38:52', 298486374)[0m
|
6106
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-11-22 14:38:52', '2014-11-22 14:38:52', 113629430)
|
6107
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
6108
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6109
|
+
--------------------------------
|
6110
|
+
UserTest: test_find_by_public_id
|
6111
|
+
--------------------------------
|
6112
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-ss5rheucgmbf' LIMIT 1[0m
|
6113
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
6114
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-22 14:38:52.677828"], ["ident", "user-ss5rheucgmbf"], ["name", "joey"], ["updated_at", "2014-11-22 14:38:52.677828"]]
|
6115
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
6116
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."ident" = 'user-ss5rheucgmbf' ORDER BY "users"."id" ASC LIMIT 1[0m
|
6117
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
|
6118
|
+
[1m[36m (1.2ms)[0m [1mrollback transaction[0m
|
6119
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6120
|
+
---------------------------------
|
6121
|
+
UserTest: test_find_by_public_id!
|
6122
|
+
---------------------------------
|
6123
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-0I63KlDZOMb2' LIMIT 1[0m
|
6124
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
6125
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-22 14:38:52.686064"], ["ident", "user-0I63KlDZOMb2"], ["name", "joey"], ["updated_at", "2014-11-22 14:38:52.686064"]]
|
6126
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
6127
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."ident" = 'user-0I63KlDZOMb2' ORDER BY "users"."id" ASC LIMIT 1[0m
|
6128
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
|
6129
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
6130
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6131
|
+
---------------------------------------
|
6132
|
+
UserTest: test_identifier_doesnt_change
|
6133
|
+
---------------------------------------
|
6134
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-Kn36TzUnP7gK' LIMIT 1[0m
|
6135
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
6136
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "ident", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-11-22 14:38:52.695341"], ["ident", "user-Kn36TzUnP7gK"], ["updated_at", "2014-11-22 14:38:52.695341"]]
|
6137
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
6138
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190963]]
|
6139
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
6140
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
6141
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
|
6142
|
+
[1m[36m (1.5ms)[0m [1mrollback transaction[0m
|
6143
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6144
|
+
-------------------------------------
|
6145
|
+
UserTest: test_identifier_initializes
|
6146
|
+
-------------------------------------
|
6147
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-XwaR2KozO7zT' LIMIT 1[0m
|
6148
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-xtzKeFGh6Okq' LIMIT 1
|
6149
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6150
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6151
|
+
-------------------------------------
|
6152
|
+
UserTest: test_initialize_public_ids!
|
6153
|
+
-------------------------------------
|
6154
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL[0m
|
6155
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."ident" IS NULL ORDER BY "users"."id" ASC LIMIT 1000
|
6156
|
+
[1m[36mUser Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-XISyAEUyl9JH' LIMIT 1[0m
|
6157
|
+
[1m[35mUser Exists (0.2ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-sm0togQ8XLZr' LIMIT 1
|
6158
|
+
[1m[36mUser Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-YgY4pyVoxPsI' LIMIT 1[0m
|
6159
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-Jaimu4SjaLOo' LIMIT 1
|
6160
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
6161
|
+
[1m[35mSQL (0.5ms)[0m UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 113629430 [["ident", "user-Jaimu4SjaLOo"], ["updated_at", "2014-11-22 14:38:52.715820"]]
|
6162
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
6163
|
+
[1m[35mUser Exists (0.2ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-NdfHKT3bATfy' LIMIT 1
|
6164
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
6165
|
+
[1m[35mSQL (2.3ms)[0m UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 298486374 [["ident", "user-NdfHKT3bATfy"], ["updated_at", "2014-11-22 14:38:52.720404"]]
|
6166
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
6167
|
+
[1m[35mUser Exists (0.2ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-eElvbryRONsG' LIMIT 1
|
6168
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
6169
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 980190962 [["ident", "user-eElvbryRONsG"], ["updated_at", "2014-11-22 14:38:52.726347"]]
|
6170
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
6171
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
|
6172
|
+
[1m[36m (1.3ms)[0m [1mrollback transaction[0m
|
6173
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6174
|
+
----------------------------
|
6175
|
+
UserTest: test_new_public_id
|
6176
|
+
----------------------------
|
6177
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-PH8Vmd1MnhSM' LIMIT 1[0m
|
6178
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6179
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6180
|
+
------------------------------------------
|
6181
|
+
UserTest: test_to_param_matches_identifier
|
6182
|
+
------------------------------------------
|
6183
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-wbWOFjllXeZu' LIMIT 1
|
6184
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6185
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6186
|
+
-------------------------------
|
6187
|
+
UserTest: test_use_group-by_sql
|
6188
|
+
-------------------------------
|
6189
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT name, count(name) as count FROM "users" GROUP BY name[0m
|
6190
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-8KRe7kW5x08p' LIMIT 1
|
6191
|
+
[1m[36mUser Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-UnNwqJlws7z6' LIMIT 1[0m
|
6192
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-z0dgAaMAs7kK' LIMIT 1
|
6193
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
6194
|
+
[1m[35mUser Exists (0.2ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-AiNN1ZBGDMqu' LIMIT 1
|
6195
|
+
[1m[36mUser Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-LcGwpzZ3QfzE' LIMIT 1[0m
|
6196
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-WE9EFgyRYIWI' LIMIT 1
|
6197
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6198
|
+
[1m[35m (0.2ms)[0m begin transaction
|
6199
|
+
-------------------------------------------
|
6200
|
+
HasPublicId::UtilTest: test_char_set.length
|
6201
|
+
-------------------------------------------
|
6202
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6203
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6204
|
+
--------------------------------------------------
|
6205
|
+
HasPublicId::UtilTest: test_generate_random_suffix
|
6206
|
+
--------------------------------------------------
|
6207
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6208
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6209
|
+
----------------------------------------------------------
|
6210
|
+
HasPublicId::UtilTest: test_generate_random_suffix(length)
|
6211
|
+
----------------------------------------------------------
|
6212
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6213
|
+
[1m[35m (0.0ms)[0m begin transaction
|
6214
|
+
------------------------------------------------------------
|
6215
|
+
HasPublicId::UtilTest: test_new_public_id(with_blank_prefix)
|
6216
|
+
------------------------------------------------------------
|
6217
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6218
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6219
|
+
------------------------------------------------------------
|
6220
|
+
HasPublicId::UtilTest: test_new_public_id(with_false_prefix)
|
6221
|
+
------------------------------------------------------------
|
6222
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6223
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6224
|
+
---------------------------------------------------------
|
6225
|
+
HasPublicId::UtilTest: test_new_public_id(with_join_with)
|
6226
|
+
---------------------------------------------------------
|
6227
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6228
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6229
|
+
----------------------------------------------------------
|
6230
|
+
HasPublicId::UtilTest: test_new_public_id(with_nil_prefix)
|
6231
|
+
----------------------------------------------------------
|
6232
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6233
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6234
|
+
------------------------------------------------------
|
6235
|
+
HasPublicId::UtilTest: test_new_public_id(with_prefix)
|
6236
|
+
------------------------------------------------------
|
6237
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6238
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6239
|
+
[1m[36mFixture Delete (0.4ms)[0m [1mDELETE FROM "users"[0m
|
6240
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-11-22 14:38:52', '2014-11-22 14:38:52', 980190962)
|
6241
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-11-22 14:38:52', '2014-11-22 14:38:52', 298486374)[0m
|
6242
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-11-22 14:38:52', '2014-11-22 14:38:52', 113629430)
|
6243
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
6244
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6245
|
+
----------------------------------------
|
6246
|
+
AdminTest: test_identifier_doesnt_change
|
6247
|
+
----------------------------------------
|
6248
|
+
[1m[36mAdmin Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-7yNofGmjHK02' LIMIT 1[0m
|
6249
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
6250
|
+
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "users" ("created_at", "ident", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-11-22 14:38:52.987147"], ["ident", "user-7yNofGmjHK02"], ["updated_at", "2014-11-22 14:38:52.987147"]]
|
6251
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
6252
|
+
[1m[36mAdmin Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190963]]
|
6253
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
6254
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
6255
|
+
[1m[35mAdmin Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
|
6256
|
+
[1m[36m (2.4ms)[0m [1mrollback transaction[0m
|
6257
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6258
|
+
--------------------------------------------------
|
6259
|
+
AdminTest: test_identifier_initializes_from_parent
|
6260
|
+
--------------------------------------------------
|
6261
|
+
[1m[36mAdmin Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-slH0JzNUILkv' LIMIT 1[0m
|
6262
|
+
[1m[35mAdmin Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-zmMfXoMKMTMP' LIMIT 1
|
6263
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6264
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6265
|
+
--------------------------------------------------
|
6266
|
+
AdminTest: test_inherited_class_has_public_id_attr
|
6267
|
+
--------------------------------------------------
|
6268
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6269
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6270
|
+
---------------------------
|
6271
|
+
HasPublicIdTest: test_Mixin
|
6272
|
+
---------------------------
|
6273
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6274
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.5ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6275
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6276
|
+
[1m[36mFixture Delete (0.7ms)[0m [1mDELETE FROM "users"[0m
|
6277
|
+
[1m[35mFixture Insert (0.7ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-11-22 14:39:11', '2014-11-22 14:39:11', 980190962)
|
6278
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-11-22 14:39:11', '2014-11-22 14:39:11', 298486374)[0m
|
6279
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-11-22 14:39:11', '2014-11-22 14:39:11', 113629430)
|
6280
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
6281
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6282
|
+
----------------------------------------
|
6283
|
+
AdminTest: test_identifier_doesnt_change
|
6284
|
+
----------------------------------------
|
6285
|
+
[1m[36mAdmin Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-fBMYxDGhXOPf' LIMIT 1[0m
|
6286
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
6287
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "ident", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-11-22 14:39:11.935312"], ["ident", "user-fBMYxDGhXOPf"], ["updated_at", "2014-11-22 14:39:11.935312"]]
|
6288
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
6289
|
+
[1m[36mAdmin Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190963]]
|
6290
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
6291
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
6292
|
+
[1m[35mAdmin Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
|
6293
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
6294
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6295
|
+
--------------------------------------------------
|
6296
|
+
AdminTest: test_identifier_initializes_from_parent
|
6297
|
+
--------------------------------------------------
|
6298
|
+
[1m[36mAdmin Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-lZlxKkjLmkFb' LIMIT 1[0m
|
6299
|
+
[1m[35mAdmin Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-2usZXVlzsbDm' LIMIT 1
|
6300
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6301
|
+
[1m[35m (0.0ms)[0m begin transaction
|
6302
|
+
--------------------------------------------------
|
6303
|
+
AdminTest: test_inherited_class_has_public_id_attr
|
6304
|
+
--------------------------------------------------
|
6305
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6306
|
+
[1m[35m (0.0ms)[0m begin transaction
|
6307
|
+
---------------------------
|
6308
|
+
HasPublicIdTest: test_Mixin
|
6309
|
+
---------------------------
|
6310
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6311
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6312
|
+
[1m[36mFixture Delete (0.3ms)[0m [1mDELETE FROM "users"[0m
|
6313
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-11-22 14:39:11', '2014-11-22 14:39:11', 980190962)
|
6314
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-11-22 14:39:11', '2014-11-22 14:39:11', 298486374)[0m
|
6315
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-11-22 14:39:11', '2014-11-22 14:39:11', 113629430)
|
6316
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
6317
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6318
|
+
--------------------------------
|
6319
|
+
UserTest: test_find_by_public_id
|
6320
|
+
--------------------------------
|
6321
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-6DcU05b7Lk9r' LIMIT 1[0m
|
6322
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
6323
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-22 14:39:11.958619"], ["ident", "user-6DcU05b7Lk9r"], ["name", "joey"], ["updated_at", "2014-11-22 14:39:11.958619"]]
|
6324
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
6325
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."ident" = 'user-6DcU05b7Lk9r' ORDER BY "users"."id" ASC LIMIT 1[0m
|
6326
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
|
6327
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
6328
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6329
|
+
---------------------------------
|
6330
|
+
UserTest: test_find_by_public_id!
|
6331
|
+
---------------------------------
|
6332
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-K0BuCcIae280' LIMIT 1[0m
|
6333
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
6334
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-22 14:39:11.966890"], ["ident", "user-K0BuCcIae280"], ["name", "joey"], ["updated_at", "2014-11-22 14:39:11.966890"]]
|
6335
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
6336
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."ident" = 'user-K0BuCcIae280' ORDER BY "users"."id" ASC LIMIT 1[0m
|
6337
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
|
6338
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
6339
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6340
|
+
---------------------------------------
|
6341
|
+
UserTest: test_identifier_doesnt_change
|
6342
|
+
---------------------------------------
|
6343
|
+
[1m[36mUser Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-LcbA3UUZMj3k' LIMIT 1[0m
|
6344
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
6345
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "ident", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-11-22 14:39:11.974392"], ["ident", "user-LcbA3UUZMj3k"], ["updated_at", "2014-11-22 14:39:11.974392"]]
|
6346
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
6347
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190963]]
|
6348
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
6349
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
6350
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
|
6351
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
6352
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6353
|
+
-------------------------------------
|
6354
|
+
UserTest: test_identifier_initializes
|
6355
|
+
-------------------------------------
|
6356
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-VB188rn9VYvU' LIMIT 1[0m
|
6357
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-J1TlBfWaQ6WW' LIMIT 1
|
6358
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6359
|
+
[1m[35m (0.0ms)[0m begin transaction
|
6360
|
+
-------------------------------------
|
6361
|
+
UserTest: test_initialize_public_ids!
|
6362
|
+
-------------------------------------
|
6363
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL[0m
|
6364
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."ident" IS NULL ORDER BY "users"."id" ASC LIMIT 1000
|
6365
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-lyLEjoCIfCtf' LIMIT 1[0m
|
6366
|
+
[1m[35mUser Exists (0.2ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-Y63hXdScJM4W' LIMIT 1
|
6367
|
+
[1m[36mUser Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-QrI187vvsCuA' LIMIT 1[0m
|
6368
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-gejDExlPFntD' LIMIT 1
|
6369
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
6370
|
+
[1m[35mSQL (0.5ms)[0m UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 113629430 [["ident", "user-gejDExlPFntD"], ["updated_at", "2014-11-22 14:39:11.994261"]]
|
6371
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
6372
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-JaGO6D1j5AYN' LIMIT 1
|
6373
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
6374
|
+
[1m[35mSQL (1.1ms)[0m UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 298486374 [["ident", "user-JaGO6D1j5AYN"], ["updated_at", "2014-11-22 14:39:11.998707"]]
|
6375
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
6376
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-Y8KOLdmAtg93' LIMIT 1
|
6377
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
6378
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 980190962 [["ident", "user-Y8KOLdmAtg93"], ["updated_at", "2014-11-22 14:39:12.002405"]]
|
6379
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
6380
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
|
6381
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
6382
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6383
|
+
----------------------------
|
6384
|
+
UserTest: test_new_public_id
|
6385
|
+
----------------------------
|
6386
|
+
[1m[36mUser Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-OM1TcFuhlVH7' LIMIT 1[0m
|
6387
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6388
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6389
|
+
------------------------------------------
|
6390
|
+
UserTest: test_to_param_matches_identifier
|
6391
|
+
------------------------------------------
|
6392
|
+
[1m[35mUser Exists (0.2ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-YcaU5oN1Fu7P' LIMIT 1
|
6393
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6394
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6395
|
+
-------------------------------
|
6396
|
+
UserTest: test_use_group-by_sql
|
6397
|
+
-------------------------------
|
6398
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT name, count(name) as count FROM "users" GROUP BY name[0m
|
6399
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-kKXO7jutKZtj' LIMIT 1
|
6400
|
+
[1m[36mUser Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-x1IUFR0F3KYf' LIMIT 1[0m
|
6401
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-N9b88lgI4L6O' LIMIT 1
|
6402
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
6403
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-JVTxJ1jyy6ve' LIMIT 1
|
6404
|
+
[1m[36mUser Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-EGEKjBlsFyJm' LIMIT 1[0m
|
6405
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-nrRSOaZSTMHQ' LIMIT 1
|
6406
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users"[0m
|
6407
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-ZcKCWG3B962C' LIMIT 1
|
6408
|
+
[1m[36mUser Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-qHVBPhaaoggz' LIMIT 1[0m
|
6409
|
+
[1m[35mUser Exists (0.1ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-qiMZ5C0FbbsX' LIMIT 1
|
6410
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6411
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6412
|
+
-------------------------------------------
|
6413
|
+
HasPublicId::UtilTest: test_char_set.length
|
6414
|
+
-------------------------------------------
|
6415
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6416
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6417
|
+
--------------------------------------------------
|
6418
|
+
HasPublicId::UtilTest: test_generate_random_suffix
|
6419
|
+
--------------------------------------------------
|
6420
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6421
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6422
|
+
----------------------------------------------------------
|
6423
|
+
HasPublicId::UtilTest: test_generate_random_suffix(length)
|
6424
|
+
----------------------------------------------------------
|
6425
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
6426
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6427
|
+
------------------------------------------------------------
|
6428
|
+
HasPublicId::UtilTest: test_new_public_id(with_blank_prefix)
|
6429
|
+
------------------------------------------------------------
|
6430
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6431
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6432
|
+
------------------------------------------------------------
|
6433
|
+
HasPublicId::UtilTest: test_new_public_id(with_false_prefix)
|
6434
|
+
------------------------------------------------------------
|
6435
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6436
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6437
|
+
---------------------------------------------------------
|
6438
|
+
HasPublicId::UtilTest: test_new_public_id(with_join_with)
|
6439
|
+
---------------------------------------------------------
|
6440
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6441
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6442
|
+
----------------------------------------------------------
|
6443
|
+
HasPublicId::UtilTest: test_new_public_id(with_nil_prefix)
|
6444
|
+
----------------------------------------------------------
|
6445
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6446
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6447
|
+
------------------------------------------------------
|
6448
|
+
HasPublicId::UtilTest: test_new_public_id(with_prefix)
|
6449
|
+
------------------------------------------------------
|
6450
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
@@ -50,4 +50,13 @@ class UserTest < ActiveSupport::TestCase
|
|
50
50
|
assert_equal User.where(ident: nil).count, 0
|
51
51
|
end
|
52
52
|
|
53
|
+
test "use group-by sql" do
|
54
|
+
grouped = User.select('name, count(name) as count').group('name')
|
55
|
+
assert_equal grouped.length, User.all.map(&:name).count
|
56
|
+
assert_equal grouped.map(&:name).sort, User.all.map(&:name).uniq.sort
|
57
|
+
grouped.map(&:count).each do |count|
|
58
|
+
assert_equal count, 1
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
53
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: has_public_id
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Graham Melcher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -101,7 +101,8 @@ files:
|
|
101
101
|
- test/has_public_id_test.rb
|
102
102
|
- test/test_helper.rb
|
103
103
|
homepage: https://github.com/hinthealth/has_public_id
|
104
|
-
licenses:
|
104
|
+
licenses:
|
105
|
+
- MIT
|
105
106
|
metadata: {}
|
106
107
|
post_install_message:
|
107
108
|
rdoc_options: []
|
@@ -119,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
120
|
version: '0'
|
120
121
|
requirements: []
|
121
122
|
rubyforge_project:
|
122
|
-
rubygems_version: 2.
|
123
|
+
rubygems_version: 2.4.2
|
123
124
|
signing_key:
|
124
125
|
specification_version: 4
|
125
126
|
summary: Random, unique identifiers for activerecord models
|