diff --git a/.erb-lint.yml b/.erb_lint.yml similarity index 100% rename from .erb-lint.yml rename to .erb_lint.yml diff --git a/bin/erblint b/bin/erb_lint similarity index 55% rename from bin/erblint rename to bin/erb_lint index 89dac220..d044fe10 100755 --- a/bin/erblint +++ b/bin/erb_lint @@ -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. @@ -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") diff --git a/bin/fix b/bin/fix index 892daf3a..2511fe55 100755 --- a/bin/fix +++ b/bin/fix @@ -2,4 +2,4 @@ set -v bin/rubocop --autocorrect-all -bin/erblint --lint-all --autocorrect +bin/erb_lint --lint-all --autocorrect diff --git a/bin/lint b/bin/lint index 2df3dcbe..e13b600d 100755 --- a/bin/lint +++ b/bin/lint @@ -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