boty 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/boty/version.rb +1 -1
- data/locale/en.yml +1 -0
- data/locale/pt-br.yml +1 -0
- data/script/pug.rb +1 -1
- data/spec/script/pug_spec.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 232044d6e49a24255c5b5a554a6897ec473cdf1d
|
4
|
+
data.tar.gz: fe980e1c3d03a64200a8d62f2ac8fa52f616aab8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3a0dac85b60abc7aa9c9e58dd2edc1942ced52d729c710ff22330d7d34526ba028c5a64a09b318fd9a715c2d468d4f0a53c1a751d1dfb44a34bbc844760ba59
|
7
|
+
data.tar.gz: 5ab990e551d97057bab55722c61971eae5dd855b75af806ad24d136eb826b8d6c4ef98e20985be4f70845f0861b5476a5b9516ba3a2e16bed6137d2709c2d648
|
data/Gemfile.lock
CHANGED
data/lib/boty/version.rb
CHANGED
data/locale/en.yml
CHANGED
@@ -6,6 +6,7 @@ en:
|
|
6
6
|
knows: "List all the commands known by this bot."
|
7
7
|
pug_me: "Send some nice pug in the channel."
|
8
8
|
pug_bomb: "Send X pugs in the channel."
|
9
|
+
pug_max: "wow! so many pugs! sending 5 instead."
|
9
10
|
remember:
|
10
11
|
command: "remember: [some stuff about you]"
|
11
12
|
desc: "Instructs %{name} about something happening or about you."
|
data/locale/pt-br.yml
CHANGED
@@ -6,6 +6,7 @@ pt-br:
|
|
6
6
|
knows: "Lista os comandos conhecidos por esse bot."
|
7
7
|
pug_me: "Manda um belo pug no canal."
|
8
8
|
pug_bomb: "Manda X belos pugs no canal."
|
9
|
+
pug_max: "QUANTO PUG! É muito pug. Vou mandar só 5..."
|
9
10
|
remember:
|
10
11
|
command: "remember: [alguma coisa sobre você]"
|
11
12
|
desc: "Ensina %{name} algo sobre você."
|
data/script/pug.rb
CHANGED
@@ -9,7 +9,7 @@ command(/pug bomb( \d+)?/i) do |count|
|
|
9
9
|
count = (count || "5").strip
|
10
10
|
if count.to_i > 5
|
11
11
|
count = "5"
|
12
|
-
say "
|
12
|
+
say I18n.t :"scripts.pug_max"
|
13
13
|
end
|
14
14
|
response = http.get "http://pugme.herokuapp.com/bomb", count: count
|
15
15
|
response["pugs"].each do |pug| say "<#{pug}>" end
|
data/spec/script/pug_spec.rb
CHANGED
@@ -59,7 +59,7 @@ RSpec.describe "script/pug", :session do
|
|
59
59
|
{ "Content-Type" => "application/json;charset=utf-8" },
|
60
60
|
{ pugs: %w(1 2 3 4 5) }.to_json]
|
61
61
|
end
|
62
|
-
expect(bot).to receive(:say).with("wow! so many pugs!
|
62
|
+
expect(bot).to receive(:say).with("wow! so many pugs! sending 5 instead.")
|
63
63
|
(1..5).each do |num|
|
64
64
|
expect(bot).to receive(:say).with("<#{num}>")
|
65
65
|
end
|