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