2

I am looking for some kind of guide that will help me start forking gems, changing them where I need and write the complementary code to that (tests,etc) and explain the pull request procedure in github

Assuming I know rails ruby and rspec, I am missing the know-how on how a gem works, what each files means and how I should go about changing anything in it, and in what way should I work - Should I create a new rails project especially for that? or work on the gem in my original project?

For example, I want to add a simple attribute to that migration that the gem creates with a generator, but I am not sure where to start adding it, and what to do next in regards to the gem files.

A link to somewhere that explains it would be superb.. google wasn't very helpful

Nick Ginanto
  • 31,090
  • 47
  • 134
  • 244

3 Answers3

5

I suggest that you search for how to create a gem first. "Make your own gem" will help you start.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
uokesita
  • 191
  • 1
  • 11
  • 1
    thanks, this is helpful on its own but its really basic, and doesn't help me understand the gem in specific to rails (not just ruby). Thanks again – Nick Ginanto Jan 01 '13 at 13:28
  • 2
    In that case look here http://www.railsdispatch.com/posts/how-rails-3-enables-more-choices-part-1 'Adding Your Own Rake Tasks', 'Adding a Custom Generator' – uokesita Jan 02 '13 at 01:02
3

I don't think guidance that you describe exists or can be written. The reason is simple: Gems can be implemented very differently. All I can recommend it is try to find some gems on github.com with very basic implementations, for example ones that were written for self-educational purposes, then read and experiment with them.

I myself recently searched with similar intentions and I found acts_as_commentable very helpful.

UPDATE:

About the "pull request" procedure on GitHub: This video can be useful Intro to GitHub Pull Requests and of course the GitHub Fork A Repo and Using Pull Requests documentation.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Eugene Rourke
  • 4,934
  • 1
  • 22
  • 24
1

Below you can find answers close to your question:

Community
  • 1
  • 1
tokhi
  • 21,044
  • 23
  • 95
  • 105