gov_uk_date_fields 2.1.0 → 2.1.1

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: 472230a568d16c4155ead72d2175582a01640823
4
- data.tar.gz: ccb7ce8153b68582b93041913f043366eda91a77
3
+ metadata.gz: 7b7af703f8ba2a4de344ed2fabe0c3500bb2bd46
4
+ data.tar.gz: 8e7ab223ca4a164b8348cc022b33e0d64cb02eb1
5
5
  SHA512:
6
- metadata.gz: 4901ce395964a852febbf078ddbd6165ea8052bd7c90885021a0ea6dfbd682802de9283127a1c877e2d85c827250193e0cdc6ed725c21cc50eb006501a9673e8
7
- data.tar.gz: d59ffe1bee1329ed0197e932ca5f3835097e1c64553d0adc7997d500fa9d872562ef7d1034503c340d95c035ea455677c89e8a9fd6012a28d49dfc11c97c1cf8
6
+ metadata.gz: 8a4c9930dcabb591e120e96381f8edc309a2240927a043c6b0b063fcc245f761a1dc5084a87d74adba07ac5beadead6e58afae6f6c12897a6107717585efa145
7
+ data.tar.gz: 6b4c523b92740abeae81d74c128a520f3c5b013bf012ec5704b08eedb30128a4436e2e1fe2c72b11c79ebb75a0e98d7713bd41f4ccfcabdcbde9749a86b9f870
@@ -21,9 +21,9 @@ module GovUkDateFields
21
21
  @object_name = object_name
22
22
  @attribute = attribute
23
23
  @options = options
24
- @day_value = @object.send("#{@attribute}_dd").gsub(/\D/, '')
25
- @month_value = @object.send("#{@attribute}_mm").gsub(/\D/, '')
26
- @year_value = @object.send("#{@attribute}_yyyy").gsub(/\D/, '')
24
+ @day_value = @object.send("#{@attribute}_dd")&.gsub(/\D/, '')
25
+ @month_value = @object.send("#{@attribute}_mm")&.gsub(/\D/, '')
26
+ @year_value = @object.send("#{@attribute}_yyyy")&.gsub(/\D/, '')
27
27
  @form_hint_text = @options[:form_hint_text] || "For example, 31 3 1980"
28
28
  @fieldset_required = false
29
29
  @fieldset_id = @options[:id]
@@ -1,3 +1,3 @@
1
1
  module GovUkDateFields
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  end
@@ -7350,3 +7350,428 @@ EmployeeTest: test_that_form_population_values_can_be_extracted_from_the_date_fi
7350
7350
  EmployeeTest: test_invalid_day_raises_error
7351
7351
  -------------------------------------------
7352
7352
   (0.1ms) ROLLBACK
7353
+ ActiveRecord::SchemaMigration Load (2.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
7354
+  (0.2ms) BEGIN
7355
+ --------------------------------------------
7356
+ EmployeeTest: test_nil_dates_raise_no_errors
7357
+ --------------------------------------------
7358
+  (0.1ms) ROLLBACK
7359
+  (0.1ms) BEGIN
7360
+ -------------------------------------------------------------------------
7361
+ EmployeeTest: test_updating_existing_record_with_invalid_dates_is_invalid
7362
+ -------------------------------------------------------------------------
7363
+  (0.1ms) SAVEPOINT active_record_1
7364
+ SQL (2.0ms) INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "John"], ["dob", Tue, 13 Aug 1963], ["joined", Mon, 21 Apr 2014], ["created_at", 2017-11-28 10:34:59 UTC], ["updated_at", 2017-11-28 10:34:59 UTC]]
7365
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7366
+  (0.1ms) SAVEPOINT active_record_1
7367
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
7368
+  (0.1ms) ROLLBACK
7369
+  (0.1ms) BEGIN
7370
+ ------------------------------------------------------------------------
7371
+ EmployeeTest: test_creating_a_new_employee_with_invalid_dates_is_invalid
7372
+ ------------------------------------------------------------------------
7373
+  (0.1ms) ROLLBACK
7374
+  (0.1ms) BEGIN
7375
+ ----------------------------------------------------------------------------------------------
7376
+ EmployeeTest: test_no_argument_error_is_raised_if_parseable_string_is_assigned_to_a_date_field
7377
+ ----------------------------------------------------------------------------------------------
7378
+  (0.1ms) ROLLBACK
7379
+  (0.1ms) BEGIN
7380
+ ----------------------------------------------
7381
+ EmployeeTest: test_valid_dates_raise_no_errors
7382
+ ----------------------------------------------
7383
+  (0.1ms) ROLLBACK
7384
+  (0.1ms) BEGIN
7385
+ ----------------------------------------------------------------------------------------------------------------
7386
+ EmployeeTest: test_that_the_calling_the_field_name_on_employee_will_return_the_date_part_of_the_form_date_object
7387
+ ----------------------------------------------------------------------------------------------------------------
7388
+  (0.1ms) ROLLBACK
7389
+  (0.1ms) BEGIN
7390
+ ---------------------------------------------------------------------------------------------------------
7391
+ EmployeeTest: test_that_argument_error_is_raised_if_unparseable_string_object_is_assigned_to_a_date_field
7392
+ ---------------------------------------------------------------------------------------------------------
7393
+  (0.1ms) ROLLBACK
7394
+  (0.1ms) BEGIN
7395
+ ------------------------------------------------------------------------------------------
7396
+ EmployeeTest: test_employee_instance_has_form_date_instance_variables_for_each_gov_uk_date
7397
+ ------------------------------------------------------------------------------------------
7398
+  (0.1ms) ROLLBACK
7399
+  (0.1ms) BEGIN
7400
+ ---------------------------------------------------------------------
7401
+ EmployeeTest: test_createing_a_new_employee_with_valid_dates_is_valid
7402
+ ---------------------------------------------------------------------
7403
+  (0.1ms) ROLLBACK
7404
+  (0.1ms) BEGIN
7405
+ -----------------------------------------------------------
7406
+ EmployeeTest: test_that_nil_can_be_assigned_to_a_date_field
7407
+ -----------------------------------------------------------
7408
+  (0.1ms) ROLLBACK
7409
+  (0.1ms) BEGIN
7410
+ -----------------------------------------------------------------------------------
7411
+ EmployeeTest: test_that_form_population_values_can_be_extracted_from_the_date_field
7412
+ -----------------------------------------------------------------------------------
7413
+  (0.1ms) ROLLBACK
7414
+  (0.1ms) BEGIN
7415
+ -----------------------------------------------------------------------
7416
+ EmployeeTest: test_that_we_can_assign_new_dates_to_the_form_date_object
7417
+ -----------------------------------------------------------------------
7418
+  (0.1ms) ROLLBACK
7419
+  (0.0ms) BEGIN
7420
+ -------------------------------------------
7421
+ EmployeeTest: test_invalid_day_raises_error
7422
+ -------------------------------------------
7423
+  (0.1ms) ROLLBACK
7424
+  (0.1ms) BEGIN
7425
+ --------------------------------------------------------------------------
7426
+ EmployeeTest: test_employee_has_class_variable_describing_all_gov_uk_dates
7427
+ --------------------------------------------------------------------------
7428
+  (0.1ms) ROLLBACK
7429
+  (0.0ms) BEGIN
7430
+ -----------------------------------------------------------
7431
+ EmployeeTest: test_new_dates_can_be_populated_from_the_form
7432
+ -----------------------------------------------------------
7433
+  (0.1ms) ROLLBACK
7434
+  (0.0ms) BEGIN
7435
+ -------------------------------------------------------------------------------------------------------------------
7436
+ EmployeeTest: test_argument_error_is_raised_if_an_object_that_doesnt_respond_to_to_date_is_assigned_to_a_date_field
7437
+ -------------------------------------------------------------------------------------------------------------------
7438
+  (0.0ms) ROLLBACK
7439
+  (0.0ms) BEGIN
7440
+ ---------------------------------------------------------------------
7441
+ EmployeeTest: test_updating_existing_record_with_valid_dates_is_valid
7442
+ ---------------------------------------------------------------------
7443
+  (0.0ms) SAVEPOINT active_record_1
7444
+ SQL (0.1ms) INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "John"], ["dob", Tue, 13 Aug 1963], ["joined", Mon, 21 Apr 2014], ["created_at", 2017-11-28 10:34:59 UTC], ["updated_at", 2017-11-28 10:34:59 UTC]]
7445
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7446
+  (0.0ms) SAVEPOINT active_record_1
7447
+ SQL (0.3ms) UPDATE "employees" SET "dob" = $1, "updated_at" = $2 WHERE "employees"."id" = $3 [["dob", Mon, 17 May 1965], ["updated_at", 2017-11-28 10:34:59 UTC], ["id", 643]]
7448
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7449
+  (0.1ms) ROLLBACK
7450
+  (0.1ms) BEGIN
7451
+ -----------------------------------------------------------------
7452
+ EmployeeTest: test_employee_class_responds_to_acts_as_gov_uk_date
7453
+ -----------------------------------------------------------------
7454
+  (0.1ms) ROLLBACK
7455
+  (0.1ms) BEGIN
7456
+ -----------------------------------------------------------
7457
+ GovUkDateFieldsTest: test_fieldset_output_with_legend_class
7458
+ -----------------------------------------------------------
7459
+  (0.1ms) ROLLBACK
7460
+  (0.1ms) BEGIN
7461
+ ----------------------------------------------------------------------------------
7462
+ GovUkDateFieldsTest: test_fieldset_output_with_today_button_with_css_class_applied
7463
+ ----------------------------------------------------------------------------------
7464
+  (0.1ms) ROLLBACK
7465
+  (0.1ms) BEGIN
7466
+ -------------------------------------
7467
+ GovUkDateFieldsTest: test_squash_html
7468
+ -------------------------------------
7469
+  (0.1ms) ROLLBACK
7470
+  (0.0ms) BEGIN
7471
+ --------------------------------------------------------
7472
+ GovUkDateFieldsTest: test_fieldset_output_with_form_hint
7473
+ --------------------------------------------------------
7474
+  (0.1ms) ROLLBACK
7475
+  (0.1ms) BEGIN
7476
+ ---------------------------------------------------------------------------------------
7477
+ GovUkDateFieldsTest: test_fieldset_output_with_today_button_with_no_css_class_specified
7478
+ ---------------------------------------------------------------------------------------
7479
+  (0.1ms) ROLLBACK
7480
+  (0.1ms) BEGIN
7481
+ -------------------------------------------------------
7482
+ GovUkDateFieldsTest: test_basic_output_without_fieldset
7483
+ -------------------------------------------------------
7484
+  (0.1ms) ROLLBACK
7485
+  (0.1ms) BEGIN
7486
+ -------------------------------------------------------------------------------
7487
+ GovUkDateFieldsTest: test_fieldset_with_error_class_and_supplied_error_messages
7488
+ -------------------------------------------------------------------------------
7489
+  (0.1ms) ROLLBACK
7490
+  (0.1ms) BEGIN
7491
+ ------------------------------------------
7492
+ GovUkDateFieldsTest: test_fieldset_with_id
7493
+ ------------------------------------------
7494
+  (0.1ms) ROLLBACK
7495
+  (0.1ms) BEGIN
7496
+ -------------------------------------------------------------
7497
+ GovUkDateFieldsTest: test_placeholder_output_without_fieldset
7498
+ -------------------------------------------------------------
7499
+  (0.1ms) ROLLBACK
7500
+  (0.1ms) BEGIN
7501
+ ---------------------------------------------------------------
7502
+ GovUkDateFieldsTest: test_fieldset_with_error_class_and_message
7503
+ ---------------------------------------------------------------
7504
+  (0.1ms) ROLLBACK
7505
+  (0.1ms) BEGIN
7506
+ ---------------------------------------------------------------
7507
+ GovUkDateFieldsTest: test_error_raised_if_invalid_options_given
7508
+ ---------------------------------------------------------------
7509
+  (0.1ms) ROLLBACK
7510
+  (0.1ms) BEGIN
7511
+ -------------------------------------------------------------------------------
7512
+ GovUkDateFields::FormDateTest: test_set_one_date_part_leaves_the_rest_unchanged
7513
+ -------------------------------------------------------------------------------
7514
+  (0.1ms) ROLLBACK
7515
+  (0.1ms) BEGIN
7516
+ ------------------------------------------------------------------------------------------
7517
+ GovUkDateFields::FormDateTest: test_set_from_date_instantiates_a_nil_object_if_date_is_nil
7518
+ ------------------------------------------------------------------------------------------
7519
+  (0.1ms) ROLLBACK
7520
+  (0.1ms) BEGIN
7521
+ -----------------------------------------------------------------------------------------------
7522
+ GovUkDateFields::FormDateTest: test_setting_all_date_parts_to_nil_sets_date_to_nil_and_is_valid
7523
+ -----------------------------------------------------------------------------------------------
7524
+  (0.1ms) ROLLBACK
7525
+  (0.1ms) BEGIN
7526
+ -----------------------------------------------------------------------------------------
7527
+ GovUkDateFields::FormDateTest: test_set_from_date_instantiates_the_attribute_and_is_valid
7528
+ -----------------------------------------------------------------------------------------
7529
+  (0.1ms) ROLLBACK
7530
+  (0.0ms) BEGIN
7531
+ ---------------------------------------------------------------------------------
7532
+ GovUkDateFields::FormDateTest: test_setting_all_three_date_parts_changes_the_date
7533
+ ---------------------------------------------------------------------------------
7534
+  (0.1ms) ROLLBACK
7535
+  (0.1ms) BEGIN
7536
+ ----------------------------------------------------------------------------------------------------------------------------------
7537
+ GovUkDateFields::FormDateTest: test_setting_date_parts_with_invalid_values_marks_date_as_invalid_and_leaves_date_variable_the_same
7538
+ ----------------------------------------------------------------------------------------------------------------------------------
7539
+  (0.0ms) ROLLBACK
7540
+  (0.0ms) BEGIN
7541
+ ---------------------------------------------------------------------------------
7542
+ GovUkDateFields::FormDateTest: test_new_raises_error_if_called_from_outside_class
7543
+ ---------------------------------------------------------------------------------
7544
+  (0.1ms) ROLLBACK
7545
+  (0.1ms) BEGIN
7546
+ -----------------------------------------------------------------------
7547
+ DirectorTest: test_invalid_day_raises_no_error_when_validation_disabled
7548
+ -----------------------------------------------------------------------
7549
+  (0.1ms) ROLLBACK
7550
+  (0.1ms) BEGIN
7551
+ ------------------------------------------------------------------------------------------------
7552
+ DirectorTest: test_updating_existing_record_with_invalid_dates_is_valid_when_validation_disabled
7553
+ ------------------------------------------------------------------------------------------------
7554
+  (0.1ms) SAVEPOINT active_record_1
7555
+ SQL (0.2ms) INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "John"], ["dob", Tue, 13 Aug 1963], ["joined", Mon, 21 Apr 2014], ["created_at", 2017-11-28 10:34:59 UTC], ["updated_at", 2017-11-28 10:34:59 UTC]]
7556
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7557
+  (0.1ms) SAVEPOINT active_record_1
7558
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7559
+  (0.1ms) ROLLBACK
7560
+  (0.1ms) BEGIN
7561
+ -----------------------------------------------------------------------
7562
+ DirectorTest: test_valid_dates_raise_no_errors_when_validation_disabled
7563
+ -----------------------------------------------------------------------
7564
+  (0.1ms) ROLLBACK
7565
+  (0.1ms) BEGIN
7566
+ -----------------------------------------------------------------------------------------------
7567
+ DirectorTest: test_creating_a_new_director_with_invalid_dates_is_valid_when_validation_disabled
7568
+ -----------------------------------------------------------------------------------------------
7569
+  (0.1ms) ROLLBACK
7570
+  (0.0ms) BEGIN
7571
+ ---------------------------------------------------------------------
7572
+ DirectorTest: test_nil_dates_raise_no_errors_when_validation_disabled
7573
+ ---------------------------------------------------------------------
7574
+  (0.1ms) ROLLBACK
7575
+  (0.1ms) BEGIN
7576
+ --------------------------------------------------------------------------
7577
+ DirectorTest: test_director_has_class_variable_describing_all_gov_uk_dates
7578
+ --------------------------------------------------------------------------
7579
+  (0.1ms) ROLLBACK
7580
+  (0.1ms) BEGIN
7581
+ -----------------------------------------------------------------
7582
+ DirectorTest: test_director_class_responds_to_acts_as_gov_uk_date
7583
+ -----------------------------------------------------------------
7584
+  (0.1ms) ROLLBACK
7585
+  (0.0ms) BEGIN
7586
+ --------------------------------------------------------------------------------
7587
+ OverrideErrorClashEmployeeTest: test_invalid_day_overrides_cant_be_blank_message
7588
+ --------------------------------------------------------------------------------
7589
+  (0.1ms) ROLLBACK
7590
+  (0.1ms) BEGIN
7591
+ --------------------------------------------------------------------------
7592
+ OverrideErrorClashEmployeeTest: test_valid_dates_generate_no_errors_at_all
7593
+ --------------------------------------------------------------------------
7594
+  (0.1ms) ROLLBACK
7595
+  (0.0ms) BEGIN
7596
+ ----------------------------------------------------------------------
7597
+ OverrideErrorClashEmployeeTest: test_presence_error_messages_generated
7598
+ ----------------------------------------------------------------------
7599
+  (0.1ms) ROLLBACK
7600
+  (0.1ms) BEGIN
7601
+ --------------------------------------------------------------------------------------------------
7602
+ DefaultErrorClashEmployeeTest: test_invalid_day_adds_invalid_date_message_to_cant_be_blank_message
7603
+ --------------------------------------------------------------------------------------------------
7604
+  (0.1ms) ROLLBACK
7605
+  (0.1ms) BEGIN
7606
+ ---------------------------------------------------------------------
7607
+ DefaultErrorClashEmployeeTest: test_presence_error_messages_generated
7608
+ ---------------------------------------------------------------------
7609
+  (0.1ms) ROLLBACK
7610
+  (0.1ms) BEGIN
7611
+ -------------------------------------------------------------------------
7612
+ DefaultErrorClashEmployeeTest: test_valid_dates_generate_no_errors_at_all
7613
+ -------------------------------------------------------------------------
7614
+  (0.1ms) ROLLBACK
7615
+  (0.1ms) BEGIN
7616
+ -------------------------------------------------------------------------------------------------------
7617
+ OmitErrorClashEmployeeTest: test_invalid_day_does_not_add_invalid_date_message_to_cant_be_blank_message
7618
+ -------------------------------------------------------------------------------------------------------
7619
+  (0.1ms) ROLLBACK
7620
+  (0.1ms) BEGIN
7621
+ ------------------------------------------------------------------
7622
+ OmitErrorClashEmployeeTest: test_presence_error_messages_generated
7623
+ ------------------------------------------------------------------
7624
+  (0.1ms) ROLLBACK
7625
+  (0.1ms) BEGIN
7626
+ ----------------------------------------------------------------------
7627
+ OmitErrorClashEmployeeTest: test_valid_dates_generate_no_errors_at_all
7628
+ ----------------------------------------------------------------------
7629
+  (0.1ms) ROLLBACK
7630
+  (0.1ms) BEGIN
7631
+ --------------------------------------------------------------
7632
+ EmployeesControllerTest: test_should_render_gov_uk_date_fields
7633
+ --------------------------------------------------------------
7634
+  (0.1ms) SAVEPOINT active_record_1
7635
+ SQL (0.2ms) INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Stephen"], ["dob", Tue, 13 Aug 1963], ["joined", Tue, 01 Apr 2014], ["created_at", 2017-11-28 10:34:59 UTC], ["updated_at", 2017-11-28 10:34:59 UTC]]
7636
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7637
+  (0.1ms) SAVEPOINT active_record_1
7638
+ SQL (0.2ms) INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Tony"], ["dob", Mon, 17 May 1965], ["joined", Wed, 21 May 2014], ["created_at", 2017-11-28 10:34:59 UTC], ["updated_at", 2017-11-28 10:34:59 UTC]]
7639
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7640
+ Processing by EmployeesController#edit as HTML
7641
+ Parameters: {"id"=>"645"}
7642
+ Employee Load (0.2ms) SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT $2 [["id", 645], ["LIMIT", 1]]
7643
+ Rendering employees/edit.html.erb within layouts/application
7644
+ Rendered employees/_form.html.erb (4.9ms)
7645
+ Rendered employees/edit.html.erb within layouts/application (6.9ms)
7646
+ Completed 200 OK in 173ms (Views: 168.6ms | ActiveRecord: 0.3ms)
7647
+  (0.2ms) ROLLBACK
7648
+  (0.1ms) BEGIN
7649
+ --------------------------------------------
7650
+ EmployeesControllerTest: test_should_get_new
7651
+ --------------------------------------------
7652
+  (0.1ms) SAVEPOINT active_record_1
7653
+ SQL (0.2ms) INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Stephen"], ["dob", Tue, 13 Aug 1963], ["joined", Tue, 01 Apr 2014], ["created_at", 2017-11-28 10:34:59 UTC], ["updated_at", 2017-11-28 10:34:59 UTC]]
7654
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7655
+  (0.1ms) SAVEPOINT active_record_1
7656
+ SQL (0.2ms) INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Tony"], ["dob", Mon, 17 May 1965], ["joined", Wed, 21 May 2014], ["created_at", 2017-11-28 10:34:59 UTC], ["updated_at", 2017-11-28 10:34:59 UTC]]
7657
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7658
+ Processing by EmployeesController#new as HTML
7659
+ Rendering employees/new.html.erb within layouts/application
7660
+ Rendered employees/_form.html.erb (1.4ms)
7661
+ Rendered employees/new.html.erb within layouts/application (1.9ms)
7662
+ Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.0ms)
7663
+  (0.1ms) ROLLBACK
7664
+  (0.1ms) BEGIN
7665
+ -----------------------------------------------------
7666
+ EmployeesControllerTest: test_should_destroy_employee
7667
+ -----------------------------------------------------
7668
+  (0.1ms) SAVEPOINT active_record_1
7669
+ SQL (0.2ms) INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Stephen"], ["dob", Tue, 13 Aug 1963], ["joined", Tue, 01 Apr 2014], ["created_at", 2017-11-28 10:34:59 UTC], ["updated_at", 2017-11-28 10:34:59 UTC]]
7670
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7671
+  (0.1ms) SAVEPOINT active_record_1
7672
+ SQL (0.2ms) INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Tony"], ["dob", Mon, 17 May 1965], ["joined", Wed, 21 May 2014], ["created_at", 2017-11-28 10:34:59 UTC], ["updated_at", 2017-11-28 10:34:59 UTC]]
7673
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7674
+  (1.2ms) SELECT COUNT(*) FROM "employees"
7675
+ Processing by EmployeesController#destroy as HTML
7676
+ Parameters: {"id"=>"649"}
7677
+ Employee Load (0.3ms) SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT $2 [["id", 649], ["LIMIT", 1]]
7678
+  (0.1ms) SAVEPOINT active_record_1
7679
+ SQL (0.1ms) DELETE FROM "employees" WHERE "employees"."id" = $1 [["id", 649]]
7680
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7681
+ Redirected to http://test.host/employees
7682
+ Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
7683
+  (0.2ms) SELECT COUNT(*) FROM "employees"
7684
+  (0.1ms) ROLLBACK
7685
+  (0.1ms) BEGIN
7686
+ ----------------------------------------------------
7687
+ EmployeesControllerTest: test_should_create_employee
7688
+ ----------------------------------------------------
7689
+  (0.1ms) SAVEPOINT active_record_1
7690
+ SQL (0.2ms) INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Stephen"], ["dob", Tue, 13 Aug 1963], ["joined", Tue, 01 Apr 2014], ["created_at", 2017-11-28 10:34:59 UTC], ["updated_at", 2017-11-28 10:34:59 UTC]]
7691
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7692
+  (0.1ms) SAVEPOINT active_record_1
7693
+ SQL (0.2ms) INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Tony"], ["dob", Mon, 17 May 1965], ["joined", Wed, 21 May 2014], ["created_at", 2017-11-28 10:34:59 UTC], ["updated_at", 2017-11-28 10:34:59 UTC]]
7694
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7695
+  (0.2ms) SELECT COUNT(*) FROM "employees"
7696
+ Processing by EmployeesController#create as HTML
7697
+ Parameters: {"employee"=>{"dob_dd"=>"31", "dob_mm"=>"12", "dob_yyyy"=>"1965", "joined_dd"=>"4", "joined_mm"=>"mar", "joined_yyyy"=>"2015", "name"=>"Joe Blow"}}
7698
+  (0.1ms) SAVEPOINT active_record_1
7699
+ SQL (0.2ms) INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Joe Blow"], ["dob", Fri, 31 Dec 1965], ["joined", Wed, 04 Mar 2015], ["created_at", 2017-11-28 10:34:59 UTC], ["updated_at", 2017-11-28 10:34:59 UTC]]
7700
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7701
+ Redirected to http://test.host/employees/653
7702
+ Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
7703
+  (0.1ms) SELECT COUNT(*) FROM "employees"
7704
+  (0.1ms) SELECT COUNT(*) FROM "employees"
7705
+ Employee Load (0.1ms) SELECT "employees".* FROM "employees" ORDER BY "employees"."id" DESC LIMIT $1 [["LIMIT", 1]]
7706
+  (0.1ms) ROLLBACK
7707
+  (0.1ms) BEGIN
7708
+ ---------------------------------------------
7709
+ EmployeesControllerTest: test_should_get_edit
7710
+ ---------------------------------------------
7711
+  (0.1ms) SAVEPOINT active_record_1
7712
+ SQL (0.2ms) INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Stephen"], ["dob", Tue, 13 Aug 1963], ["joined", Tue, 01 Apr 2014], ["created_at", 2017-11-28 10:34:59 UTC], ["updated_at", 2017-11-28 10:34:59 UTC]]
7713
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7714
+  (0.1ms) SAVEPOINT active_record_1
7715
+ SQL (0.2ms) INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Tony"], ["dob", Mon, 17 May 1965], ["joined", Wed, 21 May 2014], ["created_at", 2017-11-28 10:34:59 UTC], ["updated_at", 2017-11-28 10:34:59 UTC]]
7716
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7717
+ Processing by EmployeesController#edit as HTML
7718
+ Parameters: {"id"=>"654"}
7719
+ Employee Load (0.1ms) SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT $2 [["id", 654], ["LIMIT", 1]]
7720
+ Rendering employees/edit.html.erb within layouts/application
7721
+ Rendered employees/_form.html.erb (1.4ms)
7722
+ Rendered employees/edit.html.erb within layouts/application (1.6ms)
7723
+ Completed 200 OK in 4ms (Views: 3.4ms | ActiveRecord: 0.1ms)
7724
+  (0.1ms) ROLLBACK
7725
+  (0.1ms) BEGIN
7726
+ ----------------------------------------------
7727
+ EmployeesControllerTest: test_should_get_index
7728
+ ----------------------------------------------
7729
+  (0.1ms) SAVEPOINT active_record_1
7730
+ SQL (0.2ms) INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Stephen"], ["dob", Tue, 13 Aug 1963], ["joined", Tue, 01 Apr 2014], ["created_at", 2017-11-28 10:34:59 UTC], ["updated_at", 2017-11-28 10:34:59 UTC]]
7731
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7732
+  (0.1ms) SAVEPOINT active_record_1
7733
+ SQL (0.1ms) INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Tony"], ["dob", Mon, 17 May 1965], ["joined", Wed, 21 May 2014], ["created_at", 2017-11-28 10:34:59 UTC], ["updated_at", 2017-11-28 10:34:59 UTC]]
7734
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7735
+ Processing by EmployeesController#index as HTML
7736
+ Rendering employees/index.html.erb within layouts/application
7737
+ Employee Load (0.1ms) SELECT "employees".* FROM "employees"
7738
+ Rendered employees/index.html.erb within layouts/application (1.2ms)
7739
+ Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.1ms)
7740
+  (0.1ms) ROLLBACK
7741
+  (0.1ms) BEGIN
7742
+ --------------------------------------------------
7743
+ EmployeesControllerTest: test_should_show_employee
7744
+ --------------------------------------------------
7745
+  (0.1ms) SAVEPOINT active_record_1
7746
+ SQL (0.2ms) INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Stephen"], ["dob", Tue, 13 Aug 1963], ["joined", Tue, 01 Apr 2014], ["created_at", 2017-11-28 10:34:59 UTC], ["updated_at", 2017-11-28 10:34:59 UTC]]
7747
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7748
+  (0.1ms) SAVEPOINT active_record_1
7749
+ SQL (0.2ms) INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Tony"], ["dob", Mon, 17 May 1965], ["joined", Wed, 21 May 2014], ["created_at", 2017-11-28 10:34:59 UTC], ["updated_at", 2017-11-28 10:34:59 UTC]]
7750
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7751
+ Processing by EmployeesController#show as HTML
7752
+ Parameters: {"id"=>"658"}
7753
+ Employee Load (0.2ms) SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT $2 [["id", 658], ["LIMIT", 1]]
7754
+ Rendering employees/show.html.erb within layouts/application
7755
+ Rendered employees/show.html.erb within layouts/application (0.5ms)
7756
+ Completed 200 OK in 3ms (Views: 1.4ms | ActiveRecord: 0.2ms)
7757
+  (0.1ms) ROLLBACK
7758
+  (0.1ms) BEGIN
7759
+ ----------------------------------------------------
7760
+ EmployeesControllerTest: test_should_update_employee
7761
+ ----------------------------------------------------
7762
+  (0.1ms) SAVEPOINT active_record_1
7763
+ SQL (0.2ms) INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Stephen"], ["dob", Tue, 13 Aug 1963], ["joined", Tue, 01 Apr 2014], ["created_at", 2017-11-28 10:34:59 UTC], ["updated_at", 2017-11-28 10:34:59 UTC]]
7764
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7765
+  (0.1ms) SAVEPOINT active_record_1
7766
+ SQL (0.1ms) INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Tony"], ["dob", Mon, 17 May 1965], ["joined", Wed, 21 May 2014], ["created_at", 2017-11-28 10:34:59 UTC], ["updated_at", 2017-11-28 10:34:59 UTC]]
7767
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7768
+ Processing by EmployeesController#update as HTML
7769
+ Parameters: {"employee"=>{"dob_dd"=>"1", "dob_mm"=>"11", "dob_yyyy"=>"1981", "joined_dd"=>"3", "joined_mm"=>"oct", "joined_yyyy"=>"2015", "name"=>"Ioannis Kole"}, "id"=>"660"}
7770
+ Employee Load (0.1ms) SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT $2 [["id", 660], ["LIMIT", 1]]
7771
+  (0.1ms) SAVEPOINT active_record_1
7772
+ SQL (0.2ms) UPDATE "employees" SET "dob" = $1, "joined" = $2, "name" = $3, "updated_at" = $4 WHERE "employees"."id" = $5 [["dob", Sun, 01 Nov 1981], ["joined", Sat, 03 Oct 2015], ["name", "Ioannis Kole"], ["updated_at", 2017-11-28 10:34:59 UTC], ["id", 660]]
7773
+  (0.1ms) RELEASE SAVEPOINT active_record_1
7774
+ Redirected to http://test.host/employees/660
7775
+ Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
7776
+ Employee Load (0.1ms) SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT $2 [["id", 660], ["LIMIT", 1]]
7777
+  (0.1ms) ROLLBACK
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gov_uk_date_fields
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Richards