Compare commits

...

34 Commits

Author SHA1 Message Date
Renovate Bot
567093c449 Update dependency rubocop-rails to v2.29.1
All checks were successful
Run unit tests / rubocop (pull_request) Successful in 2m8s
Run unit tests / check-licenses (pull_request) Successful in 2m40s
Run unit tests / copyright_notice (pull_request) Successful in 3m12s
Run unit tests / unit_tests (pull_request) Successful in 8m46s
Run unit tests / build-static-assets (pull_request) Successful in 16m47s
Run unit tests / rubocop (push) Successful in 42s
Run unit tests / check-licenses (push) Successful in 46s
Run unit tests / copyright_notice (push) Successful in 57s
Run unit tests / unit_tests (push) Successful in 1m45s
Run unit tests / build-static-assets (push) Successful in 9m39s
2025-01-27 03:05:19 +00:00
2147d7ad5e Redo simulations lifecycle (#222)
All checks were successful
Run unit tests / rubocop (push) Successful in 27s
Run unit tests / check-licenses (push) Successful in 32s
Run unit tests / copyright_notice (push) Successful in 36s
Run unit tests / unit_tests (push) Successful in 1m22s
Run unit tests / build-static-assets (push) Successful in 10m9s
## Why

The current way of creating and deleting simulations doesn't scale for big instances. We cannot generate 50 simulations every time a guest confirms attendance, and we should not delete existing valuable simulations. For example, if a guest confirms attendance and declines right after, previously generated simulations should still be valid.

## What

In this PR we are introducing a series of changes that make simulations management easier:

1. We're removing the automatic creation of simulations.
2. Simulations are not removed anymore, neither manually nor automatically.
3. A new endpoint has been defined to create simulations on demand.
4. A digest property has been defined to determine whether a simulation is still valid (meaning there have not been any change in the list of guests involved).

Reviewed-on: #222
Co-authored-by: Manuel Bustillo <bustikiller@bustikiller.com>
Co-committed-by: Manuel Bustillo <bustikiller@bustikiller.com>
2025-01-26 12:53:21 +00:00
f414acb2d5 Test reversibility of migrations (#220)
Some checks failed
Run unit tests / rubocop (push) Failing after 1m10s
Run unit tests / unit_tests (push) Failing after 1m16s
Run unit tests / copyright_notice (push) Successful in 1m16s
Run unit tests / check-licenses (push) Successful in 1m36s
Run unit tests / build-static-assets (push) Has been skipped
We want to make sure that:

1. Migrations are reversible
2. Reapplying migrations added to a PR leads to the same schema.rb

Reviewed-on: #220
Co-authored-by: Manuel Bustillo <bustikiller@bustikiller.com>
Co-committed-by: Manuel Bustillo <bustikiller@bustikiller.com>
2025-01-25 09:43:43 +00:00
66aded5112 Merge pull request 'Update copyright notice action' (#221) from remove-old-copyright-notice into main
All checks were successful
Check usage of free licenses / check-licenses (push) Successful in 39s
Run unit tests / unit_tests (push) Successful in 1m56s
Build Nginx-based docker image / build-static-assets (push) Successful in 12m35s
Reviewed-on: #221
2025-01-23 22:16:01 +00:00
8c12884212 Add copyright notice
All checks were successful
Check usage of free licenses / check-licenses (pull_request) Successful in 1m38s
Add copyright notice / copyright_notice (pull_request) Successful in 3m16s
Run unit tests / unit_tests (pull_request) Successful in 5m31s
Build Nginx-based docker image / build-static-assets (pull_request) Successful in 41m31s
2025-01-23 21:34:23 +00:00
6cead51bb9 Remove all copyright notices to force recreation
All checks were successful
Check usage of free licenses / check-licenses (pull_request) Successful in 1m25s
Add copyright notice / copyright_notice (pull_request) Successful in 3m0s
Run unit tests / unit_tests (pull_request) Successful in 4m54s
Build Nginx-based docker image / build-static-assets (pull_request) Successful in 45m24s
2025-01-23 22:29:26 +01:00
74ca20d3e8 Add copyright notice
Some checks failed
Check usage of free licenses / check-licenses (pull_request) Successful in 1m22s
Add copyright notice / copyright_notice (pull_request) Successful in 2m5s
Run unit tests / unit_tests (pull_request) Successful in 3m45s
Build Nginx-based docker image / build-static-assets (pull_request) Has been cancelled
2025-01-23 21:18:12 +00:00
cedb8dce92 Update copyright notice action
Some checks failed
Add copyright notice / copyright_notice (pull_request) Successful in 2m44s
Check usage of free licenses / check-licenses (pull_request) Successful in 1m55s
Run unit tests / unit_tests (pull_request) Successful in 4m30s
Build Nginx-based docker image / build-static-assets (pull_request) Has been cancelled
2025-01-23 22:15:34 +01:00
006b1893c1 Merge pull request 'Fix error loading arrangements' (#217) from fix/error-loading-arrangements into main
All checks were successful
Check usage of free licenses / check-licenses (push) Successful in 1m24s
Run unit tests / unit_tests (push) Successful in 1m31s
Build Nginx-based docker image / build-static-assets (push) Successful in 28m7s
Reviewed-on: #217
2025-01-23 20:49:01 +00:00
Renovate Bot
fcb1e77a3a Update dependency rubocop to v1.71.0
All checks were successful
Add copyright notice / copyright_notice (pull_request) Successful in 1m28s
Check usage of free licenses / check-licenses (pull_request) Successful in 2m46s
Build Nginx-based docker image / build-static-assets (pull_request) Successful in 17m11s
Run unit tests / unit_tests (pull_request) Successful in 1m4s
Check usage of free licenses / check-licenses (push) Successful in 42s
Run unit tests / unit_tests (push) Successful in 2m6s
Build Nginx-based docker image / build-static-assets (push) Successful in 14m32s
2025-01-23 03:11:38 +00:00
9f7f99f3f4 Fix error loading arrangements
All checks were successful
Run unit tests / unit_tests (pull_request) Successful in 5m3s
Build Nginx-based docker image / build-static-assets (pull_request) Successful in 24m19s
Add copyright notice / copyright_notice (pull_request) Successful in 34s
Check usage of free licenses / check-licenses (pull_request) Successful in 37s
2025-01-22 20:39:09 +01:00
Renovate Bot
f550b8d92c Update dependency rubocop-rspec to v3.4.0
All checks were successful
Check usage of free licenses / check-licenses (pull_request) Successful in 1m55s
Add copyright notice / copyright_notice (pull_request) Successful in 2m55s
Run unit tests / unit_tests (pull_request) Successful in 5m3s
Build Nginx-based docker image / build-static-assets (pull_request) Successful in 13m25s
Check usage of free licenses / check-licenses (push) Successful in 47s
Run unit tests / unit_tests (push) Successful in 1m50s
Build Nginx-based docker image / build-static-assets (push) Successful in 11m57s
2025-01-21 03:03:34 +00:00
7c968f555f Merge pull request 'Use group affinities in discomfort calculator' (#215) from discomfort-calculation-revamp into main
All checks were successful
Check usage of free licenses / check-licenses (push) Successful in 34s
Run unit tests / unit_tests (push) Successful in 1m40s
Build Nginx-based docker image / build-static-assets (push) Successful in 17m44s
Reviewed-on: #215
2025-01-19 20:19:10 +00:00
1f0c6c2aac Use group affinities in discomfort calculator
All checks were successful
Check usage of free licenses / check-licenses (pull_request) Successful in 50s
Add copyright notice / copyright_notice (pull_request) Successful in 1m11s
Run unit tests / unit_tests (pull_request) Successful in 1m58s
Build Nginx-based docker image / build-static-assets (pull_request) Successful in 19m18s
2025-01-19 20:58:42 +01:00
390899524b Fix rubocop ofenses
All checks were successful
Add copyright notice / copyright_notice (pull_request) Successful in 1m5s
Check usage of free licenses / check-licenses (pull_request) Successful in 1m7s
Run unit tests / unit_tests (pull_request) Successful in 2m49s
Build Nginx-based docker image / build-static-assets (pull_request) Successful in 22m13s
Check usage of free licenses / check-licenses (push) Successful in 42s
Run unit tests / unit_tests (push) Successful in 1m32s
Build Nginx-based docker image / build-static-assets (push) Successful in 26m19s
2025-01-19 19:44:22 +01:00
Renovate Bot
59e7653064 Update dependency rubocop-rails to v2.29.0
Some checks failed
Add copyright notice / copyright_notice (pull_request) Successful in 1m51s
Build Nginx-based docker image / build-static-assets (pull_request) Successful in 24m24s
Check usage of free licenses / check-licenses (pull_request) Successful in 49s
Run unit tests / unit_tests (pull_request) Failing after 48s
2025-01-19 03:18:52 +00:00
d6fd72a45c Merge pull request 'Fix duplicate row index on upsert statement' (#213) from fix-upsert-index into main
All checks were successful
Check usage of free licenses / check-licenses (push) Successful in 51s
Run unit tests / unit_tests (push) Successful in 1m48s
Build Nginx-based docker image / build-static-assets (push) Successful in 12m11s
Reviewed-on: #213
2025-01-14 22:11:43 +00:00
889485eaab Merge branch 'main' into fix-upsert-index
All checks were successful
Check usage of free licenses / check-licenses (pull_request) Successful in 1m9s
Add copyright notice / copyright_notice (pull_request) Successful in 1m51s
Run unit tests / unit_tests (pull_request) Successful in 3m18s
Build Nginx-based docker image / build-static-assets (pull_request) Successful in 15m7s
2025-01-14 21:08:36 +00:00
105a0ad30c Merge pull request 'Upgrade to ruby 3.4' (#196) from ruby-3-4 into main
Some checks failed
Run unit tests / unit_tests (push) Failing after 17s
Check usage of free licenses / check-licenses (push) Successful in 39s
Build Nginx-based docker image / build-static-assets (push) Successful in 25m52s
Reviewed-on: #196
2025-01-14 20:39:46 +00:00
d03ef173e6 Merge branch 'main' into ruby-3-4
All checks were successful
Check usage of free licenses / check-licenses (pull_request) Successful in 58s
Add copyright notice / copyright_notice (pull_request) Successful in 1m31s
Run unit tests / unit_tests (pull_request) Successful in 3m1s
Build Nginx-based docker image / build-static-assets (pull_request) Successful in 29m24s
2025-01-14 20:10:18 +00:00
b86d537cdc Install missing libyaml dependencies
All checks were successful
Check usage of free licenses / check-licenses (pull_request) Successful in 48s
Add copyright notice / copyright_notice (pull_request) Successful in 1m22s
Run unit tests / unit_tests (pull_request) Successful in 2m10s
Build Nginx-based docker image / build-static-assets (pull_request) Successful in 30m20s
2025-01-14 20:59:30 +01:00
c1774a1c6c Upgrade Nokogiri to the latest version
Some checks failed
Check usage of free licenses / check-licenses (pull_request) Successful in 41s
Add copyright notice / copyright_notice (pull_request) Successful in 1m15s
Run unit tests / unit_tests (pull_request) Successful in 2m9s
Build Nginx-based docker image / build-static-assets (pull_request) Failing after 10m38s
2025-01-14 20:16:02 +01:00
23d09df543 Fix version of GH action
Some checks failed
Check usage of free licenses / check-licenses (pull_request) Successful in 1m0s
Add copyright notice / copyright_notice (pull_request) Successful in 1m13s
Run unit tests / unit_tests (pull_request) Successful in 1m54s
Build Nginx-based docker image / build-static-assets (pull_request) Failing after 11m42s
2025-01-14 20:11:59 +01:00
44dbb7e005 Run bundle lock --normalize-platforms 2025-01-14 20:11:34 +01:00
8a9d0bfdb8 Use the lateste version of ruby/setup-ruby
Some checks failed
Check usage of free licenses / check-licenses (pull_request) Failing after 47s
Add copyright notice / copyright_notice (pull_request) Successful in 1m16s
Run unit tests / unit_tests (pull_request) Successful in 4m34s
Build Nginx-based docker image / build-static-assets (pull_request) Failing after 11m25s
2025-01-14 19:51:29 +01:00
c6c5a87d8b Fix duplicate row index on upsert statement
Some checks failed
Add copyright notice / copyright_notice (pull_request) Successful in 1m22s
Check usage of free licenses / check-licenses (pull_request) Successful in 1m49s
Run unit tests / unit_tests (pull_request) Successful in 2m59s
Build Nginx-based docker image / build-static-assets (pull_request) Failing after 8m46s
2025-01-14 19:13:40 +01:00
acf3b7b82a Merge pull request 'Update copyright assignment to cover 2025 and include all contributors' (#212) from copyright-2025 into main
All checks were successful
Check usage of free licenses / check-licenses (push) Successful in 42s
Run unit tests / unit_tests (push) Successful in 2m3s
Build Nginx-based docker image / build-static-assets (push) Successful in 12m11s
Reviewed-on: #212
2025-01-13 21:04:10 +00:00
0ade367fb5 Merge pull request 'Define an endpoint to reset the discomfort between all groups' (#211) from full-affinity-reset into main
Some checks failed
Check usage of free licenses / check-licenses (push) Successful in 1m0s
Run unit tests / unit_tests (push) Successful in 1m35s
Build Nginx-based docker image / build-static-assets (push) Has been cancelled
Reviewed-on: #211
2025-01-13 20:57:43 +00:00
91bbae1c63 Add copyright notice
All checks were successful
Check usage of free licenses / check-licenses (pull_request) Successful in 59s
Add copyright notice / copyright_notice (pull_request) Successful in 2m21s
Run unit tests / unit_tests (pull_request) Successful in 3m2s
Build Nginx-based docker image / build-static-assets (pull_request) Successful in 25m17s
2025-01-13 20:38:47 +00:00
e20a366410 Update copyright assignment to cover 2025 and include all contributors
All checks were successful
Check usage of free licenses / check-licenses (pull_request) Successful in 56s
Add copyright notice / copyright_notice (pull_request) Successful in 1m36s
Run unit tests / unit_tests (pull_request) Successful in 3m56s
Build Nginx-based docker image / build-static-assets (pull_request) Successful in 28m26s
2025-01-13 21:37:02 +01:00
a154e92b6c Define an endpoint to reset the discomfort between all groups
All checks were successful
Check usage of free licenses / check-licenses (pull_request) Successful in 1m13s
Add copyright notice / copyright_notice (pull_request) Successful in 1m15s
Run unit tests / unit_tests (pull_request) Successful in 2m2s
Build Nginx-based docker image / build-static-assets (pull_request) Successful in 26m4s
2025-01-13 21:16:22 +01:00
65a265b900 Merge pull request 'Define an endpoint to return the default affinities of a group' (#209) from affinity-reset into main
All checks were successful
Check usage of free licenses / check-licenses (push) Successful in 36s
Run unit tests / unit_tests (push) Successful in 1m15s
Build Nginx-based docker image / build-static-assets (push) Successful in 12m1s
Reviewed-on: #209
2025-01-12 21:34:04 +00:00
492c8e362a Upgrade to ruby 3.4.1
Some checks failed
Check usage of free licenses / check-licenses (pull_request) Failing after 30s
Run unit tests / unit_tests (pull_request) Failing after 1m20s
Add copyright notice / copyright_notice (pull_request) Successful in 1m21s
Build Nginx-based docker image / build-static-assets (pull_request) Failing after 8m9s
2024-12-30 08:15:56 +00:00
c5c7ea6d54 WIP: Upgrade to ruby 3.4 2024-12-30 08:15:56 +00:00
151 changed files with 421 additions and 512 deletions

View File

@ -1,46 +0,0 @@
name: Build Nginx-based docker image
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build-static-assets:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to the private Docker registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.PRIVATE_REGISTRY_HOST }}
username: ${{ secrets.PRIVATE_REGISTRY_USERNAME }}
password: ${{ secrets.PRIVATE_REGISTRY_TOKEN }}
- name: Build and push intermediate stages (build)
uses: docker/build-push-action@v6
with:
context: .
target: build
push: ${{ github.ref == 'refs/heads/main' }}
tags: ${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:build
cache-from: type=registry,ref=${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:build
cache-to: type=inline
- name: Build and push (final)
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.ref == 'refs/heads/main' }}
tags: ${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:latest
cache-from: type=registry,ref=${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:latest
cache-to: type=inline

View File

@ -1,39 +0,0 @@
name: Add copyright notice
on:
pull_request:
permissions:
contents: write
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
copyright_notice:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.ACTIONS_TOKEN }}
ref: ${{ github.head_ref }}
- uses: VinnyBabuManjaly/copyright-action@v1.0.0
with:
CopyrightString: '# Copyright (C) 2024 Manuel Bustillo\n\n'
FileType: '.rb'
Path: 'app/, config/, db/, spec/'
- uses: VinnyBabuManjaly/copyright-action@v1.0.0
with:
CopyrightString: '<%# Copyright (C) 2024 Manuel Bustillo %>\n\n'
FileType: '.erb'
Path: 'app/'
- name: Commit changes
run: |
git config --local user.email "bustikiller@bustikiller.com"
git config --local user.name "Manuel Bustillo"
git add .
if [ -n "$(git status --porcelain)" ]; then
echo "there are changes";
git commit -m "Add copyright notice"
git push
else
echo "no changes";
fi

View File

@ -1,23 +0,0 @@
name: Check usage of free licenses
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
check-licenses:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: ruby/setup-ruby@v1.202.0
with:
ruby-version: '3.3.6'
- name: Install project dependencies
run: bundle install --jobs `getconf _NPROCESSORS_ONLN`
- name: Run license finder
run: license_finder

View File

@ -10,7 +10,7 @@ concurrency:
jobs: jobs:
unit_tests: unit_tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
services: services: &services
postgres: postgres:
image: postgres image: postgres
env: env:
@ -22,10 +22,11 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- uses: ruby/setup-ruby@v1.202.0 ref: ${{ github.head_ref }} # Checkout the actual branch, not the result if merged into the base
- uses: ruby/setup-ruby@v1.207.0
- run: bundle install - run: bundle install
- run: bundle exec rubocop --force-exclusion --parallel - &postgres_wait
- name: Wait until Postgres is ready to accept connections name: Wait until Postgres is ready to accept connections
run: | run: |
apt-get update && apt-get install -f -y postgresql-client apt-get update && apt-get install -f -y postgresql-client
until pg_isready -h postgres -U postgres -d postgres until pg_isready -h postgres -U postgres -d postgres
@ -33,12 +34,126 @@ jobs:
sleep 1 sleep 1
echo "Trying again" echo "Trying again"
done done
- run: | - name: Load schema and run unit tests
run: |
bundle exec rake db:schema:load bundle exec rake db:schema:load
bundle exec rspec bundle exec rspec
env: env:
RAILS_ENV: test RAILS_ENV: test
DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres
- name: Get all migrations added
id: changed-migration-files
uses: tj-actions/changed-files@v45
with:
files: |
db/migrate/**.rb
- name: Redo all migrations and check there are no schema changes
if: steps.changed-migration-files.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed-migration-files.outputs.all_changed_files }}
RAILS_ENV: test
DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres
run: |
echo ${#ALL_CHANGED_FILES[@]} migrations changed:
for file in ${ALL_CHANGED_FILES}; do
echo "$file"
done
bundle exec rake db:migrate:redo STEP=${#ALL_CHANGED_FILES[@]}
git diff --exit-code db/schema.rb
- name: Clean up containers generated by this flow - name: Clean up containers generated by this flow
if: failure() if: failure()
run: docker ps --filter network=$JOB_CONTAINER_NAME-$GITHUB_JOB-network --filter name=$JOB_CONTAINER_NAME-* --format "{{.ID}}" | xargs docker rm -f run: docker ps --filter network=$JOB_CONTAINER_NAME-$GITHUB_JOB-network --filter name=$JOB_CONTAINER_NAME-* --format "{{.ID}}" | xargs docker rm -f
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: ruby/setup-ruby@v1.207.0
- run: bundle install
- run: bundle exec rubocop --force-exclusion --parallel
check-licenses:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: ruby/setup-ruby@v1.207.0
- name: Install project dependencies
run: bundle install --jobs `getconf _NPROCESSORS_ONLN`
- name: Run license finder
run: license_finder
copyright_notice:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.ACTIONS_TOKEN }}
ref: ${{ github.head_ref }}
- uses: VinnyBabuManjaly/copyright-action@v1.0.0
with:
CopyrightString: '# Copyright (C) 2024-2025 LibreWeddingPlanner contributors\n\n'
FileType: '.rb'
Path: 'app/, config/, db/, spec/'
IgnorePath: 'db'
- uses: VinnyBabuManjaly/copyright-action@v1.0.0
with:
CopyrightString: '<%# Copyright (C) 2024-2025 LibreWeddingPlanner contributors %>\n\n'
FileType: '.erb'
Path: 'app/'
- name: Commit changes
run: |
git config --local user.email "bustikiller@bustikiller.com"
git config --local user.name "Manuel Bustillo"
git add .
if [ -n "$(git status --porcelain)" ]; then
echo "there are changes";
git commit -m "Add copyright notice"
git push
else
echo "no changes";
fi
build-static-assets:
runs-on: ubuntu-latest
timeout-minutes: 30
needs:
- unit_tests
- rubocop
- check-licenses
- copyright_notice
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to the private Docker registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.PRIVATE_REGISTRY_HOST }}
username: ${{ secrets.PRIVATE_REGISTRY_USERNAME }}
password: ${{ secrets.PRIVATE_REGISTRY_TOKEN }}
- name: Build and push intermediate stages (build)
uses: docker/build-push-action@v6
with:
context: .
target: build
push: ${{ github.ref == 'refs/heads/main' }}
tags: ${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:build
cache-from: type=registry,ref=${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:build
cache-to: type=inline
- name: Build and push (final)
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.ref == 'refs/heads/main' }}
tags: ${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:latest
cache-from: type=registry,ref=${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:latest
cache-to: type=inline

View File

@ -1 +1 @@
ruby-3.3.6 ruby-3.4.1

View File

@ -1,8 +1,8 @@
# syntax = docker/dockerfile:1 # syntax = docker/dockerfile:1
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile # Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
ARG RUBY_VERSION=3.3.6 ARG RUBY_VERSION=3.4.1
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim AS base
# Rails app lives here # Rails app lives here
WORKDIR /rails WORKDIR /rails
@ -16,11 +16,11 @@ ENV RAILS_ENV="production" \
RUN apt-get update && apt-get install -y nodejs RUN apt-get update && apt-get install -y nodejs
# Throw-away build stage to reduce size of final image # Throw-away build stage to reduce size of final image
FROM base as build FROM base AS build
# Install packages needed to build gems # Install packages needed to build gems
RUN apt-get update -qq && \ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential git libpq-dev libvips pkg-config apt-get install --no-install-recommends -y build-essential git libpq-dev libvips pkg-config libyaml-dev
# Install application gems # Install application gems
COPY Gemfile Gemfile.lock ./ COPY Gemfile Gemfile.lock ./

View File

@ -1,7 +1,7 @@
# syntax = docker/dockerfile:1 # syntax = docker/dockerfile:1
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile # Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
ARG RUBY_VERSION=3.3.6 ARG RUBY_VERSION=3.4.1
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base
# Rails app lives here # Rails app lives here
@ -13,7 +13,7 @@ FROM base as build
# Install packages needed to build gems # Install packages needed to build gems
RUN apt-get update -qq && \ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential git libpq-dev libvips pkg-config apt-get install --no-install-recommends -y build-essential git libpq-dev libvips pkg-config libyaml-dev
# Install application gems # Install application gems
COPY Gemfile Gemfile.lock ./ COPY Gemfile Gemfile.lock ./

View File

@ -2,7 +2,7 @@
source 'https://rubygems.org' source 'https://rubygems.org'
ruby '3.3.6' ruby '3.4.1'
gem 'bootsnap', require: false gem 'bootsnap', require: false
gem 'csv' gem 'csv'
gem 'importmap-rails' gem 'importmap-rails'

View File

@ -94,7 +94,7 @@ GEM
logger (~> 1.5) logger (~> 1.5)
chroma (0.2.0) chroma (0.2.0)
coderay (1.1.3) coderay (1.1.3)
concurrent-ruby (1.3.4) concurrent-ruby (1.3.5)
connection_pool (2.4.1) connection_pool (2.4.1)
crass (1.0.6) crass (1.0.6)
csv (3.3.2) csv (3.3.2)
@ -130,7 +130,7 @@ GEM
csv csv
mini_mime (>= 1.0.0) mini_mime (>= 1.0.0)
multi_xml (>= 0.5.2) multi_xml (>= 0.5.2)
i18n (1.14.6) i18n (1.14.7)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
importmap-rails (2.1.0) importmap-rails (2.1.0)
actionpack (>= 6.0.0) actionpack (>= 6.0.0)
@ -188,6 +188,7 @@ GEM
marcel (1.0.4) marcel (1.0.4)
method_source (1.1.0) method_source (1.1.0)
mini_mime (1.1.5) mini_mime (1.1.5)
mini_portile2 (2.8.8)
minitest (5.25.4) minitest (5.25.4)
money (6.19.0) money (6.19.0)
i18n (>= 0.6.4, <= 2) i18n (>= 0.6.4, <= 2)
@ -204,21 +205,22 @@ GEM
net-smtp (0.5.0) net-smtp (0.5.0)
net-protocol net-protocol
nio4r (2.7.4) nio4r (2.7.4)
nokogiri (1.17.2-aarch64-linux) nokogiri (1.18.1)
mini_portile2 (~> 2.8.2)
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.17.2-arm-linux) nokogiri (1.18.1-aarch64-linux-gnu)
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.17.2-arm64-darwin) nokogiri (1.18.1-arm-linux-gnu)
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.17.2-x86-linux) nokogiri (1.18.1-arm64-darwin)
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.17.2-x86_64-darwin) nokogiri (1.18.1-x86_64-darwin)
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.17.2-x86_64-linux) nokogiri (1.18.1-x86_64-linux-gnu)
racc (~> 1.4) racc (~> 1.4)
orm_adapter (0.5.0) orm_adapter (0.5.0)
parallel (1.26.3) parallel (1.26.3)
parser (3.3.6.0) parser (3.3.7.0)
ast (~> 2.4.1) ast (~> 2.4.1)
racc racc
pg (1.5.9) pg (1.5.9)
@ -327,7 +329,7 @@ GEM
rswag-ui (2.16.0) rswag-ui (2.16.0)
actionpack (>= 5.2, < 8.1) actionpack (>= 5.2, < 8.1)
railties (>= 5.2, < 8.1) railties (>= 5.2, < 8.1)
rubocop (1.70.0) rubocop (1.71.0)
json (~> 2.3) json (~> 2.3)
language_server-protocol (>= 3.17.0) language_server-protocol (>= 3.17.0)
parallel (~> 1.10) parallel (~> 1.10)
@ -341,12 +343,12 @@ GEM
parser (>= 3.3.1.0) parser (>= 3.3.1.0)
rubocop-factory_bot (2.26.1) rubocop-factory_bot (2.26.1)
rubocop (~> 1.61) rubocop (~> 1.61)
rubocop-rails (2.28.0) rubocop-rails (2.29.1)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
rack (>= 1.1) rack (>= 1.1)
rubocop (>= 1.52.0, < 2.0) rubocop (>= 1.52.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (3.3.0) rubocop-rspec (3.4.0)
rubocop (~> 1.61) rubocop (~> 1.61)
rubocop-rspec_rails (2.30.0) rubocop-rspec_rails (2.30.0)
rubocop (~> 1.61) rubocop (~> 1.61)
@ -479,7 +481,7 @@ CHECKSUMS
childprocess (5.1.0) sha256=9a8d484be2fd4096a0e90a0cd3e449a05bc3aa33f8ac9e4d6dcef6ac1455b6ec childprocess (5.1.0) sha256=9a8d484be2fd4096a0e90a0cd3e449a05bc3aa33f8ac9e4d6dcef6ac1455b6ec
chroma (0.2.0) sha256=64bdcd36a4765fbcd45adc64960cc153101300b4918f90ffdd89f4e2eb954b54 chroma (0.2.0) sha256=64bdcd36a4765fbcd45adc64960cc153101300b4918f90ffdd89f4e2eb954b54
coderay (1.1.3) sha256=dc530018a4684512f8f38143cd2a096c9f02a1fc2459edcfe534787a7fc77d4b coderay (1.1.3) sha256=dc530018a4684512f8f38143cd2a096c9f02a1fc2459edcfe534787a7fc77d4b
concurrent-ruby (1.3.4) sha256=d4aa926339b0a86b5b5054a0a8c580163e6f5dcbdfd0f4bb916b1a2570731c32 concurrent-ruby (1.3.5) sha256=813b3e37aca6df2a21a3b9f1d497f8cbab24a2b94cab325bffe65ee0f6cbebc6
connection_pool (2.4.1) sha256=0f40cf997091f1f04ff66da67eabd61a9fe0d4928b9a3645228532512fab62f4 connection_pool (2.4.1) sha256=0f40cf997091f1f04ff66da67eabd61a9fe0d4928b9a3645228532512fab62f4
crass (1.0.6) sha256=dc516022a56e7b3b156099abc81b6d2b08ea1ed12676ac7a5657617f012bd45d crass (1.0.6) sha256=dc516022a56e7b3b156099abc81b6d2b08ea1ed12676ac7a5657617f012bd45d
csv (3.3.2) sha256=6ff0c135e65e485d1864dde6c1703b60d34cc9e19bed8452834a0b28a519bd4e csv (3.3.2) sha256=6ff0c135e65e485d1864dde6c1703b60d34cc9e19bed8452834a0b28a519bd4e
@ -497,7 +499,7 @@ CHECKSUMS
fugit (1.11.1) sha256=e89485e7be22226d8e9c6da411664d0660284b4b1c08cacb540f505907869868 fugit (1.11.1) sha256=e89485e7be22226d8e9c6da411664d0660284b4b1c08cacb540f505907869868
globalid (1.2.1) sha256=70bf76711871f843dbba72beb8613229a49429d1866828476f9c9d6ccc327ce9 globalid (1.2.1) sha256=70bf76711871f843dbba72beb8613229a49429d1866828476f9c9d6ccc327ce9
httparty (0.22.0) sha256=78652a5c9471cf0093d3b2083c2295c9c8f12b44c65112f1846af2b71430fa6c httparty (0.22.0) sha256=78652a5c9471cf0093d3b2083c2295c9c8f12b44c65112f1846af2b71430fa6c
i18n (1.14.6) sha256=dc229a74f5d181f09942dd60ab5d6e667f7392c4ee826f35096db36d1fe3614c i18n (1.14.7) sha256=ceba573f8138ff2c0915427f1fc5bdf4aa3ab8ae88c8ce255eb3ecf0a11a5d0f
importmap-rails (2.1.0) sha256=9f10c67d60651a547579f448100d033df311c5d5db578301374aeb774faae741 importmap-rails (2.1.0) sha256=9f10c67d60651a547579f448100d033df311c5d5db578301374aeb774faae741
io-console (0.8.0) sha256=cd6a9facbc69871d69b2cb8b926fc6ea7ef06f06e505e81a64f14a470fddefa2 io-console (0.8.0) sha256=cd6a9facbc69871d69b2cb8b926fc6ea7ef06f06e505e81a64f14a470fddefa2
irb (1.14.3) sha256=c457f1f2f1438ae9ce5c5be3981ae2138dec7fb894c7d73777eeeb0a6c0d0752 irb (1.14.3) sha256=c457f1f2f1438ae9ce5c5be3981ae2138dec7fb894c7d73777eeeb0a6c0d0752
@ -521,6 +523,7 @@ CHECKSUMS
marcel (1.0.4) sha256=0d5649feb64b8f19f3d3468b96c680bae9746335d02194270287868a661516a4 marcel (1.0.4) sha256=0d5649feb64b8f19f3d3468b96c680bae9746335d02194270287868a661516a4
method_source (1.1.0) sha256=181301c9c45b731b4769bc81e8860e72f9161ad7d66dd99103c9ab84f560f5c5 method_source (1.1.0) sha256=181301c9c45b731b4769bc81e8860e72f9161ad7d66dd99103c9ab84f560f5c5
mini_mime (1.1.5) sha256=8681b7e2e4215f2a159f9400b5816d85e9d8c6c6b491e96a12797e798f8bccef mini_mime (1.1.5) sha256=8681b7e2e4215f2a159f9400b5816d85e9d8c6c6b491e96a12797e798f8bccef
mini_portile2 (2.8.8) sha256=8e47136cdac04ce81750bb6c09733b37895bf06962554e4b4056d78168d70a75
minitest (5.25.4) sha256=9cf2cae25ac4dfc90c988ebc3b917f53c054978b673273da1bd20bcb0778f947 minitest (5.25.4) sha256=9cf2cae25ac4dfc90c988ebc3b917f53c054978b673273da1bd20bcb0778f947
money (6.19.0) sha256=ec936fa1e42f2783719241ed9fd52725d0efa628f928feea1eb5c37d5de7daf3 money (6.19.0) sha256=ec936fa1e42f2783719241ed9fd52725d0efa628f928feea1eb5c37d5de7daf3
msgpack (1.7.2) sha256=59ab62fd8a4d0dfbde45009f87eb6f158ab2628a7c48886b0256f175166baaa8 msgpack (1.7.2) sha256=59ab62fd8a4d0dfbde45009f87eb6f158ab2628a7c48886b0256f175166baaa8
@ -530,15 +533,15 @@ CHECKSUMS
net-protocol (0.2.2) sha256=aa73e0cba6a125369de9837b8d8ef82a61849360eba0521900e2c3713aa162a8 net-protocol (0.2.2) sha256=aa73e0cba6a125369de9837b8d8ef82a61849360eba0521900e2c3713aa162a8
net-smtp (0.5.0) sha256=5fc0415e6ea1cc0b3dfea7270438ec22b278ca8d524986a3ae4e5ae8d087b42a net-smtp (0.5.0) sha256=5fc0415e6ea1cc0b3dfea7270438ec22b278ca8d524986a3ae4e5ae8d087b42a
nio4r (2.7.4) sha256=d95dee68e0bb251b8ff90ac3423a511e3b784124e5db7ff5f4813a220ae73ca9 nio4r (2.7.4) sha256=d95dee68e0bb251b8ff90ac3423a511e3b784124e5db7ff5f4813a220ae73ca9
nokogiri (1.17.2-aarch64-linux) sha256=585c8cac6380848b7973bacfd0584628d116810e5f209db25e22d0c32313e681 nokogiri (1.18.1) sha256=df18be7e96c34736b6abfdeda80c6e845134fb9afe2fe5d4fbc1cf1f89c68475
nokogiri (1.17.2-arm-linux) sha256=3d033ad9b09d5b8a203f0f2156053e93a9327a9c7887c0ceb9fa78c71d27280d nokogiri (1.18.1-aarch64-linux-gnu) sha256=35837013800e34342fcbaca305f8c49231f6bd4f779bfa23fe7b4686ae82d5b8
nokogiri (1.17.2-arm64-darwin) sha256=0c5eb06ba1c112d33c2bb29973b07e2f21c4ddb66c67c9386fd97ff1c5d84686 nokogiri (1.18.1-arm-linux-gnu) sha256=3b873fd6b0cd1ad7c77e87af701075bdfd14c9a6b2f2965c5e00ed29a5627a37
nokogiri (1.17.2-x86-linux) sha256=8c4dd75e35810bdeb7c74943f383ca665baf6aed8fc2b78c1d305094a72794aa nokogiri (1.18.1-arm64-darwin) sha256=d75193f284c899d225943a8944479faedd995a7573ddd5c8308ffbdf2ec55204
nokogiri (1.17.2-x86_64-darwin) sha256=dc5977eb3416e1d501b22b0ed4737bf7604121491405865b887975eacfb3e896 nokogiri (1.18.1-x86_64-darwin) sha256=d94e3aa6483577495fc8969d6b4b5c075840ce6b1ab09636a6d4177ad171051d
nokogiri (1.17.2-x86_64-linux) sha256=e8614ae8d776bd9adb535ca814375e7ae05d7cfa6aa01909e561484f6d70be0b nokogiri (1.18.1-x86_64-linux-gnu) sha256=e516cf16ccde67ed4cc595a2621ca5ddd42562ecb24928914b0045a20a41620e
orm_adapter (0.5.0) sha256=aa5d0be5d540cbb46d3a93e88061f4ece6a25f6e97d6a47122beb84fe595e9b9 orm_adapter (0.5.0) sha256=aa5d0be5d540cbb46d3a93e88061f4ece6a25f6e97d6a47122beb84fe595e9b9
parallel (1.26.3) sha256=d86babb7a2b814be9f4b81587bf0b6ce2da7d45969fab24d8ae4bf2bb4d4c7ef parallel (1.26.3) sha256=d86babb7a2b814be9f4b81587bf0b6ce2da7d45969fab24d8ae4bf2bb4d4c7ef
parser (3.3.6.0) sha256=25d4e67cc4f0f7cab9a2ae1f38e2005b6904d2ea13c34734511d0faad038bc3b parser (3.3.7.0) sha256=7449011771e3e7881297859b849de26a6f4fccd515bece9520a87e7d2116119b
pg (1.5.9) sha256=761efbdf73b66516f0c26fcbe6515dc7500c3f0aa1a1b853feae245433c64fdc pg (1.5.9) sha256=761efbdf73b66516f0c26fcbe6515dc7500c3f0aa1a1b853feae245433c64fdc
pluck_to_hash (1.0.2) sha256=1599906239716f98262a41493dd7d4cb72e8d83ad3d76d666deacfc5de50a47e pluck_to_hash (1.0.2) sha256=1599906239716f98262a41493dd7d4cb72e8d83ad3d76d666deacfc5de50a47e
pry (0.15.2) sha256=12d54b8640d3fa29c9211dd4ffb08f3fd8bf7a4fd9b5a73ce5b59c8709385b6b pry (0.15.2) sha256=12d54b8640d3fa29c9211dd4ffb08f3fd8bf7a4fd9b5a73ce5b59c8709385b6b
@ -575,11 +578,11 @@ CHECKSUMS
rswag-api (2.16.0) sha256=b653f7bd92e98be18b01ab4525d88950d7b0960e293a99f856b9efcee3ae6074 rswag-api (2.16.0) sha256=b653f7bd92e98be18b01ab4525d88950d7b0960e293a99f856b9efcee3ae6074
rswag-specs (2.16.0) sha256=8ba26085c408b0bd2ed21dc8015c80f417c7d34c63720ab7133c2549b5bd2a91 rswag-specs (2.16.0) sha256=8ba26085c408b0bd2ed21dc8015c80f417c7d34c63720ab7133c2549b5bd2a91
rswag-ui (2.16.0) sha256=a1f49e927dceda92e6e6e7c1000f1e217ee66c565f69e28131dc98b33cd3a04f rswag-ui (2.16.0) sha256=a1f49e927dceda92e6e6e7c1000f1e217ee66c565f69e28131dc98b33cd3a04f
rubocop (1.70.0) sha256=96751f8440b36a0ac6e9a8ab596900803118d83d6b83f2037bf8b3d7a5bc440e rubocop (1.71.0) sha256=e19679efd447346ac476122313d3788ae23c38214790bcf660e984c747608bf0
rubocop-ast (1.37.0) sha256=9513ac88aaf113d04b52912533ffe46475de1362d4aa41141b51b2455827c080 rubocop-ast (1.37.0) sha256=9513ac88aaf113d04b52912533ffe46475de1362d4aa41141b51b2455827c080
rubocop-factory_bot (2.26.1) sha256=8de13cd4edcee5ca800f255188167ecef8dbfc3d1fae9f15734e9d2e755392aa rubocop-factory_bot (2.26.1) sha256=8de13cd4edcee5ca800f255188167ecef8dbfc3d1fae9f15734e9d2e755392aa
rubocop-rails (2.28.0) sha256=4967bed9ea13e6dcab566fea4265a6dd0381db739b305e48930aba1282da2715 rubocop-rails (2.29.1) sha256=41c2fcf48d5d62f4a5f574d5f1c97bbaf4cba88ee367936c98b3422d047b17aa
rubocop-rspec (3.3.0) sha256=79e1b281a689044d1516fefbc52e2e6c06cd367c25ebeaf06a7a198e9071cd7d rubocop-rspec (3.4.0) sha256=8721c13b6a8c9530a7ac481cea9423022f946fcf72428bda8289f8b57e4d4885
rubocop-rspec_rails (2.30.0) sha256=888112e83f9d7ef7ad2397e9d69a0b9614a4bae24f072c399804a180f80c4c46 rubocop-rspec_rails (2.30.0) sha256=888112e83f9d7ef7ad2397e9d69a0b9614a4bae24f072c399804a180f80c4c46
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33 ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
rubytree (2.1.1) sha256=4925016356a81730e982f1f8c3b5f8da461f18906c77d238bad4c4ba896abd41 rubytree (2.1.1) sha256=4925016356a81730e982f1f8c3b5f8da461f18906c77d238bad4c4ba896abd41
@ -609,7 +612,7 @@ CHECKSUMS
zeitwerk (2.7.1) sha256=0945986050e4907140895378e74df1fe882a2271ed087cc6c6d6b00d415a2756 zeitwerk (2.7.1) sha256=0945986050e4907140895378e74df1fe882a2271ed087cc6c6d6b00d415a2756
RUBY VERSION RUBY VERSION
ruby 3.3.6p108 ruby 3.4.1p0
BUNDLED WITH BUNDLED WITH
2.6.1 2.6.1

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,9 +1,9 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true
class AffinitiesController < ApplicationController class AffinitiesController < ApplicationController
before_action :set_group before_action :set_group, except: :reset
def index def index
overridden = @group.affinities.each_with_object({}) do |affinity, acc| overridden = @group.affinities.each_with_object({}) do |affinity, acc|
@ -24,7 +24,7 @@ class AffinitiesController < ApplicationController
} }
end end
GroupAffinity.upsert_all(affinities) GroupAffinity.upsert_all(affinities, unique_by: :uindex_group_pair)
render json: {}, status: :ok render json: {}, status: :ok
rescue ActiveRecord::InvalidForeignKey rescue ActiveRecord::InvalidForeignKey
@ -34,11 +34,29 @@ class AffinitiesController < ApplicationController
end end
def default def default
hierarchy = AffinityGroupsHierarchy.new
for_each_group do |group_id| for_each_group do |group_id|
Tables::DiscomfortCalculator.cohesion_discomfort(id_a: @group.id, id_b: group_id).to_f hierarchy.default_discomfort(@group.id, group_id).to_f
end end
end end
def reset
hierarchy = AffinityGroupsHierarchy.new
affinities = Group.pluck(:id).combination(2).map do |(group_a_id, group_b_id)|
{
group_a_id:,
group_b_id:,
discomfort: hierarchy.default_discomfort(group_a_id, group_b_id).to_f
}
end
GroupAffinity.upsert_all(affinities, unique_by: :uindex_group_pair)
render json: {}, status: :ok
end
private private
def for_each_group def for_each_group

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true
@ -29,6 +29,6 @@ class ExpensesController < ApplicationController
private private
def expense_params def expense_params
params.require(:expense).permit(:name, :amount, :pricing_type) params.expect(expense: %i[name amount pricing_type])
end end
end end

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true
@ -30,6 +30,6 @@ class GuestsController < ApplicationController
private private
def guest_params def guest_params
params.require(:guest).permit(:name, :group_id, :status) params.expect(guest: %i[name group_id status])
end end
end end

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,10 +1,18 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true
class TablesArrangementsController < ApplicationController class TablesArrangementsController < ApplicationController
def index def index
render json: TablesArrangement.order(discomfort: :asc).limit(3).as_json(only: %i[id name discomfort]) current_digest = Tables::Distribution.digest(current_tenant)
render json: TablesArrangement
.order(valid: :desc)
.order(discomfort: :asc)
.select(:id, :name, :discomfort)
.select("digest = '#{current_digest}'::uuid as valid")
.limit(20)
.as_json(only: %i[id name discomfort valid])
end end
def show def show
@ -16,6 +24,12 @@ class TablesArrangementsController < ApplicationController
.then { |result| render json: { id: params[:id], tables: result } } .then { |result| render json: { id: params[:id], tables: result } }
end end
def create
TableSimulatorJob.perform_later(current_tenant.id)
render json: {}, status: :created
end
private private
def format(number:, guests:) def format(number:, guests:)

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true
@ -41,16 +41,5 @@ class Guest < ApplicationRecord
scope :potential, -> { where.not(status: %i[declined considered]) } scope :potential, -> { where.not(status: %i[declined considered]) }
after_destroy :recalculate_simulations
after_save :recalculate_simulations, if: :saved_change_to_status?
has_many :seats, dependent: :delete_all has_many :seats, dependent: :delete_all
private
def recalculate_simulations
TablesArrangement.delete_all
ActiveJob.perform_all_later(50.times.map { TableSimulatorJob.new(wedding_id) })
end
end end

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true
@ -7,6 +7,7 @@
# Table name: tables_arrangements # Table name: tables_arrangements
# #
# id :uuid not null, primary key # id :uuid not null, primary key
# digest :uuid not null
# discomfort :integer # discomfort :integer
# name :string not null # name :string not null
# created_at :datetime not null # created_at :datetime not null

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true
@ -19,4 +19,6 @@ class Wedding < ApplicationRecord
SLUG_REGEX = /[a-z\d-]+/ SLUG_REGEX = /[a-z\d-]+/
validates :slug, presence: true, uniqueness: true, format: { with: /\A#{SLUG_REGEX}\z/ } validates :slug, presence: true, uniqueness: true, format: { with: /\A#{SLUG_REGEX}\z/ }
has_many :guests, dependent: :delete_all
end end

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,9 +1,9 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true
class AffinityGroupsHierarchy < Array class AffinityGroupsHierarchy < Array
include Singleton DEFAULT_DISCOMFORT = 1
def initialize def initialize
super super
@ -14,6 +14,9 @@ class AffinityGroupsHierarchy < Array
hydrate(group) hydrate(group)
end end
discomforts
freeze
end end
def find(id) def find(id)
@ -35,8 +38,35 @@ class AffinityGroupsHierarchy < Array
@references[id_a].distance_to_common_ancestor(@references[id_b]) @references[id_a].distance_to_common_ancestor(@references[id_b])
end end
def discomfort(id_a, id_b)
return 0 if id_a == id_b
@discomforts[uuid_to_int(id_a) + uuid_to_int(id_b)] || DEFAULT_DISCOMFORT
end
def default_discomfort(id_a, id_b)
return 0 if id_a == id_b
dist = distance(id_a, id_b)
return DEFAULT_DISCOMFORT if dist.nil?
Rational(dist, dist + 1)
end
private private
def discomforts
@discomforts ||= GroupAffinity.pluck(:group_a_id, :group_b_id,
:discomfort).each_with_object({}) do |(id_a, id_b, discomfort), acc|
acc[uuid_to_int(id_a) + uuid_to_int(id_b)] = discomfort
end
end
def uuid_to_int(uuid)
uuid.gsub('-', '').hex
end
def hydrate(group) def hydrate(group)
group.children.each do |child| group.children.each do |child|
register_child(group.id, child.id) register_child(group.id, child.id)

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,22 +1,13 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true
module Tables module Tables
class DiscomfortCalculator class DiscomfortCalculator
class << self private attr_reader :table, :hierarchy
def cohesion_discomfort(id_a:, id_b:) def initialize(table:, hierarchy: AffinityGroupsHierarchy.new)
distance = AffinityGroupsHierarchy.instance.distance(id_a, id_b)
return 1 if distance.nil?
Rational(distance, distance + 1)
end
end
private attr_reader :table
def initialize(table:)
@table = table @table = table
@hierarchy = hierarchy
end end
def calculate def calculate
@ -57,7 +48,7 @@ module Tables
# #
def cohesion_discomfort def cohesion_discomfort
table.map(&:group_id).tally.to_a.combination(2).sum do |(a, count_a), (b, count_b)| table.map(&:group_id).tally.to_a.combination(2).sum do |(a, count_a), (b, count_b)|
count_a * count_b * self.class.cohesion_discomfort(id_a: a, id_b: b) count_a * count_b * hierarchy.discomfort(a, b)
end end
end end
end end

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true
@ -6,11 +6,18 @@ require_relative '../../extensions/tree_node_extension'
module Tables module Tables
class Distribution class Distribution
attr_accessor :tables, :min_per_table, :max_per_table class << self
def digest(wedding)
Digest::UUID.uuid_v5(wedding.id, wedding.guests.potential.order(:id).pluck(:id).join)
end
end
attr_accessor :tables, :min_per_table, :max_per_table, :hierarchy
def initialize(min_per_table:, max_per_table:) def initialize(min_per_table:, max_per_table:)
@min_per_table = min_per_table @min_per_table = min_per_table
@max_per_table = max_per_table @max_per_table = max_per_table
@hierarchy = AffinityGroupsHierarchy.new
@tables = [] @tables = []
end end
@ -33,12 +40,6 @@ module Tables
"#{@tables.count} tables, discomfort: #{discomfort}" "#{@tables.count} tables, discomfort: #{discomfort}"
end end
def pretty_print
@tables.map.with_index do |table, i|
"Table #{i + 1} (#{table.count} ppl): (#{local_discomfort(table)}) #{table.map(&:name).join(', ')}"
end.join("\n")
end
def deep_dup def deep_dup
self.class.new(min_per_table: @min_per_table, max_per_table: @max_per_table).tap do |new_distribution| self.class.new(min_per_table: @min_per_table, max_per_table: @max_per_table).tap do |new_distribution|
new_distribution.tables = @tables.map(&:dup) new_distribution.tables = @tables.map(&:dup)
@ -59,14 +60,17 @@ module Tables
Seat.insert_all!(records_to_store) Seat.insert_all!(records_to_store)
arrangement.update!(discomfort:) arrangement.update!(
discomfort:,
digest: self.class.digest(tables.first.first.wedding)
)
end end
end end
private private
def local_discomfort(table) def local_discomfort(table)
table.discomfort ||= DiscomfortCalculator.new(table:).calculate table.discomfort ||= DiscomfortCalculator.new(table:, hierarchy:).calculate
end end
end end
end end

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
<%# Copyright (C) 2024 Manuel Bustillo %> <%# Copyright (C) 2024-2025 LibreWeddingPlanner contributors %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>

View File

@ -1,3 +1,3 @@
<%# Copyright (C) 2024 Manuel Bustillo %> <%# Copyright (C) 2024-2025 LibreWeddingPlanner contributors %>
<%= yield %> <%= yield %>

View File

@ -1,4 +1,4 @@
<%# Copyright (C) 2024 Manuel Bustillo %> <%# Copyright (C) 2024-2025 LibreWeddingPlanner contributors %>
<p>Welcome <%= @email %>!</p> <p>Welcome <%= @email %>!</p>

View File

@ -1,4 +1,4 @@
<%# Copyright (C) 2024 Manuel Bustillo %> <%# Copyright (C) 2024-2025 LibreWeddingPlanner contributors %>
<p>Hello <%= @email %>!</p> <p>Hello <%= @email %>!</p>

View File

@ -1,4 +1,4 @@
<%# Copyright (C) 2024 Manuel Bustillo %> <%# Copyright (C) 2024-2025 LibreWeddingPlanner contributors %>
<p>Hello <%= @resource.email %>!</p> <p>Hello <%= @resource.email %>!</p>

View File

@ -1,4 +1,4 @@
<%# Copyright (C) 2024 Manuel Bustillo %> <%# Copyright (C) 2024-2025 LibreWeddingPlanner contributors %>
<p>Hello <%= @resource.email %>!</p> <p>Hello <%= @resource.email %>!</p>

View File

@ -1,4 +1,4 @@
<%# Copyright (C) 2024 Manuel Bustillo %> <%# Copyright (C) 2024-2025 LibreWeddingPlanner contributors %>
<p>Hello <%= @resource.email %>!</p> <p>Hello <%= @resource.email %>!</p>

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
require_relative 'boot' require_relative 'boot'

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# Load the Rails application. # Load the Rails application.
require_relative "application" require_relative "application"

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
require "active_support/core_ext/integer/time" require "active_support/core_ext/integer/time"

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
require "active_support/core_ext/integer/time" require "active_support/core_ext/integer/time"

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
require "active_support/core_ext/integer/time" require "active_support/core_ext/integer/time"

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# Pin npm packages by running ./bin/importmap # Pin npm packages by running ./bin/importmap

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
ActsAsTenant.configure do |config| ActsAsTenant.configure do |config|
config.require_tenant = !Rails.env.test? config.require_tenant = !Rails.env.test?

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
Chroma.define_palette :decreasing_saturation do Chroma.define_palette :decreasing_saturation do
spin(20).desaturate(40) spin(20).desaturate(40)

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# config/initializers/cors.rb # config/initializers/cors.rb

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
Rswag::Api.configure do |c| Rswag::Api.configure do |c|

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
Rswag::Ui.configure do |c| Rswag::Ui.configure do |c|

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
class Numeric class Numeric
def to_currency def to_currency

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# This configuration file will be evaluated by Puma. The top-level methods that # This configuration file will be evaluated by Puma. The top-level methods that
# are invoked here are part of Puma's configuration DSL. For more information # are invoked here are part of Puma's configuration DSL. For more information

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
Rails.application.routes.draw do Rails.application.routes.draw do
mount LetterOpenerWeb::Engine, at: "/letter_opener" if Rails.env.development? mount LetterOpenerWeb::Engine, at: "/letter_opener" if Rails.env.development?
@ -24,6 +24,7 @@ Rails.application.routes.draw do
end end
resources :groups, only: %i[index create update destroy] do resources :groups, only: %i[index create update destroy] do
post 'affinities/reset', to: 'affinities#reset', on: :collection
resources :affinities, only: %i[index] do resources :affinities, only: %i[index] do
put :bulk_update, on: :collection put :bulk_update, on: :collection
get :default, on: :collection get :default, on: :collection
@ -36,7 +37,7 @@ Rails.application.routes.draw do
resources :expenses, only: %i[index create update destroy] do resources :expenses, only: %i[index create update destroy] do
get :summary, on: :collection get :summary, on: :collection
end end
resources :tables_arrangements, only: %i[index show] resources :tables_arrangements, only: %i[index show create]
resources :summary, only: :index resources :summary, only: :index
root to: redirect("/%{slug}") root to: redirect("/%{slug}")

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
class CreateExpenses < ActiveRecord::Migration[7.1] class CreateExpenses < ActiveRecord::Migration[7.1]
def change def change

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
class CreateGuests < ActiveRecord::Migration[7.1] class CreateGuests < ActiveRecord::Migration[7.1]
def change def change

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
# frozen_string_literal: true # frozen_string_literal: true

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
class CreateTablesArrangements < ActiveRecord::Migration[7.1] class CreateTablesArrangements < ActiveRecord::Migration[7.1]
def change def change

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
class CreateSeats < ActiveRecord::Migration[7.1] class CreateSeats < ActiveRecord::Migration[7.1]
def change def change

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
class CreateGroups < ActiveRecord::Migration[7.1] class CreateGroups < ActiveRecord::Migration[7.1]
def change def change

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
class AddParentToGroup < ActiveRecord::Migration[7.1] class AddParentToGroup < ActiveRecord::Migration[7.1]
def change def change

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
class AddGroupToGuest < ActiveRecord::Migration[7.1] class AddGroupToGuest < ActiveRecord::Migration[7.1]
def change def change

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
class AddStatusToGuest < ActiveRecord::Migration[7.1] class AddStatusToGuest < ActiveRecord::Migration[7.1]
def change def change

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
class DropTaggableTables < ActiveRecord::Migration[7.2] class DropTaggableTables < ActiveRecord::Migration[7.2]
def change def change

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
class AddNameToTablesArrangements < ActiveRecord::Migration[7.2] class AddNameToTablesArrangements < ActiveRecord::Migration[7.2]
def change def change

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
class SolidQueueInstall < ActiveRecord::Migration[7.2] class SolidQueueInstall < ActiveRecord::Migration[7.2]
def change def change

View File

@ -1,4 +1,4 @@
# Copyright (C) 2024 Manuel Bustillo # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
class RemoveEmailFromGuests < ActiveRecord::Migration[7.2] class RemoveEmailFromGuests < ActiveRecord::Migration[7.2]
def change def change

Some files were not shown because too many files have changed in this diff Show More