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

Modularisation of a gem? #175

Open
skatkov opened this issue Nov 22, 2019 · 1 comment
Open

Modularisation of a gem? #175

skatkov opened this issue Nov 22, 2019 · 1 comment

Comments

@skatkov
Copy link

skatkov commented Nov 22, 2019

This gem is jam packed with amazing features and great support. I'm personally very impressed with how this gem offers a way to manage stripe configuration!

I'm working on a Rails app that already has stripe support and stripe configuration management is the only biggest pain we have right now.

I'd love to use stripe-rails for exactly this feature, but I don't think that bringing such a huge dependency into the project just for that is a right way to go.

@tansengming have you considered splitting this gem into smaller gems? If you do, I'd be happy to consider moving configuration feature into stripe-config-rails (or something similar).

@skatkov skatkov changed the title Modularisation of a a gem? Modularisation of a gem? Nov 22, 2019
@tansengming
Copy link
Owner

Hi @skatkov this is great idea! However instead of splitting this to a separate gem how about loading it the way ActiveSupport does it? https://guides.rubyonrails.org/active_support_core_extensions.html#stand-alone-active-support

tldr, to load just one extension on activesupport:

require 'active_support'
require 'active_support/core_ext/object/blank'

to load all the extentions on active support:

require 'active_support'
require 'active_support/all'

this way all the code still lives on the same gem while you get to load exactly the code you need. What do you think?

I'm not sure what needs to be done for this to work but I'd be grateful if you'd like to look into it.

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

No branches or pull requests

2 participants