Skip to content

Commit

Permalink
General upgrade & shakapacker v5.0.0 (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
brand-it authored Oct 4, 2024
1 parent 47893ba commit 6901d4d
Show file tree
Hide file tree
Showing 52 changed files with 7,096 additions and 3,058 deletions.
1 change: 0 additions & 1 deletion .browserslistrc

This file was deleted.

25 changes: 18 additions & 7 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,28 @@ jobs:
bundler-cache: true
- uses: actions/setup-node@v4
with:
node-version: 22.3.0
- name: Find yarn cache location
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
node-version: 22.9.0
- name: Find npm cache location
id: npm-cache
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
- name: JS package cache
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: npm list
- name: Install dependencies
run: npm install
- name: Run tests
run: bundle exec rspec --format RSpec::Github::Formatter --format progress

Expand Down
9 changes: 7 additions & 2 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config --exclude-limit 1000`
# on 2024-09-18 02:30:06 UTC using RuboCop version 1.66.1.
# on 2024-10-04 16:12:21 UTC using RuboCop version 1.66.1.
# 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
Expand Down Expand Up @@ -33,7 +33,7 @@ Metrics/ClassLength:
Metrics/CyclomaticComplexity:
Max: 20

# Offense count: 15
# Offense count: 17
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
Metrics/MethodLength:
Max: 25
Expand All @@ -53,6 +53,11 @@ Metrics/ParameterLists:
Metrics/PerceivedComplexity:
Max: 20

# Offense count: 1
Naming/ConstantName:
Exclude:
- 'app/models/config/serializer.rb'

# Offense count: 2
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
Expand Down
5 changes: 2 additions & 3 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
ruby 3.3.3
nodejs 22.3.0
yarn 1.22.22
ruby 3.3.4
nodejs 22.9.0
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.3.3'
ruby '3.3.4'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'bootsnap', require: false
Expand All @@ -24,6 +24,7 @@ gem 'puma', git: 'https://github.com/puma/puma'
gem 'rails'
gem 'rainbow'
gem 'sass-rails'
gem 'shakapacker'
gem 'simple_form'
gem 'slack-notifier'
gem 'sprockets-rails'
Expand All @@ -40,7 +41,6 @@ group :development, :test do
gem 'awesome_print'
gem 'factory_bot_rails'
gem 'faker'
gem 'pry'
gem 'rspec-github', require: false
gem 'rspec-rails'
gem 'rubocop', require: false
Expand Down
65 changes: 36 additions & 29 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
GIT
remote: https://github.com/puma/puma
revision: 796d8c6af139a22e29e57e156c05c66ed3082634
revision: 5a8e48570b8c3c64efce75c62c06915f6fdae3f9
specs:
puma (6.4.2)
puma (6.4.3)
nio4r (~> 2.0)

GEM
Expand Down Expand Up @@ -108,7 +108,6 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
coderay (1.1.3)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
crack (1.0.0)
Expand Down Expand Up @@ -150,8 +149,9 @@ GEM
railties (>= 5.0.0)
faker (3.4.2)
i18n (>= 1.8.11, < 2)
faraday (2.11.0)
faraday (2.12.0)
faraday-net_http (>= 2.0, < 3.4)
json
logger
faraday-net_http (3.3.0)
net-http
Expand All @@ -164,14 +164,14 @@ GEM
rails (>= 6.0.0)
stimulus-rails
turbo-rails
i18n (1.14.5)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
io-console (0.7.2)
irb (1.14.0)
irb (1.14.1)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
jbuilder (2.12.0)
jbuilder (2.13.0)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
jsbundling-rails (1.3.1)
Expand Down Expand Up @@ -204,13 +204,13 @@ GEM
net-smtp
marcel (1.0.4)
matrix (0.4.2)
memory_profiler (1.0.2)
memory_profiler (1.1.0)
method_source (1.1.0)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
minitest (5.25.1)
msgpack (1.7.2)
net-ftp (0.3.7)
msgpack (1.7.3)
net-ftp (0.3.8)
net-protocol
time
net-http (0.4.1)
Expand All @@ -219,6 +219,7 @@ GEM
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.5.0)
Expand All @@ -230,23 +231,23 @@ GEM
observer (0.1.2)
optimist (3.1.0)
os (1.1.4)
package_json (0.1.0)
parallel (1.26.3)
parser (3.3.5.0)
ast (~> 2.4.1)
racc
patience_diff (1.2.0)
optimist (~> 3.0)
progressbar (1.13.0)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
psych (5.1.2)
stringio
public_suffix (6.0.1)
racc (1.8.1)
rack (3.1.7)
rack-mini-profiler (3.3.1)
rack (>= 1.2.0)
rack-proxy (0.7.7)
rack
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
Expand Down Expand Up @@ -293,15 +294,15 @@ GEM
regexp_parser (2.9.2)
reline (0.5.10)
io-console (~> 0.5)
rexml (3.3.7)
rexml (3.3.8)
rspec-core (3.13.1)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.2)
rspec-expectations (3.13.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-github (2.4.0)
rspec-core (~> 3.0)
rspec-mocks (3.13.1)
rspec-mocks (3.13.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-rails (7.0.1)
Expand Down Expand Up @@ -337,12 +338,12 @@ GEM
rubocop-rspec_rails (>= 2.30.0)
rubocop-factory_bot (2.26.1)
rubocop (~> 1.61)
rubocop-rails (2.26.0)
rubocop-rails (2.26.2)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.52.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (3.0.4)
rubocop-rspec (3.1.0)
rubocop (~> 1.61)
rubocop-rspec_rails (2.30.0)
rubocop (~> 1.61)
Expand All @@ -364,6 +365,13 @@ GEM
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
semantic_range (3.0.0)
shakapacker (8.0.2)
activesupport (>= 5.2)
package_json
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)
shoulda-matchers (6.4.0)
activesupport (>= 5.2.0)
simple_form (5.3.1)
Expand All @@ -384,11 +392,11 @@ GEM
stimulus-rails (1.3.4)
railties (>= 6.0.0)
stringio (3.1.1)
super_diff (0.12.1)
super_diff (0.13.0)
attr_extras (>= 6.2.4)
diff-lcs
patience_diff
sys-filesystem (1.5.0)
sys-filesystem (1.5.3)
ffi (~> 1.1)
text (1.3.1)
thor (1.3.2)
Expand All @@ -398,18 +406,17 @@ GEM
date
timecop (0.9.10)
timeout (0.4.1)
turbo-rails (2.0.6)
turbo-rails (2.0.10)
actionpack (>= 6.0.0)
activejob (>= 6.0.0)
railties (>= 6.0.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
unicode-display_width (2.6.0)
uri (0.13.1)
useragent (0.16.10)
vcr (6.3.1)
base64
view_component (3.14.0)
view_component (3.16.0)
activesupport (>= 5.2.0, < 8.0)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
Expand All @@ -422,11 +429,11 @@ GEM
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (~> 4.0, < 4.11)
webmock (3.23.1)
webmock (3.24.0)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webrick (1.8.1)
webrick (1.8.2)
websocket (1.2.11)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
Expand Down Expand Up @@ -463,7 +470,6 @@ DEPENDENCIES
net-ftp
os
progressbar
pry
puma!
rack-mini-profiler
rails
Expand All @@ -479,6 +485,7 @@ DEPENDENCIES
rubocop-rspec_rails
sass-rails
selenium-webdriver
shakapacker
shoulda-matchers
simple_form
slack-notifier
Expand All @@ -500,7 +507,7 @@ DEPENDENCIES
workflow

RUBY VERSION
ruby 3.3.3p89
ruby 3.3.4p94

BUNDLED WITH
2.5.11
2.5.21
2 changes: 1 addition & 1 deletion Procfile.dev
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
web: bin/rails server
js: yarn build --watch
shakapacker: bin/shakapacker-dev-server
Empty file removed app/assets/builds/.keep
Empty file.
1 change: 0 additions & 1 deletion app/assets/config/manifest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//= link_tree ../builds
//= link_tree ../images

//= link application.css
3 changes: 2 additions & 1 deletion app/clients/the_movie_db/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class Base
VERSION = '3'
CACHE_TTL = 7.days
CACHE_NAMESPACE = 'the_movie_db'
option :api_key, optional: true
class << self
def option_names
@option_names ||= dry_initializer.options.map(&:target)
Expand Down Expand Up @@ -81,7 +82,7 @@ def query_params

# Visit to get api key https://www.themoviedb.org/settings/api
def api_key
config.settings.api_key.tap do |key|
@api_key = super || config.settings.api_key.tap do |key|
raise InvalidConfig, 'the movie db api requires an api key' if key.blank?
end
end
Expand Down
6 changes: 2 additions & 4 deletions app/controllers/config/make_mkvs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ def create
if @config_make_mkv.save
redirect_to root_path, success: 'Make MKV Config was successfully created.'
else
flash.now[:error] = 'Could not create MKV Config'
render :new
render :new, status: :unprocessable_entity
end
end

Expand All @@ -26,8 +25,7 @@ def update
flash[:success] = 'Updated Make MKV'
redirect_to root_path
else
flash.now[:error] = 'Could not update MKV Config'
render :edit
render :edit, status: :unprocessable_entity
end
end

Expand Down
4 changes: 2 additions & 2 deletions app/controllers/config/plexes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def create
ScanPlexWorker.perform_async
redirect_to root_path, notice: 'Plex was successfully created.'
else
render :new
render :new, status: :unprocessable_entity
end
end

Expand All @@ -34,7 +34,7 @@ def update
ScanPlexWorker.perform_async
redirect_to root_path, notice: 'Plex was successfully updated.'
else
render :edit
render :edit, status: :unprocessable_entity
end
end

Expand Down
Loading

0 comments on commit 6901d4d

Please sign in to comment.