slackify 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/slackify/handlers/configuration.rb +17 -7
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef19a6dcce63500188e60c11300e64b87bc9e1f14b19b74414a9836a6c62bbe6
|
4
|
+
data.tar.gz: 99b6d64edb26950cb2170726482c8dfee60a0ec6f2783ad6590590569f30c756
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb26feeb493688c5d4b8968df4f8675696cfc63be388de73c83c1ccf35bb6b856594ef1262610f09abfc214ec3f042586de2bc7228b09d87614789624ccf65f4
|
7
|
+
data.tar.gz: c197031062643ab45484f851bb274378eab85b272917b8bfb829e8c1f2f3c13448af27ff70eeb80c980c69a2d8c76c5996e0436c43c6ec34883b0867df0be47f
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## V0.1.5
|
2
|
+
|
3
|
+
Update how the `bot_id` is set in the handler configuration. You can disable the slack auth test (which is used to obtain the bot_id) by setting `SLACK_AUTH_SKIP=1` in your environment variables. If you are running in a Rails environment other than production, development or staging and would like to use the bot for real requests, you can trigger a manual auth test by calling `Slackify.configuration.handlers.bot_auth_test`. Gemfile.lock was removed.
|
4
|
+
|
1
5
|
## V0.1.4
|
2
6
|
|
3
7
|
Custom unhandled_handler configuration fix. It wouldn't let you set a custom one as the validation was checking for `is_a?` instead of `<`
|
@@ -43,16 +43,26 @@ module Slackify
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
+
def bot_auth_test
|
47
|
+
@bot_id = Slackify.configuration.slack_client.auth_test.fetch('user_id')
|
48
|
+
Rails.logger.debug("[Slackify] Bot successfully authenticated to Slack")
|
49
|
+
true
|
50
|
+
rescue KeyError
|
51
|
+
raise "[Slackify] The bot did not successfully authenticate to Slack"
|
52
|
+
end
|
53
|
+
|
46
54
|
private
|
47
55
|
|
48
56
|
def environment_configurations
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
57
|
+
if %w(production staging development).exclude?(Rails.env) || skip_auth?
|
58
|
+
@bot_id = 'dummy_bot_id'
|
59
|
+
else
|
60
|
+
bot_auth_test
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def skip_auth?
|
65
|
+
ENV['SLACKIFY_AUTH_SKIP'] == '1'
|
56
66
|
end
|
57
67
|
|
58
68
|
def read_handlers_yaml
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slackify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Leger
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-09-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -138,8 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '0'
|
140
140
|
requirements: []
|
141
|
-
|
142
|
-
rubygems_version: 2.7.3
|
141
|
+
rubygems_version: 3.0.3
|
143
142
|
signing_key:
|
144
143
|
specification_version: 4
|
145
144
|
summary: Slackbot framework for Rails using the Events API
|