Skip to content

Commit

Permalink
eng: Target 3.1.4, correct deprecations, run rubocop on itself (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-dutchie authored Jan 23, 2024
1 parent cc5f82b commit 3a0b674
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
9 changes: 4 additions & 5 deletions default.yml → .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require:
- rubocop-rails

AllCops:
TargetRubyVersion: 2.6
TargetRubyVersion: 3.1.4
EnabledByDefault: true
DisplayCopNames: true
Exclude:
Expand All @@ -21,7 +21,6 @@ AllCops:
- '*.yml'
- '.pryrc'


# Capybara cops

# Allows us to use scenario/feature instead of it/describes
Expand Down Expand Up @@ -80,7 +79,7 @@ Layout/SpaceInsideHashLiteralBraces:
Metrics/BlockLength:
Exclude:
- "spec/factories/**/*.rb"
IgnoredMethods: ['describe', 'context']
AllowedMethods: ['describe', 'context']

# Too short methods lead to extraction of single-use methods, which can make
# the code easier to read (by naming things), but can also clutter the class
Expand Down Expand Up @@ -175,7 +174,7 @@ Style/MethodCallWithArgsParentheses:
VersionAdded: '0.47'
VersionChanged: '0.61'
IgnoreMacros: true
IgnoredMethods: []
AllowedMethods: []
AllowedPatterns: []
IncludedMacros: []
AllowParenthesesInMultilineCall: false
Expand All @@ -190,7 +189,7 @@ Style/MethodCallWithoutArgsParentheses:
Description: 'Do not use parentheses for method calls with no arguments.'
StyleGuide: '#method-invocation-parens'
Enabled: true
IgnoredMethods: []
AllowedMethods: []
VersionAdded: '0.47'
VersionChanged: '0.55'

Expand Down
26 changes: 15 additions & 11 deletions Dutchie-Style.gemspec
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
require_relative 'lib/Dutchie/Style/version'
# frozen_string_literal: true

require_relative "lib/Dutchie/Style/version"

Gem::Specification.new do |spec|
spec.name = "Dutchie-Style"
spec.version = Dutchie::Style::VERSION
spec.authors = ["Christopher Ostrowski"]
spec.email = ["[email protected]"]

spec.license = 'MIT'
spec.license = "MIT"

spec.summary = %q{Rubocop Settings for all dutchie Ruby Apps}
spec.description = %q{Rubocop Settings for all dutchie Ruby Apps}
spec.summary = "Rubocop Settings for all dutchie Ruby Apps"
spec.description = "Rubocop Settings for all dutchie Ruby Apps"
spec.homepage = "https://github.com/GetDutchie/Dutchie-Style"
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.4")

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "https://github.com/GetDutchie/Dutchie-Style"
spec.metadata["changelog_uri"] = "https://github.com/GetDutchie/Dutchie-Style/releases"

# 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.
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
spec.files =
Dir.chdir(File.expand_path(__dir__)) do
`git ls-files -z`.split("\x0").reject {|f| f.match(%r{^(test|spec|features)/}) }
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.executables = spec.files.grep(%r{^exe/}) {|f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_dependency "rubocop", "~> 1.56"
spec.add_dependency "rubocop-rspec"
spec.add_dependency "rubocop-rails"
spec.add_dependency "rubocop-rails", "~> 2.21"
spec.add_dependency "rubocop-rspec", "~> 2.24"
spec.metadata["rubygems_mfa_required"] = "true"
end
2 changes: 2 additions & 0 deletions lib/Dutchie/Style.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "Dutchie/Style/version"

module Dutchie
Expand Down
3 changes: 2 additions & 1 deletion lib/Dutchie/Style/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

module Dutchie
module Style
VERSION = '2.0.7'
VERSION = "2.0.8"
public_constant :VERSION
end
end

0 comments on commit 3a0b674

Please sign in to comment.