Skip to content

Commit 94a49e9

Browse files
authored
Merge branch 'main' into dependabot/bundler/rubocop-1.79.2
2 parents 7776e01 + 060ce8d commit 94a49e9

File tree

8 files changed

+38
-53
lines changed

8 files changed

+38
-53
lines changed

.github/workflows/rubyonrails.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
- ruby: '3.4.4'
1414
rails: '7.1.5.1'
1515
allowed_failure: false # ✅ required
16-
- ruby: '3.4.4'
17-
rails: '7.2'
18-
allowed_failure: true # ⚠️ allowed to fail
16+
# - ruby: '3.4.4'
17+
# rails: '7.2'
18+
# allowed_failure: true # ⚠️ allowed to fail
1919
- ruby: '3.4.4'
2020
rails: '8.0'
2121
allowed_failure: true # ⚠️ allowed to fail

AGENTS.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# AGENTS.md
22

3+
Instructions for GitHub Copilot and other automated contributors working in this repository.
4+
35
## Project
46
- Ruby: 3.4.4 (installed via rbenv in setup)
57
- Rails: 7.1
@@ -13,18 +15,17 @@
1315
- Databases:
1416
- development: `community_engine_development`
1517
- test: `community_engine_test`
16-
- Use `DATABASE_URL` to connect (overrides fallback host in database.yml).
18+
- Use `DATABASE_URL` to connect (overrides fallback host in `config/database.yml`).
1719

1820
## Commands
19-
- Run tests: `bin/ci`
21+
- **Tests:** `bin/ci`
2022
(Equivalent: `cd spec/dummy && bundle exec rspec`)
21-
- Lint: `bundle exec rubocop`
22-
- Security: `bundle exec brakeman -q -w2` and `bundle exec bundler-audit --update`
23+
- **Lint:** `bundle exec rubocop`
24+
- **Security:** `bundle exec brakeman -q -w2` and `bundle exec bundler-audit --update`
25+
- **Style:** `bin/codex_style_guard`
2326

2427
## Conventions
2528
- Make incremental changes with passing tests.
2629
- Avoid introducing new external services in tests; stub where possible.
27-
28-
## Code Style
29-
- Always run `bin/codex_style_guard` before proposing a patch.
30-
- If RuboCop reports offenses after autocorrect, update the changes until it passes.
30+
- If RuboCop reports offenses after autocorrect, update and rerun until clean.
31+
- Keep commit messages and PR descriptions concise and informative.

Gemfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,19 +167,19 @@ GEM
167167
unf
168168
ast (2.4.3)
169169
aws-eventstream (1.4.0)
170-
aws-partitions (1.1139.0)
171-
aws-sdk-core (3.228.0)
170+
aws-partitions (1.1142.0)
171+
aws-sdk-core (3.229.0)
172172
aws-eventstream (~> 1, >= 1.3.0)
173173
aws-partitions (~> 1, >= 1.992.0)
174174
aws-sigv4 (~> 1.9)
175175
base64
176176
bigdecimal
177177
jmespath (~> 1, >= 1.6.1)
178178
logger
179-
aws-sdk-kms (1.109.0)
179+
aws-sdk-kms (1.110.0)
180180
aws-sdk-core (~> 3, >= 3.228.0)
181181
aws-sigv4 (~> 1.5)
182-
aws-sdk-s3 (1.195.0)
182+
aws-sdk-s3 (1.196.1)
183183
aws-sdk-core (~> 3, >= 3.228.0)
184184
aws-sdk-kms (~> 1)
185185
aws-sigv4 (~> 1.5)

app/models/concerns/better_together/privacy.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ module Privacy
1414
include ::TranslateEnum
1515

1616
attribute :privacy, :string
17-
enum privacy: PRIVACY_LEVELS,
18-
_prefix: :privacy
17+
enum :privacy, PRIVACY_LEVELS, prefix: :privacy
1918

2019
translate_enum :privacy
2120

config/initializers/devise.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# confirmation, reset password and unlock tokens in the database.
1515
# Devise will use the `secret_key_base` as its `secret_key`
1616
# by default. You can change it below and use your own secret key.
17-
config.secret_key = ENV.fetch('DEVISE_SECRET', nil)
17+
config.secret_key = ENV.fetch('DEVISE_SECRET') { Rails.application.credentials.secret_key_base }
1818

1919
config.pepper = ENV.fetch('DEVISE_PEPPER', nil)
2020

config/initializers/public_activity.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# config/initializers/public_activity.rb
44

5-
# require 'better_togehter/privacy'
5+
# require 'better_together/privacy'
66

77
ActiveSupport::Reloader.to_prepare do
88
PublicActivity::Config.set do

lib/better_together/engine.rb

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ class Engine < ::Rails::Engine
4343
engine_name 'better_together'
4444
isolate_namespace BetterTogether
4545

46-
config.autoload_paths += Dir["#{config.root}/lib/better_together/**/"]
46+
# Avoid modifying frozen autoload path arrays (Rails 8 compatibility)
47+
config.autoload_paths = Array(config.autoload_paths) + Dir["#{root}/lib/better_together/**/"]
4748

4849
config.generators do |g|
4950
g.orm :active_record, primary_key_type: :uuid
@@ -81,8 +82,9 @@ class Engine < ::Rails::Engine
8182
initializer 'better_together.action_mailer' do |app|
8283
if Rails.env.development?
8384
app.config.action_mailer.show_previews = true
84-
app.config.action_mailer.preview_paths = app.config.action_mailer.preview_paths +
85-
[BetterTogether::Engine.root.join('spec/mailers/previews')]
85+
app.config.action_mailer.preview_paths =
86+
app.config.action_mailer.preview_paths.to_a +
87+
[BetterTogether::Engine.root.join('spec/mailers/previews')]
8688
else
8789
app.config.action_mailer.show_previews = false
8890
end
@@ -91,12 +93,15 @@ class Engine < ::Rails::Engine
9193
# Add engine manifest to precompile assets in production
9294
initializer 'better_together.assets' do |app|
9395
# Ensure we are not modifying frozen arrays
94-
app.config.assets.precompile += %w[better_together_manifest.js]
95-
app.config.assets.paths = [root.join('app', 'assets', 'images'),
96-
root.join('app', 'javascript'),
97-
root.join('vendor', 'javascript'),
98-
root.join('vendor', 'stylesheets'),
99-
root.join('vendor', 'javascripts')] + app.config.assets.paths.to_a
96+
app.config.assets.precompile =
97+
app.config.assets.precompile.to_a + %w[better_together_manifest.js]
98+
app.config.assets.paths =
99+
app.config.assets.paths.to_a +
100+
[root.join('app', 'assets', 'images'),
101+
root.join('app', 'javascript'),
102+
root.join('vendor', 'javascript'),
103+
root.join('vendor', 'stylesheets'),
104+
root.join('vendor', 'javascripts')]
100105
end
101106

102107
initializer 'better_together.i18n' do |app|
@@ -107,9 +112,11 @@ class Engine < ::Rails::Engine
107112

108113
initializer 'better_together.importmap', before: 'importmap' do |app|
109114
# Ensure we are not modifying frozen arrays
110-
app.config.importmap.paths = [Engine.root.join('config/importmap.rb')] + app.config.importmap.paths.to_a
111-
app.config.importmap.cache_sweepers = [root.join('app/assets/javascripts'),
112-
root.join('app/javascript')] + app.config.importmap.cache_sweepers.to_a
115+
app.config.importmap.paths =
116+
app.config.importmap.paths.to_a + [Engine.root.join('config/importmap.rb')]
117+
app.config.importmap.cache_sweepers =
118+
app.config.importmap.cache_sweepers.to_a +
119+
[root.join('app/assets/javascripts'), root.join('app/javascript')]
113120
end
114121

115122
initializer 'better_together.importmap.pins', after: 'importmap' do |app|

spec/dummy/config/secrets.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)