Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby v3.3.0 #30

Merged
merged 2 commits into from
Jan 20, 2024
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
53 changes: 53 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: ruby

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
ruby-qa:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:15-alpine
ports: ["5432:5432"]
env:
POSTGRES_USER: kaching
POSTGRES_PASSWORD: kaching
LC_ALL: C.UTF-8
LANG: en_US.UTF-8
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
RACK_ENV: test
DATABASE_URL: localhost
DATABASE_USER: kaching
DATABASE_PASSWORD: kaching
DATABASE_NAME_SHARED: kaching_development

strategy:
fail-fast: false
matrix:
ruby: ["ruby-3.3"]
os: [macos-latest, ubuntu-latest]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Rubocop
run: bundle exec rubocop
18 changes: 18 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,21 @@
# where the inspected file is and continue its way up to the root directory.
#
# See https://docs.rubocop.org/rubocop/configuration

AllCops:
NewCops: enable
Exclude:
- "bin/**/*"
- "vendor/bundle/**/*"

Metrics/BlockLength:
Exclude:
- "app.rb"

Metrics/ClassLength:
Exclude:
- "app.rb"

Lint/UselessAssignment:
Exclude:
- "app.rb"
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby 3.2.2
ruby 3.3.0
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.2-slim-bullseye
FROM ruby:3.3-slim-bullseye

RUN apt-get update && apt-get install -y \
build-essential \
Expand Down
22 changes: 11 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
GIT
remote: https://github.com/simonneutert/ka-ching-client.git
revision: 6dc993a5416b51d50fe241f932c3f172124bd9e7
revision: 40fef1c1d5b2d59c303b7cf8e829a2bf403b9b08
branch: main
specs:
ka-ching-client (0.4.4)
ka-ching-client (0.5.2)
faraday (>= 2.7.10, < 2.9.0)
httpx (>= 0.22.4, < 1.3.0)

Expand All @@ -15,7 +15,7 @@ GEM
base64 (0.2.0)
benchmark (0.3.0)
coderay (1.1.3)
concurrent-ruby (1.2.2)
concurrent-ruby (1.2.3)
diff-lcs (1.5.0)
e2mmap (0.1.0)
faraday (2.8.1)
Expand All @@ -24,9 +24,9 @@ GEM
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.2)
htmlbeautifier (1.4.2)
http-2-next (1.0.2)
httpx (1.2.0)
http-2-next (>= 1.0.1)
http-2-next (1.0.3)
httpx (1.2.1)
http-2-next (>= 1.0.3)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.6)
Expand All @@ -40,15 +40,15 @@ GEM
mini_portile2 (2.8.5)
money (6.16.0)
i18n (>= 0.6.4, <= 2)
nokogiri (1.15.5)
nokogiri (1.16.0)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.15.5-arm64-darwin)
nokogiri (1.16.0-arm64-darwin)
racc (~> 1.4)
nokogiri (1.15.5-x86_64-linux)
nokogiri (1.16.0-x86_64-linux)
racc (~> 1.4)
parallel (1.24.0)
parser (3.3.0.3)
parser (3.3.0.4)
ast (~> 2.4.1)
racc
pry (0.14.2)
Expand Down Expand Up @@ -128,4 +128,4 @@ DEPENDENCIES
solargraph (~> 0.50.0)

BUNDLED WITH
2.4.20
2.5.5
2 changes: 1 addition & 1 deletion app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class App < Roda
year = r.params.fetch('year', Time.now.year).to_i
page = r.params.fetch('page', 1).to_i
per_page = r.params.fetch('per_page', 10).to_i

@auditlogs = client.v1.audit_logs.of_year(tenant_account_id:, year:)
@auditlogs.map! do |auditlog|
auditlog['realized_at'] = Time.parse(auditlog['environment_snapshot']['realized_at'])
Expand Down