slack-api 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.coveralls.yml +1 -1
- data/README.md +1 -1
- data/lib/slack/configuration.rb +12 -8
- data/lib/slack/connection.rb +3 -0
- data/lib/slack/realtime/client.rb +1 -1
- data/lib/slack/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd8bee835a10846f099f9d9aae8f23efbab7bc99
|
4
|
+
data.tar.gz: 13741832cb55469cf6ba3599d9b185a2a190480c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2edfc9597fe5eb926015a4a0aa40a2dadbd700dcf251616db8587d0710a847946860d9a212bd54961dec64ea3e0c967ff7e2f7ca02f92bc9cdd2cc2fb4cea2e4
|
7
|
+
data.tar.gz: 992f69550c8bc1766f4a69ea13436ba6c625e51ba6a18cbd0c94f084e20599b3572ad2187675caaf9c2cbfe607f293189bf9f10b3f126ed6b57fc7fe16b07e29
|
data/.coveralls.yml
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
service_name: travis-
|
1
|
+
service_name: travis-ci
|
2
2
|
repo_token: PuedicWJBfk5ghyEc9wUOhloMzBfCeOsL
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/slack-api.svg)](http://badge.fury.io/rb/slack-api)
|
4
4
|
[![Build Status](https://travis-ci.org/aki017/slack-ruby-gem.svg)](https://travis-ci.org/aki017/slack-ruby-gem)
|
5
|
-
[![Coverage Status](https://coveralls.io/repos/aki017/slack-ruby-gem/badge.svg
|
5
|
+
[![Coverage Status](https://coveralls.io/repos/aki017/slack-ruby-gem/badge.svg)](https://coveralls.io/r/aki017/slack-ruby-gem)
|
6
6
|
|
7
7
|
A Ruby wrapper for the Slack API
|
8
8
|
|
data/lib/slack/configuration.rb
CHANGED
@@ -12,7 +12,8 @@ module Slack
|
|
12
12
|
:user_agent,
|
13
13
|
:proxy,
|
14
14
|
:ca_path,
|
15
|
-
:ca_file
|
15
|
+
:ca_file,
|
16
|
+
:middlewares
|
16
17
|
].freeze
|
17
18
|
|
18
19
|
# The adapter that will be used to connect if none is set
|
@@ -38,6 +39,8 @@ module Slack
|
|
38
39
|
DEFAULT_CA_PATH = %x[ openssl version -a | grep OPENSSLDIR | awk '{print $2}'|sed -e 's/\"//g' ]
|
39
40
|
DEFAULT_CA_FILE = "#{DEFAULT_CA_PATH}/ca-certificates.crt"
|
40
41
|
|
42
|
+
DEFAULT_MIDDLEWARES = []
|
43
|
+
|
41
44
|
# @private
|
42
45
|
attr_accessor *VALID_OPTIONS_KEYS
|
43
46
|
|
@@ -60,13 +63,14 @@ module Slack
|
|
60
63
|
|
61
64
|
# Reset all configuration options to defaults
|
62
65
|
def reset
|
63
|
-
self.adapter
|
64
|
-
self.token
|
65
|
-
self.endpoint
|
66
|
-
self.user_agent
|
67
|
-
self.proxy
|
68
|
-
self.ca_path
|
69
|
-
self.ca_file
|
66
|
+
self.adapter = DEFAULT_ADAPTER
|
67
|
+
self.token = DEFAULT_TOKEN
|
68
|
+
self.endpoint = DEFAULT_ENDPOINT
|
69
|
+
self.user_agent = DEFAULT_USER_AGENT
|
70
|
+
self.proxy = DEFAULT_PROXY
|
71
|
+
self.ca_path = DEFAULT_CA_PATH
|
72
|
+
self.ca_file = DEFAULT_CA_FILE
|
73
|
+
self.middlewares = DEFAULT_MIDDLEWARES
|
70
74
|
end
|
71
75
|
end
|
72
76
|
end
|
data/lib/slack/connection.rb
CHANGED
@@ -15,6 +15,9 @@ module Slack
|
|
15
15
|
}
|
16
16
|
|
17
17
|
Faraday::Connection.new(options) do |connection|
|
18
|
+
Array(middlewares).each do |middleware|
|
19
|
+
connection.use middleware
|
20
|
+
end
|
18
21
|
connection.use Faraday::Request::Multipart
|
19
22
|
connection.use Faraday::Request::UrlEncoded
|
20
23
|
connection.use Faraday::Response::ParseJson
|
data/lib/slack/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slack-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aki017
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|