Skip to content

Commit

Permalink
Autocorrect rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
zackbraksa committed May 5, 2024
1 parent 8e54034 commit 95fff9c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ require "rubocop/rake_task"

RuboCop::RakeTask.new

task default: %i[spec rubocop]
task default: [:spec, :rubocop]
12 changes: 6 additions & 6 deletions shelp.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ Gem::Specification.new do |spec|
# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
gemspec = File.basename(__FILE__)
spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls|
ls.readlines("\x0", chomp: true).reject do |f|
(f == gemspec) ||
f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile]) ||
f.end_with?('.gem')
spec.files = IO.popen(["git", "ls-files", "-z"], chdir: __dir__, err: IO::NULL) do |ls|
ls.readlines("\x0", chomp: true).reject do |f|
(f == gemspec) ||
f.start_with?("bin/", "test/", "spec/", "features/", ".git", ".github", "appveyor", "Gemfile") ||
f.end_with?(".gem")
end
end
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
Expand Down
8 changes: 2 additions & 6 deletions spec/shelp_spec.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# frozen_string_literal: true

RSpec.describe Shelp do
RSpec.describe(Shelp) do
it "has a version number" do
expect(Shelp::VERSION).not_to be nil
end

it "does something useful" do
expect(true).to eq(true)
expect(Shelp::VERSION).not_to(be(nil))
end
end
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Disable RSpec exposing methods globally on `Module` and `main`
config.disable_monkey_patching!

config.expect_with :rspec do |c|
config.expect_with(:rspec) do |c|
c.syntax = :expect
end
end

0 comments on commit 95fff9c

Please sign in to comment.