Compare commits
4 Commits
4081600dce
...
da02f37069
Author | SHA1 | Date | |
---|---|---|---|
da02f37069 | |||
006b1893c1 | |||
![]() |
fcb1e77a3a | ||
9f7f99f3f4 |
@ -24,7 +24,6 @@ jobs:
|
|||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- uses: ruby/setup-ruby@v1.207.0
|
- uses: ruby/setup-ruby@v1.207.0
|
||||||
- run: bundle install
|
- run: bundle install
|
||||||
- run: bundle exec rubocop --force-exclusion --parallel
|
|
||||||
- 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
|
||||||
@ -42,3 +41,12 @@ jobs:
|
|||||||
- 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
|
@ -329,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)
|
||||||
@ -578,7 +578,7 @@ 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.29.0) sha256=35bffd140c80671453aafac0e2d5ab5b3dd65736a3fc8f3936ccca226b89c234
|
rubocop-rails (2.29.0) sha256=35bffd140c80671453aafac0e2d5ab5b3dd65736a3fc8f3936ccca226b89c234
|
||||||
|
@ -17,7 +17,7 @@ class AffinityGroupsHierarchy < Array
|
|||||||
hydrate(group)
|
hydrate(group)
|
||||||
end
|
end
|
||||||
|
|
||||||
load_discomforts
|
discomforts
|
||||||
freeze
|
freeze
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -58,9 +58,9 @@ class AffinityGroupsHierarchy < Array
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def load_discomforts
|
def discomforts
|
||||||
@load_discomforts ||= GroupAffinity.pluck(:group_a_id, :group_b_id,
|
@discomforts ||= GroupAffinity.pluck(:group_a_id, :group_b_id,
|
||||||
:discomfort).each_with_object({}) do |(id_a, id_b, discomfort), acc|
|
:discomfort).each_with_object({}) do |(id_a, id_b, discomfort), acc|
|
||||||
acc[uuid_to_int(id_a) + uuid_to_int(id_b)] = discomfort
|
acc[uuid_to_int(id_a) + uuid_to_int(id_b)] = discomfort
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user