diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 16e72bb..1118afa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,10 +3,13 @@ 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: diff --git a/.github/workflows/copyright_notice.yml b/.github/workflows/copyright_notice.yml index c97e035..35d8b8d 100644 --- a/.github/workflows/copyright_notice.yml +++ b/.github/workflows/copyright_notice.yml @@ -3,6 +3,9 @@ on: pull_request: permissions: contents: write +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true jobs: copyright_notice: runs-on: ubuntu-latest diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e4d4fec..9f2572f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,6 +4,9 @@ on: branches: - main pull_request: +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true jobs: unit_tests: runs-on: ubuntu-latest diff --git a/app/serializers/serializable_guest.rb b/app/serializers/serializable_guest.rb index b8d9347..d711d03 100644 --- a/app/serializers/serializable_guest.rb +++ b/app/serializers/serializable_guest.rb @@ -3,7 +3,7 @@ class SerializableGuest < JSONAPI::Serializable::Resource type 'guest' - attributes :id, :email, :group_id, :status + attributes :id, :group_id, :status attribute :name do "#{@object.first_name} #{@object.last_name}" diff --git a/db/migrate/20241103093955_remove_email_from_guests.rb b/db/migrate/20241103093955_remove_email_from_guests.rb new file mode 100644 index 0000000..26ca939 --- /dev/null +++ b/db/migrate/20241103093955_remove_email_from_guests.rb @@ -0,0 +1,7 @@ +# Copyright (C) 2024 Manuel Bustillo + +class RemoveEmailFromGuests < ActiveRecord::Migration[7.2] + def change + remove_column :guests, :email, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index c4f1c20..a300416 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -12,7 +12,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.2].define(version: 2024_11_03_075705) do +ActiveRecord::Schema[7.2].define(version: 2024_11_03_093955) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -42,7 +42,6 @@ ActiveRecord::Schema[7.2].define(version: 2024_11_03_075705) do create_table "guests", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "first_name" t.string "last_name" - t.string "email" t.string "phone" t.datetime "created_at", null: false t.datetime "updated_at", null: false diff --git a/db/seeds.rb b/db/seeds.rb index 71b2a31..ec78d0c 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -58,7 +58,6 @@ NUMBER_OF_GUESTS.times do Guest.create!( first_name: Faker::Name.first_name, last_name: Faker::Name.last_name, - email: Faker::Internet.email, phone: Faker::PhoneNumber.cell_phone, group: groups.sample, status: Guest.statuses.keys.sample diff --git a/spec/factories/guest.rb b/spec/factories/guest.rb index 688cdea..2637fb4 100644 --- a/spec/factories/guest.rb +++ b/spec/factories/guest.rb @@ -6,7 +6,6 @@ FactoryBot.define do first_name { Faker::Name.first_name } last_name { Faker::Name.last_name } - email { Faker::Internet.email } phone { Faker::PhoneNumber.cell_phone } end end