Rails Upgrade Casual Talks
by
Akira Matsuda
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
10ઓ͑ΔϑϨʔϜϫʔΫ ͷόʔδϣϯΞοϓઓུ @a_matsuda Rails Upgrade Casual Talks
Slide 2
Slide 2 text
self ⤴GitHub: amatsuda ⤴Twitter: @a_matsuda
Slide 3
Slide 3 text
ද࡞ ⤴ stateful_enum https://github.com/amatsuda/ stateful_enum
Slide 4
Slide 4 text
Railsίϛολʔ ⤴ݱ࣌Ͱ།Ұͷຊਓ
Slide 5
Slide 5 text
Asakusa.rb
Slide 6
Slide 6 text
RubyKaigi2015, 2016ͷ ʮνʔϑɾΦʔΨφΠβʔʯ = ͟ ͟͞͞
Slide 7
Slide 7 text
begin
Slide 8
Slide 8 text
Railsͷྺ࢙ ⤴ 10 ⤴ఆظతͳόʔδϣϯΞοϓ ⤴৽͍͠ύϥμΠϜͷʑ ⤴ઈ͑ؒͷͳ͍มԽ
Slide 9
Slide 9 text
10ؒ׆ൃʹ։ൃ͞Εଓ͚Δ ൿ݃ ⤴ఆظతͳόʔδϣϯΞοϓ ⤴೩ྉ ⤴ݹ͍ίʔυΛͲΜͲΜࣺͯΔ ⤴มߋʹڧ͍࡞Γ ⤴มԽΛࢧ͑ΔςΫϊϩδʔ ⤴มԽ͢ΔίϛϡχςΟ
Slide 10
Slide 10 text
ఆظతͳόʔδϣϯΞοϓ ⤴ ެ։: 2004 ⤴ 1.0: 2005 ⤴ 2.0: 2007 ⤴ 3.0: 2010 ⤴ 4.0: 2013 ⤴ 5.0: 2016
Slide 11
Slide 11 text
ϝδϟʔόʔδϣϯ͝ͱͷ ৽͍͠ύϥμΠϜ (= ೩ྉ) ⤴ 1.x: CoC, DRY , TDD, generator, … ⤴ 2.x: REST ⤴ 3.x: Modularity, Asset Pipeline ⤴ 4.x: Strong Parameters ⤴ 5.x: ?
Slide 12
Slide 12 text
ݹ͍ίʔυΛࣺͯΔ
Slide 13
Slide 13 text
Rails͕αϙʔτ͢Δ Rubyͷόʔδϣϯͷมભ ⤴ 1.0: ʙ1.8.6 ⤴ 2.0: 1.8.6, 1.8.7 ⤴ 3.0: 1.8.7 , 1.9 ⤴ 4.0: 1.9, 2.0, 2.1 ⤴ 5.0: 2.2, 2.3
Slide 14
Slide 14 text
ੵۃతʹݹ͍όʔδϣϯͷRuby ͷαϙʔτΛଧͪΔ ⤴ RailsͷίʔυϕʔεͰRubyͷ ৽ػೳΛͲΜͲΜ׆༻Ͱ͖Δ ⤴ Railsͷϝϯςָ͕ʹͳΔ ⤴ RubyνʔϜݹ͍RubyͷϝϯςΛ ͦΕ΄ͲؤுΒͳͯ͘Ϣʔβʔʹ ͋·ΓౖΒΕͳ͘ͳΔ
Slide 15
Slide 15 text
ίʔυͷ৽ँ ⤴৽͍͠ػೳΛͲΜͲΜ औΓೖΕΔ ⤴ͦͷ໘ɺΘΕͳ͘ͳͬͯ ͖ͨػೳΛੵۃతʹഁغ͢Δ
Slide 16
Slide 16 text
มߋʹڧ͍࡞Γ ⤴ ϓϥάΠϯγεςϜ(࠷ॳ͔Β) ⤴ RailsϓϥάΠϯΛRubyGemsʹ (2.x) ⤴ Bundlerͷൃ໌ (3.0) ⤴ agnosticͳߏ (3.0) ⤴ AMCͷൃ໌ (1.2) ⤴ Module#prependͷఏҊ (wycats)
Slide 17
Slide 17 text
มԽ͢ΔίϛϡχςΟ ⤴ community == ϑϨʔϜ ϫʔΫࣗମͷ։ൃ ίϛϡχςΟͷ͜ͱ ⤴ http://rubyonrails.org/community/
Slide 18
Slide 18 text
Community ⤴ community = core team + committers + contributors ⤴ΦϨΦϨ (since 2008) ⤴࣮3൪Ίʹݹגʂʁ
Slide 19
Slide 19 text
݈શͳίϛϡχςΟ ⤴ڧྗͳಠࡋऀ ⤴༗ೳͳ෭ ⤴ͦͷଞͷϝϯόʔৗʹ ೖΕସΘ͍ͬͯΔ ⤴ΈΜͳ͛͢ʔए͍
Slide 20
Slide 20 text
มԽΛࢧ͑Δٕज़ ⤴ Git, GitHub ⤴ contributors app ⤴ Travis CI
Slide 21
Slide 21 text
ݱࡏͷRailsϓϩδΣΫτͷ όʔδϣϯΞοϓϙϦγʔ ⤴ SemVer? ⤴ ϒϥϯνϙϦγʔ ⤴ αϙʔτ͢ΔRubyͷόʔδϣϯΛ্͛Δͱ͖ϝδϟʔ όʔδϣϯΛ্͛Δ ⤴ େ͖ͳAPIมߋϚΠφʔόʔδϣϯΛ্͍͛ͨ ⤴ ηΩϡϦςΟύονಠཱͰ ⤴ ϝιου͕ͳ͘ͳͬͨΓ͢Δ߹deprecation warning Λग़͢
Slide 22
Slide 22 text
SemVer? https://twitter.com/dhh/status/550744752145321985
Slide 23
Slide 23 text
ϒϥϯνϙϦγʔ ⤴ ϝϯςφϯεϒϥϯνͷຊ ⤴ ܾ·ͬͯͳ͍ ⤴ ͍͍ͩͨ 1ʙ̎ຊ ⤴ ୲ऀ ⤴ ܾ·ͬͯͳ͍ ⤴ Γ͍ͨਓ͕ډΕΔ
Slide 24
Slide 24 text
ϒϥϯνϙϦγʔ(Rubyͷ߹) ⤴ RubyνʔϜͰ̎όʔδϣϯ ͙Β͍αϙʔτ͍ͯ͠Δ ⤴͞Βʹ͏1ͭલRubyAssnͷ ͓ۚͰαϙʔτ͍ͯ͠Δ ⤴ͭ·Γɺαϙʔτظؒ3͙Β͍
Slide 25
Slide 25 text
αϙʔτ͢ΔRubyͷόʔδϣϯΛ্͛ Δͱ͖ϝδϟʔόʔδϣϯΛ্͛Δ ⤴ઌड़ͷͱ͓Γ ⤴ 5.0͔ΒRuby 2.2Ҏ্
Slide 26
Slide 26 text
େ͖ͳAPIมߋ ϚΠφʔόʔδϣϯΛ্͍͛ͨ ⤴ Tinyόʔδϣϯؒͷࠩҟ جຊతʹόάfixͷΈ
Slide 27
Slide 27 text
ηΩϡϦςΟύονಠཱͰ ⤴ଞͷύονͱࠞͥͯ ϦϦʔε͠ͳ͍
Slide 28
Slide 28 text
ϝιου͕ͳ͘ͳͬͨΓ͢Δ ߹deprecation warningΛग़͢ ⤴લͷόʔδϣϯ·Ͱಈ͍ ͍ͯͨίʔυ͕͍͖ͳΓ ಈ͔ͳ͘ͳͬͨΓ͠ͳ͍ Α͏ʹ(ͳΔ͘)
Slide 29
Slide 29 text
ͱ͍͏۩߹ʹɺ࠷͚ۙͬ͜͏ ͪΌΜͱͬͯΔ ⤴աڈͷࣦഊ͔Βֶश
Slide 30
Slide 30 text
աڈͷࣦഊྫ(Α͋ͬͨ͘) ⤴ηΩϡϦςΟύονΛؚΜͩ ϏοάϦϦʔε ⤴ඇޓͳAPIมߋΛؚΜͰͨΓ… ⤴͔ͦ͠Ε͕·ͨόάͬͯͨΓ… ⤴ => ηΩϡϦςΟύονΛͯΔͱΞϓϦ ͕յΕΔ
Slide 31
Slide 31 text
Railsͷ༷҆ఆͤ͞Δ͖ʁ ⤴ͦ͏͍͏ҙݟͷίϛολʔډΔ ⤴҆ఆੑͱύϑΥʔϚϯεʹྗ ⤴ݸਓతʹɺͦΕͰίϛϡχ ςΟ͕Εͯߦͬͯ͠·͏ͱࢥ͏ ⤴ Strutsతͳ
Slide 32
Slide 32 text
RailsͷόʔδϣϯΞοϓʹ ͓͚Δ՝(۪ஒͱ͍͏) ⤴ຖճ୭͔͕ARΛյ͢ ⤴όʔδϣϯ্͕Δͱ͘ͳΔ ⤴ issue triage͕͍͔ͭͳ͍ ⤴ edgeҎ֎୭ݟͯͳ͍
Slide 33
Slide 33 text
ղܾࡦ ⤴ಛʹͳ͍ͱࢥ͏ ⤴ΈΜͳ͕͕ΜΔ͔͠ ⤴ͦͷRuby͍͢͝ʂ
Slide 34
Slide 34 text
ϨʔϧʹΓଓ͚Δίπ ⤴ͱʹ͔͘࠷৽൛Λ͏ ⤴ϑϨʔϜϫʔΫϓϥΪϯͷίʔυ ͪΌΜͱಡΉ ⤴ϑϨʔϜϫʔΫͷόάΛڪΕͳ͍ ⤴Γͦ͏ͳϓϥΪϯΛݟۃΊΔ ⤴ࣗͰͲ͏ʹ͔͢Δ
Slide 35
Slide 35 text
end