Skip to content

Commit cc7ebbf

Browse files
committed
Merge branch 'feature/checklists' of github.com:better-together-solutions/community-engine-rails into feature/checklists
2 parents 643d61b + 45dbba3 commit cc7ebbf

File tree

13 files changed

+90
-100
lines changed

13 files changed

+90
-100
lines changed

.github/workflows/rubyonrails.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@ jobs:
1111
matrix:
1212
include:
1313
- ruby: '3.4.4'
14-
rails: '7.1.5.2'
14+
rails: '7.2.2.2'
1515
allowed_failure: false # ✅ required
16-
- ruby: '3.4.4'
17-
rails: '7.2.2.1'
18-
allowed_failure: false # ⚠️ allowed to fail
1916
- ruby: '3.4.4'
2017
rails: '8.0.2'
2118
allowed_failure: true # ⚠️ allowed to fail
@@ -52,18 +49,18 @@ jobs:
5249
with:
5350
ruby-version: ${{ matrix.ruby }}
5451

55-
# Run the automatic bundle-install only on 7.1.
52+
# Run the automatic bundle-install only on 7.2.
5653
# For 7.2 / 8.0 it just sets up Ruby *and* restores a cache layer
5754
# that we’ll reuse in the later manual install.
58-
bundler-cache: ${{ matrix.rails == '7.1.5.2' }}
55+
bundler-cache: ${{ matrix.rails == '7.2.2.2' }}
5956

6057
# One cache bucket per Rails version so they don’t clobber each other.
6158
cache-version: rails-${{ matrix.rails }}
6259

6360
# Updating Rails can legitimately blow up on the experimental tracks,
6461
# so we allow that *step* to error out without failing the job.
6562
- name: Update Rails & install gems
66-
if: matrix.rails != '7.1.5.2'
63+
if: matrix.rails != '7.2.2.2'
6764
id: update
6865
run: |
6966
# turn off deployment mode
@@ -75,21 +72,21 @@ jobs:
7572
continue-on-error: ${{ matrix.allowed_failure }}
7673

7774
- name: Prepare DB schema
78-
if: (matrix.rails == '7.1.5.2') || steps.update.outcome == 'success'
75+
if: (matrix.rails == '7.2.2.2') || steps.update.outcome == 'success'
7976
run: |
8077
rm -f spec/dummy/tmp/pids/server.pid
8178
bundle exec rake -f spec/dummy/Rakefile db:schema:load
8279
continue-on-error: ${{ matrix.allowed_failure }}
8380

8481
- name: Wait for Elasticsearch
85-
if: (matrix.rails == '7.1.5.2') || steps.update.outcome == 'success'
82+
if: (matrix.rails == '7.2.2.2') || steps.update.outcome == 'success'
8683
run: |
8784
echo "Waiting for Elasticsearch to be healthy..."
8885
curl -s "http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=60s" || (echo "Elasticsearch not healthy" && exit 1)
8986
9087
9188
- name: Run RSpec
92-
if: (matrix.rails == '7.1.5.2') || steps.update.outcome == 'success'
89+
if: (matrix.rails == '7.2.2.2') || steps.update.outcome == 'success'
9390
env:
9491
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
9592
run: |

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Instructions for GitHub Copilot and other automated contributors working in this
44

55
## Project
66
- Ruby: 3.4.4 (installed via rbenv in setup)
7-
- Rails: 7.1
7+
- Rails: 7.2
88
- Node: 20
99
- DB: PostgreSQL + PostGIS
1010
- Search: Elasticsearch 7.17.23

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ gem 'pundit-resources', '~> 1.1.4', github: 'better-together-org/pundit-resource
2727

2828
# Core Rails gem
2929
gem 'rack-protection'
30-
gem 'rails', ENV.fetch('RAILS_VERSION', '7.1.5.2')
30+
gem 'rails', ENV.fetch('RAILS_VERSION', '7.2.2.2')
3131

3232
# Redis for ActionCable and background jobs
3333
gem 'redis', '~> 5.4'

Gemfile.lock

Lines changed: 72 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ PATH
5353
rack-attack
5454
rack-cors (>= 1.1.1, < 3.1.0)
5555
rack-mini-profiler
56-
rails (>= 7.1, < 8.1)
56+
rails (>= 7.2, < 8.1)
5757
reform-rails (>= 0.2, < 0.4)
5858
rswag (>= 2.3.1, < 2.17.0)
5959
ruby-openai
@@ -68,51 +68,46 @@ PATH
6868
GEM
6969
remote: https://rubygems.org/
7070
specs:
71-
actioncable (7.1.5.2)
72-
actionpack (= 7.1.5.2)
73-
activesupport (= 7.1.5.2)
71+
actioncable (7.2.2.2)
72+
actionpack (= 7.2.2.2)
73+
activesupport (= 7.2.2.2)
7474
nio4r (~> 2.0)
7575
websocket-driver (>= 0.6.1)
7676
zeitwerk (~> 2.6)
77-
actionmailbox (7.1.5.2)
78-
actionpack (= 7.1.5.2)
79-
activejob (= 7.1.5.2)
80-
activerecord (= 7.1.5.2)
81-
activestorage (= 7.1.5.2)
82-
activesupport (= 7.1.5.2)
83-
mail (>= 2.7.1)
84-
net-imap
85-
net-pop
86-
net-smtp
87-
actionmailer (7.1.5.2)
88-
actionpack (= 7.1.5.2)
89-
actionview (= 7.1.5.2)
90-
activejob (= 7.1.5.2)
91-
activesupport (= 7.1.5.2)
92-
mail (~> 2.5, >= 2.5.4)
93-
net-imap
94-
net-pop
95-
net-smtp
77+
actionmailbox (7.2.2.2)
78+
actionpack (= 7.2.2.2)
79+
activejob (= 7.2.2.2)
80+
activerecord (= 7.2.2.2)
81+
activestorage (= 7.2.2.2)
82+
activesupport (= 7.2.2.2)
83+
mail (>= 2.8.0)
84+
actionmailer (7.2.2.2)
85+
actionpack (= 7.2.2.2)
86+
actionview (= 7.2.2.2)
87+
activejob (= 7.2.2.2)
88+
activesupport (= 7.2.2.2)
89+
mail (>= 2.8.0)
9690
rails-dom-testing (~> 2.2)
97-
actionpack (7.1.5.2)
98-
actionview (= 7.1.5.2)
99-
activesupport (= 7.1.5.2)
91+
actionpack (7.2.2.2)
92+
actionview (= 7.2.2.2)
93+
activesupport (= 7.2.2.2)
10094
nokogiri (>= 1.8.5)
10195
racc
102-
rack (>= 2.2.4)
96+
rack (>= 2.2.4, < 3.2)
10397
rack-session (>= 1.0.1)
10498
rack-test (>= 0.6.3)
10599
rails-dom-testing (~> 2.2)
106100
rails-html-sanitizer (~> 1.6)
107-
actiontext (7.1.5.2)
108-
actionpack (= 7.1.5.2)
109-
activerecord (= 7.1.5.2)
110-
activestorage (= 7.1.5.2)
111-
activesupport (= 7.1.5.2)
101+
useragent (~> 0.16)
102+
actiontext (7.2.2.2)
103+
actionpack (= 7.2.2.2)
104+
activerecord (= 7.2.2.2)
105+
activestorage (= 7.2.2.2)
106+
activesupport (= 7.2.2.2)
112107
globalid (>= 0.6.0)
113108
nokogiri (>= 1.8.5)
114-
actionview (7.1.5.2)
115-
activesupport (= 7.1.5.2)
109+
actionview (7.2.2.2)
110+
activesupport (= 7.2.2.2)
116111
builder (~> 3.1)
117112
erubi (~> 1.11)
118113
rails-dom-testing (~> 2.2)
@@ -125,39 +120,38 @@ GEM
125120
activestorage (>= 6.1.4)
126121
activesupport (>= 6.1.4)
127122
marcel (>= 1.0.3)
128-
activejob (7.1.5.2)
129-
activesupport (= 7.1.5.2)
123+
activejob (7.2.2.2)
124+
activesupport (= 7.2.2.2)
130125
globalid (>= 0.3.6)
131-
activemodel (7.1.5.2)
132-
activesupport (= 7.1.5.2)
133-
activerecord (7.1.5.2)
134-
activemodel (= 7.1.5.2)
135-
activesupport (= 7.1.5.2)
126+
activemodel (7.2.2.2)
127+
activesupport (= 7.2.2.2)
128+
activerecord (7.2.2.2)
129+
activemodel (= 7.2.2.2)
130+
activesupport (= 7.2.2.2)
136131
timeout (>= 0.4.0)
137132
activerecord-import (2.2.0)
138133
activerecord (>= 4.2)
139-
activerecord-postgis-adapter (9.0.2)
140-
activerecord (~> 7.1.0)
141-
rgeo-activerecord (~> 7.0.0)
142-
activestorage (7.1.5.2)
143-
actionpack (= 7.1.5.2)
144-
activejob (= 7.1.5.2)
145-
activerecord (= 7.1.5.2)
146-
activesupport (= 7.1.5.2)
134+
activerecord-postgis-adapter (10.0.1)
135+
activerecord (~> 7.2.0)
136+
rgeo-activerecord (~> 8.0.0)
137+
activestorage (7.2.2.2)
138+
actionpack (= 7.2.2.2)
139+
activejob (= 7.2.2.2)
140+
activerecord (= 7.2.2.2)
141+
activesupport (= 7.2.2.2)
147142
marcel (~> 1.0)
148-
activesupport (7.1.5.2)
143+
activesupport (7.2.2.2)
149144
base64
150145
benchmark (>= 0.3)
151146
bigdecimal
152-
concurrent-ruby (~> 1.0, >= 1.0.2)
147+
concurrent-ruby (~> 1.0, >= 1.3.1)
153148
connection_pool (>= 2.2.5)
154149
drb
155150
i18n (>= 1.6, < 2)
156151
logger (>= 1.4.2)
157152
minitest (>= 5.1)
158-
mutex_m
159153
securerandom (>= 0.3)
160-
tzinfo (~> 2.0)
154+
tzinfo (~> 2.0, >= 2.0.5)
161155
addressable (2.8.7)
162156
public_suffix (>= 2.0.2, < 7.0)
163157
asset_sync (2.19.2)
@@ -229,7 +223,7 @@ GEM
229223
coercible (1.0.0)
230224
descendants_tracker (~> 0.0.1)
231225
concurrent-ruby (1.3.5)
232-
connection_pool (2.5.3)
226+
connection_pool (2.5.4)
233227
coveralls_reborn (0.29.0)
234228
simplecov (~> 0.22.0)
235229
term-ansicolor (~> 1.7)
@@ -469,10 +463,9 @@ GEM
469463
msgpack (1.8.0)
470464
multi_json (1.17.0)
471465
multipart-post (2.4.1)
472-
mutex_m (0.3.0)
473466
net-http (0.6.0)
474467
uri
475-
net-imap (0.5.9)
468+
net-imap (0.5.10)
476469
date
477470
net-protocol
478471
net-pop (0.1.2)
@@ -529,7 +522,7 @@ GEM
529522
pundit (2.5.0)
530523
activesupport (>= 3.0.0)
531524
racc (1.8.1)
532-
rack (3.2.0)
525+
rack (3.1.16)
533526
rack-attack (6.7.0)
534527
rack (>= 1.0, < 4)
535528
rack-cors (3.0.0)
@@ -548,20 +541,20 @@ GEM
548541
rack (>= 1.3)
549542
rackup (2.2.1)
550543
rack (>= 3)
551-
rails (7.1.5.2)
552-
actioncable (= 7.1.5.2)
553-
actionmailbox (= 7.1.5.2)
554-
actionmailer (= 7.1.5.2)
555-
actionpack (= 7.1.5.2)
556-
actiontext (= 7.1.5.2)
557-
actionview (= 7.1.5.2)
558-
activejob (= 7.1.5.2)
559-
activemodel (= 7.1.5.2)
560-
activerecord (= 7.1.5.2)
561-
activestorage (= 7.1.5.2)
562-
activesupport (= 7.1.5.2)
544+
rails (7.2.2.2)
545+
actioncable (= 7.2.2.2)
546+
actionmailbox (= 7.2.2.2)
547+
actionmailer (= 7.2.2.2)
548+
actionpack (= 7.2.2.2)
549+
actiontext (= 7.2.2.2)
550+
actionview (= 7.2.2.2)
551+
activejob (= 7.2.2.2)
552+
activemodel (= 7.2.2.2)
553+
activerecord (= 7.2.2.2)
554+
activestorage (= 7.2.2.2)
555+
activesupport (= 7.2.2.2)
563556
bundler (>= 1.15.0)
564-
railties (= 7.1.5.2)
557+
railties (= 7.2.2.2)
565558
rails-controller-testing (1.0.5)
566559
actionpack (>= 5.0.1.rc1)
567560
actionview (>= 5.0.1.rc1)
@@ -576,10 +569,10 @@ GEM
576569
rails-i18n (7.0.10)
577570
i18n (>= 0.7, < 2)
578571
railties (>= 6.0.0, < 8)
579-
railties (7.1.5.2)
580-
actionpack (= 7.1.5.2)
581-
activesupport (= 7.1.5.2)
582-
irb
572+
railties (7.2.2.2)
573+
actionpack (= 7.2.2.2)
574+
activesupport (= 7.2.2.2)
575+
irb (~> 1.13)
583576
rackup (>= 1.0.0)
584577
rake (>= 12.2)
585578
thor (~> 1.0, >= 1.2.2)
@@ -622,9 +615,9 @@ GEM
622615
railties (>= 5.2)
623616
rexml (3.4.1)
624617
rgeo (3.0.1)
625-
rgeo-activerecord (7.0.1)
626-
activerecord (>= 5.0)
627-
rgeo (>= 1.0.0)
618+
rgeo-activerecord (8.0.0)
619+
activerecord (>= 7.0)
620+
rgeo (>= 3.0)
628621
rouge (4.2.0)
629622
rspec (3.13.1)
630623
rspec-core (~> 3.13.0)
@@ -791,6 +784,7 @@ GEM
791784
unicode-emoji (~> 4.0, >= 4.0.4)
792785
unicode-emoji (4.0.4)
793786
uri (1.0.3)
787+
useragent (0.16.11)
794788
virtus (2.0.0)
795789
axiom-types (~> 0.1)
796790
coercible (~> 1.0)
@@ -851,7 +845,7 @@ DEPENDENCIES
851845
pundit-resources (~> 1.1.4)!
852846
rack-mini-profiler
853847
rack-protection
854-
rails (= 7.1.5.2)
848+
rails (= 7.2.2.2)
855849
rails-controller-testing
856850
rb-readline
857851
rbtrace

app/controllers/better_together/person_checklist_items_controller.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ class PersonChecklistItemsController < ApplicationController # rubocop:todo Styl
88
# This endpoint is used by a small JSON toggle from the client-side.
99
# Some host layouts do not include the CSRF meta tag in test snapshots,
1010
# so allow this JSON endpoint to be called without the CSRF token.
11-
skip_before_action :verify_authenticity_token, only: [:create]
1211

1312
def show
1413
person = current_user.person

app/models/better_together/ai/log/translation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Translation < ApplicationRecord # rubocop:todo Style/Documentation
1111
validates :estimated_cost, numericality: { greater_than_or_equal_to: 0 }
1212

1313
# Define statuses
14-
enum status: { pending: 'pending', success: 'success', failure: 'failure' }
14+
enum :status, { pending: 'pending', success: 'success', failure: 'failure' }
1515

1616
# Calculate total tokens
1717
def calculate_total_tokens

app/models/better_together/event_invitation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class EventInvitation < Invitation
99
declined: 'declined'
1010
}.freeze
1111

12-
enum status: STATUS_VALUES, _prefix: :status
12+
enum :status, STATUS_VALUES, prefix: :status
1313

1414
validates :locale, presence: true, inclusion: { in: I18n.available_locales.map(&:to_s) }
1515
validate :invitee_presence

app/models/better_together/invitation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Invitation < ApplicationRecord
1515
belongs_to :role,
1616
optional: true
1717

18-
enum status: {
18+
enum :status, {
1919
accepted: 'accepted',
2020
declined: 'declined',
2121
pending: 'pending'

app/models/better_together/joatu/agreement.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Agreement < ApplicationRecord # rubocop:todo Metrics/ClassLength
2424
validates :status, presence: true, inclusion: { in: STATUS_VALUES.values }
2525
validate :offer_matches_request_target
2626

27-
enum status: STATUS_VALUES, _prefix: :status
27+
enum :status, STATUS_VALUES, prefix: :status
2828

2929
after_create_commit :notify_creators
3030

app/models/better_together/platform_invitation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class PlatformInvitation < ApplicationRecord
2828
foreign_key: 'platform_role_id',
2929
optional: true
3030

31-
enum status: STATUS_VALUES, _prefix: :status
31+
enum :status, STATUS_VALUES, prefix: :status
3232

3333
has_rich_text :greeting, encrypted: true
3434

0 commit comments

Comments
 (0)