
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
govuk_navigation_helpers
Advanced tools
This is a gem to share code between GOV.UK frontends.
** It should not be used anymore ***
This gem was a temporary solution to the problem of sharing code used to generate the input to components. Since the components can now be built into the govuk_publishing_components gem, it is no longer necessary.
These helpers format data from the content store for use with GOV.UK Components.
Add this line to your application's Gemfile:
gem 'govuk_navigation_helpers', '~> VERSION'
And then execute:
$ bundle
This gem allows the configuration of:
Airbrake
), that implements a notify
method
which takes an exception object (by default, it prints the exception to stdout
when not configured);increment(metric)
and time(metric, &block)
.Get the JSON representation of a page and initialise the helper:
def some_controller_method
content_item = Services.content_store.content_item("/register-to-vote")
@navigation = GovukNavigationHelpers::NavigationHelper.new(content_item)
end
Render the component:
<%= render partial: 'govuk_component/breadcrumbs', locals: @navigation.breadcrumbs %>
<%= render partial: 'govuk_component/related_items', locals: @navigation.related_items %>
bundle exec rake
See RubyDoc for some limited documentation.
To run a Yard server locally to preview documentation, run:
$ bundle exec yard server --reload
FAQs
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.