Skip to content

Commit 1f6385b

Browse files
authored
Merge branch 'main' into codex/update-wizard-outcome-redirect-and-tests
2 parents cd9c385 + f5c013e commit 1f6385b

File tree

336 files changed

+10061
-2028
lines changed

Some content is hidden

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

336 files changed

+10061
-2028
lines changed

.env.prod.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ PORT=5000
2424

2525
RACK_ENV=production
2626
RAILS_ENV=production
27-
RAILS_LOG_LEVEL=debug
27+
RAILS_LOG_LEVEL=info
2828
RAILS_LOG_TO_STDOUT=true
2929
RAILS_SERVE_STATIC_FILES=true
3030

.github/workflows/rubyonrails.yml

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,20 @@ jobs:
1111
matrix:
1212
include:
1313
- ruby: '3.4.4'
14-
rails: '7.1.5.1'
14+
rails: '7.1.5.2'
1515
allowed_failure: false # ✅ required
16-
# - ruby: '3.4.4'
17-
# rails: '7.2'
18-
# allowed_failure: true # ⚠️ allowed to fail
1916
- ruby: '3.4.4'
20-
rails: '8.0'
17+
rails: '7.2.2.1'
18+
allowed_failure: false # ⚠️ allowed to fail
19+
- ruby: '3.4.4'
20+
rails: '8.0.2'
2121
allowed_failure: true # ⚠️ allowed to fail
2222

2323
env:
2424
RAILS_ENV: test
2525
DATABASE_URL: "postgis://rails:password@localhost:5432/rails_test"
2626
ES_HOST: "http://localhost"
27+
ELASTICSEARCH_URL: "http://localhost:9200"
2728
RAILS_VERSION: ${{ matrix.rails }}
2829

2930
services:
@@ -54,15 +55,15 @@ jobs:
5455
# Run the automatic bundle-install only on 7.1.
5556
# For 7.2 / 8.0 it just sets up Ruby *and* restores a cache layer
5657
# that we’ll reuse in the later manual install.
57-
bundler-cache: ${{ matrix.rails == '7.1.5.1' }}
58+
bundler-cache: ${{ matrix.rails == '7.1.5.2' }}
5859

5960
# One cache bucket per Rails version so they don’t clobber each other.
6061
cache-version: rails-${{ matrix.rails }}
6162

6263
# Updating Rails can legitimately blow up on the experimental tracks,
6364
# so we allow that *step* to error out without failing the job.
6465
- name: Update Rails & install gems
65-
if: matrix.rails != '7.1.5.1'
66+
if: matrix.rails != '7.1.5.2'
6667
id: update
6768
run: |
6869
# turn off deployment mode
@@ -74,21 +75,43 @@ jobs:
7475
continue-on-error: ${{ matrix.allowed_failure }}
7576

7677
- name: Prepare DB schema
77-
if: (matrix.rails == '7.1.5.1') || steps.update.outcome == 'success'
78+
if: (matrix.rails == '7.1.5.2') || steps.update.outcome == 'success'
7879
run: |
7980
rm -f spec/dummy/tmp/pids/server.pid
8081
bundle exec rake -f spec/dummy/Rakefile db:schema:load
8182
continue-on-error: ${{ matrix.allowed_failure }}
8283

84+
- name: Wait for Elasticsearch
85+
if: (matrix.rails == '7.1.5.2') || steps.update.outcome == 'success'
86+
run: |
87+
echo "Waiting for Elasticsearch to be healthy..."
88+
curl -s "http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=60s" || (echo "Elasticsearch not healthy" && exit 1)
89+
8390
- name: Run RSpec
84-
if: (matrix.rails == '7.1.5.1') || steps.update.outcome == 'success'
91+
if: (matrix.rails == '7.1.5.2') || steps.update.outcome == 'success'
8592
env:
8693
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
8794
run: |
8895
rm -f spec/dummy/tmp/pids/server.pid
8996
bundle exec rspec
9097
continue-on-error: ${{ matrix.allowed_failure }}
9198

99+
- name: Generate coverage badge
100+
if: ${{ github.ref == 'refs/heads/main' && success() }}
101+
continue-on-error: true
102+
run: |
103+
COVERAGE=$(jq -r '.result.covered_percent' coverage/.last_run.json)
104+
COLOR=$(node -e "cov=parseFloat(process.argv[1]);console.log(cov>=90?'green':cov>=75?'orange':'red')" $COVERAGE)
105+
npx badgen-cli --subject coverage --status ${COVERAGE}% --color $COLOR > coverage.svg
106+
107+
- name: Commit badge
108+
if: ${{ github.ref == 'refs/heads/main' && success() }}
109+
continue-on-error: true
110+
uses: stefanzweifel/git-auto-commit-action@v5
111+
with:
112+
commit_message: "chore: update coverage badge"
113+
file_pattern: coverage.svg
114+
92115
# ── style & security jobs (unchanged) ───────────────────────────────────────
93116
rubocop:
94117
runs-on: ubuntu-latest

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.1')
30+
gem 'rails', ENV.fetch('RAILS_VERSION', '7.1.5.2')
3131

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

Gemfile.lock

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -68,51 +68,51 @@ PATH
6868
GEM
6969
remote: https://rubygems.org/
7070
specs:
71-
actioncable (7.1.5.1)
72-
actionpack (= 7.1.5.1)
73-
activesupport (= 7.1.5.1)
71+
actioncable (7.1.5.2)
72+
actionpack (= 7.1.5.2)
73+
activesupport (= 7.1.5.2)
7474
nio4r (~> 2.0)
7575
websocket-driver (>= 0.6.1)
7676
zeitwerk (~> 2.6)
77-
actionmailbox (7.1.5.1)
78-
actionpack (= 7.1.5.1)
79-
activejob (= 7.1.5.1)
80-
activerecord (= 7.1.5.1)
81-
activestorage (= 7.1.5.1)
82-
activesupport (= 7.1.5.1)
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)
8383
mail (>= 2.7.1)
8484
net-imap
8585
net-pop
8686
net-smtp
87-
actionmailer (7.1.5.1)
88-
actionpack (= 7.1.5.1)
89-
actionview (= 7.1.5.1)
90-
activejob (= 7.1.5.1)
91-
activesupport (= 7.1.5.1)
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)
9292
mail (~> 2.5, >= 2.5.4)
9393
net-imap
9494
net-pop
9595
net-smtp
9696
rails-dom-testing (~> 2.2)
97-
actionpack (7.1.5.1)
98-
actionview (= 7.1.5.1)
99-
activesupport (= 7.1.5.1)
97+
actionpack (7.1.5.2)
98+
actionview (= 7.1.5.2)
99+
activesupport (= 7.1.5.2)
100100
nokogiri (>= 1.8.5)
101101
racc
102102
rack (>= 2.2.4)
103103
rack-session (>= 1.0.1)
104104
rack-test (>= 0.6.3)
105105
rails-dom-testing (~> 2.2)
106106
rails-html-sanitizer (~> 1.6)
107-
actiontext (7.1.5.1)
108-
actionpack (= 7.1.5.1)
109-
activerecord (= 7.1.5.1)
110-
activestorage (= 7.1.5.1)
111-
activesupport (= 7.1.5.1)
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)
112112
globalid (>= 0.6.0)
113113
nokogiri (>= 1.8.5)
114-
actionview (7.1.5.1)
115-
activesupport (= 7.1.5.1)
114+
actionview (7.1.5.2)
115+
activesupport (= 7.1.5.2)
116116
builder (~> 3.1)
117117
erubi (~> 1.11)
118118
rails-dom-testing (~> 2.2)
@@ -125,27 +125,27 @@ GEM
125125
activestorage (>= 6.1.4)
126126
activesupport (>= 6.1.4)
127127
marcel (>= 1.0.3)
128-
activejob (7.1.5.1)
129-
activesupport (= 7.1.5.1)
128+
activejob (7.1.5.2)
129+
activesupport (= 7.1.5.2)
130130
globalid (>= 0.3.6)
131-
activemodel (7.1.5.1)
132-
activesupport (= 7.1.5.1)
133-
activerecord (7.1.5.1)
134-
activemodel (= 7.1.5.1)
135-
activesupport (= 7.1.5.1)
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)
136136
timeout (>= 0.4.0)
137137
activerecord-import (2.2.0)
138138
activerecord (>= 4.2)
139139
activerecord-postgis-adapter (9.0.2)
140140
activerecord (~> 7.1.0)
141141
rgeo-activerecord (~> 7.0.0)
142-
activestorage (7.1.5.1)
143-
actionpack (= 7.1.5.1)
144-
activejob (= 7.1.5.1)
145-
activerecord (= 7.1.5.1)
146-
activesupport (= 7.1.5.1)
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)
147147
marcel (~> 1.0)
148-
activesupport (7.1.5.1)
148+
activesupport (7.1.5.2)
149149
base64
150150
benchmark (>= 0.3)
151151
bigdecimal
@@ -548,20 +548,20 @@ GEM
548548
rack (>= 1.3)
549549
rackup (2.2.1)
550550
rack (>= 3)
551-
rails (7.1.5.1)
552-
actioncable (= 7.1.5.1)
553-
actionmailbox (= 7.1.5.1)
554-
actionmailer (= 7.1.5.1)
555-
actionpack (= 7.1.5.1)
556-
actiontext (= 7.1.5.1)
557-
actionview (= 7.1.5.1)
558-
activejob (= 7.1.5.1)
559-
activemodel (= 7.1.5.1)
560-
activerecord (= 7.1.5.1)
561-
activestorage (= 7.1.5.1)
562-
activesupport (= 7.1.5.1)
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)
563563
bundler (>= 1.15.0)
564-
railties (= 7.1.5.1)
564+
railties (= 7.1.5.2)
565565
rails-dom-testing (2.3.0)
566566
activesupport (>= 5.0.0)
567567
minitest
@@ -572,9 +572,9 @@ GEM
572572
rails-i18n (7.0.10)
573573
i18n (>= 0.7, < 2)
574574
railties (>= 6.0.0, < 8)
575-
railties (7.1.5.1)
576-
actionpack (= 7.1.5.1)
577-
activesupport (= 7.1.5.1)
575+
railties (7.1.5.2)
576+
actionpack (= 7.1.5.2)
577+
activesupport (= 7.1.5.2)
578578
irb
579579
rackup (>= 1.0.0)
580580
rake (>= 12.2)
@@ -678,7 +678,7 @@ GEM
678678
rubocop-factory_bot (2.27.1)
679679
lint_roller (~> 1.1)
680680
rubocop (~> 1.72, >= 1.72.1)
681-
rubocop-rails (2.33.0)
681+
rubocop-rails (2.33.1)
682682
activesupport (>= 4.2.0)
683683
lint_roller (~> 1.1)
684684
rack (>= 1.1)
@@ -699,7 +699,7 @@ GEM
699699
ruby-vips (2.2.3)
700700
ffi (~> 1.12)
701701
logger
702-
rubyzip (2.4.1)
702+
rubyzip (3.0.1)
703703
sass-embedded (1.86.3-aarch64-linux-gnu)
704704
google-protobuf (~> 4.30)
705705
sass-embedded (1.86.3-arm64-darwin)
@@ -711,11 +711,11 @@ GEM
711711
sassc-embedded (1.80.4)
712712
sass-embedded (~> 1.80)
713713
securerandom (0.4.1)
714-
selenium-webdriver (4.34.0)
714+
selenium-webdriver (4.35.0)
715715
base64 (~> 0.2)
716716
logger (~> 1.4)
717717
rexml (~> 3.2, >= 3.2.5)
718-
rubyzip (>= 1.2.2, < 3.0)
718+
rubyzip (>= 1.2.2, < 4.0)
719719
websocket (~> 1.0)
720720
sentry-rails (5.26.0)
721721
railties (>= 5.0)
@@ -845,7 +845,7 @@ DEPENDENCIES
845845
pundit-resources (~> 1.1.4)!
846846
rack-mini-profiler
847847
rack-protection
848-
rails (= 7.1.5.1)
848+
rails (= 7.1.5.2)
849849
rb-readline
850850
rbtrace
851851
redis (~> 5.4)

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,26 @@ This project embodies our vision of a world where collaboration leads to greater
1010

1111
This project is the core community building portion of the Better Together platform.
1212

13+
## Joatu Requests and Offers
14+
15+
The Joatu module enables community members to post service **requests** and **offers** and to create agreements between them.
16+
17+
### Endpoints
18+
19+
- `POST /:locale/joatu/requests` — create a request
20+
- `POST /:locale/joatu/offers` — create an offer
21+
- `POST /:locale/joatu/agreements` — create an agreement between an offer and a request
22+
- `POST /:locale/joatu/agreements/:id/reject` — reject an agreement
23+
24+
Each endpoint expects parameters nested under the matching resource name. For example:
25+
26+
```bash
27+
curl -X POST /en/joatu/requests \\
28+
-d 'request[name]=Repair help' \\
29+
-d 'request[description]=Need bike fixes' \\
30+
-d 'request[creator_id]=<person_uuid>'
31+
```
32+
1333
## Dependencies
1434

1535
In addition to other dependencies, the Better Together Community Engine relies on Action Text and Action Storage, which are part of the Rails framework. These dependencies are essential for handling rich text content and file storage within the platform.

app/assets/stylesheets/better_together/application.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
}
7373

7474
#flash_messages {
75-
position: absolute;
75+
position: fixed;
7676
width: 100vw;
7777
top: 6vh;
7878
z-index: 1001;

app/assets/stylesheets/better_together/forms.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
font-weight: bold;
66
}
77

8+
.form-label {
9+
font-weight: 500;
10+
}
11+
812
.bt-mb-3 {
913
margin-bottom: 1rem;
1014
}

0 commit comments

Comments
 (0)