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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50358ca98e866559e7e461a9f1f660d2efac975b
4
- data.tar.gz: 717be28a59fa231ea591d161707cc272173fd92d
3
+ metadata.gz: 20d6ce30b92dc90bf7b30047452411e7bd815bf5
4
+ data.tar.gz: 94abcf278fb2149b367de24a288126bf4d3f0751
5
5
  SHA512:
6
- metadata.gz: 2cccf8eb285ac34486479c55af223d8bc56dee0131acd46402f07645ce086d8c63902fbc82d4cbbdf69db94332002f89386b94d4079967eb6b22561202e20c2e
7
- data.tar.gz: 023b7efc5db7c49e731502a4ba0e36cc9a16a2b55490d30a29dc168064815a4ea4ecc831f5c49d61a3e64964d01b33ab36800427e611e09f8558d8e2e6cd0178
6
+ metadata.gz: 76a0eeaee2391e3337aea430f79aa0bc7ebb5e0b17b2819b71c1112a1e84e42f431cc974cce0eb2822113d6e4d160b56f9ef1b9bb8fd5576d39de0a1486a1d7d
7
+ data.tar.gz: 19260002bbbe87b5847c3c2731f57b7767875bf4692386ed0069c5936506f490e72cc653a52fb9ecc2dd753f3ac74c81b90073d6f31edbf1b91cc62f3cf5b67b
@@ -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 rescue puts "client stop. abort!"
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 = instance_variables.map {|v| v.to_s }
52
+ variables = ["@responce_channel", "@responce_text"]
54
53
  variables.none? {|v| instance_variable_get(v).nil? }
55
54
  end
56
55
 
@@ -16,7 +16,7 @@ class SimpleSlack::Client
16
16
  end
17
17
 
18
18
  def post
19
- @poster ||= SimpleSlack::Poster.new(@slack)
19
+ @poster ||= SimpleSlack::Poster.new(@slack, self)
20
20
  end
21
21
 
22
22
  def bot
@@ -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 = @slack.get.channel(name)
28
+ channel = @simple_slack.get.channel(name)
28
29
  channel[:id]
29
30
  end
30
31
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleSlack
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_slack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - toririn