From b91675b03017302482329214c0de2089ced33db3 Mon Sep 17 00:00:00 2001 From: Jonas Brusman Date: Mon, 28 Oct 2024 15:37:00 +0100 Subject: [PATCH] Add Standard instead of Rubocop --- .github/workflows/rubocop.yml | 22 ------------------- .github/workflows/standard.yml | 14 ++++++++++++ .rubocop.yml | 36 ------------------------------ Gemfile | 2 +- Rakefile | 8 +++---- mail-ses.gemspec | 40 +++++++++++++++++----------------- 6 files changed, 38 insertions(+), 84 deletions(-) delete mode 100644 .github/workflows/rubocop.yml create mode 100644 .github/workflows/standard.yml delete mode 100644 .rubocop.yml diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml deleted file mode 100644 index cc7f4b4..0000000 --- a/.github/workflows/rubocop.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -name: Rubocop - -on: [push, pull_request] - -jobs: - build: - runs-on: ubuntu-latest - env: - CI: true - TESTOPTS: "-v" - steps: - - uses: actions/checkout@v3 - - name: Set up Ruby 3.0 - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.0 - bundler-cache: true - - name: bundle install - run: bundle install --jobs 4 --retry 3 - - name: Run RuboCop - run: bundle exec rubocop --parallel diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml new file mode 100644 index 0000000..0212867 --- /dev/null +++ b/.github/workflows/standard.yml @@ -0,0 +1,14 @@ +--- +name: Standard + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + permissions: + checks: write + contents: write + steps: + - name: Standard Ruby + uses: standardrb/standard-ruby-action@v1 diff --git a/.rubocop.yml b/.rubocop.yml deleted file mode 100644 index 19620f7..0000000 --- a/.rubocop.yml +++ /dev/null @@ -1,36 +0,0 @@ -AllCops: - NewCops: enable - SuggestExtensions: false - TargetRubyVersion: 2.6 - -Layout/DotPosition: - EnforcedStyle: leading - -Layout/LineLength: - Max: 120 - Exclude: - - 'spec/**/*.rb' - -Layout/MultilineMethodCallIndentation: - EnforcedStyle: indented - -Metrics/BlockLength: - Exclude: - - 'spec/**/*.rb' - -Naming/FileName: - Exclude: - - 'lib/mail-ses.rb' - -Style/GuardClause: - Enabled: false - -Style/IfUnlessModifier: - Enabled: false - -Style/RaiseArgs: - EnforcedStyle: compact - -Style/StringLiterals: - Exclude: - - 'spec/**/*.rb' diff --git a/Gemfile b/Gemfile index 7f4f5e9..be173b2 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ # frozen_string_literal: true -source 'https://rubygems.org' +source "https://rubygems.org" gemspec diff --git a/Rakefile b/Rakefile index be2ab77..e001c16 100644 --- a/Rakefile +++ b/Rakefile @@ -1,10 +1,8 @@ # frozen_string_literal: true -require 'bundler/gem_tasks' -require 'rspec/core/rake_task' -require 'rubocop/rake_task' - -RuboCop::RakeTask.new(:rubocop) +require "bundler/gem_tasks" +require "rspec/core/rake_task" +require "standard/rake" RSpec::Core::RakeTask.new(:spec) diff --git a/mail-ses.gemspec b/mail-ses.gemspec index 6ddc497..b3f7184 100644 --- a/mail-ses.gemspec +++ b/mail-ses.gemspec @@ -1,27 +1,27 @@ # frozen_string_literal: true -$LOAD_PATH.push File.expand_path('lib', __dir__) -require 'mail/ses/version' +$LOAD_PATH.push File.expand_path("lib", __dir__) +require "mail/ses/version" Gem::Specification.new do |s| - s.name = 'mail-ses' - s.version = Mail::SES::VERSION - s.licenses = ['MIT'] - s.summary = 'Ruby Mail delivery method handler for Amazon SES' - s.description = 'Ruby Mail delivery method handler for Amazon SES' - s.authors = ['Johnny Shields'] - s.email = 'info@tablecheck.com' - s.files = Dir.glob('lib/**/*') + %w[CHANGELOG.md LICENSE README.md] - s.homepage = 'https://github.com/tablecheck/mail-ses' - s.required_ruby_version = '>= 2.6.0' + s.name = "mail-ses" + s.version = Mail::SES::VERSION + s.licenses = ["MIT"] + s.summary = "Ruby Mail delivery method handler for Amazon SES" + s.description = "Ruby Mail delivery method handler for Amazon SES" + s.authors = ["Johnny Shields"] + s.email = "info@tablecheck.com" + s.files = Dir.glob("lib/**/*") + %w[CHANGELOG.md LICENSE README.md] + s.homepage = "https://github.com/tablecheck/mail-ses" + s.required_ruby_version = ">= 2.6.0" - s.add_dependency('aws-sdk-sesv2', '>= 1.27') - s.add_dependency('mail', '>= 2.8.1') - s.add_development_dependency('net-smtp') - s.add_development_dependency('nokogiri') - s.add_development_dependency('rake', '>= 1') - s.add_development_dependency('rspec', '>= 3.8') - s.add_development_dependency('rubocop', '~> 1.30.1') + s.add_dependency("aws-sdk-sesv2", ">= 1.27") + s.add_dependency("mail", ">= 2.8.1") + s.add_development_dependency("net-smtp") + s.add_development_dependency("nokogiri") + s.add_development_dependency("rake", ">= 1") + s.add_development_dependency("rspec", ">= 3.8") + s.add_development_dependency("standard", "1.41.1") - s.metadata['rubygems_mfa_required'] = 'true' + s.metadata["rubygems_mfa_required"] = "true" end