stream-ruby 2.5.9 → 2.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -10
- data/lib/stream/client.rb +3 -1
- data/lib/stream/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: a3b58bcc7cb83f9424b45eb1e268e476d7f05717
|
4
|
+
data.tar.gz: a3d1ebe35bb26a98b51704acb074e3500d1d4863
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93974c1a54ed500e6503632142f350c9381cbc77655566ce459b2f5f8acf63401b570135b78434a6b6945ffce3c601abfe6b85328c2dd5f366e6524e78d147fe
|
7
|
+
data.tar.gz: 114e765ba286365dea5aa1ef3611c85c7775904909bd64c3db5b5a98ced47650f6e89d142ebdd45261896583def6aa5eff31f9e1882bf522d7aae274d36377a9
|
data/README.md
CHANGED
@@ -83,19 +83,19 @@ activities = [
|
|
83
83
|
user_feed_1.add_activities(activities)
|
84
84
|
|
85
85
|
# Batch following many feeds (requires ruby 2.1 or later)
|
86
|
-
follows = [
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
86
|
+
follows = [
|
87
|
+
{:source => 'flat:1', :target => 'user:1'},
|
88
|
+
{:source => 'flat:1', :target => 'user:2'},
|
89
|
+
{:source => 'flat:1', :target => 'user:3'},
|
90
|
+
]
|
91
91
|
client.follow_many(follows)
|
92
92
|
|
93
93
|
# Add an activity and push it to other feeds too using the `to` field
|
94
94
|
data = [
|
95
|
-
:actor_id =>
|
96
|
-
:verb =>
|
97
|
-
:object_id =>
|
98
|
-
:to =>
|
95
|
+
:actor_id => '1',
|
96
|
+
:verb => 'like',
|
97
|
+
:object_id => '3',
|
98
|
+
:to => %w(user:44 user:45)
|
99
99
|
]
|
100
100
|
user_feed_1.add_activity(data)
|
101
101
|
|
@@ -124,7 +124,7 @@ user_feed_1.following(10, 10)
|
|
124
124
|
user_feed_1.following(0, 2, filter=['user:42', 'user:43'])
|
125
125
|
|
126
126
|
# Add one activity to many feeds in one request
|
127
|
-
feeds =
|
127
|
+
feeds = %w(flat:1 flat:2 flat:3 flat:4)
|
128
128
|
activity = {:actor => "User:2", :verb => "pin", :object => "Place:42", :target => "Board:1"}
|
129
129
|
client.add_to_many(activity, feeds)
|
130
130
|
```
|
data/lib/stream/client.rb
CHANGED
@@ -142,10 +142,12 @@ module Stream
|
|
142
142
|
|
143
143
|
@conn = Faraday.new(:url => base_url) do |faraday|
|
144
144
|
# faraday.request :url_encoded
|
145
|
-
faraday.adapter Faraday.default_adapter
|
146
145
|
faraday.use RaiseHttpException
|
147
146
|
faraday.options[:open_timeout] = @options[:default_timeout]
|
148
147
|
faraday.options[:timeout] = @options[:default_timeout]
|
148
|
+
|
149
|
+
# do this last
|
150
|
+
faraday.adapter Faraday.default_adapter
|
149
151
|
end
|
150
152
|
@conn.path_prefix = @base_path
|
151
153
|
end
|
data/lib/stream/version.rb
CHANGED
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
|
+
version: 2.5.10
|
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-
|
12
|
+
date: 2017-12-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|