Hacking on Gems
A GitHub-Oriented Workflow
Evgeny Rahman
About Me
• Developer
• Curious but lazy
• Hate getting stuck
t & g: evgenyrahman
Important Note
Using gems
• Somebody solved part of your problem
• Easy to get / easy to install
• Ruby community is great
• RubyGems.org
Bundler
• gem install bundler
• bundle init
• edit Gemfile
• bundle
OffYou Go
But Then
Possible Problems
• Gem is broken for your environment
• Bug in gem breaks your code
• Missing feature
Maybe
• Nothing is broken, but you’re nice
• Documentation
• Tests
• Security
What Now?
• The gem’s source is on GitHub (hooray!)
• You have a GitHub account (yay!)
• Fork the repo
• git clone <repo-u...
Do Work
• git checkout -b <new-branch>
• Add the fix/feature/docs
• Make sure to add tests
• Make sure all tests pass!
• D...
Pull Request
• Contact gem author/maintainer
• Create a pull request on the gem’s repo
• Point to <new-branch> on your rep...
Dreams Do Come True!
• Pull Request is accepted and merged
• New version of gem is published
• ???
• Profit! (Fame?)
What If?
• Host your forked gems
• Monkeypatch in application
• But it’s better to contribute
Thanks!
Questions?
Hacking on gems
Upcoming SlideShare
Loading in...5
×

Hacking on gems

128

Published on

Published in: Technology, Spiritual
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
128
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Hacking on gems

  1. 1. Hacking on Gems A GitHub-Oriented Workflow Evgeny Rahman
  2. 2. About Me • Developer • Curious but lazy • Hate getting stuck t & g: evgenyrahman
  3. 3. Important Note
  4. 4. Using gems • Somebody solved part of your problem • Easy to get / easy to install • Ruby community is great • RubyGems.org
  5. 5. Bundler • gem install bundler • bundle init • edit Gemfile • bundle
  6. 6. OffYou Go
  7. 7. But Then
  8. 8. Possible Problems • Gem is broken for your environment • Bug in gem breaks your code • Missing feature
  9. 9. Maybe • Nothing is broken, but you’re nice • Documentation • Tests • Security
  10. 10. What Now? • The gem’s source is on GitHub (hooray!) • You have a GitHub account (yay!) • Fork the repo • git clone <repo-url>
  11. 11. Do Work • git checkout -b <new-branch> • Add the fix/feature/docs • Make sure to add tests • Make sure all tests pass! • Don’t bump version! • Commit and push to forked repo
  12. 12. Pull Request • Contact gem author/maintainer • Create a pull request on the gem’s repo • Point to <new-branch> on your repo • Be descriptive in pull request • Issue created automatically
  13. 13. Dreams Do Come True! • Pull Request is accepted and merged • New version of gem is published • ??? • Profit! (Fame?)
  14. 14. What If? • Host your forked gems • Monkeypatch in application • But it’s better to contribute
  15. 15. Thanks! Questions?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×