Skip to content

Commit

Permalink
resolve erblint deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Dec 9, 2024
1 parent 8c06237 commit 0e995ae
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
File renamed without changes.
12 changes: 5 additions & 7 deletions bin/erblint → bin/erb_lint
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@
#
# This file was generated by Bundler.
#
# The application 'erblint' is installed as part of a gem, and
# The application 'erb_lint' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)

bundle_binstub = File.expand_path("../bundle", __FILE__)
bundle_binstub = File.expand_path("bundle", __dir__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Expand All @@ -26,4 +24,4 @@ end
require "rubygems"
require "bundler/setup"

load Gem.bin_path("erb_lint", "erblint")
load Gem.bin_path("erb_lint", "erb_lint")
2 changes: 1 addition & 1 deletion bin/fix
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

set -v
bin/rubocop --autocorrect-all
bin/erblint --lint-all --autocorrect
bin/erb_lint --lint-all --autocorrect
2 changes: 1 addition & 1 deletion bin/lint
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -euo pipefail
bin/bundler-audit --update
bin/brakeman -q -w2
bin/rubocop
bin/erblint --lint-all
bin/erb_lint --lint-all

0 comments on commit 0e995ae

Please sign in to comment.