Skip to content

Commit

Permalink
Ruby 3.2.1, bundle update (Sidekiq 7) (#186)
Browse files Browse the repository at this point in the history
* Minor fixes, yarn upgrade
* Rspec, rubocop fixes
* Cleanup wallboard.js
* Add redis-server to travis.yml
* Add brakeman.ignore
* Update brakeman github action
* Add Woke github action
* Use Redis for websockets in development
* Bundle update (Sidekiq 7)
* Upgrade Ruby to 3.2.1
  • Loading branch information
jcraigk authored Mar 4, 2023
1 parent 02e9d0c commit 483b683
Show file tree
Hide file tree
Showing 61 changed files with 2,288 additions and 2,511 deletions.
46 changes: 0 additions & 46 deletions .github/workflows/brakeman-analysis.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/brakeman.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Brakeman Scan
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
brakeman-scan:
name: Brakeman Scan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.1'
- name: Setup Brakeman
env:
BRAKEMAN_VERSION: '5.4.0'
run: |
gem install brakeman --version $BRAKEMAN_VERSION
- name: Scan
continue-on-error: true
run: |
brakeman -f sarif -o output.sarif.json .
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: output.sarif.json
17 changes: 17 additions & 0 deletions .github/workflows/woke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Woke
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
woke:
name: woke
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: woke
uses: get-woke/woke-action@v0
with:
fail-on-error: true
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
!public/assets/static
.bundle
.DS_Store
.env
Expand All @@ -12,6 +11,7 @@ log
node_modules
public/assets-test
public/assets/*
!public/assets/static
tmp
yarn-debug.log*
yarn-error.log
4 changes: 3 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
inherit_from: .rubocop_todo.yml

require:
- rubocop-performance
- rubocop-rails
Expand All @@ -10,7 +12,7 @@ AllCops:
- node_modules/**/*
- vendor/**/*
NewCops: enable
TargetRubyVersion: 3.1.2
TargetRubyVersion: 3.2.1
Layout/EmptyLineAfterGuardClause:
Enabled: false
Layout/EmptyLineAfterMagicComment:
Expand Down
30 changes: 30 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This configuration was generated by
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 1000`
# on 2023-01-16 20:02:50 UTC using RuboCop version 1.43.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 33
RSpec/PendingWithoutReason:
Exclude:
- 'spec/controllers/hooks/base_controller_spec.rb'
- 'spec/controllers/oauth/slack_controller_spec.rb'
- 'spec/models/concerns/profile_decorator_spec.rb'
- 'spec/models/reward_spec.rb'
- 'spec/models/team_spec.rb'
- 'spec/services/actions/message_spec.rb'
- 'spec/services/actions/reaction_added_spec.rb'
- 'spec/services/bonus_calculator_service_spec.rb'
- 'spec/services/commands/help_spec.rb'
- 'spec/services/commands/leaderboard_spec.rb'
- 'spec/services/commands/undo_spec.rb'
- 'spec/services/discord/post_service_spec.rb'
- 'spec/services/discord/team_sync_service_spec.rb'
- 'spec/services/mention_parser_spec.rb'
- 'spec/services/note_sanitizer_spec.rb'
- 'spec/services/slack/post_service_spec.rb'
- 'spec/services/tip_histogram_service_spec.rb'
- 'spec/services/tip_mention_service_spec.rb'
- 'spec/services/tip_response_service_spec.rb'
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.2
3.2.1
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
dist: focal
language: ruby
rvm:
- 3.1.2
- 3.2.1
cache: bundler
notifications:
email: false
services:
- redis-server
- postgresql
- redis-server
addons:
postgresql: '12'
postgresql: '13'
apt:
update: true
packages:
- postgresql-12
- postgresql-13
env:
global:
- PGUSER=postgres
Expand All @@ -27,6 +27,7 @@ before_install:
- psql -c 'create database kudochest_test;' -U postgres
- gem update --system --no-document
- gem install bundler --no-document
install: bundle install
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.1.2-slim
FROM ruby:3.2.1-slim

ARG APP_NAME=kudochest

Expand All @@ -18,7 +18,8 @@ RUN apt-get update -qq && \
npm \
postgresql-client \
python2 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*;
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*;

COPY lib/image_magick/policy.xml /etc/ImageMagick-6/policy.xml
RUN mkdir -p /storage/response_images/cache
Expand Down
5 changes: 1 addition & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.1.2'
ruby '3.2.1'

gem 'awesome_print'
gem 'aws-sdk-s3'
Expand All @@ -22,7 +22,6 @@ gem 'pg'
gem 'puma'
gem 'pundit'
gem 'rails'
gem 'redis'
gem 'rmagick'
gem 'sass-rails'
gem 'sidekiq'
Expand All @@ -39,7 +38,6 @@ group :production do
end

group :development do
gem 'colorize'
gem 'rubocop'
gem 'rubocop-performance'
gem 'rubocop-rails'
Expand All @@ -51,7 +49,6 @@ group :development, :test do
gem 'dotenv-rails'
gem 'factory_bot_rails'
gem 'faker'
gem 'pry-rails'
gem 'webmock'
end

Expand Down
Loading

0 comments on commit 483b683

Please sign in to comment.