Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Developer may integrate Compensated with their existing Rails App without wrapping it in custom model classes #52

Open
1 of 6 tasks
zspencer opened this issue Mar 27, 2020 · 2 comments
Assignees
Labels
code Work that will require some amount of programming documentation Work that is intended to focus on improving documentation enhancement New feature or request epic Work that will will likely cover a number of use cases.

Comments

@zspencer
Copy link
Member

zspencer commented Mar 27, 2020

Now that we've gotten 3~4 implementations within Rails apps; it seems like a reasonable next step will be to create a Rails Engine that encourages a domain model.

Suggested Steps:

  • Sprout a compensated-rails gem that is a sibling to compensated-ruby;
  • Ensure that compensated-rails test suite gets executed across Ruby versions within CI
  • Ensure that the compensated-rails test suite gets executed across Rails versions within CI
  • Create a Compensated::Rails::Event resource and supporting migrations
  • Create Compensated::Rails::Customer and Compensated::Rails::PaymentProfile resources so that we can associate events with the payments provider and the customer the events relate to.
  • Update the compensated-rails-5-example to use the engine

I'm comfortable merging this into 0.X in small steps or one big PR; so long as it's not making significant changes to the compensated-ruby directory.

@zspencer zspencer added enhancement New feature or request code Work that will require some amount of programming labels Mar 27, 2020
@user512 user512 self-assigned this May 8, 2020
@user512 user512 added epic Work that will will likely cover a number of use cases. documentation Work that is intended to focus on improving documentation labels May 8, 2020
@user512
Copy link
Contributor

user512 commented May 18, 2020

This is our understanding between compensated-ruby & compensated-rails.

  1. compensated-rails will depend on compensated-ruby.
  2. compensated-ruby will be responsible for core logic, including parsing webhook event.
  3. compensated-rails will be generating required tables and provide reader methods.
  4. Existing users of compensated-ruby will be able to keep using that gem can expect further future code improvement without needed to transition to compensated-rails.

@zspencer Does these align with what you were thinking?

@zspencer
Copy link
Member Author

Yep! this matches what I was imagining perfectly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Work that will require some amount of programming documentation Work that is intended to focus on improving documentation enhancement New feature or request epic Work that will will likely cover a number of use cases.
Projects
None yet
Development

No branches or pull requests

2 participants