ix 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25ff4bbf09f8ae54bf43c92cb8b86acef7a41ab4
4
- data.tar.gz: 53c4238e7f40592fe69071bd14a3b0f58717f51f
3
+ metadata.gz: 629087762c275b706e93c3258e0f9b644a79d43c
4
+ data.tar.gz: 1645afc407cfc25da7518f32e31dc952cf5e430b
5
5
  SHA512:
6
- metadata.gz: 3b7447e2f97e92cf9795c8895dfc9c7abb26e1203acadd74436c500be09561171d5c3fb1602ec766e411430eb4a9e90097449623f455c1061e75170b75e79cfe
7
- data.tar.gz: 180c4e048a4be4604e898e4954ea88007cff6de771e7969789e1f5b32511dd3b52bf05bd42b37c00c0d2b6485f27dc7f8a64a9ffc0d1f84b99d3d33aa16ab178
6
+ metadata.gz: 230c142bfee16c3f55a33a72e48ca1a6f8f911acb2ffcebf8eef6c0f36804aa04059907aff017c6a5d55ba6e9f3c39ae7ee6e7d17425c5f9e00a8220cc4500d2
7
+ data.tar.gz: c9de3e460433884213f4ab987c5809c7fbe0e4bb02fb991854bc06587b9e941600f780e31da72665c93e1e5545b0a52ef0d770c09665dd0e022c2224be12c0c8
data/lib/ix/has_ix.rb CHANGED
@@ -4,7 +4,7 @@ module Ix
4
4
  extend ActiveSupport::Concern
5
5
 
6
6
  included do
7
- before_save :set_ix_if_empty
7
+ before_save :set_ix
8
8
  end
9
9
 
10
10
  module ClassMethods
@@ -16,10 +16,6 @@ module Ix
16
16
  include Ix::HasIx::LocalInstanceMethods
17
17
  end
18
18
 
19
- def has_ix?
20
- self.column_names.include? "ix"
21
- end
22
-
23
19
  def find_ix(ix)
24
20
  self.find_by ix: ix
25
21
  end
@@ -35,27 +31,20 @@ module Ix
35
31
 
36
32
  module LocalInstanceMethods
37
33
 
38
- def has_ix?
39
- self.class.has_ix?
40
- end
41
-
42
34
  def ix?
43
- self.has_ix? && self.ix ? self.ix : false
35
+ self.has_attribute? :ix
44
36
  end
45
37
 
46
38
  private
47
39
 
48
40
  def set_ix
49
- if self.has_ix?
41
+ if self.ix? && self.ix.blank?
50
42
  begin
51
43
  self.ix = SecureRandom.hex(self.ix_length)
52
44
  end while self.class.exists?(ix: self.ix)
53
45
  end
54
46
  end
55
-
56
- def set_ix_if_empty
57
- set_ix if self.has_ix? && !ix?
58
- end
47
+
59
48
  end
60
49
 
61
50
  end
data/lib/ix/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ix
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -1313,5 +1313,349 @@ HasIxTest: test_should_be_able_to_regenerate_ix
1313
1313
   (0.1ms) begin transaction
1314
1314
  ------------------
1315
1315
  IxTest: test_truth
1316
+ ------------------
1317
+  (0.0ms) rollback transaction
1318
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1319
+  (0.1ms) begin transaction
1320
+ ------------------
1321
+ IxTest: test_truth
1322
+ ------------------
1323
+  (0.0ms) rollback transaction
1324
+  (0.0ms) begin transaction
1325
+ ------------------------------------------------------------
1326
+ HasIxTest: test_fill_blank_ixs_should_result_in_no_blank_ixs
1327
+ ------------------------------------------------------------
1328
+  (0.0ms) SAVEPOINT active_record_1
1329
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1330
+  (0.1ms) rollback transaction
1331
+  (0.1ms) begin transaction
1332
+ --------------------------------------------
1333
+ HasIxTest: test_find_ix_should_recall_object
1334
+ --------------------------------------------
1335
+  (0.0ms) SAVEPOINT active_record_1
1336
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1337
+  (0.0ms) rollback transaction
1338
+  (0.1ms) begin transaction
1339
+ ------------------------------------------
1340
+ HasIxTest: test_set_ix_should_generate_hex
1341
+ ------------------------------------------
1342
+  (0.0ms) SAVEPOINT active_record_1
1343
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1344
+  (0.1ms) rollback transaction
1345
+  (0.1ms) begin transaction
1346
+ -----------------------------------------------
1347
+ HasIxTest: test_should_be_able_to_regenerate_ix
1348
+ -----------------------------------------------
1349
+  (0.0ms) SAVEPOINT active_record_1
1350
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1351
+  (0.0ms) rollback transaction
1352
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1353
+  (0.1ms) begin transaction
1354
+ ------------------------------------------------------------
1355
+ HasIxTest: test_fill_blank_ixs_should_result_in_no_blank_ixs
1356
+ ------------------------------------------------------------
1357
+  (0.0ms) SAVEPOINT active_record_1
1358
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1359
+  (0.1ms) rollback transaction
1360
+  (0.1ms) begin transaction
1361
+ --------------------------------------------
1362
+ HasIxTest: test_find_ix_should_recall_object
1363
+ --------------------------------------------
1364
+  (0.0ms) SAVEPOINT active_record_1
1365
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1366
+  (0.0ms) rollback transaction
1367
+  (0.1ms) begin transaction
1368
+ ------------------------------------------
1369
+ HasIxTest: test_set_ix_should_generate_hex
1370
+ ------------------------------------------
1371
+  (0.0ms) SAVEPOINT active_record_1
1372
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1373
+  (0.0ms) rollback transaction
1374
+  (0.1ms) begin transaction
1375
+ -----------------------------------------------
1376
+ HasIxTest: test_should_be_able_to_regenerate_ix
1377
+ -----------------------------------------------
1378
+  (0.0ms) SAVEPOINT active_record_1
1379
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1380
+  (0.0ms) rollback transaction
1381
+  (0.0ms) begin transaction
1382
+ ------------------
1383
+ IxTest: test_truth
1384
+ ------------------
1385
+  (0.0ms) rollback transaction
1386
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1387
+  (0.1ms) begin transaction
1388
+ ------------------------------------------------------------
1389
+ HasIxTest: test_fill_blank_ixs_should_result_in_no_blank_ixs
1390
+ ------------------------------------------------------------
1391
+  (0.0ms) SAVEPOINT active_record_1
1392
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '635d20d7' LIMIT 1
1393
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:51:47.906305"], ["ix", "635d20d7"], ["updated_at", "2014-06-04 16:51:47.906305"]]
1394
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1395
+  (0.0ms) SAVEPOINT active_record_1
1396
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = 'cd07519a' LIMIT 1
1397
+ SQL (0.4ms) UPDATE "users" SET "ix" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["ix", "cd07519a"], ["updated_at", "2014-06-04 16:51:47.910938"]]
1398
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1399
+  (0.0ms) SAVEPOINT active_record_1
1400
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '0667281f' LIMIT 1
1401
+ SQL (0.1ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:51:47.913407"], ["ix", "0667281f"], ["updated_at", "2014-06-04 16:51:47.913407"]]
1402
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1403
+  (0.0ms) SAVEPOINT active_record_1
1404
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '48f8f801' LIMIT 1
1405
+ SQL (0.1ms) UPDATE "users" SET "ix" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["ix", "48f8f801"], ["updated_at", "2014-06-04 16:51:47.914829"]]
1406
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1407
+  (0.0ms) SAVEPOINT active_record_1
1408
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '28a223dd' LIMIT 1
1409
+ SQL (0.1ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:51:47.915898"], ["ix", "28a223dd"], ["updated_at", "2014-06-04 16:51:47.915898"]]
1410
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1411
+  (0.0ms) SAVEPOINT active_record_1
1412
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '6149570d' LIMIT 1
1413
+ SQL (0.1ms) UPDATE "users" SET "ix" = ?, "updated_at" = ? WHERE "users"."id" = 3 [["ix", "6149570d"], ["updated_at", "2014-06-04 16:51:47.916952"]]
1414
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1415
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ix" IS NULL
1416
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE "users"."ix" IS NULL
1417
+  (0.8ms) rollback transaction
1418
+  (0.1ms) begin transaction
1419
+ --------------------------------------------
1420
+ HasIxTest: test_find_ix_should_recall_object
1421
+ --------------------------------------------
1422
+  (0.0ms) SAVEPOINT active_record_1
1423
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '2ce3c8e7' LIMIT 1
1424
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:51:47.920672"], ["ix", "2ce3c8e7"], ["updated_at", "2014-06-04 16:51:47.920672"]]
1425
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1426
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ix" = '2ce3c8e7' LIMIT 1
1427
+  (0.6ms) rollback transaction
1428
+  (0.0ms) begin transaction
1429
+ ------------------------------------------
1430
+ HasIxTest: test_set_ix_should_generate_hex
1431
+ ------------------------------------------
1432
+  (0.0ms) SAVEPOINT active_record_1
1433
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '1b48a4fc' LIMIT 1
1434
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:51:47.924295"], ["ix", "1b48a4fc"], ["updated_at", "2014-06-04 16:51:47.924295"]]
1435
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1436
+  (0.5ms) rollback transaction
1437
+  (0.0ms) begin transaction
1438
+ -----------------------------------------------
1439
+ HasIxTest: test_should_be_able_to_regenerate_ix
1440
+ -----------------------------------------------
1441
+  (0.0ms) SAVEPOINT active_record_1
1442
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = 'c914afe3' LIMIT 1
1443
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:51:47.926931"], ["ix", "c914afe3"], ["updated_at", "2014-06-04 16:51:47.926931"]]
1444
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1445
+  (0.0ms) SAVEPOINT active_record_1
1446
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = 'cab606a2' LIMIT 1
1447
+ SQL (0.3ms) UPDATE "users" SET "ix" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["ix", "cab606a2"], ["updated_at", "2014-06-04 16:51:47.928341"]]
1448
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1449
+  (0.6ms) rollback transaction
1450
+  (0.0ms) begin transaction
1451
+ ------------------
1452
+ IxTest: test_truth
1453
+ ------------------
1454
+  (0.0ms) rollback transaction
1455
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1456
+  (0.1ms) begin transaction
1457
+ ------------------------------------------------------------
1458
+ HasIxTest: test_fill_blank_ixs_should_result_in_no_blank_ixs
1459
+ ------------------------------------------------------------
1460
+  (0.0ms) SAVEPOINT active_record_1
1461
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = 'ede2fc74' LIMIT 1
1462
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:53:07.168487"], ["ix", "ede2fc74"], ["updated_at", "2014-06-04 16:53:07.168487"]]
1463
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1464
+  (0.0ms) SAVEPOINT active_record_1
1465
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '4ded7036' LIMIT 1
1466
+ SQL (0.5ms) UPDATE "users" SET "ix" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["ix", "4ded7036"], ["updated_at", "2014-06-04 16:53:07.172801"]]
1467
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1468
+  (0.0ms) SAVEPOINT active_record_1
1469
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '1db7a5d7' LIMIT 1
1470
+ SQL (0.1ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:53:07.175165"], ["ix", "1db7a5d7"], ["updated_at", "2014-06-04 16:53:07.175165"]]
1471
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1472
+  (0.0ms) SAVEPOINT active_record_1
1473
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '0b1abdf9' LIMIT 1
1474
+ SQL (0.1ms) UPDATE "users" SET "ix" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["ix", "0b1abdf9"], ["updated_at", "2014-06-04 16:53:07.176545"]]
1475
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1476
+  (0.0ms) SAVEPOINT active_record_1
1477
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '41736d91' LIMIT 1
1478
+ SQL (0.1ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:53:07.177639"], ["ix", "41736d91"], ["updated_at", "2014-06-04 16:53:07.177639"]]
1479
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1480
+  (0.0ms) SAVEPOINT active_record_1
1481
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '5355feb2' LIMIT 1
1482
+ SQL (0.1ms) UPDATE "users" SET "ix" = ?, "updated_at" = ? WHERE "users"."id" = 3 [["ix", "5355feb2"], ["updated_at", "2014-06-04 16:53:07.178698"]]
1483
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1484
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ix" IS NULL
1485
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE "users"."ix" IS NULL
1486
+  (1.5ms) rollback transaction
1487
+  (0.1ms) begin transaction
1488
+ --------------------------------------------
1489
+ HasIxTest: test_find_ix_should_recall_object
1490
+ --------------------------------------------
1491
+  (0.1ms) SAVEPOINT active_record_1
1492
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '06254785' LIMIT 1
1493
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:53:07.183676"], ["ix", "06254785"], ["updated_at", "2014-06-04 16:53:07.183676"]]
1494
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1495
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ix" = '06254785' LIMIT 1
1496
+  (0.5ms) rollback transaction
1497
+  (0.1ms) begin transaction
1498
+ ------------------------------------------
1499
+ HasIxTest: test_set_ix_should_generate_hex
1500
+ ------------------------------------------
1501
+  (0.0ms) SAVEPOINT active_record_1
1502
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = 'beec0631' LIMIT 1
1503
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:53:07.186773"], ["ix", "beec0631"], ["updated_at", "2014-06-04 16:53:07.186773"]]
1504
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1505
+  (0.5ms) rollback transaction
1506
+  (0.1ms) begin transaction
1507
+ -----------------------------------------------
1508
+ HasIxTest: test_should_be_able_to_regenerate_ix
1509
+ -----------------------------------------------
1510
+  (0.1ms) SAVEPOINT active_record_1
1511
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '27123aac' LIMIT 1
1512
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:53:07.190208"], ["ix", "27123aac"], ["updated_at", "2014-06-04 16:53:07.190208"]]
1513
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1514
+  (0.0ms) SAVEPOINT active_record_1
1515
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '991c2f90' LIMIT 1
1516
+ SQL (0.4ms) UPDATE "users" SET "ix" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["ix", "991c2f90"], ["updated_at", "2014-06-04 16:53:07.191730"]]
1517
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1518
+  (0.7ms) rollback transaction
1519
+  (0.1ms) begin transaction
1520
+ ------------------
1521
+ IxTest: test_truth
1522
+ ------------------
1523
+  (0.0ms) rollback transaction
1524
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1525
+  (0.1ms) begin transaction
1526
+ ------------------------------------------------------------
1527
+ HasIxTest: test_fill_blank_ixs_should_result_in_no_blank_ixs
1528
+ ------------------------------------------------------------
1529
+  (0.0ms) SAVEPOINT active_record_1
1530
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '53249cc1' LIMIT 1
1531
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:53:24.997509"], ["ix", "53249cc1"], ["updated_at", "2014-06-04 16:53:24.997509"]]
1532
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1533
+  (0.0ms) SAVEPOINT active_record_1
1534
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = 'ba66efed' LIMIT 1
1535
+ SQL (0.4ms) UPDATE "users" SET "ix" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["ix", "ba66efed"], ["updated_at", "2014-06-04 16:53:25.001589"]]
1536
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1537
+  (0.0ms) SAVEPOINT active_record_1
1538
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '8b77d7bd' LIMIT 1
1539
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:53:25.004507"], ["ix", "8b77d7bd"], ["updated_at", "2014-06-04 16:53:25.004507"]]
1540
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1541
+  (0.1ms) SAVEPOINT active_record_1
1542
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = 'ebc991cd' LIMIT 1
1543
+ SQL (0.1ms) UPDATE "users" SET "ix" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["ix", "ebc991cd"], ["updated_at", "2014-06-04 16:53:25.006699"]]
1544
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1545
+  (0.0ms) SAVEPOINT active_record_1
1546
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '264c1459' LIMIT 1
1547
+ SQL (0.1ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:53:25.008282"], ["ix", "264c1459"], ["updated_at", "2014-06-04 16:53:25.008282"]]
1548
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1549
+  (0.0ms) SAVEPOINT active_record_1
1550
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = 'da86bd80' LIMIT 1
1551
+ SQL (0.1ms) UPDATE "users" SET "ix" = ?, "updated_at" = ? WHERE "users"."id" = 3 [["ix", "da86bd80"], ["updated_at", "2014-06-04 16:53:25.009758"]]
1552
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1553
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ix" IS NULL
1554
+  (0.2ms) SELECT COUNT(*) FROM "users" WHERE "users"."ix" IS NULL
1555
+  (1.2ms) rollback transaction
1556
+  (0.1ms) begin transaction
1557
+ --------------------------------------------
1558
+ HasIxTest: test_find_ix_should_recall_object
1559
+ --------------------------------------------
1560
+  (0.0ms) SAVEPOINT active_record_1
1561
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = 'd1988dc4' LIMIT 1
1562
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:53:25.014888"], ["ix", "d1988dc4"], ["updated_at", "2014-06-04 16:53:25.014888"]]
1563
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1564
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ix" = 'd1988dc4' LIMIT 1
1565
+  (0.6ms) rollback transaction
1566
+  (0.1ms) begin transaction
1567
+ ------------------------------------------
1568
+ HasIxTest: test_set_ix_should_generate_hex
1569
+ ------------------------------------------
1570
+  (0.0ms) SAVEPOINT active_record_1
1571
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '3c284d26' LIMIT 1
1572
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:53:25.018539"], ["ix", "3c284d26"], ["updated_at", "2014-06-04 16:53:25.018539"]]
1573
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1574
+  (0.4ms) rollback transaction
1575
+  (0.1ms) begin transaction
1576
+ -----------------------------------------------
1577
+ HasIxTest: test_should_be_able_to_regenerate_ix
1578
+ -----------------------------------------------
1579
+  (0.1ms) SAVEPOINT active_record_1
1580
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '433ad63c' LIMIT 1
1581
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:53:25.022127"], ["ix", "433ad63c"], ["updated_at", "2014-06-04 16:53:25.022127"]]
1582
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1583
+  (0.1ms) SAVEPOINT active_record_1
1584
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '2f7fb0f6' LIMIT 1
1585
+ SQL (0.3ms) UPDATE "users" SET "ix" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["ix", "2f7fb0f6"], ["updated_at", "2014-06-04 16:53:25.024253"]]
1586
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1587
+  (0.6ms) rollback transaction
1588
+  (0.1ms) begin transaction
1589
+ ------------------
1590
+ IxTest: test_truth
1591
+ ------------------
1592
+  (0.0ms) rollback transaction
1593
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1594
+  (0.1ms) begin transaction
1595
+ ------------------------------------------------------------
1596
+ HasIxTest: test_fill_blank_ixs_should_result_in_no_blank_ixs
1597
+ ------------------------------------------------------------
1598
+  (0.0ms) SAVEPOINT active_record_1
1599
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '793ba5f9' LIMIT 1
1600
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:54:38.837442"], ["ix", "793ba5f9"], ["updated_at", "2014-06-04 16:54:38.837442"]]
1601
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1602
+  (0.0ms) SAVEPOINT active_record_1
1603
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = 'd0942612' LIMIT 1
1604
+ SQL (0.4ms) UPDATE "users" SET "ix" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["ix", "d0942612"], ["updated_at", "2014-06-04 16:54:38.841553"]]
1605
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1606
+  (0.0ms) SAVEPOINT active_record_1
1607
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = 'df6aa7b9' LIMIT 1
1608
+ SQL (0.1ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:54:38.843796"], ["ix", "df6aa7b9"], ["updated_at", "2014-06-04 16:54:38.843796"]]
1609
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1610
+  (0.0ms) SAVEPOINT active_record_1
1611
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '2329491f' LIMIT 1
1612
+ SQL (0.1ms) UPDATE "users" SET "ix" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["ix", "2329491f"], ["updated_at", "2014-06-04 16:54:38.845158"]]
1613
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1614
+  (0.0ms) SAVEPOINT active_record_1
1615
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = 'eafd99f0' LIMIT 1
1616
+ SQL (0.1ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:54:38.846252"], ["ix", "eafd99f0"], ["updated_at", "2014-06-04 16:54:38.846252"]]
1617
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1618
+  (0.1ms) SAVEPOINT active_record_1
1619
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '02ea9535' LIMIT 1
1620
+ SQL (0.2ms) UPDATE "users" SET "ix" = ?, "updated_at" = ? WHERE "users"."id" = 3 [["ix", "02ea9535"], ["updated_at", "2014-06-04 16:54:38.847808"]]
1621
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1622
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ix" IS NULL
1623
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE "users"."ix" IS NULL
1624
+  (0.7ms) rollback transaction
1625
+  (0.1ms) begin transaction
1626
+ --------------------------------------------
1627
+ HasIxTest: test_find_ix_should_recall_object
1628
+ --------------------------------------------
1629
+  (0.1ms) SAVEPOINT active_record_1
1630
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '8cc37b01' LIMIT 1
1631
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:54:38.853326"], ["ix", "8cc37b01"], ["updated_at", "2014-06-04 16:54:38.853326"]]
1632
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1633
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."ix" = '8cc37b01' LIMIT 1
1634
+  (0.5ms) rollback transaction
1635
+  (0.1ms) begin transaction
1636
+ ------------------------------------------
1637
+ HasIxTest: test_set_ix_should_generate_hex
1638
+ ------------------------------------------
1639
+  (0.0ms) SAVEPOINT active_record_1
1640
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = 'bcabafd2' LIMIT 1
1641
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:54:38.857222"], ["ix", "bcabafd2"], ["updated_at", "2014-06-04 16:54:38.857222"]]
1642
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1643
+  (0.6ms) rollback transaction
1644
+  (0.1ms) begin transaction
1645
+ -----------------------------------------------
1646
+ HasIxTest: test_should_be_able_to_regenerate_ix
1647
+ -----------------------------------------------
1648
+  (0.0ms) SAVEPOINT active_record_1
1649
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = 'ab2a4715' LIMIT 1
1650
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "ix", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-04 16:54:38.861076"], ["ix", "ab2a4715"], ["updated_at", "2014-06-04 16:54:38.861076"]]
1651
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1652
+  (0.0ms) SAVEPOINT active_record_1
1653
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."ix" = '1623fc3b' LIMIT 1
1654
+ SQL (0.3ms) UPDATE "users" SET "ix" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["ix", "1623fc3b"], ["updated_at", "2014-06-04 16:54:38.862985"]]
1655
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1656
+  (0.6ms) rollback transaction
1657
+  (0.1ms) begin transaction
1658
+ ------------------
1659
+ IxTest: test_truth
1316
1660
  ------------------
1317
1661
   (0.0ms) rollback transaction
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Heard