From 09208ced3001fefc70fa1451f9fad268156d91dd Mon Sep 17 00:00:00 2001 From: kipsang Date: Fri, 1 May 2026 14:12:32 +0300 Subject: [PATCH 1/6] Upgrade Ruby and Rails version requirements to 4.0.1 and 8.1.2 respectively in .ruby-version, Gemfile, and gemspec for improved compatibility --- .ruby-version | 2 +- Gemfile | 4 ++-- spree_ipay.gemspec | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.ruby-version b/.ruby-version index 9c25013..1454f6e 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.6 +4.0.1 diff --git a/Gemfile b/Gemfile index 7672fee..167dd3d 100644 --- a/Gemfile +++ b/Gemfile @@ -2,10 +2,10 @@ source 'https://rubygems.org' gemspec -ruby "~> 3.3.6" +ruby "~> 4.0.1" gem 'spree', '>= 5.0', '< 6.0' -gem 'rails', '~> 7.2.0' +gem 'rails', '~> 8.1.2' group :development, :test do gem 'rubocop', '~> 1.58', require: false diff --git a/spree_ipay.gemspec b/spree_ipay.gemspec index 2a2b8fc..48c053a 100644 --- a/spree_ipay.gemspec +++ b/spree_ipay.gemspec @@ -14,10 +14,10 @@ Gem::Specification.new do |spec| spec.require_paths = ['lib'] spec.add_dependency 'spree', '>= 5.0', '< 6.0' - spec.required_ruby_version = '~> 3.3.6' + spec.required_ruby_version = '~> 4.0.1' - spec.add_dependency 'rails', '~> 7.2.0' - spec.add_dependency 'httparty', '~> 0.16.0' + spec.add_dependency 'rails', '~> 8.1.2' + spec.add_dependency 'httparty', '>= 0.17', '< 1.0' spec.add_dependency 'rack-attack', '~> 6.7' spec.add_dependency 'elastic-apm', '~> 4.8.0' From 51e1da56b82af21902ec448b876371307e9a22af Mon Sep 17 00:00:00 2001 From: kipsang Date: Fri, 1 May 2026 14:18:24 +0300 Subject: [PATCH 2/6] Update Ruby version in CI configuration to 4.0.1 for improved compatibility --- .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 eab1722..5d53ff0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.3.8 + ruby-version: 4.0.1 bundler-cache: true - name: Install SQLite and dependencies From 58ee16eadb43d9b5cfa9cdb272757eea8bd65e3b Mon Sep 17 00:00:00 2001 From: kipsang Date: Fri, 1 May 2026 14:26:00 +0300 Subject: [PATCH 3/6] Refactor CI configuration and update README to include SQLite installation instructions --- .github/workflows/ci.yml | 10 +++++----- README.md | 11 ++++++++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d53ff0..c46d80c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,17 +12,17 @@ jobs: steps: - uses: actions/checkout@v3 + + - name: Install SQLite and dependencies + run: | + sudo apt-get update + sudo apt-get install -y sqlite3 libsqlite3-dev - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: 4.0.1 bundler-cache: true - - - name: Install SQLite and dependencies - run: | - sudo apt-get update - sudo apt-get install -y sqlite3 libsqlite3-dev - name: Setup test environment env: diff --git a/README.md b/README.md index fff323a..84b2618 100644 --- a/README.md +++ b/README.md @@ -35,16 +35,21 @@ This gem integrates the iPay payment gateway with your Spree Commerce store, ena # OR gem 'spree_ipay', github: 'your-repo/spree_ipay' # If hosted on GitHub ``` -2. **Install the gem:** +2. **Install system dependencies for SQLite:** + ```bash + sudo apt-get install -y sqlite3 libsqlite3-dev + ``` + On macOS, install SQLite with Homebrew instead. +3. **Install the gem:** ```bash bundle install ``` -3. **Install migrations from the extension:** +4. **Install migrations from the extension:** ```bash bundle exec rails railties:install:migrations ``` This copies all iPay-related migrations from the extension to your main app. -4. **Run database migrations:** +5. **Run database migrations:** ```bash bundle exec rails db:migrate ``` From cf33f29396589ac19395b63228b42c40d0c8aa82 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 11:26:27 +0000 Subject: [PATCH 4/6] style: format code with Prettier and RuboCop This commit fixes the style issues introduced in 58ee16e according to the output from Prettier and RuboCop. Details: https://github.com/truehostcloud/spree_ipay/pull/30 --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 84b2618..95c024a 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,6 @@ Expected Parameters: ## Configuration 1. **In Spree Admin:** - - Go to `Configuration > Payment Methods` - Click "New Payment Method" - Choose `Spree::PaymentMethod::Ipay` as the provider From ade5cdee8d08183bd49b0e28a2f73d03cd7e786d Mon Sep 17 00:00:00 2001 From: kipsang Date: Fri, 1 May 2026 14:32:41 +0300 Subject: [PATCH 5/6] Upgrade Rails and HTTParty versions in Gemfile.lock for improved compatibility --- Gemfile.lock | 175 ++++++++++++++++++++++----------------------------- 1 file changed, 76 insertions(+), 99 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 74c38c1..69321d0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,57 +3,57 @@ PATH specs: spree_ipay (1.0.10) elastic-apm (~> 4.8.0) - httparty (~> 0.16.0) + httparty (>= 0.17, < 1.0) rack-attack (~> 6.7) - rails (~> 7.2.0) + rails (~> 8.1.2) spree (>= 5.0, < 6.0) GEM remote: https://rubygems.org/ specs: - actioncable (7.2.3.1) - actionpack (= 7.2.3.1) - activesupport (= 7.2.3.1) + action_text-trix (2.1.18) + railties + actioncable (8.1.3) + actionpack (= 8.1.3) + activesupport (= 8.1.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.2.3.1) - actionpack (= 7.2.3.1) - activejob (= 7.2.3.1) - activerecord (= 7.2.3.1) - activestorage (= 7.2.3.1) - activesupport (= 7.2.3.1) + actionmailbox (8.1.3) + actionpack (= 8.1.3) + activejob (= 8.1.3) + activerecord (= 8.1.3) + activestorage (= 8.1.3) + activesupport (= 8.1.3) mail (>= 2.8.0) - actionmailer (7.2.3.1) - actionpack (= 7.2.3.1) - actionview (= 7.2.3.1) - activejob (= 7.2.3.1) - activesupport (= 7.2.3.1) + actionmailer (8.1.3) + actionpack (= 8.1.3) + actionview (= 8.1.3) + activejob (= 8.1.3) + activesupport (= 8.1.3) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.2.3.1) - actionview (= 7.2.3.1) - activesupport (= 7.2.3.1) - cgi + actionpack (8.1.3) + actionview (= 8.1.3) + activesupport (= 8.1.3) nokogiri (>= 1.8.5) - racc - rack (>= 2.2.4, < 3.3) + rack (>= 2.2.4) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (7.2.3.1) - actionpack (= 7.2.3.1) - activerecord (= 7.2.3.1) - activestorage (= 7.2.3.1) - activesupport (= 7.2.3.1) + actiontext (8.1.3) + action_text-trix (~> 2.1.15) + actionpack (= 8.1.3) + activerecord (= 8.1.3) + activestorage (= 8.1.3) + activesupport (= 8.1.3) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.2.3.1) - activesupport (= 7.2.3.1) + actionview (8.1.3) + activesupport (= 8.1.3) builder (~> 3.1) - cgi erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) @@ -62,8 +62,8 @@ GEM activemodel (>= 6.1.4) activestorage (>= 6.1.4) activesupport (>= 6.1.4) - activejob (7.2.3.1) - activesupport (= 7.2.3.1) + activejob (8.1.3) + activesupport (= 8.1.3) globalid (>= 0.3.6) activemerchant (1.137.0) activesupport (>= 4.2) @@ -71,30 +71,31 @@ GEM i18n (>= 0.6.9) nokogiri (~> 1.4) rexml (~> 3.3, >= 3.3.4) - activemodel (7.2.3.1) - activesupport (= 7.2.3.1) - activerecord (7.2.3.1) - activemodel (= 7.2.3.1) - activesupport (= 7.2.3.1) + activemodel (8.1.3) + activesupport (= 8.1.3) + activerecord (8.1.3) + activemodel (= 8.1.3) + activesupport (= 8.1.3) timeout (>= 0.4.0) - activestorage (7.2.3.1) - actionpack (= 7.2.3.1) - activejob (= 7.2.3.1) - activerecord (= 7.2.3.1) - activesupport (= 7.2.3.1) + activestorage (8.1.3) + actionpack (= 8.1.3) + activejob (= 8.1.3) + activerecord (= 8.1.3) + activesupport (= 8.1.3) marcel (~> 1.0) - activesupport (7.2.3.1) + activesupport (8.1.3) base64 - benchmark (>= 0.3) bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + json logger (>= 1.4.2) - minitest (>= 5.1, < 6) + minitest (>= 5.1) securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) acts-as-taggable-on (13.0.0) activerecord (>= 7.1, < 8.2) zeitwerk (>= 2.4, < 3.0) @@ -126,7 +127,6 @@ GEM xpath (~> 3.2) carmen (1.1.3) activesupport (>= 3.0.0) - cgi (0.5.1) coderay (1.1.3) concurrent-ruby (1.3.5) connection_pool (2.5.3) @@ -159,14 +159,7 @@ GEM factory_bot (~> 6.2.0) railties (>= 5.0.0) ffaker (2.24.0) - ffi (1.17.2-aarch64-linux-gnu) - ffi (1.17.2-aarch64-linux-musl) - ffi (1.17.2-arm-linux-gnu) - ffi (1.17.2-arm-linux-musl) - ffi (1.17.2-arm64-darwin) - ffi (1.17.2-x86_64-darwin) - ffi (1.17.2-x86_64-linux-gnu) - ffi (1.17.2-x86_64-linux-musl) + ffi (1.17.2) ffi-compiler (1.3.2) ffi (>= 1.15.5) rake @@ -191,8 +184,9 @@ GEM http-cookie (1.0.8) domain_name (~> 0.5) http-form_data (2.3.0) - httparty (0.16.4) - mime-types (~> 3.0) + httparty (0.24.2) + csv + mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) i18n (1.14.7) concurrent-ruby (~> 1.0) @@ -225,14 +219,11 @@ GEM marcel (1.1.0) matrix (0.4.3) method_source (1.1.0) - mime-types (3.7.0) - logger - mime-types-data (~> 3.2025, >= 3.2025.0507) - mime-types-data (3.2025.0708) mini_magick (5.3.1) logger mini_mime (1.1.5) - minitest (5.25.5) + mini_portile2 (2.8.9) + minitest (5.27.0) mobility (1.3.2) i18n (>= 0.6.10, < 2) request_store (~> 1.0) @@ -250,7 +241,7 @@ GEM bigdecimal (~> 3.1) name_of_person (1.1.3) activesupport (>= 5.2.0) - net-imap (0.6.3) + net-imap (0.6.4) date net-protocol net-pop (0.1.2) @@ -260,21 +251,8 @@ GEM net-smtp (0.5.1) net-protocol nio4r (2.7.5) - nokogiri (1.18.8-aarch64-linux-gnu) - racc (~> 1.4) - nokogiri (1.18.8-aarch64-linux-musl) - racc (~> 1.4) - nokogiri (1.18.8-arm-linux-gnu) - racc (~> 1.4) - nokogiri (1.18.8-arm-linux-musl) - racc (~> 1.4) - nokogiri (1.18.8-arm64-darwin) - racc (~> 1.4) - nokogiri (1.18.8-x86_64-darwin) - racc (~> 1.4) - nokogiri (1.18.8-x86_64-linux-gnu) - racc (~> 1.4) - nokogiri (1.18.8-x86_64-linux-musl) + nokogiri (1.18.8) + mini_portile2 (~> 2.8.2) racc (~> 1.4) ostruct (0.6.3) pagy (43.4.4) @@ -313,20 +291,20 @@ GEM rack (>= 1.3) rackup (2.2.1) rack (>= 3) - rails (7.2.3.1) - actioncable (= 7.2.3.1) - actionmailbox (= 7.2.3.1) - actionmailer (= 7.2.3.1) - actionpack (= 7.2.3.1) - actiontext (= 7.2.3.1) - actionview (= 7.2.3.1) - activejob (= 7.2.3.1) - activemodel (= 7.2.3.1) - activerecord (= 7.2.3.1) - activestorage (= 7.2.3.1) - activesupport (= 7.2.3.1) + rails (8.1.3) + actioncable (= 8.1.3) + actionmailbox (= 8.1.3) + actionmailer (= 8.1.3) + actionpack (= 8.1.3) + actiontext (= 8.1.3) + actionview (= 8.1.3) + activejob (= 8.1.3) + activemodel (= 8.1.3) + activerecord (= 8.1.3) + activestorage (= 8.1.3) + activesupport (= 8.1.3) bundler (>= 1.15.0) - railties (= 7.2.3.1) + railties (= 8.1.3) rails-dom-testing (2.3.0) activesupport (>= 5.0.0) minitest @@ -334,10 +312,9 @@ GEM rails-html-sanitizer (1.6.2) loofah (~> 2.21) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - railties (7.2.3.1) - actionpack (= 7.2.3.1) - activesupport (= 7.2.3.1) - cgi + railties (8.1.3) + actionpack (= 8.1.3) + activesupport (= 8.1.3) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -496,9 +473,9 @@ GEM tzinfo (2.0.6) concurrent-ruby (~> 1.0) unaccent (0.4.0) - unicode-display_width (3.1.4) - unicode-emoji (~> 4.0, >= 4.0.4) - unicode-emoji (4.0.4) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) + unicode-emoji (4.2.0) uri (1.1.1) useragent (0.16.11) validates_zipcode (0.6.0) @@ -535,7 +512,7 @@ DEPENDENCIES ffaker (~> 2.23) pry (~> 0.14.1) pry-byebug (~> 3.10) - rails (~> 7.2.0) + rails (~> 8.1.2) rspec (~> 3.10) rspec-rails (~> 6.0.0) rubocop (~> 1.58) @@ -548,7 +525,7 @@ DEPENDENCIES webmock (~> 3.18) RUBY VERSION - ruby 3.3.8p144 + ruby 4.0.1p0 BUNDLED WITH 2.5.22 From 43c8f66938cb488c588d1de25bab8fd0dadcd898 Mon Sep 17 00:00:00 2001 From: kipsang Date: Fri, 1 May 2026 14:45:06 +0300 Subject: [PATCH 6/6] Move 'pry-byebug' require statement inside CI check for better environment handling --- spec/spec_helper.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index d4845b4..766e288 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,9 +1,12 @@ require 'rspec' require 'webmock/rspec' require 'ffaker' -require 'pry-byebug' require 'active_support/core_ext/hash/indifferent_access' +unless ENV['CI'] + require 'pry-byebug' +end + # Mock Spree modules module Spree class Base