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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Penelope Phippen
July 20, 2015
Technology
140
0
Share
Does One Really Need That Gem?
Penelope Phippen
July 20, 2015
More Decks by Penelope Phippen
See All by Penelope Phippen
Introducing Rubyfmt
penelope_zone
0
610
How RSpec Works
penelope_zone
0
6.8k
Quick and easy browser testing using RSpec and Rails 5.1
penelope_zone
1
110
Teaching RSpec to play nice with Rails
penelope_zone
2
170
Little machines that eat strings
penelope_zone
1
130
What is processor (brighton ruby edition)
penelope_zone
0
140
What is processor?
penelope_zone
1
380
extremely defensive coding - rubyconf edition
penelope_zone
0
290
Agile, etc.
penelope_zone
2
250
Other Decks in Technology
See All in Technology
Datadog 認定試験の概要と対策
uechishingo
0
180
速さだけじゃない! VoidZero ツールが移行先に選ばれる理由
mizdra
PRO
6
660
Diagnosing performance problems without the guesswork
elenatanasoiu
0
120
シンデレラなんかになりたくない!ガラスの靴が割れた時代にどう歩く?
nomizone
0
220
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.7k
Kiro CLI v2.0.0がやってきた!
kentapapa
0
210
Dynamic Workersについて
yusukebe
1
410
組織の中で自分を経営する技術
shoota
0
220
layerx-fde-practices
cipepser
6
2.9k
はじめてのDatadog
kairim0
0
210
AI時代から振り返るTerraform drift運用の歴史 / AI Age Reflections on the History of Terraform Drift Operations
aeonpeople
0
580
責任あるソフトウェアエンジニアリングの紹介4章・5章 / RSE_Ch4-5
ido_kara_deru
0
370
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
Designing for humans not robots
tammielis
254
26k
Become a Pro
speakerdeck
PRO
31
6k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Bash Introduction
62gerente
615
210k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.2k
The Curious Case for Waylosing
cassininazir
1
360
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
350
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
180
Tell your own story through comics
letsgokoyo
1
930
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
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]