salesforce_streamer 2.0.0.rc1 → 2.0.0.rc2
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/CHANGELOG.md +1 -1
- data/Gemfile.lock +1 -1
- data/README.md +9 -7
- data/lib/salesforce_streamer.rb +4 -0
- data/lib/salesforce_streamer/configuration.rb +7 -3
- data/lib/salesforce_streamer/push_topic.rb +1 -1
- data/lib/salesforce_streamer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62cda30f1dc4379de105485088cce3cb77a874c6b336465b05ebdc0976c46e60
|
4
|
+
data.tar.gz: 8c470f3301875a1926dfc68e8b40cc3862d8478bbd95c97fe4cdd154c0bd3c05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8a7aee18710329e556852c68aeb626e587108f788acf880aa0810671b9c536517ee34798eb1e9a8fd03a67ff2e8171f59ddf1ab8da9b4f836f57b5cf3746015
|
7
|
+
data.tar.gz: 4c91a95c717ece055e22e05b487994293c2015f04633e0d46676f2a740986345762c8d263f40f57b981ebc18ab76553dbc7252ad2ebe95ea415ff6b533eba7f6
|
data/CHANGELOG.md
CHANGED
@@ -61,7 +61,7 @@ To retrieve the replayId before subscribing to a PushTopic,
|
|
61
61
|
configure an adapter that returns an integer.
|
62
62
|
|
63
63
|
SalesforceStreamer.config.replay_adapter = proc { |topic|
|
64
|
-
MyStore.fetch_replay_id(topic.name) || -1
|
64
|
+
(MyStore.fetch_replay_id(topic.name) || -1).to_i
|
65
65
|
}
|
66
66
|
|
67
67
|
This will be used to set the replayId value when subscribing to the PushTopic.
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -113,13 +113,15 @@ Configure the `SalesforceStreamer` module.
|
|
113
113
|
```ruby
|
114
114
|
# config/initializers/salesforce_streamer.rb
|
115
115
|
|
116
|
-
SalesforceStreamer.
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
116
|
+
SalesforceStreamer.configure do |config|
|
117
|
+
config.logger = Logger.new(STDERR, level: 'INFO')
|
118
|
+
config.exception_adapter = proc { |e| puts e }
|
119
|
+
config.replay_adapter = proc { |topic|
|
120
|
+
(Store.get(topic.name) || topic.replay).to_i
|
121
|
+
}
|
122
|
+
config.use_middleware AfterMessageReceived
|
123
|
+
config.manage_topics = true
|
124
|
+
end
|
123
125
|
```
|
124
126
|
|
125
127
|
### Launch The Streamer
|
data/lib/salesforce_streamer.rb
CHANGED
@@ -53,7 +53,7 @@ module SalesforceStreamer
|
|
53
53
|
if constant.respond_to? :call
|
54
54
|
constant
|
55
55
|
elsif constant.respond_to? :perform_async
|
56
|
-
proc { |message|
|
56
|
+
proc { |message| constant.perform_async message }
|
57
57
|
else
|
58
58
|
fail(UnprocessableHandlerError, constant)
|
59
59
|
end
|