From 7a58bb990ccdaf64335cced7672c221bf3ffcc9f Mon Sep 17 00:00:00 2001 From: Peter Goldstein Date: Sun, 23 Jan 2022 22:29:43 -0800 Subject: [PATCH 1/6] Add GitHub Actions for Tests, Lint --- .github/workflows/ci.yml | 22 +++++ .github/workflows/lint.yml | 23 +++++ Gemfile.lock | 184 ++++++++++++++++--------------------- quarantine.gemspec | 1 + 4 files changed, 127 insertions(+), 103 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1511777 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,22 @@ +name: Tests + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + ruby-version: [3.1, '3.0', 2.7, 2.6] + + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby ${{ matrix.ruby-version }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true # 'bundle install' and cache + - name: Run tests + run: bundle exec rspec diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..0ad516e --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,23 @@ +name: Lint + +on: [push, pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + + strategy: + matrix: + ruby-version: [2.7] + + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby ${{ matrix.ruby-version }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true # 'bundle install' and cache + - name: Sorbet + run: bundle exec srb tc + - name: Rubocop + run: bundle exec rubocop diff --git a/Gemfile.lock b/Gemfile.lock index d50112e..857f8b3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,6 +2,7 @@ PATH remote: . specs: quarantine (2.2.2) + activesupport (~> 6.1) rspec (~> 3.0) rspec-retry (~> 0.6) sorbet-runtime (~> 0.5.6338) @@ -9,64 +10,55 @@ PATH GEM remote: https://rubygems.org/ specs: - abstract_type (0.0.7) - activesupport (6.1.0) + activesupport (6.1.4.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) - adamantium (0.2.0) - ice_nine (~> 0.11.0) - memoizable (~> 0.4.0) addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) - anima (0.3.2) - abstract_type (~> 0.0.7) - adamantium (~> 0.2) - equalizer (~> 0.0.11) - ast (2.4.1) - aws-eventstream (1.1.1) - aws-partitions (1.436.0) - aws-sdk-core (3.113.0) + ast (2.4.2) + aws-eventstream (1.2.0) + aws-partitions (1.549.0) + aws-sdk-core (3.125.5) aws-eventstream (~> 1, >= 1.0.2) - aws-partitions (~> 1, >= 1.239.0) + aws-partitions (~> 1, >= 1.525.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) - aws-sdk-dynamodb (1.60.0) - aws-sdk-core (~> 3, >= 3.112.0) + aws-sdk-dynamodb (1.70.0) + aws-sdk-core (~> 3, >= 3.125.0) aws-sigv4 (~> 1.1) - aws-sigv4 (1.2.3) + aws-sigv4 (1.4.0) aws-eventstream (~> 1, >= 1.0.2) coderay (1.1.3) - colorize (0.8.1) - concord (0.1.6) - adamantium (~> 0.2.0) - equalizer (~> 0.0.9) - concurrent-ruby (1.1.7) + concurrent-ruby (1.1.9) declarative (0.0.20) - diff-lcs (1.4.4) - equalizer (0.0.11) - faraday (1.7.0) + diff-lcs (1.5.0) + faraday (1.9.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) - faraday-httpclient (~> 1.0.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.1) + faraday-net_http_persistent (~> 1.0) faraday-patron (~> 1.0) faraday-rack (~> 1.0) - multipart-post (>= 1.2, < 3) + faraday-retry (~> 1.0) ruby2_keywords (>= 0.0.4) faraday-em_http (1.0.0) faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) faraday-httpclient (1.0.1) + faraday-multipart (1.0.3) + multipart-post (>= 1.2, < 3) faraday-net_http (1.0.1) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) - google-apis-core (0.4.1) + faraday-retry (1.0.3) + google-apis-core (0.4.2) addressable (~> 2.5, >= 2.5.1) googleauth (>= 0.16.2, < 2.a) httpclient (>= 2.8.1, < 3.a) @@ -75,78 +67,67 @@ GEM retriable (>= 2.0, < 4.a) rexml webrick - google-apis-drive_v3 (0.13.0) + google-apis-drive_v3 (0.18.0) google-apis-core (>= 0.4, < 2.a) - google-apis-sheets_v4 (0.9.0) + google-apis-sheets_v4 (0.11.0) google-apis-core (>= 0.4, < 2.a) google_drive (3.0.7) google-apis-drive_v3 (>= 0.5.0, < 1.0.0) google-apis-sheets_v4 (>= 0.4.0, < 1.0.0) googleauth (>= 0.5.0, < 1.0.0) nokogiri (>= 1.5.3, < 2.0.0) - googleauth (0.17.0) + googleauth (0.17.1) faraday (>= 0.17.3, < 2.0) jwt (>= 1.4, < 3.0) memoist (~> 0.16) multi_json (~> 1.11) os (>= 0.9, < 2.0) - signet (~> 0.14) + signet (~> 0.15) httpclient (2.8.3) - i18n (1.8.5) + i18n (1.8.11) concurrent-ruby (~> 1.0) - ice_nine (0.11.2) - jmespath (1.4.0) - jwt (2.2.3) + jmespath (1.5.0) + jwt (2.3.0) memoist (0.16.2) - memoizable (0.4.2) - thread_safe (~> 0.3, >= 0.3.1) method_source (1.0.0) - mini_mime (1.1.0) - mini_portile2 (2.6.1) - minitest (5.14.2) - mprelude (0.1.0) - abstract_type (~> 0.0.7) - adamantium (~> 0.2.0) - concord (~> 0.1.5) - equalizer (~> 0.0.9) - ice_nine (~> 0.11.1) - procto (~> 0.0.2) + mini_mime (1.1.2) + mini_portile2 (2.7.1) + minitest (5.15.0) multi_json (1.15.0) multipart-post (2.1.1) - nokogiri (1.12.2) - mini_portile2 (~> 2.6.1) + nokogiri (1.13.1) + mini_portile2 (~> 2.7.0) racc (~> 1.4) - os (1.1.1) - parallel (1.20.1) - parser (2.7.2.0) + os (1.1.4) + parallel (1.21.0) + parser (3.1.0.0) ast (~> 2.4.1) - procto (0.0.3) pry (0.14.1) coderay (~> 1.1) method_source (~> 1.0) public_suffix (4.0.6) - racc (1.5.2) + racc (1.6.0) rack (2.2.3) - rainbow (3.0.0) - rbi (0.0.5) + rainbow (3.1.1) + rbi (0.0.9) ast parser - sorbet-runtime + sorbet-runtime (>= 0.5.9204) unparser - regexp_parser (2.0.0) + regexp_parser (2.2.0) representable (3.1.1) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) retriable (3.1.2) - rexml (3.2.4) + 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) + rspec-expectations (3.10.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) rspec-mocks (3.10.2) @@ -154,67 +135,64 @@ GEM rspec-support (~> 3.10.0) rspec-retry (0.6.2) rspec-core (> 3.3) - rspec-support (3.10.2) - rubocop (1.6.1) + rspec-support (3.10.3) + rubocop (1.25.0) parallel (~> 1.10) - parser (>= 2.7.1.5) + parser (>= 3.1.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml - rubocop-ast (>= 1.2.0, < 2.0) + rubocop-ast (>= 1.15.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (1.3.0) - parser (>= 2.7.1.5) - rubocop-rails (2.9.1) + unicode-display_width (>= 1.4.0, < 3.0) + rubocop-ast (1.15.1) + parser (>= 3.0.1.1) + rubocop-rails (2.13.2) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 0.90.0, < 2.0) - rubocop-sorbet (0.3.7) - ruby-progressbar (1.10.1) + rubocop (>= 1.7.0, < 2.0) + rubocop-sorbet (0.6.5) + rubocop (>= 0.90.0) + ruby-progressbar (1.11.0) ruby2_keywords (0.0.5) - signet (0.15.0) - addressable (~> 2.3) + signet (0.16.0) + addressable (~> 2.8) faraday (>= 0.17.3, < 2.0) jwt (>= 1.5, < 3.0) multi_json (~> 1.10) - sorbet (0.5.9297) - sorbet-static (= 0.5.9297) - sorbet-runtime (0.5.6338) - sorbet-static (0.5.9297-universal-darwin-14) - spoom (1.1.3) - colorize - sorbet (>= 0.5.6347) - sorbet-runtime + sorbet (0.5.9542) + sorbet-static (= 0.5.9542) + sorbet-runtime (0.5.9542) + sorbet-static (0.5.9542-universal-darwin-14) + spoom (1.1.8) + sorbet (>= 0.5.9204) + sorbet-runtime (>= 0.5.9204) thor (>= 0.19.2) - tapioca (0.5.2) + tapioca (0.5.6) bundler (>= 1.17.3) pry (>= 0.12.2) - rbi - sorbet-runtime - sorbet-static (>= 0.4.4471) - spoom + rbi (~> 0.0.0, >= 0.0.8) + sorbet-runtime (>= 0.5.9204) + sorbet-static (>= 0.5.9204) + spoom (~> 1.1.0, >= 1.1.4) thor (>= 0.19.2) - unparser - thor (1.1.0) - thread_safe (0.3.6) - trailblazer-option (0.1.1) + yard-sorbet + thor (1.2.1) + trailblazer-option (0.1.2) tzinfo (2.0.4) concurrent-ruby (~> 1.0) uber (0.1.0) - unicode-display_width (1.7.0) - unparser (0.5.5) - abstract_type (~> 0.0.7) - adamantium (~> 0.2.0) - anima (~> 0.3.1) - concord (~> 0.1.5) + unicode-display_width (2.1.0) + unparser (0.6.3) diff-lcs (~> 1.3) - equalizer (~> 0.0.9) - mprelude (~> 0.1.0) - parser (>= 2.6.5) - procto (~> 0.0.2) + parser (>= 3.1.0) webrick (1.7.0) - zeitwerk (2.4.2) + yard (0.9.27) + webrick (~> 1.7.0) + yard-sorbet (0.6.1) + sorbet-runtime (>= 0.5) + yard (>= 0.9) + zeitwerk (2.5.3) PLATFORMS ruby diff --git a/quarantine.gemspec b/quarantine.gemspec index 9bfa5bc..25180ba 100644 --- a/quarantine.gemspec +++ b/quarantine.gemspec @@ -18,6 +18,7 @@ Gem::Specification.new do |s| s.executables = ['quarantine_dynamodb'] s.required_ruby_version = '>= 2.0' + s.add_dependency('activesupport', '~> 6.1') s.add_dependency('rspec', '~> 3.0') s.add_dependency('rspec-retry', '~> 0.6') s.add_dependency('sorbet-runtime', '~> 0.5.6338') From f0c441e2595cd40ab1cef30d721a836c73ba820a Mon Sep 17 00:00:00 2001 From: Peter Goldstein Date: Sun, 29 Jan 2023 22:05:13 -0500 Subject: [PATCH 2/6] Add Ruby 3.2, upgrade checkout action versions --- .github/workflows/ci.yml | 4 ++-- .github/workflows/lint.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1511777..c8735ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,10 +9,10 @@ jobs: strategy: fail-fast: false matrix: - ruby-version: [3.1, '3.0', 2.7, 2.6] + ruby-version: [3.2, 3.1, '3.0', 2.7, 2.6] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Ruby ${{ matrix.ruby-version }} uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0ad516e..5f473e4 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,7 +11,7 @@ jobs: ruby-version: [2.7] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Ruby ${{ matrix.ruby-version }} uses: ruby/setup-ruby@v1 with: From 7f32c34de1ad91fd5ae7af782222d24bd56868e1 Mon Sep 17 00:00:00 2001 From: Peter Goldstein Date: Sun, 29 Jan 2023 22:18:57 -0500 Subject: [PATCH 3/6] Update gems in Gemfile.lock. Address lints. --- Gemfile.lock | 155 ++++++++++---------- spec/quarantine/cli_spec.rb | 1 + spec/quarantine/databases/dynamo_db_spec.rb | 1 + spec/quarantine/test_spec.rb | 1 + spec/quarantine_spec.rb | 1 + spec/spec_helper.rb | 1 + 6 files changed, 82 insertions(+), 78 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 857f8b3..82edadc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,32 +10,32 @@ PATH GEM remote: https://rubygems.org/ specs: - activesupport (6.1.4.4) + activesupport (6.1.7.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) aws-eventstream (1.2.0) - aws-partitions (1.549.0) - aws-sdk-core (3.125.5) + aws-partitions (1.701.0) + aws-sdk-core (3.170.0) aws-eventstream (~> 1, >= 1.0.2) - aws-partitions (~> 1, >= 1.525.0) + aws-partitions (~> 1, >= 1.651.0) + aws-sigv4 (~> 1.5) + jmespath (~> 1, >= 1.6.1) + aws-sdk-dynamodb (1.81.0) + aws-sdk-core (~> 3, >= 3.165.0) aws-sigv4 (~> 1.1) - jmespath (~> 1.0) - aws-sdk-dynamodb (1.70.0) - aws-sdk-core (~> 3, >= 3.125.0) - aws-sigv4 (~> 1.1) - aws-sigv4 (1.4.0) + aws-sigv4 (1.5.2) aws-eventstream (~> 1, >= 1.0.2) coderay (1.1.3) - concurrent-ruby (1.1.9) + concurrent-ruby (1.2.0) declarative (0.0.20) diff-lcs (1.5.0) - faraday (1.9.3) + faraday (1.10.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -51,14 +51,14 @@ GEM faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) faraday-httpclient (1.0.1) - faraday-multipart (1.0.3) - multipart-post (>= 1.2, < 3) + faraday-multipart (1.0.4) + multipart-post (~> 2) faraday-net_http (1.0.1) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) faraday-retry (1.0.3) - google-apis-core (0.4.2) + google-apis-core (0.10.0) addressable (~> 2.5, >= 2.5.1) googleauth (>= 0.16.2, < 2.a) httpclient (>= 2.8.1, < 3.a) @@ -67,10 +67,10 @@ GEM retriable (>= 2.0, < 4.a) rexml webrick - google-apis-drive_v3 (0.18.0) - google-apis-core (>= 0.4, < 2.a) - google-apis-sheets_v4 (0.11.0) - google-apis-core (>= 0.4, < 2.a) + google-apis-drive_v3 (0.33.0) + google-apis-core (>= 0.9.1, < 2.a) + google-apis-sheets_v4 (0.21.0) + google-apis-core (>= 0.9.1, < 2.a) google_drive (3.0.7) google-apis-drive_v3 (>= 0.5.0, < 1.0.0) google-apis-sheets_v4 (>= 0.4.0, < 1.0.0) @@ -84,88 +84,88 @@ GEM os (>= 0.9, < 2.0) signet (~> 0.15) httpclient (2.8.3) - i18n (1.8.11) + i18n (1.12.0) concurrent-ruby (~> 1.0) - jmespath (1.5.0) - jwt (2.3.0) + jmespath (1.6.2) + json (2.6.3) + jwt (2.6.0) memoist (0.16.2) method_source (1.0.0) mini_mime (1.1.2) - mini_portile2 (2.7.1) - minitest (5.15.0) + minitest (5.17.0) multi_json (1.15.0) - multipart-post (2.1.1) - nokogiri (1.13.1) - mini_portile2 (~> 2.7.0) + multipart-post (2.3.0) + nokogiri (1.14.0-x86_64-darwin) racc (~> 1.4) os (1.1.4) - parallel (1.21.0) - parser (3.1.0.0) + parallel (1.22.1) + parser (3.2.0.0) ast (~> 2.4.1) - pry (0.14.1) + pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - public_suffix (4.0.6) - racc (1.6.0) - rack (2.2.3) + public_suffix (5.0.1) + racc (1.6.2) + rack (3.0.4.1) rainbow (3.1.1) - rbi (0.0.9) + rbi (0.0.16) ast - parser + parser (>= 2.6.4.0) sorbet-runtime (>= 0.5.9204) unparser - regexp_parser (2.2.0) - representable (3.1.1) + regexp_parser (2.6.2) + representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) retriable (3.1.2) 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.2) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.0) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-mocks (3.10.2) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) + rspec-support (~> 3.12.0) rspec-retry (0.6.2) rspec-core (> 3.3) - rspec-support (3.10.3) - rubocop (1.25.0) + rspec-support (3.12.0) + rubocop (1.44.1) + json (~> 2.3) parallel (~> 1.10) - parser (>= 3.1.0.0) + parser (>= 3.2.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.15.1, < 2.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.24.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.15.1) - parser (>= 3.0.1.1) - rubocop-rails (2.13.2) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.24.1) + parser (>= 3.1.1.0) + rubocop-rails (2.17.4) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 1.7.0, < 2.0) - rubocop-sorbet (0.6.5) + rubocop (>= 1.33.0, < 2.0) + rubocop-sorbet (0.6.11) rubocop (>= 0.90.0) ruby-progressbar (1.11.0) ruby2_keywords (0.0.5) - signet (0.16.0) + signet (0.17.0) addressable (~> 2.8) - faraday (>= 0.17.3, < 2.0) + faraday (>= 0.17.5, < 3.a) jwt (>= 1.5, < 3.0) multi_json (~> 1.10) - sorbet (0.5.9542) - sorbet-static (= 0.5.9542) - sorbet-runtime (0.5.9542) - sorbet-static (0.5.9542-universal-darwin-14) - spoom (1.1.8) - sorbet (>= 0.5.9204) + sorbet (0.5.10634) + sorbet-static (= 0.5.10634) + sorbet-runtime (0.5.10634) + sorbet-static (0.5.10634-universal-darwin-22) + spoom (1.1.15) + sorbet (>= 0.5.10187) sorbet-runtime (>= 0.5.9204) thor (>= 0.19.2) tapioca (0.5.6) @@ -179,23 +179,22 @@ GEM yard-sorbet thor (1.2.1) trailblazer-option (0.1.2) - tzinfo (2.0.4) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) uber (0.1.0) - unicode-display_width (2.1.0) - unparser (0.6.3) + unicode-display_width (2.4.2) + unparser (0.6.7) diff-lcs (~> 1.3) - parser (>= 3.1.0) - webrick (1.7.0) - yard (0.9.27) - webrick (~> 1.7.0) - yard-sorbet (0.6.1) + parser (>= 3.2.0) + webrick (1.8.1) + yard (0.9.26) + yard-sorbet (0.8.0) sorbet-runtime (>= 0.5) yard (>= 0.9) - zeitwerk (2.5.3) + zeitwerk (2.6.6) PLATFORMS - ruby + x86_64-darwin-22 DEPENDENCIES aws-sdk-dynamodb (~> 1) @@ -208,4 +207,4 @@ DEPENDENCIES tapioca (~> 0.5.2) BUNDLED WITH - 2.1.4 + 2.4.5 diff --git a/spec/quarantine/cli_spec.rb b/spec/quarantine/cli_spec.rb index 8fbaf95..a312991 100644 --- a/spec/quarantine/cli_spec.rb +++ b/spec/quarantine/cli_spec.rb @@ -1,4 +1,5 @@ # typed: false + require 'spec_helper' require_relative '../../lib/quarantine/cli' diff --git a/spec/quarantine/databases/dynamo_db_spec.rb b/spec/quarantine/databases/dynamo_db_spec.rb index 561c04f..2d92f06 100644 --- a/spec/quarantine/databases/dynamo_db_spec.rb +++ b/spec/quarantine/databases/dynamo_db_spec.rb @@ -1,4 +1,5 @@ # typed: false + require 'spec_helper' describe Quarantine::Databases::DynamoDB do diff --git a/spec/quarantine/test_spec.rb b/spec/quarantine/test_spec.rb index 19baf55..498ba4b 100644 --- a/spec/quarantine/test_spec.rb +++ b/spec/quarantine/test_spec.rb @@ -1,4 +1,5 @@ # typed: false + require 'spec_helper' describe Quarantine::Test do diff --git a/spec/quarantine_spec.rb b/spec/quarantine_spec.rb index 4dbfcb2..433399a 100644 --- a/spec/quarantine_spec.rb +++ b/spec/quarantine_spec.rb @@ -1,4 +1,5 @@ # typed: false + require 'spec_helper' describe Quarantine do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 064d111..6f120a3 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,4 +1,5 @@ # typed: strict + require 'quarantine' require 'rspec/retry' From fc878ae042bcba070c9157e623d021b8a985b907 Mon Sep 17 00:00:00 2001 From: Peter Goldstein Date: Sun, 29 Jan 2023 22:21:16 -0500 Subject: [PATCH 4/6] Fix platform --- Gemfile.lock | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 82edadc..8fe1e98 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -97,6 +97,8 @@ GEM multipart-post (2.3.0) nokogiri (1.14.0-x86_64-darwin) racc (~> 1.4) + nokogiri (1.14.0-x86_64-linux) + racc (~> 1.4) os (1.1.4) parallel (1.22.1) parser (3.2.0.0) @@ -164,6 +166,7 @@ GEM sorbet-static (= 0.5.10634) sorbet-runtime (0.5.10634) sorbet-static (0.5.10634-universal-darwin-22) + sorbet-static (0.5.10634-x86_64-linux) spoom (1.1.15) sorbet (>= 0.5.10187) sorbet-runtime (>= 0.5.9204) @@ -195,6 +198,7 @@ GEM PLATFORMS x86_64-darwin-22 + x86_64-linux DEPENDENCIES aws-sdk-dynamodb (~> 1) From 2bc6fd5fd2f0f9bcc5a67d4b287c1b9e717b74e0 Mon Sep 17 00:00:00 2001 From: Peter Goldstein Date: Sun, 29 Jan 2023 22:25:51 -0500 Subject: [PATCH 5/6] Explicitly use hash argument in expectations --- spec/quarantine/databases/dynamo_db_spec.rb | 26 ++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/spec/quarantine/databases/dynamo_db_spec.rb b/spec/quarantine/databases/dynamo_db_spec.rb index 2d92f06..fe6dc77 100644 --- a/spec/quarantine/databases/dynamo_db_spec.rb +++ b/spec/quarantine/databases/dynamo_db_spec.rb @@ -129,19 +129,19 @@ a6: 'a6' } - expect(database.dynamodb).to receive(:create_table).with( - table_name: 'foo', - attribute_definitions: [ - { attribute_name: 'a1', attribute_type: 'S' }, - { attribute_name: 'a2', attribute_type: 'S' } - ], - key_schema: [ - { attribute_name: 'a1', key_type: 'HASH' }, - { attribute_name: 'a2', key_type: 'RANGE' } - ], - a3: { a4: 'a4', a5: 'a5' }, - a6: 'a6' - ) + expect(database.dynamodb).to receive(:create_table).with({ + table_name: 'foo', + attribute_definitions: [ + { attribute_name: 'a1', attribute_type: 'S' }, + { attribute_name: 'a2', attribute_type: 'S' } + ], + key_schema: [ + { attribute_name: 'a1', key_type: 'HASH' }, + { attribute_name: 'a2', key_type: 'RANGE' } + ], + a3: { a4: 'a4', a5: 'a5' }, + a6: 'a6' + }) database.create_table('foo', attributes, additional_arguments) end From b37fb1a242e6ba0547745c20fabd4e4ab9db9c9c Mon Sep 17 00:00:00 2001 From: Peter Goldstein Date: Sun, 29 Jan 2023 22:32:10 -0500 Subject: [PATCH 6/6] Remove Ruby 2.6 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8735ad..c297292 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - ruby-version: [3.2, 3.1, '3.0', 2.7, 2.6] + ruby-version: [3.2, 3.1, '3.0', 2.7] steps: - uses: actions/checkout@v3