Upgrade to Ruby 3.2 (#30)

* Upgrade to Ruby 3.2

* Upgrade and fix rubocop linting

* Bundle exec the parse issue command

* Go back to manually installing dependencies for issue ops
This commit is contained in:
Chase S
2023-08-14 09:13:37 -05:00
committed by GitHub
parent 090d41bc3b
commit 65b029a677
12 changed files with 86 additions and 66 deletions
+2 -5
View File
@@ -5,8 +5,7 @@ on:
branches: [main]
pull_request:
env:
ruby_version: 2.7.1
# env:
# ImageOs must be configured to match the OS of the runner when using self-hosted runners.
# ImageOS: ubuntu22
@@ -16,8 +15,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.ruby_version }}
- name: Install dependencies
run: bundle install
- name: Run specs
@@ -28,7 +25,7 @@ jobs:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.ruby_version }}
bundler-cache: true
- name: Install dependencies
run: bundle install
- name: Lint
+1 -3
View File
@@ -54,12 +54,10 @@ jobs:
})
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.1
# ImageOs must be configured to match the OS of the runner when using self-hosted runners.
# env:
# ImageOS: ubuntu22
- name: Install dependencies
- name: Install Dependencies
run: bundle install
env:
BUNDLE_WITHOUT: development
+6 -1
View File
@@ -1,7 +1,12 @@
require:
- rubocop-performance
inherit_gem:
rubocop-github:
- config/default_edge.yml
- config/default.yml
AllCops:
NewCops: enable
Lint/AmbiguousBlockAssociation:
Exclude:
- "spec/**/*"
+1 -1
View File
@@ -1 +1 @@
2.7.1
3.2.2
+3 -3
View File
@@ -15,9 +15,9 @@ group :development do
gem "pry-byebug", "~> 3.9"
gem "rspec", "~> 3.10"
gem "rspec-github", "~> 2.3", ">= 2.3.1"
gem "rubocop", "~> 0.80", "< 0.81"
gem "rubocop-github", "~> 0.14.0"
gem "rubocop-performance", "~> 1.6.1"
gem "rubocop", "~> 1.5"
gem "rubocop-github", "~> 0.2"
gem "rubocop-performance", "~> 1.18"
gem "ruby-debug-ide", "~> 0.7.2"
gem "shoulda-matchers", "~> 4.5.1"
end
+61 -43
View File
@@ -1,75 +1,93 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.0.4.3)
activesupport (7.0.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
ast (2.4.2)
base64 (0.1.1)
byebug (11.1.3)
coderay (1.1.3)
concurrent-ruby (1.2.2)
diff-lcs (1.4.4)
diff-lcs (1.5.0)
dotenv (2.7.6)
factory_bot (6.2.0)
factory_bot (6.2.1)
activesupport (>= 5.0.0)
faker (2.19.0)
i18n (>= 1.6, < 2)
i18n (1.12.0)
faker (2.23.0)
i18n (>= 1.8.11, < 2)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.4)
json (2.6.2)
json (2.6.3)
language_server-protocol (3.17.0.3)
method_source (1.0.0)
minitest (5.18.0)
parallel (1.21.0)
parser (3.0.3.1)
minitest (5.19.0)
parallel (1.23.0)
parser (3.2.2.3)
ast (~> 2.4.1)
pry (0.13.1)
racc
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.9.0)
pry-byebug (3.10.1)
byebug (~> 11.0)
pry (~> 0.13.0)
rainbow (3.0.0)
pry (>= 0.13, < 0.15)
racc (1.7.1)
rack (3.0.8)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.8.1)
require_all (3.0.0)
rexml (3.2.5)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
rexml (3.2.6)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-github (2.3.1)
rspec-support (~> 3.12.0)
rspec-github (2.4.0)
rspec-core (~> 3.0)
rspec-mocks (3.10.2)
rspec-mocks (3.12.6)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.3)
rubocop (0.80.1)
jaro_winkler (~> 1.5.1)
rspec-support (~> 3.12.0)
rspec-support (3.12.1)
rubocop (1.56.0)
base64 (~> 0.1.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 2.7.0.1)
parser (>= 3.2.2.3)
rainbow (>= 2.2.2, < 4.0)
rexml
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.7)
rubocop-github (0.14.0)
rubocop (~> 0.59)
rubocop-performance (1.6.1)
rubocop (>= 0.71.0)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-github (0.19.0)
rubocop (>= 1.0.0)
rubocop-performance
rubocop-rails
rubocop-performance (1.18.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.20.2)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
ruby-debug-ide (0.7.3)
rake (>= 0.8.1)
ruby-progressbar (1.11.0)
ruby-progressbar (1.13.0)
shoulda-matchers (4.5.1)
activesupport (>= 4.2.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (1.6.1)
unicode-display_width (2.4.2)
PLATFORMS
ruby
@@ -85,11 +103,11 @@ DEPENDENCIES
require_all (~> 3.0.0)
rspec (~> 3.10)
rspec-github (~> 2.3, >= 2.3.1)
rubocop (~> 0.80, < 0.81)
rubocop-github (~> 0.14.0)
rubocop-performance (~> 1.6.1)
rubocop (~> 1.5)
rubocop-github (~> 0.2)
rubocop-performance (~> 1.18)
ruby-debug-ide (~> 0.7.2)
shoulda-matchers (~> 4.5.1)
BUNDLED WITH
2.2.33
2.4.18
+1 -1
View File
@@ -4,7 +4,7 @@
require "yaml"
require "open3"
require_relative "./../cli"
require_relative "../cli"
issue_content, comment_body, labels = ARGV
+2 -1
View File
@@ -20,7 +20,8 @@ if File.file?(bundle_binstub)
if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
abort(
"Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end
+2 -1
View File
@@ -20,7 +20,8 @@ if File.file?(bundle_binstub)
if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
abort(
"Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end
+5 -5
View File
@@ -11,17 +11,17 @@ RSpec.describe Arguments do
context "when the command is found" do
before do
expect(provider).to receive(:module).and_return(::Jenkins).at_least(:once)
expect(provider).to receive(:module).and_return(Jenkins).at_least(:once)
expect(command).to receive(:classify).and_return("Audit").at_least(:once)
expect(command).to receive(:options).and_return({})
end
it { is_expected.to be_a(::Jenkins::Audit) }
it { is_expected.to be_a(Jenkins::Audit) }
end
context "when the command is not found" do
before do
expect(provider).to receive(:module).and_return(::Jenkins).at_least(:once)
expect(provider).to receive(:module).and_return(Jenkins).at_least(:once)
expect(command).to receive(:classify).and_return("Whoopsie").at_least(:once)
end
@@ -35,10 +35,10 @@ RSpec.describe Arguments do
let(:options) { {} }
before do
expect(provider).to receive(:module).and_return(::AzureDevops).at_least(:once)
expect(provider).to receive(:module).and_return(AzureDevops).at_least(:once)
expect(command).to receive(:classify).and_return("Audit").at_least(:once)
expect(command).to receive(:options).and_return(options)
expect_any_instance_of(::AzureDevops::Audit).to receive(:to_a).and_return(output)
expect_any_instance_of(AzureDevops::Audit).to receive(:to_a).and_return(output)
end
context "when the output is nil" do
+1 -1
View File
@@ -84,7 +84,7 @@ RSpec.describe Provider do
LABELS
end
it { is_expected.to eq(::TravisCI) }
it { is_expected.to eq(TravisCI) }
end
describe "to_output" do
+1 -1
View File
@@ -5,7 +5,7 @@ require "factory_bot"
require "faker"
require "fileutils"
require_relative "./../cli"
require_relative "../cli"
Dir[File.join(__dir__, "support/**/*.rb")].sort.each { |f| require f }