From c1f117752cce23a21379a1b34341fac904950618 Mon Sep 17 00:00:00 2001 From: Cuong Tran Date: Sun, 13 Jun 2021 13:05:02 -0700 Subject: [PATCH 1/2] Remove support for Ruby < 2.4 --- .github/workflows/ci.yml | 9 ++++++--- .tool-versions | 1 + Gemfile | 7 +++++-- Guardfile | 2 +- Rakefile | 4 ++-- 5 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 .tool-versions diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 953cc7013..efeab9dec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,14 +24,17 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - bundler-cache: true + bundler-cache: false - name: Install sqlite run: | sudo apt-get install libsqlite3-dev + - name: Install dependencies + run: bundle install + - name: Run Tests run: INTEGRATION_TESTS=1 bundle exec rspec - - name: Rubocop - run: bundle exec rubocop + # - name: Rubocop + # run: bundle exec rubocop diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 000000000..9b6768d19 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +ruby 2.6.7 diff --git a/Gemfile b/Gemfile index 184fe0ba4..4acd9cb84 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' -ruby '>= 2.2.0' +ruby '>= 2.4.0' gem 'activerecord', '>= 4.2.5', '< 6', require: false gem 'rake', require: false @@ -20,7 +20,10 @@ group :development, :test do gem 'rspec', require: false gem 'rubocop', '~> 0.68.1', require: false unless RUBY_VERSION =~ /^1.8/ - gem 'simplecov', require: false + # gem 'rubocop', '~> 1.12', require: false + # gem 'rubocop-rake', require: false + # gem 'rubocop-rspec', require: false + # gem 'simplecov', require: false gem 'terminal-notifier-guard', require: false gem 'codeclimate-test-reporter' diff --git a/Guardfile b/Guardfile index 602c7b57c..f93bc135e 100644 --- a/Guardfile +++ b/Guardfile @@ -1,4 +1,4 @@ -# Note: The cmd option is now required due to the increasing number of ways +# NOTE: The cmd option is now required due to the increasing number of ways # rspec may be run, below are examples of the most common uses. # * bundler: 'bundle exec rspec' # * bundler binstubs: 'bin/rspec' diff --git a/Rakefile b/Rakefile index bfbd51b7d..43944f2dc 100644 --- a/Rakefile +++ b/Rakefile @@ -3,7 +3,7 @@ def exit_exception(e) exit e.status_code end -# Note : this causes annoying psych warnings under Ruby 1.9.2-p180; to fix, upgrade to 1.9.3 +# NOTE: this causes annoying psych warnings under Ruby 1.9.2-p180; to fix, upgrade to 1.9.3 begin require 'bundler' Bundler.setup(:default, :development) @@ -162,7 +162,7 @@ namespace :integration do fixtures[Digest::MD5.hexdigest(File.read(fname))] = File.expand_path(fname) end - candidates.keys.each do |digest| + candidates.each_key do |digest| next unless fixtures.key?(digest) candidates[digest].each do |fname| # Double-check contents in case of hash collision... From bde60764779cf08e4ce7bc6a779de7e96448e70b Mon Sep 17 00:00:00 2001 From: Cuong Tran Date: Sun, 13 Jun 2021 17:09:18 -0700 Subject: [PATCH 2/2] fixup! Remove support for Ruby < 2.4 --- .github/workflows/ci.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index efeab9dec..953cc7013 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,17 +24,14 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - bundler-cache: false + bundler-cache: true - name: Install sqlite run: | sudo apt-get install libsqlite3-dev - - name: Install dependencies - run: bundle install - - name: Run Tests run: INTEGRATION_TESTS=1 bundle exec rspec - # - name: Rubocop - # run: bundle exec rubocop + - name: Rubocop + run: bundle exec rubocop