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