unconstrained 0.0.1 → 0.0.2

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: 8d05edc3199daf558da30f3d0cc90d57fd177487
4
- data.tar.gz: 6b85606e59e0fc1786dfbe049f27ed259b002697
3
+ metadata.gz: 282b04262286a7a1ca54945f8b5868db75935418
4
+ data.tar.gz: 81277c497320af06e70f856fd35dcdcd6075901c
5
5
  SHA512:
6
- metadata.gz: 8db10e923a8b458c05b070cbcb7805e0d7119f60197c67185292dd4bb8da73e286643a7b72a06ad905b30ce1c71ae8e24f54954c1a0a2c0734bcbfa065c03df2
7
- data.tar.gz: 2e8e454857106c9a05ef95a9cbbf92757ee35b984865d2a4c87a8097921cfbeb7e2274c887b52e01ecde3bb7094cf384a8fbc997e58e542d881255cf8649d16e
6
+ metadata.gz: a731af0d27a655f3ce0c526c702162ec3993b2f4692878c13573882ab12cd5383b57ff43e6e900fdb37cc5452e048455a0a79a84401d183171246e8aa8bc791d
7
+ data.tar.gz: 99f61bf95c0c759074ec1af7b373e59a34e663960a9f9021ee34fcf69a5e11166f3d3f1014a36f2c2dc168e05d7ffc1127a10149d29385f72ad137ebbc0e09e1
@@ -15,9 +15,9 @@ module Unconstrained
15
15
 
16
16
  protected
17
17
 
18
- def save_with_constraints_handling
18
+ def save_with_constraints_handling(*args)
19
19
  with_constraints_handling :save do
20
- save_without_constraints_handling
20
+ save_without_constraints_handling(*args)
21
21
  end
22
22
  end
23
23
 
@@ -1,3 +1,3 @@
1
1
  module Unconstrained
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -1257,3 +1257,50 @@ DETAIL: Key (id)=(1024804656) is still referenced from table "children".
1257
1257
   (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
1258
1258
   (0.4ms) SELECT COUNT(*) FROM "parents"
1259
1259
   (0.1ms) ROLLBACK
1260
+ ActiveRecord::SchemaMigration Load (1.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
1261
+  (4.9ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
1262
+  (0.3ms) BEGIN
1263
+ Fixture Delete (1.2ms) DELETE FROM "children"
1264
+ Fixture Insert (0.4ms) INSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)
1265
+ Fixture Delete (1.2ms) DELETE FROM "parents"
1266
+ Fixture Insert (1.0ms) INSERT INTO "parents" ("id") VALUES (1024804656)
1267
+ Fixture Insert (0.2ms) INSERT INTO "parents" ("id") VALUES (1002356086)
1268
+  (2.6ms) COMMIT
1269
+  (2.6ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
1270
+  (0.1ms) BEGIN
1271
+ ----------------------------------------------------------
1272
+ DestroyTest: test_destroyed_without_foreign_key_constraint
1273
+ ----------------------------------------------------------
1274
+ Parent Load (0.2ms) SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1002356086]]
1275
+  (0.2ms) SELECT COUNT(*) FROM "parents"
1276
+  (0.1ms) SAVEPOINT active_record_1
1277
+ SQL (0.8ms) DELETE FROM "parents" WHERE "parents"."id" = $1 [["id", 1002356086]]
1278
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1279
+  (0.3ms) SELECT COUNT(*) FROM "parents"
1280
+  (0.3ms) ROLLBACK
1281
+  (0.1ms) BEGIN
1282
+ ----------------------------------------------------------------------
1283
+ DestroyTest: test_foreign_key_constraint_converted_to_validation_error
1284
+ ----------------------------------------------------------------------
1285
+ Parent Load (0.2ms) SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
1286
+  (0.2ms) SELECT COUNT(*) FROM "parents"
1287
+  (0.1ms) SAVEPOINT active_record_1
1288
+ SQL (0.8ms) DELETE FROM "parents" WHERE "parents"."id" = $1 [["id", 1024804656]]
1289
+ PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
1290
+ DETAIL: Key (id)=(1024804656) is still referenced from table "children".
1291
+ : DELETE FROM "parents" WHERE "parents"."id" = $1
1292
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
1293
+  (0.5ms) SELECT COUNT(*) FROM "parents"
1294
+  (0.4ms) ROLLBACK
1295
+  (0.3ms) BEGIN
1296
+ -------------------------------------------------------------------
1297
+ SaveTest: test_foreign_key_constraint_converted_to_validation_error
1298
+ -------------------------------------------------------------------
1299
+ Child Load (0.3ms) SELECT "children".* FROM "children" WHERE "children"."id" = $1 LIMIT 1 [["id", 980190962]]
1300
+  (0.2ms) SAVEPOINT active_record_1
1301
+ SQL (0.5ms) UPDATE "children" SET "parent_id" = $1 WHERE "children"."id" = $2 [["parent_id", 221917195], ["id", 980190962]]
1302
+ PG::ForeignKeyViolation: ERROR: insert or update on table "children" violates foreign key constraint "fk_rails_2d768a42d4"
1303
+ DETAIL: Key (parent_id)=(221917195) is not present in table "parents".
1304
+ : UPDATE "children" SET "parent_id" = $1 WHERE "children"."id" = $2
1305
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1306
+  (0.1ms) ROLLBACK
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unconstrained
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandros Giouzenis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-07 00:00:00.000000000 Z
11
+ date: 2015-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails