Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Does One Really Need That Gem?
Search
Penelope Phippen
July 20, 2015
Technology
0
120
Does One Really Need That Gem?
Penelope Phippen
July 20, 2015
Tweet
Share
More Decks by Penelope Phippen
See All by Penelope Phippen
Introducing Rubyfmt
penelope_zone
0
540
How RSpec Works
penelope_zone
0
6.5k
Quick and easy browser testing using RSpec and Rails 5.1
penelope_zone
1
77
Teaching RSpec to play nice with Rails
penelope_zone
2
120
Little machines that eat strings
penelope_zone
1
84
What is processor (brighton ruby edition)
penelope_zone
0
94
What is processor?
penelope_zone
1
340
extremely defensive coding - rubyconf edition
penelope_zone
0
250
Agile, etc.
penelope_zone
2
210
Other Decks in Technology
See All in Technology
技術に触れたり、顔を出そう
maruto
1
160
デジタルアイデンティティ技術 認可・ID連携・認証 応用 / 20250114-OIDF-J-EduWG-TechSWG
oidfj
2
690
Git scrapingで始める継続的なデータ追跡 / Git Scraping
ohbarye
5
500
Copilotの力を実感!3ヶ月間の生成AI研修の試行錯誤&成功事例をご紹介。果たして得たものとは・・?
ktc_shiori
0
350
Amazon Q Developerで.NET Frameworkプロジェクトをモダナイズしてみた
kenichirokimura
1
200
カップ麺の待ち時間(3分)でわかるPartyRockアップデート
ryutakondo
0
140
Alignment and Autonomy in Cybozu - 300人の開発組織でアラインメントと自律性を両立させるアジャイルな組織運営 / RSGT2025
ama_ch
1
2.4k
WantedlyでのKotlin Multiplatformの導入と課題 / Kotlin Multiplatform Implementation and Challenges at Wantedly
kubode
0
250
RubyでKubernetesプログラミング
sat
PRO
4
160
Visual StudioとかIDE関連小ネタ話
kosmosebi
1
380
Reactフレームワークプロダクトを モバイルアプリにして、もっと便利に。 ユーザに価値を届けよう。/React Framework with Capacitor
rdlabo
0
130
タイミーのデータ活用を支えるdbt Cloud導入とこれから
ttccddtoki
1
170
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.5k
Speed Design
sergeychernyshev
25
740
How to Think Like a Performance Engineer
csswizardry
22
1.3k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
360
Being A Developer After 40
akosma
89
590k
We Have a Design System, Now What?
morganepeng
51
7.3k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Code Reviewing Like a Champion
maltzj
521
39k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Navigating Team Friction
lara
183
15k
Scaling GitHub
holman
459
140k
Transcript
Does one really need that Gem?
a!/samphippen
NO
Let’s have some questions a!/samphippen
[email protected]
you: ಠ_ಠ
NO
Bundler
Bundler is one of the best package managers of all
time
Sincerely
Let’s have some questions !!/samphippen
[email protected]
Problem
We specified one Gem in our Gemfile
We got 6 gems installed
Transitive dependencies
You presumably trust the RSpec core team
Let’s have some questions !!/samphippen
[email protected]
Had you heard of diff-lcs before today?
Do you trust its author?
Even the most mature gems can have surprises in them
(rails)
What’s in a Gem?
ActiveRecord
activerecord.gemspec
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY s.name = 'activerecord' s.version = version s.summary
= ‘Object-relationa…’ s.description = 'Databases on Rails…’
s.platform = Gem::Platform::RUBY s.name = 'activerecord' s.version = version s.summary
= ‘Object-relationa…’ s.description = 'Databases on Rails…’
version = File.read(File.expand_path('../../ RAILS_VERSION', __FILE__)).strip
s.license = 'MIT'
s.add_dependency( ‘activesupport', version) s.add_dependency( ‘activemodel’, version) s.add_dependency( ‘arel', ‘7.0.0.alpha')
lib and bin directories
A critical approach
None
We’ve all done this
We can do better
None
The Ruby Toolbox is your friend
None
State machine versus AASM
Most gems are hideously understaffed
None
None
Remember these people are working for free!
Versioning
SemVer is our standard
M.m.p
M.m.p We fixed one or more bugs
M.m.p We added one or more features
M.m.p We broke one or more APIs
0.m.p We can break your shit at any moment
None
None
Vendoring
There is no shame in vending code
Sometimes you do not need an entire gem
< 100loc
Let’s have some questions a!/samphippen
[email protected]