From e43bdd8e0e663b870d294aa0e040ea9236c17217 Mon Sep 17 00:00:00 2001 From: foo Date: Thu, 4 Jul 2024 19:19:07 +0000 Subject: [PATCH 1/3] chore: add net-smtp as runtime dependency on ruby >= 3.1 --- autobuild.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/autobuild.gemspec b/autobuild.gemspec index e24e9081..4cdc3eb4 100644 --- a/autobuild.gemspec +++ b/autobuild.gemspec @@ -24,6 +24,7 @@ Gem::Specification.new do |s| .reject { |f| f.match(%r{^(test|spec|features)/}) } s.add_runtime_dependency "concurrent-ruby", "~> 1.1" + s.add_runtime_dependency "net-smtp" if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.1.0") s.add_runtime_dependency "pastel", "~> 0.7.0" s.add_runtime_dependency "rake", "~> 13.0" s.add_runtime_dependency 'tty-cursor', '~> 0.7.0' From 075ca6947bbb151b02e4b9b10d48f23f19739540 Mon Sep 17 00:00:00 2001 From: Gabriel Arjones Date: Wed, 10 Jul 2024 13:55:03 -0300 Subject: [PATCH 2/3] chore: add webrick as a development dependency on ruby >= 3.0.0 --- autobuild.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/autobuild.gemspec b/autobuild.gemspec index 4cdc3eb4..546fdcdc 100644 --- a/autobuild.gemspec +++ b/autobuild.gemspec @@ -36,4 +36,5 @@ Gem::Specification.new do |s| s.add_development_dependency "minitest", "~> 5.0", ">= 5.0" s.add_development_dependency "simplecov" s.add_development_dependency "timecop" + s.add_development_dependency "webrick" if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.0.0") end From 195011f4e9e8b8ceec00339b1e3412cc5ccbc060 Mon Sep 17 00:00:00 2001 From: Gabriel Arjones Date: Wed, 10 Jul 2024 13:53:25 -0300 Subject: [PATCH 3/3] chore: fix github workflows --- .github/workflows/lint.yml | 4 +++- .github/workflows/test.yml | 4 ++++ .rubocop.yml | 4 +++- .rubocop_todo.yml | 14 ++++++++++++++ Gemfile | 9 +++++++-- autobuild.gemspec | 8 ++++++-- 6 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 .rubocop_todo.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 665569cf..099087a5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,7 +19,9 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} + - name: Remove vscode gems + run: bundle config set --local without vscode - name: Install dependencies run: bundle install - name: Run rubocop - run: bundle exec rubocop \ No newline at end of file + run: bundle exec rubocop diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2e4e55c2..58f606d2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,8 +19,12 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} + - name: Remove vscode gems + run: bundle config set --local without vscode - name: Install dependencies run: bundle install + - name: Enable file transport in git + run: git config --global protocol.file.allow always - name: Run tests run: bundle exec rake test env: diff --git a/.rubocop.yml b/.rubocop.yml index 7ce07215..dda844d0 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,3 +1,5 @@ +inherit_from: .rubocop_todo.yml + inherit_gem: rubocop-rock: defaults.yml @@ -111,4 +113,4 @@ Style/GlobalStdStream: Enabled: false Style/OptionalBooleanParameter: - Enabled: false \ No newline at end of file + Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml new file mode 100644 index 00000000..515af3a9 --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,14 @@ +# This configuration was generated by +# `rubocop --auto-gen-config` +# on 2024-07-10 18:16:42 UTC using RuboCop version 1.28.2. +# The point is for the user to remove these configuration records +# one by one as the offenses are removed from the code base. +# Note that changes in the inspected code, or installation of new +# versions of RuboCop, may require this file to be generated again. + +# Offense count: 2 +# Configuration parameters: Include. +# Include: **/*.gemspec +Gemspec/RubyVersionGlobalsUsage: + Exclude: + - 'autobuild.gemspec' diff --git a/Gemfile b/Gemfile index 18112f58..aea1aee0 100644 --- a/Gemfile +++ b/Gemfile @@ -2,12 +2,17 @@ source 'https://rubygems.org' gemspec +group :lint do + gem 'parallel', '1.24.0' + gem 'rubocop', '1.28.2' + gem 'rubocop-ast', '1.17.0' + gem 'rubocop-rock' +end + group :vscode do gem 'debase', '>= 0.2.2.beta10' gem 'pry' gem 'pry-byebug' - gem 'rubocop', '>= 0.6.0' - gem 'rubocop-rock' gem 'ruby-debug-ide', '>= 0.6.0' gem 'solargraph' end diff --git a/autobuild.gemspec b/autobuild.gemspec index 546fdcdc..ef1cdf9b 100644 --- a/autobuild.gemspec +++ b/autobuild.gemspec @@ -24,7 +24,9 @@ Gem::Specification.new do |s| .reject { |f| f.match(%r{^(test|spec|features)/}) } s.add_runtime_dependency "concurrent-ruby", "~> 1.1" - s.add_runtime_dependency "net-smtp" if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.1.0") + if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.1.0") + s.add_runtime_dependency "net-smtp" + end s.add_runtime_dependency "pastel", "~> 0.7.0" s.add_runtime_dependency "rake", "~> 13.0" s.add_runtime_dependency 'tty-cursor', '~> 0.7.0' @@ -36,5 +38,7 @@ Gem::Specification.new do |s| s.add_development_dependency "minitest", "~> 5.0", ">= 5.0" s.add_development_dependency "simplecov" s.add_development_dependency "timecop" - s.add_development_dependency "webrick" if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.0.0") + if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.0.0") + s.add_development_dependency "webrick" + end end