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
1年かけてgemを1つ作りました
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kunihiko Ito
April 19, 2014
Programming
1.5k
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
1年かけてgemを1つ作りました
大江戸Ruby会議04 で発表したスライド
http://regional.rubykaigi.org/oedo04/
Kunihiko Ito
April 19, 2014
More Decks by Kunihiko Ito
See All by Kunihiko Ito
データでふりかえるToyama.rb #100 2024
kunitoo
0
57
富山Ruby会議01 をふりかえる
kunitoo
0
78
Using Ractor
kunitoo
0
210
introduction neo4j
kunitoo
0
190
vim operation and my hotkey
kunitoo
0
190
Introduction Neo4j oblove calendar
kunitoo
0
1.5k
アジャイルソフトウェア開発の概要と現場での実践
kunitoo
0
2.2k
Introduction of neo4j
kunitoo
0
2k
Ruby 2.3 のてざわり
kunitoo
2
510
Other Decks in Programming
See All in Programming
ChromeでローカルLLM
ryu1013
0
180
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
310
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
1.6k
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
340
気持ちぃ〜角丸 Squircle
ryu1013
0
370
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
170
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
140
Modernizing iOS Apps
seyfoyun
0
140
golang-bob.pdf
iwatsukayura
0
150
Web Framework Benchmark Battle 2026, Any%
a_matsuda
3
3.1k
AmebaブログはKMPから卒業します
kmars0605
0
300
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
130
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
430
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Building AI with AI
inesmontani
PRO
1
1.3k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Believing is Seeing
oripsolob
1
260
WCS-LA-2024
lcolladotor
0
940
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
620
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
870
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
Transcript
大江戸Ruby会議 04 1年かけて1つのgemを作りました 伊藤 邦彦 永和システムマネジメント
はじめに 発表する機会をいただき ありがとうございます
自己紹介 Kunihiko Ito @kunitoo Asakusa.rb歴: 約1年半 rgitlog を作ってます
今日話すこと Asakusa.rb でやっていること 作ったgemのこと
Asakusa.rb でやっている こと 上野会場のドアを開けたり 他の人の話を聞いたり 写経したり gem を作ったり
上野で会場のドアを開けたり ドア番をお願いされたのが Meet up に参加するきっかけ
他の人の話を聞いたり 会話の単語が分からない 調べながら会話を聞く 少しずつ慣れて話が分かるよう になった
写経したり Rails Tutorial Rails Guides RubyGems Guides
gem を作ったり 自己紹介するときに話せる代表 作がほしい なにを作るか考えるところから 始めた
作ったgem
rgitlog rails アプリの git log をブラウ ザで見ることができます
Insatall 以下を変更するだけ Gemfile config/routes.rb
Gemfile gem 'rgitlog' 次に % bundle
config/routes.rb mount Rgitlog::Engine, at: '/rgitlog'
Usage
rgitlogができるまで やりたいこと探し gitを扱うライブラリ探し
rgitlogができるまで やりたいこと探し gitを扱うライブラリ探し
やりたいこと 開発中に以前のバージョンの見 た目が気になることがあった 動作確認中はブラウザだけで完 結したい git checkout したくない
これからやりたいこと ブランチを選択して checkout したい diff を見れるようにしたい 見た目をかっこよくしたい
rgitlogができるまで やりたいこと探し gitを扱うライブラリ探し
最初のバージョン mojombo/grit mojombo/grit はRuby 2.0で動 かなかった gitlabhq/grit フォークを使用
grit での git log 取得 Repo.new('path/to/my/repository').commits
watchしていたらある日 “Grit is no longer maintained. Check out rugged” Pull
Request が 118 close された
rugged での git log 取得 Rugged::Repository.new('path/to/my/repository').head.log
rugged での git log 取得 Rugged::Repository.new('path/to/my/repository').head.log reflog 取得されます
正解 repo = Rugged::Repository.new('path/to/my/repository') repo.walk(repo.last_commit) 気付くのに数ヶ月かかりました orz
rgitlog リリースまで 作りたいと思ってから約1年 実はとっても簡単に作れます
rgitlogの作り方 今から作ります! 時間ありますよね?
rails plugin new $ rails plugin new rgitlog --mountable -O
-B $ cd rgitlog $ bundle --local
Add rugged rgitlog.gemspec s.add_dependency "rugged"
generate controller $ rails g controller rgitlog index
Controller require_dependency "rgitlog/application_controller" require 'rugged' module Rgitlog class RgitlogController <
ApplicationController def index path = Rugged::Repository.discover(Dir.pwd) repo = Rugged::Repository.new(path) @commits = repo.walk(repo.last_commit).to_a end end end
View <h1>commits</h1> <ul> <% @commits.each do |commit| %> <li><%= commit.message
%></li> <% end %> </ul>
Routes root to: 'rgitlog#index'
完成 慣れると10分くらいで作れるように なる
まとめ Asakusa.rbに通いこつこつと続け ていれば、 1年かかったことが20分でできるよ うになります