roo_on_rails 1.16.2 → 1.17.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65d37b2ac41421d649b77a7f66e521f949bbc83e
|
4
|
+
data.tar.gz: d2fe8895dfcb3ccdbd1d927f0da71d1b8993ebf9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd5326a3ce9cacd1298d209ff50a6e1dc14f44e95d1582d9e16e06bfec8c66871217cdeb8e8d3ba101e8ba8f6d7f8f582bdb1d960b5f4f1acdb78e4657a6eadd
|
7
|
+
data.tar.gz: 60381f042c1ead007a2dc0c768ca1f1a1eb5ab5c4b7f26e6f8bb884d94fcaab6065a03b507ece1ae1ac919886df5febfb5f969a9e7cec25b71dcc373bcd18e24
|
data/CHANGELOG.md
CHANGED
@@ -16,18 +16,26 @@ module RooOnRails
|
|
16
16
|
private_constant :ACTIVE_RECORD_TO_ROUTEMASTER_EVENT_MAP
|
17
17
|
|
18
18
|
def publish_lifecycle_event(event)
|
19
|
+
publish_event(event, force_publish: false)
|
20
|
+
end
|
21
|
+
|
22
|
+
def publish_lifecycle_event!(event)
|
23
|
+
publish_event(event, force_publish: true)
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def publish_event(event, force_publish:)
|
19
29
|
publishers = Routemaster::Publishers.for(self, routemaster_event_type(event))
|
20
30
|
publishers.each do |publisher|
|
21
31
|
begin
|
22
|
-
publisher.publish!
|
32
|
+
publisher.publish!(force_publish: force_publish)
|
23
33
|
rescue => e
|
24
34
|
NewRelic::Agent.notice_error(e)
|
25
35
|
end
|
26
36
|
end
|
27
37
|
end
|
28
38
|
|
29
|
-
private
|
30
|
-
|
31
39
|
def routemaster_event_type(event)
|
32
40
|
ACTIVE_RECORD_TO_ROUTEMASTER_EVENT_MAP[event].tap do |type|
|
33
41
|
raise "invalid lifecycle event '#{event}'" unless type
|
@@ -16,12 +16,12 @@ module RooOnRails
|
|
16
16
|
noop? || @model.new_record? || @model.previous_changes.any?
|
17
17
|
end
|
18
18
|
|
19
|
-
def will_publish?
|
20
|
-
Config.routemaster_publishing_enabled? && publish?
|
19
|
+
def will_publish?(force_publish: false)
|
20
|
+
Config.routemaster_publishing_enabled? && (force_publish || publish?)
|
21
21
|
end
|
22
22
|
|
23
|
-
def publish!
|
24
|
-
return unless will_publish?
|
23
|
+
def publish!(force_publish: false)
|
24
|
+
return unless will_publish?(force_publish: force_publish)
|
25
25
|
@client.send(
|
26
26
|
@event,
|
27
27
|
topic,
|
data/lib/roo_on_rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roo_on_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julien Letessier
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv-rails
|