Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Want to know how to create and publish a Ruby gem? It only takes 15 minutes to learn, and this talk will show you how. But when should you create a new gem? And how will the type of gem you make (e.g. an API wrapper, a testing DSL, or a CLI) impact its design, testing, and long-term maintenance? Answering those questions is… harder. That's why the remaining 15 minutes of this talk will compress a decade of design missteps, dependency regrets, and versioning nightmares into actionable advice to help ensure that your next gem is a great one.
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
In this presentation titled "How to Make a Gem of a Gem," Justin Searls at RubyConf 2021 shares valuable insights on creating and maintaining Ruby gems. He begins by introducing the fundamental process of creating a gem using Bundler, particularly the command `bundle gem`. This command simplifies several steps such as defining the gem's name, setting up testing frameworks, implementing continuous integration with GitHub Actions, and establishing licensing agreements. Searls emphasizes that anyone can become a Ruby gem maintainer by following these straightforward steps. The talk is divided into two main sections: 1. **Creating a Ruby Gem**: - Use `bundle gem` to initiate gem creation. - Customize the gem specifications like description, homepage, and change log. - Run tests using `rake`, implementing functionality step-by-step, such as calling an API. He demonstrates this by creating a gem called "board" that interacts with a public API, showcasing the entire development workflow from creation to release. - Conclude with releasing the gem to RubyGems by updating the version and using `rake release`. 2. **Making Gems Good**: - Searls discusses principles to ensure high-quality gems, likening them to the four C's of diamonds: clarity, color, carrot, and cut. - **Clarity**: Emphasizes establishing mental space for focused development. He shares an experience creating "awa," a gem for parsing Japanese language files, highlighting the benefits of starting fresh to avoid complexity. - **Color**: Refers to handling emotions in decision-making, particularly to avoid rash decisions influenced by frustration. Searls gives an account of forking RuboCop and the lessons learned from that experience, leading to creating "standard," a simpler linter for Ruby. - **Carat**: Covers the importance of managing gem complexity, recounting his experience with "jasmine-rails" and how its complexity led to maintenance issues. He advises being cautious with configurability to maintain simplicity and assure functionality. - **Cut**: Encourages receiving feedback positively to improve the gem code quality. He shares his journey with "gimme" and its successor "mocktail," explaining the importance of quality in design and maintainability. Searls concludes by urging attendees to create or contribute to gems, remembering to consider quality and maintainability. He expresses gratitude for the Ruby community, recounting his growth and experiences in the field, and urges collaboration in gem development.
Suggest modifications
Cancel