diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4a47ed8..dc2c6f08 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,22 @@ on: workflow_call: jobs: + lint: + timeout-minutes: 10 + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + + - name: StandardRb check + run: bundle exec standardrb + sqlite: runs-on: ubuntu-latest strategy: @@ -22,7 +38,6 @@ jobs: - rails_7.2 - rails_8.0 - rails_main - env: BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile BUNDLE_PATH_RELATIVE_TO_CWD: true @@ -38,8 +53,6 @@ jobs: bundler: default bundler-cache: true rubygems: latest - - name: StandardRb check - run: bundle exec standardrb - name: Run tests env: DATABASE_URL: "sqlite3:pay_test" @@ -82,8 +95,6 @@ jobs: bundler: default bundler-cache: true rubygems: latest - - name: StandardRb check - run: bundle exec standardrb - name: Run tests env: STRIPE_PRIVATE_KEY: ${{ secrets.STRIPE_PRIVATE_KEY }} @@ -126,8 +137,6 @@ jobs: bundler: default bundler-cache: true rubygems: latest - - name: StandardRb check - run: bundle exec standardrb - name: Run tests env: STRIPE_PRIVATE_KEY: ${{ secrets.STRIPE_PRIVATE_KEY }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c1e00e8..d571f4cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ### Unreleased +### 8.2.1 + +* Add `meta` to LemonSqueezy webhook objects. LemonSqueezy does not store metadata and they're only temporarily accessible via the webhook meta. + ### 8.2.0 * FakeProcessor subscriptions can be marked as nonresumable. This is helpful for giving users a limited subscription. diff --git a/Gemfile.lock b/Gemfile.lock index e64cb62b..c7f4e3ce 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - pay (8.2.0) + pay (8.2.1) rails (>= 6.0.0) GEM diff --git a/gemfiles/rails_6.1.gemfile.lock b/gemfiles/rails_6.1.gemfile.lock index 4f967f2c..8013d98e 100644 --- a/gemfiles/rails_6.1.gemfile.lock +++ b/gemfiles/rails_6.1.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - pay (8.2.0) + pay (8.2.1) rails (>= 6.0.0) GEM @@ -119,8 +119,8 @@ GEM matrix (0.4.2) method_source (1.1.0) mini_mime (1.1.5) - minitest (5.25.1) - mocha (2.5.0) + minitest (5.25.2) + mocha (2.6.0) ruby2_keywords (>= 0.0.5) mysql2 (0.5.6) net-http (0.5.0) @@ -158,7 +158,7 @@ GEM prawn-table (0.2.2) prawn (>= 1.3.0, < 3.0.0) public_suffix (6.0.1) - puma (6.4.3) + puma (6.5.0) nio4r (~> 2.0) racc (1.8.1) rack (2.2.10) diff --git a/gemfiles/rails_7.0.gemfile.lock b/gemfiles/rails_7.0.gemfile.lock index 9b438133..d3c34028 100644 --- a/gemfiles/rails_7.0.gemfile.lock +++ b/gemfiles/rails_7.0.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - pay (8.2.0) + pay (8.2.1) rails (>= 6.0.0) GEM @@ -125,8 +125,8 @@ GEM matrix (0.4.2) method_source (1.1.0) mini_mime (1.1.5) - minitest (5.25.1) - mocha (2.5.0) + minitest (5.25.2) + mocha (2.6.0) ruby2_keywords (>= 0.0.5) mysql2 (0.5.6) net-http (0.5.0) @@ -164,7 +164,7 @@ GEM prawn-table (0.2.2) prawn (>= 1.3.0, < 3.0.0) public_suffix (6.0.1) - puma (6.4.3) + puma (6.5.0) nio4r (~> 2.0) racc (1.8.1) rack (2.2.10) diff --git a/gemfiles/rails_7.1.gemfile.lock b/gemfiles/rails_7.1.gemfile.lock index 5e533172..347ccc9f 100644 --- a/gemfiles/rails_7.1.gemfile.lock +++ b/gemfiles/rails_7.1.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - pay (8.2.0) + pay (8.2.1) rails (>= 6.0.0) GEM @@ -143,8 +143,8 @@ GEM marcel (1.0.4) matrix (0.4.2) mini_mime (1.1.5) - minitest (5.25.1) - mocha (2.5.0) + minitest (5.25.2) + mocha (2.6.0) ruby2_keywords (>= 0.0.5) mutex_m (0.3.0) mysql2 (0.5.6) @@ -185,7 +185,7 @@ GEM psych (5.2.0) stringio public_suffix (6.0.1) - puma (6.4.3) + puma (6.5.0) nio4r (~> 2.0) racc (1.8.1) rack (3.1.8) diff --git a/gemfiles/rails_7.2.gemfile.lock b/gemfiles/rails_7.2.gemfile.lock index acbb551b..656ea76d 100644 --- a/gemfiles/rails_7.2.gemfile.lock +++ b/gemfiles/rails_7.2.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - pay (8.2.0) + pay (8.2.1) rails (>= 6.0.0) GEM @@ -137,8 +137,8 @@ GEM marcel (1.0.4) matrix (0.4.2) mini_mime (1.1.5) - minitest (5.25.1) - mocha (2.5.0) + minitest (5.25.2) + mocha (2.6.0) ruby2_keywords (>= 0.0.5) mysql2 (0.5.6) net-http (0.5.0) @@ -178,7 +178,7 @@ GEM psych (5.2.0) stringio public_suffix (6.0.1) - puma (6.4.3) + puma (6.5.0) nio4r (~> 2.0) racc (1.8.1) rack (3.1.8) @@ -253,9 +253,9 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - sqlite3 (2.3.0-arm64-darwin) - sqlite3 (2.3.0-x86_64-darwin) - sqlite3 (2.3.0-x86_64-linux-gnu) + sqlite3 (2.3.1-arm64-darwin) + sqlite3 (2.3.1-x86_64-darwin) + sqlite3 (2.3.1-x86_64-linux-gnu) standard (1.42.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) diff --git a/gemfiles/rails_8.0.gemfile.lock b/gemfiles/rails_8.0.gemfile.lock index a58d8b8c..de3b2b89 100644 --- a/gemfiles/rails_8.0.gemfile.lock +++ b/gemfiles/rails_8.0.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - pay (8.2.0) + pay (8.2.1) rails (>= 6.0.0) GEM @@ -137,8 +137,8 @@ GEM marcel (1.0.4) matrix (0.4.2) mini_mime (1.1.5) - minitest (5.25.1) - mocha (2.5.0) + minitest (5.25.2) + mocha (2.6.0) ruby2_keywords (>= 0.0.5) mysql2 (0.5.6) net-http (0.5.0) @@ -184,7 +184,7 @@ GEM psych (5.2.0) stringio public_suffix (6.0.1) - puma (6.4.3) + puma (6.5.0) nio4r (~> 2.0) racc (1.8.1) rack (3.1.8) @@ -259,16 +259,16 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - sqlite3 (2.3.0-aarch64-linux-gnu) - sqlite3 (2.3.0-aarch64-linux-musl) - sqlite3 (2.3.0-arm-linux-gnu) - sqlite3 (2.3.0-arm-linux-musl) - sqlite3 (2.3.0-arm64-darwin) - sqlite3 (2.3.0-x86-linux-gnu) - sqlite3 (2.3.0-x86-linux-musl) - sqlite3 (2.3.0-x86_64-darwin) - sqlite3 (2.3.0-x86_64-linux-gnu) - sqlite3 (2.3.0-x86_64-linux-musl) + sqlite3 (2.3.1-aarch64-linux-gnu) + sqlite3 (2.3.1-aarch64-linux-musl) + sqlite3 (2.3.1-arm-linux-gnu) + sqlite3 (2.3.1-arm-linux-musl) + sqlite3 (2.3.1-arm64-darwin) + sqlite3 (2.3.1-x86-linux-gnu) + sqlite3 (2.3.1-x86-linux-musl) + sqlite3 (2.3.1-x86_64-darwin) + sqlite3 (2.3.1-x86_64-linux-gnu) + sqlite3 (2.3.1-x86_64-linux-musl) standard (1.42.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) diff --git a/gemfiles/rails_main.gemfile.lock b/gemfiles/rails_main.gemfile.lock index e7805afc..d0b17edf 100644 --- a/gemfiles/rails_main.gemfile.lock +++ b/gemfiles/rails_main.gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/rails/rails.git - revision: 5287cfa17681527761c50fd8c6ae169f4500bd97 + revision: 6695ac7f71a148e262810396830ce5230082a450 branch: main specs: actioncable (8.1.0.alpha) @@ -100,7 +100,7 @@ GIT PATH remote: .. specs: - pay (8.2.0) + pay (8.2.1) rails (>= 6.0.0) GEM @@ -165,8 +165,8 @@ GEM marcel (1.0.4) matrix (0.4.2) mini_mime (1.1.5) - minitest (5.25.1) - mocha (2.5.0) + minitest (5.25.2) + mocha (2.6.0) ruby2_keywords (>= 0.0.5) mysql2 (0.5.6) net-http (0.5.0) @@ -206,7 +206,7 @@ GEM psych (5.2.0) stringio public_suffix (6.0.1) - puma (6.4.3) + puma (6.5.0) nio4r (~> 2.0) racc (1.8.1) rack (3.1.8) @@ -259,9 +259,9 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - sqlite3 (2.3.0-arm64-darwin) - sqlite3 (2.3.0-x86_64-darwin) - sqlite3 (2.3.0-x86_64-linux-gnu) + sqlite3 (2.3.1-arm64-darwin) + sqlite3 (2.3.1-x86_64-darwin) + sqlite3 (2.3.1-x86_64-linux-gnu) standard (1.42.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) diff --git a/lib/pay/version.rb b/lib/pay/version.rb index 7a556095..20817fe5 100644 --- a/lib/pay/version.rb +++ b/lib/pay/version.rb @@ -1,3 +1,3 @@ module Pay - VERSION = "8.2.0" + VERSION = "8.2.1" end diff --git a/test/pay/lemon_squeezy/webhooks_test.rb b/test/pay/lemon_squeezy/webhooks_test.rb index 3fba98fa..fb66e62f 100644 --- a/test/pay/lemon_squeezy/webhooks_test.rb +++ b/test/pay/lemon_squeezy/webhooks_test.rb @@ -2,9 +2,10 @@ class Pay::LemonSqueezy::WebhooksTest < ActiveSupport::TestCase test "lemon squeezy webhook metadata" do - object = Pay::LemonSqueezy.construct_from_webhook_event json_fixture("lemon_squeezy/order_created") + fixture = json_fixture("lemon_squeezy/order_created") + object = Pay::LemonSqueezy.construct_from_webhook_event fixture assert_equal ::LemonSqueezy::Order, object.class - assert_equal {"event_name" => "order_created"}, object.meta + assert_equal fixture["meta"], object.meta end test "lemon squeezy order_created webhook" do