Skip to content

Commit

Permalink
Update dependencies (#276)
Browse files Browse the repository at this point in the history
* Update dependencies

* Update required ruby version from 2.6.0 to 2.7.0, bc of rubocop update

* Update github workflow ruby version

* Update .rubocop.yml

* Correct via rubocop

* Update changelog
  • Loading branch information
Set27 committed Aug 21, 2023
1 parent e8488c8 commit d5a1689
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Ruby 2.6
- name: Set up Ruby 2.7
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
ruby-version: '2.7'
bundler-cache: true

- name: Run linter
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inherit_mode:
- Exclude

AllCops:
TargetRubyVersion: 2.6
TargetRubyVersion: 2.7

# for checking cops with interpolation
Lint/InterpolationCheck:
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ The format is described in [Contributing notes](CONTRIBUTING.md#changelog-entry-

## master

## 1.5.0

* **(Breaking)** Support Ruby >= 2.7.0

* Update rubocop to `1.55.1`. ([@Set27])
* Update rubocop-rails to `2.20.2`. ([@Set27])
* Update rubocop-spec to `2.23.0`. ([@Set27])

## 1.4.0 (2023-02-11)

### Changed
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ gemspec

gem "pry-byebug"
gem "rake", "~> 13.0"
gem "rspec", "~> 3.10"
gem "rspec", "~> 3.12.0"
8 changes: 4 additions & 4 deletions datarockets-style.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
spec.homepage = "https://github.com/datarockets/datarockets-style"
spec.license = "MIT"

spec.required_ruby_version = ">= 2.6.0"
spec.required_ruby_version = ">= 2.7.0"

# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
# to allow pushing to a single host or delete this section to allow pushing to any host.
Expand All @@ -32,9 +32,9 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_dependency "rubocop", "~> 1.45.1"
spec.add_dependency "rubocop-rails", "~> 2.17.4"
spec.add_dependency "rubocop-rspec", "~> 2.18.1"
spec.add_dependency "rubocop", "~> 1.55.1"
spec.add_dependency "rubocop-rails", "~> 2.20.2"
spec.add_dependency "rubocop-rspec", "~> 2.23.0"

spec.metadata["rubygems_mfa_required"] = "true"
end
2 changes: 1 addition & 1 deletion lib/datarockets_style/formatter/todo_list_formatter.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

require "pathname"
require_relative "./todo_list_formatter/report_summary"
require_relative "todo_list_formatter/report_summary"

# This formatter works like default formattter (display dots for files with no offenses and
# letters for files with problems in the them).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
it "registers an offence on setup call" do
expect_offense <<~RUBY
setup do
^^^^^^^^ Use `before` instead of `setup`.
^^^^^^^^ RSpec/PreferBeforeOverSetup: Use `before` instead of `setup`.
allow(post).to receive(:publish!)
end
RUBY
Expand All @@ -34,7 +34,7 @@
it "registers an offence on setup call" do
expect_offense <<~RUBY
setup {
^^^^^^^ Use `before` instead of `setup`.
^^^^^^^ RSpec/PreferBeforeOverSetup: Use `before` instead of `setup`.
allow(post).to receive(:publish!)
}
RUBY
Expand Down
10 changes: 5 additions & 5 deletions spec/datarockets_style/cop/style/nested_interpolation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,35 @@
it "registers interpolation into business block" do
expect_offense(<<~'RUBY')
"#{assignment.join("\n#{indentation(node)}")}"
^^^^^^^^^^^^^^^^^^^^ Redundant nested interpolation.
^^^^^^^^^^^^^^^^^^^^ Style/NestedInterpolation: Redundant nested interpolation.
RUBY
end

it 'registers an offense for "Hello, #{user.blank? ? guest : "dear #{user.name}"}"' do
expect_offense(<<~'RUBY')
"Hello, #{user.blank? ? 'guest' : "dear #{user.name}"}"
^^^^^^^^^^^^ Redundant nested interpolation.
^^^^^^^^^^^^ Style/NestedInterpolation: Redundant nested interpolation.
RUBY
end

it 'registers an offense for %|Hello, #{user.blank? ? guest : "dear #{user.name}"|' do
expect_offense(<<~'RUBY')
%|Hello, #{user.blank? ? 'guest' : "dear #{user.name}"}|
^^^^^^^^^^^^ Redundant nested interpolation.
^^^^^^^^^^^^ Style/NestedInterpolation: Redundant nested interpolation.
RUBY
end

it 'registers an offense for %Q(Hello, #{user.blank? ? guest : "dear #{user.name}")' do
expect_offense(<<~'RUBY')
%Q(Hello, #{user.blank? ? 'guest' : "dear #{user.name}"})
^^^^^^^^^^^^ Redundant nested interpolation.
^^^^^^^^^^^^ Style/NestedInterpolation: Redundant nested interpolation.
RUBY
end

it 'registers an offense for ["Hello, #{user.blank? ? guest : "dear #{user.name}"}"]' do
expect_offense(<<~'RUBY')
["Hello, #{user.blank? ? 'guest' : "dear #{user.name}"}", 'foo']
^^^^^^^^^^^^ Redundant nested interpolation.
^^^^^^^^^^^^ Style/NestedInterpolation: Redundant nested interpolation.
RUBY
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module RubocopExamples
module Cop
module Lauout
module Layout
class ArrayAlignmentExtended
attr_reader :a, :b, :c

Expand All @@ -20,10 +20,7 @@ def test2

def test3
it "returns himself and his investor" do
is_expected.to match_array([
unaffiliated_investor,
broker_investor,
])
is_expected.to contain_exactly(unaffiliated_investor, broker_investor)
end
end
end
Expand Down

0 comments on commit d5a1689

Please sign in to comment.