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
75
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
継続的にアウトカムを生み出し ビジネスにつなげる、 戦略と運営に対するタイミーのQUEST(探求)
zigorou
0
600
複雑性の高いオブジェクト編集に向き合う: プラガブルなReactフォーム設計
righttouch
PRO
0
120
マルチプロダクト開発の現場でAWS Security Hubを1年以上運用して得た教訓
muziyoshiz
3
2.4k
PHPerのための計算量入門/Complexity101 for PHPer
hanhan1978
5
210
DUSt3R, MASt3R, MASt3R-SfM にみる3D基盤モデル
spatial_ai_network
2
190
UI State設計とテスト方針
rmakiyama
2
640
開発生産性向上! 育成を「改善」と捉えるエンジニア育成戦略
shoota
2
400
【re:Invent 2024 アプデ】 Prompt Routing の紹介
champ
0
150
Oracle Cloudの生成AIサービスって実際どこまで使えるの? エンジニア目線で試してみた
minorun365
PRO
4
290
NilAway による静的解析で「10 億ドル」を節約する #kyotogo / Kyoto Go 56th
ytaka23
3
380
なぜCodeceptJSを選んだか
goataka
0
160
PHPからGoへのマイグレーション for DMMアフィリエイト
yabakokobayashi
1
170
Featured
See All Featured
BBQ
matthewcrist
85
9.4k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
98
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Practical Orchestrator
shlominoach
186
10k
The Pragmatic Product Professional
lauravandoore
32
6.3k
Building Applications with DynamoDB
mza
91
6.1k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Rails Girls Zürich Keynote
gr2m
94
13k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
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]