stream-ruby 2.5.0 → 2.5.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: 1398099d6f288e0c5bad1cd13bc9b63def1464b2
4
- data.tar.gz: c9f19bcff3c6c6012c04b692e9e90194aaf2f905
3
+ metadata.gz: e0a41fcca1d4290950f4e22504404ae4f4e2fb63
4
+ data.tar.gz: 655f1a83893858cbc41e7d8fc6638713b330f377
5
5
  SHA512:
6
- metadata.gz: 576e0e4b71ef340081a9f87d1165434ee88c773ca7ae42a156d57fd5ba1e8eb10f3ffedeb8d3411eeaa9de8190da976b0e5672ab7d4567a6d71c30e55f04afcf
7
- data.tar.gz: fea36c574fc895385b1549b29099478f6609e51309b8cfbfb9ff2131fd4de26342e3d7096a847f1cb39e077d418113c0a1d925c5901378bcf0b00714342f47c6
6
+ metadata.gz: b92f0def78367e37b616f501169d9155e9b40fe8cb03326c1a0896762ba6ad20f53cc47770233d5e6bef9446f2fd75a8f8d135436e5145204d14e693404d055e
7
+ data.tar.gz: ed94d491acc9c27c6714a7b87d4833f9c48e42b3c88acd6f6c5a0ce423eb5a3f326877969693171c45200f6c5d6654fe33f0a0b93f712c07ab29ac4ff75c3632
data/README.md CHANGED
@@ -18,7 +18,7 @@ gem install "stream-ruby"
18
18
  ```ruby
19
19
  # Instantiate a new client to connect to us east API endpoint
20
20
  require 'stream'
21
- client = Stream::Client.new('YOUR_API_KEY', 'API_KEY_SECRET', :location => 'us-east')
21
+ client = Stream::Client.new('YOUR_API_KEY', 'API_KEY_SECRET', 'APP_ID', :location => 'us-east')
22
22
  # Find your API keys here https://getstream.io/dashboard/
23
23
 
24
24
  # Instantiate a feed object
data/lib/stream/client.rb CHANGED
@@ -133,10 +133,15 @@ module Stream
133
133
  def make_http_request(method, relative_url, params = nil, data = nil, headers = nil)
134
134
  headers["Content-Type"] = "application/json"
135
135
  headers["X-Stream-Client"] = "stream-ruby-client-#{Stream::VERSION}"
136
-
137
136
  params["api_key"] = @options[:api_key]
138
137
  relative_url = "#{@base_path}#{relative_url}?#{URI.encode_www_form(params)}"
139
- response = @conn.run_request(method, relative_url, data.to_json, headers)
138
+ body = data.to_json if %w(post put).include? method.to_s
139
+ response = @conn.run_request(
140
+ method,
141
+ relative_url,
142
+ body,
143
+ headers
144
+ )
140
145
 
141
146
  case response[:status].to_i
142
147
  when 200..203
@@ -1,3 +1,3 @@
1
1
  module Stream
2
- VERSION = "2.5.0".freeze
2
+ VERSION = "2.5.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stream-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tommaso Barbugli
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-12-20 00:00:00.000000000 Z
12
+ date: 2017-01-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday