Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Our tDiary's policy and strategies to support Ruby 1.9 and our future plan

SHIBATA Hiroshi
October 10, 2011
770

Our tDiary's policy and strategies to support Ruby 1.9 and our future plan

SHIBATA Hiroshi

October 10, 2011
Tweet

Transcript

  1. tDiary ͷ Ruby1.9 ରԠͷաఔͱ ࠓޙͷϩʔυϚοϓ ࣲా തࢤ (tDiary.org) SHIBATA Hiroshi

    (tDiary.org) Our tDiary's policy and strategies to support Ruby 1.9 and our future plan. 1 2009೥7݄19೔೔༵೔
  2. Agenda • ·ͣ͸͡Ίʹ • tDiary-2.3.2ϦϦʔεܭը(Ruby 1.9 α ϙʔτ) • Ruby

    1.9 ରԠͷৄࡉ • tDiary-2.3.3~ future 8 2009೥7݄19೔೔༵೔
  3. tDiary • Tsukkomi oriented Diary system • before Rails͔Β։ൃܧଓத(25೥ܭը) •

    Rubyͱڞʹ੒௕ • ϨϯλϧαʔόʔʹRubyΛೖΕͤ͞Δ ࡞ઓ 14 2009೥7݄19೔೔༵೔
  4. tDiary ʹΑΔRuby 1.9 ීٴ࡞ઓ • Ruby 1.9͸͍͔ͭ͸࢖Θͳ͚Ε͹ͳΒͳ ͍ • tDiaryΛRuby

    1.9ීٴͷΩϥʔΞϓϦʹ ͢Δ • ͱΓ͋͑ͣಈ͔͘ΒRubyΛ1.9ʹόʔ δϣϯΞοϓͯ͠͠·͏ 20 2009೥7݄19೔೔༵೔
  5. Agenda • ·ͣ͸͡Ίʹ • tDiary-2.3.2ϦϦʔεܭը(Ruby 1.9 αϙʔτ) • Ruby 1.9

    ରԠͷৄࡉ • tDiary-2.3.3~ future 21 2009೥7݄19೔೔༵೔
  6. Agenda • ·ͣ͸͡Ίʹ • tDiary-2.3.2ϦϦʔεܭը(Ruby 1.9 αϙʔτ) • Ruby 1.9

    ରԠͷৄࡉ • tDiary-2.3.3~ future 33 2009೥7݄19೔೔༵೔
  7. compatible.rb • ϓϩτλΠϓ͸ machu ͞Μ͕࡞੒ • 1.8ͱ1.9ͱͷඇޓ׵Λٵऩ • for 1.9:

    String.each_line, String.to_a ... • for 1.8: String.force_encoding, String.bytesize ... 36 2009೥7݄19೔೔༵೔
  8. ruby --encoding=utf-8 • ruby ࣮ߦ࣌ʹ --encoding ΦϓγϣϯΛ͚ͭ Δ͜ͱͰΤϯίʔσΟϯάΛڧ੍Ͱ͖Δ • tDiaryͷ৔߹ͩͱindex.rb΍update.rbͷ

    shebangʹ௥Ճ • Ϣʔβʔʹ༏͘͠ແ͍ͷͰҙࣝ͠ͳͯ͘ ΋ಈ͘Α͏ʹ͢Δ 42 2009೥7݄19೔೔༵೔
  9. ࡉ͔͍मਖ਼ • cgi.cookies ͕ ASCII-8BIT ͱೝࣝ͞ΕΔͷͰ encodingΛݸผʹࢦఆ͢Δ • ϒϩοΫΛ͚ͭͳ͍ map

    ͸ Enumerator Λฦ ͢Α͏ʹͳͬͨͷͰ to_a ͢Δ • get ͷୈೋҾ਺͕ nil ڐ༰͠ͳ͘ͳͬͨͷͰ ԿΒ͔ͷ஋Λࢦఆ 48 2009೥7݄19೔೔༵೔
  10. ࿝ࢣᐌ͘ • Ruby ͷ [BUG] Λ౿ΜͩΒتͼͳ͍͞ • Ruby ͷ [BUG]

    Λ౿ΉΑ͏ʹͳ͔ͬͯ ΒҰਓલͷΞϓϦέʔγϣϯ • ͨͩͷϨΨ(ry 56 2009೥7݄19೔೔༵೔
  11. Agenda • ·ͣ͸͡Ίʹ • tDiary-2.3.2ϦϦʔεܭը(Ruby 1.9 αϙʔτ) • Ruby 1.9

    ରԠͷৄࡉ • tDiary-2.3.3~ future 60 2009೥7݄19೔೔༵೔
  12. tDiary-2.3.3~ future • testing frameworkͷ࠾༻ • rspec • cucumber •

    CGI͔ΒRack΁ͷࡌͤସ͑ • ػೳ௥Ճͱෆ۩߹मਖ਼ 62 2009೥7݄19೔೔༵೔
  13. ࡞ۀεςʔλε •script/server (pure webrick) •rackup -s webrick tdiary.ru •cucumber -l

    ja features •Ұ෦ͷγφϦΦͷΈಈ͘ 72 2009೥7݄19೔೔༵೔