From 5e77179c0a29a33dbb00ee135cbb8dd282c35524 Mon Sep 17 00:00:00 2001 From: Peter Hartshorn Date: Thu, 28 Sep 2023 14:23:59 +0100 Subject: [PATCH] `bundle exec rubocop -A` --- .../audit_applications.rb | 8 +-- .../audit_comparer.rb | 10 ++-- .../presenters/attachment_helper.rb | 2 +- .../presenters/checkboxes_helper.rb | 2 +- .../presenters/content_item.rb | 2 +- .../curated_taxonomy_sidebar_links.rb | 2 - .../presenters/devolved_nations_helper.rb | 4 +- .../page_with_step_by_step_navigation.rb | 2 +- .../presenters/public_layout_helper.rb | 2 +- spec/components/attachment_spec.rb | 2 +- spec/components/breadcrumbs_spec.rb | 4 +- .../components/contextual_breadcrumbs_spec.rb | 26 ++++----- spec/components/contextual_footer_spec.rb | 4 +- spec/components/contextual_sidebar_spec.rb | 2 +- spec/components/layout_header_spec.rb | 6 +- spec/components/lead_paragraph_spec.rb | 2 +- spec/components/meta_tags_spec.rb | 8 +-- spec/components/metadata_spec.rb | 2 +- spec/components/organisation_logo_spec.rb | 4 +- spec/components/related_navigation_spec.rb | 38 ++++++------- spec/components/reorderable_list_spec.rb | 4 +- spec/components/share_links_spec.rb | 12 ++-- spec/features/contextual_navigation_spec.rb | 8 +-- .../component_wrapper_helper_spec.rb | 4 +- .../components/contents_list_helper_spec.rb | 2 +- .../components/intervention_helper_spec.rb | 6 +- .../components/public_layout_helper_spec.rb | 4 +- .../step_by_step_nav_helper_spec.rb | 12 ++-- .../html_publication_schema_spec.rb | 2 +- .../page_with_step_by_step_navigation_spec.rb | 8 +-- .../related_navigation_helper_spec.rb | 2 +- .../presenters/schema_org_spec.rb | 56 +++++++++---------- 32 files changed, 125 insertions(+), 127 deletions(-) diff --git a/app/models/govuk_publishing_components/audit_applications.rb b/app/models/govuk_publishing_components/audit_applications.rb index 70ae097f8a..d7603aeafc 100644 --- a/app/models/govuk_publishing_components/audit_applications.rb +++ b/app/models/govuk_publishing_components/audit_applications.rb @@ -72,10 +72,10 @@ def initialize(path, name, dir) end @data = { - name: name, - dir: dir, - application_found: application_found, - components_found: components_found, + name:, + dir:, + application_found:, + components_found:, gem_style_references: @gem_style_references.flatten.uniq.sort, jquery_references: @jquery_references.flatten.uniq.sort, component_locations: @component_locations, diff --git a/app/models/govuk_publishing_components/audit_comparer.rb b/app/models/govuk_publishing_components/audit_comparer.rb index 5e3098be70..dab85cbfc7 100644 --- a/app/models/govuk_publishing_components/audit_comparer.rb +++ b/app/models/govuk_publishing_components/audit_comparer.rb @@ -95,8 +95,8 @@ def sort_results(results) dir: result[:dir], application_found: result[:application_found], uses_static: application_uses_static, - summary: summary, - warnings: warnings, + summary:, + warnings:, warning_count: warnings.length, gem_style_references: result[:gem_style_references], jquery_references: result[:jquery_references], @@ -126,8 +126,8 @@ def include_any_components_within_components(components) def create_warning(component, message) { - component: component, - message: message, + component:, + message:, } end @@ -280,7 +280,7 @@ def get_components_by_application results << { name: component_name, count: locations.length, - locations: locations, + locations:, } end diff --git a/lib/govuk_publishing_components/presenters/attachment_helper.rb b/lib/govuk_publishing_components/presenters/attachment_helper.rb index 083a8da736..6fe6576b39 100644 --- a/lib/govuk_publishing_components/presenters/attachment_helper.rb +++ b/lib/govuk_publishing_components/presenters/attachment_helper.rb @@ -119,7 +119,7 @@ class SupportedContentType def self.find(content_type, extension = nil) matching_types = TYPES.select { |type| type[:content_type] == content_type } - return UnsupportedContentType.new(content_type: content_type) if matching_types.empty? + return UnsupportedContentType.new(content_type:) if matching_types.empty? extension_match = if matching_types.length > 1 matching_types.find { |type| type[:extension] == extension } diff --git a/lib/govuk_publishing_components/presenters/checkboxes_helper.rb b/lib/govuk_publishing_components/presenters/checkboxes_helper.rb index 341476b3f2..5a621a8d92 100644 --- a/lib/govuk_publishing_components/presenters/checkboxes_helper.rb +++ b/lib/govuk_publishing_components/presenters/checkboxes_helper.rb @@ -98,7 +98,7 @@ def checkbox_markup(checkbox, index) data[:behaviour] = "exclusive" if checkbox[:exclusive] capture do - concat check_box_tag checkbox_name, checkbox[:value], checked, class: "govuk-checkboxes__input", id: checkbox_id, data: data + concat check_box_tag(checkbox_name, checkbox[:value], checked, class: "govuk-checkboxes__input", id: checkbox_id, data:) concat content_tag(:label, checkbox[:label], for: checkbox_id, class: "govuk-label govuk-checkboxes__label") concat content_tag(:span, checkbox[:hint], id: "#{checkbox_id}-item-hint", class: "govuk-hint govuk-checkboxes__hint") if checkbox[:hint] end diff --git a/lib/govuk_publishing_components/presenters/content_item.rb b/lib/govuk_publishing_components/presenters/content_item.rb index 801facd541..d1031a0d36 100644 --- a/lib/govuk_publishing_components/presenters/content_item.rb +++ b/lib/govuk_publishing_components/presenters/content_item.rb @@ -119,7 +119,7 @@ def external_links def as_taxonomy_sidebar_link { - title: title, + title:, link: base_path, } end diff --git a/lib/govuk_publishing_components/presenters/curated_taxonomy_sidebar_links.rb b/lib/govuk_publishing_components/presenters/curated_taxonomy_sidebar_links.rb index 2691dc55c5..ff3680d835 100644 --- a/lib/govuk_publishing_components/presenters/curated_taxonomy_sidebar_links.rb +++ b/lib/govuk_publishing_components/presenters/curated_taxonomy_sidebar_links.rb @@ -1,5 +1,3 @@ -require "set" - module GovukPublishingComponents module Presenters # @private diff --git a/lib/govuk_publishing_components/presenters/devolved_nations_helper.rb b/lib/govuk_publishing_components/presenters/devolved_nations_helper.rb index c3f066c4f3..36c4ddeb54 100644 --- a/lib/govuk_publishing_components/presenters/devolved_nations_helper.rb +++ b/lib/govuk_publishing_components/presenters/devolved_nations_helper.rb @@ -43,9 +43,9 @@ def alternative_content_text(name) nation = I18n.t("components.devolved_nations.#{name}") if I18n.exists?("components.devolved_nations.type.#{@type}") - I18n.t("components.devolved_nations.type.#{@type}", nation: nation) + I18n.t("components.devolved_nations.type.#{@type}", nation:) else - I18n.t("components.devolved_nations.type.publication", nation: nation) + I18n.t("components.devolved_nations.type.publication", nation:) end end end diff --git a/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb b/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb index 485cc91265..f5f0f41c31 100644 --- a/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb +++ b/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb @@ -88,7 +88,7 @@ def header(ga4_tracking) title: current_step_nav.title, path: current_step_nav.base_path, tracking_id: current_step_nav.content_id, - ga4_tracking: ga4_tracking, + ga4_tracking:, } else {} diff --git a/lib/govuk_publishing_components/presenters/public_layout_helper.rb b/lib/govuk_publishing_components/presenters/public_layout_helper.rb index 06c8f9b9e5..3abb238ffe 100644 --- a/lib/govuk_publishing_components/presenters/public_layout_helper.rb +++ b/lib/govuk_publishing_components/presenters/public_layout_helper.rb @@ -77,7 +77,7 @@ def blue_bar_background_colours def generate_data_attribute(link, track_action) { track_category: "footerClicked", - track_action: track_action, + track_action:, track_label: link[:href], track_options: { dimension29: link[:text], diff --git a/spec/components/attachment_spec.rb b/spec/components/attachment_spec.rb index 4ec8d70937..7acdadd8d8 100644 --- a/spec/components/attachment_spec.rb +++ b/spec/components/attachment_spec.rb @@ -145,7 +145,7 @@ def component_name isbn: "978-1-5286-1173-2", unique_reference: "2259", command_paper_number: "Cd. 67", - thumbnail_url: thumbnail_url, + thumbnail_url:, }, ) assert_thumbnail "custom", src: thumbnail_url diff --git a/spec/components/breadcrumbs_spec.rb b/spec/components/breadcrumbs_spec.rb index 76ca4bdaf4..772dfd2668 100644 --- a/spec/components/breadcrumbs_spec.rb +++ b/spec/components/breadcrumbs_spec.rb @@ -6,7 +6,7 @@ def component_name end def assert_link_with_text_in(selector, link, text) - assert_select "#{selector} a[href=\"#{link}\"]", text: text + assert_select "#{selector} a[href=\"#{link}\"]", text: end it "no error if no parameters passed in" do @@ -110,7 +110,7 @@ def assert_link_with_text_in(selector, link, text) { title: "Section 2", url: "/section-2" }, { title: "Section 3", url: "/section-3" }, ] - render_component(breadcrumbs: breadcrumbs) + render_component(breadcrumbs:) expected_tracking_options = [ { dimension28: "3", dimension29: "Section 1" }, diff --git a/spec/components/contextual_breadcrumbs_spec.rb b/spec/components/contextual_breadcrumbs_spec.rb index 8462c9872c..4846ac158f 100644 --- a/spec/components/contextual_breadcrumbs_spec.rb +++ b/spec/components/contextual_breadcrumbs_spec.rb @@ -6,7 +6,7 @@ def component_name end def example_document_for(schema_name, example_name) - GovukSchemas::Example.find(schema_name, example_name: example_name) + GovukSchemas::Example.find(schema_name, example_name:) end def remove_mainstream_browse(content_item) @@ -41,7 +41,7 @@ def set_live_taxons(content_item) content_item = remove_mainstream_browse(content_item) content_item = remove_curated_related_item(content_item) content_item = set_live_taxons(content_item) - render_component(content_item: content_item) + render_component(content_item:) assert_select ".gem-c-breadcrumbs.govuk-breadcrumbs--collapse-on-mobile" end @@ -50,7 +50,7 @@ def set_live_taxons(content_item) content_item = remove_mainstream_browse(content_item) content_item = remove_curated_related_item(content_item) content_item = set_live_taxons(content_item) - render_component(content_item: content_item, collapse_on_mobile: false) + render_component(content_item:, collapse_on_mobile: false) assert_select ".gem-c-breadcrumbs.gem-c-breadcrumbs--collapse-on-mobile", false end @@ -76,7 +76,7 @@ def set_live_taxons(content_item) it "renders curated related items breadcrumbs if the content_item has curated related items" do content_item = example_document_for("licence", "licence_without_continuation_link") content_item = remove_mainstream_browse(content_item) - render_component(content_item: content_item) + render_component(content_item:) assert_no_selector(".gem-c-step-nav-header") assert_select "a", text: "Home" assert_select "a", text: "Business and self-employed" @@ -89,7 +89,7 @@ def set_live_taxons(content_item) content_item = remove_curated_related_item(content_item) content_item = set_live_taxons(content_item) content_item = remove_topics(content_item) - render_component(content_item: content_item) + render_component(content_item:) assert_no_selector(".gem-c-step-nav-header") assert_select "a", text: "Home" assert_select "a", text: "School curriculum" @@ -101,7 +101,7 @@ def set_live_taxons(content_item) content_item = remove_mainstream_browse(content_item) content_item = remove_curated_related_item(content_item) content_item = set_live_taxons(content_item) - render_component(content_item: content_item, inverse: true) + render_component(content_item:, inverse: true) assert_select ".gem-c-breadcrumbs.gem-c-breadcrumbs--inverse" end @@ -136,7 +136,7 @@ def set_live_taxons(content_item) }, ] - render_component(content_item: content_item) + render_component(content_item:) assert_select "a", text: "Home" assert_select "a", text: "Competition and Markets Authority cases" @@ -144,7 +144,7 @@ def set_live_taxons(content_item) it "renders parent finder breadcrumb if content has a finder linked" do content_item = example_document_for("guide", "guide-with-facet-groups") - render_component(content_item: content_item) + render_component(content_item:) assert_select "a", text: "Home" assert_select "a", text: "EU Withdrawal Act 2018 statutory instruments" @@ -152,7 +152,7 @@ def set_live_taxons(content_item) it "renders parent finder breadcrumb if content has a finder linked and taxon is prioritised" do content_item = example_document_for("guide", "guide-with-facet-groups") - render_component(content_item: content_item, prioritise_taxon_breadcrumbs: true) + render_component(content_item:, prioritise_taxon_breadcrumbs: true) assert_select "a", text: "Home" assert_select "a", text: "EU Withdrawal Act 2018 statutory instruments" @@ -160,7 +160,7 @@ def set_live_taxons(content_item) it "renders inverse parent finder breadcrumb" do content_item = example_document_for("guide", "guide-with-facet-groups") - render_component(content_item: content_item, prioritise_taxon_breadcrumbs: true, inverse: true) + render_component(content_item:, prioritise_taxon_breadcrumbs: true, inverse: true) assert_select ".gem-c-breadcrumbs.gem-c-breadcrumbs--inverse" end @@ -177,7 +177,7 @@ def set_live_taxons(content_item) content_item = example_document_for("guide", "guide") content_item = set_parent_titles_to_businesses(content_item) content_item = set_live_taxons(content_item) - render_component(content_item: content_item, prioritise_taxon_breadcrumbs: true) + render_component(content_item:, prioritise_taxon_breadcrumbs: true) assert_select "a", text: "Home" assert_no_selector "a", text: "Business and self-employed" assert_no_selector "a", text: "Licences and licence applications" @@ -189,7 +189,7 @@ def set_live_taxons(content_item) content_item = example_document_for("guide", "guide") content_item = set_parent_titles_to_businesses(content_item) content_item = set_live_taxons(content_item) - render_component(content_item: content_item, prioritise_taxon_breadcrumbs: false) + render_component(content_item:, prioritise_taxon_breadcrumbs: false) assert_select "a", text: "Home" assert_select "a", text: "Business and self-employed" assert_select "a", text: "Licences and licence applications" @@ -201,7 +201,7 @@ def set_live_taxons(content_item) content_item = example_document_for("guide", "guide") content_item = set_parent_titles_to_businesses(content_item) content_item = set_live_taxons(content_item) - render_component(content_item: content_item) + render_component(content_item:) assert_select "a", text: "Home" assert_select "a", text: "Business and self-employed" assert_select "a", text: "Licences and licence applications" diff --git a/spec/components/contextual_footer_spec.rb b/spec/components/contextual_footer_spec.rb index b8ed711413..c2fc45e0df 100644 --- a/spec/components/contextual_footer_spec.rb +++ b/spec/components/contextual_footer_spec.rb @@ -13,7 +13,7 @@ def component_name payload end - render_component(content_item: content_item) + render_component(content_item:) has_selector? ".gem-c-contextual-footer" end @@ -45,7 +45,7 @@ def component_name ], } - render_component(content_item: content_item, ga4_tracking: true) + render_component(content_item:, ga4_tracking: true) assert_select ".gem-c-related-navigation[data-module='gem-track-click ga4-link-tracker']" assert_select ".gem-c-related-navigation__section-link[data-ga4-link='{\"event_name\":\"navigation\",\"type\":\"contextual footer\",\"index\":{\"index_section\":\"1\",\"index_link\":\"1\",\"index_section_count\":\"1\"},\"index_total\":\"2\",\"section\":\"Explore the topic\"}']", text: "Skating" diff --git a/spec/components/contextual_sidebar_spec.rb b/spec/components/contextual_sidebar_spec.rb index 71c993dc97..7c5c1e7d53 100644 --- a/spec/components/contextual_sidebar_spec.rb +++ b/spec/components/contextual_sidebar_spec.rb @@ -40,7 +40,7 @@ def component_name render_component( ga4_tracking: true, - content_item: content_item, + content_item:, ) index_total = 4 # have to hard code this here but if ukraine links change this number may change, and test will fail assert_select ".gem-c-contextual-sidebar .gem-c-contextual-sidebar__cta--ukraine[data-module='gem-track-click ga4-link-tracker']" diff --git a/spec/components/layout_header_spec.rb b/spec/components/layout_header_spec.rb index 879acb084f..fd871c2596 100644 --- a/spec/components/layout_header_spec.rb +++ b/spec/components/layout_header_spec.rb @@ -56,7 +56,7 @@ def component_name { text: "Hello", href: "/hello", show_only_in_collapsed_menu: true }, ] - render_component(environment: "staging", navigation_items: navigation_items) + render_component(environment: "staging", navigation_items:) assert_select ".govuk-header__navigation .govuk-header__menu-button", text: "Menu" assert_select ".govuk-header__navigation-item.govuk-header__navigation-item--active", text: "Foo" @@ -72,7 +72,7 @@ def component_name { text: "Hello", href: "/hello", show_only_in_collapsed_menu: true }, ] - render_component(environment: "staging", navigation_items: navigation_items, navigation_aria_label: "My fancy label") + render_component(environment: "staging", navigation_items:, navigation_aria_label: "My fancy label") assert_select ".gem-c-header__nav[aria-label='My fancy label']" end @@ -95,7 +95,7 @@ def component_name }, ] - render_component(navigation_items: navigation_items) + render_component(navigation_items:) assert_select ".gem-c-header__nav .govuk-header__link[data-hello='world']", text: "Foo" assert_select ".gem-c-header__nav .govuk-header__link[data-more-than-one-word='test']", text: "Bar" diff --git a/spec/components/lead_paragraph_spec.rb b/spec/components/lead_paragraph_spec.rb index 86baa596f5..2d356802de 100644 --- a/spec/components/lead_paragraph_spec.rb +++ b/spec/components/lead_paragraph_spec.rb @@ -6,7 +6,7 @@ def component_name end def assert_lead_paragraph_matches(text, expected_text) - render_component(text: text) + render_component(text:) assert_select ".gem-c-lead-paragraph", text: expected_text end diff --git a/spec/components/meta_tags_spec.rb b/spec/components/meta_tags_spec.rb index 55dfd8ffa0..ee2874ed98 100644 --- a/spec/components/meta_tags_spec.rb +++ b/spec/components/meta_tags_spec.rb @@ -6,7 +6,7 @@ def component_name end def example_document_for(schema_name, example_name) - GovukSchemas::Example.find(schema_name, example_name: example_name) + GovukSchemas::Example.find(schema_name, example_name:) end it "renders with an example case study" do @@ -49,7 +49,7 @@ def example_document_for(schema_name, example_name) }, } - render_component(content_item: content_item) + render_component(content_item:) assert_meta_tag("govuk:analytics:organisations", "") end @@ -67,7 +67,7 @@ def example_document_for(schema_name, example_name) }, } - render_component(content_item: content_item) + render_component(content_item:) assert_meta_tag("govuk:analytics:world-locations", "") end @@ -448,7 +448,7 @@ def example_document_for(schema_name, example_name) end def assert_political_status_for(political, current, expected_political_status) - render_component(content_item: { details: { political: political, government: { current: current, slug: "government" } } }) + render_component(content_item: { details: { political:, government: { current:, slug: "government" } } }) assert_meta_tag("govuk:political-status", expected_political_status) end diff --git a/spec/components/metadata_spec.rb b/spec/components/metadata_spec.rb index 652560b951..074895fd2f 100644 --- a/spec/components/metadata_spec.rb +++ b/spec/components/metadata_spec.rb @@ -246,6 +246,6 @@ def assert_definition(term, definition) end def assert_link_with_text_in(selector, link, text) - assert_select "#{selector} a[href=\"#{link}\"]", text: text + assert_select "#{selector} a[href=\"#{link}\"]", text: end end diff --git a/spec/components/organisation_logo_spec.rb b/spec/components/organisation_logo_spec.rb index cca7a7c9f2..a2aa470b9d 100644 --- a/spec/components/organisation_logo_spec.rb +++ b/spec/components/organisation_logo_spec.rb @@ -53,7 +53,7 @@ def component_name }, } - render_component(organisation: { url: "/some-link", data_attributes: data_attributes }) + render_component(organisation: { url: "/some-link", data_attributes: }) assert_select ".gem-c-organisation-logo[data-module='gem-track-click']" assert_select ".gem-c-organisation-logo a.gem-c-organisation-logo__container.gem-c-organisation-logo__link[data-track-category='someLinkClicked']" @@ -67,7 +67,7 @@ def component_name track_category: "someLinkClicked", } - render_component(organisation: { data_attributes: data_attributes }) + render_component(organisation: { data_attributes: }) assert_select ".gem-c-organisation-logo a.gem-c-organisation-logo__container.gem-c-organisation-logo__link[data-track-category='someLinkClicked']", false end diff --git a/spec/components/related_navigation_spec.rb b/spec/components/related_navigation_spec.rb index b0b4ffa848..be494ede34 100644 --- a/spec/components/related_navigation_spec.rb +++ b/spec/components/related_navigation_spec.rb @@ -27,7 +27,7 @@ def construct_links(type, base_path, title, document_type = nil, locale = nil) content_item["links"] = construct_links( "ordered_related_items", "/apprenticeships", "Apprenticeships" ) - render_component(content_item: content_item) + render_component(content_item:) assert_select ".gem-c-related-navigation__main-heading", text: "Related content" assert_select ".gem-c-related-navigation__section-link--other[href=\"/apprenticeships\"]", text: "Apprenticeships" @@ -38,7 +38,7 @@ def construct_links(type, base_path, title, document_type = nil, locale = nil) content_item["links"] = construct_links( "related_guides", "/something-a-bit-like-this", "Some other guidance" ) - render_component(content_item: content_item) + render_component(content_item:) assert_select ".gem-c-related-navigation__sub-heading", text: "Detailed guidance" assert_select ".gem-c-related-navigation__section-link[href=\"/something-a-bit-like-this\"]", text: "Some other guidance" @@ -49,7 +49,7 @@ def construct_links(type, base_path, title, document_type = nil, locale = nil) content_item["links"] = construct_links( "topics", "/finding-a-job", "Finding a job", "topic" ) - render_component(content_item: content_item) + render_component(content_item:) assert_select ".gem-c-related-navigation__sub-heading", text: "Explore the topic" assert_select ".gem-c-related-navigation__section-link[href=\"/finding-a-job\"]", text: "Finding a job" @@ -63,7 +63,7 @@ def construct_links(type, base_path, title, document_type = nil, locale = nil) "Air quality statistics", "statistical_data_set", ) - render_component(content_item: content_item) + render_component(content_item:) assert_select ".gem-c-related-navigation__sub-heading", text: "Statistical data set" assert_select ".gem-c-related-navigation__section-link[href=\"/air-quality-statistics\"]", text: "Air quality statistics" @@ -72,7 +72,7 @@ def construct_links(type, base_path, title, document_type = nil, locale = nil) it "renders world locations section when passed world location items with base path" do content_item = {} content_item["links"] = construct_links("world_locations", "/uk-mission-to-the-eu", "UK Mission to the European Union") - render_component(content_item: content_item) + render_component(content_item:) assert_select ".gem-c-related-navigation__sub-heading", text: "World locations" assert_select ".gem-c-related-navigation__section-link[href=\"/uk-mission-to-the-eu\"]", text: "UK Mission to the European Union" @@ -81,7 +81,7 @@ def construct_links(type, base_path, title, document_type = nil, locale = nil) it "renders world locations section when passed world location items without base path" do content_item = {} content_item["links"] = construct_links("world_locations", nil, "USA") - render_component(content_item: content_item) + render_component(content_item:) assert_select ".gem-c-related-navigation__sub-heading", text: "World locations" assert_select ".gem-c-related-navigation__section-link[href=\"/world/usa/news\"]", text: "USA" @@ -95,7 +95,7 @@ def construct_links(type, base_path, title, document_type = nil, locale = nil) "The future of jobs and skills", "document_collection", ) - render_component(content_item: content_item) + render_component(content_item:) assert_select ".gem-c-related-navigation__sub-heading", text: "Collection" assert_select ".gem-c-related-navigation__section-link[href=\"/government/collections/the-future-of-jobs-and-skills\"]", text: "The future of jobs and skills" @@ -109,7 +109,7 @@ def construct_links(type, base_path, title, document_type = nil, locale = nil) "UK-China High-Level People to People Dialogue 2017", "topical_event", ) - render_component(content_item: content_item) + render_component(content_item:) assert_select ".gem-c-related-navigation__sub-heading", text: "Topical event" assert_select ".gem-c-related-navigation__section-link[href=\"/government/topical-events/uk-china-high-level-people-to-people-dialogue-2017\"]", text: "UK-China High-Level People to People Dialogue 2017" @@ -125,7 +125,7 @@ def construct_links(type, base_path, title, document_type = nil, locale = nil) }, ], } - render_component(content_item: content_item) + render_component(content_item:) assert_select ".gem-c-related-navigation__sub-heading--other", text: "Elsewhere on the web" assert_select ".gem-c-related-navigation__section-link--other[href=\"https://www.thestudentroom.co.uk/content.php?r=5967-Repaying-your-student-loan\"][rel=\"external\"]", text: "The Student Room repaying your student loan" @@ -139,7 +139,7 @@ def construct_links(type, base_path, title, document_type = nil, locale = nil) "A related contact", "contact", ) - render_component(content_item: content_item) + render_component(content_item:) assert_select ".gem-c-related-navigation__sub-heading--other", text: "Other contacts" assert_select ".gem-c-related-navigation__section-link--other[href=\"/ye-olde-contact\"]", text: "A related contact" @@ -153,7 +153,7 @@ def construct_links(type, base_path, title, document_type = nil, locale = nil) "Apprenticeships", "topic", ) - render_component(content_item: content_item) + render_component(content_item:) assert_select ".gem-c-related-navigation__nav-section[aria-labelledby]" end @@ -163,7 +163,7 @@ def construct_links(type, base_path, title, document_type = nil, locale = nil) %w[USA Wales Fiji Iceland Sweden Mauritius Brazil].each do |country| content_item["links"]["world_locations"] << { "title" => country } end - render_component(content_item: content_item) + render_component(content_item:) assert_select ".gem-c-related-navigation__section-link[href=\"/world/wales/news\"]", text: "Wales" assert_select ".gem-c-related-navigation__link.toggle-wrap", text: "Show 2 more" @@ -177,7 +177,7 @@ def construct_links(type, base_path, title, document_type = nil, locale = nil) %w[USA Wales Fiji Iceland Sweden Mauritius].each do |country| content_item["links"]["world_locations"] << { "title" => country } end - render_component(content_item: content_item) + render_component(content_item:) assert_select ".gem-c-related-navigation__section-link[href=\"/world/wales/news\"]", text: "Wales" assert_select ".gem-c-related-navigation__link.toggle-wrap", false, "Progressive disclosure should not display for only 1 link" @@ -189,7 +189,7 @@ def construct_links(type, base_path, title, document_type = nil, locale = nil) "ordered_related_items", "/apprenticeships", "Apprenticeships" ) content_item["links"] = ordered_related_items - render_component(content_item: content_item) + render_component(content_item:) assert_select ".gem-c-related-navigation__main-heading", text: "Related content" assert_select ".gem-c-related-navigation__section-link--other[href=\"/apprenticeships\"]", text: "Apprenticeships" @@ -200,7 +200,7 @@ def construct_links(type, base_path, title, document_type = nil, locale = nil) content_item["links"] = construct_links( "topics", "/apprenticeships", "Apprenticeships", "topic" ) - render_component(content_item: content_item) + render_component(content_item:) assert_select ".gem-c-related-navigation[data-module='gem-track-click']" assert_select ".gem-c-related-navigation__section-link[data-track-category='relatedLinkClicked']" @@ -244,7 +244,7 @@ def construct_links(type, base_path, title, document_type = nil, locale = nil) content_item["links"]["world_locations"] << { "title" => country } end - render_component(content_item: content_item, ga4_tracking: true) + render_component(content_item:, ga4_tracking: true) assert_select ".gem-c-related-navigation[data-module='gem-track-click ga4-link-tracker']" assert_select ".gem-c-related-navigation__section-link[data-ga4-link='{\"event_name\":\"navigation\",\"type\":\"related content\",\"index\":{\"index_section\":\"1\",\"index_link\":\"1\",\"index_section_count\":\"3\"},\"index_total\":\"2\",\"section\":\"Related content\"}']", text: "Fishing" @@ -263,7 +263,7 @@ def construct_links(type, base_path, title, document_type = nil, locale = nil) content_item["links"] = construct_links( "topics", "/apprenticeships", "Apprenticeships", "topic", "ko" ) - render_component(content_item: content_item) + render_component(content_item:) assert_select ".gem-c-related-navigation__section-link[lang='ko']" end @@ -273,7 +273,7 @@ def construct_links(type, base_path, title, document_type = nil, locale = nil) content_item["links"] = construct_links( "topics", "/apprenticeships", "Apprenticeships", "topic", I18n.locale ) - render_component(content_item: content_item) + render_component(content_item:) assert_select ".gem-c-related-navigation__section-link[lang='#{I18n.locale}']", false end @@ -283,7 +283,7 @@ def construct_links(type, base_path, title, document_type = nil, locale = nil) content_item["links"] = construct_links( "topics", "/apprenticeships", "Apprenticeships", "topic" ) - render_component(content_item: content_item) + render_component(content_item:) assert_select ".gem-c-related-navigation__section-link[lang]", false end diff --git a/spec/components/reorderable_list_spec.rb b/spec/components/reorderable_list_spec.rb index 550233a79f..b6dc90d5bb 100644 --- a/spec/components/reorderable_list_spec.rb +++ b/spec/components/reorderable_list_spec.rb @@ -36,7 +36,7 @@ def items end it "renders a list of items" do - render_component(items: items) + render_component(items:) assert_select ".gem-c-reorderable-list" assert_select ".gem-c-reorderable-list__item", 5 @@ -54,7 +54,7 @@ def items end it "renders allows custom input names" do - render_component(items: items, input_name: "attachments[ordering]") + render_component(items:, input_name: "attachments[ordering]") assert_select ".gem-c-reorderable-list" assert_select ".gem-c-reorderable-list__item" do |elements| diff --git a/spec/components/share_links_spec.rb b/spec/components/share_links_spec.rb index d4bb776f18..5e407ce515 100644 --- a/spec/components/share_links_spec.rb +++ b/spec/components/share_links_spec.rb @@ -26,13 +26,13 @@ def links end it "renders share links correctly" do - render_component(links: links) + render_component(links:) assert_select ".gem-c-share-links .gem-c-share-links__link[href=\"/facebook\"]", /Share.+on.+Facebook.+\(opens.+in.+new.+tab\)/m assert_select ".gem-c-share-links .gem-c-share-links__link[href=\"/twitter\"]", /Tweet.+to.+Twitter.+\(opens.+in.+new.+tab\)/m end it "renders a custom title" do - render_component(links: links, title: "Share this page") + render_component(links:, title: "Share this page") assert_select ".gem-c-share-links .govuk-heading-s", text: "Share this page" end @@ -48,7 +48,7 @@ def links attributes = { module: "test", } - render_component(links: links, data_attributes: attributes) + render_component(links:, data_attributes: attributes) assert_select ".gem-c-share-links[data-module='test gem-track-click']" end @@ -104,17 +104,17 @@ def links end it "accepts the stacking option" do - render_component(links: links, stacked: true) + render_component(links:, stacked: true) assert_select ".gem-c-share-links.gem-c-share-links--stacked" end it "displays the visually hidden text 'Share on' if custom hidden_text is not specified" do - render_component(links: links) + render_component(links:) assert_select ".gem-c-share-links .gem-c-share-links__link[href=\"/facebook\"] .govuk-visually-hidden", text: "Share on" end it "displays the provided visually hidden text" do - render_component(links: links) + render_component(links:) assert_select ".gem-c-share-links .gem-c-share-links__link[href=\"/twitter\"] .govuk-visually-hidden", text: "Tweet to" end end diff --git a/spec/features/contextual_navigation_spec.rb b/spec/features/contextual_navigation_spec.rb index aea67f07e2..f23ccf9744 100644 --- a/spec/features/contextual_navigation_spec.rb +++ b/spec/features/contextual_navigation_spec.rb @@ -189,7 +189,7 @@ def given_theres_are_two_step_by_step_lists part_of_step_navs[1]["content_id"] = "8ad999bd-8603-40eb-97c0-999cb22047cd" part_of_step_navs[1]["title"] = "PRIMARY STEP BY STEP - INTERACTING WITH" - content_store_has_random_item(links: { part_of_step_navs: part_of_step_navs }) + content_store_has_random_item(links: { part_of_step_navs: }) end def given_theres_a_page_with_a_secondary_step_by_step @@ -205,7 +205,7 @@ def given_there_are_three_secondary_step_by_steps_and_two_primary_to_step_navs secondary_to_step_navs[0]["title"] = "SECONDARY STEP BY STEP" content_store_has_random_item(links: { - secondary_to_step_navs: secondary_to_step_navs, + secondary_to_step_navs:, part_of_step_navs: 2.times.map { random_step_nav_item("step_by_step_nav") }, }) end @@ -230,7 +230,7 @@ def given_there_are_two_primary_step_by_steps_and_one_secondary_to_step_navs secondary_to_step_nav["title"] = "SECONDARY STEP BY STEP" content_store_has_random_item(links: { - part_of_step_navs: part_of_step_navs, + part_of_step_navs:, secondary_to_step_navs: [secondary_to_step_nav], }) end @@ -536,7 +536,7 @@ def random_step_nav_item(schema_name) end def example_item(schema_name, example_name) - GovukSchemas::Example.find(schema_name, example_name: example_name) + GovukSchemas::Example.find(schema_name, example_name:) end def random_item(schema_name, merge_with = {}) diff --git a/spec/lib/govuk_publishing_components/components/component_wrapper_helper_spec.rb b/spec/lib/govuk_publishing_components/components/component_wrapper_helper_spec.rb index 5345f74cc5..4c994479c4 100644 --- a/spec/lib/govuk_publishing_components/components/component_wrapper_helper_spec.rb +++ b/spec/lib/govuk_publishing_components/components/component_wrapper_helper_spec.rb @@ -38,7 +38,7 @@ it "rejects invalid class names" do classes = "js-okay not-cool-man" expect { - GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(classes: classes) + GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(classes:) }.to raise_error(ArgumentError, "Classes (#{classes}) must be prefixed with `js-`") end @@ -52,7 +52,7 @@ ["2idstartingwithanumber", "id containing spaces", "idwitha.character"].each do |id| error = "Id (#{id}) cannot start with a number or contain whitespace and can only contain letters, digits, `_` and `-`" expect { - GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(id: id) + GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(id:) }.to raise_error(ArgumentError, error) end end diff --git a/spec/lib/govuk_publishing_components/components/contents_list_helper_spec.rb b/spec/lib/govuk_publishing_components/components/contents_list_helper_spec.rb index 22413ad013..976816ae36 100644 --- a/spec/lib/govuk_publishing_components/components/contents_list_helper_spec.rb +++ b/spec/lib/govuk_publishing_components/components/contents_list_helper_spec.rb @@ -93,7 +93,7 @@ text: "test3", }, ] - cl = GovukPublishingComponents::Presenters::ContentsListHelper.new({ contents: contents }) + cl = GovukPublishingComponents::Presenters::ContentsListHelper.new({ contents: }) expect(cl.get_index_total).to eql(4) end diff --git a/spec/lib/govuk_publishing_components/components/intervention_helper_spec.rb b/spec/lib/govuk_publishing_components/components/intervention_helper_spec.rb index 6bb5171ea4..d576a56922 100644 --- a/spec/lib/govuk_publishing_components/components/intervention_helper_spec.rb +++ b/spec/lib/govuk_publishing_components/components/intervention_helper_spec.rb @@ -11,7 +11,7 @@ it "appends the dismiss query string parameter" do query_string = "?a=b" - intervention_helper = GovukPublishingComponents::Presenters::InterventionHelper.new(query_string: query_string) + intervention_helper = GovukPublishingComponents::Presenters::InterventionHelper.new(query_string:) new_query_string = intervention_helper.dismiss_link expect(new_query_string).to eql("?a=b&hide-intervention=true") @@ -21,7 +21,7 @@ existing_query_string = "" request = Rack::Utils.parse_nested_query(existing_query_string) - intervention_helper = GovukPublishingComponents::Presenters::InterventionHelper.new(request: request) + intervention_helper = GovukPublishingComponents::Presenters::InterventionHelper.new(request:) new_query_string = intervention_helper.dismiss_link expect(new_query_string).to eql("?hide-intervention=true") @@ -45,7 +45,7 @@ params = { "hide-intervention" => "true", } - intervention_helper = GovukPublishingComponents::Presenters::InterventionHelper.new({ suggestion_link_text: "Text", suggestion_link_url: "/path-to-page", params: params }) + intervention_helper = GovukPublishingComponents::Presenters::InterventionHelper.new({ suggestion_link_text: "Text", suggestion_link_url: "/path-to-page", params: }) expect(intervention_helper.show?).to be_falsey end diff --git a/spec/lib/govuk_publishing_components/components/public_layout_helper_spec.rb b/spec/lib/govuk_publishing_components/components/public_layout_helper_spec.rb index 8a8ce06592..51eb33313d 100644 --- a/spec/lib/govuk_publishing_components/components/public_layout_helper_spec.rb +++ b/spec/lib/govuk_publishing_components/components/public_layout_helper_spec.rb @@ -33,7 +33,7 @@ res = { track_category: "footerClicked", - track_action: track_action, + track_action:, track_label: "/help", track_options: { dimension29: "Help", @@ -54,7 +54,7 @@ an_attribute: "still present", data: { track_category: "footerClicked", - track_action: track_action, + track_action:, track_label: "/help", track_options: { dimension29: "Help", diff --git a/spec/lib/govuk_publishing_components/components/step_by_step_nav_helper_spec.rb b/spec/lib/govuk_publishing_components/components/step_by_step_nav_helper_spec.rb index 7d82d4fcea..86c41a56e2 100644 --- a/spec/lib/govuk_publishing_components/components/step_by_step_nav_helper_spec.rb +++ b/spec/lib/govuk_publishing_components/components/step_by_step_nav_helper_spec.rb @@ -20,7 +20,7 @@ it "generates a basic list" do contents = [{ text: "Link 1", href: "/link1" }] options = { link_index: 0, step_index: 0, step_nav_content_id: "this-is-an-id" } - list = step_helper.render_step_nav_element({ type: "list", contents: contents }, options) + list = step_helper.render_step_nav_element({ type: "list", contents: }, options) expect(list).to eql('
  1. Link 1
') end @@ -28,7 +28,7 @@ it "generates a choice list" do contents = [{ text: "Link 1", href: "/link1" }] options = { link_index: 0, step_index: 0, step_nav_content_id: "this-is-an-id" } - list = step_helper.render_step_nav_element({ type: "list", contents: contents, style: "choice" }, options) + list = step_helper.render_step_nav_element({ type: "list", contents:, style: "choice" }, options) expect(list).to eql('') end @@ -36,7 +36,7 @@ it "generates a list with multiple items and correct link and step indexing attributes" do contents = [{ text: "Link 1", href: "/link1" }, { text: "Link 2", href: "/link2" }, { text: "Link 3", href: "/link3" }] options = { link_index: 3, step_index: 2, step_nav_content_id: "this-is-an-id" } - list = step_helper.render_step_nav_element({ type: "list", contents: contents }, options) + list = step_helper.render_step_nav_element({ type: "list", contents: }, options) expect(list).to eql('
  1. Link 1
  2. Link 2
  3. Link 3
') end @@ -44,7 +44,7 @@ it "generates a list with external links marked appropriately" do contents = [{ text: "Link 1", href: "https://www.gov.uk" }, { text: "Link 2", href: "/link2" }] options = { link_index: 0, step_index: 0, step_nav_content_id: "this-is-an-id" } - list = step_helper.render_step_nav_element({ type: "list", contents: contents }, options) + list = step_helper.render_step_nav_element({ type: "list", contents: }, options) expect(list).to eql('
  1. Link 1
  2. Link 2
') end @@ -52,7 +52,7 @@ it "generates a list with contexts" do contents = [{ text: "Link 1", href: "/link1", context: "37p" }] options = { link_index: 0, step_index: 0, step_nav_content_id: "this-is-an-id" } - list = step_helper.render_step_nav_element({ type: "list", contents: contents }, options) + list = step_helper.render_step_nav_element({ type: "list", contents: }, options) expect(list).to eql('
  1. Link 1 37p
') end @@ -60,7 +60,7 @@ it "generates a list with an active element" do contents = [{ text: "Link 1", href: "/link1" }, { text: "Link 2", href: "/link2", active: true }] options = { link_index: 0, step_index: 0, step_nav_content_id: "this-is-an-id" } - list = step_helper.render_step_nav_element({ type: "list", contents: contents }, options) + list = step_helper.render_step_nav_element({ type: "list", contents: }, options) expect(list).to eql('
  1. Link 1
  2. You are currently viewing: Link 2
') end diff --git a/spec/lib/govuk_publishing_components/presenters/machine_readable/html_publication_schema_spec.rb b/spec/lib/govuk_publishing_components/presenters/machine_readable/html_publication_schema_spec.rb index 751e467613..62b5769c3e 100644 --- a/spec/lib/govuk_publishing_components/presenters/machine_readable/html_publication_schema_spec.rb +++ b/spec/lib/govuk_publishing_components/presenters/machine_readable/html_publication_schema_spec.rb @@ -20,7 +20,7 @@ end let(:page_data) do { - content_item: content_item, + content_item:, schema: :html_publication, } end diff --git a/spec/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation_spec.rb b/spec/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation_spec.rb index f4eee86f8c..d991d5a529 100644 --- a/spec/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation_spec.rb +++ b/spec/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation_spec.rb @@ -181,7 +181,7 @@ path: "/learn-to-spacewalk", title: "Learn to spacewalk: small step by giant leap", tracking_id: "cccc-dddd", - ga4_tracking: ga4_tracking, + ga4_tracking:, ) expect(step_nav_links.show_related_links?).to be true @@ -518,7 +518,7 @@ path: "/lose-your-lunch", title: "Lose your lunch: lurch by lurch", tracking_id: "aaaa-bbbb", - ga4_tracking: ga4_tracking, + ga4_tracking:, ) expect(step_nav_links.show_related_links?).to be true @@ -623,7 +623,7 @@ path: "/PRIMARY-lose-your-lunch", title: "PRIMARY Lose your lunch: lurch by lurch", tracking_id: "PRIMARY-aaaa-bbbb", - ga4_tracking: ga4_tracking, + ga4_tracking:, ) expect(step_nav_links.show_related_links?).to be true @@ -673,7 +673,7 @@ path: "/PRIMARY-lose-your-lunch", title: "PRIMARY Lose your lunch: lurch by lurch", tracking_id: "PRIMARY-aaaa-bbbb", - ga4_tracking: ga4_tracking, + ga4_tracking:, ) expect(step_nav_links.show_related_links?).to be true diff --git a/spec/lib/govuk_publishing_components/presenters/related_navigation_helper_spec.rb b/spec/lib/govuk_publishing_components/presenters/related_navigation_helper_spec.rb index 603f922578..536e6d9b13 100644 --- a/spec/lib/govuk_publishing_components/presenters/related_navigation_helper_spec.rb +++ b/spec/lib/govuk_publishing_components/presenters/related_navigation_helper_spec.rb @@ -5,7 +5,7 @@ def payload_for(schema, content_item, context = nil) example = GovukSchemas::RandomExample.for_schema(frontend_schema: schema) do |payload| payload.merge(content_item) end - described_class.new(content_item: example, context: context).related_navigation + described_class.new(content_item: example, context:).related_navigation end describe "#related_navigation" do diff --git a/spec/lib/govuk_publishing_components/presenters/schema_org_spec.rb b/spec/lib/govuk_publishing_components/presenters/schema_org_spec.rb index f3da54a2f0..6acf5b4528 100644 --- a/spec/lib/govuk_publishing_components/presenters/schema_org_spec.rb +++ b/spec/lib/govuk_publishing_components/presenters/schema_org_spec.rb @@ -13,7 +13,7 @@ end structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :article, ).structured_data @@ -34,7 +34,7 @@ end structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :article, ).structured_data @@ -74,7 +74,7 @@ end structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :dataset, ).structured_data @@ -124,7 +124,7 @@ content_item = transaction_content_item([], []) structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :government_service, ).structured_data @@ -138,7 +138,7 @@ content_item = transaction_content_item([], @ordered_related_items) structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :government_service, ).structured_data @@ -162,7 +162,7 @@ content_item = transaction_content_item(@organisations, []) structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :government_service, ).structured_data @@ -173,7 +173,7 @@ content_item = transaction_content_item(@organisations, []) structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :government_service, ).structured_data @@ -197,7 +197,7 @@ content_item = transaction_content_item([], @ordered_related_items) structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :government_service, ).structured_data @@ -232,7 +232,7 @@ def transaction_content_item(organisations = [], ordered_related_items = []) content_item = GovukSchemas::RandomExample.for_schema(frontend_schema: "answer") structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :news_article, ).structured_data @@ -251,7 +251,7 @@ def transaction_content_item(organisations = [], ordered_related_items = []) content_item = dragon_guide structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :faq, body: part_body, ).structured_data @@ -281,7 +281,7 @@ def transaction_content_item(organisations = [], ordered_related_items = []) content_item = dragon_guide q_and_a = generate_structured_data( - content_item: content_item, + content_item:, schema: :faq, body: part_body, ).structured_data["mainEntity"] @@ -300,7 +300,7 @@ def transaction_content_item(organisations = [], ordered_related_items = []) content_item = dragon_guide q_and_a = generate_structured_data( - content_item: content_item, + content_item:, schema: :faq, body: part_body, ).structured_data["mainEntity"] @@ -314,7 +314,7 @@ def transaction_content_item(organisations = [], ordered_related_items = []) content_item = dragon_guide q_and_a = generate_structured_data( - content_item: content_item, + content_item:, schema: :faq, body: empty_part_body, ).structured_data["mainEntity"] @@ -339,7 +339,7 @@ def dragon_guide content_item = GovukSchemas::RandomExample.for_schema(frontend_schema: "person") structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :person, ).structured_data @@ -361,7 +361,7 @@ def dragon_guide } structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :organisation, ).structured_data @@ -393,7 +393,7 @@ def dragon_guide ) structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :organisation, ).structured_data @@ -440,7 +440,7 @@ def dragon_guide end structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :organisation, ).structured_data @@ -473,7 +473,7 @@ def dragon_guide end structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :organisation, ).structured_data @@ -489,7 +489,7 @@ def dragon_guide end structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :article, canonical_url: "https://www.gov.uk/foo/bar", ).structured_data @@ -508,7 +508,7 @@ def dragon_guide end structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :article, body: "Bar", ).structured_data @@ -533,7 +533,7 @@ def dragon_guide end structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :article, ).structured_data @@ -547,7 +547,7 @@ def dragon_guide end structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :article, ).structured_data @@ -561,7 +561,7 @@ def dragon_guide end structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :article, image_placeholders: [1, 2], ).structured_data @@ -575,7 +575,7 @@ def dragon_guide end structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :article, ).structured_data @@ -601,7 +601,7 @@ def dragon_guide end structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :article, ).structured_data @@ -623,7 +623,7 @@ def dragon_guide end structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :article, ).structured_data @@ -664,7 +664,7 @@ def dragon_guide end structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :article, ).structured_data @@ -707,7 +707,7 @@ def dragon_guide end structured_data = generate_structured_data( - content_item: content_item, + content_item:, schema: :article, ).structured_data