From e13b023483eaff80cd6e536fd4f2744eec04eec5 Mon Sep 17 00:00:00 2001 From: Yuri Smirnov Date: Wed, 31 Jul 2024 20:58:29 +0300 Subject: [PATCH] fix rubocop issues --- .rubocop.yml | 5 ++++- Gemfile | 11 +++++++++++ bin/rspec | 2 +- ezclient.gemspec | 11 ----------- spec/ezclient_spec.rb | 2 +- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 5cbd053..6a5c318 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -5,7 +5,7 @@ inherit_gem: AllCops: DisplayCopNames: true - TargetRubyVersion: 2.7 + TargetRubyVersion: 3.0 Include: - bin/console - Gemfile @@ -19,3 +19,6 @@ AllCops: RSpec/Rails/HaveHttpStatus: Enabled: false + +RSpec/SpecFilePathFormat: + Enabled: false diff --git a/Gemfile b/Gemfile index bb94df8..a188b05 100644 --- a/Gemfile +++ b/Gemfile @@ -2,3 +2,14 @@ source "https://rubygems.org" gemspec + +gem "bundler" +gem "coveralls" +gem "pry" +gem "rake" +gem "rspec" +gem "rubocop-config-umbrellio" +gem "rubocop-rake" +gem "simplecov" +gem "simplecov-lcov" +gem "webmock" diff --git a/bin/rspec b/bin/rspec index c9fea7c..18a257f 100755 --- a/bin/rspec +++ b/bin/rspec @@ -15,7 +15,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 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. diff --git a/ezclient.gemspec b/ezclient.gemspec index 54e8e48..5fefa31 100644 --- a/ezclient.gemspec +++ b/ezclient.gemspec @@ -20,15 +20,4 @@ Gem::Specification.new do |spec| spec.require_paths = ["lib"] spec.add_runtime_dependency "http", ">= 4" - - spec.add_development_dependency "bundler" - spec.add_development_dependency "coveralls" - spec.add_development_dependency "pry" - spec.add_development_dependency "rake" - spec.add_development_dependency "rspec" - spec.add_development_dependency "rubocop-config-umbrellio" - spec.add_development_dependency "rubocop-rake" - spec.add_development_dependency "simplecov" - spec.add_development_dependency "simplecov-lcov" - spec.add_development_dependency "webmock" end diff --git a/spec/ezclient_spec.rb b/spec/ezclient_spec.rb index bd46683..f3cc76a 100644 --- a/spec/ezclient_spec.rb +++ b/spec/ezclient_spec.rb @@ -132,7 +132,7 @@ def self.sign!(*); end expect(webmock_requests.last.body).to eq('{"a":1}') expect(webmock_requests.last.headers).to include( - "Content-Type" => "application/json; charset=UTF-8", + "Content-Type" => "application/json; charset=utf-8", ) end end