Skip to content

Commit

Permalink
🚨 Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
pboling committed Mar 21, 2024
1 parent 02a2479 commit 9618702
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 39 deletions.
18 changes: 18 additions & 0 deletions .rubocop_gradual.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"bin/checksums:2906467651": [
[12, 28, 2, "Lint/Syntax: unexpected token error\n(Using Ruby 2.2 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)", 5858765],
[14, 18, 2, "Lint/Syntax: unexpected token error\n(Using Ruby 2.2 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)", 5858765],
[20, 1, 4, "Lint/Syntax: unexpected token kELSE\n(Using Ruby 2.2 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)", 2087423834],
[33, 1, 3, "Lint/Syntax: unexpected token kEND\n(Using Ruby 2.2 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)", 193405706],
[45, 11, 2, "Lint/Syntax: unexpected token tLSHFT\n(Using Ruby 2.2 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)", 5859461],
[46, 21, 1, "Lint/Syntax: unexpected token tSTAR\n(Using Ruby 2.2 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)", 177551],
[47, 14, 1, "Lint/Syntax: `-' interpreted as argument prefix\n(Using Ruby 2.2 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)", 177544],
[47, 17, 1, "Lint/Syntax: unexpected token tSTRING_BEG\n(Using Ruby 2.2 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)", 177543],
[53, 9, 3, "Lint/Syntax: unexpected token tCONSTANT\n(Using Ruby 2.2 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)", 193466585],
[54, 14, 3, "Lint/Syntax: unexpected token tCONSTANT\n(Using Ruby 2.2 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)", 193467647],
[54, 21, 1, "Lint/Syntax: unexpected token tCOLON\n(Using Ruby 2.2 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)", 177567],
[55, 21, 1, "Lint/Syntax: unexpected token tCOLON\n(Using Ruby 2.2 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)", 177567],
[56, 22, 4, "Lint/Syntax: unexpected token tCONSTANT\n(Using Ruby 2.2 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)", 2089414472],
[57, 22, 4, "Lint/Syntax: unexpected token tCONSTANT\n(Using Ruby 2.2 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)", 2089414472]
]
}
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [1.1.4] 2024-03-21 ([tag][1.1.4t])
### Added
- Ruby 3.3 to CI (@pboling)
- Improved test coverage (via `kettle-soup-cover` 🎉) (@pboling)
### Fixed
- Remove the executable bit from non-executable files (@Fryguy)

Expand Down
2 changes: 1 addition & 1 deletion bin/rake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
bundle_binstub = File.expand_path("bundle", __dir__)

if File.file?(bundle_binstub)
if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
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 Down
2 changes: 1 addition & 1 deletion bin/rspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
bundle_binstub = File.expand_path("bundle", __dir__)

if File.file?(bundle_binstub)
if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
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 Down
15 changes: 0 additions & 15 deletions spec/config/debug.rb

This file was deleted.

34 changes: 13 additions & 21 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# frozen_string_literal: true

begin
# This does not require "simplecov",
# because that has a side-effect of running `.simplecov`
require "kettle-soup-cover"
rescue LoadError
puts "Not running code coverage"
end

DEBUG = ENV.fetch("DEBUG", nil) == "true"
DEBUG_IDE = ENV.fetch("DEBUG_IDE", "false") == "true"

Expand Down Expand Up @@ -28,31 +36,15 @@ def actual_minor_version?(major, minor, engine = "ruby")
# RSpec Helpers from this gem
require "version_gem/rspec"

engine = "ruby"
major = 2
minor = 7
version = "#{major}.#{minor}"
gte_min = VersionGem::Faux.gte_minimum_version?(version, engine)
actual_minor = VersionGem::Faux.actual_minor_version?(major, minor, engine)

DEBUGGING = gte_min && DEBUG
DEBUG_JRUBY = VersionGem::Faux.gte_minimum_version?(version, "jruby")
RUN_COVERAGE = gte_min && (ENV.fetch("COVER_ALL", nil) || ENV.fetch("CI_CODECOV", nil) || ENV["CI"].nil?)
ALL_FORMATTERS = (gte_min && ENV.fetch("COVER_ALL", nil)) ||
(actual_minor && (ENV.fetch("CI_CODECOV", nil) || ENV.fetch("CI", nil)))

# RSpec Configs
require "config/rspec/rspec_core"
require "config/rspec/rspec_block_is_expected"
require "config/debug"

# Load Code Coverage as the last thing before this gem
if RUN_COVERAGE
require "simplecov" # Config file `.simplecov` is run immediately when simplecov loads
end
# RSpec Helpers
require "helpers/under_test"

# Last thing before this gem is code coverage:
require "simplecov" if defined?(Kettle) && Kettle::Soup::Cover::DO_COV

# This gem
require "version_gem"

# RSpec Helpers
require "helpers/under_test"

0 comments on commit 9618702

Please sign in to comment.