Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump ViewComponent to v3.9.0 #492

Merged
merged 3 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/components/govuk_component/tab_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Tab < GovukComponent::Base

def initialize(label:, text: nil, classes: [], html_attributes: {})
@label = label
@text = text
@text = h(text)

super(classes: classes, html_attributes: html_attributes)
end
Expand Down
2 changes: 1 addition & 1 deletion govuk-components.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Gem::Specification.new do |spec|

spec.add_dependency("html-attributes-utils", "~> 1.0.0", ">= 1.0.0")
spec.add_dependency("pagy", "~> 6.0")
spec.add_dependency("view_component", ">= 3.3", "< 3.9")
spec.add_dependency("view_component", ">= 3.9", "< 3.10")

spec.add_development_dependency "deep_merge"
spec.add_development_dependency "pry-byebug"
Expand Down
2 changes: 1 addition & 1 deletion guide/lib/examples/pagination_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# links expect a Rack request.
module Pagy::UrlHelpers
def request
OpenStruct.new(GET: {}, session: nil, host: "https://somesite/")
OpenStruct.new(GET: {}, session: nil, host: "https://somesite/", format: OpenStruct.new(html?: true))
end
end

Expand Down
4 changes: 3 additions & 1 deletion spec/components/govuk_component/header_component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
RSpec.describe(GovukComponent::HeaderComponent, type: :component) do
before do
allow_any_instance_of(GovukComponent::HeaderComponent::NavigationItem).to(
receive(:request).and_return(double(ActionDispatch::Request, get?: true, path: current_page))
receive(:current_page?).and_wrap_original do |_original_method, path|
path == current_page
end
)
end

Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

module Pagy::UrlHelpers
def request
OpenStruct.new(GET: {}, session: nil, host: "https://somesite/")
OpenStruct.new(GET: {}, session: nil, host: "https://somesite/", format: OpenStruct.new(html?: true))
end
end

Expand Down
Loading