diff --git a/.github/workflows/legacy_ruby.yml b/.github/workflows/legacy_ruby.yml deleted file mode 100644 index abcfb36..0000000 --- a/.github/workflows/legacy_ruby.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: Legacy Ruby specs - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -permissions: - contents: read - -jobs: - test: - name: Legacy Ruby specs - runs-on: ubuntu-latest - - strategy: - matrix: - ruby-version: ['2.1', '2.2', '2.3', '2.4', '2.5'] - gemfile: [am_3.2, am_4.0, am_4.1, am_4.2, am_5.0, am_5.1, am_5.2, am_6.0, am_6.1] - channel: [stable] - - exclude: - - ruby-version: '2.1' - gemfile: am_5.0 - - ruby-version: '2.1' - gemfile: am_5.1 - - ruby-version: '2.1' - gemfile: am_5.2 - - ruby-version: '2.1' - gemfile: am_6.0 - - ruby-version: '2.1' - gemfile: am_6.1 - - - ruby-version: '2.2' - gemfile: am_6.0 - - ruby-version: '2.2' - gemfile: am_6.1 - - - ruby-version: '2.3' - gemfile: am_4.0 - - ruby-version: '2.3' - gemfile: am_4.1 - - ruby-version: '2.3' - gemfile: am_6.0 - - ruby-version: '2.3' - gemfile: am_6.1 - - - ruby-version: '2.4' - gemfile: am_3.2 - - ruby-version: '2.4' - gemfile: am_4.0 - - ruby-version: '2.4' - gemfile: am_4.1 - - ruby-version: '2.4' - gemfile: am_6.0 - - ruby-version: '2.4' - gemfile: am_6.1 - - - ruby-version: '2.5' - gemfile: am_3.2 - - ruby-version: '2.5' - gemfile: am_4.0 - - ruby-version: '2.5' - gemfile: am_4.1 - - ruby-version: '2.5' - gemfile: am_4.2 - - env: - BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile - TEST_CONFIG: ./spec/config.github.yml - - # Ruby < 2.3 fail with segmentation fault so they are allowed to fail - # On ubuntu-20.04, also 2.3 fails, maybe this is an issue with libcurl - # (should investigate) - continue-on-error: ${{ matrix.channel != 'stable' || matrix.ruby < '2.3' }} - - steps: - - uses: actions/checkout@v4 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby-version }} - bundler-cache: true - - name: Run specs - run: bundle exec rake spec diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 6cb6b2d..f6314e9 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -16,8 +16,8 @@ jobs: strategy: matrix: - ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2', '3.3'] - gemfile: [am_6.0, am_6.1, am_7.0, am_7.1] + ruby-version: ['3.0', '3.1', '3.2', '3.3'] + gemfile: [am_7.0, am_7.1] channel: [stable] include: @@ -43,30 +43,8 @@ jobs: gemfile: am_edge channel: experimental - exclude: - - ruby-version: '2.6' - gemfile: am_7.0 - - ruby-version: '2.6' - gemfile: am_7.1 - - - ruby-version: '3.1' - gemfile: am_6.0 - - ruby-version: '3.1' - gemfile: am_6.1 - - - ruby-version: '3.2' - gemfile: am_6.0 - - ruby-version: '3.2' - gemfile: am_6.1 - - - ruby-version: '3.3' - gemfile: am_6.0 - - ruby-version: '3.3' - gemfile: am_6.1 - env: BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile - TEST_CONFIG: ./spec/config.github.yml continue-on-error: ${{ matrix.channel != 'stable' }} diff --git a/Appraisals b/Appraisals index 11fb026..eda7b8b 100644 --- a/Appraisals +++ b/Appraisals @@ -1,63 +1,9 @@ -appraise 'am-3.2' do - gem 'activemodel', "~> 3.2.0" - gem 'activesupport', "~> 3.2.0" - gem 'dalli', '< 3' -end - -appraise 'am-4.0' do - gem 'activemodel', "~> 4.0.0" - gem 'activesupport', "~> 4.0.0" - gem 'dalli', '< 3' -end - -appraise 'am-4.1' do - gem 'activemodel', "~> 4.1.0" - gem 'activesupport', "~> 4.1.0" - gem 'dalli', '< 3' -end - -appraise 'am-4.2' do - gem 'activemodel', "~> 4.2.0" - gem 'activesupport', "~> 4.2.0" - gem 'dalli', '< 3' -end - -appraise 'am-5.0' do - gem 'activemodel', "~> 5.0.0" - gem 'activesupport', "~> 5.0.0" - gem 'dalli', '< 3' -end - -appraise 'am-5.1' do - gem 'activemodel', "~> 5.1.0" - gem 'activesupport', "~> 5.1.0" - gem 'dalli', '< 3' -end - -appraise 'am-5.2' do - gem 'activemodel', "~> 5.2.0" - gem 'activesupport', "~> 5.2.0" - gem 'dalli', '< 3' -end - -appraise 'am-6.0' do - gem 'activemodel', "~> 6.0.0" - gem 'activesupport', "~> 6.0.0" -end - -appraise 'am-6.1' do - gem 'activemodel', "~> 6.1.0" - gem 'activesupport', "~> 6.1.0" -end - appraise 'am-7.0' do gem 'activemodel', "~> 7.0.0" - gem 'activesupport', "~> 7.0.0" end appraise 'am-7.1' do gem 'activemodel', "~> 7.1.0" - gem 'activesupport', "~> 7.1.0" end appraise 'am-edge' do diff --git a/Gemfile b/Gemfile index b082954..3c40517 100644 --- a/Gemfile +++ b/Gemfile @@ -2,3 +2,13 @@ source 'https://rubygems.org' # Specify your gem's dependencies in hawk.gemspec gemspec + +gem 'appraisal' +gem 'bundler' +gem 'byebug' +gem 'pry' +gem 'rake' +gem 'rspec' +gem 'simplecov' +gem 'webmock' +gem 'yard' diff --git a/README.md b/README.md index c94fc18..3fcca44 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Hawk [![Build Status](https://github.com/ifad/hawk/actions/workflows/ruby.yml/badge.svg)](https://github.com/ifad/hawk/actions) -[![Legacy Build Status](https://github.com/ifad/hawk/actions/workflows/legacy_ruby.yml/badge.svg)](https://github.com/ifad/hawk/actions) Hawk is an API Client framework. It is used as a base to then build your API clients. It consumes JSON and produces Ruby objects without any Hash magic. diff --git a/gemfiles/am_3.2.gemfile b/gemfiles/am_3.2.gemfile deleted file mode 100644 index bb4b628..0000000 --- a/gemfiles/am_3.2.gemfile +++ /dev/null @@ -1,9 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "activemodel", "~> 3.2.0" -gem "activesupport", "~> 3.2.0" -gem "dalli", "< 3" - -gemspec path: "../" diff --git a/gemfiles/am_4.0.gemfile b/gemfiles/am_4.0.gemfile deleted file mode 100644 index 51fe262..0000000 --- a/gemfiles/am_4.0.gemfile +++ /dev/null @@ -1,9 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "activemodel", "~> 4.0.0" -gem "activesupport", "~> 4.0.0" -gem "dalli", "< 3" - -gemspec path: "../" diff --git a/gemfiles/am_4.1.gemfile b/gemfiles/am_4.1.gemfile deleted file mode 100644 index f5d3568..0000000 --- a/gemfiles/am_4.1.gemfile +++ /dev/null @@ -1,9 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "activemodel", "~> 4.1.0" -gem "activesupport", "~> 4.1.0" -gem "dalli", "< 3" - -gemspec path: "../" diff --git a/gemfiles/am_4.2.gemfile b/gemfiles/am_4.2.gemfile deleted file mode 100644 index 97a780f..0000000 --- a/gemfiles/am_4.2.gemfile +++ /dev/null @@ -1,9 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "activemodel", "~> 4.2.0" -gem "activesupport", "~> 4.2.0" -gem "dalli", "< 3" - -gemspec path: "../" diff --git a/gemfiles/am_5.0.gemfile b/gemfiles/am_5.0.gemfile deleted file mode 100644 index 813e6ab..0000000 --- a/gemfiles/am_5.0.gemfile +++ /dev/null @@ -1,9 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "activemodel", "~> 5.0.0" -gem "activesupport", "~> 5.0.0" -gem "dalli", "< 3" - -gemspec path: "../" diff --git a/gemfiles/am_5.1.gemfile b/gemfiles/am_5.1.gemfile deleted file mode 100644 index 128f23f..0000000 --- a/gemfiles/am_5.1.gemfile +++ /dev/null @@ -1,9 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "activemodel", "~> 5.1.0" -gem "activesupport", "~> 5.1.0" -gem "dalli", "< 3" - -gemspec path: "../" diff --git a/gemfiles/am_5.2.gemfile b/gemfiles/am_5.2.gemfile deleted file mode 100644 index 8e3b959..0000000 --- a/gemfiles/am_5.2.gemfile +++ /dev/null @@ -1,9 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "activemodel", "~> 5.2.0" -gem "activesupport", "~> 5.2.0" -gem "dalli", "< 3" - -gemspec path: "../" diff --git a/gemfiles/am_6.0.gemfile b/gemfiles/am_6.0.gemfile deleted file mode 100644 index 7bd2b67..0000000 --- a/gemfiles/am_6.0.gemfile +++ /dev/null @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "activemodel", "~> 6.0.0" -gem "activesupport", "~> 6.0.0" - -gemspec path: "../" diff --git a/gemfiles/am_6.1.gemfile b/gemfiles/am_6.1.gemfile deleted file mode 100644 index 4424ecf..0000000 --- a/gemfiles/am_6.1.gemfile +++ /dev/null @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "activemodel", "~> 6.1.0" -gem "activesupport", "~> 6.1.0" - -gemspec path: "../" diff --git a/gemfiles/am_7.0.gemfile b/gemfiles/am_7.0.gemfile index a334cb1..f39df34 100644 --- a/gemfiles/am_7.0.gemfile +++ b/gemfiles/am_7.0.gemfile @@ -2,7 +2,15 @@ source "https://rubygems.org" +gem "appraisal" +gem "bundler" +gem "byebug" +gem "pry" +gem "rake" +gem "rspec" +gem "simplecov" +gem "webmock" +gem "yard" gem "activemodel", "~> 7.0.0" -gem "activesupport", "~> 7.0.0" gemspec path: "../" diff --git a/gemfiles/am_7.1.gemfile b/gemfiles/am_7.1.gemfile index cf0b8c9..111261c 100644 --- a/gemfiles/am_7.1.gemfile +++ b/gemfiles/am_7.1.gemfile @@ -2,7 +2,15 @@ source "https://rubygems.org" +gem "appraisal" +gem "bundler" +gem "byebug" +gem "pry" +gem "rake" +gem "rspec" +gem "simplecov" +gem "webmock" +gem "yard" gem "activemodel", "~> 7.1.0" -gem "activesupport", "~> 7.1.0" gemspec path: "../" diff --git a/gemfiles/am_edge.gemfile b/gemfiles/am_edge.gemfile index afd0926..072c333 100644 --- a/gemfiles/am_edge.gemfile +++ b/gemfiles/am_edge.gemfile @@ -2,6 +2,15 @@ source "https://rubygems.org" +gem "appraisal" +gem "bundler" +gem "byebug" +gem "pry" +gem "rake" +gem "rspec" +gem "simplecov" +gem "webmock" +gem "yard" gem "activemodel", git: "https://github.com/rails/rails.git" gem "activesupport", git: "https://github.com/rails/rails.git" diff --git a/hawk.gemspec b/hawk.gemspec index dd6b15c..df4a485 100644 --- a/hawk.gemspec +++ b/hawk.gemspec @@ -19,20 +19,18 @@ Gem::Specification.new do |spec| spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] + spec.metadata = { + 'bug_tracker_uri' => 'https://github.com/ifad/hawk/issues', + 'homepage_uri' => 'https://github.com/ifad/hawk', + 'source_code_uri' => 'https://github.com/ifad/hawk', + 'rubygems_mfa_required' => 'true' + } + + spec.required_ruby_version = '>= 3.0' + spec.add_dependency 'typhoeus' - spec.add_dependency 'ethon', '>= 0.7.4' + spec.add_dependency 'ethon', '>= 0.16.0' spec.add_dependency 'multi_json' spec.add_dependency 'dalli' - spec.add_dependency 'activesupport', '>= 3.0.0' - spec.add_dependency 'activemodel', '>= 3.0.0' - - spec.add_development_dependency 'bundler' - spec.add_development_dependency 'rake' - spec.add_development_dependency 'pry' - spec.add_development_dependency 'byebug' - spec.add_development_dependency 'rspec' - spec.add_development_dependency 'webmock' - spec.add_development_dependency 'simplecov' - spec.add_development_dependency 'appraisal' - spec.add_development_dependency 'yard' + spec.add_dependency 'activemodel', '>= 7.0' end diff --git a/lib/hawk/version.rb b/lib/hawk/version.rb index af2e948..2b96cc1 100644 --- a/lib/hawk/version.rb +++ b/lib/hawk/version.rb @@ -1,3 +1,3 @@ module Hawk - VERSION = "1.0.0" + VERSION = "2.0.0" end