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
500
How RSpec Works
penelope_zone
0
6.3k
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
79
What is processor (brighton ruby edition)
penelope_zone
0
92
What is processor?
penelope_zone
1
340
extremely defensive coding - rubyconf edition
penelope_zone
0
230
Agile, etc.
penelope_zone
2
200
Other Decks in Technology
See All in Technology
開発生産性大幅アップ!Postman VS Code拡張機能
nagix
2
370
複雑な構成要素を持つUIとの向き合い方 〜新・支出グラフでの実例〜 / B43 TECH TALK
nakamuuu
0
140
FrontDoorとWebAppsを組み合わせた際のリダイレクト処理の注意点
kenichirokimura
1
500
一生覚えておきたい「システム開発=コミュニケーション」〜初めての実務案件振り返りLT〜
maimyyym
0
120
APIファーストなプロダクトマネジメントの実践 〜SaaSus Platformでの例〜 / "Practicing API-First Product Management - An Example with SaaSus Platform
oztick139
0
100
VSCodeの拡張機能を作っている話
ebarakazuhiro
1
330
開発生産性向上サービスを作るFindyが自分たちで開発生産性を爆上げした組織づくりの歩み / Findy's path to boosting its own development productivity 2024-04-17
ma3tk
3
640
Azureの基本的な権限管理の勉強会
yhana
0
140
VS CodeでAWSを操作しよう
smt7174
7
1.6k
プロトタイピングによる不確実性の低減 / Reducing Uncertainty through Prototyping
ohbarye
5
380
障害対応をちょっとずつよくしていくための 演習の作りかた
heleeen
0
110
Databricks における 『MLOps』
databricksjapan
2
170
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
221
21k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
78
42k
Bash Introduction
62gerente
604
210k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
Done Done
chrislema
178
15k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.6k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
659
120k
Why You Should Never Use an ORM
jnunemaker
PRO
51
8.6k
Scaling GitHub
holman
457
140k
Debugging Ruby Performance
tmm1
70
11k
Web Components: a chance to create the future
zenorocha
305
41k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
21
1.6k
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]