Compare commits

...

17 Commits

Author SHA1 Message Date
f02a6b6a3d Merge pull request 'Allow updating the status of guests from unauthenticated sessions' (#280) from guest-update-from-invitation into main
All checks were successful
Run unit tests / rubocop (push) Has been skipped
Run unit tests / check-licenses (push) Has been skipped
Run unit tests / copyright_notice (push) Has been skipped
Run unit tests / unit_tests (push) Successful in 54s
Run unit tests / build-static-assets (push) Successful in 8m32s
Reviewed-on: #280
2025-06-12 21:26:00 +00:00
efb5cf64f5 Minor changes
All checks were successful
Run unit tests / rubocop (pull_request) Successful in 1m27s
Run unit tests / copyright_notice (pull_request) Successful in 2m45s
Run unit tests / check-licenses (pull_request) Successful in 2m46s
Run unit tests / unit_tests (pull_request) Successful in 4m26s
Run unit tests / build-static-assets (pull_request) Successful in 20m24s
2025-06-12 23:01:03 +02:00
9a99981f67 Allow updating the status of guests from unauthenticated sessions
Some checks failed
Run unit tests / rubocop (pull_request) Failing after 1m4s
Run unit tests / check-licenses (pull_request) Successful in 1m7s
Run unit tests / copyright_notice (pull_request) Successful in 1m38s
Run unit tests / unit_tests (pull_request) Successful in 3m57s
Run unit tests / build-static-assets (pull_request) Successful in 26m1s
2025-06-12 22:53:50 +02:00
9e9ee0c995 Merge pull request 'Define a new public endpoint to get information about an invitation' (#279) from invitations-show-endpoint into main
All checks were successful
Run unit tests / rubocop (push) Has been skipped
Run unit tests / check-licenses (push) Has been skipped
Run unit tests / copyright_notice (push) Has been skipped
Run unit tests / unit_tests (push) Successful in 56s
Run unit tests / build-static-assets (push) Successful in 8m15s
Reviewed-on: #279
2025-06-12 17:32:27 +00:00
82a39bce82 Define a new public endpoint to get information about an invitation
All checks were successful
Run unit tests / copyright_notice (pull_request) Successful in 40s
Run unit tests / rubocop (pull_request) Successful in 52s
Run unit tests / check-licenses (pull_request) Successful in 56s
Run unit tests / unit_tests (pull_request) Successful in 1m38s
Run unit tests / build-static-assets (pull_request) Successful in 8m29s
2025-06-12 19:21:53 +02:00
d953e7c4a2 Merge pull request 'Update dependency ruby to v3.4.3' (#254) from renovate/ruby-3.x into main
All checks were successful
Run unit tests / copyright_notice (push) Has been skipped
Run unit tests / rubocop (push) Has been skipped
Run unit tests / check-licenses (push) Has been skipped
Run unit tests / unit_tests (push) Successful in 52s
Run unit tests / build-static-assets (push) Successful in 17m25s
Reviewed-on: #254
2025-06-11 19:27:11 +00:00
4e4845a8c3 Merge pull request 'Build docker image in the main branch' (#277) from run-build into main
All checks were successful
Run unit tests / check-licenses (push) Has been skipped
Run unit tests / rubocop (push) Has been skipped
Run unit tests / copyright_notice (push) Has been skipped
Run unit tests / unit_tests (push) Successful in 2m30s
Run unit tests / build-static-assets (push) Successful in 17m0s
Reviewed-on: #277
2025-06-11 19:03:20 +00:00
60436caf5b Merge branch 'main' into renovate/ruby-3.x
All checks were successful
Run unit tests / copyright_notice (pull_request) Successful in 52s
Run unit tests / rubocop (pull_request) Successful in 1m28s
Run unit tests / check-licenses (pull_request) Successful in 1m27s
Run unit tests / unit_tests (pull_request) Successful in 2m34s
Run unit tests / build-static-assets (pull_request) Successful in 25m34s
2025-06-11 18:58:58 +00:00
7f4554d21a Build docker image in the main branch
All checks were successful
Run unit tests / rubocop (pull_request) Successful in 31s
Run unit tests / check-licenses (pull_request) Successful in 41s
Run unit tests / copyright_notice (pull_request) Successful in 42s
Run unit tests / unit_tests (pull_request) Successful in 1m13s
Run unit tests / build-static-assets (pull_request) Successful in 9m47s
2025-06-11 20:49:50 +02:00
509aca79bf Merge pull request 'Prevent PR jobs from running in the main branch' (#276) from avoid-checks-main into main
All checks were successful
Run unit tests / rubocop (push) Has been skipped
Run unit tests / copyright_notice (push) Has been skipped
Run unit tests / check-licenses (push) Has been skipped
Run unit tests / unit_tests (push) Successful in 56s
Run unit tests / build-static-assets (push) Has been skipped
Reviewed-on: #276
2025-06-11 17:20:39 +00:00
f3088470da Use latest version of v1 ruby-setup
All checks were successful
Run unit tests / rubocop (pull_request) Successful in 36s
Run unit tests / copyright_notice (pull_request) Successful in 50s
Run unit tests / check-licenses (pull_request) Successful in 1m12s
Run unit tests / unit_tests (pull_request) Successful in 1m27s
Run unit tests / build-static-assets (pull_request) Successful in 9m4s
2025-06-11 19:09:48 +02:00
b9770b7a9f Prevent PR jobs from running in the main branch
Some checks failed
Run unit tests / copyright_notice (pull_request) Successful in 44s
Run unit tests / check-licenses (pull_request) Failing after 52s
Run unit tests / rubocop (pull_request) Successful in 1m6s
Run unit tests / unit_tests (pull_request) Successful in 1m46s
Run unit tests / build-static-assets (pull_request) Has been skipped
2025-06-11 19:06:58 +02:00
Renovate Bot
2fe72a34e4 Update dependency rubocop to v1.76.1
Some checks failed
Run unit tests / check-licenses (pull_request) Successful in 1m50s
Run unit tests / rubocop (pull_request) Successful in 2m25s
Run unit tests / copyright_notice (pull_request) Successful in 2m52s
Run unit tests / unit_tests (pull_request) Successful in 5m46s
Run unit tests / build-static-assets (pull_request) Successful in 41m33s
Run unit tests / rubocop (push) Successful in 8m30s
Run unit tests / check-licenses (push) Failing after 1m23s
Run unit tests / copyright_notice (push) Successful in 1m40s
Run unit tests / unit_tests (push) Successful in 13m25s
Run unit tests / build-static-assets (push) Has been skipped
2025-06-10 02:05:32 +00:00
d1791e12c7 Merge pull request 'Do not require authentication to access the public website content' (#274) from public-access-website into main
Some checks failed
Run unit tests / rubocop (push) Failing after 30s
Run unit tests / check-licenses (push) Successful in 32s
Run unit tests / copyright_notice (push) Successful in 45s
Run unit tests / unit_tests (push) Successful in 1m27s
Run unit tests / build-static-assets (push) Has been skipped
Reviewed-on: #274
2025-06-09 06:35:59 +00:00
4efb912e38 Merge branch 'main' into renovate/ruby-3.x
Some checks failed
Run unit tests / check-licenses (pull_request) Failing after 1m6s
Run unit tests / rubocop (pull_request) Failing after 1m11s
Run unit tests / copyright_notice (pull_request) Successful in 2m47s
Run unit tests / unit_tests (pull_request) Failing after 3m3s
Run unit tests / build-static-assets (pull_request) Has been skipped
2025-06-01 18:03:21 +00:00
bf35ca5f6e Upgrade to ruby 3.4.3
Some checks failed
Run unit tests / rubocop (pull_request) Failing after 37s
Run unit tests / check-licenses (pull_request) Failing after 37s
Run unit tests / copyright_notice (pull_request) Successful in 1m3s
Run unit tests / unit_tests (pull_request) Failing after 1m24s
Run unit tests / build-static-assets (pull_request) Has been skipped
2025-04-25 07:39:13 +02:00
Renovate Bot
8cd4efc6f5 Update dependency ruby to v3.4.3
Some checks failed
Run unit tests / check-licenses (pull_request) Failing after 2m11s
Run unit tests / rubocop (pull_request) Failing after 2m22s
Run unit tests / copyright_notice (pull_request) Successful in 2m43s
Run unit tests / unit_tests (pull_request) Failing after 2m46s
Run unit tests / build-static-assets (pull_request) Has been skipped
2025-04-24 02:06:21 +00:00
9 changed files with 32 additions and 19 deletions

View File

@ -23,7 +23,7 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.head_ref }} # Checkout the actual branch, not the result if merged into the base
- uses: ruby/setup-ruby@v1.220.0
- uses: ruby/setup-ruby@v1
- run: bundle install
- &postgres_wait
name: Wait until Postgres is ready to accept connections
@ -65,26 +65,29 @@ jobs:
if: failure()
run: docker ps --filter network=$JOB_CONTAINER_NAME-$GITHUB_JOB-network --filter name=$JOB_CONTAINER_NAME-* --format "{{.ID}}" | xargs docker rm -f
rubocop:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: ruby/setup-ruby@v1.220.0
- uses: ruby/setup-ruby@v1
- run: bundle install
- run: bundle exec rubocop --force-exclusion --parallel
check-licenses:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: ruby/setup-ruby@v1.220.0
- uses: ruby/setup-ruby@v1
- name: Install project dependencies
run: bundle install --jobs `getconf _NPROCESSORS_ONLN`
- name: Run license finder
run: license_finder
copyright_notice:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@ -121,9 +124,6 @@ jobs:
timeout-minutes: 30
needs:
- unit_tests
- rubocop
- check-licenses
- copyright_notice
steps:
- uses: actions/checkout@v4
with:

View File

@ -1 +1 @@
ruby-3.4.2
ruby-3.4.3

View File

@ -1,7 +1,7 @@
# syntax = docker/dockerfile:1
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
ARG RUBY_VERSION=3.4.2
ARG RUBY_VERSION=3.4.3
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim AS base
# Rails app lives here

View File

@ -1,7 +1,7 @@
# syntax = docker/dockerfile:1
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
ARG RUBY_VERSION=3.4.2
ARG RUBY_VERSION=3.4.3
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base
# Rails app lives here

View File

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

View File

@ -339,7 +339,7 @@ GEM
rswag-ui (2.16.0)
actionpack (>= 5.2, < 8.1)
railties (>= 5.2, < 8.1)
rubocop (1.76.0)
rubocop (1.76.1)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
@ -350,7 +350,7 @@ GEM
rubocop-ast (>= 1.45.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.45.0)
rubocop-ast (1.45.1)
parser (>= 3.3.7.2)
prism (~> 1.4)
rubocop-factory_bot (2.27.1)
@ -600,8 +600,8 @@ CHECKSUMS
rswag-api (2.16.0) sha256=b653f7bd92e98be18b01ab4525d88950d7b0960e293a99f856b9efcee3ae6074
rswag-specs (2.16.0) sha256=8ba26085c408b0bd2ed21dc8015c80f417c7d34c63720ab7133c2549b5bd2a91
rswag-ui (2.16.0) sha256=a1f49e927dceda92e6e6e7c1000f1e217ee66c565f69e28131dc98b33cd3a04f
rubocop (1.76.0) sha256=b7515398e1280b3cb7e3e0c429933ca3597ea43b7d0f03cb3c2d97719851c411
rubocop-ast (1.45.0) sha256=0b4ade77d15f25b9e07214fb42fa98164f5316accea525e14e44bbb8f06f78d7
rubocop (1.76.1) sha256=e15a2d750794cf2157d2de8b1b403dfa71b8dc3957a22ae6043b1bdf21e7e0e7
rubocop-ast (1.45.1) sha256=94042e49adc17f187ba037b33f941ba7398fede77cdf4bffafba95190a473a3e
rubocop-factory_bot (2.27.1) sha256=9d744b5916778c1848e5fe6777cc69855bd96548853554ec239ba9961b8573fe
rubocop-rails (2.32.0) sha256=9fcc623c8722fe71e835e99c4a18b740b5b0d3fb69915d7f0777f00794b30490
rubocop-rspec (3.6.0) sha256=c0e4205871776727e54dee9cc91af5fd74578001551ba40e1fe1a1ab4b404479
@ -634,7 +634,7 @@ CHECKSUMS
zeitwerk (2.7.3) sha256=b2e86b4a9b57d26ba68a15230dcc7fe6f040f06831ce64417b0621ad96ba3e85
RUBY VERSION
ruby 3.4.2p28
ruby 3.4.3p32
BUNDLED WITH
2.6.1

View File

@ -6,6 +6,9 @@ require 'csv'
class GuestsController < ApplicationController
GUEST_PARAMS = { only: %i[id name status], include: { group: { only: %i[id name] } } }.freeze
skip_before_action :authenticate_user!, only: :update
def index
render json: Guest.includes(:group)
.left_joins(:group)
@ -31,6 +34,6 @@ class GuestsController < ApplicationController
private
def guest_params
params.expect(guest: %i[name group_id status])
user_signed_in? ? params.expect(guest: %i[name group_id status]) : params.expect(guest: %i[status])
end
end

View File

@ -2,9 +2,9 @@
# frozen_string_literal: true
# Copyright (C) 2024-2025 LibreWeddingPlanner contributors
class InvitationsController < ApplicationController
skip_before_action :authenticate_user!, only: :show
def index
render json: Invitation.includes(:guests).as_json(
only: :id,
@ -16,6 +16,16 @@ class InvitationsController < ApplicationController
)
end
def show
invitation = Invitation.includes(:guests).find(params[:id])
if invitation
render json: invitation, only: :id, include: { guests: { only: %i[id name status] } }, status: :ok
else
render json: { error: 'Invitation not found' }, status: :not_found
end
end
def create
invitation = Invitation.create

View File

@ -42,7 +42,7 @@ Rails.application.routes.draw do
resources :tables_arrangements, only: %i[index show create]
resources :summary, only: :index
resources :invitations, only: %i[index create update destroy]
resources :invitations, only: %i[show index create update destroy]
root to: redirect("/%{slug}")
end