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
Ruby会議でのBundler2の話.pdf
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
vividmuimui
October 05, 2017
Programming
58
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ruby会議でのBundler2の話.pdf
vividmuimui
October 05, 2017
More Decks by vividmuimui
See All by vividmuimui
あるチームでの技術選定で考えてること(外部向けに修正版)
vividmuimui
0
14
開発組織まわりで最近考えているあれこれ
vividmuimui
0
27
bundle-update.pdf
vividmuimui
0
130
Dependabot vs BundleUpdate+LockDiff
vividmuimui
0
96
あなたの知らないRuboCopの設定
vividmuimui
0
250
最近(2019/02/03)の #Ruby , #Rails , #Bundler 事情
vividmuimui
0
170
Jasperはいいぞ!
vividmuimui
0
54
Danger CI
vividmuimui
0
120
tigとかaliasなし生活を送ってみて改めてgitを覚えてる話
vividmuimui
0
130
Other Decks in Programming
See All in Programming
AI時代の仕事技芸論〜ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ(スクフェス仙台 2026バージョン)
kuranuki
0
710
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
320
共通化で考えるべきは、実装より公開する型だった
codeegg
0
280
AI がコードを書く時代における新卒エンジニアの仕事風景 (2026) / New Graduate Engineers in the Era of AI Coding (2026)
sushichan044
0
230
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
520
分散システム、なんですぐ死んでしまうん?耐障害性を高めたいあなたのためのレジリエンスパターン入門
mshibuya
7
6.8k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
390
GitHubCopilotCLIのスラッシュコマンドを自作してみる
htkym
0
100
エンジニアにデザインハーネスを 〜デザインプロセスを規定するためのハーネス〜 / Design harness from an engineer's perspective
rkaga
2
1.7k
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
350
自作OSでスライド発表する
uyuki234
1
3.9k
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
510
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
Thoughts on Productivity
jonyablonski
76
5.3k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
430
How GitHub (no longer) Works
holman
316
150k
RailsConf 2023
tenderlove
30
1.5k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Optimising Largest Contentful Paint
csswizardry
37
3.8k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
350
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
220
Transcript
Ruby 会議でのBundler2 の Ruby 会議でのBundler2 の 話 話 2017/10/05 社内LT
@vividmuimui
このスライドは、基本的にはこの発表をなぞっています youtube: speakerdeck: rfc#6: http://rubykaigi.org/2017/presentations/0xColby.html https://www.youtube.com/watch?v=sZX7SK3hxk4 https://speakerdeck.com/colby/what-weve-been-up-to-with-bundler https://github.com/bundler/rfcs/pull/6
この1 年で入ったやつの紹介 この1 年で入ったやつの紹介 bundle doctor bundle add bundle plugin
bundle doctor bundle doctor skip
bundle add bundle add $ bundle add rspec # Gemfile
# Added at 2017-10-04 00:17:42 +0900 by vivid_muimui: gem "rspec", "~> 3.6" 以下のようにオプションも指定できる $ bundle add rails --version "~> 5.0.0" --source "https://gems.example.com" --group "development" bot とかなら使いみちあるかも?
bundler plugins bundler plugins module MyBundlerPlugin class Plugin < Bundler::Plugin::API
command "new-command" def exec(command, args) puts "Hello World" end end end $ bundle new-command Hello World! という感じで、新しいコマンドを用意できる ほかにも、以下のようにも出来たりするみたい Bundler::Plugin::API.hook "before-install-all" do |deps| puts "Installing #{deps.map(&:name).join(', ')} !" end $ bundle install Installing rack ! Using bundler 1.15.4 ... ...
bundler plugins bundler plugins 作成したplugin のinstall は以下の感じ $ bundle plugin
install my-bundler-plugin # Gemfile plugin 'my-bundler-plugin' まだまだ、 に関してはまだまだ機能もdocument もbug x も足りてないらしい
1.16 が1 系の最後のバージョンになる予定 1.16 が1 系の最後のバージョンになる予定
bundler2 bundler2
Removing Removing Ruby2.3 未満のサポート Gem le Source Shortcuts persistent command
arguments いくつかかいつまんで紹介
Ruby2.3 未満のサポート Ruby2.3 未満のサポート skip
Gem le Source Shortcuts Gem le Source Shortcuts gem "rack",
github: "user/repo" gem "rack", bitbuket: "user/repo" といった がなくなり、以下の書き方をするようになる gem "gem1", source: "https://mygemserver.private" gem "gem2", git: "https://github.com/user/repo.git" gem "gem3", path: "path/to/gem" ただ、今まで書いていたように を書いておけば も書ける git_source(:github) do |repo_name| repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") "https://github.com/#{repo_name}.git" end gem "rack", github: "user/repo"
bundle show bundle show 現状の は機能がたくさんあり複雑 の2 つのコマンドに分割
bundle viz bundle viz plugin として切り出される $ bunldle plugin install
bundle-viz
bundle console bundle console skip
persistent command arguments persistent command arguments オプション引数を自動で記録する処理がなくなる たとえば、今は以下のコマンドを実行すると、今は自動でcon g ファイルに
を記録される が、されなくなる $ bundle install --path foo 毎回常にoption を指定するか、以下のようにcon g を明示的に設定する必要がある $ bundle config path foo
–with –without –path –system –with –without –path –system での上記option を削除
代わりに を使う
bundle package bundle package から に変更
Adding Adding Removing に比べて少ない Global gem & extension cache Speci
c platforms
Global gem & extension cache Global gem & extension cache
複数アプリケーションで同じgem を使っていたり、 複数ruby バージョンで同じgem を使っているときにinstall が高速化される
Speci c platforms Speci c platforms 難しくてよくわかんなかった><
Changing Changing bundle bundle update bundle1 との互換性 gems.rb
bundle bundle 今は が実行されるが、usage が表示されるようになる
bundle update bundle update 今は、 $ bundle update で全gem のupdate
が走るが、明示的に指定する必要がある $ bundle update <gem-name> $ bundle update --all のどちらかになる
bundle1 との互換性 bundle1 との互換性 下位互換はないので注意する必要がある で したら では動かない なので、チームメンバーの足並み合わせて、せーのであげる必要がある (
複数プロジェクトを担当していて、同じruby バージョンを使っている場合は、プロジェクトをまたい でも足並み揃える必要があるかも?)
gems.rb gems.rb で した時に生成されるファイルは になる 今までの , は普通に使える deprecation warning
もでない と が両方存在していたときは、 が優先される
今後 今後
Ruby2.5 にdefault gem としてbundler が入る Ruby2.5 にdefault gem としてbundler が入る
どのbundler のバージョンが入るかはhsbt さんと相談と言っていたように聞こえた でも、2 系になりそうな雰囲気だった( 曖昧)
毎年メジャーリリースをする 毎年メジャーリリースをする ruby のリリースのように毎年年末あたりにメジャーリリースが行うようになる ruby のサポートのバージョンを変えたり、古い機能を削除したりなど
おまけ おまけ 見てて気になったやつ rfc#6 した時のデフォルトのインストール先が 以下になる