jets 5.0.12 → 5.0.14
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 +8 -0
- data/engines/internal/app/jobs/jets/preheat_job.rb +3 -7
- data/lib/jets/cfn/status.rb +1 -1
- data/lib/jets/generators/overrides/app/templates/config/environments/test.rb.tt +1 -1
- data/lib/jets/job/dsl/s3_event.rb +42 -1
- data/lib/jets/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae6365fe50afc845cc215ec4ffb3355a418f8e587cbbf8b12d182cdabf901eb4
|
4
|
+
data.tar.gz: 8791a73d7f86a0010ccc018a712ba3f3cc5512c8d6f0b37538d262b2ef2fa2f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 742a38687b5b6d33069dfe8080937e0ed01c3d6cd2ea807d548fd51fa88cb7d4930b34e8d01aa4ae8b9e9d1cb63a45b0ea26468e70153527954fd1b0c1e545e2
|
7
|
+
data.tar.gz: 0ccf5968934e66f0bd802808b2d1c8179a088a2160c0086d597d45c4d8f2dff7e4ea5dfd4ed35f9239e34089187ad0e3b13e17161b39338c13c07d100c83eb57
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,14 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/).
|
5
5
|
|
6
|
+
## [5.0.14] - 2024-05-20
|
7
|
+
- [#719](https://github.com/rubyonjets/jets/pull/719) Support for s3 event sns configuration
|
8
|
+
- [#722](https://github.com/rubyonjets/jets/pull/722) Sets config.cache_classes to true in test env
|
9
|
+
|
10
|
+
## [5.0.13] - 2024-04-26
|
11
|
+
- [#720](https://github.com/rubyonjets/jets/pull/720) Update docs link in status.rb
|
12
|
+
- [#723](https://github.com/rubyonjets/jets/pull/723) fix prewarming post deploy
|
13
|
+
|
6
14
|
## [5.0.12] - 2024-04-15
|
7
15
|
- [#718](https://github.com/rubyonjets/jets/pull/718) fixes for dotenv 3.1
|
8
16
|
|
@@ -36,11 +36,12 @@ class Jets::PreheatJob < Jets::Job::Base
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
-
private
|
39
|
+
private
|
40
|
+
|
40
41
|
# Usually: jets-preheat_job-warm unless JETS_RESET=1, in that case need to lookup the function name
|
41
42
|
def warm_function_name
|
42
43
|
# Return early to avoid lookup call normally
|
43
|
-
return "jets-preheat_job-warm" unless ENV[
|
44
|
+
return "jets-preheat_job-warm" unless ENV["JETS_RESET"] == "1"
|
44
45
|
|
45
46
|
parent_stack = cfn.describe_stack_resources(stack_name: Jets::Names.parent_stack_name)
|
46
47
|
preheat_stack = parent_stack.stack_resources.find do |resource|
|
@@ -58,11 +59,6 @@ private
|
|
58
59
|
def call_options(quiet)
|
59
60
|
options = {}
|
60
61
|
options.merge!(mute: true, mute_output: true) if quiet
|
61
|
-
# All the methods in this Job class leads to Jets::Commands::Call.
|
62
|
-
# This is true for the Jets::Preheat.warm_all also.
|
63
|
-
# These jobs delegate out to Lambda function calls. We do not need/want
|
64
|
-
# the invocation type: RequestResponse in this case.
|
65
|
-
options.merge!(invocation_type: "Event")
|
66
62
|
options
|
67
63
|
end
|
68
64
|
end
|
data/lib/jets/cfn/status.rb
CHANGED
@@ -1,8 +1,49 @@
|
|
1
1
|
module Jets::Job::Dsl
|
2
2
|
module S3Event
|
3
|
+
# Register an S3 event.
|
4
|
+
# Allow custom sns_subscription_properties to be passed in.
|
5
|
+
#
|
6
|
+
# Examples
|
7
|
+
#
|
8
|
+
# props = {
|
9
|
+
# sns_subscription_properties: {
|
10
|
+
# FilterPolicyScope: "MessageBody",
|
11
|
+
# FilterPolicy: {
|
12
|
+
# Records: {
|
13
|
+
# s3: {
|
14
|
+
# object: {
|
15
|
+
# key: [
|
16
|
+
# { prefix: "test-prefix/" }
|
17
|
+
# ]
|
18
|
+
# }
|
19
|
+
# }
|
20
|
+
# }
|
21
|
+
# }.to_json
|
22
|
+
# }
|
23
|
+
# }
|
24
|
+
#
|
25
|
+
# s3_event("s3-bucket", props)
|
26
|
+
# def process_s3_event
|
27
|
+
# ...
|
28
|
+
# end
|
29
|
+
#
|
30
|
+
# The S3 event is set up with the following resources:
|
31
|
+
#
|
32
|
+
# - S3 Bucket
|
33
|
+
# - S3 Bucket Notification Configuration
|
34
|
+
# - SNS Topic
|
35
|
+
# - SNS Subscription
|
36
|
+
#
|
37
|
+
# @param [String] bucket_name
|
38
|
+
# @param [Hash] props
|
3
39
|
def s3_event(bucket_name, props={})
|
4
40
|
stack_name = declare_s3_bucket_resources(bucket_name) # only set up once per bucket
|
5
|
-
|
41
|
+
sns_subscription_properties = {
|
42
|
+
**props[:sns_subscription_properties] || {},
|
43
|
+
TopicArn: "!Ref #{stack_name}SnsTopic"
|
44
|
+
}
|
45
|
+
|
46
|
+
declare_sns_subscription(sns_subscription_properties) # set up subscription every time
|
6
47
|
end
|
7
48
|
|
8
49
|
# Returns stack_name
|
data/lib/jets/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|