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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 841242a07455c9fe43175c96551000c156daae4e
4
- data.tar.gz: c371473964ac40799fead68a389f52162d1ad8ea
3
+ metadata.gz: cd8bee835a10846f099f9d9aae8f23efbab7bc99
4
+ data.tar.gz: 13741832cb55469cf6ba3599d9b185a2a190480c
5
5
  SHA512:
6
- metadata.gz: 57afaef0b98185fc93f72fba6b54c7244349de5fd8d61d35102f2901a0f72e8ee0d2814f0d667cb4a5e6c3e8632901680579557451be073540374c1fa916c9f9
7
- data.tar.gz: aa79615d31b8a232403ee7c6daf64ee8fd2718cf4e10c4a45afaa7373caf97e9b61f7e952695b6624e6c477b3deec251229727ff789cf981c2f75f492b0574be
6
+ metadata.gz: 2edfc9597fe5eb926015a4a0aa40a2dadbd700dcf251616db8587d0710a847946860d9a212bd54961dec64ea3e0c967ff7e2f7ca02f92bc9cdd2cc2fb4cea2e4
7
+ data.tar.gz: 992f69550c8bc1766f4a69ea13436ba6c625e51ba6a18cbd0c94f084e20599b3572ad2187675caaf9c2cbfe607f293189bf9f10b3f126ed6b57fc7fe16b07e29
@@ -1,2 +1,2 @@
1
- service_name: travis-pro
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?branch=spec)](https://coveralls.io/r/aki017/slack-ruby-gem?branch=spec)
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
 
@@ -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 = DEFAULT_ADAPTER
64
- self.token = DEFAULT_TOKEN
65
- self.endpoint = DEFAULT_ENDPOINT
66
- self.user_agent = DEFAULT_USER_AGENT
67
- self.proxy = DEFAULT_PROXY
68
- self.ca_path = DEFAULT_CA_PATH
69
- self.ca_file = DEFAULT_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
@@ -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
@@ -31,7 +31,7 @@ module Slack
31
31
  end
32
32
 
33
33
  ws.on :close do |event|
34
- ws = nil
34
+ EM.stop
35
35
  end
36
36
  end
37
37
  end
@@ -1,3 +1,3 @@
1
1
  module Slack
2
- VERSION = "1.1.3"
2
+ VERSION = "1.1.4"
3
3
  end
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.3
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-06 00:00:00.000000000 Z
11
+ date: 2015-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler