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

Gem #wedding_s

Gem #wedding_s

Bf7ce9b68bbb0058721906b4db15b9b5?s=128

Kei Shiratsuchi

October 21, 2013
Tweet

Transcript

  1. ޷͖ͳHFN ΋͘͠͸ ๅੴ ͸ԿͰ͔͢ʁ ന౔ܛ

  2. None
  3. None
  4. (FN

  5. None
  6. None
  7. ͷ ϓϩάϥϛϯάݴޠ 3VCZ ศརΞΠςϜ

  8. 8FC ΞϓϦ

  9. sinatra require 'sinatra' get '/hi' do '͜ΜʹͪΘੈք' end

  10. sinatra

  11. )5.- ղੳ

  12. None
  13. nokogiri require 'nokogiri' require 'open-uri' html = open('https://twitter.com/kei_s') doc =

    Nokogiri::HTML(html) doc.css('.tweet-text').each do |e| puts e.text end
  14. nokogiri ࣗ୐࡞ۀEBZ !FJLPN͋Γ͕ͱ͏͍͟͝·͢ʂ ఱؾྑ͍Ͱ͢ XJUIZVLBBUࡾܢԂ 4BOLFJFO(BSEFO <QJD>ŠIUUQTQBUIDPNQ). ே͝͸Μ͔ͬ͠Γ৯΂ͨ ͸ʔɺNBDͷPQFOίϚϯυͷBΦϓγϣϯศརͩͬͨ͠[TIͷิ׬ͰBQQΛީิʹͯ͠ WJNZUVUPSͳ͍ͷ

    4BJOU1FQTJͷCBOEDBNQͷΞϧόϜ͕͜ͱ͝ͱ͘ങ͑ͳͯ͘ࠔΔ !TIJSBZVDB͋ʔͬɺ͸͍ʜʂ !GSLPVU͸ʔ͍͋Γ͕ͱ͏ʂ·ͨͶʙ !GSLPVU͸͍͸ʔ͍ʂਲͬͯΔ͠ձ͍͍ͨͥʂ !GSLPVU΋࣌͠Ҏ߱ʹҿΜͰͨΒͥͻҿ΋͏ͥʙɻҿΊΔʁ !GSLPVU!TIJSBZVDB͍ΔΑ OHJOYXMVB΍ͬͯΈ͚ͨͲ͍͚Δ͔ͳ !TIJSBZVDBͳΜͱ ೋਓ͚ͯͬ͜͠͏͓ञҿΜͰ͓Ոʹؼ͖ͬͯͨΒɺਲͬͯΔײ͋Δͻͱ͕ɺʮ΋ʔɺࠃഁΕͯ
  15. (FN

  16. ͷ ϓϩάϥϛϯάݴޠ 3VCZ ศརΞΠςϜ

  17. None
  18. ͷ ศརΞΠςϜ ͭΊ͋Θͤ

  19. Gemfile # A sample Gemfile source "http://rubygems.org" gem "gems" gem

    "sqlite3" gem "sequel" gem "activerecord" gem "awesome_print" gem "tapp" gem "gnuplot"
  20. None
  21. None
  22. ΈΜͳͷ ޷͖ͳ(FN ΋͘͠͸ๅੴ Λ ͭΊ͋Θ͍ͤͨ

  23. ΍ͬͯΈͨ

  24. ಈ͔ͳ͍

  25. ͦΜͳ (FN͸ ͳ͍

  26. Ͱ΋ ಈ͔͍ͨ͠

  27. ແཧ໼ཧ ΍Δ

  28. w geminaboxΛ࢖ͬͯϩʔΧϧϚγϯʹgemαʔόΛཱͯΔɻ w ϚϧνόΠτͷ໊લͷgemΛ࡞Δɻ۩ମతʹ͸gemspecϑΝΠϧ ͚ͩ࡞ͬͯϏϧυ͢Δɻ w bundleίϚϯυ͕ϚϧνόΠτ໊ͷgemΛ૝ఆͯ͠ͳ͍ͷͰϞϯ ΩʔύονΛ౰ͯΔɻ w GemfileΛinstance_eval͢Δࡍʹɺgemϝιουʹ౉Δจ

    ࣈྻΛforce_encoding(“UTF-8”) ͢Δɻ w gem αʔόʹґଘؔ܎ͷϦΫΤετΛ౤͛Δࡍʹ spec_file_name Λ URI.encode ͢Δɻ w gem ϥΠϒϥϦ͕ϚϧνόΠτ໊ͷ gem Λ૝ఆ͍ͯ͠ͳ͍ͷͰϞ ϯΩʔύονΛ౰ͯΔɻ w gem αʔό͔Βμ΢ϯϩʔυ͢ΔϦΫΤετΛ౤͛Δࡍʹ gem_file_name Λ URI.encode ͢Δɻ w geminabox ΋ϚϧνόΠτ໊ͷ gem Λ૝ఆ͍ͯ͠ͳ͍ͷͰϞϯΩ ʔύονΛ౰ͯΔɻ w ϦΫΤετΛ URI.decode ͯ͠ਖ਼͍͠ϑΝΠϧύεʹ͢Δɻ
  29. ΍ͬͯΈͨ