simple-slack-bot 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 35fbab65ad9125b1cad33e43c8370bbb400733c0
4
- data.tar.gz: 09f7ba7234ab6fa050d3f2ab2c58bea3dc1327d1
3
+ metadata.gz: 9e166c0aacf81bcb03527ce85c7fff04275d4706
4
+ data.tar.gz: 3a63f70da783e9f95ef87102c6e0c9c20be62141
5
5
  SHA512:
6
- metadata.gz: fe16631db70132133296650d746e668497f09149c16d441a07710a4cff3df6a2c721fe5e6bd40e5e10fc8b55e0db1ae79a0c78bb8472b7a508d2fda6a6bb6dc2
7
- data.tar.gz: 648ff435f67db2dad6b01ddf73b28f25a9ac7e901165a7ab4a04970f563cec9338603087364d85cf93971e34c6c011e9be4b8fd91db015cc28050e2d8dd52f60
6
+ metadata.gz: d29b1403013a4af67c3b32ddafda7959465c25bcec0b55d56715a6fa55079ff54c855a08052b1a35d91747b4c20a0ed8f247a4c0e64071b387793ab59900b319
7
+ data.tar.gz: 0342f2560273cef949fd14bf01b6b8d8a6ed5ece2af060eb8e975827c2839ed0c3d7ae15a8e409d4cdf004777612cbe0d916e10411749e39dfa9fe4b1af01fa1
@@ -2,6 +2,7 @@
2
2
  require 'slack-ruby-client'
3
3
 
4
4
  module SlackBot
5
+
5
6
  class Client
6
7
  attr_accessor :slack_web_client, :slack_realtime_client
7
8
  attr_accessor :commands
@@ -9,12 +9,11 @@ module SlackBot
9
9
  :token
10
10
  ]
11
11
 
12
- def reset
13
- self.debug = false
14
- self.join_message = 'Hello!'
15
- end
16
-
17
12
  attr_accessor(*Config::ATTRIBUTES)
13
+
14
+ self.debug = false
15
+ self.join_message = 'Hello!'
16
+ self.token = 'TOKEN'
18
17
  end
19
18
 
20
19
  class << self
@@ -26,6 +25,4 @@ module SlackBot
26
25
  Config
27
26
  end
28
27
  end
29
- end
30
-
31
- SlackBot::Config.reset()
28
+ end
@@ -1,3 +1,3 @@
1
1
  module SlackBot
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
data/spec/config_spec.rb CHANGED
@@ -1,17 +1,27 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe SlackBot::Config do
4
- before do
5
- SlackBot.configure do |config|
6
- config.join_message = 'Hi!'
7
- config.debug = true
8
- config.token = 'TOKEN'
4
+ describe '#initialize' do
5
+ it 'sets config' do
6
+ expect(SlackBot::config.join_message).to eq 'Hello!'
7
+ expect(SlackBot::config.debug).to eq false
8
+ expect(SlackBot::config.token).to eq 'TOKEN'
9
9
  end
10
10
  end
11
11
 
12
- it 'sets config' do
13
- expect(SlackBot.config.join_message).to eq 'Hi!'
14
- expect(SlackBot.config.debug).to eq true
15
- expect(SlackBot.config.token).to eq 'TOKEN'
12
+ describe '#configure' do
13
+ before do
14
+ SlackBot.configure do |config|
15
+ config.join_message = 'Hi!'
16
+ config.debug = true
17
+ config.token = 'Invalid Token'
18
+ end
19
+ end
20
+
21
+ it 'sets config' do
22
+ expect(SlackBot.config.join_message).to eq 'Hi!'
23
+ expect(SlackBot.config.debug).to eq true
24
+ expect(SlackBot.config.token).to eq 'Invalid Token'
25
+ end
16
26
  end
17
27
  end
data/spec/spec_helper.rb CHANGED
@@ -4,10 +4,4 @@ Bundler.setup
4
4
  require 'simple-slack-bot'
5
5
 
6
6
  RSpec.configure do |config|
7
- end
8
-
9
- SlackBot.configure do |config|
10
- config.join_message = 'Hello!'
11
- config.debug = true
12
- config.token = ENV['SLACK_API_TOKEN']
13
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-slack-bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Sun-Hyoup
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-17 00:00:00.000000000 Z
11
+ date: 2016-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slack-ruby-client