simple_slack 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple_slack/botter.rb +2 -3
- data/lib/simple_slack/client.rb +1 -1
- data/lib/simple_slack/poster.rb +3 -2
- data/lib/simple_slack/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: 20d6ce30b92dc90bf7b30047452411e7bd815bf5
|
4
|
+
data.tar.gz: 94abcf278fb2149b367de24a288126bf4d3f0751
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76a0eeaee2391e3337aea430f79aa0bc7ebb5e0b17b2819b71c1112a1e84e42f431cc974cce0eb2822113d6e4d160b56f9ef1b9bb8fd5576d39de0a1486a1d7d
|
7
|
+
data.tar.gz: 19260002bbbe87b5847c3c2731f57b7767875bf4692386ed0069c5936506f490e72cc653a52fb9ecc2dd753f3ac74c81b90073d6f31edbf1b91cc62f3cf5b67b
|
data/lib/simple_slack/botter.rb
CHANGED
@@ -5,7 +5,6 @@ class SimpleSlack::Botter
|
|
5
5
|
@client = client
|
6
6
|
@channel, @text, @user = ["all"] * 3
|
7
7
|
@responce_channel, @responce_text, @responce_user = nil, nil, "slacker"
|
8
|
-
@responce_block = nil
|
9
8
|
end
|
10
9
|
|
11
10
|
def set_condition(channel: nil, text: nil, user: nil)
|
@@ -36,7 +35,7 @@ class SimpleSlack::Botter
|
|
36
35
|
end
|
37
36
|
end
|
38
37
|
puts "client start!"
|
39
|
-
@r_client.start
|
38
|
+
@r_client.start
|
40
39
|
end
|
41
40
|
|
42
41
|
private
|
@@ -50,7 +49,7 @@ class SimpleSlack::Botter
|
|
50
49
|
end
|
51
50
|
|
52
51
|
def valid_params
|
53
|
-
variables =
|
52
|
+
variables = ["@responce_channel", "@responce_text"]
|
54
53
|
variables.none? {|v| instance_variable_get(v).nil? }
|
55
54
|
end
|
56
55
|
|
data/lib/simple_slack/client.rb
CHANGED
data/lib/simple_slack/poster.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
class SimpleSlack::Poster
|
2
|
-
def initialize(slack)
|
2
|
+
def initialize(slack, simple_slack)
|
3
3
|
@slack = slack
|
4
|
+
@simple_slack = simple_slack
|
4
5
|
end
|
5
6
|
|
6
7
|
def channel(to: , text: , name: "slacker")
|
@@ -24,7 +25,7 @@ class SimpleSlack::Poster
|
|
24
25
|
private
|
25
26
|
|
26
27
|
def convert(name)
|
27
|
-
channel = @
|
28
|
+
channel = @simple_slack.get.channel(name)
|
28
29
|
channel[:id]
|
29
30
|
end
|
30
31
|
end
|
data/lib/simple_slack/version.rb
CHANGED