jets 0.8.9 → 0.8.10
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 +4 -0
- data/Gemfile.lock +1 -1
- data/lib/jets/commands/main.rb +0 -2
- data/lib/jets/controller/rendering.rb +1 -1
- data/lib/jets/job/base.rb +2 -2
- data/lib/jets/resource/function.rb +11 -10
- data/lib/jets/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: 240ea62121417687a7b24ed6cf556ac1d6f4f2c543238af1b4ac83b6893b28dc
|
|
4
|
+
data.tar.gz: 45856a9db0ae99ad504f07e83620b96e45a461261103ed336b02e35705ccc5fa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1d9d8ab908e3206a94011151ea57200f8ddd2d4a6f30adb962d29b7282f11a724fd72ad5ad4682726ff66f20de3fe204b0492bae9fdcb3b92083322a7e7bb45d
|
|
7
|
+
data.tar.gz: c9a98f6f292ef8383533b7de5bc62d75f15374c932028a5c8e7370c79961b7693d5152754e74b4c1208de7b07dc8ab3e589d92336eafe77730a9d33246987e31
|
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/), even before v1.0.
|
|
5
5
|
|
|
6
|
+
## [0.8.10]
|
|
7
|
+
- allow perform_now to run with default empty event
|
|
8
|
+
- fix env_properties in function resource, fixes stage name
|
|
9
|
+
|
|
6
10
|
## [0.8.9]
|
|
7
11
|
- clean up convenience properties and add rest of them PR #24
|
|
8
12
|
|
data/Gemfile.lock
CHANGED
data/lib/jets/commands/main.rb
CHANGED
|
@@ -14,8 +14,6 @@ module Jets::Commands
|
|
|
14
14
|
|
|
15
15
|
desc "deploy [environment]", "Builds and deploys project to AWS Lambda"
|
|
16
16
|
long_desc Help.text(:deploy)
|
|
17
|
-
option :capabilities, type: :array, desc: "iam capabilities. Ex: CAPABILITY_IAM, CAPABILITY_NAMED_IAM"
|
|
18
|
-
option :iam, type: :boolean, desc: "Shortcut for common IAM capabilities: CAPABILITY_IAM, CAPABILITY_NAMED_IAM"
|
|
19
17
|
# Note the environment is here to trick the Thor parser to allowing an
|
|
20
18
|
# environment parameter. It is not actually set here. It is set earlier
|
|
21
19
|
# in cli.rb: set_jets_env_for_deploy_command!
|
|
@@ -62,7 +62,7 @@ class Jets::Controller
|
|
|
62
62
|
return url unless actual_host
|
|
63
63
|
|
|
64
64
|
if actual_host.include?("amazonaws.com") && url.starts_with?('/')
|
|
65
|
-
stage_name =
|
|
65
|
+
stage_name = Jets::Resource::ApiGateway::Deployment.stage_name
|
|
66
66
|
url = "/#{stage_name}#{url}"
|
|
67
67
|
end
|
|
68
68
|
url
|
data/lib/jets/job/base.rb
CHANGED
|
@@ -15,11 +15,11 @@ class Jets::Job
|
|
|
15
15
|
job.send(meth)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def perform_now(meth, event, context=
|
|
18
|
+
def perform_now(meth, event={}, context={})
|
|
19
19
|
new(event, context, meth).send(meth)
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
-
def perform_later(meth, event, context=
|
|
22
|
+
def perform_later(meth, event={}, context={})
|
|
23
23
|
function_name = "#{self.to_s.underscore}-#{meth}"
|
|
24
24
|
call = Jets::Commands::Call.new(function_name, JSON.dump(event), invocation_type: "Event")
|
|
25
25
|
call.run
|
|
@@ -23,16 +23,24 @@ class Jets::Resource
|
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def combined_properties
|
|
26
|
-
props =
|
|
26
|
+
props = env_properties
|
|
27
27
|
.deep_merge(global_properties)
|
|
28
28
|
.deep_merge(class_properties)
|
|
29
29
|
.deep_merge(function_properties)
|
|
30
30
|
finalize_properties!(props)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
-
def
|
|
33
|
+
def env_properties
|
|
34
34
|
env_vars = Jets::Dotenv.load!(true)
|
|
35
|
-
|
|
35
|
+
variables = environment.merge(env_vars)
|
|
36
|
+
{environment: { variables: variables }}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def environment
|
|
40
|
+
env = Jets.config.environment ? Jets.config.environment.to_h : {}
|
|
41
|
+
jets_env_options = {JETS_ENV: Jets.env.to_s}
|
|
42
|
+
jets_env_options[:JETS_ENV_EXTRA] = Jets.config.env_extra if Jets.config.env_extra
|
|
43
|
+
env.deep_merge(jets_env_options)
|
|
36
44
|
end
|
|
37
45
|
|
|
38
46
|
# Global properties example:
|
|
@@ -173,12 +181,5 @@ class Jets::Resource
|
|
|
173
181
|
method = method.sub('/','-') + "-#{@task.meth}"
|
|
174
182
|
"#{Jets.config.project_namespace}-#{method}"
|
|
175
183
|
end
|
|
176
|
-
|
|
177
|
-
def environment
|
|
178
|
-
env = Jets.config.environment ? Jets.config.environment.to_h : {}
|
|
179
|
-
jets_env_options = {JETS_ENV: Jets.env.to_s}
|
|
180
|
-
jets_env_options[:JETS_ENV_EXTRA] = Jets.config.env_extra if Jets.config.env_extra
|
|
181
|
-
env.deep_merge(jets_env_options)
|
|
182
|
-
end
|
|
183
184
|
end
|
|
184
185
|
end
|
data/lib/jets/version.rb
CHANGED