has_public_id 1.1.9 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/has_public_id/activerecord/mixin.rb +2 -1
- data/lib/has_public_id/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +318 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1bfdbb495ebd35dbba710e54a1257df584866df
|
4
|
+
data.tar.gz: d3d051f8b14977452ea29855986d5c4cfcf45e3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f41e94856864dc1d828892b7c17da23dbe1dc888d97acf0f36c95bd6a686033e7281f7a43cd35f3332ecdb6678916885e6d7eeb6e28a4673e2f6f95763360e1
|
7
|
+
data.tar.gz: 7b44432e54df200836978eb51aa1ab48247c94b71e46974c7727fec43b1ce3a8f6939299008595169f37137e6a48732ddbc2b4e2796d6414201cb668d3e9f0bf
|
@@ -38,7 +38,8 @@ module HasPublicId
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def find_by_public_id!(public_id)
|
41
|
-
where(self.public_id_attr => public_id).first
|
41
|
+
where(self.public_id_attr => public_id).first or
|
42
|
+
raise ::ActiveRecord::RecordNotFound.new("Couldn't find #{self.name} with #{public_id}")
|
42
43
|
end
|
43
44
|
|
44
45
|
def new_public_id
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/test/dummy/log/test.log
CHANGED
@@ -164,3 +164,321 @@ AdminTest: test_identifier_initializes_from_parent
|
|
164
164
|
AdminTest: test_inherited_class_has_public_id_attr
|
165
165
|
--------------------------------------------------
|
166
166
|
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
167
|
+
[1m[36mActiveRecord::SchemaMigration Load (2.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
168
|
+
[1m[36m (3.4ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "ident" varchar, "created_at" datetime, "updated_at" datetime) [0m
|
169
|
+
[1m[35m (2.9ms)[0m CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
|
170
|
+
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
171
|
+
[1m[35m (7.1ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
172
|
+
[1m[36m (0.2ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
173
|
+
[1m[35m (3.4ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140109180823')
|
174
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
175
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
176
|
+
---------------------------
|
177
|
+
HasPublicIdTest: test_Mixin
|
178
|
+
---------------------------
|
179
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
180
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
181
|
+
-------------------------------------------
|
182
|
+
HasPublicId::UtilTest: test_char_set.length
|
183
|
+
-------------------------------------------
|
184
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
185
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
186
|
+
--------------------------------------------------
|
187
|
+
HasPublicId::UtilTest: test_generate_random_suffix
|
188
|
+
--------------------------------------------------
|
189
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
190
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
191
|
+
----------------------------------------------------------
|
192
|
+
HasPublicId::UtilTest: test_generate_random_suffix(length)
|
193
|
+
----------------------------------------------------------
|
194
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
195
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
196
|
+
------------------------------------------------------------
|
197
|
+
HasPublicId::UtilTest: test_new_public_id(with_blank_prefix)
|
198
|
+
------------------------------------------------------------
|
199
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
200
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
201
|
+
------------------------------------------------------------
|
202
|
+
HasPublicId::UtilTest: test_new_public_id(with_false_prefix)
|
203
|
+
------------------------------------------------------------
|
204
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
205
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
206
|
+
---------------------------------------------------------
|
207
|
+
HasPublicId::UtilTest: test_new_public_id(with_join_with)
|
208
|
+
---------------------------------------------------------
|
209
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
210
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
211
|
+
----------------------------------------------------------
|
212
|
+
HasPublicId::UtilTest: test_new_public_id(with_nil_prefix)
|
213
|
+
----------------------------------------------------------
|
214
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
215
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
216
|
+
------------------------------------------------------
|
217
|
+
HasPublicId::UtilTest: test_new_public_id(with_prefix)
|
218
|
+
------------------------------------------------------
|
219
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
220
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
221
|
+
[1m[35mFixture Delete (0.7ms)[0m DELETE FROM "users"
|
222
|
+
[1m[36mFixture Insert (0.3ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2016-02-05 21:33:27', '2016-02-05 21:33:27', 980190962)[0m
|
223
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2016-02-05 21:33:27', '2016-02-05 21:33:27', 298486374)
|
224
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2016-02-05 21:33:27', '2016-02-05 21:33:27', 113629430)[0m
|
225
|
+
[1m[35m (3.0ms)[0m commit transaction
|
226
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
227
|
+
----------------------------------------
|
228
|
+
AdminTest: test_identifier_doesnt_change
|
229
|
+
----------------------------------------
|
230
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
231
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "users" ("ident", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["ident", "user-MXz6H95kNbFp"], ["created_at", "2016-02-05 21:33:27.154883"], ["updated_at", "2016-02-05 21:33:27.154883"]]
|
232
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
233
|
+
[1m[36mAdmin Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190963]]
|
234
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
235
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
236
|
+
[1m[35mAdmin Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
|
237
|
+
[1m[36m (2.7ms)[0m [1mrollback transaction[0m
|
238
|
+
[1m[35m (0.1ms)[0m begin transaction
|
239
|
+
--------------------------------------------------
|
240
|
+
AdminTest: test_identifier_initializes_from_parent
|
241
|
+
--------------------------------------------------
|
242
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
243
|
+
[1m[35m (0.1ms)[0m begin transaction
|
244
|
+
--------------------------------------------------
|
245
|
+
AdminTest: test_inherited_class_has_public_id_attr
|
246
|
+
--------------------------------------------------
|
247
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
248
|
+
[1m[35m (0.1ms)[0m begin transaction
|
249
|
+
[1m[36mFixture Delete (0.3ms)[0m [1mDELETE FROM "users"[0m
|
250
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2016-02-05 21:33:27', '2016-02-05 21:33:27', 980190962)
|
251
|
+
[1m[36mFixture Insert (0.3ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2016-02-05 21:33:27', '2016-02-05 21:33:27', 298486374)[0m
|
252
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2016-02-05 21:33:27', '2016-02-05 21:33:27', 113629430)
|
253
|
+
[1m[36m (2.9ms)[0m [1mcommit transaction[0m
|
254
|
+
[1m[35m (0.1ms)[0m begin transaction
|
255
|
+
--------------------------------
|
256
|
+
UserTest: test_find_by_public_id
|
257
|
+
--------------------------------
|
258
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
259
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "joey"], ["ident", "user-HqCHNgEUBpoP"], ["created_at", "2016-02-05 21:33:27.195234"], ["updated_at", "2016-02-05 21:33:27.195234"]]
|
260
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
261
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."ident" = ? ORDER BY "users"."id" ASC LIMIT 1 [["ident", "user-HqCHNgEUBpoP"]]
|
262
|
+
[1m[36mUser Load (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."ident" = ? ORDER BY "users"."id" ASC LIMIT 1[0m [["ident", "bad_key"]]
|
263
|
+
[1m[35m (2.3ms)[0m rollback transaction
|
264
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
265
|
+
---------------------------------
|
266
|
+
UserTest: test_find_by_public_id!
|
267
|
+
---------------------------------
|
268
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
269
|
+
[1m[36mSQL (0.9ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["name", "joey"], ["ident", "user-0CU1pcnM1wDu"], ["created_at", "2016-02-05 21:33:27.202109"], ["updated_at", "2016-02-05 21:33:27.202109"]]
|
270
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
271
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."ident" = ? ORDER BY "users"."id" ASC LIMIT 1[0m [["ident", "user-0CU1pcnM1wDu"]]
|
272
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."ident" = ? ORDER BY "users"."id" ASC LIMIT 1 [["ident", "bad_key"]]
|
273
|
+
[1m[36m (2.5ms)[0m [1mrollback transaction[0m
|
274
|
+
[1m[35m (0.1ms)[0m begin transaction
|
275
|
+
---------------------------------------
|
276
|
+
UserTest: test_identifier_doesnt_change
|
277
|
+
---------------------------------------
|
278
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
279
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("ident", "created_at", "updated_at") VALUES (?, ?, ?) [["ident", "user-dIgWNS6L7PCc"], ["created_at", "2016-02-05 21:33:27.214495"], ["updated_at", "2016-02-05 21:33:27.214495"]]
|
280
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
281
|
+
[1m[35mUser Load (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
|
282
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
283
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
284
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190963]]
|
285
|
+
[1m[35m (2.5ms)[0m rollback transaction
|
286
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
287
|
+
-------------------------------------
|
288
|
+
UserTest: test_identifier_initializes
|
289
|
+
-------------------------------------
|
290
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
291
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
292
|
+
-------------------------------------
|
293
|
+
UserTest: test_initialize_public_ids!
|
294
|
+
-------------------------------------
|
295
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
|
296
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."ident" IS NULL ORDER BY "users"."id" ASC LIMIT 1000[0m
|
297
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
298
|
+
[1m[36mSQL (0.7ms)[0m [1mUPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = ?[0m [["ident", "user-hFFnwEbGAmOG"], ["updated_at", "2016-02-05 21:33:27.227392"], ["id", 113629430]]
|
299
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
300
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
301
|
+
[1m[35mSQL (1.6ms)[0m UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = ? [["ident", "user-E1ZcXFxYXPKa"], ["updated_at", "2016-02-05 21:33:27.236238"], ["id", 298486374]]
|
302
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
303
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
304
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = ?[0m [["ident", "user-fMO5DfGm5uqa"], ["updated_at", "2016-02-05 21:33:27.240549"], ["id", 980190962]]
|
305
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
306
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL[0m
|
307
|
+
[1m[35m (2.4ms)[0m rollback transaction
|
308
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
309
|
+
----------------------------
|
310
|
+
UserTest: test_new_public_id
|
311
|
+
----------------------------
|
312
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
313
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
314
|
+
------------------------------------------
|
315
|
+
UserTest: test_to_param_matches_identifier
|
316
|
+
------------------------------------------
|
317
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
318
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
319
|
+
-------------------------------
|
320
|
+
UserTest: test_use_group-by_sql
|
321
|
+
-------------------------------
|
322
|
+
[1m[35mUser Load (0.1ms)[0m SELECT name, count(name) as count FROM "users" GROUP BY "users"."name"
|
323
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
324
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
|
325
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
326
|
+
[1m[36mActiveRecord::SchemaMigration Load (2.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
327
|
+
[1m[36m (3.5ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "ident" varchar, "created_at" datetime, "updated_at" datetime) [0m
|
328
|
+
[1m[35m (2.5ms)[0m CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
|
329
|
+
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
330
|
+
[1m[35m (3.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
331
|
+
[1m[36m (0.2ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
332
|
+
[1m[35m (3.4ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140109180823')
|
333
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
334
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
335
|
+
-------------------------------------------
|
336
|
+
HasPublicId::UtilTest: test_char_set.length
|
337
|
+
-------------------------------------------
|
338
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
339
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
340
|
+
--------------------------------------------------
|
341
|
+
HasPublicId::UtilTest: test_generate_random_suffix
|
342
|
+
--------------------------------------------------
|
343
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
344
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
345
|
+
----------------------------------------------------------
|
346
|
+
HasPublicId::UtilTest: test_generate_random_suffix(length)
|
347
|
+
----------------------------------------------------------
|
348
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
349
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
350
|
+
------------------------------------------------------------
|
351
|
+
HasPublicId::UtilTest: test_new_public_id(with_blank_prefix)
|
352
|
+
------------------------------------------------------------
|
353
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
354
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
355
|
+
------------------------------------------------------------
|
356
|
+
HasPublicId::UtilTest: test_new_public_id(with_false_prefix)
|
357
|
+
------------------------------------------------------------
|
358
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
359
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
360
|
+
---------------------------------------------------------
|
361
|
+
HasPublicId::UtilTest: test_new_public_id(with_join_with)
|
362
|
+
---------------------------------------------------------
|
363
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
364
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
365
|
+
----------------------------------------------------------
|
366
|
+
HasPublicId::UtilTest: test_new_public_id(with_nil_prefix)
|
367
|
+
----------------------------------------------------------
|
368
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
369
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
370
|
+
------------------------------------------------------
|
371
|
+
HasPublicId::UtilTest: test_new_public_id(with_prefix)
|
372
|
+
------------------------------------------------------
|
373
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
374
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
375
|
+
[1m[35mFixture Delete (0.4ms)[0m DELETE FROM "users"
|
376
|
+
[1m[36mFixture Insert (0.3ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2016-02-05 21:35:05', '2016-02-05 21:35:05', 980190962)[0m
|
377
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2016-02-05 21:35:05', '2016-02-05 21:35:05', 298486374)
|
378
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2016-02-05 21:35:05', '2016-02-05 21:35:05', 113629430)[0m
|
379
|
+
[1m[35m (2.7ms)[0m commit transaction
|
380
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
381
|
+
----------------------------------------
|
382
|
+
AdminTest: test_identifier_doesnt_change
|
383
|
+
----------------------------------------
|
384
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
385
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("ident", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["ident", "user-8yHqN5gUQ8Ra"], ["created_at", "2016-02-05 21:35:05.326839"], ["updated_at", "2016-02-05 21:35:05.326839"]]
|
386
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
387
|
+
[1m[36mAdmin Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190963]]
|
388
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
389
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
390
|
+
[1m[35mAdmin Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
|
391
|
+
[1m[36m (2.6ms)[0m [1mrollback transaction[0m
|
392
|
+
[1m[35m (0.1ms)[0m begin transaction
|
393
|
+
--------------------------------------------------
|
394
|
+
AdminTest: test_identifier_initializes_from_parent
|
395
|
+
--------------------------------------------------
|
396
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
397
|
+
[1m[35m (0.1ms)[0m begin transaction
|
398
|
+
--------------------------------------------------
|
399
|
+
AdminTest: test_inherited_class_has_public_id_attr
|
400
|
+
--------------------------------------------------
|
401
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
402
|
+
[1m[35m (0.1ms)[0m begin transaction
|
403
|
+
---------------------------
|
404
|
+
HasPublicIdTest: test_Mixin
|
405
|
+
---------------------------
|
406
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
407
|
+
[1m[35m (0.1ms)[0m begin transaction
|
408
|
+
[1m[36mFixture Delete (0.4ms)[0m [1mDELETE FROM "users"[0m
|
409
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Sammy', NULL, '2016-02-05 21:35:05', '2016-02-05 21:35:05', 980190962)
|
410
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Joe', NULL, '2016-02-05 21:35:05', '2016-02-05 21:35:05', 298486374)[0m
|
411
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at", "id") VALUES ('Susan', NULL, '2016-02-05 21:35:05', '2016-02-05 21:35:05', 113629430)
|
412
|
+
[1m[36m (5.5ms)[0m [1mcommit transaction[0m
|
413
|
+
[1m[35m (0.1ms)[0m begin transaction
|
414
|
+
--------------------------------
|
415
|
+
UserTest: test_find_by_public_id
|
416
|
+
--------------------------------
|
417
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
418
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("name", "ident", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "joey"], ["ident", "user-09fvydt2coTM"], ["created_at", "2016-02-05 21:35:05.369491"], ["updated_at", "2016-02-05 21:35:05.369491"]]
|
419
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
420
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."ident" = ? ORDER BY "users"."id" ASC LIMIT 1 [["ident", "user-09fvydt2coTM"]]
|
421
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."ident" = ? ORDER BY "users"."id" ASC LIMIT 1[0m [["ident", "bad_key"]]
|
422
|
+
[1m[35m (2.4ms)[0m rollback transaction
|
423
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
424
|
+
---------------------------------
|
425
|
+
UserTest: test_find_by_public_id!
|
426
|
+
---------------------------------
|
427
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
428
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("name", "ident", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["name", "joey"], ["ident", "user-lgjyVNmYKczE"], ["created_at", "2016-02-05 21:35:05.378736"], ["updated_at", "2016-02-05 21:35:05.378736"]]
|
429
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
430
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."ident" = ? ORDER BY "users"."id" ASC LIMIT 1[0m [["ident", "user-lgjyVNmYKczE"]]
|
431
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."ident" = ? ORDER BY "users"."id" ASC LIMIT 1 [["ident", "bad_key"]]
|
432
|
+
[1m[36m (2.4ms)[0m [1mrollback transaction[0m
|
433
|
+
[1m[35m (0.1ms)[0m begin transaction
|
434
|
+
---------------------------------------
|
435
|
+
UserTest: test_identifier_doesnt_change
|
436
|
+
---------------------------------------
|
437
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
438
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("ident", "created_at", "updated_at") VALUES (?, ?, ?) [["ident", "user-o7DzcKyoy2SJ"], ["created_at", "2016-02-05 21:35:05.386432"], ["updated_at", "2016-02-05 21:35:05.386432"]]
|
439
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
440
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190963]]
|
441
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
442
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
443
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190963]]
|
444
|
+
[1m[35m (2.4ms)[0m rollback transaction
|
445
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
446
|
+
-------------------------------------
|
447
|
+
UserTest: test_identifier_initializes
|
448
|
+
-------------------------------------
|
449
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
450
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
451
|
+
-------------------------------------
|
452
|
+
UserTest: test_initialize_public_ids!
|
453
|
+
-------------------------------------
|
454
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL
|
455
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."ident" IS NULL ORDER BY "users"."id" ASC LIMIT 1000[0m
|
456
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
457
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = ?[0m [["ident", "user-ASgink06Op7A"], ["updated_at", "2016-02-05 21:35:05.400636"], ["id", 113629430]]
|
458
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
459
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
460
|
+
[1m[35mSQL (0.9ms)[0m UPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = ? [["ident", "user-3hWkIM6uwPk7"], ["updated_at", "2016-02-05 21:35:05.402726"], ["id", 298486374]]
|
461
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
462
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
463
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "users" SET "ident" = ?, "updated_at" = ? WHERE "users"."id" = ?[0m [["ident", "user-tpFhvulmBOGj"], ["updated_at", "2016-02-05 21:35:05.404728"], ["id", 980190962]]
|
464
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
465
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "users" WHERE "users"."ident" IS NULL[0m
|
466
|
+
[1m[35m (2.2ms)[0m rollback transaction
|
467
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
468
|
+
----------------------------
|
469
|
+
UserTest: test_new_public_id
|
470
|
+
----------------------------
|
471
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
472
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
473
|
+
------------------------------------------
|
474
|
+
UserTest: test_to_param_matches_identifier
|
475
|
+
------------------------------------------
|
476
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
477
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
478
|
+
-------------------------------
|
479
|
+
UserTest: test_use_group-by_sql
|
480
|
+
-------------------------------
|
481
|
+
[1m[35mUser Load (0.2ms)[0m SELECT name, count(name) as count FROM "users" GROUP BY "users"."name"
|
482
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
483
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
|
484
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
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.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Graham Melcher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|