cloudenvoy 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -2
- data/Gemfile.lock +1 -1
- data/gemfiles/rails_5.2.gemfile.lock +1 -1
- data/gemfiles/rails_6.0.gemfile.lock +1 -1
- data/gemfiles/semantic_logger_3.4.gemfile.lock +1 -1
- data/gemfiles/semantic_logger_4.6.gemfile.lock +1 -1
- data/gemfiles/semantic_logger_4.7.0.gemfile.lock +1 -1
- data/gemfiles/semantic_logger_4.7.2.gemfile.lock +1 -1
- data/lib/cloudenvoy/backend/google_pub_sub.rb +16 -1
- data/lib/cloudenvoy/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: b9322dedfad594507282b8a475531a48ed6c9cae16bb098e115a8a71c9c88485
|
4
|
+
data.tar.gz: b44299bb873d6a07028eca918826702c63d75460a7fa7986251792dc5fae81ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 512419c58e7eaf81cb9e6de2496cfffd72469a1e4fa5c6b07939645f2ab3b2af5e419b155cae026f5e13910fad762cdc1cdec44b282ed93ef9ac79eb77b8475b
|
7
|
+
data.tar.gz: 9f9852d9afbba64c20a855c55e6e08f196bcc6f1a5f72f379e0839a118e638a7c96b98f7c2de227835c8b38c4cf9d4abbb19b29421cb58e85ad9637086d8db2a
|
data/CHANGELOG.md
CHANGED
@@ -1,12 +1,19 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [v0.
|
3
|
+
## [v0.4.0](https://github.com/keypup-io/cloudenvoy/tree/v0.4.0) (2020-10-05)
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/keypup-io/cloudenvoy/compare/v0.3.
|
5
|
+
[Full Changelog](https://github.com/keypup-io/cloudenvoy/compare/v0.3.1...v0.4.0)
|
6
6
|
|
7
7
|
**Bug fix:**
|
8
8
|
- Logging: fix log processing with `semantic_logger` `v4.7.2`. Accept any args on block passed to the logger.
|
9
9
|
|
10
|
+
## [v0.3.1](https://github.com/keypup-io/cloudenvoy/tree/v0.3.1) (2020-10-05)
|
11
|
+
|
12
|
+
[Full Changelog](https://github.com/keypup-io/cloudenvoy/compare/v0.3.0...v0.3.1)
|
13
|
+
|
14
|
+
**Improvements:**
|
15
|
+
- Development: auto-create topics in development mode when registering subscriptions.
|
16
|
+
|
10
17
|
## [v0.3.0](https://github.com/keypup-io/cloudenvoy/tree/v0.3.0) (2020-09-26)
|
11
18
|
|
12
19
|
[Full Changelog](https://github.com/keypup-io/cloudenvoy/compare/v0.2.0...v0.3.0)
|
data/Gemfile.lock
CHANGED
@@ -17,6 +17,15 @@ module Cloudenvoy
|
|
17
17
|
Cloudenvoy.config
|
18
18
|
end
|
19
19
|
|
20
|
+
#
|
21
|
+
# Return true if the current config mode is development.
|
22
|
+
#
|
23
|
+
# @return [Boolean] True if Cloudenvoy is run in development mode.
|
24
|
+
#
|
25
|
+
def development?
|
26
|
+
config.mode == :development
|
27
|
+
end
|
28
|
+
|
20
29
|
#
|
21
30
|
# Return the backend to use for sending messages.
|
22
31
|
#
|
@@ -25,7 +34,7 @@ module Cloudenvoy
|
|
25
34
|
def backend
|
26
35
|
@backend ||= Google::Cloud::PubSub.new({
|
27
36
|
project_id: config.gcp_project_id,
|
28
|
-
emulator_host:
|
37
|
+
emulator_host: development? ? Cloudenvoy::Config::EMULATOR_HOST : nil
|
29
38
|
}.compact)
|
30
39
|
end
|
31
40
|
|
@@ -88,6 +97,12 @@ module Cloudenvoy
|
|
88
97
|
def upsert_subscription(topic, name, opts = {})
|
89
98
|
sub_config = opts.to_h.merge(endpoint: webhook_url)
|
90
99
|
|
100
|
+
# Auto-create topic in development. In non-development environments
|
101
|
+
# the create subscription action raises an error if the topic does
|
102
|
+
# not exist
|
103
|
+
upsert_topic(topic) if development?
|
104
|
+
|
105
|
+
# Create subscription
|
91
106
|
ps_sub =
|
92
107
|
begin
|
93
108
|
# Retrieve the topic
|
data/lib/cloudenvoy/version.rb
CHANGED