Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Ruby会議でのBundler2の話.pdf
Search
vividmuimui
October 05, 2017
Programming
64
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ruby会議でのBundler2の話.pdf
vividmuimui
October 05, 2017
Transcript
30 slides
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 した時のデフォルトのインストール先が 以下になる
More Decks by vividmuimui
See All by vividmuimui
あるチームでの技術選定で考えてること(外部向けに修正版)
vividmuimui
0
22
開発組織まわりで最近考えているあれこれ
vividmuimui
0
52
bundle-update.pdf
vividmuimui
0
130
Dependabot vs BundleUpdate+LockDiff
vividmuimui
0
120
あなたの知らないRuboCopの設定
vividmuimui
0
270
最近(2019/02/03)の #Ruby , #Rails , #Bundler 事情
vividmuimui
0
170
Jasperはいいぞ!
vividmuimui
0
61
Danger CI
vividmuimui
0
120
tigとかaliasなし生活を送ってみて改めてgitを覚えてる話
vividmuimui
0
140
Other Decks in Programming
See All in Programming
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
330
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
370
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
2.3k
Seven New Principles of Software Engineering
yegor256
0
480
Performance Optimization With LLMs
xleitix
0
250
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
650
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
160
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
170
Web Framework Benchmark Battle 2026, Any%
a_matsuda
3
3.2k
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
1.2k
Getting Started with Vibe Coding
miccheng
0
200
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
350
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.3k
The Curious Case for Waylosing
cassininazir
1
610
Facilitating Awesome Meetings
lara
57
7.2k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
WENDY [Excerpt]
tessaabrams
15
40k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
470
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.7k
Highjacked: Video Game Concept Design
rkendrick25
PRO
2
560
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
610
Optimising Largest Contentful Paint
csswizardry
37
4k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k