Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
version: 1.0

- name: "Checkout code"
uses: actions/checkout@v1
uses: actions/checkout@v6

- name: "Install Ruby"
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 3.4.7
ruby-version: 3.4.9

- name: "Run Rubocop"
env:
Expand All @@ -43,7 +43,7 @@ jobs:

services:
postgres:
image: postgres:15.5-alpine
image: postgres:18.3-alpine
ports: ["5432:5432"]
env:
POSTGRES_USER: postgres
Expand All @@ -67,13 +67,13 @@ jobs:
version: 1.0

- name: "Checkout code"
uses: actions/checkout@v1
uses: actions/checkout@v6

- name: "Install Ruby"
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 3.4.7
ruby-version: 3.4.9

- name: "Run API specs"
env:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- release

jobs:
deploy:
Expand All @@ -19,6 +20,9 @@ jobs:
registry.digitalocean.com/meru/meru-api
tags: |-
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=release,enable=${{ github.ref == 'refs/heads/release' }}
labels: |-
service=meru-api
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Install doctl
Expand Down
93 changes: 82 additions & 11 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ AllCops:
- "tmp/**/*"
- "vendor/**/*"
SuggestExtensions: false
TargetRailsVersion: 7.2
TargetRailsVersion: 8.1
TargetRubyVersion: 3.4

Bundler/OrderedGems:
Expand Down Expand Up @@ -118,10 +118,10 @@ Layout/LineLength:
Layout/MultilineMethodCallBraceLayout:
Enabled: false

Layout/MultilineOperationIndentation:
Layout/MultilineMethodCallIndentation:
Enabled: false

Layout/MultilineMethodCallIndentation:
Layout/MultilineOperationIndentation:
Enabled: false

Layout/SpaceAroundOperators:
Expand Down Expand Up @@ -162,6 +162,9 @@ Lint/ConstantReassignment:
Lint/CopDirectiveSyntax:
Enabled: true

Lint/DataDefineOverride:
Enabled: true

Lint/DeprecatedConstants:
Enabled: true

Expand Down Expand Up @@ -270,6 +273,9 @@ Lint/UnexpectedBlockArity:
Lint/UnmodifiedReduceAccumulator:
Enabled: true

Lint/UnreachablePatternBranch:
Enabled: true

Lint/UnusedBlockArgument:
Enabled: false

Expand Down Expand Up @@ -359,10 +365,10 @@ Naming/ConstantName:
Naming/MemoizedInstanceVariableName:
Enabled: false

Naming/MethodParameterName:
Naming/MethodName:
Enabled: false

Naming/MethodName:
Naming/MethodParameterName:
Enabled: false

Naming/PredicateMethod:
Expand Down Expand Up @@ -457,13 +463,19 @@ Rails/FilePath:
Rails/FindById:
Enabled: true

Rails/FindByOrAssignmentMemoization:
Enabled: true

# False positives with other APIs that include a `where(...).each` paradigm.
Rails/FindEach:
Enabled: false

Rails/FreezeTime:
Enabled: true

Rails/HttpStatusNameConsistency:
Enabled: true

Rails/I18nLazyLookup:
Enabled: true

Expand Down Expand Up @@ -494,6 +506,9 @@ Rails/MultipleRoutePaths:
Rails/NegateInclude:
Enabled: false

Rails/OrderArguments:
Enabled: true

Rails/Output:
Exclude:
- "lib/tasks/**/*.rake"
Expand All @@ -511,6 +526,9 @@ Rails/Pluck:
Rails/PluckInWhere:
Enabled: false

Rails/RedirectBackOrTo:
Enabled: true

Rails/RedundantActiveRecordAllMethod:
Enabled: false

Expand Down Expand Up @@ -673,6 +691,9 @@ RSpec/InstanceVariable:
RSpec/LeadingSubject:
Enabled: false

RSpec/LeakyLocalVariable:
Enabled: true

RSpec/LetSetup:
Enabled: false

Expand Down Expand Up @@ -790,6 +811,9 @@ Style/ArgumentsForwarding:
Style/ArrayIntersect:
Enabled: true

Style/ArrayIntersectWithSingleElement:
Enabled: true

Style/ArrayJoin:
Enabled: false

Expand Down Expand Up @@ -850,6 +874,9 @@ Style/DocumentDynamicEvalDefinition:
Style/DoubleNegation:
Enabled: false

Style/EmptyClassDefinition:
Enabled: true

Style/EmptyHeredoc:
Enabled: false

Expand Down Expand Up @@ -880,6 +907,9 @@ Style/FileEmpty:
Style/FileNull:
Enabled: true

Style/FileOpen:
Enabled: true

Style/FileRead:
Enabled: true

Expand Down Expand Up @@ -917,12 +947,12 @@ Style/HashFetchChain:
Style/HashSlice:
Enabled: true

Style/IfWithBooleanLiteralBranches:
Enabled: true

Style/IfUnlessModifier:
Enabled: false

Style/IfWithBooleanLiteralBranches:
Enabled: true

Style/InPatternThen:
Enabled: true

Expand Down Expand Up @@ -950,6 +980,9 @@ Style/MapCompactWithConditionalBlock:
Style/MapIntoArray:
Enabled: true

Style/MapJoin:
Enabled: true

Style/MapToHash:
Enabled: true

Expand All @@ -959,6 +992,9 @@ Style/MapToSet:
Style/MinMaxComparison:
Enabled: true

Style/ModuleMemberExistenceCheck:
Enabled: true

Style/MultilineBlockChain:
Enabled: false

Expand All @@ -971,6 +1007,9 @@ Style/MultilineInPatternThen:
Style/NegatedIfElseCondition:
Enabled: true

Style/NegativeArrayIndex:
Enabled: true

Style/NestedFileDirname:
Enabled: true

Expand All @@ -992,28 +1031,42 @@ Style/NumericPredicate:
Style/ObjectThen:
Enabled: true

Style/OneClassPerFile:
Enabled: true
Exclude:
- "config/**/*.rb"

Style/OpenStructUse:
Enabled: true

Style/OperatorMethodCall:
Enabled: true

Style/QuotedSymbols:
Enabled: false

Style/ParallelAssignment:
Enabled: false

Style/PartitionInsteadOfDoubleSelect:
Enabled: true

Style/PercentLiteralDelimiters:
Enabled: false

Style/PredicateWithKind:
Enabled: true

# This clobbers unexpected method calls
Style/PreferredHashMethods:
Enabled: false

Style/QuotedSymbols:
Enabled: false

Style/RaiseArgs:
Enabled: false

Style/ReduceToHash:
Enabled: true

Style/RedundantArgument:
Enabled: true

Expand Down Expand Up @@ -1059,6 +1112,9 @@ Style/RedundantInterpolationUnfreeze:
Style/RedundantLineContinuation:
Enabled: true

Style/RedundantMinMaxBy:
Enabled: true

Style/RedundantParentheses:
Enabled: false

Expand All @@ -1077,6 +1133,9 @@ Style/RedundantSelfAssignmentBranch:
Style/RedundantStringEscape:
Enabled: true

Style/RedundantStructKeywordInit:
Enabled: true

Style/RescueModifier:
Enabled: true
Exclude:
Expand All @@ -1085,9 +1144,18 @@ Style/RescueModifier:
Style/ReturnNilInPredicateMethodDefinition:
Enabled: true

Style/ReverseFind:
Enabled: true

Style/SafeNavigationChainLength:
Enabled: false

Style/SelectByKind:
Enabled: true

Style/SelectByRange:
Enabled: true

Style/SelectByRegexp:
Enabled: true

Expand Down Expand Up @@ -1124,6 +1192,9 @@ Style/SymbolArray:
Style/SymbolProc:
Enabled: false

Style/TallyMethod:
Enabled: true

Style/TrailingCommaInArguments:
Enabled: false

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN --mount=type=secret,id=maxmind_account_id \
GEOIPUPDATE_LICENSE_KEY_FILE=/run/secrets/maxmind_license_key \
/usr/bin/geoipupdate

FROM ruby:3.4.7-bookworm
FROM ruby:3.4.9-bookworm

ENV DEBIAN_FRONTEND=noninteractive

Expand All @@ -31,9 +31,9 @@ RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \

RUN /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y

RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends postgresql-client-15
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends postgresql-client-18

RUN gem update --system && gem install bundler:2.7.2
RUN gem update --system && gem install bundler:4.0.8

ENV BUNDLE_PATH=/bundle \
BUNDLE_BIN=/bundle/bin \
Expand Down
Loading
Loading