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
530
How RSpec Works
penelope_zone
0
6.4k
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
80
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
Product Engineer Night #6プロダクトエンジニアを育む仕組み・施策
hacomono
PRO
1
470
ガチ勢によるPipeCD運用大全〜滑らかなCI/CDを添えて〜 / ai-pipecd-encyclopedia
cyberagentdevelopers
PRO
3
200
ABEMA のコンテンツ制作を最適化!生成 AI x クラウド映像編集システム / abema-ai-editor
cyberagentdevelopers
PRO
1
180
新R25、乃木坂46 Mobileなどのファンビジネスを支えるマルチテナンシーなプラットフォームの全体像 / cam-multi-cloud
cyberagentdevelopers
PRO
1
130
日経電子版におけるリアルタイムレコメンドシステム開発の事例紹介/nikkei-realtime-recommender-system
yng87
1
500
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.6k
グローバル展開を見据えたサービスにおける機械翻訳プラクティス / dp-ai-translating
cyberagentdevelopers
PRO
1
150
Nix入門パラダイム編
asa1984
2
200
来年もre:Invent2024 に行きたいあなたへ - “集中”と“つながり”で楽しむ -
ny7760
0
470
10分でわかるfreee エンジニア向け会社説明資料
freee
18
520k
コンテンツを支える 若手ゲームクリエイターの アートディレクションの事例紹介 / cagamefi-game
cyberagentdevelopers
PRO
1
130
AWS re:Inventを徹底的に楽しむためのTips / Tips for thoroughly enjoying AWS re:Invent
yuj1osm
1
560
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Visualization
eitanlees
144
15k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
4 Signs Your Business is Dying
shpigford
180
21k
It's Worth the Effort
3n
183
27k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
27
1.9k
Why You Should Never Use an ORM
jnunemaker
PRO
53
9k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Writing Fast Ruby
sferik
626
61k
Designing the Hi-DPI Web
ddemaree
280
34k
What's new in Ruby 2.0
geeforr
342
31k
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]