spree-guides icon indicating copy to clipboard operation
spree-guides copied to clipboard

Explain best practices for forking core gem and adding new features

Open Lordnibbler opened this issue 12 years ago • 7 comments

It is currently unclear, after forking spree/spree, how to fire up a new application for testing/adding a new feature.

@radar suggested to

  1. Create a new application
  2. Add gem 'spree', :path => "<path to spree>" to Gemfile

Perhaps add this to the http://guides.spreecommerce.com/developer/contributing.html in a new section about bugfixes/adding new features.

Lordnibbler avatar Nov 23 '13 07:11 Lordnibbler

This is not a spree issue. I'd like to say this kind of thing is covered in the rails guides, but I might be wrong. Anytime you want to use a local gem this is how you specify it in rails, whether that be spree or anything.

You could also just keep your own fork on github and gem 'spree', github: 'lordnibbler/spree', brach: 'my-branch'

Senjai avatar Nov 25 '13 16:11 Senjai

Also feel free to submit a patch too!

Senjai avatar Nov 25 '13 16:11 Senjai

@Senjai I understand this is not a Spree issue. I recently submitted my first PR to add a feature to Spree and found it unclear from the documentation what the best practice was to follow for adding/debugging features. hould I generate a dummy app, and test my feature against that? Start a new rails app from scratch? How do I pick my "development" gem? Etc.

My feeling is, that although this is more Railsy info, that adding it will somewhat lower the barrier to entry to start adding/fixing features in spree.

Lordnibbler avatar Nov 26 '13 20:11 Lordnibbler

Right, but in that case we should link to the appropriate rails guides instead of duplicating ourselves here.

Senjai avatar Nov 26 '13 21:11 Senjai

@Senjai I'm all for that -- is there a guide you suggest we link to?

Lordnibbler avatar Nov 26 '13 21:11 Lordnibbler

I love the sandbox script. bundle exec rake sandbox will generate an app for you in the sandbox folder and you can play around with it.

peterberkenbosch avatar Nov 27 '13 09:11 peterberkenbosch

Also, just working and clear specs do help as well.

peterberkenbosch avatar Nov 27 '13 09:11 peterberkenbosch