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
Rails アプリケーションのアップデートは大変 / Upgrading Rails appl...
Search
hrysd
December 17, 2020
0
1.5k
Rails アプリケーションのアップデートは大変 / Upgrading Rails application is hard
Pepabo Tech Conference #13
hrysd
December 17, 2020
Tweet
Share
More Decks by hrysd
See All by hrysd
突撃となりのプロジェクト / EC Tech Talk
hrysd
0
1.1k
シュッと学ぶ?スクラム
hrysd
0
120
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Happy Clients
brianwarren
98
6.7k
Designing the Hi-DPI Web
ddemaree
280
34k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
What's new in Ruby 2.0
geeforr
343
31k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
Raft: Consensus for Rubyists
vanstee
136
6.6k
How STYLIGHT went responsive
nonsquared
95
5.2k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
What's in a price? How to price your products and services
michaelherold
243
12k
Transcript
!ISZTE 3BJMTΞϓϦέʔγϣϯͷ Ξοϓσʔτେม
ೖࣾ !ISZTE &$ࣄۀ෦αʔϏεج൫νʔϜ IUUQTISZTEPSH
IUUQTISQFQBCPDPN JOUFSWJFX
αʔϏεج൫νʔϜͬͯ
ࠜݯతͰ͋Γɺղܾɾ࣮ݱํ๏͕Θ͔Βͳ͍ Α͏ͳٕज़՝ʹऔΓΈɺ&$ࣄۀ෦ͷ࣍ ͷͷΛࢧ͑Δɻ !LFODIBO
جຊઓུ w%FWFMPQFS&YQFSJFODFͷ্ w࣍ͷΛࢧ͑Δٕज़ͷࢿ
جຊઓུ w%FWFMPQFS&YQFSJFODFͷ্ w࣍ͷΛࢧ͑Δٕज़ͷࢿ "
%FWFMPQFS&YQFSJFODFͷ্ʁ
࠷ۙ͜Μͳ͜ͱΛ͍ͯ͠·͢ wݴޠॲཧܥɺϑϨʔϜϫʔΫͷόʔδϣϯΞοϓ wΤϥʔ௨ͱ͖߹͏
࠷ۙ͜Μͳ͜ͱΛ͍ͯ͠·͢ wݴޠॲཧܥɺϑϨʔϜϫʔΫͷόʔδϣϯΞοϓ wΤϥʔ௨ͱ͖߹͏ ܧଓతʹߦ͏ͨΊͷΈͮ͘Γ #
͔͜͜Βຊ
3BJMTΞϓϦέʔγϣϯͷ Ξοϓσʔτେม
ͲΜͳΞϓϦέʔγϣϯʁ wϓϥΠϕʔτͳ8FC"1*Λ୲ wೖग़ྗ+40/ wෳͷΞϓϦέʔγϣϯ͔Βࢀর
ͲΜͳঢ়گͳͷʁ $ bundle exec rake stats +----------------------+--------+--------+---------+---------+-----+-------+ | Name |
Lines | LOC | Classes | Methods | M/C | LOC/M | +----------------------+--------+--------+---------+---------+-----+-------+ | Controllers | 7140 | 5771 | 126 | 494 | 3 | 9 | | Helpers | 104 | 86 | 0 | 14 | 0 | 4 | | Jobs | 777 | 633 | 31 | 46 | 1 | 11 | | Models | 25804 | 17165 | 386 | 1574 | 4 | 8 | | Mailers | 501 | 407 | 16 | 40 | 2 | 8 | | Javascripts | 479 | 375 | 0 | 53 | 0 | 5 | | Libraries | 4927 | 4084 | 177 | 453 | 2 | 7 | | Tasks | 164 | 143 | 0 | 0 | 0 | 0 | | Config specs | 56 | 48 | 0 | 0 | 0 | 0 | | Controller specs | 8095 | 6640 | 0 | 6 | 0 | 1104 | | Decorator specs | 434 | 351 | 0 | 0 | 0 | 0 | | Feature specs | 342 | 261 | 0 | 0 | 0 | 0 | | Job specs | 1807 | 1497 | 0 | 0 | 0 | 0 | | Lib specs | 6743 | 5685 | 0 | 0 | 0 | 0 | | Mailer specs | 2733 | 2181 | 0 | 0 | 0 | 0 | | Model specs | 48150 | 39211 | 0 | 4 | 0 | 9800 | | Request specs | 26140 | 22135 | 0 | 0 | 0 | 0 | | Serializer specs | 1278 | 752 | 0 | 0 | 0 | 0 | | Uploader specs | 155 | 130 | 0 | 0 | 0 | 0 | +----------------------+--------+--------+---------+---------+-----+-------+ | Total | 135829 | 107555 | 736 | 2684 | 3 | 38 | +----------------------+--------+--------+---------+---------+-----+-------+ Code LOC: 28664 Test LOC: 78891 Code to Test Ratio: 1:2.8 4JNQMF$PWͰͷܭଌ݁Ռ
؆୯ʹͰ͖ͦ͏ʂ
None
ΞϓϦέʔγϣϯͷॴ wෳσʔλϕʔε wෳ߹ओΩʔ
ΞϓϦέʔγϣϯͷॴ wෳσʔλϕʔε wUIJBHPQSBEJPDUPQVT wෳ߹ओΩʔ wDPNQPTJUFQSJNBSZLFZTDPNQPTJUF@QSJNBSZ@LFZT
ݸਓతͳؾ࣋ͪ w3BJMTΞϓϦέʔγϣϯͲͷఔ͕ඪ४ػೳͰ࡞Β Ε͍ͯΔ͔͕қʹ݁ w֦ுతͳϥΠϒϥϦ͕ΘΕ͍ͯΔͱͦΕ͚ͩ֬ೝൣ ғɺྔ͕γϯϓϧʹ૿͑Δҹ
ҰํͰʜ wϥΠϒϥϦΛར༻͍ͯ͠Δͱ͍͏ͷɺࣗલͰ֦ு͠ ͍ͯΔͱ͍͏ύλʔϯͷ/ഒָ
Ξοϓσʔτͯ͠ΈΑ͏ʂ
UIJBHPQSBEJPDUPQVT w3BJMTܥͰෳσʔλϕʔεʹରԠͨ͜͠ͱ͋ͬͯ ׆ಈ͕ԼՐʹ wࢀߟIUUQTHJUIVCDPNUIJBHPQSBEJPDUPQVT wٯʹ͍͏ͱ3BJMTʹ͢ΕෆཁʹͳΔ w3FBE8SJUF4QMJUUJOHͱ͓ͯͬͯ͠Γɺ͜Εඪ ४ػೳͰ·͔ͳ͑Δ
'DPNQPTJUF@QSJNBSZ@LFZT w։ൃࠓ͞Ε͍ͯΔ w3BJMTͷόʔδϣϯ͝ͱʹରԠόʔδϣϯ͕ଘࡏ wҙͷόʔδϣϯʹରԠͨ͠ͷΛ͑ऴΘΓʂ
·͕͍ͪ
Ξοϓσʔτͯ͠Έ͚ͨͲʜ wBMJBT@BUUSJCVUFΛղܾͰ͖ͳ͍ wΞοϓσʔτͷલޙͰൃߦ͞ΕΔΫΤϦʹҧ͍͕ग़Δ
BMJBT@BUUSJCVUFͬͯʁ wҙͷଐੑΛผͷ໊લͰѻ͑ΔΑ͏ʹ͢Δػೳ w IUUQTBQJSVCZPOSBJMTPSHDMBTTFT"DUJWF.PEFM"UUSJCVUF.FUIPET$MBTT.FUIPETIUNM
BMJBT@BUUSJCVUFΛ͏ཧ༝ wΧϥʔϛʔγϣοϓҎ্ͷྺ࢙Λ࣋ͭαʔϏε w࣌ͷɺϑϨʔϜϫʔΫʢ3BJMTʣʹԊͬͨσʔλϞσϧͷઃܭ͕Ͱ͖ ͍ͯͳ͍Օॴ͕ଘࡏ͍ͯ͠Δ wͦ͜Λٵऩ͠ɺ୭͕ѻ͍͍͢Ϟσϧʹ͢ΔͨΊʹ BMJBT@BUUSJCVUFΛ͏ wΞϓϦέʔγϣϯͱσʔλʹ͓͚ΔϥΠϑαΠΫϧͷҧ͍ͷӨڹ
BMJBT@BUUSJCVUFͰͷ wҎԼͷΑ͏ͳΫΤϦ͕ղܾͰ͖ͳ͔ͬͨ wύονΛ͋ͯͯରԠ w6QTUSFBNͷؐݩ·ͩͰ͢
ൃߦ͞ΕΔΫΤϦʹҧ͍͕ʜ wςετΦʔϧάϦʔϯʹͳΓ wݕূڥ্Ͱ2"Λߦ͍ɺҰ௨Γಈ࡞ݕূΛߦͬͨ wϦϦʔεΛલʹ٧·ΔϦΫΤετΛൃݟ
ൃߦ͞ΕΔΫΤϦʹҧ͍͕ʜ wҎԼͷΑ͏ͳΫΤϦͷ݁Ռ͕ҙਤ͠ͳ͍ͷʹ wεϩʔΫΤϦʹͳͬͯ͠·ͬͨ wൃߦ͞ΕΔΫΤϦ·Ͱ֬ೝͰ͖͍ͯͳ͔ͬͨ
मਖ਼͚ͩ͜͜Ͱ͍͍ͷ͔ʁ
ࠩͷ֬ೝ͕େมʜ wൃߦ͞ΕΔ42-Λશͯ֬ೝ͢Δͷେมʜ wػցతʹஅ͠ɺࢹͷΛݮΒͤͳ͍ͷ͔ʜ
None
͜ΕͰ֬ೝͰ͖Δ͔ʂ wςετͰൃߦ͞ΕΔΫΤϦΛόʔδϣϯຖʹอଘ w"DUJWF3FDPSE-PH4VCTDSJCFSͰൃߦ͞ΕΔ42-Λऩू wલޙͷ݁ՌΛࣈ໘ͷΈͰൺֱ w4FUOFX <26&3:> ?4FUOFX <26&3:> w1SFQBSFE4UBUFNFOUͳΒ"45ΛΘͳ͍͚ͯ͘Δ͔ʂ
wྫ4&-&$5 '30."8)&3&JE
ͬͯΈͨ
None
ͪΐͬͱμϝ͔ʜ wIUUQTHJUIVCDPNISZTETRBQʢSVCZHFNTPSHʹͳ͍Ͱ͢ʣ wDPNQPTJUF@QSJNBSZ@LFZTͷςετͰࢼͯ͠Έͨ w୯ͳΔࣈ໘Ͱͷൺֱͩͱεϖʔεɺύϥϝʔλͷҧ͍Έ͍ͨͳͷ͕ Ҿ͔͔ͬΓͩΊ͔ wͦͦςετσʔλͷ༻ҙͷΫΤϦͱ͔ೖ͍ͬͯͨΓʜ w݁Ռͷ(JTUͪ͜Β wIUUQTCJUMZP;0,,
࠷ޙʹ wԣணͤͣʹࠩΛͪΌΜͱ֬ೝ͠·͠ΐ͏ wվΊͯ͜Ε͕ϥΠϒϥϦΛ͏͜ͱͩͱೝࣝ w·ͩఘΊ͖Εͯͳ͍ͷͰ্ख͍ํ๏ͳ͍͔ࡧதͰ͢ wͳʹ͔͍ͬͯΔਓ͕͍ͨΒڭ͍͑ͯͩ͘͞ʂʂʂ