チェンジセット 47

差分発生行の前後
無視リスト:
コミット日時:
2007/02/22 04:55:48 (2 年前)
コミッタ:
soutaro
ログメッセージ:

delay require to work without hpricot/mechanize library

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • trunk/plugin/apply_text_html.rb

    r46 r47  
    1 begin 
    2   require 'rubygems' 
    3 rescue LoadError 
    4 end 
    5 require 'hpricot' 
    61 
    72def apply_text_html(config, data) 
     3  begin 
     4    require 'rubygems' 
     5  rescue LoadError 
     6  end 
     7  require 'hpricot' 
     8   
    89  data.collect {|d| 
    910    doc = Hpricot(d.to_s.toutf8) 
  • trunk/plugin/translations/yahoo.rb

    r45 r47  
    11# translate input strings by Yahoo Honyaku (requires WWW::Mechanize) 
    22 
    3 begin 
    4   require 'rubygems' 
    5 rescue LoadError 
    6 end 
    7 require 'mechanize' 
     3def yahoo(config, data) 
     4  begin 
     5    require 'rubygems' 
     6  rescue LoadError 
     7  end 
     8  require 'mechanize' 
    89 
    9 def yahoo(config, data) 
     10 
    1011  config = (config || { "translation" => "en=>ja" }) 
    1112