botfly 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/TODO ADDED
@@ -0,0 +1,12 @@
1
+ Botfly Todo List (by priority)
2
+ ==============================
3
+ * Replace CommonBlockAcceptor responder chain array with ResponderChain object
4
+ ** Spec & create ResponderChain class
5
+ ** Have responder chain stop call first responder ONLY after reaching a match
6
+ ** Additionally provide DSL for on... chain to give priority to responders (that is to say one can specify which responders fire first)
7
+ * Finish speccing matchers, responders
8
+ * More robust instance methods on responders (i.e. provide access to variables through methods and not ivars)
9
+ * Additional matchers on single and multi-user chat (not sure what, but doesn't feel complete)
10
+ * Add configure method to accept list of configuration paramaters.
11
+ * Support any of a bevy of features provided by xmpp4r
12
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.3.3
@@ -5,22 +5,24 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{botfly}
8
- s.version = "0.3.2"
8
+ s.version = "0.3.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ryan Neufeld"]
12
- s.date = %q{2010-04-02}
12
+ s.date = %q{2010-04-05}
13
13
  s.description = %q{Botfly is a Jabber Bot DSL that lets you write bots with ease. Enjoy, while it's still fresh and VERY ALPHA.}
14
14
  s.email = %q{ryan@ryanneufeld.ca}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README.rdoc"
17
+ "README.rdoc",
18
+ "TODO"
18
19
  ]
19
20
  s.files = [
20
21
  ".gitignore",
21
22
  "LICENSE",
22
23
  "README.rdoc",
23
24
  "Rakefile",
25
+ "TODO",
24
26
  "VERSION",
25
27
  "botfly.gemspec",
26
28
  "example.rb",
@@ -47,7 +49,21 @@ Gem::Specification.new do |s|
47
49
  "retrobot.rb",
48
50
  "spec/botfly/bot_spec.rb",
49
51
  "spec/botfly/common_block_acceptor_spec.rb",
52
+ "spec/botfly/matcher/body_matcher_spec.rb",
53
+ "spec/botfly/matcher/matcher_spec.rb",
54
+ "spec/botfly/matcher/muc_nick_matcher_spec.rb",
55
+ "spec/botfly/matcher/muc_text_matcher_spec.rb",
56
+ "spec/botfly/matcher/muc_time_matcher_spec.rb",
57
+ "spec/botfly/matcher/nick_matcher_spec.rb",
58
+ "spec/botfly/matcher/subject_matcher_spec.rb",
50
59
  "spec/botfly/muc_client_spec.rb",
60
+ "spec/botfly/responder/common_responder_methods_spec.rb",
61
+ "spec/botfly/responder/message_responder_spec.rb",
62
+ "spec/botfly/responder/muc_message_responder_spec.rb",
63
+ "spec/botfly/responder/muc_responder_spec.rb",
64
+ "spec/botfly/responder/presence_responder_spec.rb",
65
+ "spec/botfly/responder/responder_spec.rb",
66
+ "spec/botfly/responder/subscription_request_responder_spec.rb",
51
67
  "spec/botfly_spec.rb",
52
68
  "spec/spec.opts",
53
69
  "spec/spec_helper.rb",
@@ -62,7 +78,21 @@ Gem::Specification.new do |s|
62
78
  s.test_files = [
63
79
  "spec/botfly/bot_spec.rb",
64
80
  "spec/botfly/common_block_acceptor_spec.rb",
81
+ "spec/botfly/matcher/body_matcher_spec.rb",
82
+ "spec/botfly/matcher/matcher_spec.rb",
83
+ "spec/botfly/matcher/muc_nick_matcher_spec.rb",
84
+ "spec/botfly/matcher/muc_text_matcher_spec.rb",
85
+ "spec/botfly/matcher/muc_time_matcher_spec.rb",
86
+ "spec/botfly/matcher/nick_matcher_spec.rb",
87
+ "spec/botfly/matcher/subject_matcher_spec.rb",
65
88
  "spec/botfly/muc_client_spec.rb",
89
+ "spec/botfly/responder/common_responder_methods_spec.rb",
90
+ "spec/botfly/responder/message_responder_spec.rb",
91
+ "spec/botfly/responder/muc_message_responder_spec.rb",
92
+ "spec/botfly/responder/muc_responder_spec.rb",
93
+ "spec/botfly/responder/presence_responder_spec.rb",
94
+ "spec/botfly/responder/responder_spec.rb",
95
+ "spec/botfly/responder/subscription_request_responder_spec.rb",
66
96
  "spec/botfly_spec.rb",
67
97
  "spec/spec_helper.rb",
68
98
  "spec/support/custom_matchers.rb",
@@ -10,7 +10,7 @@ module Botfly
10
10
  msg = Jabber::Message.new(nick, message)
11
11
  msg.type = opts[:type]
12
12
  msg.subject = opts[:subject]
13
- @client.send(msg)
13
+ client.send(msg)
14
14
  end
15
15
 
16
16
  def remove(responder_id)
File without changes
@@ -0,0 +1,35 @@
1
+ require 'spec_helper'
2
+
3
+ include Botfly
4
+ describe CommonResponderMethods do
5
+ let(:bot) { stub("Bot", :client => stub("client"))}
6
+ let(:responder) do
7
+ class Responder; include CommonResponderMethods; end;
8
+ Responder.new(bot)
9
+ end
10
+
11
+ describe "#remove" do
12
+ # Don't test all of #remove_responder, that's tested elsewhere ;)
13
+ it "should ask class's bot to remove responder of given id" do
14
+ bot.should_receive(:remove_responder).with(:foo)
15
+ responder.remove(:foo)
16
+ end
17
+ end
18
+
19
+ describe "#send" do
20
+ before(:each) do
21
+ responder.bot.stub_chain(:jid,:domain => 'foo.com')
22
+ end
23
+ after( :each) { responder.send ('bar', "message")}
24
+ subject { responder }
25
+ it "should pass the message along to the bot's jabber client" do
26
+ responder.client.should_receive :send
27
+ end
28
+ it "should pass the string given as a the message's body" do
29
+ pending
30
+ end
31
+ it "should pass the nickname given as the message's destination" do
32
+ pending
33
+ end
34
+ end
35
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 2
9
- version: 0.3.2
8
+ - 3
9
+ version: 0.3.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ryan Neufeld
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-02 00:00:00 -05:00
17
+ date: 2010-04-05 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -53,11 +53,13 @@ extensions: []
53
53
  extra_rdoc_files:
54
54
  - LICENSE
55
55
  - README.rdoc
56
+ - TODO
56
57
  files:
57
58
  - .gitignore
58
59
  - LICENSE
59
60
  - README.rdoc
60
61
  - Rakefile
62
+ - TODO
61
63
  - VERSION
62
64
  - botfly.gemspec
63
65
  - example.rb
@@ -84,7 +86,21 @@ files:
84
86
  - retrobot.rb
85
87
  - spec/botfly/bot_spec.rb
86
88
  - spec/botfly/common_block_acceptor_spec.rb
89
+ - spec/botfly/matcher/body_matcher_spec.rb
90
+ - spec/botfly/matcher/matcher_spec.rb
91
+ - spec/botfly/matcher/muc_nick_matcher_spec.rb
92
+ - spec/botfly/matcher/muc_text_matcher_spec.rb
93
+ - spec/botfly/matcher/muc_time_matcher_spec.rb
94
+ - spec/botfly/matcher/nick_matcher_spec.rb
95
+ - spec/botfly/matcher/subject_matcher_spec.rb
87
96
  - spec/botfly/muc_client_spec.rb
97
+ - spec/botfly/responder/common_responder_methods_spec.rb
98
+ - spec/botfly/responder/message_responder_spec.rb
99
+ - spec/botfly/responder/muc_message_responder_spec.rb
100
+ - spec/botfly/responder/muc_responder_spec.rb
101
+ - spec/botfly/responder/presence_responder_spec.rb
102
+ - spec/botfly/responder/responder_spec.rb
103
+ - spec/botfly/responder/subscription_request_responder_spec.rb
88
104
  - spec/botfly_spec.rb
89
105
  - spec/spec.opts
90
106
  - spec/spec_helper.rb
@@ -123,7 +139,21 @@ summary: A quick and easy DSL for generating Jabber bots
123
139
  test_files:
124
140
  - spec/botfly/bot_spec.rb
125
141
  - spec/botfly/common_block_acceptor_spec.rb
142
+ - spec/botfly/matcher/body_matcher_spec.rb
143
+ - spec/botfly/matcher/matcher_spec.rb
144
+ - spec/botfly/matcher/muc_nick_matcher_spec.rb
145
+ - spec/botfly/matcher/muc_text_matcher_spec.rb
146
+ - spec/botfly/matcher/muc_time_matcher_spec.rb
147
+ - spec/botfly/matcher/nick_matcher_spec.rb
148
+ - spec/botfly/matcher/subject_matcher_spec.rb
126
149
  - spec/botfly/muc_client_spec.rb
150
+ - spec/botfly/responder/common_responder_methods_spec.rb
151
+ - spec/botfly/responder/message_responder_spec.rb
152
+ - spec/botfly/responder/muc_message_responder_spec.rb
153
+ - spec/botfly/responder/muc_responder_spec.rb
154
+ - spec/botfly/responder/presence_responder_spec.rb
155
+ - spec/botfly/responder/responder_spec.rb
156
+ - spec/botfly/responder/subscription_request_responder_spec.rb
127
157
  - spec/botfly_spec.rb
128
158
  - spec/spec_helper.rb
129
159
  - spec/support/custom_matchers.rb