Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update README, trasnlate plugins messages and update specs.

  • Loading branch information...
commit d1b762138ba55e5306688360fece73c0d22db880 1 parent 4c28fd6
Piotr Niełacny authored
2  README.md
View
@@ -123,7 +123,7 @@ Watch the gems and notify when new version comes out
```
<LTe> watch! rails
-<Muzang> I added gem rails to the observed
+<Muzang> I added gem rails to watchlist
<Muzang> Current version: 3.1.1
...
<Muzang> New version of rails (4.0.0)
4 lib/muzang-plugins/muzang-plusone.rb
View
@@ -17,10 +17,10 @@ def call(connection, message)
plus_for = plus_for[1]
plus_for.gsub!(":","")
if filter(plus_for, message.nick)
- connection.msg(message.channel, "#{message.nick} pisze w PHP") and return
+ connection.msg(message.channel, "#{message.nick} write in PHP") and return
end
- connection.msg(message.channel, "#{message.nick} podarowal +1 dla *#{plus_for}*")
+ connection.msg(message.channel, "#{message.nick} gave +1 for *#{plus_for}*")
@stats[plus_for] ||= 0
@stats[plus_for] += 1
save
10 lib/muzang-plugins/muzang-rubygems.rb
View
@@ -34,16 +34,16 @@ def call(connection, message)
@store.transaction do
@store[:gems][@current_gem][:version] = gem["version"]
end
- connection.msg(message.channel, "Dodalem gema #{@current_gem} do obserwowanych")
- connection.msg(message.channel, "Aktualna wersja: #{@current_gem} (#{gem["version"]})")
+ connection.msg(message.channel, "I added gem #{@current_gem} to watchlist")
+ connection.msg(message.channel, "Current version: #{@current_gem} (#{gem["version"]})")
@new_gem = false
rescue Exception
- connection.msg(message.channel, "Niepoprawna nazwa gema")
+ connection.msg(message.channel, "Gem name is incorrect")
@store.transaction{@store[:gems].delete(@current_gem)}
end
}
else
- connection.msg(message.channel, "Gem #{@current_gem} jest juz obserwowany")
+ connection.msg(message.channel, "Gem #{@current_gem} is already observed")
end
end
@@ -60,7 +60,7 @@ def call(connection, message)
@store.transaction do
@store[:gems][gem[:name]][:version] = current_gem["version"]
end
- connection.msg(message.channel, "Nowa wersja #{gem[:name]} (#{current_gem["version"]})")
+ connection.msg(message.channel, "New version #{gem[:name]} (#{current_gem["version"]})")
end
rescue
end
2  lib/muzang-plugins/version.rb
View
@@ -1,5 +1,5 @@
module Muzang
module Plugins
- VERSION = "1.1.0"
+ VERSION = "1.1.1"
end
end
8 spec/plusone_spec.rb
View
@@ -11,14 +11,14 @@
end
it "should not add plus one for myself" do
- @connection.should_receive(:msg).with("#test", "LTe pisze w PHP")
+ @connection.should_receive(:msg).with("#test", "LTe write in PHP")
@plusone.call(@connection, @message)
@plusone.stats["LTe"].should == 1
end
it "should not allow to add plus one for new user" do
@message.nick = "new_user"
- @connection.should_receive(:msg).with("#test", "new_user pisze w PHP")
+ @connection.should_receive(:msg).with("#test", "new_user write in PHP")
@plusone.call(@connection, @message)
@plusone.stats["LTe"].should == 1
end
@@ -54,14 +54,14 @@
def invalid_plus_one(message)
@message = OpenStruct.new({ :channel => "#test", :message => message, :nick => "ruby" })
- @connection.should_not_receive(:msg).with("#test", "ruby podarowal +1 dla *LTe*")
+ @connection.should_not_receive(:msg).with("#test", "ruby gave +1 for *LTe*")
@plusone.call(@connection, @message)
@plusone.stats["LTe"].should == 1
end
def proper_plus_one(message)
@message = OpenStruct.new({ :channel => "#test", :message => message, :nick => "ruby" })
- @connection.should_receive(:msg).with("#test", "ruby podarowal +1 dla *LTe*")
+ @connection.should_receive(:msg).with("#test", "ruby gave +1 for *LTe*")
@plusone.call(@connection, @message)
@plusone.stats["LTe"].should == 2
end
10 spec/rubygems_spec.rb
View
@@ -30,8 +30,8 @@ def period
EM.run do
@rubygems.call(@connection, @message)
eventually(true, :times => 10) do
- @connection.messages.include? "Dodalem gema acts-as-messageable do obserwowanych" and
- @connection.messages.include? "Aktualna wersja: acts-as-messageable (0.4.2)"
+ @connection.messages.include? "I added gem acts-as-messageable to watchlist" and
+ @connection.messages.include? "Current version: acts-as-messageable (0.4.2)"
end
end
end
@@ -41,7 +41,7 @@ def period
EM.run do
@rubygems.call(@connection, @message)
eventually(true) do
- @connection.messages.include? "Niepoprawna nazwa gema"
+ @connection.messages.include? "Gem name is incorrect"
end
end
end
@@ -51,7 +51,7 @@ def period
EM.run do
2.times{ @rubygems.call(@connection, @message) }
eventually(true) do
- @connection.messages.include? "Gem acts-as-messageable jest juz obserwowany"
+ @connection.messages.include? "Gem acts-as-messageable is already observed"
end
end
end
@@ -80,7 +80,7 @@ def period
@rubygems.store.transaction{ @rubygems.store[:gems]["acts-as-messageable"][:version] = "0.4.1" }
eventually(true, :every => 0.1, :total => 100) do
- @connection.messages.include? "Nowa wersja acts-as-messageable (0.4.2)"
+ @connection.messages.include? "New version acts-as-messageable (0.4.2)"
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.