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