Changeset 5555

Show
Ignore:
Timestamp:
01/26/08 19:08:36 (5 years ago)
Author:
cho45
Message:

lang/ruby/net-irc/trunk/test/net-irc_test.rb,
lang/ruby/net-irc/trunk/README,
lang/ruby/net-irc/trunk/examples/lig.rb:

Append documentation.
Append test.
Autodownload lingr library.

Location:
lang/ruby/net-irc/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/net-irc/trunk/README

    r5524 r5555  
    1616=== Gem Installation 
    1717 
    18         gem install netirc 
     18        gem install net-irc 
    1919 
    2020 
     
    2323 
    2424== Synopsis 
     25 
     26 
     27== IRC Gateways 
     28 
     29There are some gateways connecting to webservices. 
     30 
     31* Lingr 
     32* Twitter 
     33* Wasser 
     34 
     35If you want to run it, type following: 
     36 
     37Lingr: 
     38        $ ruby -rubygems -e 'exec("ruby", Gem.searcher.find("net/irc").full_gem_path+"/examples/lig.rb")' 
     39 
     40Twitter: 
     41        $ ruby -rubygems -e 'exec("ruby", Gem.searcher.find("net/irc").full_gem_path+"/examples/tig.rb")' 
     42 
     43Wasser: 
     44        $ ruby -rubygems -e 'exec("ruby", Gem.searcher.find("net/irc").full_gem_path+"/examples/wig.rb")' 
    2545 
    2646 
  • lang/ruby/net-irc/trunk/examples/lig.rb

    r5536 r5555  
    77 
    88# http://svn.lingr.com/api/toolkits/ruby/infoteria/api_client.rb 
    9 require 'api_client' 
     9begin 
     10        require "api_client" 
     11rescue LoadError 
     12        require "net/http" 
     13        File.open("api_client.rb", "w") do |f| 
     14                f.puts Net::HTTP.get("http://svn.lingr.com/api/toolkits/ruby/infoteria/api_client.rb") 
     15        end 
     16        require "api_client" 
     17end 
    1018 
    1119require "net/irc" 
     
    182190}) 
    183191 
    184 Net::IRC::Server.new("localhost", 16669, LingrIrcGateway, { 
    185         :api_key => @config["api_key"] 
    186 }).start 
     192Net::IRC::Server.new("localhost", 16669, LingrIrcGateway, @config).start 
    187193 
  • lang/ruby/net-irc/trunk/test/net-irc_test.rb

    r5544 r5555  
    1212                assert_equal "001", welcome 
    1313                assert_equal "RPL_WELCOME", Net::IRC::COMMANDS[welcome] 
     14                assert_equal Net::IRC::Constants::RPL_WELCOME, welcome 
    1415        end 
    1516