ruboty-gamification 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruboty/gamification/client.rb +3 -1
- data/lib/ruboty/gamification/version.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: 30b84cf0342f6686de05a10d4e08409f1829184b
|
4
|
+
data.tar.gz: eac7f48ff28c4ec0af5d8745ada846662be79182
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e165ec84107fe948921ea8a482ace942ebbf5f48682fc59a000cd5f148b4569969119ec55abf42d17abed054ed30caad6a4fbbc76392ef43120b0a5118ee4d32
|
7
|
+
data.tar.gz: 5bfdd27670f1a29e5ac4a9a5fda4cb6097748e1052db3928ae816f95252f8d2f439032767956b1f7fee18e463e0cda4627329b130770e188dfa5fe9052ebe0e1
|
@@ -28,15 +28,17 @@ module Ruboty
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def reload(message)
|
31
|
+
message.reply("reload start")
|
32
|
+
@gamification.actions.clear
|
31
33
|
load(:increment)
|
32
34
|
load(:decrement)
|
35
|
+
message.reply("reload done")
|
33
36
|
end
|
34
37
|
|
35
38
|
private
|
36
39
|
def load(label)
|
37
40
|
get(labels: label).body.each do |data|
|
38
41
|
pattern = /#{Regexp.escape(data["title"])}$/
|
39
|
-
next if @gamification.actions.any?{|action| action.pattern == pattern}
|
40
42
|
@gamification.on(
|
41
43
|
pattern,
|
42
44
|
name: "#{label}",
|