Skip to content

Commit 0aa7340

Browse files
Build(deps-dev): bump rubocop from 1.55.1 to 1.56.0 (#3441)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Justin ! <[email protected]>
1 parent 23d6390 commit 0aa7340

13 files changed

+16
-14
lines changed

Gemfile.lock

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ GEM
8888
aws-sigv4 (~> 1.6)
8989
aws-sigv4 (1.6.0)
9090
aws-eventstream (~> 1, >= 1.0.2)
91+
base64 (0.1.1)
9192
bcrypt (3.1.19)
9293
better_html (2.0.2)
9394
actionview (>= 6.0)
@@ -368,7 +369,8 @@ GEM
368369
rspec-mocks (~> 3.12)
369370
rspec-support (~> 3.12)
370371
rspec-support (3.12.1)
371-
rubocop (1.55.1)
372+
rubocop (1.56.0)
373+
base64 (~> 0.1.1)
372374
json (~> 2.3)
373375
language_server-protocol (>= 3.17.0)
374376
parallel (~> 1.10)

app/controllers/admin/episodes_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def set_podcasts
5252

5353
def set_episode
5454
@episode = Episode.find(params[:id])
55-
return redirect_to %i[admin podcasts] if @episode.blank?
55+
redirect_to %i[admin podcasts] if @episode.blank?
5656
end
5757

5858
def episode_params

app/controllers/admin/users_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def user_params
5555
end
5656

5757
def authorize_admin_role
58-
return redirect_to [:admin] unless Current.user.can_admin_users?
58+
redirect_to [:admin] unless Current.user.can_admin_users?
5959
end
6060
end
6161
end

app/controllers/application_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def check_for_redirection
7575

7676
# TODO: move to rack middleware
7777
def strip_file_extension
78-
return redirect_to request.path.sub('.html', '') if request.path.include?('.html')
78+
redirect_to request.path.sub('.html', '') if request.path.include?('.html')
7979
end
8080

8181
# TODO: move to meta helper

app/controllers/books_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ def into_libraries
5151

5252
def set_book
5353
@book = Book.find_by(slug: params[:slug])
54-
return redirect_to [:books] if @book.blank?
54+
redirect_to [:books] if @book.blank?
5555
end
5656
end

app/controllers/categories_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def feed
2929
def set_slug
3030
@slug = params[:slug].dasherize
3131

32-
return redirect_to category_path(@slug) if @slug != params[:slug]
32+
redirect_to category_path(@slug) if @slug != params[:slug]
3333
end
3434

3535
def set_category
@@ -46,7 +46,7 @@ def set_title
4646
def set_articles
4747
@articles = @category.articles.for_index(**filters).page(params[:page]).per(25)
4848

49-
return redirect_to root_path if @articles.blank?
49+
redirect_to root_path if @articles.blank?
5050
end
5151

5252
def filters

app/controllers/definitions_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ def set_book
4343

4444
def set_definition
4545
@definition = Definition.find_by(slug: params[:slug])
46-
return redirect_to [:definitions] if @definition.blank?
46+
redirect_to [:definitions] if @definition.blank?
4747
end
4848
end

app/controllers/episodes_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def set_episode
3030
if request.path.starts_with? '/draft'
3131
@episode = Episode.find_by(draft_code: params[:draft_code])
3232

33-
return redirect_to(@episode.path) if @episode&.published?
33+
redirect_to(@episode.path) if @episode&.published?
3434
else
3535
@episode = Episode.live.find_by(podcast_id: @podcast, episode_number: params[:episode_number])
3636
return @episode if @episode.present?

app/controllers/languages_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ def canonical_locale
2828
def set_articles
2929
abbreviation = canonical_locale&.lang_code
3030
@articles = Article.live.published.where(locale: abbreviation).page(params[:page]).per(25)
31-
return redirect_to languages_path if @articles.empty?
31+
redirect_to languages_path if @articles.empty?
3232
end
3333
end

app/controllers/pages_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def set_page
7575
def page_redirects
7676
return render file: Rails.public_path.join('404.html'), status: :not_found if @page.nil?
7777

78-
return redirect_to @page.path if @page.published? && params[:draft_code].present?
78+
redirect_to @page.path if @page.published? && params[:draft_code].present?
7979
end
8080

8181
def set_html_id

0 commit comments

Comments
 (0)