diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e763de5..23a80316 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ '**' ] + branches: ["**"] env: RACK_ENV: development @@ -24,7 +24,6 @@ jobs: fail-fast: false matrix: ruby: - - "2.3" - "2.4" - "2.5" - "2.6" @@ -32,24 +31,28 @@ jobs: - "3.0" - "3.1" - "3.2" + - "3.3" - "jruby-9.4" + rack: + - "2" + - "3" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - bundler-cache: true - rubygems: ${{ matrix.ruby <= '2.5' && '3.3.26' || 'latest' }} + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + rubygems: ${{ matrix.ruby <= '2.5' && '3.3.26' || 'latest' }} - - name: Set up Minio - run: | - mkdir -p "${GITHUB_WORKSPACE}"/minio/data/minio-bucket - wget -nc -O "${GITHUB_WORKSPACE}"/minio/minio https://dl.min.io/server/minio/release/linux-amd64/minio - chmod +x "${GITHUB_WORKSPACE}"/minio/minio - ${GITHUB_WORKSPACE}/minio/minio server ${GITHUB_WORKSPACE}/minio/data --address localhost:9000 &>${GITHUB_WORKSPACE}/minio/data/server.log & + - name: Set up Minio + run: | + mkdir -p "${GITHUB_WORKSPACE}"/minio/data/minio-bucket + wget -nc -O "${GITHUB_WORKSPACE}"/minio/minio https://dl.min.io/server/minio/release/linux-amd64/minio + chmod +x "${GITHUB_WORKSPACE}"/minio/minio + ${GITHUB_WORKSPACE}/minio/minio server ${GITHUB_WORKSPACE}/minio/data --address localhost:9000 &>${GITHUB_WORKSPACE}/minio/data/server.log & - - name: Run tests - run: bundle exec rake test + - name: Run tests + run: bundle exec appraisal rack-${{ matrix.rack }} rake test diff --git a/Appraisals b/Appraisals new file mode 100644 index 00000000..f5b330cf --- /dev/null +++ b/Appraisals @@ -0,0 +1,7 @@ +appraise "rack-2" do + gem "rack", "~> 2" +end + +appraise "rack-3" do + gem "rack", "~> 3" +end diff --git a/gemfiles/rack_2.gemfile b/gemfiles/rack_2.gemfile new file mode 100644 index 00000000..0b47a3a3 --- /dev/null +++ b/gemfiles/rack_2.gemfile @@ -0,0 +1,10 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "pry" +gem "simplecov" +gem "hanna", require: false +gem "rack", "~> 2" + +gemspec path: "../" diff --git a/gemfiles/rack_2.gemfile.lock b/gemfiles/rack_2.gemfile.lock new file mode 100644 index 00000000..c74a7331 --- /dev/null +++ b/gemfiles/rack_2.gemfile.lock @@ -0,0 +1,161 @@ +PATH + remote: .. + specs: + shrine (3.5.0) + content_disposition (~> 1.0) + down (~> 5.1) + +GEM + remote: https://rubygems.org/ + specs: + activemodel (7.1.3.2) + activesupport (= 7.1.3.2) + activerecord (7.1.3.2) + activemodel (= 7.1.3.2) + activesupport (= 7.1.3.2) + timeout (>= 0.4.0) + activesupport (7.1.3.2) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + aws-eventstream (1.3.0) + aws-partitions (1.904.0) + aws-sdk-core (3.191.5) + aws-eventstream (~> 1, >= 1.3.0) + aws-partitions (~> 1, >= 1.651.0) + aws-sigv4 (~> 1.8) + jmespath (~> 1, >= 1.6.1) + aws-sdk-kms (1.78.0) + aws-sdk-core (~> 3, >= 3.191.0) + aws-sigv4 (~> 1.1) + aws-sdk-s3 (1.146.1) + aws-sdk-core (~> 3, >= 3.191.0) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.8) + aws-sigv4 (1.8.0) + aws-eventstream (~> 1, >= 1.0.2) + base64 (0.2.0) + bigdecimal (3.1.7) + coderay (1.1.3) + concurrent-ruby (1.2.3) + connection_pool (2.4.1) + content_disposition (1.0.0) + docile (1.4.0) + down (5.4.1) + addressable (~> 2.8) + drb (2.2.1) + dry-configurable (1.1.0) + dry-core (~> 1.0, < 2) + zeitwerk (~> 2.6) + dry-core (1.0.1) + concurrent-ruby (~> 1.0) + zeitwerk (~> 2.6) + dry-events (1.0.1) + concurrent-ruby (~> 1.0) + dry-core (~> 1.0, < 2) + dry-monitor (1.0.1) + dry-configurable (~> 1.0, < 2) + dry-core (~> 1.0, < 2) + dry-events (~> 1.0, < 2) + fastimage (2.3.0) + ffi (1.16.3) + hanna (1.5.0) + rdoc (>= 4) + http-form_data (2.3.0) + i18n (1.14.4) + concurrent-ruby (~> 1.0) + jmespath (1.6.2) + marcel (1.0.4) + method_source (1.0.0) + mime-types (3.5.2) + mime-types-data (~> 3.2015) + mime-types-data (3.2024.0305) + mimemagic (0.4.3) + nokogiri (~> 1) + rake + mini_magick (4.12.0) + mini_mime (1.1.5) + minitest (5.22.3) + mocha (1.16.1) + mutex_m (0.2.0) + nokogiri (1.16.3-arm64-darwin) + racc (~> 1.4) + pry (0.14.2) + coderay (~> 1.1) + method_source (~> 1.0) + psych (5.1.2) + stringio + public_suffix (5.0.4) + racc (1.7.3) + rack (2.2.9) + rack-test_app (1.1.0) + rack + rake (13.1.0) + rdoc (6.6.3.1) + psych (>= 4.0.0) + rexml (3.2.6) + ruby-filemagic (0.7.3) + ruby-vips (2.2.1) + ffi (~> 1.12) + sequel (5.78.0) + bigdecimal + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) + sqlite3 (1.7.3-arm64-darwin) + stringio (3.1.0) + thor (1.3.1) + timeout (0.4.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + zeitwerk (2.6.13) + +PLATFORMS + arm64-darwin + +DEPENDENCIES + activerecord (~> 7.0) + activesupport (~> 7.0) + appraisal (~> 2.5) + aws-sdk-core (~> 3.23) + aws-sdk-s3 (~> 1.69) + dry-monitor + fastimage + hanna + http-form_data (~> 2.2) + marcel + mime-types + mimemagic (>= 0.3.2) + mini_magick (~> 4.0) + mini_mime (~> 1.0) + minitest (~> 5.8) + mocha (~> 1.11) + pry + rack (~> 2) + rack-test_app + rake (>= 11.1) + rexml + ruby-filemagic (~> 0.7) + ruby-vips (~> 2.0) + sequel + shrine! + simplecov + sqlite3 (~> 1.4) + +BUNDLED WITH + 2.5.4 diff --git a/gemfiles/rack_3.gemfile b/gemfiles/rack_3.gemfile new file mode 100644 index 00000000..c3394c64 --- /dev/null +++ b/gemfiles/rack_3.gemfile @@ -0,0 +1,10 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "pry" +gem "simplecov" +gem "hanna", require: false +gem "rack", "~> 3" + +gemspec path: "../" diff --git a/gemfiles/rack_3.gemfile.lock b/gemfiles/rack_3.gemfile.lock new file mode 100644 index 00000000..8276eed9 --- /dev/null +++ b/gemfiles/rack_3.gemfile.lock @@ -0,0 +1,161 @@ +PATH + remote: .. + specs: + shrine (3.5.0) + content_disposition (~> 1.0) + down (~> 5.1) + +GEM + remote: https://rubygems.org/ + specs: + activemodel (7.1.3.2) + activesupport (= 7.1.3.2) + activerecord (7.1.3.2) + activemodel (= 7.1.3.2) + activesupport (= 7.1.3.2) + timeout (>= 0.4.0) + activesupport (7.1.3.2) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + aws-eventstream (1.3.0) + aws-partitions (1.904.0) + aws-sdk-core (3.191.5) + aws-eventstream (~> 1, >= 1.3.0) + aws-partitions (~> 1, >= 1.651.0) + aws-sigv4 (~> 1.8) + jmespath (~> 1, >= 1.6.1) + aws-sdk-kms (1.78.0) + aws-sdk-core (~> 3, >= 3.191.0) + aws-sigv4 (~> 1.1) + aws-sdk-s3 (1.146.1) + aws-sdk-core (~> 3, >= 3.191.0) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.8) + aws-sigv4 (1.8.0) + aws-eventstream (~> 1, >= 1.0.2) + base64 (0.2.0) + bigdecimal (3.1.7) + coderay (1.1.3) + concurrent-ruby (1.2.3) + connection_pool (2.4.1) + content_disposition (1.0.0) + docile (1.4.0) + down (5.4.1) + addressable (~> 2.8) + drb (2.2.1) + dry-configurable (1.1.0) + dry-core (~> 1.0, < 2) + zeitwerk (~> 2.6) + dry-core (1.0.1) + concurrent-ruby (~> 1.0) + zeitwerk (~> 2.6) + dry-events (1.0.1) + concurrent-ruby (~> 1.0) + dry-core (~> 1.0, < 2) + dry-monitor (1.0.1) + dry-configurable (~> 1.0, < 2) + dry-core (~> 1.0, < 2) + dry-events (~> 1.0, < 2) + fastimage (2.3.0) + ffi (1.16.3) + hanna (1.5.0) + rdoc (>= 4) + http-form_data (2.3.0) + i18n (1.14.4) + concurrent-ruby (~> 1.0) + jmespath (1.6.2) + marcel (1.0.4) + method_source (1.0.0) + mime-types (3.5.2) + mime-types-data (~> 3.2015) + mime-types-data (3.2024.0305) + mimemagic (0.4.3) + nokogiri (~> 1) + rake + mini_magick (4.12.0) + mini_mime (1.1.5) + minitest (5.22.3) + mocha (1.16.1) + mutex_m (0.2.0) + nokogiri (1.16.3-arm64-darwin) + racc (~> 1.4) + pry (0.14.2) + coderay (~> 1.1) + method_source (~> 1.0) + psych (5.1.2) + stringio + public_suffix (5.0.4) + racc (1.7.3) + rack (3.0.10) + rack-test_app (1.1.0) + rack + rake (13.1.0) + rdoc (6.6.3.1) + psych (>= 4.0.0) + rexml (3.2.6) + ruby-filemagic (0.7.3) + ruby-vips (2.2.1) + ffi (~> 1.12) + sequel (5.78.0) + bigdecimal + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) + sqlite3 (1.7.3-arm64-darwin) + stringio (3.1.0) + thor (1.3.1) + timeout (0.4.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + zeitwerk (2.6.13) + +PLATFORMS + arm64-darwin + +DEPENDENCIES + activerecord (~> 7.0) + activesupport (~> 7.0) + appraisal (~> 2.5) + aws-sdk-core (~> 3.23) + aws-sdk-s3 (~> 1.69) + dry-monitor + fastimage + hanna + http-form_data (~> 2.2) + marcel + mime-types + mimemagic (>= 0.3.2) + mini_magick (~> 4.0) + mini_mime (~> 1.0) + minitest (~> 5.8) + mocha (~> 1.11) + pry + rack (~> 3) + rack-test_app + rake (>= 11.1) + rexml + ruby-filemagic (~> 0.7) + ruby-vips (~> 2.0) + sequel + shrine! + simplecov + sqlite3 (~> 1.4) + +BUNDLED WITH + 2.5.4 diff --git a/shrine.gemspec b/shrine.gemspec index 5c2c3a36..26912822 100644 --- a/shrine.gemspec +++ b/shrine.gemspec @@ -37,6 +37,7 @@ direct uploads for fully asynchronous user experience. gem.add_dependency "content_disposition", "~> 1.0" # general testing helpers + gem.add_development_dependency "appraisal", "~> 2.5" gem.add_development_dependency "rake", ">= 11.1" gem.add_development_dependency "minitest", "~> 5.8" gem.add_development_dependency "mocha", "~> 1.11"