jets 1.9.14 → 1.9.15

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
  SHA256:
3
- metadata.gz: cbab0491cbf5561c945b39f00571bc36a166d2ca2b7f4aea030af1b900cd66be
4
- data.tar.gz: ec018b50f0934339920af17683201d3b198d72c4a8fba7552ea63f12128c5739
3
+ metadata.gz: fbb4b25f059987c3f62fdf3abc5f18d678fc1bb78df83cb32923f395293c7796
4
+ data.tar.gz: f92f95e87d22fc44c323fcecfd5c0d44ca635429041775662974d736025aa2a0
5
5
  SHA512:
6
- metadata.gz: b8be8503dc99e02075251bd455427bde36023bb6d9b9a7a8da73ef7e3c9ca2caaa2136a29de5c594188aec6fc843b943c29e1f359199befc21b9788283d4c236
7
- data.tar.gz: 200d2ff299fb1f2491f171166d6158add14099c6eaff2e5595cdf60cb45dc6993cceb14e472b8fdef1398a0b5115879ddd8b39e4d5da59454544025a1292b1d1
6
+ metadata.gz: 516b768c844390537687770079bb21a996dd4338857c0833127e5e3dbefb23a3fc8af65a8f0f38948ca438857854e9c1d8986d25d96d051e051ecb642d6f9672
7
+ data.tar.gz: 63e1e9a9b7cddb7f63c274732cd2bb05ecc338c6a3a33adc09363284b382d247eee22409ddf7090333fa75fba674352425712ec567c1e765bd88ab1505b801f6
data/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
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
+ ## [1.9.15]
7
+ - #289 add sqs url to shared sqs queue resource
8
+ - #290 allow adjustment for preheat job iam policy
9
+
6
10
  ## [1.9.14]
7
11
  - #288 fix shared eager loading so only shared classes are loaded
8
12
  - #287 fix lambda url on the jets call command
@@ -187,6 +187,7 @@ class Jets::Application
187
187
  def set_iam_policy
188
188
  config.iam_policy ||= self.class.default_iam_policy
189
189
  config.managed_policy_definitions ||= [] # default empty
190
+ config.prewarm_job_iam_policy ||= self.class.default_prewarm_job_iam_policy
190
191
  end
191
192
 
192
193
  def self.default_iam_policy
@@ -220,6 +221,23 @@ class Jets::Application
220
221
  policies
221
222
  end
222
223
 
224
+ def self.default_prewarm_job_iam_policy
225
+ [
226
+ {
227
+ sid: "Statement1",
228
+ action: ["logs:*"],
229
+ effect: "Allow",
230
+ resource: "arn:aws:logs:#{Jets.aws.region}:#{Jets.aws.account}:log-group:#{Jets.config.project_namespace}-*",
231
+ },
232
+ {
233
+ sid: "Statement2",
234
+ action: ["lambda:InvokeFunction", "lambda:InvokeAsync"],
235
+ effect: "Allow",
236
+ resource: "arn:aws:lambda:#{Jets.aws.region}:#{Jets.aws.account}:function:#{Jets.config.project_namespace}-*",
237
+ }
238
+ ]
239
+ end
240
+
223
241
  # It is pretty easy to attempt to set environment variables without
224
242
  # the correct AWS Environment.Variables path struture.
225
243
  # Auto-fix it for convenience.
@@ -7,20 +7,7 @@ class Jets::PreheatJob < ApplicationJob
7
7
 
8
8
  class_timeout 30
9
9
  class_memory 1024
10
- class_iam_policy(
11
- {
12
- sid: "Statement1",
13
- action: ["logs:*"],
14
- effect: "Allow",
15
- resource: "arn:aws:logs:#{Jets.aws.region}:#{Jets.aws.account}:log-group:#{Jets.config.project_namespace}-*",
16
- },
17
- {
18
- sid: "Statement2",
19
- action: ["lambda:InvokeFunction", "lambda:InvokeAsync"],
20
- effect: "Allow",
21
- resource: "arn:aws:lambda:#{Jets.aws.region}:#{Jets.aws.account}:function:#{Jets.config.project_namespace}-*",
22
- }
23
- )
10
+ class_iam_policy(Jets.config.prewarm_job_iam_policy)
24
11
 
25
12
  rate(PREWARM_RATE) if torching
26
13
  def torch
@@ -55,7 +55,7 @@ module Jets::Resource::ChildStack
55
55
 
56
56
  def depends_on
57
57
  return unless current_shared_class.depends_on
58
- current_shared_class.depends_on.map { |x| x.to_s.singularize.camelize }
58
+ current_shared_class.depends_on.map { |x| x.to_s.camelize }
59
59
  end
60
60
 
61
61
  # map the path to a camelized logical_id. Example:
@@ -3,8 +3,8 @@ module Jets::Stack::Main::Dsl
3
3
  def sqs_queue(id, props={})
4
4
  # props[:queue_name] ||= id.to_s # comment out to allow CloudFormation to generate name
5
5
  resource(id, "AWS::SQS::Queue", props)
6
- # output(id) # normal !Ref returns the sqs url the ARN is more useful
7
- output(id, getatt(id, :arn))
6
+ output(id, getatt(id, :arn)) # normal !Ref returns the sqs url the ARN is useful for nested stacks depends_on
7
+ output("#{id}_url", ref(id)) # useful for Stack.lookup method. IE: List.lookup(:waitlist_url)
8
8
  end
9
9
  end
10
- end
10
+ end
data/lib/jets/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jets
2
- VERSION = "1.9.14"
2
+ VERSION = "1.9.15"
3
3
  end
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: 1.9.14
4
+ version: 1.9.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-07 00:00:00.000000000 Z
11
+ date: 2019-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer