Changeset 6624
- Timestamp:
- 02/13/08 15:05:53 (5 years ago)
- Location:
- lang/ruby/chokan/branches/citrus/plugins
- Files:
-
- 18 copied
-
aa.rb (copied) (copied from lang/ruby/chokan/trunk/plugins/aa.rb) (2 diffs)
-
auto_uri_escape.rb (copied) (copied from lang/ruby/chokan/trunk/plugins/auto_uri_escape.rb) (3 diffs)
-
cer.rb (copied) (copied from lang/ruby/chokan/trunk/plugins/cer.rb) (2 diffs)
-
dcc_cache.rb (copied) (copied from lang/ruby/chokan/trunk/plugins/dcc_cache.rb) (2 diffs)
-
decode_unicode.rb (copied) (copied from lang/ruby/chokan/trunk/plugins/decode_unicode.rb) (2 diffs)
-
dictionary.rb (copied) (copied from lang/ruby/chokan/trunk/plugins/dictionary.rb) (2 diffs)
-
erogame_space.rb (copied) (copied from lang/ruby/chokan/trunk/plugins/erogame_space.rb) (2 diffs)
-
gamer_tag.rb (copied) (copied from lang/ruby/chokan/trunk/plugins/gamer_tag.rb) (2 diffs)
-
gates_point.rb (copied) (copied from lang/ruby/chokan/trunk/plugins/gates_point.rb) (2 diffs)
-
google_calc.rb (copied) (copied from lang/ruby/chokan/trunk/plugins/google_calc.rb) (2 diffs)
-
google_search.rb (copied) (copied from lang/ruby/chokan/trunk/plugins/google_search.rb) (4 diffs)
-
lastfm.rb (copied) (copied from lang/ruby/chokan/trunk/plugins/lastfm.rb) (2 diffs)
-
nico_search.rb (copied) (copied from lang/ruby/chokan/trunk/plugins/nico_search.rb) (2 diffs)
-
sakage.rb (copied) (copied from lang/ruby/chokan/trunk/plugins/sakage.rb) (2 diffs)
-
twitter_id.rb (copied) (copied from lang/ruby/chokan/trunk/plugins/twitter_id.rb) (2 diffs)
-
twitter_search.rb (copied) (copied from lang/ruby/chokan/trunk/plugins/twitter_search.rb) (3 diffs)
-
whois.rb (copied) (copied from lang/ruby/chokan/trunk/plugins/whois.rb) (2 diffs)
-
wikipedia.rb (copied) (copied from lang/ruby/chokan/trunk/plugins/wikipedia.rb) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/chokan/branches/citrus/plugins/aa.rb
r5861 r6624 1 1 2 require 'chokan/plugin_base'3 2 require 'uri' 4 3 require 'net/http' 5 4 require 'hpricot' 6 5 7 class Aa < C hokan::PluginBase8 def initialize( config, chokan)6 class Aa < Citrus::Plugin 7 def initialize(*args) 9 8 super 10 9 @prefix = @config['prefix'] || '(?i:aa) *' … … 81 80 end 82 81 82 83 tests do 84 describe Aa do 85 before :all do 86 @core = DummyCore.new({}) 87 @socket = @core.socket 88 @prefix = Net::IRC::Prefix.new("foo!foo@localhsot") 89 90 @plugin = Aa.new(@core, { "Aa" => { 91 } }) 92 end 93 94 it "should reply correctly" do 95 # @socket.clear 96 # @plugin.on_privmsg(@prefix, "#test", "foo") 97 # @socket.pop.to_s.should == "NOTICE #test :Nice boat.\r\n" 98 end 99 end 100 101 end 102 -
lang/ruby/chokan/branches/citrus/plugins/auto_uri_escape.rb
r6410 r6624 1 require 'chokan/plugin_base'2 1 require 'uri' 3 2 require 'net/http' … … 5 4 Net::HTTP.version_1_2 6 5 7 class AutoUriEscape < C hokan::PluginBase6 class AutoUriEscape < Citrus::Plugin 8 7 REVISION = '$Rev$'.gsub(/\D+/, '').to_i 9 def initialize( config, chokan)8 def initialize(*args) 10 9 super 11 10 @shunirr = @config['shunirr'] || ' x shunirr' … … 60 59 end 61 60 end 61 62 tests do 63 describe AutoUriEscape do 64 before :all do 65 @core = DummyCore.new({}) 66 @socket = @core.socket 67 @prefix = Net::IRC::Prefix.new("foo!foo@localhsot") 68 69 @plugin = AutoUriEscape.new(@core, { "AutoUriEscape" => { 70 } }) 71 end 72 73 it "should reply correctly" do 74 # @socket.clear 75 # @plugin.on_privmsg(@prefix, "#test", "foo") 76 # @socket.pop.to_s.should == "NOTICE #test :Nice boat.\r\n" 77 end 78 end 79 80 end 81 -
lang/ruby/chokan/branches/citrus/plugins/cer.rb
r283 r6624 5 5 # currency exchange rate 6 6 7 class Cer < C hokan::PluginBase7 class Cer < Citrus::Plugin 8 8 CER = {"USD" => "アメリカドル", 9 9 "GBP" => "イギリス ポンド", … … 89 89 end 90 90 end 91 92 tests do 93 describe Cer do 94 before :all do 95 @core = DummyCore.new({}) 96 @socket = @core.socket 97 @prefix = Net::IRC::Prefix.new("foo!foo@localhsot") 98 99 @plugin = Cer.new(@core, { "Cer" => { 100 } }) 101 end 102 103 it "should reply correctly" do 104 # @socket.clear 105 # @plugin.on_privmsg(@prefix, "#test", "foo") 106 # @socket.pop.to_s.should == "NOTICE #test :Nice boat.\r\n" 107 end 108 end 109 110 end 111 -
lang/ruby/chokan/branches/citrus/plugins/dcc_cache.rb
r283 r6624 1 1 2 2 3 require "chokan/plugin_base"4 3 require "digest/sha1" 5 4 6 class DccCache < C hokan::PluginBase5 class DccCache < Citrus::Plugin 7 6 8 7 def on_ctcp(prefix, message) … … 65 64 end 66 65 66 67 tests do 68 describe DccCache do 69 before :all do 70 @core = DummyCore.new({}) 71 @socket = @core.socket 72 @prefix = Net::IRC::Prefix.new("foo!foo@localhsot") 73 74 @plugin = DccCache.new(@core, { "DccCache" => { 75 } }) 76 end 77 78 it "should reply correctly" do 79 # @socket.clear 80 # @plugin.on_privmsg(@prefix, "#test", "foo") 81 # @socket.pop.to_s.should == "NOTICE #test :Nice boat.\r\n" 82 end 83 end 84 85 end 86 -
lang/ruby/chokan/branches/citrus/plugins/decode_unicode.rb
r283 r6624 2 2 require "rubygems" 3 3 require "charnames" 4 require "chokan/plugin_base"5 4 require "open-uri" 6 5 7 class DecodeUnicode < C hokan::PluginBase6 class DecodeUnicode < Citrus::Plugin 8 7 9 def initialize( config, chokan)8 def initialize(*args) 10 9 super 11 10 end … … 21 20 end 22 21 end 22 23 tests do 24 describe DecodeUnicode do 25 before :all do 26 @core = DummyCore.new({}) 27 @socket = @core.socket 28 @prefix = Net::IRC::Prefix.new("foo!foo@localhsot") 29 30 @plugin = DecodeUnicode.new(@core, { "DecodeUnicode" => { 31 } }) 32 end 33 34 it "should reply correctly" do 35 # @socket.clear 36 # @plugin.on_privmsg(@prefix, "#test", "foo") 37 # @socket.pop.to_s.should == "NOTICE #test :Nice boat.\r\n" 38 end 39 end 40 41 end 42 -
lang/ruby/chokan/branches/citrus/plugins/dictionary.rb
r1511 r6624 1 1 2 2 3 require "chokan/plugin_base"4 3 require "rubygems" 5 4 require "hpricot" 6 5 7 class Dictionary < C hokan::PluginBase6 class Dictionary < Citrus::Plugin 8 7 def description 9 8 "none" 10 9 end 11 10 12 def initialize( config, chokan)11 def initialize(*args) 13 12 super 14 13 end … … 84 83 end 85 84 85 86 tests do 87 describe Dictionary do 88 before :all do 89 @core = DummyCore.new({}) 90 @socket = @core.socket 91 @prefix = Net::IRC::Prefix.new("foo!foo@localhsot") 92 93 @plugin = Dictionary.new(@core, { "Dictionary" => { 94 } }) 95 end 96 97 it "should reply correctly" do 98 # @socket.clear 99 # @plugin.on_privmsg(@prefix, "#test", "foo") 100 # @socket.pop.to_s.should == "NOTICE #test :Nice boat.\r\n" 101 end 102 end 103 104 end 105 -
lang/ruby/chokan/branches/citrus/plugins/erogame_space.rb
r5695 r6624 3 3 require 'uri' 4 4 5 class ErogameSpace < C hokan::PluginBase6 def initialize( config, chokan)5 class ErogameSpace < Citrus::Plugin 6 def initialize(*args) 7 7 super 8 8 @prefix = @config['prefix'] || 'erg ' … … 44 44 end 45 45 end 46 47 tests do 48 describe ErogameSpace do 49 before :all do 50 @core = DummyCore.new({}) 51 @socket = @core.socket 52 @prefix = Net::IRC::Prefix.new("foo!foo@localhsot") 53 54 @plugin = ErogameSpace.new(@core, { "ErogameSpace" => { 55 } }) 56 end 57 58 it "should reply correctly" do 59 # @socket.clear 60 # @plugin.on_privmsg(@prefix, "#test", "foo") 61 # @socket.pop.to_s.should == "NOTICE #test :Nice boat.\r\n" 62 end 63 end 64 65 end 66 -
lang/ruby/chokan/branches/citrus/plugins/gamer_tag.rb
r451 r6624 1 1 2 require 'chokan/plugin_base'3 2 require 'hpricot' 4 3 require 'net/http' 5 4 6 class GamerTag < C hokan::PluginBase7 def initialize( config, chokan)5 class GamerTag < Citrus::Plugin 6 def initialize(*args) 8 7 super 9 8 @prefix = @config['prefix'] || 'xbox ' … … 33 32 end 34 33 end 34 35 tests do 36 describe GamerTag do 37 before :all do 38 @core = DummyCore.new({}) 39 @socket = @core.socket 40 @prefix = Net::IRC::Prefix.new("foo!foo@localhsot") 41 42 @plugin = GamerTag.new(@core, { "GamerTag" => { 43 } }) 44 end 45 46 it "should reply correctly" do 47 # @socket.clear 48 # @plugin.on_privmsg(@prefix, "#test", "foo") 49 # @socket.pop.to_s.should == "NOTICE #test :Nice boat.\r\n" 50 end 51 end 52 53 end 54 -
lang/ruby/chokan/branches/citrus/plugins/gates_point.rb
r5867 r6624 1 require 'chokan/plugin_base'2 1 3 class GatesPoint < C hokan::PluginBase4 def initialize( config, chokan)2 class GatesPoint < Citrus::Plugin 3 def initialize(*args) 5 4 super 6 5 @suffix = @config['suffix'] || 'gp' … … 27 26 end 28 27 end 28 29 tests do 30 describe GatesPoint do 31 before :all do 32 @core = DummyCore.new({}) 33 @socket = @core.socket 34 @prefix = Net::IRC::Prefix.new("foo!foo@localhsot") 35 36 @plugin = GatesPoint.new(@core, { "GatesPoint" => { 37 } }) 38 end 39 40 it "should reply correctly" do 41 # @socket.clear 42 # @plugin.on_privmsg(@prefix, "#test", "foo") 43 # @socket.pop.to_s.should == "NOTICE #test :Nice boat.\r\n" 44 end 45 end 46 47 end 48 -
lang/ruby/chokan/branches/citrus/plugins/google_calc.rb
r6083 r6624 1 require 'chokan/plugin_base'2 1 require 'net/http' 3 2 require 'uri' 4 3 5 class GoogleCalc < C hokan::PluginBase4 class GoogleCalc < Citrus::Plugin 6 5 HYDE = 156.0000000 7 6 8 def initialize( config, chokan)7 def initialize(*args) 9 8 HYDE.is_a?(Numeric) && HYDE === 156.0 10 9 super … … 44 43 end 45 44 end 45 46 tests do 47 describe GoogleCalc do 48 before :all do 49 @core = DummyCore.new({}) 50 @socket = @core.socket 51 @prefix = Net::IRC::Prefix.new("foo!foo@localhsot") 52 53 @plugin = GoogleCalc.new(@core, { "GoogleCalc" => { 54 } }) 55 end 56 57 it "should reply correctly" do 58 # @socket.clear 59 # @plugin.on_privmsg(@prefix, "#test", "foo") 60 # @socket.pop.to_s.should == "NOTICE #test :Nice boat.\r\n" 61 end 62 end 63 64 end 65 -
lang/ruby/chokan/branches/citrus/plugins/google_search.rb
r6083 r6624 1 1 2 require 'chokan/plugin_base'3 2 require 'net/http' 4 3 require 'rubygems' … … 6 5 require 'uri' 7 6 8 class GoogleSearch < C hokan::PluginBase7 class GoogleSearch < Citrus::Plugin 9 8 def description 10 9 <<-DESCRIPTION.gsub(/^\s+/, '') … … 15 14 end 16 15 17 def initialize( config, chokan)16 def initialize(*args) 18 17 super 19 18 @prefix = @config['prefix'] || 'g' … … 61 60 end 62 61 end 62 63 tests do 64 describe GoogleSearch do 65 before :all do 66 @core = DummyCore.new({}) 67 @socket = @core.socket 68 @prefix = Net::IRC::Prefix.new("foo!foo@localhsot") 69 70 @plugin = GoogleSearch.new(@core, { "GoogleSearch" => { 71 } }) 72 end 73 74 it "should reply correctly" do 75 # @socket.clear 76 # @plugin.on_privmsg(@prefix, "#test", "foo") 77 # @socket.pop.to_s.should == "NOTICE #test :Nice boat.\r\n" 78 end 79 end 80 81 end 82 -
lang/ruby/chokan/branches/citrus/plugins/lastfm.rb
r2975 r6624 1 1 2 require 'chokan/plugin_base'3 2 require 'net/http' 4 3 5 class Lastfm < C hokan::PluginBase6 def initialize( config, chokan)4 class Lastfm < Citrus::Plugin 5 def initialize(*args) 7 6 super 8 7 @prefix = @config['prefix'] || 'm ' … … 39 38 end 40 39 end 40 41 tests do 42 describe Lastfm do 43 before :all do 44 @core = DummyCore.new({}) 45 @socket = @core.socket 46 @prefix = Net::IRC::Prefix.new("foo!foo@localhsot") 47 48 @plugin = Lastfm.new(@core, { "Lastfm" => { 49 } }) 50 end 51 52 it "should reply correctly" do 53 # @socket.clear 54 # @plugin.on_privmsg(@prefix, "#test", "foo") 55 # @socket.pop.to_s.should == "NOTICE #test :Nice boat.\r\n" 56 end 57 end 58 59 end 60 -
lang/ruby/chokan/branches/citrus/plugins/nico_search.rb
r6422 r6624 1 1 2 require 'chokan/plugin_base'3 2 require 'rubygems' 4 3 require 'mechanize' 5 4 require 'hpricot' 6 5 7 class NicoSearch < C hokan::PluginBase8 def initialize( config, chokan)6 class NicoSearch < Citrus::Plugin 7 def initialize(*args) 9 8 super 10 9 @prefix = @config['prefix'] || 'ns' … … 42 41 end 43 42 43 44 tests do 45 describe NicoSearch do 46 before :all do 47 @core = DummyCore.new({}) 48 @socket = @core.socket 49 @prefix = Net::IRC::Prefix.new("foo!foo@localhsot") 50 51 @plugin = NicoSearch.new(@core, { "NicoSearch" => { 52 } }) 53 end 54 55 it "should reply correctly" do 56 # @socket.clear 57 # @plugin.on_privmsg(@prefix, "#test", "foo") 58 # @socket.pop.to_s.should == "NOTICE #test :Nice boat.\r\n" 59 end 60 end 61 62 end 63 -
lang/ruby/chokan/branches/citrus/plugins/sakage.rb
r283 r6624 1 1 2 2 3 class Sakage < C hokan::PluginBase3 class Sakage < Citrus::Plugin 4 4 5 5 Morse2Alpha = { … … 159 159 160 160 161 162 tests do 163 describe Sakage do 164 before :all do 165 @core = DummyCore.new({}) 166 @socket = @core.socket 167 @prefix = Net::IRC::Prefix.new("foo!foo@localhsot") 168 169 @plugin = Sakage.new(@core, { "Sakage" => { 170 } }) 171 end 172 173 it "should reply correctly" do 174 # @socket.clear 175 # @plugin.on_privmsg(@prefix, "#test", "foo") 176 # @socket.pop.to_s.should == "NOTICE #test :Nice boat.\r\n" 177 end 178 end 179 180 end 181 -
lang/ruby/chokan/branches/citrus/plugins/twitter_id.rb
r5415 r6624 1 require 'chokan/plugin_base'2 1 require 'net/http' 3 2 require 'hpricot' 4 3 require 'htmlentities' 5 4 6 class TwitterId < C hokan::PluginBase7 def initialize( config, chokan)5 class TwitterId < Citrus::Plugin 6 def initialize(*args) 8 7 super 9 8 @prefix = @config['prefix'] || 't ' … … 71 70 end 72 71 end 72 73 tests do 74 describe TwitterId do 75 before :all do 76 @core = DummyCore.new({}) 77 @socket = @core.socket 78 @prefix = Net::IRC::Prefix.new("foo!foo@localhsot") 79 80 @plugin = TwitterId.new(@core, { "TwitterId" => { 81 } }) 82 end 83 84 it "should reply correctly" do 85 # @socket.clear 86 # @plugin.on_privmsg(@prefix, "#test", "foo") 87 # @socket.pop.to_s.should == "NOTICE #test :Nice boat.\r\n" 88 end 89 end 90 91 end 92 -
lang/ruby/chokan/branches/citrus/plugins/twitter_search.rb
r5989 r6624 1 1 2 require 'chokan/plugin_base'3 2 require 'net/http' 4 3 require 'rubygems' … … 6 5 require 'rexml/document' 7 6 8 class TwitterSearch < C hokan::PluginBase9 def initialize( config, chokan)7 class TwitterSearch < Citrus::Plugin 8 def initialize(*args) 10 9 super 11 10 @prefix = @config['prefix'] || 'ts' … … 42 41 43 42 end 43 44 tests do 45 describe TwitterSearch do 46 before :all do 47 @core = DummyCore.new({}) 48 @socket = @core.socket 49 @prefix = Net::IRC::Prefix.new("foo!foo@localhsot") 50 51 @plugin = TwitterSearch.new(@core, { "TwitterSearch" => { 52 } }) 53 end 54 55 it "should reply correctly" do 56 # @socket.clear 57 # @plugin.on_privmsg(@prefix, "#test", "foo") 58 # @socket.pop.to_s.should == "NOTICE #test :Nice boat.\r\n" 59 end 60 end 61 62 end 63 -
lang/ruby/chokan/branches/citrus/plugins/whois.rb
r451 r6624 1 1 2 require 'chokan/plugin_base'3 2 require 'hpricot' 4 3 5 class Whois < C hokan::PluginBase6 def initialize( config, chokan)4 class Whois < Citrus::Plugin 5 def initialize(*args) 7 6 super 8 7 @prefix = @config['prefix'] || 'whois ' … … 40 39 end 41 40 end 41 42 tests do 43 describe Whois do 44 before :all do 45 @core = DummyCore.new({}) 46 @socket = @core.socket 47 @prefix = Net::IRC::Prefix.new("foo!foo@localhsot") 48 49 @plugin = Whois.new(@core, { "Whois" => { 50 } }) 51 end 52 53 it "should reply correctly" do 54 # @socket.clear 55 # @plugin.on_privmsg(@prefix, "#test", "foo") 56 # @socket.pop.to_s.should == "NOTICE #test :Nice boat.\r\n" 57 end 58 end 59 60 end 61 -
lang/ruby/chokan/branches/citrus/plugins/wikipedia.rb
r5864 r6624 1 1 2 2 require 'rubygems' 3 require 'chokan/plugin_base'4 3 require 'uri' 5 4 require 'net/http' 6 5 require 'hpricot' 7 6 8 class Wikipedia < C hokan::PluginBase9 def initialize( config, chokan)7 class Wikipedia < Citrus::Plugin 8 def initialize(*args) 10 9 super 11 10 @prefix = @config['prefix'] || '\? *?' … … 44 43 end 45 44 end 45 46 tests do 47 describe Wikipedia do 48 before :all do 49 @core = DummyCore.new({}) 50 @socket = @core.socket 51 @prefix = Net::IRC::Prefix.new("foo!foo@localhsot") 52 53 @plugin = Wikipedia.new(@core, { "Wikipedia" => { 54 } }) 55 end 56 57 it "should reply correctly" do 58 # @socket.clear 59 # @plugin.on_privmsg(@prefix, "#test", "foo") 60 # @socket.pop.to_s.should == "NOTICE #test :Nice boat.\r\n" 61 end 62 end 63 64 end 65
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)