Skip to content

Заменить class reopening на вложенную структуру модулей#166

Open
m1ndg8mer wants to merge 13 commits intomasterfrom
fix/module
Open

Заменить class reopening на вложенную структуру модулей#166
m1ndg8mer wants to merge 13 commits intomasterfrom
fix/module

Conversation

@m1ndg8mer
Copy link
Copy Markdown

m1ndg8mer and others added 13 commits December 8, 2025 16:48
… payout destination message; tronscan successful?
- Remove begin/rescue wrapper around enum in PaymentCard for Rails 8
- Fix Payment workflow state expectations in tests (succeed/failed instead of success/fail)
- Fix Payment spec mocking to use allow_any_instance_of for workflow callbacks
- Set rbk_money_invoice_id directly to ensure proper association

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Simplify PaymentCard enum declaration (remove attribute declaration)
- Add explicit return values to workflow mocks to ensure proper execution
- Update Invoice spec to return true from auto_confirm! mock

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Use Rails 8 enum syntax: enum :attribute_name, { values }, options
instead of: enum attribute_name: { values }, _prefix: option

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Handle empty bin strings in masked_number method
- Add persist_workflow_state method to Payment and Invoice for Rails 8 compatibility
- Workflow gem requires explicit persistence method in Rails 8

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown

@dapi dapi left a comment

Choose a reason for hiding this comment

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

Помимо class -> module тут еще залетало изменение логики - WorkflowActivercord заменился на WOrkfflow, что не верно.
Очевидно это привело к появлению новых методов которые лишние
.ruby-version лучше не добавлять и перейти на mise

state :refunded
end

def persist_workflow_state(new_value)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

А это точно нужно? Зачем? Выглядит как будто что-то не учли

@@ -0,0 +1 @@
3.4.7
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Версия ruby есть в mise.toml
Не стоит держать версии в двух разных источниках потому что это приведет к путанице.

module PaymentServices
class AdvCash
class Payout < ApplicationRecord
include Workflow
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Тут произошла путаница WorkflowActiverecord заменен на Workflow, а это явно ошибка

module PaymentServices
class AliKassa
class Invoice < ApplicationRecord
include Workflow
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ТОже странная замена

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.

2 participants