funktor 0.2.19 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/lib/funktor/cli/bootstrap.rb +9 -1
  3. data/lib/funktor/cli/init.rb +14 -14
  4. data/lib/funktor/cli/templates/{config → funktor_config}/boot.rb +0 -0
  5. data/lib/funktor/cli/templates/{config → funktor_config}/environment.yml +0 -0
  6. data/lib/funktor/cli/templates/{config → funktor_config}/function_definitions/incoming_job_handler.yml +0 -0
  7. data/lib/funktor/cli/templates/{config → funktor_config}/function_definitions/work_queue_handler.yml +0 -0
  8. data/lib/funktor/cli/templates/{config → funktor_config}/funktor.yml +0 -0
  9. data/lib/funktor/cli/templates/{config → funktor_config}/iam_permissions/incoming_job_queue.yml +0 -0
  10. data/lib/funktor/cli/templates/{config → funktor_config}/iam_permissions/ssm.yml +0 -0
  11. data/lib/funktor/cli/templates/{config → funktor_config}/iam_permissions/work_queue.yml +0 -0
  12. data/lib/funktor/cli/templates/{config → funktor_config}/package.yml +1 -1
  13. data/lib/funktor/cli/templates/{config → funktor_config}/resources/cloudwatch_dashboard.yml +0 -0
  14. data/lib/funktor/cli/templates/{config → funktor_config}/resources/incoming_job_queue.yml +0 -0
  15. data/lib/funktor/cli/templates/{config → funktor_config}/resources/incoming_job_queue_user.yml +0 -0
  16. data/lib/funktor/cli/templates/{config → funktor_config}/resources/work_queue.yml +0 -0
  17. data/lib/funktor/cli/templates/{config → funktor_config}/ruby_layer.yml +0 -0
  18. data/lib/funktor/cli/templates/funktor_init.yml.tt +1 -1
  19. data/lib/funktor/cli/templates/lambda_event_handlers/incoming_job_handler.rb +1 -4
  20. data/lib/funktor/cli/templates/lambda_event_handlers/work_queue_handler.rb +1 -1
  21. data/lib/funktor/cli/templates/serverless.yml +4 -4
  22. data/lib/funktor/version.rb +1 -1
  23. metadata +18 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 215509407881bb7d177a5b1e917211f9e5adf3a1784109ffbd4fb63fcb9ec433
4
- data.tar.gz: b4db3877393474e0f510e18b9460e2a1a96400379dc60ed23be546f6884e3c59
3
+ metadata.gz: 5dad52e1f8c07a2cf42ec9029920e80cc4152870a0fc863c35ad8015dfe5eac1
4
+ data.tar.gz: a22bbf4322188071bb1290f4d189f2fb3c6f80fe2ec6a8fe8c8e150887808007
5
5
  SHA512:
6
- metadata.gz: ae3a977afab0505ead85b4d22c971cf51ed778a2a4964999990a5c2d74c2adc98d3a92dad19c3a4ea1e9dcf21e0e149d7da44e73ea6aea26c504687f1fa39b95
7
- data.tar.gz: 86372b3097334bf619a3b23ad639c5e73b669b129899f9697b705010de37528ba0145dca7d15cee0d02183e8477a3e87ca38ceedb15027cb9a9e6c1f13b8b573
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 name, options[:file]
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
@@ -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("config", "funktor.yml"), File.join("config", "funktor.yml")
36
- template File.join("config", "ruby_layer.yml"), File.join("config", "ruby_layer.yml")
37
- template File.join("config", "package.yml"), File.join("config", "package.yml")
38
- template File.join("config", "environment.yml"), File.join("config", "environment.yml")
39
- template File.join("config", "boot.rb"), File.join("config", "boot.rb")
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("config", "resources", "incoming_job_queue.yml"), File.join("config", "resources", "incoming_job_queue.yml")
60
- template File.join("config", "resources", "incoming_job_queue_user.yml"), File.join("config", "resources", "incoming_job_queue_user.yml")
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("config", "resources", "cloudwatch_dashboard.yml"), File.join("config", "resources", "cloudwatch_dashboard.yml")
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("config", "resources", "work_queue.yml"), File.join("config", "resources", "#{work_queue_name.underscore}_queue.yml")
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("config", "iam_permissions", "ssm.yml"), File.join("config", "iam_permissions", "ssm.yml")
72
- template File.join("config", "iam_permissions", "incoming_job_queue.yml"), File.join("config", "iam_permissions", "incoming_job_queue.yml")
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("config", "iam_permissions", "work_queue.yml"), File.join("config", "iam_permissions", "#{work_queue_name.underscore}_queue.yml")
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("config", "function_definitions", "incoming_job_handler.yml"), File.join("config", "function_definitions", "incoming_job_handler.yml")
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("config", "function_definitions", "work_queue_handler.yml"), File.join("config", "function_definitions", "#{work_queue_name.underscore}_queue_handler.yml")
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
 
@@ -3,7 +3,7 @@ individually: false
3
3
  include:
4
4
  - Gemfile
5
5
  - Gemfile.lock
6
- - config/boot.rb
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.
@@ -66,4 +66,4 @@ package:
66
66
  - Gemfile
67
67
  - Gemfile.lock
68
68
  - app/**
69
- - config/**
69
+ - funktor_config/**
@@ -1,7 +1,4 @@
1
- # For this handler we don't need to know about your app, or any of the other gems,
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
 
@@ -1,4 +1,4 @@
1
- require_relative '../config/boot'
1
+ require_relative '../funktor_config/boot'
2
2
 
3
3
  $handler = Funktor::ActiveJobHandler.new
4
4
 
@@ -24,7 +24,7 @@ provider:
24
24
  name: aws
25
25
  runtime: <%= runtime %>
26
26
  lambdaHashingVersion: 20201221
27
- environment: ${file(config/environment.yml)}
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(config/funktor.yml)}
40
- rubyLayer: ${file(config/ruby_layer.yml)}
39
+ funktor: ${file(funktor_config/funktor.yml)}
40
+ rubyLayer: ${file(funktor_config/ruby_layer.yml)}
41
41
 
42
- package: ${file(config/package.yml)}
42
+ package: ${file(funktor_config/package.yml)}
43
43
 
44
44
  functions:
45
45
  <%- all_function_definitions.each do |function_definition| -%>
@@ -1,3 +1,3 @@
1
1
  module Funktor
2
- VERSION = "0.2.19"
2
+ VERSION = "0.3.0"
3
3
  end
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.2.19
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-05 00:00:00.000000000 Z
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/config/boot.rb
120
- - lib/funktor/cli/templates/config/environment.yml
121
- - lib/funktor/cli/templates/config/function_definitions/incoming_job_handler.yml
122
- - lib/funktor/cli/templates/config/function_definitions/work_queue_handler.yml
123
- - lib/funktor/cli/templates/config/funktor.yml
124
- - lib/funktor/cli/templates/config/iam_permissions/incoming_job_queue.yml
125
- - lib/funktor/cli/templates/config/iam_permissions/ssm.yml
126
- - lib/funktor/cli/templates/config/iam_permissions/work_queue.yml
127
- - lib/funktor/cli/templates/config/package.yml
128
- - lib/funktor/cli/templates/config/resources/cloudwatch_dashboard.yml
129
- - lib/funktor/cli/templates/config/resources/incoming_job_queue.yml
130
- - lib/funktor/cli/templates/config/resources/incoming_job_queue_user.yml
131
- - lib/funktor/cli/templates/config/resources/work_queue.yml
132
- - lib/funktor/cli/templates/config/ruby_layer.yml
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
- rubygems_version: 3.1.4
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.