Skip to content

Commit 5d89ad5

Browse files
authored
Merge branch 'wip/new-to-nl-2' into wip/encrypted-rich-text-messages
2 parents 6918bf9 + f4216f3 commit 5d89ad5

File tree

9 files changed

+156
-88
lines changed

9 files changed

+156
-88
lines changed

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ gem 'fog-aws'
2020
# Database adapter for PostgreSQL
2121
gem 'pg', '>= 0.18', '< 2.0'
2222
# Puma as the app server
23-
gem 'puma', '~> 6.5'
23+
gem 'puma', '~> 6.6'
2424

2525
# Pundit for authorization, custom fork for Better Together
2626
gem 'pundit-resources', '~> 1.1.4', github: 'better-together-org/pundit-resources'
@@ -35,7 +35,7 @@ gem 'redis', '~> 5.3'
3535
gem 'rswag'
3636

3737
# Sidekiq for background processing
38-
gem 'sidekiq', '~> 7.3.7'
38+
gem 'sidekiq', '~> 7.3.8'
3939

4040
# Error and performance monitoring with Sentry
4141
gem 'sentry-rails'

Gemfile.lock

Lines changed: 49 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ GEM
128128
activemodel (= 7.1.5.1)
129129
activesupport (= 7.1.5.1)
130130
timeout (>= 0.4.0)
131-
activerecord-import (2.0.0)
131+
activerecord-import (2.1.0)
132132
activerecord (>= 4.2)
133133
activerecord-postgis-adapter (9.0.2)
134134
activerecord (~> 7.1.0)
@@ -163,20 +163,20 @@ GEM
163163
autoprefixer-rails (10.4.19.0)
164164
execjs (~> 2)
165165
aws-eventstream (1.3.0)
166-
aws-partitions (1.1022.0)
167-
aws-sdk-core (3.214.0)
166+
aws-partitions (1.1047.0)
167+
aws-sdk-core (3.218.0)
168168
aws-eventstream (~> 1, >= 1.3.0)
169169
aws-partitions (~> 1, >= 1.992.0)
170170
aws-sigv4 (~> 1.9)
171171
jmespath (~> 1, >= 1.6.1)
172-
aws-sdk-kms (1.96.0)
173-
aws-sdk-core (~> 3, >= 3.210.0)
172+
aws-sdk-kms (1.98.0)
173+
aws-sdk-core (~> 3, >= 3.216.0)
174174
aws-sigv4 (~> 1.5)
175-
aws-sdk-s3 (1.176.1)
176-
aws-sdk-core (~> 3, >= 3.210.0)
175+
aws-sdk-s3 (1.180.0)
176+
aws-sdk-core (~> 3, >= 3.216.0)
177177
aws-sdk-kms (~> 1)
178178
aws-sigv4 (~> 1.5)
179-
aws-sigv4 (1.10.1)
179+
aws-sigv4 (1.11.0)
180180
aws-eventstream (~> 1, >= 1.0.2)
181181
axiom-types (0.1.1)
182182
descendants_tracker (~> 0.0.4)
@@ -307,7 +307,7 @@ GEM
307307
multipart-post (~> 2.0)
308308
faraday-net_http (3.4.0)
309309
net-http (>= 0.5.0)
310-
ffi (1.17.0-x86_64-linux-gnu)
310+
ffi (1.17.1-x86_64-linux-gnu)
311311
fog-aws (3.30.0)
312312
base64 (~> 0.2.0)
313313
fog-core (~> 2.6)
@@ -346,7 +346,7 @@ GEM
346346
highline (3.1.0)
347347
reline
348348
htmlentities (4.3.4)
349-
i18n (1.14.6)
349+
i18n (1.14.7)
350350
concurrent-ruby (~> 1.0)
351351
i18n-tasks (1.0.14)
352352
activesupport (>= 4.0.2)
@@ -365,15 +365,16 @@ GEM
365365
activerecord (>= 3.0.0)
366366
railties (>= 3.0.0)
367367
ice_nine (0.11.2)
368-
image_processing (1.13.0)
369-
mini_magick (>= 4.9.5, < 5)
368+
image_processing (1.14.0)
369+
mini_magick (>= 4.9.5, < 6)
370370
ruby-vips (>= 2.0.17, < 3)
371371
importmap-rails (2.1.0)
372372
actionpack (>= 6.0.0)
373373
activesupport (>= 6.0.0)
374374
railties (>= 6.0.0)
375375
io-console (0.8.0)
376-
irb (1.14.3)
376+
irb (1.15.1)
377+
pp (>= 0.6.0)
377378
rdoc (>= 4.0.0)
378379
reline (>= 0.4.2)
379380
jmespath (1.6.2)
@@ -387,7 +388,7 @@ GEM
387388
railties (>= 4.1)
388389
jwt (2.10.1)
389390
base64
390-
language_server-protocol (3.17.0.3)
391+
language_server-protocol (3.17.0.4)
391392
listen (3.9.0)
392393
rb-fsevent (~> 0.10, >= 0.10.3)
393394
rb-inotify (~> 0.9, >= 0.9.10)
@@ -408,10 +409,12 @@ GEM
408409
logger
409410
mime-types-data (~> 3.2015)
410411
mime-types-data (3.2025.0107)
411-
mini_magick (4.13.2)
412+
mini_magick (5.1.2)
413+
benchmark
414+
logger
412415
mini_mime (1.1.5)
413416
minitest (5.25.4)
414-
mobility (1.3.1)
417+
mobility (1.3.2)
415418
i18n (>= 0.6.10, < 2)
416419
request_store (~> 1.0)
417420
mobility-actiontext (1.1.1)
@@ -423,7 +426,7 @@ GEM
423426
mutex_m (0.3.0)
424427
net-http (0.6.0)
425428
uri
426-
net-imap (0.5.5)
429+
net-imap (0.5.6)
427430
date
428431
net-protocol
429432
net-pop (0.1.2)
@@ -433,18 +436,20 @@ GEM
433436
net-smtp (0.5.0)
434437
net-protocol
435438
nio4r (2.7.4)
436-
nokogiri (1.18.1-x86_64-linux-gnu)
439+
nokogiri (1.18.2-x86_64-linux-gnu)
437440
racc (~> 1.4)
438-
noticed (2.5.1)
441+
noticed (2.6.0)
439442
rails (>= 6.1.0)
440443
optimist (3.1.0)
441444
orm_adapter (0.5.0)
442445
parallel (1.26.3)
443-
parser (3.3.6.0)
446+
parser (3.3.7.0)
444447
ast (~> 2.4.1)
445448
racc
446449
pg (1.5.9)
447450
popper_js (2.11.8)
451+
pp (0.6.2)
452+
prettyprint
448453
premailer (1.27.0)
449454
addressable
450455
css_parser (>= 1.19.0)
@@ -453,19 +458,20 @@ GEM
453458
actionmailer (>= 3)
454459
net-smtp
455460
premailer (~> 1.7, >= 1.7.9)
461+
prettyprint (0.2.0)
456462
pry (0.15.2)
457463
coderay (~> 1.1)
458464
method_source (~> 1.0)
459-
psych (5.2.2)
465+
psych (5.2.3)
460466
date
461467
stringio
462468
public_suffix (6.0.1)
463-
puma (6.5.0)
469+
puma (6.6.0)
464470
nio4r (~> 2.0)
465471
pundit (2.4.0)
466472
activesupport (>= 3.0.0)
467473
racc (1.8.1)
468-
rack (3.1.8)
474+
rack (3.1.9)
469475
rack-cors (2.0.2)
470476
rack (>= 2.0.0)
471477
rack-mini-profiler (3.3.1)
@@ -523,11 +529,11 @@ GEM
523529
ffi (>= 1.0.6)
524530
msgpack (>= 0.4.3)
525531
optimist (>= 3.0.0)
526-
rdoc (6.10.0)
532+
rdoc (6.12.0)
527533
psych (>= 4.0.0)
528534
redis (5.3.0)
529535
redis-client (>= 0.22.0)
530-
redis-client (0.23.1)
536+
redis-client (0.23.2)
531537
connection_pool
532538
reform (2.6.2)
533539
disposable (>= 0.5.0, < 1.0.0)
@@ -548,7 +554,7 @@ GEM
548554
responders (3.1.1)
549555
actionpack (>= 5.2)
550556
railties (>= 5.2)
551-
rexml (3.3.9)
557+
rexml (3.4.0)
552558
rgeo (3.0.1)
553559
rgeo-activerecord (7.0.1)
554560
activerecord (>= 5.0)
@@ -558,15 +564,15 @@ GEM
558564
rspec-core (~> 3.13.0)
559565
rspec-expectations (~> 3.13.0)
560566
rspec-mocks (~> 3.13.0)
561-
rspec-core (3.13.2)
567+
rspec-core (3.13.3)
562568
rspec-support (~> 3.13.0)
563569
rspec-expectations (3.13.3)
564570
diff-lcs (>= 1.2.0, < 2.0)
565571
rspec-support (~> 3.13.0)
566572
rspec-mocks (3.13.2)
567573
diff-lcs (>= 1.2.0, < 2.0)
568574
rspec-support (~> 3.13.0)
569-
rspec-rails (7.1.0)
575+
rspec-rails (7.1.1)
570576
actionpack (>= 7.0)
571577
activesupport (>= 7.0)
572578
railties (>= 7.0)
@@ -590,53 +596,54 @@ GEM
590596
rswag-ui (2.16.0)
591597
actionpack (>= 5.2, < 8.1)
592598
railties (>= 5.2, < 8.1)
593-
rubocop (1.70.0)
599+
rubocop (1.71.2)
594600
json (~> 2.3)
595601
language_server-protocol (>= 3.17.0)
596602
parallel (~> 1.10)
597603
parser (>= 3.3.0.2)
598604
rainbow (>= 2.2.2, < 4.0)
599605
regexp_parser (>= 2.9.3, < 3.0)
600-
rubocop-ast (>= 1.36.2, < 2.0)
606+
rubocop-ast (>= 1.38.0, < 2.0)
601607
ruby-progressbar (~> 1.7)
602608
unicode-display_width (>= 2.4.0, < 4.0)
603-
rubocop-ast (1.37.0)
609+
rubocop-ast (1.38.0)
604610
parser (>= 3.3.1.0)
605-
rubocop-rspec (3.3.0)
611+
rubocop-rspec (3.4.0)
606612
rubocop (~> 1.61)
607613
ruby-openai (7.3.1)
608614
event_stream_parser (>= 0.3.0, < 2.0.0)
609615
faraday (>= 1)
610616
faraday-multipart (>= 1)
611617
ruby-progressbar (1.13.0)
612-
ruby-vips (2.2.2)
618+
ruby-vips (2.2.3)
613619
ffi (~> 1.12)
614620
logger
615-
rubyzip (2.3.2)
621+
rubyzip (2.4.1)
616622
sass-embedded (1.83.4-x86_64-linux-gnu)
617623
google-protobuf (~> 4.29)
618624
sassc (2.4.0)
619625
ffi (~> 1.9)
620626
sassc-embedded (1.80.1)
621627
sass-embedded (~> 1.80)
622628
securerandom (0.4.1)
623-
selenium-webdriver (4.27.0)
629+
selenium-webdriver (4.28.0)
624630
base64 (~> 0.2)
625631
logger (~> 1.4)
626632
rexml (~> 3.2, >= 3.2.5)
627633
rubyzip (>= 1.2.2, < 3.0)
628634
websocket (~> 1.0)
629-
sentry-rails (5.22.1)
635+
sentry-rails (5.22.4)
630636
railties (>= 5.0)
631-
sentry-ruby (~> 5.22.1)
632-
sentry-ruby (5.22.1)
637+
sentry-ruby (~> 5.22.4)
638+
sentry-ruby (5.22.4)
633639
bigdecimal
634640
concurrent-ruby (~> 1.0, >= 1.0.2)
635641
shoulda-callback-matchers (1.1.4)
636642
activesupport (>= 3)
637643
shoulda-matchers (6.4.0)
638644
activesupport (>= 5.2.0)
639-
sidekiq (7.3.7)
645+
sidekiq (7.3.8)
646+
base64
640647
connection_pool (>= 2.3.0)
641648
logger
642649
rack (>= 2.2.4)
@@ -658,7 +665,7 @@ GEM
658665
actionpack (>= 6.1)
659666
activesupport (>= 6.1)
660667
sprockets (>= 3.0.0)
661-
stackprof (0.2.26)
668+
stackprof (0.2.27)
662669
stimulus-rails (1.3.4)
663670
railties (>= 6.0.0)
664671
stringio (3.1.2)
@@ -746,7 +753,7 @@ DEPENDENCIES
746753
listen (>= 3.0.5, < 3.10)
747754
pg (>= 0.18, < 2.0)
748755
pry
749-
puma (~> 6.5)
756+
puma (~> 6.6)
750757
pundit-resources (~> 1.1.4)!
751758
rack-mini-profiler
752759
rack-protection
@@ -764,7 +771,7 @@ DEPENDENCIES
764771
sentry-ruby
765772
shoulda-callback-matchers
766773
shoulda-matchers
767-
sidekiq (~> 7.3.7)
774+
sidekiq (~> 7.3.8)
768775
simplecov
769776
spring
770777
spring-watcher-listen (~> 2.1.0)

SECURITY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
| Version | Supported |
66
| ------- | ------------------ |
7+
| 0.5.x | :white_check_mark: |
78
| 0.4.x | :white_check_mark: |
89

910
## Reporting a Vulnerability

app/assets/stylesheets/better_together/theme.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,12 @@ $slider-thumb-border-size: 2px !default;
4646
.dropdown-item {
4747
--bs-dropdown-link-color: $light-background-text-color;
4848
}
49+
50+
.host_community_logo {
51+
max-height: 5vh;
52+
}
53+
54+
.navigation {
55+
--bs-navbar-padding-x: 0.5rem;
56+
--bs-navbar-padding-y: 0.5rem;
57+
}

app/controllers/better_together/navigation_items_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
module BetterTogether
66
# Responds to requests for navigation items
77
class NavigationItemsController < FriendlyResourceController # rubocop:todo Metrics/ClassLength
8-
before_action :set_pages, only: %i[new edit create update]
98
before_action :set_navigation_area
9+
before_action :set_pages, only: %i[new edit create update]
1010
before_action :set_navigation_item, only: %i[show edit update destroy]
1111

1212
helper_method :available_parent_items
@@ -104,7 +104,7 @@ def set_pages
104104
end
105105

106106
def set_navigation_area
107-
@set_navigation_area ||= find_by_translatable(
107+
@navigation_area ||= find_by_translatable(
108108
translatable_type: ::BetterTogether::NavigationArea.name,
109109
friendly_id: params[:navigation_area_id]
110110
)

app/models/better_together/community.rb

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,33 @@ class Community < ApplicationRecord
4242
saver: { strip: true, quality: 75, optimize_coding: true }, format: 'png'
4343
end
4444

45+
has_one_attached :logo do |attachable|
46+
attachable.variant :optimized_jpeg, resize_to_limit: [200, 200],
47+
# rubocop:todo Layout/LineLength
48+
saver: { strip: true, quality: 75, interlace: true, optimize_coding: true, trellis_quant: true, quant_table: 3 }, format: 'jpg'
49+
# rubocop:enable Layout/LineLength
50+
attachable.variant :optimized_png, resize_to_limit: [200, 200],
51+
saver: { strip: true, quality: 75, optimize_coding: true }, format: 'png'
52+
end
53+
4554
# Virtual attributes to track removal
46-
attr_accessor :remove_profile_image, :remove_cover_image
55+
attr_accessor :remove_profile_image, :remove_cover_image, :remove_logo
4756

4857
# Callbacks to remove images if necessary
4958
before_save :purge_profile_image, if: -> { remove_profile_image == '1' }
5059
before_save :purge_cover_image, if: -> { remove_cover_image == '1' }
60+
before_save :purge_logo, if: -> { remove_logo == '1' }
5161

5262
validates :name,
5363
presence: true
5464
validates :description,
5565
presence: true
5666

67+
# Resize the cover image to specific dimensions
68+
def cover_image_variant(width, height)
69+
cover_image.variant(resize_to_fill: [width, height]).processed
70+
end
71+
5772
def optimized_profile_image
5873
if profile_image.content_type == 'image/svg+xml'
5974
# If SVG, return the original without transformation

0 commit comments

Comments
 (0)