Skip to content

Commit d5b5678

Browse files
authored
Merge branch 'main' into ojtjo3-codex/update-favicon-and-title-on-page-load
2 parents bed8e51 + 3978499 commit d5b5678

File tree

12 files changed

+112
-72
lines changed

12 files changed

+112
-72
lines changed

.github/workflows/brakeman.yml

Lines changed: 32 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
1-
# This workflow uses actions that are not certified by GitHub.
2-
# They are provided by a third-party and are governed by
3-
# separate terms of service, privacy policy, and support
4-
# documentation.
5-
6-
# This workflow integrates Brakeman with GitHub's Code Scanning feature
7-
# Brakeman is a static analysis security vulnerability scanner for Ruby on Rails applications
8-
91
name: Brakeman Scan
102

113
on:
124
push:
135
branches: [ "main" ]
146
pull_request:
15-
# The branches below must be a subset of the branches above
167
branches: [ "main" ]
178
schedule:
189
- cron: '26 3 * * 0'
@@ -22,37 +13,38 @@ permissions:
2213

2314
jobs:
2415
brakeman-scan:
25-
permissions:
26-
contents: read # for actions/checkout to fetch code
27-
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
28-
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
2916
name: Brakeman Scan
17+
# Option A: stay on latest (24.04) – requires up-to-date setup-ruby
3018
runs-on: ubuntu-latest
19+
# Option B (fallback): force older image if you prefer
20+
# runs-on: ubuntu-22.04
21+
22+
permissions:
23+
contents: read
24+
security-events: write
25+
actions: read
26+
3127
steps:
32-
# Checkout the repository to the GitHub Actions runner
33-
- name: Checkout
34-
uses: actions/checkout@v3
35-
36-
# Customize the ruby version depending on your needs
37-
- name: Setup Ruby
38-
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
39-
with:
40-
ruby-version: '3.2'
41-
42-
- name: Setup Brakeman
43-
env:
44-
BRAKEMAN_VERSION: '4.10' # SARIF support is provided in Brakeman version 4.10+
45-
run: |
46-
gem install brakeman --version $BRAKEMAN_VERSION
47-
48-
# Execute Brakeman CLI and generate a SARIF output with the security issues identified during the analysis
49-
- name: Scan
50-
continue-on-error: true
51-
run: |
52-
brakeman -f sarif -o output.sarif.json .
53-
54-
# Upload the SARIF file generated in the previous step
55-
- name: Upload SARIF
56-
uses: github/codeql-action/upload-sarif@v2
57-
with:
58-
sarif_file: output.sarif.json
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
31+
- name: Setup Ruby
32+
# Use the rolling v1 tag so you get fixes for new runner images
33+
uses: ruby/setup-ruby@v1
34+
with:
35+
ruby-version: '3.2' # or your exact patch, e.g. '3.2.2'
36+
# bundler-cache not needed since we install brakeman directly
37+
38+
- name: Setup Brakeman
39+
run: |
40+
gem install brakeman
41+
42+
- name: Scan (SARIF)
43+
continue-on-error: true
44+
run: |
45+
brakeman -f sarif -o output.sarif.json .
46+
47+
- name: Upload SARIF
48+
uses: github/codeql-action/upload-sarif@v3
49+
with:
50+
sarif_file: output.sarif.json

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050

5151
# Initializes the CodeQL tools for scanning.
5252
- name: Initialize CodeQL
53-
uses: github/codeql-action/init@v2
53+
uses: github/codeql-action/init@v3
5454
with:
5555
languages: ${{ matrix.language }}
5656
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -64,7 +64,7 @@ jobs:
6464
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
6565
# If this step fails, then you should remove it and run the build manually (see below)
6666
- name: Autobuild
67-
uses: github/codeql-action/autobuild@v2
67+
uses: github/codeql-action/autobuild@v3
6868

6969
# ℹ️ Command-line programs to run using the OS shell.
7070
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -77,6 +77,6 @@ jobs:
7777
# ./location_of_script_within_repo/buildscript.sh
7878

7979
- name: Perform CodeQL Analysis
80-
uses: github/codeql-action/analyze@v2
80+
uses: github/codeql-action/analyze@v3
8181
with:
8282
category: "/language:${{matrix.language}}"

Gemfile.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ GEM
189189
descendants_tracker (~> 0.0.4)
190190
ice_nine (~> 0.11.0)
191191
thread_safe (~> 0.3, >= 0.3.1)
192-
base64 (0.2.0)
192+
base64 (0.3.0)
193193
bcrypt (3.1.20)
194194
benchmark (0.4.1)
195195
better_errors (2.10.1)
@@ -304,7 +304,7 @@ GEM
304304
erb (5.0.2)
305305
erubi (1.13.1)
306306
event_stream_parser (1.0.0)
307-
excon (1.2.7)
307+
excon (1.2.8)
308308
logger
309309
execjs (2.10.0)
310310
factory_bot (6.5.4)
@@ -325,8 +325,8 @@ GEM
325325
ffi (1.17.2-aarch64-linux-gnu)
326326
ffi (1.17.2-arm64-darwin)
327327
ffi (1.17.2-x86_64-linux-gnu)
328-
fog-aws (3.32.0)
329-
base64 (~> 0.2.0)
328+
fog-aws (3.33.0)
329+
base64 (>= 0.2, < 0.4)
330330
fog-core (~> 2.6)
331331
fog-json (~> 1.1)
332332
fog-xml (~> 0.1)
@@ -343,7 +343,7 @@ GEM
343343
nokogiri (>= 1.5.11, < 2.0.0)
344344
font-awesome-sass (6.7.2)
345345
sassc (~> 2.0)
346-
formatador (1.1.0)
346+
formatador (1.1.1)
347347
friendly_id (5.4.2)
348348
activerecord (>= 4.0.0)
349349
friendly_id-mobility (1.0.4)
@@ -454,7 +454,7 @@ GEM
454454
mime-types (3.7.0)
455455
logger
456456
mime-types-data (~> 3.2025, >= 3.2025.0507)
457-
mime-types-data (3.2025.0527)
457+
mime-types-data (3.2025.0805)
458458
mini_magick (5.2.0)
459459
benchmark
460460
logger
@@ -467,7 +467,7 @@ GEM
467467
actiontext (>= 6.0)
468468
mobility (~> 1.2)
469469
msgpack (1.8.0)
470-
multi_json (1.15.0)
470+
multi_json (1.17.0)
471471
multipart-post (2.4.1)
472472
mutex_m (0.3.0)
473473
net-http (0.6.0)
@@ -741,7 +741,7 @@ GEM
741741
simplecov_json_formatter (~> 0.1)
742742
simplecov-html (0.13.1)
743743
simplecov_json_formatter (0.1.4)
744-
spring (4.3.0)
744+
spring (4.4.0)
745745
spring-watcher-listen (2.1.0)
746746
listen (>= 2.7, < 4.0)
747747
spring (>= 4)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- app/views/better_together/navigation_areas/edit.html.erb -->
22

33
<div class="container">
4-
<h1>Edit Navigation Area</h1>
4+
<h1><%= t('better_together.navigation_areas.edit.title') %></h1>
55
<%= render 'form', navigation_area: @navigation_area %>
6-
<%= link_to 'Back', navigation_areas_path, class: 'btn btn-secondary' %>
6+
<%= link_to t('shared.links.back'), navigation_areas_path, class: 'btn btn-secondary' %>
77
</div>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- app/views/better_together/navigation_areas/new.html.erb -->
22

33
<div class="container">
4-
<h1>New Navigation Area</h1>
4+
<h1><%= t('better_together.navigation_areas.new.title') %></h1>
55
<%= render 'form', navigation_area: @navigation_area %>
6-
<%= link_to 'Back', navigation_areas_path, class: 'btn btn-secondary' %>
6+
<%= link_to t('shared.links.back'), navigation_areas_path, class: 'btn btn-secondary' %>
77
</div>

app/views/better_together/navigation_items/_form.html.erb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<%= form.hidden_field :navigation_area_id, value: @navigation_area.id %>
3232

3333
<div class="mb-3">
34-
<%= form.label :parent_id, 'Parent Item' %>
34+
<%= form.label :parent_id, t('better_together.navigation_items.form.parent_item') %>
3535
<%= form.collection_select :parent_id, available_parent_items, :id, :select_option_title, { include_blank: true }, { class: 'form-select' + (@navigation_item.errors[:parent_id].any? ? ' is-invalid' : ''), data: { controller: "better_together--slim-select" } } %>
3636
<% if @navigation_item.errors[:parent_id].any? %>
3737
<div class="invalid-feedback">
@@ -52,7 +52,7 @@
5252

5353
<!-- Control field for linkable_id -->
5454
<div id="nav-item-linkable" class="bt-mb-3" data-better_together--dependent-fields-target="dependentField" data-dependent-fields-control="navigation_item_route_name" data-show-if-control_navigation_item_route_name="*not_present*">
55-
<%= form.label :linkable_id, 'Link to Page' %>
55+
<%= form.label :linkable_id, t('better_together.navigation_items.form.link_to_page') %>
5656
<%= form.collection_select :linkable_id, @pages, :id, :select_option_title, { include_blank: true }, { id: 'navigation_item_linkable_id', class: ('form-select' + (@navigation_item.errors[:linkable_id].any? ? ' is-invalid' : '')), data: { controller: "better_together--slim-select" }, 'data-better_together--dependent-fields-target' => "controlField" } %>
5757
<% if @navigation_item.errors[:linkable_id].any? %>
5858
<div class="invalid-feedback">
@@ -64,12 +64,12 @@
6464
<!-- Dependent field 1 (shown when no value is present) -->
6565
<div id="nav-item-title" class="bt-mb-3" data-better_together--dependent-fields-target="dependentField" data-dependent-fields-control="navigation_item_linkable_id" data-show-if-control_navigation_item_linkable_id="*not_present*">
6666
<%= render partial: 'better_together/shared/translated_string_field', locals: { model: navigation_item, form: form, attribute: 'title' } %>
67-
<small class="form-text text-muted mt-2">Enter the nav item title.</small> <!-- Help text added here -->
67+
<small class="form-text text-muted mt-2"><%= t('better_together.navigation_items.form.enter_nav_item_title') %></small> <!-- Help text added here -->
6868
</div>
6969

7070
<!-- Dependent field 2 (shown when no value is present) -->
7171
<div id="nav-item-route-name" class="bt-mb-3" data-better_together--dependent-fields-target="dependentField" data-dependent-fields-control="navigation_item_linkable_id" data-show-if-control_navigation_item_linkable_id="*not_present*">
72-
<%= form.label :route_name, "Dynamic Route" %>
72+
<%= form.label :route_name, t('better_together.navigation_items.form.dynamic_route') %>
7373
<%= form.select :route_name, route_names_for_select(@navigation_item), { include_blank: true }, { id: 'navigation_item_route_name', class: 'form-select', 'data-better_together--dependent-fields-target' => "controlField", data: { controller: "better_together--slim-select" } } %>
7474
<% if @navigation_item.errors[:linkable_id].any? %>
7575
<div class="invalid-feedback">
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- app/views/better_together/navigation_items/edit.html.erb -->
22

33
<div class="container my-3">
4-
<h1>Edit Navigation Item: <%= @navigation_item.title %></h1>
4+
<h1><%= t('better_together.navigation_items.edit.title', title: @navigation_item.title) %></h1>
55

66
<%= render 'form', navigation_area: @navigation_area, navigation_item: @navigation_item, pages: @pages %>
77
</div>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<!-- app/views/better_together/navigation_items/index.html.erb -->
22

33
<% content_for :page_title do %>
4-
Navigation Items for <%= @navigation_area.name %>
4+
<%= t('better_together.navigation_items.index.title', name: @navigation_area.name) %>
55
<% end %>
66

77
<div class="container my-3">
8-
<h1>Navigation Items for <%= @navigation_area.name %></h1>
9-
<%= link_to 'New Navigation Item', new_navigation_area_navigation_item_path(@navigation_area), class: 'btn btn-primary' %>
8+
<h1><%= t('better_together.navigation_items.index.title', name: @navigation_area.name) %></h1>
9+
<%= link_to t('better_together.navigation_items.index.new_navigation_item'), new_navigation_area_navigation_item_path(@navigation_area), class: 'btn btn-primary' %>
1010

1111
<%= render partial: 'navigation_items_table', locals: { navigation_items: @navigation_items } %>
1212
</div>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- app/views/better_together/navigation_items/new.html.erb -->
22

33
<div class="container my-3">
4-
<h1>New Navigation Item for <%= @navigation_area.name %></h1>
4+
<h1><%= t('better_together.navigation_items.new.title', name: @navigation_area.name) %></h1>
55

66
<%= render 'form', navigation_area: @navigation_area, navigation_item: @navigation_item, page: @pages %>
77
</div>

config/locales/en.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,23 @@ en:
768768
new_navigation_area: New navigation area
769769
show:
770770
new_navigation_item: New navigation item
771+
new:
772+
title: New Navigation Area
773+
edit:
774+
title: Edit Navigation Area
771775
navigation_items:
776+
index:
777+
title: "Navigation Items for %{name}"
778+
new_navigation_item: New Navigation Item
779+
new:
780+
title: "New Navigation Item for %{name}"
781+
edit:
782+
title: "Edit Navigation Item: %{title}"
783+
form:
784+
parent_item: Parent Item
785+
link_to_page: Link to Page
786+
enter_nav_item_title: Enter the nav item title.
787+
dynamic_route: Dynamic Route
772788
route_names:
773789
calendars: Calendars
774790
calls_for_interest: Calls for Interest

0 commit comments

Comments
 (0)