Skip to content

Commit

Permalink
bump gems except commonmarker (#1234)
Browse files Browse the repository at this point in the history
lot of irritating churn out of standardrb here
  • Loading branch information
pushcx committed Dec 29, 2023
1 parent 623f8f8 commit 2332d28
Show file tree
Hide file tree
Showing 61 changed files with 223 additions and 222 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.2
3.3.0
9 changes: 8 additions & 1 deletion .standard.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
ignore:
- '**/*':
# there's no "don't delete these records or shit will be on fire" option,
# just various "sure automatically destroy lots of data yolo" options
- Rails/HasManyOrHasOneDependent
# is a multimaster db while needing microsecond accurate sorting really 'standard'
- Rails/OrderById
# it's mad about the class variables and I don't want to risk the refactor now
- 'extras/**/*':
- Naming/VariableName
# migrations are not live code; ignore those before standardrb
# migrations are not live code
- 'db/migrate/201*'
- 'db/migrate/2020*'
- 'db/migrate/2022*'
- 'db/migrate/202309*'

plugins:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ gem "rotp"
gem "rqrcode"

# parsing
gem "commonmarker"
gem "commonmarker", "<1"
gem "htmlentities"
gem "pdf-reader"
gem "nokogiri"
Expand Down
86 changes: 43 additions & 43 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ GEM
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.5)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
afm (0.2.2)
ast (2.4.2)
attr_extras (7.1.0)
base64 (0.1.1)
bcrypt (3.1.19)
base64 (0.2.0)
bcrypt (3.1.20)
benchmark-perf (0.6.0)
bigdecimal (3.1.5)
brakeman (6.1.1)
Expand Down Expand Up @@ -124,19 +124,19 @@ GEM
exception_notification (4.5.0)
actionmailer (>= 5.2, < 8)
activesupport (>= 5.2, < 8)
execjs (2.9.0)
factory_bot (6.2.1)
execjs (2.9.1)
factory_bot (6.4.4)
activesupport (>= 5.0.0)
factory_bot_rails (6.2.0)
factory_bot (~> 6.2.0)
factory_bot_rails (6.4.2)
factory_bot (~> 6.4)
railties (>= 5.0.0)
faker (3.2.1)
faker (3.2.2)
i18n (>= 1.8.11, < 2)
ffi (1.15.5)
ffi (1.16.3)
flamegraph (0.9.5)
globalid (1.2.1)
activesupport (>= 6.1)
hashdiff (1.0.1)
hashdiff (1.1.0)
hashery (2.1.2)
hashie (5.0.0)
htmlentities (4.3.4)
Expand All @@ -146,7 +146,7 @@ GEM
irb (1.11.0)
rdoc
reline (>= 0.3.8)
json (2.6.3)
json (2.7.1)
language_server-protocol (3.17.0.3)
lint_roller (1.1.0)
listen (3.8.0)
Expand All @@ -168,7 +168,7 @@ GEM
minitest (5.20.0)
mutex_m (0.2.0)
mysql2 (0.5.5)
net-imap (0.4.8)
net-imap (0.4.9)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -178,10 +178,10 @@ GEM
net-smtp (0.4.0)
net-protocol
nio4r (2.7.0)
nokogiri (1.15.5)
nokogiri (1.16.0)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.15.5-x86_64-linux)
nokogiri (1.16.0-x86_64-linux)
racc (~> 1.4)
oauth (1.1.0)
oauth-tty (~> 1.0, >= 1.0.1)
Expand All @@ -190,29 +190,29 @@ GEM
oauth-tty (1.0.5)
version_gem (~> 1.1, >= 1.1.1)
optimist (3.1.0)
parallel (1.23.0)
parser (3.2.2.3)
parallel (1.24.0)
parser (3.2.2.4)
ast (~> 2.4.1)
racc
parslet (2.0.0)
patience_diff (1.2.0)
optimist (~> 3.0)
pdf-reader (2.11.0)
pdf-reader (2.12.0)
Ascii85 (~> 1.0)
afm (~> 0.2.1)
hashery (~> 2.0)
ruby-rc4
ttfunk
psych (5.1.2)
stringio
public_suffix (5.0.3)
puma (6.3.1)
public_suffix (5.0.4)
puma (6.4.0)
nio4r (~> 2.0)
racc (1.7.3)
rack (3.0.8)
rack-attack (6.7.0)
rack (>= 1.0, < 4)
rack-mini-profiler (3.1.1)
rack-mini-profiler (3.3.0)
rack (>= 1.2.0)
rack-session (2.0.0)
rack (>= 3.0.0)
Expand Down Expand Up @@ -258,9 +258,9 @@ GEM
rb-readline (0.5.5)
rdoc (6.6.2)
psych (>= 4.0.0)
redis-client (0.17.0)
redis-client (0.19.1)
connection_pool
regexp_parser (2.8.1)
regexp_parser (2.8.3)
reline (0.4.1)
io-console (~> 0.5)
rexml (3.2.6)
Expand All @@ -277,7 +277,7 @@ GEM
rspec-mocks (3.12.6)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-rails (6.0.3)
rspec-rails (6.1.0)
actionpack (>= 6.1)
activesupport (>= 6.1)
railties (>= 6.1)
Expand All @@ -286,28 +286,28 @@ GEM
rspec-mocks (~> 3.12)
rspec-support (~> 3.12)
rspec-support (3.12.1)
rubocop (1.56.3)
base64 (~> 0.1.1)
rubocop (1.59.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.3)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-performance (1.19.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.20.2)
rubocop-performance (1.20.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-rails (2.23.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-sorbet (0.7.3)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-sorbet (0.7.6)
rubocop (>= 0.90.0)
ruby-progressbar (1.13.0)
ruby-rc4 (0.1.5)
Expand All @@ -318,7 +318,7 @@ GEM
scenic-mysql_adapter (1.0.1)
mysql2
scenic (>= 1.4.0)
sidekiq (7.1.4)
sidekiq (7.2.0)
concurrent-ruby (< 2)
connection_pool (>= 2.3.0)
rack (>= 2.2.4)
Expand All @@ -342,21 +342,21 @@ GEM
activesupport (>= 5.2)
sprockets (>= 3.0.0)
stackprof (0.2.25)
standard (1.31.1)
standard (1.33.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.56.2)
rubocop (~> 1.59.0)
standard-custom (~> 1.0.0)
standard-performance (~> 1.2)
standard-performance (~> 1.3)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.2.0)
standard-performance (1.3.0)
lint_roller (~> 1.1)
rubocop-performance (~> 1.19.0)
standard-rails (0.2.0)
rubocop-performance (~> 1.20.1)
standard-rails (1.0.0)
lint_roller (~> 1.0)
rubocop-rails (~> 2.20.2)
rubocop-rails (~> 2.23.1)
standard-sorbet (0.0.2)
lint_roller (~> 1.1)
rubocop-sorbet (~> 0.7.0)
Expand All @@ -373,7 +373,7 @@ GEM
concurrent-ruby (~> 1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (2.4.2)
unicode-display_width (2.5.0)
vcr (6.2.0)
version_gem (1.1.3)
webmock (3.19.1)
Expand All @@ -400,7 +400,7 @@ DEPENDENCIES
brakeman
byebug
capybara
commonmarker
commonmarker (< 1)
database_cleaner
exception_notification
factory_bot_rails
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ApplicationController < ActionController::Base

def agent_is_spider?
ua = request.env["HTTP_USER_AGENT"].to_s
(ua == "" || ua.match(/(Google|bing|Slack|Twitter)bot|Slurp|crawler|Feedly|FeedParser|RSS/))
ua == "" || ua.match(/(Google|bing|Slack|Twitter)bot|Slurp|crawler|Feedly|FeedParser|RSS/)
end

def authenticate_user
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/avatars_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ class AvatarsController < ApplicationController

ALLOWED_SIZES = [16, 32, 100, 200].freeze

CACHE_DIR = "#{Rails.root}/public/avatars/".freeze
CACHE_DIR = Rails.public_path.join("avatars/").to_s.freeze

def expire
expired = 0

Dir.entries(CACHE_DIR).select { |f|
f.match(/\A#{@user.username}-(\d+)\.png\z/)
}.each do |f|
Rails.logger.debug "Expiring #{f}"
Rails.logger.debug { "Expiring #{f}" }
File.unlink("#{CACHE_DIR}/#{f}")
expired += 1
rescue => e
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/categories_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def new
end

def create
category = Category.create(category_params)
category = Category.create!(category_params)
if category.valid?
flash[:success] = "Category #{category.category} has been created"
redirect_to tags_path
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/hats_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def index

@hat_groups = {}

Hat.active.includes(:user).each do |h|
Hat.active.includes(:user).find_each do |h|
@hat_groups[h.hat] ||= []
@hat_groups[h.hat].push h
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/login_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def login

if !user.password_digest.to_s.match(/^\$2a\$#{BCrypt::Engine::DEFAULT_COST}\$/o)
user.password = user.password_confirmation = params[:password].to_s
user.save
user.save!
end

if user.has_2fa? && !Rails.env.development?
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/messages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def show

if @message.recipient_user_id == @user.id
@message.has_been_read = true
@message.save
@message.save!
end
Rails.cache.delete("user:#{@user.id}:unread_replies")
end
Expand Down Expand Up @@ -144,7 +144,7 @@ def batch_delete

def keep_as_new
@message.has_been_read = false
@message.save
@message.save!

redirect_to "/messages"
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/signup_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def signup
end

if @new_user.save
@invitation&.update(used_at: Time.current, new_user: @new_user)
@invitation&.update!(used_at: Time.current, new_user: @new_user)
session[:u] = @new_user.session_token
flash[:success] = "Welcome to #{Rails.application.name}, " \
"#{@new_user.username}!"
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/stories_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def create

if @story.valid? && !(@story.already_posted_recently? && !@story.seen_previous)
if @story.save
ReadRibbon.where(user: @user, story: @story).first_or_create
ReadRibbon.where(user: @user, story: @story).first_or_create!
return redirect_to @story.comments_path
end
end
Expand Down Expand Up @@ -437,7 +437,7 @@ def find_user_story
@story = if @user.is_moderator?
Story.where(short_id: params[:story_id] || params[:id]).first
else
Story.where(user_id: @user.id, short_id: (params[:story_id] || params[:id])).first
Story.where(user_id: @user.id, short_id: params[:story_id] || params[:id]).first
end

if !@story
Expand Down Expand Up @@ -471,7 +471,7 @@ def verify_user_can_submit_stories

def track_story_reads
@story = Story.where(short_id: params[:id]).first!
@ribbon = ReadRibbon.where(user: @user, story: @story).first_or_create
@ribbon = ReadRibbon.where(user: @user, story: @story).first_or_create!
yield
@ribbon.bump
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/tags_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def new
def create
@title = "Create Tag"
tag = Tag.create(tag_params)
if tag.valid?
if tag.persisted?
flash[:success] = "Tag #{tag.tag} has been created"
redirect_to tags_path
else
Expand Down

0 comments on commit 2332d28

Please sign in to comment.