Skip to content

Merge upstream v2 (2.19.6 → 2.20.5) - #6

Merged
grantcox merged 68 commits into
ynab-v2from
stagility/update-upstream-v2
Sep 3, 2026
Merged

grantcox merged 68 commits into
ynab-v2from
stagility/update-upstream-v2

Conversation

@grantcox

@grantcox grantcox commented Sep 2, 2026 •

Copy link
Copy Markdown

Brings the fork up to date with upstream v2 (2.19.6 → 2.20.5, 65 commits). Here is the upstream changelog: https://github.com/recurly/recurly-client-ruby/blob/v2/CHANGELOG.md

Conflicts are resolved in upstream's favour wherever the two sides are equivalent, so that diffing this fork against upstream surfaces only the differences that actually matter.

Commits

  1. Merge upstream/v2 — 76 files, +2770/−112. Conflicts resolved:
    • lib/recurly_v2/xml/rexml.rb — took upstream's &Proc.new { |e| yield e } over our equivalent &block form. Verified on Ruby 4.0.5 that the two produce identical traversal order; they differ only in the error raised when called with no block, and XML.filter (the sole caller) always passes one. This file now matches upstream exactly apart from the module name.
    • spec/recurly_v2/api/errors_spec.rb — the conflicting line was only Recurly::API vs RecurlyV2::API, resolved to the renamed form. Upstream's MiniTest::Mock → Minitest::Mock fix was identical to the one in Fix CI, drop the V2 label requirement, and test through Ruby 4.0.5 #5 and auto-merged.
    • spec/recurly_v2/item_spec.rb — took upstream's new GL-account assertions.
    • lib/recurly_v2.rb — took upstream's three new requires.
    • Seven files upstream added under lib/recurly/ and spec/recurly/ were relocated into the renamed _v2 directories.
  2. Apply the RecurlyV2 rename to the code upstream added, following 24843a2: Recurly → RecurlyV2, recurly/ require paths → recurly_v2/.
  3. Stop expecting nil via must_equal in two specs upstream added — minitest 6, which Ruby 4.0 bundles, rejects it.

Remaining intentional divergence from upstream

lib/recurly_v2/xml/nokogiri.rb keeps our &block fix. Upstream still has the bare &Proc.new, which Ruby 3.0 removed, so that backend raises ArgumentError on every modern Ruby upstream supports. This one is a real fix, not a stylistic difference.

What upstream adds

Almost entirely additive API surface: external payment phases, General Ledger Accounts, performance obligations, rev rec, business entities, taxable address sources, card_network_preference, net_terms_type, proflex options, invoice and line-item refunds, external subscription lookup by uuid/external_id, vertex_transaction_type, gift card tax_service_opt_out, action_result, and ramp interval starting_on/ending_on.

No behavioural change to anything the fork already used.

Verification

All 13 matrix jobs green (2.3 → 4.0.5, latest 4.x, jruby-9.3).
Suite grew 546 → 604 runs, 1178 assertions, 0 failures.
XML.filter exercised directly on Ruby 4.0.5 against both backends — card numbers and verification values mask correctly.

amandamfielding and others added 30 commits July 6, 2023 13:37
[Full Changelog](recurly/recurly-client-ruby@2.19.6...2.19.7)

**Merged Pull Requests**

- modify external subscription [recurly#857](recurly#857) ([amandamfielding](https://github.com/amandamfielding))
[V2] Add starting_on and ending_on to subscription ramps
[Full Changelog](recurly/recurly-client-ruby@2.19.7...2.19.8)

**Merged Pull Requests**

- Fixed usage of Minitest [recurly#862](recurly#862) ([csampson](https://github.com/csampson))
- [V2] Add starting_on and ending_on to subscription ramps [recurly#858](recurly#858) ([rlew421](https://github.com/rlew421))
[V2] Add action_result to Subscription and Transaction
[Full Changelog](recurly/recurly-client-ruby@2.19.8...2.19.9)

**Merged Pull Requests**

- [V2] Add action_result to Subscription and Transaction [recurly#863](recurly#863) ([fkosouski](https://github.com/fkosouski))
[Full Changelog](recurly/recurly-client-ruby@2.19.9...2.19.10)

**Merged Pull Requests**

- External payment phases [recurly#868](recurly#868) ([amandamfielding](https://github.com/amandamfielding))
amandamfielding and others added 23 commits July 3, 2024 09:10
add taxable address sources to business entity and adjustment
[Full Changelog](recurly/recurly-client-ruby@2.19.14...2.20.0)

**Merged Pull Requests**

- GET external_subscription by external_id [recurly#907](recurly#907) ([paulorbpinho-fullstacklabs](https://github.com/paulorbpinho-fullstacklabs))
- add taxable address sources to business entity and adjustment [recurly#906](recurly#906) ([amandamfielding](https://github.com/amandamfielding))
…funds

Added support for refunding invoices and line items
[Full Changelog](recurly/recurly-client-ruby@2.20.0...2.20.1)

**Merged Pull Requests**

- Added support for refunding invoices and line items [recurly#909](recurly#909) ([andcoca](https://github.com/andcoca))
[Full Changelog](recurly/recurly-client-ruby@2.20.1...2.20.2)

**Merged Pull Requests**

- Get external sub by uuid [recurly#911](recurly#911) ([amandamfielding](https://github.com/amandamfielding))
…oPlans

Add vertex_transaction_type to plans
[Full Changelog](recurly/recurly-client-ruby@2.20.2...2.20.3)

**Merged Pull Requests**

- Add vertex_transaction_type to plans [recurly#916](recurly#916) ([faiberrec](https://github.com/faiberrec))
…-type

Accept vertex_transaction_type fur purchase, adjustments and invoice
[Full Changelog](recurly/recurly-client-ruby@2.20.3...2.20.4)

**Merged Pull Requests**

- Accept vertex_transaction_type fur purchase, adjustments and invoice [recurly#943](recurly#943) ([sgilrodriguez](https://github.com/sgilrodriguez))
Add tax_service_opt_out attribute to GiftCard model and corresponding tests
[Full Changelog](recurly/recurly-client-ruby@2.20.4...2.20.5)

**Merged Pull Requests**

- Add tax_service_opt_out attribute to GiftCard model and corresponding tests [recurly#944](recurly#944) ([d14z-tech](https://github.com/d14z-tech))
…ream-v2

# Conflicts:
#	lib/recurly_v2.rb
#	lib/recurly_v2/external_payment_phase.rb
#	lib/recurly_v2/general_ledger_account.rb
#	lib/recurly_v2/performance_obligation.rb
#	lib/recurly_v2/rev_rec.rb
#	lib/recurly_v2/xml/rexml.rb
#	spec/recurly_v2/api/errors_spec.rb
#	spec/recurly_v2/external_payment_phase_spec.rb
#	spec/recurly_v2/general_ledger_account_spec.rb
#	spec/recurly_v2/item_spec.rb
#	spec/recurly_v2/performance_obligation_spec.rb
Follows 24843a2: `Recurly` -> `RecurlyV2` and `recurly/` require paths ->
`recurly_v2/`. The shipping-address company string "Recurly Inc." in
purchase_spec is data, not a constant, so it stays as upstream has it.
minitest 6, which Ruby 4.0 bundles, rejects it. The business_entity pair
compared two unset ids, so both sides were already nil.
@grantcox
grantcox force-pushed the stagility/update-upstream-v2 branch from 0b9c20e to 6c3c2b3 Compare September 3, 2026 00:17
@grantcox
grantcox marked this pull request as ready for review September 3, 2026 01:15
@grantcox
grantcox requested a review from becky-ynab September 3, 2026 01:15
@grantcox

grantcox commented Sep 3, 2026 •

Copy link
Copy Markdown
Author

@becky-ynab I'm on the fence about whether we do this update. On one hand, I'm not aware of any security related patches in the upstream versions, so there's no real need to update. And why touch a production dependency, that we want to remove in the near/medium future anyway, if not necessary?

But on the other hand, it does feel like a good practice to not be 4 years out-of-date on our dependencies, especially with our payment processor.

The corresponding Evergreen PR (using this bumped / merged version) is https://github.com/ynab/evergreen/pull/30124 , and everything is green there. But how much our automated tests are actually relying on this gem, vs just mocking it out, I can't say.

@becky-ynab becky-ynab left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thank you!

@grantcox
grantcox changed the base branch from stagility/fix-ci to ynab-v2 September 3, 2026 21:07
@grantcox
grantcox merged commit 2b6e204 into ynab-v2 Sep 3, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.