muzang 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,3 +1,5 @@
1
+ Gemfile.lock
2
+
1
3
  # rcov generated
2
4
  coverage
3
5
 
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/Gemfile CHANGED
@@ -3,7 +3,6 @@ source "http://rubygems.org"
3
3
  gemspec
4
4
 
5
5
  group :development do
6
- gem "em-ventually", "~> 0.1.2"
7
- gem "rspec", "~> 2.8.0"
6
+ gem "rspec", "~> 2.8.0"
8
7
  gem "jeweler", "~> 1.6.3"
9
8
  end
@@ -2,6 +2,7 @@ require 'muzang'
2
2
  require 'coffeemaker/bot'
3
3
  require 'active_support/inflector/inflections'
4
4
  require 'active_support/inflector/methods'
5
+ require 'logger'
5
6
 
6
7
  module Muzang
7
8
  class Bot
@@ -47,7 +48,8 @@ module Muzang
47
48
  irc_host: 'localhost',
48
49
  irc_port: 6667,
49
50
  nick: 'DRUG-bot',
50
- channels: ['#test']
51
+ channels: ['#test'],
52
+ logger: Logger.new('/dev/null')
51
53
  }
52
54
  end
53
55
  end
@@ -1,3 +1,3 @@
1
1
  module Muzang
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.version = Muzang::VERSION
8
8
  s.authors = ["Piotr Niełacny", "Paweł Pacana"]
9
9
  s.email = ["piotr.nielacny@gmail.com", "pawel.pacana@gmail.com"]
10
- s.homepage = ""
10
+ s.homepage = "https://github.com/LTe/muzang"
11
11
  s.summary = %q{Dolnoslaska Ruby User Group IRC bot}
12
12
  s.description = %q{IRC bot with easy plugin managment}
13
13
 
@@ -18,5 +18,6 @@ Gem::Specification.new do |s|
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
  s.require_paths = ["lib"]
20
20
 
21
- s.add_runtime_dependency "coffeemaker", "~> 0.1.0"
21
+ s.add_runtime_dependency "coffeemaker", "~> 0.1.3"
22
+ s.add_development_dependency "em-ventually", "~> 0.1.2"
22
23
  end
@@ -1,12 +1,15 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
3
  describe "Muzang" do
4
+ let(:rpl_welcome) { "001 muzang :Welcome to the IRC Network muzang!muzang@1.2.3.4" }
5
+
4
6
  before do
5
7
  @muzang = Muzang::Bot.new
6
8
  @muzang.bot.stub(:start) do
7
9
  @connection = Class.new { include Coffeemaker::Bot::Irc::Connection }.new
8
10
  @connection.on_connect = @muzang.bot.irc.on_connect
9
11
  @connection.on_message = @muzang.bot.irc.on_message
12
+ @connection.logger = @muzang.bot.irc.logger
10
13
  @connection.stub(:send_data)
11
14
  @connection
12
15
  end
@@ -34,7 +37,7 @@ describe "Muzang" do
34
37
  it "should join to channels" do
35
38
  @muzang.bot.irc.on_connect.should_receive(:call).once
36
39
  connection = @muzang.start
37
- connection.connection_completed
40
+ connection.receive_line rpl_welcome
38
41
  end
39
42
 
40
43
  it "should execute call on plugin instance" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muzang
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-06-28 00:00:00.000000000 Z
13
+ date: 2013-02-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: coffeemaker
@@ -19,7 +19,7 @@ dependencies:
19
19
  requirements:
20
20
  - - ~>
21
21
  - !ruby/object:Gem::Version
22
- version: 0.1.0
22
+ version: 0.1.3
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,7 +27,23 @@ dependencies:
27
27
  requirements:
28
28
  - - ~>
29
29
  - !ruby/object:Gem::Version
30
- version: 0.1.0
30
+ version: 0.1.3
31
+ - !ruby/object:Gem::Dependency
32
+ name: em-ventually
33
+ requirement: !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ~>
37
+ - !ruby/object:Gem::Version
38
+ version: 0.1.2
39
+ type: :development
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ~>
45
+ - !ruby/object:Gem::Version
46
+ version: 0.1.2
31
47
  description: IRC bot with easy plugin managment
32
48
  email:
33
49
  - piotr.nielacny@gmail.com
@@ -37,9 +53,9 @@ extensions: []
37
53
  extra_rdoc_files: []
38
54
  files:
39
55
  - .gitignore
56
+ - .rspec
40
57
  - .travis.yml
41
58
  - Gemfile
42
- - Gemfile.lock
43
59
  - LICENSE.txt
44
60
  - README.md
45
61
  - Rakefile
@@ -49,9 +65,8 @@ files:
49
65
  - muzang.gemspec
50
66
  - spec/muzang_spec.rb
51
67
  - spec/spec_helper.rb
52
- - spec/support/connection_mock.rb
53
68
  - spec/support/dummy-plugin.rb
54
- homepage: ''
69
+ homepage: https://github.com/LTe/muzang
55
70
  licenses: []
56
71
  post_install_message:
57
72
  rdoc_options: []
@@ -1,46 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- muzang (1.1.0)
5
- coffeemaker (~> 0.1.0)
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- activesupport (3.2.6)
11
- i18n (~> 0.6)
12
- multi_json (~> 1.0)
13
- callsite (0.0.11)
14
- coffeemaker (0.1.1)
15
- activesupport
16
- eventmachine (~> 1.0.0.beta.3)
17
- diff-lcs (1.1.3)
18
- em-ventually (0.1.3)
19
- callsite (~> 0.0.5)
20
- eventmachine
21
- eventmachine (1.0.0.rc.2)
22
- git (1.2.5)
23
- i18n (0.6.0)
24
- jeweler (1.6.4)
25
- bundler (~> 1.0)
26
- git (>= 1.2.5)
27
- rake
28
- multi_json (1.3.6)
29
- rake (0.9.2.2)
30
- rspec (2.8.0)
31
- rspec-core (~> 2.8.0)
32
- rspec-expectations (~> 2.8.0)
33
- rspec-mocks (~> 2.8.0)
34
- rspec-core (2.8.0)
35
- rspec-expectations (2.8.0)
36
- diff-lcs (~> 1.1.2)
37
- rspec-mocks (2.8.0)
38
-
39
- PLATFORMS
40
- ruby
41
-
42
- DEPENDENCIES
43
- em-ventually (~> 0.1.2)
44
- jeweler (~> 1.6.3)
45
- muzang!
46
- rspec (~> 2.8.0)
@@ -1,15 +0,0 @@
1
- class ConnectionMock
2
- attr_accessor :message_count, :messages, :options, :nick
3
-
4
- def initialize(options = {})
5
- @message_count = 0
6
- options.each do |k, v|
7
- send(:"#{k}=", v)
8
- end
9
- end
10
-
11
- def msg(where, message)
12
- @message_count += 1
13
- (@messages ||= []) << message
14
- end
15
- end