jets 4.0.4 → 4.0.6
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 +7 -0
- data/lib/jets/application/defaults.rb +24 -24
- data/lib/jets/commands/help/runner.md +24 -1
- data/lib/jets/commands/main.rb +2 -2
- data/lib/jets/commands/runner.rb +1 -1
- data/lib/jets/internal/app/jobs/jets/preheat_job.rb +1 -1
- data/lib/jets/overrides/rails/common_methods.rb +1 -1
- data/lib/jets/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8c46ea5ca1394f3012193ccbf40b288ee2d18c8c8e8920c8822c8325f320fb2
|
4
|
+
data.tar.gz: 92c635b8b349f4044936184fe2c7937da19d9bdec630a12e32ad21cf8825c36e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e1077dc2e8d538149e5ecb76be8a7d6e090b78442e43ad7c69cb4373944d0551e1e7026e2b161ecd5e59fce7e584939eb843c33dc5fa0c3603f8baa3c928f7c
|
7
|
+
data.tar.gz: f81535a05067afad2e0a2cf90519a90fba4f27cf3c3a6998210ebc7be7ae9d189959cd6ff0269e5743e31cf768258ada437253b09044d5d3120881dec00eed72
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,13 @@
|
|
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
|
+
## [4.0.6] - 2023-10-20
|
7
|
+
- [#670](https://github.com/boltops-tools/jets/pull/670) Fixes IAM role permissions for PreheatJob
|
8
|
+
|
9
|
+
## [4.0.5] - 2023-10-19
|
10
|
+
- [#665](https://github.com/boltops-tools/jets/pull/665) only add add_stage_name when request is present
|
11
|
+
- [#669](https://github.com/boltops-tools/jets/pull/669) Add optional command args to the jets runner command.
|
12
|
+
|
6
13
|
## [4.0.4] - 2023-09-07
|
7
14
|
- [#662](https://github.com/boltops-tools/jets/pull/662) fix vpc iam permissions
|
8
15
|
|
@@ -41,6 +41,30 @@ class Jets::Application
|
|
41
41
|
Resource: "*",
|
42
42
|
}
|
43
43
|
end
|
44
|
+
|
45
|
+
# Used by app/jobs/jets/preheat_job.rb
|
46
|
+
def preheat_job_iam_policy
|
47
|
+
policy = [
|
48
|
+
{
|
49
|
+
Sid: "Statement1",
|
50
|
+
Action: ["logs:*"],
|
51
|
+
Effect: "Allow",
|
52
|
+
Resource: [{
|
53
|
+
"Fn::Sub": "arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/${JetsPreheatJobWarmLambdaFunction}"
|
54
|
+
}]
|
55
|
+
},
|
56
|
+
{
|
57
|
+
Sid: "Statement2",
|
58
|
+
Action: ["lambda:InvokeFunction", "lambda:InvokeAsync"],
|
59
|
+
Effect: "Allow",
|
60
|
+
Resource: [{
|
61
|
+
"Fn::Sub": "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:#{Jets.project_namespace}-*"
|
62
|
+
}]
|
63
|
+
}
|
64
|
+
]
|
65
|
+
policy << vpc_iam_policy_statement if Jets.config.function.vpc_config
|
66
|
+
policy
|
67
|
+
end
|
44
68
|
end
|
45
69
|
|
46
70
|
def default_config
|
@@ -200,29 +224,5 @@ class Jets::Application
|
|
200
224
|
app/shared/functions
|
201
225
|
]
|
202
226
|
end
|
203
|
-
|
204
|
-
# Used by app/jobs/jets/preheat_job.rb
|
205
|
-
def preheat_job_iam_policy
|
206
|
-
policy = [
|
207
|
-
{
|
208
|
-
Sid: "Statement1",
|
209
|
-
Action: ["logs:*"],
|
210
|
-
Effect: "Allow",
|
211
|
-
Resource: [{
|
212
|
-
"Fn::Sub": "arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/${JetsPreheatJobWarmLambdaFunction}"
|
213
|
-
}]
|
214
|
-
},
|
215
|
-
{
|
216
|
-
Sid: "Statement2",
|
217
|
-
Action: ["lambda:InvokeFunction", "lambda:InvokeAsync"],
|
218
|
-
Effect: "Allow",
|
219
|
-
Resource: [{
|
220
|
-
"Fn::Sub": "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:#{Jets.project_namespace}-*"
|
221
|
-
}]
|
222
|
-
}
|
223
|
-
]
|
224
|
-
policy << Jets::Application.vpc_iam_policy_statement if Jets.config.function.vpc_config
|
225
|
-
policy
|
226
|
-
end
|
227
227
|
end
|
228
228
|
end
|
@@ -14,4 +14,27 @@ puts "hello world: #{Jets.env}"
|
|
14
14
|
```
|
15
15
|
|
16
16
|
$ jets runner file://script.rb
|
17
|
-
hello world: development
|
17
|
+
hello world: development
|
18
|
+
|
19
|
+
|
20
|
+
Optionally pass in an argument on the command line:
|
21
|
+
|
22
|
+
Usage: jets runner file|Ruby code [args]
|
23
|
+
|
24
|
+
The argument will be assigned to the `args` variable.
|
25
|
+
|
26
|
+
Example:
|
27
|
+
|
28
|
+
$ jets runner 'puts "hello world with args: #{args}"' 123
|
29
|
+
hello world with args: 123
|
30
|
+
|
31
|
+
|
32
|
+
Example with script.rb:
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
puts "hello world with args: #{args}"
|
36
|
+
```
|
37
|
+
|
38
|
+
$ jets runner file://script.rb 123
|
39
|
+
hello world with args: 123
|
40
|
+
|
data/lib/jets/commands/main.rb
CHANGED
@@ -72,8 +72,8 @@ module Jets::Commands
|
|
72
72
|
|
73
73
|
desc "runner", "Run Ruby code in the context of Jets app non-interactively"
|
74
74
|
long_desc Help.text(:runner)
|
75
|
-
def runner(code)
|
76
|
-
Runner.run(code)
|
75
|
+
def runner(code, args=nil)
|
76
|
+
Runner.run(code, args)
|
77
77
|
end
|
78
78
|
|
79
79
|
desc "dbconsole", "Starts DB REPL console"
|
data/lib/jets/commands/runner.rb
CHANGED
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: 4.0.
|
4
|
+
version: 4.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
@@ -1101,7 +1101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1101
1101
|
- !ruby/object:Gem::Version
|
1102
1102
|
version: '0'
|
1103
1103
|
requirements: []
|
1104
|
-
rubygems_version: 3.4.
|
1104
|
+
rubygems_version: 3.4.20
|
1105
1105
|
signing_key:
|
1106
1106
|
specification_version: 4
|
1107
1107
|
summary: Ruby Serverless Framework
|