Skip to content

Commit 24f1382

Browse files
authored
fix: address deprecations (#925)
## Summary - remove deprecated Active Storage config - move stylesheets to modern Sass `@use` - adopt Rails 7.1 cache serialization format ## Testing - `bin/codex_style_guard` - `bundle exec brakeman -q -w2` - `bundle exec bundler-audit --update` - `bundle exec rspec` *(fails: Missing Active Record encryption credential; 359 examples, 11 failures)* ------ https://chatgpt.com/codex/tasks/task_e_68913cc354c48321b7aaeec157a857b0
2 parents 02ebc3c + 7939aab commit 24f1382

File tree

8 files changed

+28
-27
lines changed

8 files changed

+28
-27
lines changed

app/assets/config/better_together_manifest.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//= link_tree ../stylesheets .css
55
//= link_tree ../../../vendor/stylesheets .css
66
//= link_tree ../stylesheets .scss
7+
//= link better_together/mailer.css
78
//= link_tree ../images
89

910
//= link actioncable.js

app/assets/stylesheets/better_together/application.scss

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,29 @@
1414
*= require_self
1515
*/
1616

17-
@import 'theme';
17+
@use 'theme' as *;
1818

1919
// Import Bootstrap and Font Awesome
2020

21-
@import 'bootstrap';
22-
@import 'cards';
23-
@import 'devise';
24-
@import 'font-awesome';
25-
@import 'actiontext';
26-
@import 'contact_details';
27-
@import 'content_blocks';
28-
@import 'conversations';
29-
@import 'forms';
30-
@import 'image-galleries';
31-
@import 'maps';
32-
@import 'metrics';
33-
@import 'navigation';
34-
@import 'notifications';
35-
@import 'profiles';
36-
@import 'simple_calendar';
37-
@import 'share';
38-
@import 'sidebar_nav';
39-
@import 'trix-extensions/richtext';
21+
@use 'bootstrap' as *;
22+
@use 'cards';
23+
@use 'devise';
24+
@use 'font-awesome';
25+
@use 'actiontext';
26+
@use 'contact_details';
27+
@use 'content_blocks';
28+
@use 'conversations';
29+
@use 'forms';
30+
@use 'image-galleries';
31+
@use 'maps';
32+
@use 'metrics';
33+
@use 'navigation';
34+
@use 'notifications';
35+
@use 'profiles';
36+
@use 'simple_calendar';
37+
@use 'share';
38+
@use 'sidebar_nav';
39+
@use 'trix-extensions/richtext';
4040

4141
// Styles that use the variables
4242
.text-opposite-theme {

app/assets/stylesheets/better_together/contact_details.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import 'theme';
1+
@use 'theme' as *;
22

33
.contact-detail-item {
44
margin-bottom: 15px;

app/assets/stylesheets/better_together/forms.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import "theme";
1+
@use "theme" as *;
22

33
.required-indicator {
44
color: $danger;

app/assets/stylesheets/better_together/share.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
@import 'theme';
1+
@use 'theme' as *;
32

43
.social-share-buttons {
54
margin-top: 40px;

app/assets/stylesheets/better_together/sidebar_nav.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import 'theme';
1+
@use 'theme' as *;
22

33
#sidebar_nav {
44
// Sidebar heading styles

spec/dummy/config/application.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ class Application < Rails::Application
2323
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
2424
# config.time_zone = 'Central Time (US & Canada)'
2525

26-
config.active_storage.replace_on_assign_to_many = true
26+
# Use the latest cache format and remove deprecated Active Storage setting
27+
config.active_support.cache_format_version = 7.1
2728

2829
config.generators do |g|
2930
g.orm :active_record, primary_key_type: :uuid

spec/rails_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
config.after { Warden.test_reset! }
4848

4949
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
50-
config.fixture_path = "#{Rails.root}/spec/fixtures"
50+
config.fixture_paths = [Rails.root.join('spec/fixtures')]
5151

5252
# If you're not using ActiveRecord, or you'd prefer not to run each of your
5353
# examples within a transaction, remove the following line or assign false

0 commit comments

Comments
 (0)