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.6k
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
Building Adaptive Systems
keathley
38
2.3k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
510
Docker and Python
trallard
42
3.1k
Designing for Performance
lara
604
68k
It's Worth the Effort
3n
183
28k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Site-Speed That Sticks
csswizardry
2
190
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
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ͳʹ͔͍ͬͯΔਓ͕͍ͨΒڭ͍͑ͯͩ͘͞ʂʂʂ