document_number 0.9.1 → 0.9.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 +4 -4
- data/lib/document_number/numerator.rb +1 -1
- data/lib/document_number/version.rb +1 -1
- data/spec/dummy/log/test.log +156 -0
- data/spec/models/price_adjustment_spec.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0a0cbf12a92d015fa9bb072ab1ff7717e5a913d
|
4
|
+
data.tar.gz: 82a7fb6dcb97a47984505e1517e07dd4f39b84eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18ea438afa26865a9c3fa249414c1ddeec859973a6a7e0414d2a2b35259bbb633f6de45ff2b3052922b012af52e19660a31afaf95c305a38978f61d118e406b0
|
7
|
+
data.tar.gz: 6203e40d6826f65adc7ab27c0f9b084a8423ca5b76352e2ed4dc9900a2bb257f25023a3edd001c995e4f167588269a78d070e02396a6c5e7c1dadc965ba804b0
|
data/spec/dummy/log/test.log
CHANGED
@@ -471,3 +471,159 @@
|
|
471
471
|
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-06-11 05:22:06.312973"], ["document_number", "500"], ["updated_at", "2014-06-11 05:22:06.312973"]]
|
472
472
|
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
473
473
|
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
474
|
+
[1m[36m (2.3ms)[0m [1mCREATE TABLE "document_numbers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document" varchar(255), "number" integer DEFAULT 1 NOT NULL, "created_at" datetime) [0m
|
475
|
+
[1m[35m (0.5ms)[0m select sqlite_version(*)
|
476
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_document_numbers_on_document" ON "document_numbers" ("document")[0m
|
477
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "inventories" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime)
|
478
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "invoices" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
479
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "price_adjustments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document_number" varchar(255), "created_at" datetime, "updated_at" datetime)
|
480
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
481
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
482
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
483
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140610093243')
|
484
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140610080445')[0m
|
485
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140610090526')
|
486
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140610093227')[0m
|
487
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
488
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
489
|
+
[1m[36mDocumentNumber::DocumentNumber Load (0.1ms)[0m [1mSELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1[0m
|
490
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:42:40.441127"], ["document", "price_adjustment"], ["number", 2]]
|
491
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-06-11 05:42:40.423886"], ["document_number", "500"], ["updated_at", "2014-06-11 05:42:40.423886"]]
|
492
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
493
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
494
|
+
[1m[35mDocumentNumber::DocumentNumber Load (0.1ms)[0m SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1
|
495
|
+
[1m[36mSQL (1.0ms)[0m [1mUPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1[0m [["number", 3]]
|
496
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:42:40.447431"], ["document_number", "2"], ["updated_at", "2014-06-11 05:42:40.447431"]]
|
497
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
498
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
499
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
500
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
501
|
+
[1m[36mDocumentNumber::DocumentNumber Load (0.2ms)[0m [1mSELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1[0m
|
502
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:42:40.454303"], ["document", "price_adjustment"], ["number", 2]]
|
503
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-06-11 05:42:40.453135"], ["document_number", "500"], ["updated_at", "2014-06-11 05:42:40.453135"]]
|
504
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
505
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
506
|
+
[1m[35m (0.1ms)[0m begin transaction
|
507
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
508
|
+
[1m[35mDocumentNumber::DocumentNumber Load (0.2ms)[0m SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1
|
509
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?)[0m [["created_at", "2014-06-11 05:42:40.459221"], ["document", "price_adjustment"], ["number", 2]]
|
510
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:42:40.458065"], ["document_number", "500"], ["updated_at", "2014-06-11 05:42:40.458065"]]
|
511
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
512
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
513
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
514
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
515
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-06-11 05:42:40.465383"], ["number", "5"], ["updated_at", "2014-06-11 05:42:40.465383"]]
|
516
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
517
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
518
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "inventories" SET "updated_at" = '2014-06-11 05:42:40.466829' WHERE "inventories"."id" = 1
|
519
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
520
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
521
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
522
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
523
|
+
[1m[36mDocumentNumber::DocumentNumber Load (0.1ms)[0m [1mSELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1[0m
|
524
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:42:40.470749"], ["document", "inventory"], ["number", 2]]
|
525
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-06-11 05:42:40.469694"], ["number", "1"], ["updated_at", "2014-06-11 05:42:40.469694"]]
|
526
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
527
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
528
|
+
[1m[35mDocumentNumber::DocumentNumber Load (0.1ms)[0m SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1
|
529
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1[0m [["number", 3]]
|
530
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:42:40.472457"], ["number", "2"], ["updated_at", "2014-06-11 05:42:40.472457"]]
|
531
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
532
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
533
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
534
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
535
|
+
[1m[36mDocumentNumber::DocumentNumber Load (0.1ms)[0m [1mSELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1[0m
|
536
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:42:40.477324"], ["document", "inventory"], ["number", 2]]
|
537
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-06-11 05:42:40.476261"], ["number", "1"], ["updated_at", "2014-06-11 05:42:40.476261"]]
|
538
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
539
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
540
|
+
[1m[35m (0.1ms)[0m begin transaction
|
541
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
542
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:42:40.480717"], ["number", "500"], ["updated_at", "2014-06-11 05:42:40.480717"]]
|
543
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
544
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
545
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
546
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
547
|
+
[1m[36mDocumentNumber::DocumentNumber Load (0.1ms)[0m [1mSELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1[0m
|
548
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:42:40.487541"], ["document", "invoice"], ["number", 2]]
|
549
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "invoices" ("created_at", "number", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-06-11 05:42:40.484362"], ["number", "invoice/1"], ["updated_at", "2014-06-11 05:42:40.484362"]]
|
550
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
551
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
552
|
+
[1m[36m (3.7ms)[0m [1mCREATE TABLE "document_numbers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document" varchar(255), "number" integer DEFAULT 1 NOT NULL, "created_at" datetime) [0m
|
553
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
554
|
+
[1m[36m (1.0ms)[0m [1mCREATE UNIQUE INDEX "index_document_numbers_on_document" ON "document_numbers" ("document")[0m
|
555
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "inventories" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime)
|
556
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "invoices" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
557
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "price_adjustments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document_number" varchar(255), "created_at" datetime, "updated_at" datetime)
|
558
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
559
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
560
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
561
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140610093243')
|
562
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140610080445')[0m
|
563
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140610090526')
|
564
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140610093227')[0m
|
565
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
566
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
567
|
+
[1m[36mDocumentNumber::DocumentNumber Load (0.1ms)[0m [1mSELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1[0m
|
568
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:43:06.981532"], ["document", "price_adjustment"], ["number", 501]]
|
569
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-06-11 05:43:06.968593"], ["document_number", "500"], ["updated_at", "2014-06-11 05:43:06.968593"]]
|
570
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
571
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
572
|
+
[1m[35mDocumentNumber::DocumentNumber Load (0.1ms)[0m SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1
|
573
|
+
[1m[36mSQL (0.9ms)[0m [1mUPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1[0m [["number", 502]]
|
574
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:43:06.991165"], ["document_number", "501"], ["updated_at", "2014-06-11 05:43:06.991165"]]
|
575
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
576
|
+
[1m[35m (2.7ms)[0m rollback transaction
|
577
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
578
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
579
|
+
[1m[36mDocumentNumber::DocumentNumber Load (0.2ms)[0m [1mSELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1[0m
|
580
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:43:07.001192"], ["document", "price_adjustment"], ["number", 501]]
|
581
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-06-11 05:43:07.000014"], ["document_number", "500"], ["updated_at", "2014-06-11 05:43:07.000014"]]
|
582
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
583
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
584
|
+
[1m[35m (0.1ms)[0m begin transaction
|
585
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
586
|
+
[1m[35mDocumentNumber::DocumentNumber Load (0.1ms)[0m SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1
|
587
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?)[0m [["created_at", "2014-06-11 05:43:07.005250"], ["document", "price_adjustment"], ["number", 501]]
|
588
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:43:07.004198"], ["document_number", "500"], ["updated_at", "2014-06-11 05:43:07.004198"]]
|
589
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
590
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
591
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
592
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
593
|
+
[1m[36mDocumentNumber::DocumentNumber Load (0.1ms)[0m [1mSELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1[0m
|
594
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:43:07.013368"], ["document", "invoice"], ["number", 2]]
|
595
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "invoices" ("created_at", "number", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-06-11 05:43:07.009325"], ["number", "invoice/1"], ["updated_at", "2014-06-11 05:43:07.009325"]]
|
596
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
597
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
598
|
+
[1m[35m (0.1ms)[0m begin transaction
|
599
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
600
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:43:07.020049"], ["number", "5"], ["updated_at", "2014-06-11 05:43:07.020049"]]
|
601
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
602
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
603
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "inventories" SET "updated_at" = '2014-06-11 05:43:07.021554' WHERE "inventories"."id" = 1[0m
|
604
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
605
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
606
|
+
[1m[35m (0.1ms)[0m begin transaction
|
607
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
608
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:43:07.023987"], ["number", "500"], ["updated_at", "2014-06-11 05:43:07.023987"]]
|
609
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
610
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
611
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
612
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
613
|
+
[1m[36mDocumentNumber::DocumentNumber Load (0.2ms)[0m [1mSELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1[0m
|
614
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:43:07.027768"], ["document", "inventory"], ["number", 2]]
|
615
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-06-11 05:43:07.026530"], ["number", "1"], ["updated_at", "2014-06-11 05:43:07.026530"]]
|
616
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
617
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
618
|
+
[1m[35m (0.0ms)[0m begin transaction
|
619
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
620
|
+
[1m[35mDocumentNumber::DocumentNumber Load (0.2ms)[0m SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1
|
621
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?)[0m [["created_at", "2014-06-11 05:43:07.032071"], ["document", "inventory"], ["number", 2]]
|
622
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:43:07.030731"], ["number", "1"], ["updated_at", "2014-06-11 05:43:07.030731"]]
|
623
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
624
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
625
|
+
[1m[36mDocumentNumber::DocumentNumber Load (0.1ms)[0m [1mSELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1[0m
|
626
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 3]]
|
627
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-06-11 05:43:07.033904"], ["number", "2"], ["updated_at", "2014-06-11 05:43:07.033904"]]
|
628
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
629
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
@@ -10,4 +10,9 @@ describe PriceAdjustment do
|
|
10
10
|
price_adjustment = PriceAdjustment.create
|
11
11
|
expect(price_adjustment.document_number).to eq('500')
|
12
12
|
end
|
13
|
+
|
14
|
+
it 'has sequence of numbers' do
|
15
|
+
expect(PriceAdjustment.create.document_number).to eq('500')
|
16
|
+
expect(PriceAdjustment.create.document_number).to eq('501')
|
17
|
+
end
|
13
18
|
end
|