From cfdaa5f5433a609e921d0961510a01fe3512c100 Mon Sep 17 00:00:00 2001 From: Jason Garber Date: Tue, 14 May 2024 11:58:46 -0400 Subject: [PATCH 1/2] RuboCop: Gemspec/DevelopmentDependencies RuboCop recommends gem authors specify development dependencies in their project's `Gemfile` rather than in the gemspec. There's some debate on the PR (linked below) over the preference, but, in the spirit of leaning in to community defaults, this change moves those dependencies. Links: - https://docs.rubocop.org/rubocop/1.63/cops_gemspec.html#gemspecdevelopmentdependencies - https://github.com/rubocop/rubocop/pull/11469 --- Gemfile | 6 ++++++ humanize.gemspec | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 7f4f5e9..f5d1ddb 100644 --- a/Gemfile +++ b/Gemfile @@ -3,3 +3,9 @@ source 'https://rubygems.org' gemspec + +gem 'mutant' +gem 'mutant-rspec' +gem 'pry-byebug' +gem 'rspec' +gem 'rubocop' diff --git a/humanize.gemspec b/humanize.gemspec index 58a82c9..42ef5c9 100644 --- a/humanize.gemspec +++ b/humanize.gemspec @@ -15,11 +15,6 @@ Gem::Specification.new do |s| s.files = Dir["lib/**/*"].reject { |f| File.directory?(f) } s.files += ["humanize.gemspec", "LICENSE.md", "README.markdown"] - s.add_development_dependency 'mutant' - s.add_development_dependency 'mutant-rspec' - s.add_development_dependency 'pry-byebug' - s.add_development_dependency 'rspec' - s.add_development_dependency 'rubocop' s.metadata['rubygems_mfa_required'] = 'true' s.metadata['bug_tracker_uri'] = "#{s.homepage}/issues" s.metadata['source_code_uri'] = "#{s.homepage}/tree/v#{s.version}" From 45fc1033e28228ac24c6a24ed98e1590210893e6 Mon Sep 17 00:00:00 2001 From: Jason Garber Date: Tue, 14 May 2024 12:02:48 -0400 Subject: [PATCH 2/2] Update RuboCop todo file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …removing `Gemspec/DevelopmentDependencies`. --- .rubocop_todo.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index d55ce85..566a894 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -6,14 +6,6 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 5 -# Configuration parameters: EnforcedStyle, AllowedGems, Include. -# SupportedStyles: Gemfile, gems.rb, gemspec -# Include: **/*.gemspec, **/Gemfile, **/gems.rb -Gemspec/DevelopmentDependencies: - Exclude: - - 'humanize.gemspec' - # Offense count: 1 # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max. Metrics/AbcSize: