funktor 0.2.19 → 0.3.0
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/lib/funktor/cli/bootstrap.rb +9 -1
- data/lib/funktor/cli/init.rb +14 -14
- data/lib/funktor/cli/templates/{config → funktor_config}/boot.rb +0 -0
- data/lib/funktor/cli/templates/{config → funktor_config}/environment.yml +0 -0
- data/lib/funktor/cli/templates/{config → funktor_config}/function_definitions/incoming_job_handler.yml +0 -0
- data/lib/funktor/cli/templates/{config → funktor_config}/function_definitions/work_queue_handler.yml +0 -0
- data/lib/funktor/cli/templates/{config → funktor_config}/funktor.yml +0 -0
- data/lib/funktor/cli/templates/{config → funktor_config}/iam_permissions/incoming_job_queue.yml +0 -0
- data/lib/funktor/cli/templates/{config → funktor_config}/iam_permissions/ssm.yml +0 -0
- data/lib/funktor/cli/templates/{config → funktor_config}/iam_permissions/work_queue.yml +0 -0
- data/lib/funktor/cli/templates/{config → funktor_config}/package.yml +1 -1
- data/lib/funktor/cli/templates/{config → funktor_config}/resources/cloudwatch_dashboard.yml +0 -0
- data/lib/funktor/cli/templates/{config → funktor_config}/resources/incoming_job_queue.yml +0 -0
- data/lib/funktor/cli/templates/{config → funktor_config}/resources/incoming_job_queue_user.yml +0 -0
- data/lib/funktor/cli/templates/{config → funktor_config}/resources/work_queue.yml +0 -0
- data/lib/funktor/cli/templates/{config → funktor_config}/ruby_layer.yml +0 -0
- data/lib/funktor/cli/templates/funktor_init.yml.tt +1 -1
- data/lib/funktor/cli/templates/lambda_event_handlers/incoming_job_handler.rb +1 -4
- data/lib/funktor/cli/templates/lambda_event_handlers/work_queue_handler.rb +1 -1
- data/lib/funktor/cli/templates/serverless.yml +4 -4
- data/lib/funktor/version.rb +1 -1
- metadata +18 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5dad52e1f8c07a2cf42ec9029920e80cc4152870a0fc863c35ad8015dfe5eac1
|
4
|
+
data.tar.gz: a22bbf4322188071bb1290f4d189f2fb3c6f80fe2ec6a8fe8c8e150887808007
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 669ee84b2d8e0261886484e365631eaea64ea7a8bb3c3528fce1edebdfa2bb4da61be55e64346a3a4f3b4f7eb5c4dbaebc0ce622a81ae887dc056effa983caa4
|
7
|
+
data.tar.gz: d5ef08ff4ca811a24131fc16fb38dffb8f0ddb9ff777d96408bd0ab9c4c6d498a9d430cee8af2feba6cad38090a26f952480ead4e16a7336095fe21e28fedc31
|
@@ -9,6 +9,10 @@ module Funktor
|
|
9
9
|
:type => :string, :desc => "The bootstrap file to generate.",
|
10
10
|
:default => "funktor_init.yml"
|
11
11
|
|
12
|
+
class_option :directory, :aliases => "-d",
|
13
|
+
:type => :string, :desc => "The directory in which to place the bootstrap file.",
|
14
|
+
:default => nil
|
15
|
+
|
12
16
|
desc <<~DESC
|
13
17
|
Description:
|
14
18
|
Bootstrap a new funktor application by generating a funktor_init.yml file."
|
@@ -26,7 +30,11 @@ module Funktor
|
|
26
30
|
|
27
31
|
private
|
28
32
|
def funktor_file_target
|
29
|
-
File.join
|
33
|
+
File.join funktor_directory_target, options[:file]
|
34
|
+
end
|
35
|
+
|
36
|
+
def funktor_directory_target
|
37
|
+
options[:directory] || name
|
30
38
|
end
|
31
39
|
|
32
40
|
end
|
data/lib/funktor/cli/init.rb
CHANGED
@@ -32,11 +32,11 @@ module Funktor
|
|
32
32
|
|
33
33
|
def funktor_config_yml
|
34
34
|
#template "funktor_config.yml", File.join("funktor_config.yml")
|
35
|
-
template File.join("
|
36
|
-
template File.join("
|
37
|
-
template File.join("
|
38
|
-
template File.join("
|
39
|
-
template File.join("
|
35
|
+
template File.join("funktor_config", "funktor.yml"), File.join("funktor_config", "funktor.yml")
|
36
|
+
template File.join("funktor_config", "ruby_layer.yml"), File.join("funktor_config", "ruby_layer.yml")
|
37
|
+
template File.join("funktor_config", "package.yml"), File.join("funktor_config", "package.yml")
|
38
|
+
template File.join("funktor_config", "environment.yml"), File.join("funktor_config", "environment.yml")
|
39
|
+
template File.join("funktor_config", "boot.rb"), File.join("funktor_config", "boot.rb")
|
40
40
|
end
|
41
41
|
|
42
42
|
def package_json
|
@@ -56,33 +56,33 @@ module Funktor
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def resources
|
59
|
-
template File.join("
|
60
|
-
template File.join("
|
59
|
+
template File.join("funktor_config", "resources", "incoming_job_queue.yml"), File.join("funktor_config", "resources", "incoming_job_queue.yml")
|
60
|
+
template File.join("funktor_config", "resources", "incoming_job_queue_user.yml"), File.join("funktor_config", "resources", "incoming_job_queue_user.yml")
|
61
61
|
# TODO - Figure out how to make the dashboard aware of various queues...
|
62
|
-
template File.join("
|
62
|
+
template File.join("funktor_config", "resources", "cloudwatch_dashboard.yml"), File.join("funktor_config", "resources", "cloudwatch_dashboard.yml")
|
63
63
|
queues.each do |queue_details|
|
64
64
|
@work_queue_name = queue_details.keys.first
|
65
65
|
@work_queue_config = queue_details.values.first
|
66
|
-
template File.join("
|
66
|
+
template File.join("funktor_config", "resources", "work_queue.yml"), File.join("funktor_config", "resources", "#{work_queue_name.underscore}_queue.yml")
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
70
|
def iam_permissions
|
71
|
-
template File.join("
|
72
|
-
template File.join("
|
71
|
+
template File.join("funktor_config", "iam_permissions", "ssm.yml"), File.join("funktor_config", "iam_permissions", "ssm.yml")
|
72
|
+
template File.join("funktor_config", "iam_permissions", "incoming_job_queue.yml"), File.join("funktor_config", "iam_permissions", "incoming_job_queue.yml")
|
73
73
|
queues.each do |queue_details|
|
74
74
|
@work_queue_name = queue_details.keys.first
|
75
75
|
@work_queue_config = queue_details.values.first
|
76
|
-
template File.join("
|
76
|
+
template File.join("funktor_config", "iam_permissions", "work_queue.yml"), File.join("funktor_config", "iam_permissions", "#{work_queue_name.underscore}_queue.yml")
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
80
80
|
def function_definitions
|
81
|
-
template File.join("
|
81
|
+
template File.join("funktor_config", "function_definitions", "incoming_job_handler.yml"), File.join("funktor_config", "function_definitions", "incoming_job_handler.yml")
|
82
82
|
queues.each do |queue_details|
|
83
83
|
@work_queue_name = queue_details.keys.first
|
84
84
|
@work_queue_config = queue_details.values.first
|
85
|
-
template File.join("
|
85
|
+
template File.join("funktor_config", "function_definitions", "work_queue_handler.yml"), File.join("funktor_config", "function_definitions", "#{work_queue_name.underscore}_queue_handler.yml")
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
File without changes
|
File without changes
|
File without changes
|
data/lib/funktor/cli/templates/{config → funktor_config}/function_definitions/work_queue_handler.yml
RENAMED
File without changes
|
File without changes
|
data/lib/funktor/cli/templates/{config → funktor_config}/iam_permissions/incoming_job_queue.yml
RENAMED
File without changes
|
File without changes
|
File without changes
|
@@ -3,7 +3,7 @@ individually: false
|
|
3
3
|
include:
|
4
4
|
- Gemfile
|
5
5
|
- Gemfile.lock
|
6
|
-
-
|
6
|
+
- funktor_config/boot.rb
|
7
7
|
- app/**
|
8
8
|
# Evertyting is excluded by default with serverless-ruby-layer, but you could use
|
9
9
|
# the lines below to exlude files that are inside an include path.
|
File without changes
|
File without changes
|
data/lib/funktor/cli/templates/{config → funktor_config}/resources/incoming_job_queue_user.yml
RENAMED
File without changes
|
File without changes
|
File without changes
|
@@ -1,7 +1,4 @@
|
|
1
|
-
|
2
|
-
# so instead of doing `require_relative '../config/boog'` we just manually require
|
3
|
-
# the one gem that we do need.
|
4
|
-
require 'funktor'
|
1
|
+
require_relative '../funktor_config/boot'
|
5
2
|
|
6
3
|
$handler = Funktor::IncomingJobHandler.new
|
7
4
|
|
@@ -24,7 +24,7 @@ provider:
|
|
24
24
|
name: aws
|
25
25
|
runtime: <%= runtime %>
|
26
26
|
lambdaHashingVersion: 20201221
|
27
|
-
environment: ${file(
|
27
|
+
environment: ${file(funktor_config/environment.yml)}
|
28
28
|
versionFunctions: false # Reduces the amount of storage used since all Lambdas together are limited to 75GB
|
29
29
|
iamRoleStatements:
|
30
30
|
<%- all_iam_permissions.each do |iam_permission| -%>
|
@@ -36,10 +36,10 @@ custom:
|
|
36
36
|
# Our stage is based on what is passed in when running serverless
|
37
37
|
# commands. Or fallsback to what we have set in the provider section.
|
38
38
|
stage: ${self:provider.stage, 'dev'}
|
39
|
-
funktor: ${file(
|
40
|
-
rubyLayer: ${file(
|
39
|
+
funktor: ${file(funktor_config/funktor.yml)}
|
40
|
+
rubyLayer: ${file(funktor_config/ruby_layer.yml)}
|
41
41
|
|
42
|
-
package: ${file(
|
42
|
+
package: ${file(funktor_config/package.yml)}
|
43
43
|
|
44
44
|
functions:
|
45
45
|
<%- all_function_definitions.each do |function_definition| -%>
|
data/lib/funktor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: funktor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Green
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-sqs
|
@@ -116,20 +116,20 @@ files:
|
|
116
116
|
- lib/funktor/cli/init.rb
|
117
117
|
- lib/funktor/cli/templates/Gemfile
|
118
118
|
- lib/funktor/cli/templates/app/workers/hello_worker.rb
|
119
|
-
- lib/funktor/cli/templates/
|
120
|
-
- lib/funktor/cli/templates/
|
121
|
-
- lib/funktor/cli/templates/
|
122
|
-
- lib/funktor/cli/templates/
|
123
|
-
- lib/funktor/cli/templates/
|
124
|
-
- lib/funktor/cli/templates/
|
125
|
-
- lib/funktor/cli/templates/
|
126
|
-
- lib/funktor/cli/templates/
|
127
|
-
- lib/funktor/cli/templates/
|
128
|
-
- lib/funktor/cli/templates/
|
129
|
-
- lib/funktor/cli/templates/
|
130
|
-
- lib/funktor/cli/templates/
|
131
|
-
- lib/funktor/cli/templates/
|
132
|
-
- lib/funktor/cli/templates/
|
119
|
+
- lib/funktor/cli/templates/funktor_config/boot.rb
|
120
|
+
- lib/funktor/cli/templates/funktor_config/environment.yml
|
121
|
+
- lib/funktor/cli/templates/funktor_config/function_definitions/incoming_job_handler.yml
|
122
|
+
- lib/funktor/cli/templates/funktor_config/function_definitions/work_queue_handler.yml
|
123
|
+
- lib/funktor/cli/templates/funktor_config/funktor.yml
|
124
|
+
- lib/funktor/cli/templates/funktor_config/iam_permissions/incoming_job_queue.yml
|
125
|
+
- lib/funktor/cli/templates/funktor_config/iam_permissions/ssm.yml
|
126
|
+
- lib/funktor/cli/templates/funktor_config/iam_permissions/work_queue.yml
|
127
|
+
- lib/funktor/cli/templates/funktor_config/package.yml
|
128
|
+
- lib/funktor/cli/templates/funktor_config/resources/cloudwatch_dashboard.yml
|
129
|
+
- lib/funktor/cli/templates/funktor_config/resources/incoming_job_queue.yml
|
130
|
+
- lib/funktor/cli/templates/funktor_config/resources/incoming_job_queue_user.yml
|
131
|
+
- lib/funktor/cli/templates/funktor_config/resources/work_queue.yml
|
132
|
+
- lib/funktor/cli/templates/funktor_config/ruby_layer.yml
|
133
133
|
- lib/funktor/cli/templates/funktor_init.yml.tt
|
134
134
|
- lib/funktor/cli/templates/gitignore
|
135
135
|
- lib/funktor/cli/templates/lambda_event_handlers/incoming_job_handler.rb
|
@@ -168,7 +168,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
168
|
- !ruby/object:Gem::Version
|
169
169
|
version: '0'
|
170
170
|
requirements: []
|
171
|
-
|
171
|
+
rubyforge_project:
|
172
|
+
rubygems_version: 2.7.6.3
|
172
173
|
signing_key:
|
173
174
|
specification_version: 4
|
174
175
|
summary: Background processing in AWS Lambda.
|