Skip to content

Commit 9cdecb0

Browse files
committed
chore: resolve additional merge conflicts with upstream/master
2 parents c4dc620 + 3ac7140 commit 9cdecb0

77 files changed

Lines changed: 1468 additions & 442 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ruby.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
BUNDLE_IGNORE_FUNDING_REQUESTS: true
1818
BUNDLE_IGNORE_MESSAGES: true
1919
RAILS_ENV: test
20+
COVERAGE: true
2021
PARALLEL_TEST_PROCESSORS: ${{ matrix.ci_node_total }}
2122
services:
2223
postgres:

.rubocop.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ AllCops:
99
- bin/**/*
1010
- vendor/bundle/**/*
1111

12+
Lint/Syntax:
13+
Exclude:
14+
- app/views/**/*.haml
15+
1216
plugins:
1317
- rubocop-capybara
1418
- rubocop-performance

AGENTS.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ codebar planner is a Rails 8.1 application for managing [codebar.io](https://cod
3131

3232
- **Setup**: `bundle && rake db:create db:migrate db:seed`
3333
- **Server**: `bundle exec rails server`
34-
- **Tests**: `bundle exec rspec [path]` - runs RSpec tests, optionally for specific file/line
34+
- **Tests**: `make test` or `bundle exec parallel_rspec spec/ -n 3` - runs RSpec tests in parallel (3 processes is optimal)
35+
- **Single test**: `bundle exec rspec spec/path/to/file_spec.rb:42`
3536
- **Rails console**: `bundle exec rails console`
3637
- **Run rake tasks**: `bundle exec rake [task]`
3738
- **Linting**: `bundle exec rubocop`
@@ -129,14 +130,15 @@ See `app/models/README.md` for detailed data model documentation.
129130
- **JavaScript Driver**: Playwright (Chromium by default)
130131
- **Factories**: Fabrication (not FactoryBot)
131132
- **Test data**: Faker for generated data
132-
- **Coverage**: SimpleCov
133+
- **Coverage**: SimpleCov (runs in CI when COVERAGE=true)
134+
- **Parallel testing**: Use `make test` or `bundle exec parallel_rspec spec/ -n 3` for ~45% faster test runs
133135
- **JavaScript tests**: Capybara with Playwright driver
134136
- Use `PLAYWRIGHT_HEADLESS=false` to debug with visible browser
135137
- Use `PWDEBUG=1` for Playwright Inspector (step-through debugging)
136138
- Use `PLAYWRIGHT_BROWSER=firefox` or `webkit` for cross-browser testing
137139
- **Matchers**: Shoulda Matchers, RSpec Collection Matchers
138140

139-
Run single test: `bin/drspec spec/path/to/file_spec.rb:42`
141+
Run single test: `bundle exec rspec spec/path/to/file_spec.rb:42`
140142

141143
## Code Style
142144

Gemfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ gem 'csv' # LOCKED: csv was loaded from the standard library, but is not part of
1818
gem 'delayed_job'
1919
gem 'delayed_job_active_record'
2020
gem 'drb' # LOCKED: Added because of pry-remote
21+
gem 'email_validator'
2122
gem 'font_awesome5_rails'
2223
gem 'bootstrap', '~> 5'
2324
gem 'friendly_id'
@@ -61,7 +62,7 @@ gem 'stripe'
6162
gem 'rails-html-sanitizer', '~> 1.7.0'
6263

6364
# Use the Puma web server [https://github.com/puma/puma]
64-
gem 'puma', '~> 7.2'
65+
gem 'puma', '~> 8.0'
6566
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
6667
gem 'importmap-rails'
6768
# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
@@ -114,7 +115,6 @@ group :test do
114115
gem 'shoulda-matchers', '~> 7.0'
115116
gem 'simplecov', require: false
116117
gem 'simplecov-lcov', require: false
117-
gem 'timecop', '~> 0.9.10'
118118
gem 'webmock'
119119
end
120120

@@ -126,4 +126,4 @@ gem 'rollbar'
126126
gem 'scout_apm'
127127

128128
gem 'carrierwave-aws', '~> 1.6'
129-
gem 'sitemap_generator', github: 'kjvarga/sitemap_generator', branch: 'master' # LOCKED: When a version higher than 6.3.0 is released, drop this LOCKED.
129+
gem 'sitemap_generator', '~> 7.0'

Gemfile.lock

Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
GIT
2-
remote: https://github.com/kjvarga/sitemap_generator.git
3-
revision: 747988328566c84b0b8aa1ab898ababc371284dc
4-
branch: master
5-
specs:
6-
sitemap_generator (6.4.0)
7-
builder (~> 3.0)
8-
91
GEM
102
remote: https://rubygems.org/
113
specs:
@@ -115,14 +107,14 @@ GEM
115107
erubi (>= 1.0.0)
116108
rack (>= 0.9.0)
117109
rouge (>= 1.0.0)
118-
bigdecimal (4.1.1)
110+
bigdecimal (4.1.2)
119111
bindex (0.8.1)
120112
binding_of_caller (2.0.0)
121113
debug_inspector (>= 1.2.0)
122114
bootstrap (5.3.8)
123115
popper_js (>= 2.11.8, < 3)
124116
builder (3.3.0)
125-
bullet (8.1.0)
117+
bullet (8.1.1)
126118
activesupport (>= 3.0.0)
127119
uniform_notifier (~> 1.11)
128120
byebug (13.0.0)
@@ -158,10 +150,10 @@ GEM
158150
coffee-script-source
159151
execjs
160152
coffee-script-source (1.12.2)
161-
commonmarker (2.7.0-aarch64-linux)
162-
commonmarker (2.7.0-arm64-darwin)
163-
commonmarker (2.7.0-x86_64-darwin)
164-
commonmarker (2.7.0-x86_64-linux)
153+
commonmarker (2.8.1-aarch64-linux)
154+
commonmarker (2.8.1-arm64-darwin)
155+
commonmarker (2.8.1-x86_64-darwin)
156+
commonmarker (2.8.1-x86_64-linux)
165157
concurrent-ruby (1.3.6)
166158
connection_pool (3.0.2)
167159
crack (1.0.1)
@@ -193,11 +185,13 @@ GEM
193185
dotenv (= 3.2.0)
194186
railties (>= 6.1)
195187
drb (2.2.3)
196-
erb (6.0.2)
188+
email_validator (2.2.4)
189+
activemodel
190+
erb (6.0.4)
197191
erubi (1.13.1)
198192
execjs (2.10.1)
199193
fabrication (2.31.0)
200-
faker (3.6.1)
194+
faker (3.8.0)
201195
i18n (>= 1.8.11, < 2)
202196
faraday (2.14.1)
203197
faraday-net_http (>= 2.0, < 3.5)
@@ -248,7 +242,7 @@ GEM
248242
activesupport (>= 6.0.0)
249243
railties (>= 6.0.0)
250244
io-console (0.8.2)
251-
irb (1.17.0)
245+
irb (1.18.0)
252246
pp (>= 0.6.0)
253247
prism (>= 1.3.0)
254248
rdoc (>= 4.0.0)
@@ -258,7 +252,7 @@ GEM
258252
rails-dom-testing (>= 1, < 3)
259253
railties (>= 4.2.0)
260254
thor (>= 0.14, < 2.0)
261-
json (2.19.3)
255+
json (2.19.5)
262256
jwt (2.7.1)
263257
language_server-protocol (3.17.0.5)
264258
launchy (3.1.1)
@@ -292,14 +286,14 @@ GEM
292286
mini_magick (5.3.1)
293287
logger
294288
mini_mime (1.1.5)
295-
minitest (6.0.3)
289+
minitest (6.0.5)
296290
drb (~> 2.0)
297291
prism (~> 1.5)
298292
multi_xml (0.6.0)
299293
mutex_m (0.3.0)
300294
net-http (0.9.1)
301295
uri (>= 0.11.1)
302-
net-imap (0.6.2)
296+
net-imap (0.6.4)
303297
date
304298
net-protocol
305299
net-pop (0.1.2)
@@ -309,13 +303,13 @@ GEM
309303
net-smtp (0.5.1)
310304
net-protocol
311305
nio4r (2.7.5)
312-
nokogiri (1.19.2-aarch64-linux-gnu)
306+
nokogiri (1.19.3-aarch64-linux-gnu)
313307
racc (~> 1.4)
314-
nokogiri (1.19.2-arm64-darwin)
308+
nokogiri (1.19.3-arm64-darwin)
315309
racc (~> 1.4)
316-
nokogiri (1.19.2-x86_64-darwin)
310+
nokogiri (1.19.3-x86_64-darwin)
317311
racc (~> 1.4)
318-
nokogiri (1.19.2-x86_64-linux-gnu)
312+
nokogiri (1.19.3-x86_64-linux-gnu)
319313
racc (~> 1.4)
320314
oauth2 (2.0.9)
321315
faraday (>= 0.17.3, < 3.0)
@@ -339,11 +333,11 @@ GEM
339333
actionpack (>= 4.2)
340334
omniauth (~> 2.0)
341335
ostruct (0.6.3)
342-
pagy (43.5.0)
336+
pagy (43.5.3)
343337
json
344338
uri
345339
yaml
346-
parallel (2.0.1)
340+
parallel (2.1.0)
347341
parallel_tests (5.7.0)
348342
parallel
349343
parser (3.3.11.1)
@@ -393,7 +387,7 @@ GEM
393387
i18n (>= 0.5.0)
394388
railties (>= 6.1)
395389
public_suffix (7.0.5)
396-
puma (7.2.0)
390+
puma (8.0.1)
397391
nio4r (~> 2.0)
398392
pundit (2.5.2)
399393
activesupport (>= 3.0.0)
@@ -495,9 +489,9 @@ GEM
495489
rubocop-ast (1.49.1)
496490
parser (>= 3.3.7.2)
497491
prism (~> 1.7)
498-
rubocop-capybara (2.22.1)
492+
rubocop-capybara (2.23.0)
499493
lint_roller (~> 1.1)
500-
rubocop (~> 1.72, >= 1.72.1)
494+
rubocop (~> 1.81)
501495
rubocop-performance (1.26.1)
502496
lint_roller (~> 1.1)
503497
rubocop (>= 1.75.0, < 2.0)
@@ -527,7 +521,7 @@ GEM
527521
sprockets (> 3.0)
528522
sprockets-rails
529523
tilt
530-
scout_apm (6.1.1)
524+
scout_apm (6.2.0)
531525
parser
532526
securerandom (0.4.1)
533527
semantic_logger (4.18.0)
@@ -544,6 +538,8 @@ GEM
544538
simplecov-html (0.12.3)
545539
simplecov-lcov (0.9.0)
546540
simplecov_json_formatter (0.1.4)
541+
sitemap_generator (7.0.1)
542+
builder (~> 3.0)
547543
slop (3.6.0)
548544
snaky_hash (2.0.1)
549545
hashie
@@ -567,15 +563,14 @@ GEM
567563
execjs (>= 0.3.0, < 3)
568564
thor (1.5.0)
569565
tilt (2.7.0)
570-
timecop (0.9.10)
571-
timeout (0.6.0)
566+
timeout (0.6.1)
572567
tsort (0.2.0)
573568
turbo-rails (2.0.23)
574569
actionpack (>= 7.1.0)
575570
railties (>= 7.1.0)
576571
tzinfo (2.0.6)
577572
concurrent-ruby (~> 1.0)
578-
tzinfo-data (1.2026.1)
573+
tzinfo-data (1.2026.2)
579574
tzinfo (>= 1.0.0)
580575
unicode-display_width (3.2.0)
581576
unicode-emoji (~> 4.1)
@@ -584,7 +579,7 @@ GEM
584579
uri (1.1.1)
585580
useragent (0.16.11)
586581
version_gem (1.1.3)
587-
view_component (4.6.0)
582+
view_component (4.8.0)
588583
actionview (>= 7.1.0)
589584
activesupport (>= 7.1.0)
590585
concurrent-ruby (~> 1)
@@ -635,6 +630,7 @@ DEPENDENCIES
635630
delayed_job_active_record
636631
dotenv-rails
637632
drb
633+
email_validator
638634
fabrication
639635
faker
640636
faraday
@@ -666,7 +662,7 @@ DEPENDENCIES
666662
pry-rails
667663
pry-remote
668664
public_activity
669-
puma (~> 7.2)
665+
puma (~> 8.0)
670666
pundit
671667
rack-mini-profiler (~> 4.0)
672668
rails (~> 8.1.2)
@@ -689,12 +685,11 @@ DEPENDENCIES
689685
simple_form
690686
simplecov
691687
simplecov-lcov
692-
sitemap_generator!
688+
sitemap_generator (~> 7.0)
693689
sprockets-rails
694690
stimulus-rails
695691
stripe
696692
terser
697-
timecop (~> 0.9.10)
698693
turbo-rails
699694
tzinfo-data
700695
view_component

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ deploy_staging:
2222
heroku maintenance:off --app=codebar-staging
2323
serve:
2424
rm -f ./tmp/pids/server.pid && bundle exec rails server --binding=0.0.0.0 --port=3000
25+
26+
test:
27+
bundle exec parallel_rspec spec/ -n 3

Procfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
release: bundle exec rake db:migrate
2-
web: bundle exec puma -C config/puma.rb
2+
web: bin/start-nginx bundle exec puma -C config/puma.rb

app/assets/javascripts/application.js

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,43 @@ $(function() {
9999
});
100100
}
101101

102+
// TomSelect for meeting organisers (multi-select)
103+
if ($('#meeting_organisers').length) {
104+
new TomSelect('#meeting_organisers', {
105+
plugins: ['remove_button'],
106+
placeholder: 'Type to search members...',
107+
valueField: 'id',
108+
labelField: 'full_name',
109+
searchField: ['full_name', 'email'],
110+
create: false,
111+
loadThrottle: 300,
112+
shouldLoad: function(query) {
113+
return query.length >= 3;
114+
},
115+
load: function(query, callback) {
116+
fetch('/admin/members/search?q=' + encodeURIComponent(query))
117+
.then(response => response.json())
118+
.then(json => callback(json))
119+
.catch(() => callback());
120+
},
121+
render: {
122+
option: function(item, escape) {
123+
return '<div>' + escape(item.full_name) + ' <small class="text-muted">' + escape(item.email) + '</small></div>';
124+
},
125+
no_results: function(data, escape) {
126+
return '<div class="no-results">No members found</div>';
127+
}
128+
}
129+
});
130+
}
131+
102132
// Chosen for all other selects (exclude TomSelect fields)
103133
// Chosen hides inputs and selects, which becomes problematic when they are
104134
// required: browser validation doesn't get shown to the user.
105135
// This fix places "the original input behind the Chosen input, matching the
106136
// height and width so that the warning appears in the correct position."
107137
// https://github.com/harvesthq/chosen/issues/515#issuecomment-474588057
108-
$('select').not('#member_lookup_id, #meeting_invitations_member').on('chosen:ready', function () {
138+
$('select').not('#member_lookup_id, #meeting_invitations_member, #meeting_organisers').on('chosen:ready', function () {
109139
var height = $(this).next('.chosen-container').height();
110140
var width = $(this).next('.chosen-container').width();
111141

@@ -117,7 +147,7 @@ $(function() {
117147
}).show();
118148
});
119149

120-
$('select').not('#member_lookup_id, #meeting_invitations_member').chosen({
150+
$('select').not('#member_lookup_id, #meeting_invitations_member, #meeting_organisers').chosen({
121151
allow_single_deselect: true,
122152
no_results_text: 'No results matched'
123153
});

app/controllers/admin/events_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def attendees_emails
6767
private
6868

6969
def set_event
70-
@original_event = Event.find_by(slug: params[:id])
70+
@original_event = Event.find_by!(slug: params[:id])
7171
@event = EventPresenter.new(@original_event)
7272
end
7373

app/controllers/admin/groups_controller.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,15 @@ def create
2222
def show
2323
@group = Group.find(params[:id])
2424
authorize @group
25+
26+
@eligible_count = @group.eligible_members.count
27+
@total_count = @group.members.count
28+
@pagy, @members = pagy(Group.members_by_recent_rsvp(@group), items: 20)
2529
end
2630

2731
private
2832

2933
def group_params
30-
params.expect(group: [:name, :description, :chapter_id])
34+
params.expect(group: %i[name description chapter_id])
3135
end
3236
end

0 commit comments

Comments
 (0)