diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml new file mode 100644 index 0000000..78974b5 --- /dev/null +++ b/.github/workflows/rubocop.yml @@ -0,0 +1,17 @@ +name: lint + +on: [push, pull_request] + +jobs: + lint: + name: RuboCop + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.1.2" + bundler-cache: true + - name: Run RuboCop + run: bundle exec rubocop \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9e6b88c..b3a0b92 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,25 +1,32 @@ -name: Tests +name: test + on: [push, pull_request] + jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: ruby/setup-ruby@v1 + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Firefox + uses: browser-actions/setup-firefox@latest with: - ruby-version: 3.0.5 - - uses: supercharge/mongodb-github-action@1.7.0 + firefox-version: "108.0" + - name: Download geckodriver + uses: browser-actions/setup-geckodriver@latest with: - mongodb-version: 5.0 - - uses: browser-actions/setup-geckodriver@latest + geckodriver-version: "0.32.0" + - name: Set up Ruby + uses: ruby/setup-ruby@v1 with: - geckodriver-version: 0.18.0 - - uses: browser-actions/setup-firefox@latest + ruby-version: "3.1.2" + bundler-cache: true + - name: Start MongoDB + uses: supercharge/mongodb-github-action@1.7.0 with: - firefox-version: '54.0' - - run: | - bundle install - - uses: GabrielBB/xvfb-action@v1 - with: - run: | - bundle exec rake + mongodb-version: "5" + mongodb-db: slack_arena_test + - name: Run tests + uses: GabrielBB/xvfb-action@v1 + with: + run: bundle exec rake spec \ No newline at end of file diff --git a/.ruby-version b/.ruby-version index eca690e..ef538c2 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.0.5 +3.1.2 diff --git a/CHANGELOG.md b/CHANGELOG.md index f105fcd..2722b60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ ### Change Log + +* [#212](https://github.com/dblock/slack-gamebot/pull/212): Upgraded to Ruby 3.1.2 - [@dblock](https://github.com/dblock). * [#189](https://github.com/dblock/slack-gamebot/pull/189): Capped user tau at 11 for elo scoring - [@eddycurry](https://github.com/eddycurry). * [#166](https://github.com/dblock/slack-gamebot/issues/166): Challenge anyone to a game with `challenge @here` or `challenge @channel` - [@dblock](https://github.com/dblock). * [#159](https://github.com/dblock/slack-gamebot/issues/159): The `unsubscribe` command will only turn off auto-renew instead of canceling immediately - [@dblock](https://github.com/dblock). diff --git a/Gemfile b/Gemfile index 24964b6..9356af6 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'http://rubygems.org' -ruby '3.0.5' +ruby '3.1.2' gem 'hashie', '3.4.6' gem 'irb' @@ -45,7 +45,7 @@ group :test do gem 'fabrication' gem 'faker' gem 'hyperclient' - gem 'rack-test' + gem 'rack-test', '~> 1.1.0' gem 'rspec' gem 'selenium-webdriver' gem 'timecop' diff --git a/Gemfile.lock b/Gemfile.lock index 882dc40..9853eaf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,8 +9,8 @@ GEM 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) async (1.30.2) console (~> 1.10) @@ -23,7 +23,7 @@ GEM websocket-driver (~> 0.7.0) bson (4.15.0) builder (3.2.4) - capybara (3.36.0) + capybara (3.38.0) addressable matrix mini_mime (>= 0.1.3) @@ -99,7 +99,7 @@ GEM fiber-local (1.0.0) foreman (0.87.2) gli (2.21.0) - grape (1.6.2) + grape (1.7.0) activesupport builder dry-types (>= 1.1) @@ -140,7 +140,7 @@ GEM mime-types-data (~> 3.2015) mime-types-data (3.2022.0105) mini_mime (1.1.2) - mini_portile2 (2.8.0) + mini_portile2 (2.8.1) minitest (5.15.0) mongo (2.15.1) bson (>= 4.8.2, < 5.0.0) @@ -168,15 +168,15 @@ GEM netrc (0.11.0) newrelic_rpm (8.8.0) nio4r (2.5.8) - nokogiri (1.13.9) + nokogiri (1.14.0) mini_portile2 (~> 2.8.0) racc (~> 1.4) parallel (1.22.1) parser (3.1.2.0) ast (~> 2.4.1) - public_suffix (4.0.7) - racc (1.6.0) - rack (2.2.3.1) + public_suffix (5.0.1) + racc (1.6.2) + rack (2.2.5) rack-accept (0.4.5) rack (>= 0.4) rack-cors (1.1.1) @@ -191,7 +191,7 @@ GEM rainbow (3.1.1) raindrops (0.20.0) rake (12.3.3) - regexp_parser (2.5.0) + regexp_parser (2.6.1) reline (0.3.1) io-console (~> 0.5) representable (3.2.0) @@ -332,7 +332,7 @@ DEPENDENCIES newrelic_rpm rack-robotz rack-server-pages - rack-test + rack-test (~> 1.1.0) rake (~> 12.3) roar rspec @@ -356,7 +356,7 @@ DEPENDENCIES webrick RUBY VERSION - ruby 3.0.5p211 + ruby 3.1.2p20 BUNDLED WITH 2.3.26