has_public_id 1.1.5 → 1.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 89f5426224bce80e6a794537e43261b3ce27c83c
4
+ data.tar.gz: ac18e851de5203cc4fde0821164c92fcff2fb3c3
5
+ SHA512:
6
+ metadata.gz: a2923f031a5bac460f116e3bb4cb59860dea5cb03574de7f78e83a03f561c6f62aa299d4adeb3ce87a2f928682c1b58a1fd4e6a83a0dca2f76f6783a29a7d03f
7
+ data.tar.gz: 007662b9c50ea0d2ef0a302eb0f41be11c6869b1382ecdef862c632cc78d2c13cb5437d96d922998d5642568d1d3fdb2deab1ecfc72d680db2dc2ccf443d4dc4
@@ -1,3 +1,3 @@
1
1
  module HasPublicId
2
- VERSION = "1.1.5"
2
+ VERSION = "1.1.6"
3
3
  end
@@ -0,0 +1,2 @@
1
+ class Admin < User
2
+ end
Binary file
@@ -4936,3 +4936,609 @@ UserTest: test_to_param_matches_identifier
4936
4936
  ------------------------------------------
4937
4937
  User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-0nqgjjrLuQUi' LIMIT 1
4938
4938
   (0.0ms) rollback transaction
4939
+  (0.5ms) begin transaction
4940
+ Fixture Delete (1.3ms) DELETE FROM "users"
4941
+ Fixture Insert (0.3ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-03-13 17:32:44', '2014-03-13 17:32:44', 980190962)
4942
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-03-13 17:32:44', '2014-03-13 17:32:44', 298486374)
4943
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-03-13 17:32:44', '2014-03-13 17:32:44', 113629430)
4944
+  (0.9ms) commit transaction
4945
+  (0.1ms) begin transaction
4946
+ ----------------------------------------
4947
+ AdminTest: test_identifier_doesnt_change
4948
+ ----------------------------------------
4949
+  (0.1ms) rollback transaction
4950
+  (0.1ms) begin transaction
4951
+ --------------------------------------------------
4952
+ AdminTest: test_identifier_initializes_from_parent
4953
+ --------------------------------------------------
4954
+  (0.1ms) rollback transaction
4955
+  (0.0ms) begin transaction
4956
+ -------------------------------------------
4957
+ HasPublicId::UtilTest: test_char_set.length
4958
+ -------------------------------------------
4959
+  (0.1ms) rollback transaction
4960
+  (0.1ms) begin transaction
4961
+ --------------------------------------------------
4962
+ HasPublicId::UtilTest: test_generate_random_suffix
4963
+ --------------------------------------------------
4964
+  (0.1ms) rollback transaction
4965
+  (0.1ms) begin transaction
4966
+ ----------------------------------------------------------
4967
+ HasPublicId::UtilTest: test_generate_random_suffix(length)
4968
+ ----------------------------------------------------------
4969
+  (0.1ms) rollback transaction
4970
+  (0.1ms) begin transaction
4971
+ ------------------------------------------------------------
4972
+ HasPublicId::UtilTest: test_new_public_id(with_blank_prefix)
4973
+ ------------------------------------------------------------
4974
+  (0.1ms) rollback transaction
4975
+  (0.1ms) begin transaction
4976
+ ------------------------------------------------------------
4977
+ HasPublicId::UtilTest: test_new_public_id(with_false_prefix)
4978
+ ------------------------------------------------------------
4979
+  (0.1ms) rollback transaction
4980
+  (0.1ms) begin transaction
4981
+ ---------------------------------------------------------
4982
+ HasPublicId::UtilTest: test_new_public_id(with_join_with)
4983
+ ---------------------------------------------------------
4984
+  (0.1ms) rollback transaction
4985
+  (0.1ms) begin transaction
4986
+ ----------------------------------------------------------
4987
+ HasPublicId::UtilTest: test_new_public_id(with_nil_prefix)
4988
+ ----------------------------------------------------------
4989
+  (0.1ms) rollback transaction
4990
+  (0.1ms) begin transaction
4991
+ ------------------------------------------------------
4992
+ HasPublicId::UtilTest: test_new_public_id(with_prefix)
4993
+ ------------------------------------------------------
4994
+  (0.1ms) rollback transaction
4995
+  (0.1ms) begin transaction
4996
+ ---------------------------
4997
+ HasPublicIdTest: test_Mixin
4998
+ ---------------------------
4999
+  (0.1ms) rollback transaction
5000
+  (0.1ms) begin transaction
5001
+ Fixture Delete (0.2ms) DELETE FROM "users"
5002
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-03-13 17:32:44', '2014-03-13 17:32:44', 980190962)
5003
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-03-13 17:32:44', '2014-03-13 17:32:44', 298486374)
5004
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-03-13 17:32:44', '2014-03-13 17:32:44', 113629430)
5005
+  (0.9ms) commit transaction
5006
+  (0.0ms) begin transaction
5007
+ --------------------------------
5008
+ UserTest: test_find_by_public_id
5009
+ --------------------------------
5010
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-XvdEK40Jdmwq' LIMIT 1
5011
+  (0.1ms) SAVEPOINT active_record_1
5012
+ SQL (7.2ms) INSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Mar 2014 17:32:44 UTC +00:00], ["ident", "user-XvdEK40Jdmwq"], ["name", "joey"], ["updated_at", Thu, 13 Mar 2014 17:32:44 UTC +00:00]]
5013
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5014
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'user-XvdEK40Jdmwq' ORDER BY "users"."id" ASC LIMIT 1
5015
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
5016
+  (0.6ms) rollback transaction
5017
+  (0.1ms) begin transaction
5018
+ ---------------------------------
5019
+ UserTest: test_find_by_public_id!
5020
+ ---------------------------------
5021
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-kFLfj9DvXV1i' LIMIT 1
5022
+  (0.0ms) SAVEPOINT active_record_1
5023
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Mar 2014 17:32:44 UTC +00:00], ["ident", "user-kFLfj9DvXV1i"], ["name", "joey"], ["updated_at", Thu, 13 Mar 2014 17:32:44 UTC +00:00]]
5024
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5025
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'user-kFLfj9DvXV1i' ORDER BY "users"."id" ASC LIMIT 1
5026
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
5027
+  (0.5ms) rollback transaction
5028
+  (0.1ms) begin transaction
5029
+ ---------------------------------------
5030
+ UserTest: test_identifier_doesnt_change
5031
+ ---------------------------------------
5032
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-KaWELaYhD39I' LIMIT 1
5033
+  (0.0ms) SAVEPOINT active_record_1
5034
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "ident", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 13 Mar 2014 17:32:44 UTC +00:00], ["ident", "user-KaWELaYhD39I"], ["updated_at", Thu, 13 Mar 2014 17:32:44 UTC +00:00]]
5035
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5036
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
5037
+  (0.0ms) SAVEPOINT active_record_1
5038
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5039
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
5040
+  (0.5ms) rollback transaction
5041
+  (0.1ms) begin transaction
5042
+ -------------------------------------
5043
+ UserTest: test_identifier_initializes
5044
+ -------------------------------------
5045
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-NTaZQWneNkMR' LIMIT 1
5046
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-CHjoe4mN8rso' LIMIT 1
5047
+  (0.0ms) rollback transaction
5048
+  (0.1ms) begin transaction
5049
+ -------------------------------------
5050
+ UserTest: test_initialize_public_ids!
5051
+ -------------------------------------
5052
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
5053
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" IS NULL ORDER BY "users"."id" ASC LIMIT 1000
5054
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-HXZSd6F9imyA' LIMIT 1
5055
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-uWiYq8f4oDzy' LIMIT 1
5056
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-RbU1BOAVVurN' LIMIT 1
5057
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-zOyEcIw4R3Ef' LIMIT 1
5058
+  (0.0ms) SAVEPOINT active_record_1
5059
+ SQL (0.4ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 113629430 [["ident", "user-zOyEcIw4R3Ef"], ["updated_at", Thu, 13 Mar 2014 17:32:44 UTC +00:00]]
5060
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5061
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-arm8aMoMs5gQ' LIMIT 1
5062
+  (0.0ms) SAVEPOINT active_record_1
5063
+ SQL (1.0ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 298486374 [["ident", "user-arm8aMoMs5gQ"], ["updated_at", Thu, 13 Mar 2014 17:32:44 UTC +00:00]]
5064
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5065
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-R5qxRUiXcy9h' LIMIT 1
5066
+  (0.0ms) SAVEPOINT active_record_1
5067
+ SQL (0.2ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 980190962 [["ident", "user-R5qxRUiXcy9h"], ["updated_at", Thu, 13 Mar 2014 17:32:44 UTC +00:00]]
5068
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5069
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
5070
+  (0.5ms) rollback transaction
5071
+  (0.1ms) begin transaction
5072
+ ----------------------------
5073
+ UserTest: test_new_public_id
5074
+ ----------------------------
5075
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-WmMhTFJYVuye' LIMIT 1
5076
+  (0.1ms) rollback transaction
5077
+  (0.1ms) begin transaction
5078
+ ------------------------------------------
5079
+ UserTest: test_to_param_matches_identifier
5080
+ ------------------------------------------
5081
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-MRV1BKylFRGo' LIMIT 1
5082
+  (0.1ms) rollback transaction
5083
+  (0.5ms) begin transaction
5084
+ Fixture Delete (0.7ms) DELETE FROM "users"
5085
+ Fixture Insert (0.3ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-03-13 17:36:50', '2014-03-13 17:36:50', 980190962)
5086
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-03-13 17:36:50', '2014-03-13 17:36:50', 298486374)
5087
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-03-13 17:36:50', '2014-03-13 17:36:50', 113629430)
5088
+  (1.0ms) commit transaction
5089
+  (0.1ms) begin transaction
5090
+ ----------------------------------------
5091
+ AdminTest: test_identifier_doesnt_change
5092
+ ----------------------------------------
5093
+  (0.1ms) rollback transaction
5094
+  (0.1ms) begin transaction
5095
+ --------------------------------------------------
5096
+ AdminTest: test_identifier_initializes_from_parent
5097
+ --------------------------------------------------
5098
+  (0.1ms) rollback transaction
5099
+  (0.1ms) begin transaction
5100
+ --------------------------------------------------
5101
+ AdminTest: test_inherited_class_has_public_id_attr
5102
+ --------------------------------------------------
5103
+  (0.1ms) rollback transaction
5104
+  (0.1ms) begin transaction
5105
+ -------------------------------------------
5106
+ HasPublicId::UtilTest: test_char_set.length
5107
+ -------------------------------------------
5108
+  (0.1ms) rollback transaction
5109
+  (0.1ms) begin transaction
5110
+ --------------------------------------------------
5111
+ HasPublicId::UtilTest: test_generate_random_suffix
5112
+ --------------------------------------------------
5113
+  (0.1ms) rollback transaction
5114
+  (0.1ms) begin transaction
5115
+ ----------------------------------------------------------
5116
+ HasPublicId::UtilTest: test_generate_random_suffix(length)
5117
+ ----------------------------------------------------------
5118
+  (0.0ms) rollback transaction
5119
+  (0.0ms) begin transaction
5120
+ ------------------------------------------------------------
5121
+ HasPublicId::UtilTest: test_new_public_id(with_blank_prefix)
5122
+ ------------------------------------------------------------
5123
+  (0.1ms) rollback transaction
5124
+  (0.0ms) begin transaction
5125
+ ------------------------------------------------------------
5126
+ HasPublicId::UtilTest: test_new_public_id(with_false_prefix)
5127
+ ------------------------------------------------------------
5128
+  (0.0ms) rollback transaction
5129
+  (0.0ms) begin transaction
5130
+ ---------------------------------------------------------
5131
+ HasPublicId::UtilTest: test_new_public_id(with_join_with)
5132
+ ---------------------------------------------------------
5133
+  (0.0ms) rollback transaction
5134
+  (0.0ms) begin transaction
5135
+ ----------------------------------------------------------
5136
+ HasPublicId::UtilTest: test_new_public_id(with_nil_prefix)
5137
+ ----------------------------------------------------------
5138
+  (0.1ms) rollback transaction
5139
+  (0.1ms) begin transaction
5140
+ ------------------------------------------------------
5141
+ HasPublicId::UtilTest: test_new_public_id(with_prefix)
5142
+ ------------------------------------------------------
5143
+  (0.1ms) rollback transaction
5144
+  (0.1ms) begin transaction
5145
+ ---------------------------
5146
+ HasPublicIdTest: test_Mixin
5147
+ ---------------------------
5148
+  (0.1ms) rollback transaction
5149
+  (0.1ms) begin transaction
5150
+ Fixture Delete (0.2ms) DELETE FROM "users"
5151
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-03-13 17:36:51', '2014-03-13 17:36:51', 980190962)
5152
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-03-13 17:36:51', '2014-03-13 17:36:51', 298486374)
5153
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-03-13 17:36:51', '2014-03-13 17:36:51', 113629430)
5154
+  (0.9ms) commit transaction
5155
+  (0.1ms) begin transaction
5156
+ --------------------------------
5157
+ UserTest: test_find_by_public_id
5158
+ --------------------------------
5159
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-Ku87RBPFeD38' LIMIT 1
5160
+  (0.1ms) SAVEPOINT active_record_1
5161
+ SQL (5.6ms) INSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Mar 2014 17:36:51 UTC +00:00], ["ident", "user-Ku87RBPFeD38"], ["name", "joey"], ["updated_at", Thu, 13 Mar 2014 17:36:51 UTC +00:00]]
5162
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5163
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'user-Ku87RBPFeD38' ORDER BY "users"."id" ASC LIMIT 1
5164
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
5165
+  (0.4ms) rollback transaction
5166
+  (0.1ms) begin transaction
5167
+ ---------------------------------
5168
+ UserTest: test_find_by_public_id!
5169
+ ---------------------------------
5170
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-VxFz56t0nNw1' LIMIT 1
5171
+  (0.1ms) SAVEPOINT active_record_1
5172
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Mar 2014 17:36:51 UTC +00:00], ["ident", "user-VxFz56t0nNw1"], ["name", "joey"], ["updated_at", Thu, 13 Mar 2014 17:36:51 UTC +00:00]]
5173
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5174
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'user-VxFz56t0nNw1' ORDER BY "users"."id" ASC LIMIT 1
5175
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
5176
+  (0.4ms) rollback transaction
5177
+  (0.1ms) begin transaction
5178
+ ---------------------------------------
5179
+ UserTest: test_identifier_doesnt_change
5180
+ ---------------------------------------
5181
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-zD5AQDVD2F6X' LIMIT 1
5182
+  (0.0ms) SAVEPOINT active_record_1
5183
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "ident", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 13 Mar 2014 17:36:51 UTC +00:00], ["ident", "user-zD5AQDVD2F6X"], ["updated_at", Thu, 13 Mar 2014 17:36:51 UTC +00:00]]
5184
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5185
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
5186
+  (0.0ms) SAVEPOINT active_record_1
5187
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5188
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
5189
+  (0.5ms) rollback transaction
5190
+  (0.1ms) begin transaction
5191
+ -------------------------------------
5192
+ UserTest: test_identifier_initializes
5193
+ -------------------------------------
5194
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-vGgowkyA2A6h' LIMIT 1
5195
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-xOxdk2si6JnO' LIMIT 1
5196
+  (0.0ms) rollback transaction
5197
+  (0.1ms) begin transaction
5198
+ -------------------------------------
5199
+ UserTest: test_initialize_public_ids!
5200
+ -------------------------------------
5201
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
5202
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" IS NULL ORDER BY "users"."id" ASC LIMIT 1000
5203
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-LTDvCfm4dgv4' LIMIT 1
5204
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-zJ0F8emjklzS' LIMIT 1
5205
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-UuZoEY0N2Ahm' LIMIT 1
5206
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-hYz1OHCcsmak' LIMIT 1
5207
+  (0.1ms) SAVEPOINT active_record_1
5208
+ SQL (0.4ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 113629430 [["ident", "user-hYz1OHCcsmak"], ["updated_at", Thu, 13 Mar 2014 17:36:51 UTC +00:00]]
5209
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5210
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-rMfCyxgbORUB' LIMIT 1
5211
+  (0.0ms) SAVEPOINT active_record_1
5212
+ SQL (0.9ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 298486374 [["ident", "user-rMfCyxgbORUB"], ["updated_at", Thu, 13 Mar 2014 17:36:51 UTC +00:00]]
5213
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5214
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-6ObwrC9GObtD' LIMIT 1
5215
+  (0.0ms) SAVEPOINT active_record_1
5216
+ SQL (0.2ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 980190962 [["ident", "user-6ObwrC9GObtD"], ["updated_at", Thu, 13 Mar 2014 17:36:51 UTC +00:00]]
5217
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5218
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
5219
+  (0.4ms) rollback transaction
5220
+  (0.1ms) begin transaction
5221
+ ----------------------------
5222
+ UserTest: test_new_public_id
5223
+ ----------------------------
5224
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-pvuxozBv5x0l' LIMIT 1
5225
+  (0.0ms) rollback transaction
5226
+  (0.1ms) begin transaction
5227
+ ----------------------------------
5228
+ UserTest: test_sets_public_id_attr
5229
+ ----------------------------------
5230
+  (0.0ms) rollback transaction
5231
+  (0.1ms) begin transaction
5232
+ ------------------------------------------
5233
+ UserTest: test_to_param_matches_identifier
5234
+ ------------------------------------------
5235
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-6OPzbpC4CmuN' LIMIT 1
5236
+  (0.0ms) rollback transaction
5237
+  (0.5ms) begin transaction
5238
+ Fixture Delete (0.3ms) DELETE FROM "users"
5239
+ Fixture Insert (0.2ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-03-13 17:37:21', '2014-03-13 17:37:21', 980190962)
5240
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-03-13 17:37:21', '2014-03-13 17:37:21', 298486374)
5241
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-03-13 17:37:21', '2014-03-13 17:37:21', 113629430)
5242
+  (1.0ms) commit transaction
5243
+  (0.1ms) begin transaction
5244
+ ----------------------------------------
5245
+ AdminTest: test_identifier_doesnt_change
5246
+ ----------------------------------------
5247
+  (0.1ms) rollback transaction
5248
+  (0.1ms) begin transaction
5249
+ --------------------------------------------------
5250
+ AdminTest: test_identifier_initializes_from_parent
5251
+ --------------------------------------------------
5252
+  (0.1ms) rollback transaction
5253
+  (0.1ms) begin transaction
5254
+ --------------------------------------------------
5255
+ AdminTest: test_inherited_class_has_public_id_attr
5256
+ --------------------------------------------------
5257
+  (0.1ms) rollback transaction
5258
+  (0.1ms) begin transaction
5259
+ -------------------------------------------
5260
+ HasPublicId::UtilTest: test_char_set.length
5261
+ -------------------------------------------
5262
+  (0.1ms) rollback transaction
5263
+  (0.1ms) begin transaction
5264
+ --------------------------------------------------
5265
+ HasPublicId::UtilTest: test_generate_random_suffix
5266
+ --------------------------------------------------
5267
+  (0.1ms) rollback transaction
5268
+  (0.1ms) begin transaction
5269
+ ----------------------------------------------------------
5270
+ HasPublicId::UtilTest: test_generate_random_suffix(length)
5271
+ ----------------------------------------------------------
5272
+  (0.0ms) rollback transaction
5273
+  (0.0ms) begin transaction
5274
+ ------------------------------------------------------------
5275
+ HasPublicId::UtilTest: test_new_public_id(with_blank_prefix)
5276
+ ------------------------------------------------------------
5277
+  (0.0ms) rollback transaction
5278
+  (0.0ms) begin transaction
5279
+ ------------------------------------------------------------
5280
+ HasPublicId::UtilTest: test_new_public_id(with_false_prefix)
5281
+ ------------------------------------------------------------
5282
+  (0.0ms) rollback transaction
5283
+  (0.0ms) begin transaction
5284
+ ---------------------------------------------------------
5285
+ HasPublicId::UtilTest: test_new_public_id(with_join_with)
5286
+ ---------------------------------------------------------
5287
+  (0.0ms) rollback transaction
5288
+  (0.0ms) begin transaction
5289
+ ----------------------------------------------------------
5290
+ HasPublicId::UtilTest: test_new_public_id(with_nil_prefix)
5291
+ ----------------------------------------------------------
5292
+  (0.0ms) rollback transaction
5293
+  (0.0ms) begin transaction
5294
+ ------------------------------------------------------
5295
+ HasPublicId::UtilTest: test_new_public_id(with_prefix)
5296
+ ------------------------------------------------------
5297
+  (0.0ms) rollback transaction
5298
+  (0.0ms) begin transaction
5299
+ ---------------------------
5300
+ HasPublicIdTest: test_Mixin
5301
+ ---------------------------
5302
+  (0.1ms) rollback transaction
5303
+  (0.1ms) begin transaction
5304
+ Fixture Delete (0.3ms) DELETE FROM "users"
5305
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-03-13 17:37:21', '2014-03-13 17:37:21', 980190962)
5306
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-03-13 17:37:21', '2014-03-13 17:37:21', 298486374)
5307
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-03-13 17:37:21', '2014-03-13 17:37:21', 113629430)
5308
+  (2.2ms) commit transaction
5309
+  (0.2ms) begin transaction
5310
+ --------------------------------
5311
+ UserTest: test_find_by_public_id
5312
+ --------------------------------
5313
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-odIL2bPmsD6l' LIMIT 1
5314
+  (0.1ms) SAVEPOINT active_record_1
5315
+ SQL (2.5ms) INSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Mar 2014 17:37:21 UTC +00:00], ["ident", "user-odIL2bPmsD6l"], ["name", "joey"], ["updated_at", Thu, 13 Mar 2014 17:37:21 UTC +00:00]]
5316
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5317
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'user-odIL2bPmsD6l' ORDER BY "users"."id" ASC LIMIT 1
5318
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
5319
+  (0.4ms) rollback transaction
5320
+  (0.1ms) begin transaction
5321
+ ---------------------------------
5322
+ UserTest: test_find_by_public_id!
5323
+ ---------------------------------
5324
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-ezrQYOM3izfV' LIMIT 1
5325
+  (0.0ms) SAVEPOINT active_record_1
5326
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Mar 2014 17:37:21 UTC +00:00], ["ident", "user-ezrQYOM3izfV"], ["name", "joey"], ["updated_at", Thu, 13 Mar 2014 17:37:21 UTC +00:00]]
5327
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5328
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'user-ezrQYOM3izfV' ORDER BY "users"."id" ASC LIMIT 1
5329
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
5330
+  (0.4ms) rollback transaction
5331
+  (0.1ms) begin transaction
5332
+ ---------------------------------------
5333
+ UserTest: test_identifier_doesnt_change
5334
+ ---------------------------------------
5335
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-2MgnhPAYWvRr' LIMIT 1
5336
+  (0.0ms) SAVEPOINT active_record_1
5337
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "ident", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 13 Mar 2014 17:37:21 UTC +00:00], ["ident", "user-2MgnhPAYWvRr"], ["updated_at", Thu, 13 Mar 2014 17:37:21 UTC +00:00]]
5338
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5339
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
5340
+  (0.1ms) SAVEPOINT active_record_1
5341
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5342
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
5343
+  (0.6ms) rollback transaction
5344
+  (0.1ms) begin transaction
5345
+ -------------------------------------
5346
+ UserTest: test_identifier_initializes
5347
+ -------------------------------------
5348
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-pM2w2pl0R7vw' LIMIT 1
5349
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-oyzUYqlK0apL' LIMIT 1
5350
+  (0.1ms) rollback transaction
5351
+  (0.1ms) begin transaction
5352
+ -------------------------------------
5353
+ UserTest: test_initialize_public_ids!
5354
+ -------------------------------------
5355
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
5356
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" IS NULL ORDER BY "users"."id" ASC LIMIT 1000
5357
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-2L15suFHsCqD' LIMIT 1
5358
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-EUljg4WFsNQg' LIMIT 1
5359
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-GIDJeevcXEZe' LIMIT 1
5360
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-iYLJEwjTAQxU' LIMIT 1
5361
+  (0.0ms) SAVEPOINT active_record_1
5362
+ SQL (0.4ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 113629430 [["ident", "user-iYLJEwjTAQxU"], ["updated_at", Thu, 13 Mar 2014 17:37:21 UTC +00:00]]
5363
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5364
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-JlfXKML8Tm13' LIMIT 1
5365
+  (0.1ms) SAVEPOINT active_record_1
5366
+ SQL (1.2ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 298486374 [["ident", "user-JlfXKML8Tm13"], ["updated_at", Thu, 13 Mar 2014 17:37:21 UTC +00:00]]
5367
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5368
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-ca3lY6FoWiIp' LIMIT 1
5369
+  (0.0ms) SAVEPOINT active_record_1
5370
+ SQL (0.2ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 980190962 [["ident", "user-ca3lY6FoWiIp"], ["updated_at", Thu, 13 Mar 2014 17:37:21 UTC +00:00]]
5371
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5372
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
5373
+  (0.6ms) rollback transaction
5374
+  (0.1ms) begin transaction
5375
+ ----------------------------
5376
+ UserTest: test_new_public_id
5377
+ ----------------------------
5378
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-G4bcY1TFA6hk' LIMIT 1
5379
+  (0.1ms) rollback transaction
5380
+  (0.1ms) begin transaction
5381
+ ----------------------------------
5382
+ UserTest: test_sets_public_id_attr
5383
+ ----------------------------------
5384
+  (0.1ms) rollback transaction
5385
+  (0.1ms) begin transaction
5386
+ ------------------------------------------
5387
+ UserTest: test_to_param_matches_identifier
5388
+ ------------------------------------------
5389
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-WFnRMgHANoTZ' LIMIT 1
5390
+  (0.1ms) rollback transaction
5391
+  (0.4ms) begin transaction
5392
+ Fixture Delete (0.7ms) DELETE FROM "users"
5393
+ Fixture Insert (0.7ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-03-13 17:41:33', '2014-03-13 17:41:33', 980190962)
5394
+ Fixture Insert (0.2ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-03-13 17:41:33', '2014-03-13 17:41:33', 298486374)
5395
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-03-13 17:41:33', '2014-03-13 17:41:33', 113629430)
5396
+  (0.8ms) commit transaction
5397
+  (0.1ms) begin transaction
5398
+ ----------------------------------------
5399
+ AdminTest: test_identifier_doesnt_change
5400
+ ----------------------------------------
5401
+  (0.1ms) rollback transaction
5402
+  (0.1ms) begin transaction
5403
+ --------------------------------------------------
5404
+ AdminTest: test_identifier_initializes_from_parent
5405
+ --------------------------------------------------
5406
+  (0.1ms) rollback transaction
5407
+  (0.1ms) begin transaction
5408
+ --------------------------------------------------
5409
+ AdminTest: test_inherited_class_has_public_id_attr
5410
+ --------------------------------------------------
5411
+  (0.1ms) rollback transaction
5412
+  (0.1ms) begin transaction
5413
+ -------------------------------------------
5414
+ HasPublicId::UtilTest: test_char_set.length
5415
+ -------------------------------------------
5416
+  (0.2ms) rollback transaction
5417
+  (0.1ms) begin transaction
5418
+ --------------------------------------------------
5419
+ HasPublicId::UtilTest: test_generate_random_suffix
5420
+ --------------------------------------------------
5421
+  (0.1ms) rollback transaction
5422
+  (0.1ms) begin transaction
5423
+ ----------------------------------------------------------
5424
+ HasPublicId::UtilTest: test_generate_random_suffix(length)
5425
+ ----------------------------------------------------------
5426
+  (0.1ms) rollback transaction
5427
+  (0.1ms) begin transaction
5428
+ ------------------------------------------------------------
5429
+ HasPublicId::UtilTest: test_new_public_id(with_blank_prefix)
5430
+ ------------------------------------------------------------
5431
+  (0.1ms) rollback transaction
5432
+  (0.1ms) begin transaction
5433
+ ------------------------------------------------------------
5434
+ HasPublicId::UtilTest: test_new_public_id(with_false_prefix)
5435
+ ------------------------------------------------------------
5436
+  (0.1ms) rollback transaction
5437
+  (0.1ms) begin transaction
5438
+ ---------------------------------------------------------
5439
+ HasPublicId::UtilTest: test_new_public_id(with_join_with)
5440
+ ---------------------------------------------------------
5441
+  (0.1ms) rollback transaction
5442
+  (0.1ms) begin transaction
5443
+ ----------------------------------------------------------
5444
+ HasPublicId::UtilTest: test_new_public_id(with_nil_prefix)
5445
+ ----------------------------------------------------------
5446
+  (0.1ms) rollback transaction
5447
+  (0.1ms) begin transaction
5448
+ ------------------------------------------------------
5449
+ HasPublicId::UtilTest: test_new_public_id(with_prefix)
5450
+ ------------------------------------------------------
5451
+  (0.1ms) rollback transaction
5452
+  (0.1ms) begin transaction
5453
+ ---------------------------
5454
+ HasPublicIdTest: test_Mixin
5455
+ ---------------------------
5456
+  (0.1ms) rollback transaction
5457
+  (0.1ms) begin transaction
5458
+ Fixture Delete (0.3ms) DELETE FROM "users"
5459
+ Fixture Insert (0.2ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2014-03-13 17:41:33', '2014-03-13 17:41:33', 980190962)
5460
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2014-03-13 17:41:33', '2014-03-13 17:41:33', 298486374)
5461
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2014-03-13 17:41:33', '2014-03-13 17:41:33', 113629430)
5462
+  (0.8ms) commit transaction
5463
+  (0.1ms) begin transaction
5464
+ --------------------------------
5465
+ UserTest: test_find_by_public_id
5466
+ --------------------------------
5467
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-XkWMjdMtQzPU' LIMIT 1
5468
+  (0.1ms) SAVEPOINT active_record_1
5469
+ SQL (5.6ms) INSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Mar 2014 17:41:33 UTC +00:00], ["ident", "user-XkWMjdMtQzPU"], ["name", "joey"], ["updated_at", Thu, 13 Mar 2014 17:41:33 UTC +00:00]]
5470
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5471
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'user-XkWMjdMtQzPU' ORDER BY "users"."id" ASC LIMIT 1
5472
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
5473
+  (0.5ms) rollback transaction
5474
+  (0.1ms) begin transaction
5475
+ ---------------------------------
5476
+ UserTest: test_find_by_public_id!
5477
+ ---------------------------------
5478
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-rbh3TRnrK3Cr' LIMIT 1
5479
+  (0.1ms) SAVEPOINT active_record_1
5480
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "ident", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Mar 2014 17:41:33 UTC +00:00], ["ident", "user-rbh3TRnrK3Cr"], ["name", "joey"], ["updated_at", Thu, 13 Mar 2014 17:41:33 UTC +00:00]]
5481
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5482
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'user-rbh3TRnrK3Cr' ORDER BY "users"."id" ASC LIMIT 1
5483
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" = 'bad_key' ORDER BY "users"."id" ASC LIMIT 1
5484
+  (0.5ms) rollback transaction
5485
+  (0.1ms) begin transaction
5486
+ ---------------------------------------
5487
+ UserTest: test_identifier_doesnt_change
5488
+ ---------------------------------------
5489
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-MZqjZ4s6Xxjo' LIMIT 1
5490
+  (0.0ms) SAVEPOINT active_record_1
5491
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "ident", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 13 Mar 2014 17:41:33 UTC +00:00], ["ident", "user-MZqjZ4s6Xxjo"], ["updated_at", Thu, 13 Mar 2014 17:41:33 UTC +00:00]]
5492
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5493
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
5494
+  (0.1ms) SAVEPOINT active_record_1
5495
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5496
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
5497
+  (0.4ms) rollback transaction
5498
+  (0.1ms) begin transaction
5499
+ -------------------------------------
5500
+ UserTest: test_identifier_initializes
5501
+ -------------------------------------
5502
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-cKb7GW2w0Jom' LIMIT 1
5503
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-DTKSRW7U0Hxt' LIMIT 1
5504
+  (0.1ms) rollback transaction
5505
+  (0.1ms) begin transaction
5506
+ -------------------------------------
5507
+ UserTest: test_initialize_public_ids!
5508
+ -------------------------------------
5509
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
5510
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ident" IS NULL ORDER BY "users"."id" ASC LIMIT 1000
5511
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-2AFiXusm2Z7b' LIMIT 1
5512
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-17cgrrI3GLaG' LIMIT 1
5513
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-ZnmdmclX5KdA' LIMIT 1
5514
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-DMZj3vQgEekA' LIMIT 1
5515
+  (0.0ms) SAVEPOINT active_record_1
5516
+ SQL (0.4ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 113629430 [["ident", "user-DMZj3vQgEekA"], ["updated_at", Thu, 13 Mar 2014 17:41:33 UTC +00:00]]
5517
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5518
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-wofksgdROwnj' LIMIT 1
5519
+  (0.0ms) SAVEPOINT active_record_1
5520
+ SQL (1.0ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 298486374 [["ident", "user-wofksgdROwnj"], ["updated_at", Thu, 13 Mar 2014 17:41:33 UTC +00:00]]
5521
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5522
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-8qmfL6Yi5f3P' LIMIT 1
5523
+  (0.0ms) SAVEPOINT active_record_1
5524
+ SQL (0.2ms) UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = 980190962 [["ident", "user-8qmfL6Yi5f3P"], ["updated_at", Thu, 13 Mar 2014 17:41:33 UTC +00:00]]
5525
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5526
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
5527
+  (0.4ms) rollback transaction
5528
+  (0.1ms) begin transaction
5529
+ ----------------------------
5530
+ UserTest: test_new_public_id
5531
+ ----------------------------
5532
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-hsPIzEm2Wc4j' LIMIT 1
5533
+  (0.0ms) rollback transaction
5534
+  (0.0ms) begin transaction
5535
+ ----------------------------------
5536
+ UserTest: test_sets_public_id_attr
5537
+ ----------------------------------
5538
+  (0.0ms) rollback transaction
5539
+  (0.1ms) begin transaction
5540
+ ------------------------------------------
5541
+ UserTest: test_to_param_matches_identifier
5542
+ ------------------------------------------
5543
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ident" = 'user-UZUbiOQs0Ho4' LIMIT 1
5544
+  (0.1ms) rollback transaction
@@ -0,0 +1,13 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ one:
4
+ name: Sammy
5
+ ident:
6
+
7
+ two:
8
+ name: Joe
9
+ ident:
10
+
11
+ three:
12
+ name: Susan
13
+ ident:
@@ -0,0 +1,27 @@
1
+ require 'test_helper'
2
+
3
+ class AdminTest < ActiveSupport::TestCase
4
+ fixtures :admins
5
+ self.use_transactional_fixtures = true
6
+
7
+ test "inherited_class_has_public_id_attr" do
8
+ assert Admin.respond_to?(:public_id_attr)
9
+ assert_equal User.public_id_attr, Admin.public_id_attr
10
+ end
11
+
12
+ test "identifier_initializes_from_parent" do
13
+ assert Admin.new.ident.present?, "should have an id when initialized"
14
+ assert_equal Admin.new.ident.first(5), 'user-', "should have a 3 letter prefix from the class name"
15
+ end
16
+
17
+ test "identifier_doesnt_change" do
18
+ u = Admin.new
19
+ identifier = u.ident
20
+ u.save!
21
+ u.reload
22
+ assert_equal identifier, u.ident, "doesn't match after create"
23
+ u.save!
24
+ u.reload
25
+ assert_equal identifier, u.ident, "doesn't match after update"
26
+ end
27
+ end
metadata CHANGED
@@ -1,46 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_public_id
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
5
- prerelease:
4
+ version: 1.1.6
6
5
  platform: ruby
7
6
  authors:
8
7
  - Graham Melcher
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-01-10 00:00:00.000000000 Z
11
+ date: 2014-11-05 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: 4.0.2
19
+ version: '4.0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: 4.0.2
26
+ version: '4.0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: sqlite3
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  description: Allows for the easy creation and use of random, unique record identifiers
@@ -52,23 +47,27 @@ executables: []
52
47
  extensions: []
53
48
  extra_rdoc_files: []
54
49
  files:
50
+ - MIT-LICENSE
51
+ - README.md
52
+ - Rakefile
53
+ - lib/has_public_id.rb
55
54
  - lib/has_public_id/activerecord/mixin.rb
56
55
  - lib/has_public_id/util.rb
57
56
  - lib/has_public_id/version.rb
58
- - lib/has_public_id.rb
59
57
  - lib/tasks/public_id_tasks.rake
60
- - MIT-LICENSE
61
- - Rakefile
62
- - README.md
58
+ - test/dummy/README.rdoc
59
+ - test/dummy/Rakefile
63
60
  - test/dummy/app/assets/javascripts/application.js
64
61
  - test/dummy/app/assets/stylesheets/application.css
65
62
  - test/dummy/app/controllers/application_controller.rb
66
63
  - test/dummy/app/helpers/application_helper.rb
64
+ - test/dummy/app/models/admin.rb
67
65
  - test/dummy/app/models/user.rb
68
66
  - test/dummy/app/views/layouts/application.html.erb
69
67
  - test/dummy/bin/bundle
70
68
  - test/dummy/bin/rails
71
69
  - test/dummy/bin/rake
70
+ - test/dummy/config.ru
72
71
  - test/dummy/config/application.rb
73
72
  - test/dummy/config/boot.rb
74
73
  - test/dummy/config/database.yml
@@ -85,7 +84,6 @@ files:
85
84
  - test/dummy/config/initializers/wrap_parameters.rb
86
85
  - test/dummy/config/locales/en.yml
87
86
  - test/dummy/config/routes.rb
88
- - test/dummy/config.ru
89
87
  - test/dummy/db/development.sqlite3
90
88
  - test/dummy/db/migrate/20140109180823_create_users.rb
91
89
  - test/dummy/db/schema.rb
@@ -96,41 +94,41 @@ files:
96
94
  - test/dummy/public/422.html
97
95
  - test/dummy/public/500.html
98
96
  - test/dummy/public/favicon.ico
99
- - test/dummy/Rakefile
100
- - test/dummy/README.rdoc
97
+ - test/dummy/test/fixtures/admins.yml
101
98
  - test/dummy/test/fixtures/users.yml
99
+ - test/dummy/test/models/admin_test.rb
102
100
  - test/dummy/test/models/user_test.rb
103
101
  - test/has_public_id_test.rb
104
102
  - test/test_helper.rb
105
103
  homepage: https://github.com/hinthealth/has_public_id
106
104
  licenses: []
105
+ metadata: {}
107
106
  post_install_message:
108
107
  rdoc_options: []
109
108
  require_paths:
110
109
  - lib
111
110
  required_ruby_version: !ruby/object:Gem::Requirement
112
- none: false
113
111
  requirements:
114
- - - ! '>='
112
+ - - ">="
115
113
  - !ruby/object:Gem::Version
116
114
  version: '0'
117
115
  required_rubygems_version: !ruby/object:Gem::Requirement
118
- none: false
119
116
  requirements:
120
- - - ! '>='
117
+ - - ">="
121
118
  - !ruby/object:Gem::Version
122
119
  version: '0'
123
120
  requirements: []
124
121
  rubyforge_project:
125
- rubygems_version: 1.8.23
122
+ rubygems_version: 2.2.2
126
123
  signing_key:
127
- specification_version: 3
124
+ specification_version: 4
128
125
  summary: Random, unique identifiers for activerecord models
129
126
  test_files:
130
127
  - test/dummy/app/assets/javascripts/application.js
131
128
  - test/dummy/app/assets/stylesheets/application.css
132
129
  - test/dummy/app/controllers/application_controller.rb
133
130
  - test/dummy/app/helpers/application_helper.rb
131
+ - test/dummy/app/models/admin.rb
134
132
  - test/dummy/app/models/user.rb
135
133
  - test/dummy/app/views/layouts/application.html.erb
136
134
  - test/dummy/bin/bundle
@@ -165,7 +163,9 @@ test_files:
165
163
  - test/dummy/public/favicon.ico
166
164
  - test/dummy/Rakefile
167
165
  - test/dummy/README.rdoc
166
+ - test/dummy/test/fixtures/admins.yml
168
167
  - test/dummy/test/fixtures/users.yml
168
+ - test/dummy/test/models/admin_test.rb
169
169
  - test/dummy/test/models/user_test.rb
170
170
  - test/has_public_id_test.rb
171
171
  - test/test_helper.rb