stream-ruby 2.5.4 → 2.5.5

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: 323fa2b0fe0631721c6675a2858af90cb02e6489
4
- data.tar.gz: 4d8d2885ca77326b1fc712ed9f18fba3b9bcc150
3
+ metadata.gz: d432cc258be801378a19388e745302acd88eed91
4
+ data.tar.gz: 42bee681f5a5cfa6ad2239703a50b75e05a4b432
5
5
  SHA512:
6
- metadata.gz: 57d7d87fc03bec734879219985a41ac4e102bad75c661d6579c5ed2061eb0a8d22f851cac75bc9808098eb05bd5a0c0f6c700d9264dac4ed56a623f51e58d62e
7
- data.tar.gz: 2982e5270d7fe5848fa892cdc80afcfb778ac6f1c8d65a423a69b48c0a3865c012d999c328fdd9f8a7db43bbd9aa39821c18645e84309f0a3015ee7f54462256
6
+ metadata.gz: aecd169d51caf7dc77dec2386fd8dc6ab6cc0efa4a2ecd26f8803b342050cb861e49d4d7fc7c937c21d1f691c5ff9eec31222ca0c0ef6aca711afd33008da7a2
7
+ data.tar.gz: a543cbf088eec40dd37e86c9cb75a0e5edff994b39d9e3b134b14ddfb900fc92d132f373320595f7c0ebb49b905d0843bb3ab6c0e2b3839c68e4bae0b0638d78
data/README.md CHANGED
@@ -3,9 +3,11 @@ stream-ruby
3
3
 
4
4
  [![Build Status](https://travis-ci.org/GetStream/stream-ruby.svg?branch=master)](https://travis-ci.org/GetStream/stream-ruby) [![Gem Version](https://badge.fury.io/rb/stream-ruby.svg)](http://badge.fury.io/rb/stream-ruby)
5
5
 
6
- stream-ruby is the official Ruby client for [Stream](https://getstream.io/), a web service for building scalable newsfeeds and activity streams.
7
- The full documentation is available on [GetStream.io/docs/?language=ruby](http://getstream.io/docs/?language=ruby).
8
- There is also a [higher level Rails integration](https://github.com/getstream/stream-rails) library which hooks into your ORM.
6
+ [stream-ruby](https://github.com/GetStream/stream-ruby) is the official Ruby client for [Stream](https://getstream.io/), a web service for building scalable newsfeeds and activity streams.
7
+
8
+ Note there is also a higher level [Ruby on Rails - Stream integration](https://github.com/getstream/stream-rails) library which hooks into the Ruby on Rails ORM.
9
+
10
+ You can sign up for a Stream account at https://getstream.io/get_started.
9
11
 
10
12
  ### Installation
11
13
 
@@ -13,6 +15,10 @@ There is also a [higher level Rails integration](https://github.com/getstream/st
13
15
  gem install "stream-ruby"
14
16
  ```
15
17
 
18
+ ### Full documentation
19
+
20
+ Documentation for this Ruby client are available at the [Stream website](https://getstream.io/docs/ruby/?language=ruby).
21
+
16
22
  ### Usage
17
23
 
18
24
  ```ruby
@@ -113,8 +119,6 @@ activity = {:actor => "User:2", :verb => "pin", :object => "Place:42", :target =
113
119
  client.add_to_many(activity, feeds)
114
120
  ```
115
121
 
116
- Docs are available on [GetStream.io](http://getstream.io/docs/).
117
-
118
122
  ### Copyright and License Information
119
123
 
120
124
  Copyright (c) 2014-2017 Stream.io Inc, and individual contributors. All rights reserved.
data/lib/stream/feed.rb CHANGED
@@ -110,16 +110,17 @@ module Stream
110
110
 
111
111
  def follow(target_feed_slug, target_user_id, activity_copy_limit = 300)
112
112
  uri = "/feed/#{@feed_url}/follows/"
113
- params = {
114
- "activity_copy_limit" => activity_copy_limit
115
- }
113
+ activity_copy_limit = 0 if activity_copy_limit < 0
114
+ activity_copy_limit = 1000 if activity_copy_limit > 1000
115
+
116
116
  follow_data = {
117
- :target => "#{target_feed_slug}:#{target_user_id}",
118
- :target_token => @client.feed(target_feed_slug, target_user_id).token
117
+ target: "#{target_feed_slug}:#{target_user_id}",
118
+ target_token: @client.feed(target_feed_slug, target_user_id).token,
119
+ activity_copy_limit: activity_copy_limit
119
120
  }
120
121
  auth_token = create_jwt_token("follower", "write")
121
122
 
122
- @client.make_request(:post, uri, auth_token, params, follow_data)
123
+ @client.make_request(:post, uri, auth_token, {}, follow_data)
123
124
  end
124
125
 
125
126
  def followers(offset = 0, limit = 25)
@@ -1,3 +1,3 @@
1
1
  module Stream
2
- VERSION = "2.5.4".freeze
2
+ VERSION = "2.5.5".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.4
4
+ version: 2.5.5
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: 2017-03-22 00:00:00.000000000 Z
12
+ date: 2017-05-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  version: '0'
136
136
  requirements: []
137
137
  rubyforge_project:
138
- rubygems_version: 2.6.6
138
+ rubygems_version: 2.5.1
139
139
  signing_key:
140
140
  specification_version: 4
141
141
  summary: A gem that provides a client interface for getstream.io