muzang-plugins 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -123,7 +123,7 @@ Watch the gems and notify when new version comes out
123
123
 
124
124
  ```
125
125
  <LTe> watch! rails
126
- <Muzang> I added gem rails to the observed
126
+ <Muzang> I added gem rails to watchlist
127
127
  <Muzang> Current version: 3.1.1
128
128
  ...
129
129
  <Muzang> New version of rails (4.0.0)
@@ -17,10 +17,10 @@ class PlusOne
17
17
  plus_for = plus_for[1]
18
18
  plus_for.gsub!(":","")
19
19
  if filter(plus_for, message.nick)
20
- connection.msg(message.channel, "#{message.nick} pisze w PHP") and return
20
+ connection.msg(message.channel, "#{message.nick} write in PHP") and return
21
21
  end
22
22
 
23
- connection.msg(message.channel, "#{message.nick} podarowal +1 dla *#{plus_for}*")
23
+ connection.msg(message.channel, "#{message.nick} gave +1 for *#{plus_for}*")
24
24
  @stats[plus_for] ||= 0
25
25
  @stats[plus_for] += 1
26
26
  save
@@ -34,16 +34,16 @@ class RubyGems
34
34
  @store.transaction do
35
35
  @store[:gems][@current_gem][:version] = gem["version"]
36
36
  end
37
- connection.msg(message.channel, "Dodalem gema #{@current_gem} do obserwowanych")
38
- connection.msg(message.channel, "Aktualna wersja: #{@current_gem} (#{gem["version"]})")
37
+ connection.msg(message.channel, "I added gem #{@current_gem} to watchlist")
38
+ connection.msg(message.channel, "Current version: #{@current_gem} (#{gem["version"]})")
39
39
  @new_gem = false
40
40
  rescue Exception
41
- connection.msg(message.channel, "Niepoprawna nazwa gema")
41
+ connection.msg(message.channel, "Gem name is incorrect")
42
42
  @store.transaction{@store[:gems].delete(@current_gem)}
43
43
  end
44
44
  }
45
45
  else
46
- connection.msg(message.channel, "Gem #{@current_gem} jest juz obserwowany")
46
+ connection.msg(message.channel, "Gem #{@current_gem} is already observed")
47
47
  end
48
48
  end
49
49
 
@@ -60,7 +60,7 @@ class RubyGems
60
60
  @store.transaction do
61
61
  @store[:gems][gem[:name]][:version] = current_gem["version"]
62
62
  end
63
- connection.msg(message.channel, "Nowa wersja #{gem[:name]} (#{current_gem["version"]})")
63
+ connection.msg(message.channel, "New version #{gem[:name]} (#{current_gem["version"]})")
64
64
  end
65
65
  rescue
66
66
  end
@@ -1,5 +1,5 @@
1
1
  module Muzang
2
2
  module Plugins
3
- VERSION = "1.1.0"
3
+ VERSION = "1.1.1"
4
4
  end
5
5
  end
data/spec/plusone_spec.rb CHANGED
@@ -11,14 +11,14 @@ describe "PlusOne" do
11
11
  end
12
12
 
13
13
  it "should not add plus one for myself" do
14
- @connection.should_receive(:msg).with("#test", "LTe pisze w PHP")
14
+ @connection.should_receive(:msg).with("#test", "LTe write in PHP")
15
15
  @plusone.call(@connection, @message)
16
16
  @plusone.stats["LTe"].should == 1
17
17
  end
18
18
 
19
19
  it "should not allow to add plus one for new user" do
20
20
  @message.nick = "new_user"
21
- @connection.should_receive(:msg).with("#test", "new_user pisze w PHP")
21
+ @connection.should_receive(:msg).with("#test", "new_user write in PHP")
22
22
  @plusone.call(@connection, @message)
23
23
  @plusone.stats["LTe"].should == 1
24
24
  end
@@ -54,14 +54,14 @@ end
54
54
 
55
55
  def invalid_plus_one(message)
56
56
  @message = OpenStruct.new({ :channel => "#test", :message => message, :nick => "ruby" })
57
- @connection.should_not_receive(:msg).with("#test", "ruby podarowal +1 dla *LTe*")
57
+ @connection.should_not_receive(:msg).with("#test", "ruby gave +1 for *LTe*")
58
58
  @plusone.call(@connection, @message)
59
59
  @plusone.stats["LTe"].should == 1
60
60
  end
61
61
 
62
62
  def proper_plus_one(message)
63
63
  @message = OpenStruct.new({ :channel => "#test", :message => message, :nick => "ruby" })
64
- @connection.should_receive(:msg).with("#test", "ruby podarowal +1 dla *LTe*")
64
+ @connection.should_receive(:msg).with("#test", "ruby gave +1 for *LTe*")
65
65
  @plusone.call(@connection, @message)
66
66
  @plusone.stats["LTe"].should == 2
67
67
  end
@@ -30,8 +30,8 @@ describe "RubyGems" do
30
30
  EM.run do
31
31
  @rubygems.call(@connection, @message)
32
32
  eventually(true, :times => 10) do
33
- @connection.messages.include? "Dodalem gema acts-as-messageable do obserwowanych" and
34
- @connection.messages.include? "Aktualna wersja: acts-as-messageable (0.4.2)"
33
+ @connection.messages.include? "I added gem acts-as-messageable to watchlist" and
34
+ @connection.messages.include? "Current version: acts-as-messageable (0.4.2)"
35
35
  end
36
36
  end
37
37
  end
@@ -41,7 +41,7 @@ describe "RubyGems" do
41
41
  EM.run do
42
42
  @rubygems.call(@connection, @message)
43
43
  eventually(true) do
44
- @connection.messages.include? "Niepoprawna nazwa gema"
44
+ @connection.messages.include? "Gem name is incorrect"
45
45
  end
46
46
  end
47
47
  end
@@ -51,7 +51,7 @@ describe "RubyGems" do
51
51
  EM.run do
52
52
  2.times{ @rubygems.call(@connection, @message) }
53
53
  eventually(true) do
54
- @connection.messages.include? "Gem acts-as-messageable jest juz obserwowany"
54
+ @connection.messages.include? "Gem acts-as-messageable is already observed"
55
55
  end
56
56
  end
57
57
  end
@@ -80,7 +80,7 @@ describe "RubyGems" do
80
80
  @rubygems.store.transaction{ @rubygems.store[:gems]["acts-as-messageable"][:version] = "0.4.1" }
81
81
 
82
82
  eventually(true, :every => 0.1, :total => 100) do
83
- @connection.messages.include? "Nowa wersja acts-as-messageable (0.4.2)"
83
+ @connection.messages.include? "New version acts-as-messageable (0.4.2)"
84
84
  end
85
85
  end
86
86
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muzang-plugins
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-01-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: em-http-request
16
- requirement: &11784540 !ruby/object:Gem::Requirement
16
+ requirement: &17221340 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *11784540
24
+ version_requirements: *17221340
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: muzang
27
- requirement: &11782320 !ruby/object:Gem::Requirement
27
+ requirement: &17242620 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *11782320
35
+ version_requirements: *17242620
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: em-ventually
38
- requirement: &11781020 !ruby/object:Gem::Requirement
38
+ requirement: &17240840 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.1.2
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *11781020
46
+ version_requirements: *17240840
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &11794360 !ruby/object:Gem::Requirement
49
+ requirement: &17238980 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 2.6.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *11794360
57
+ version_requirements: *17238980
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rake
60
- requirement: &11791580 !ruby/object:Gem::Requirement
60
+ requirement: &17238380 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *11791580
68
+ version_requirements: *17238380
69
69
  description: Plugins for Muzang IRC bot
70
70
  email:
71
71
  - piotr.nielacny@gmail.com