jets 3.0.14 → 3.0.18
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 +17 -0
- data/jets.gemspec +1 -1
- data/lib/jets/aws_services.rb +38 -10
- data/lib/jets/commands/clean/log.rb +0 -13
- data/lib/jets/commands/delete.rb +1 -21
- data/lib/jets/commands/deploy.rb +0 -37
- data/lib/jets/commands/new.rb +8 -1
- data/lib/jets/controller/base.rb +22 -2
- data/lib/jets/controller/middleware/local/route_matcher.rb +3 -3
- data/lib/jets/controller/rack/adapter.rb +4 -4
- data/lib/jets/controller/rack/env.rb +6 -4
- data/lib/jets/generator/templates/rails/scaffold_controller/controller.rb +1 -1
- data/lib/jets/internal/app/functions/jets/base_path_mapping.rb +19 -0
- data/lib/jets/job/base.rb +2 -2
- data/lib/jets/resource/api_gateway/rest_api/routes/change/base.rb +5 -20
- data/lib/jets/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30209fb06ab88c5a593d26b7d20bf15f1164b5915a40f23ea8f61b2f7538361a
|
4
|
+
data.tar.gz: 5c68efddc6c6b6c183c2191f23f5729c094247031ff88c3d0d73db2ea1e992e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 843dac414dc95a7aefc8ff4e02df7dc652319fdffefb1b61ce44043955021d6f438cc0877eb814e5b160220a17744b349120484a8633da18744158360e68ded1
|
7
|
+
data.tar.gz: 2b5b0dfb86f76f09d9bcc9f2a167a7af0cd260fde702fd4c6b7dc5db4f7af9d949a04fd77d2fb2e54ce0f3681a606064c249f7e6944d565d4d6a38b8c41afb9d
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,23 @@
|
|
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
|
+
## [3.0.18] - 2021-10-20
|
7
|
+
- [#596](https://github.com/boltops-tools/jets/pull/596) Serialize job data correctly
|
8
|
+
- [#598](https://github.com/boltops-tools/jets/pull/598) fixing issues when mounting
|
9
|
+
- [#599](https://github.com/boltops-tools/jets/pull/599) pin to zeitwerk 2.4.x
|
10
|
+
- [#600](https://github.com/boltops-tools/jets/pull/600) method override also on the lambda function side
|
11
|
+
|
12
|
+
## [3.0.17] - 2021-09-15
|
13
|
+
- [#593](https://github.com/boltops-tools/jets/pull/593) Fix deploy for new projects. Added rescue block back into lib/jets/commands/deploy.rb
|
14
|
+
|
15
|
+
## [3.0.16] - 2021-09-10
|
16
|
+
- [#590](https://github.com/boltops-tools/jets/pull/590) Improve Rate Limit Handling
|
17
|
+
|
18
|
+
## [3.0.15] - 2021-09-05
|
19
|
+
- [#587](https://github.com/boltops-tools/jets/pull/587) Fix private method names
|
20
|
+
- [#588](https://github.com/boltops-tools/jets/pull/588) custom domain: adjust rate limit for base mapping
|
21
|
+
- [#589](https://github.com/boltops-tools/jets/pull/589) Ujs
|
22
|
+
|
6
23
|
## [3.0.14] - 2021-09-01
|
7
24
|
- [#583](https://github.com/boltops-tools/jets/pull/583) Don't overwrite content_type when rendering json or xml with content_type specified
|
8
25
|
- [#584](https://github.com/boltops-tools/jets/pull/584) Adds an override flag to change behaviour when Jets is behind an ELB running Jets Server
|
data/jets.gemspec
CHANGED
@@ -61,7 +61,7 @@ Gem::Specification.new do |spec|
|
|
61
61
|
spec.add_dependency "shotgun"
|
62
62
|
spec.add_dependency "text-table"
|
63
63
|
spec.add_dependency "thor"
|
64
|
-
spec.add_dependency "zeitwerk"
|
64
|
+
spec.add_dependency "zeitwerk", "~> 2.4.0"
|
65
65
|
|
66
66
|
spec.add_development_dependency "bundler"
|
67
67
|
spec.add_development_dependency "byebug"
|
data/lib/jets/aws_services.rb
CHANGED
@@ -16,52 +16,80 @@ module Jets::AwsServices
|
|
16
16
|
include StackStatus
|
17
17
|
|
18
18
|
def apigateway
|
19
|
-
Aws::APIGateway::Client.new
|
19
|
+
Aws::APIGateway::Client.new(aws_options)
|
20
20
|
end
|
21
21
|
global_memoize :apigateway
|
22
22
|
|
23
23
|
def cfn
|
24
|
-
Aws::CloudFormation::Client.new
|
24
|
+
Aws::CloudFormation::Client.new(aws_options)
|
25
25
|
end
|
26
26
|
global_memoize :cfn
|
27
27
|
|
28
28
|
def dynamodb
|
29
|
-
Aws::DynamoDB::Client.new
|
29
|
+
Aws::DynamoDB::Client.new(aws_options)
|
30
30
|
end
|
31
31
|
global_memoize :dynamodb
|
32
32
|
|
33
33
|
def aws_lambda
|
34
|
-
Aws::Lambda::Client.new
|
34
|
+
Aws::Lambda::Client.new(aws_options)
|
35
35
|
end
|
36
36
|
global_memoize :aws_lambda
|
37
37
|
|
38
38
|
def logs
|
39
|
-
Aws::CloudWatchLogs::Client.new
|
39
|
+
Aws::CloudWatchLogs::Client.new(aws_options)
|
40
40
|
end
|
41
41
|
global_memoize :logs
|
42
42
|
|
43
43
|
def s3
|
44
|
-
Aws::S3::Client.new
|
44
|
+
Aws::S3::Client.new(aws_options)
|
45
45
|
end
|
46
46
|
global_memoize :s3
|
47
47
|
|
48
48
|
def s3_resource
|
49
|
-
Aws::S3::Resource.new
|
49
|
+
Aws::S3::Resource.new(aws_options)
|
50
50
|
end
|
51
51
|
global_memoize :s3_resource
|
52
52
|
|
53
53
|
def sns
|
54
|
-
Aws::SNS::Client.new
|
54
|
+
Aws::SNS::Client.new(aws_options)
|
55
55
|
end
|
56
56
|
global_memoize :sns
|
57
57
|
|
58
58
|
def sqs
|
59
|
-
Aws::SQS::Client.new
|
59
|
+
Aws::SQS::Client.new(aws_options)
|
60
60
|
end
|
61
61
|
global_memoize :sqs
|
62
62
|
|
63
63
|
def sts
|
64
|
-
Aws::STS::Client.new
|
64
|
+
Aws::STS::Client.new(aws_options)
|
65
65
|
end
|
66
66
|
global_memoize :sts
|
67
|
+
|
68
|
+
# Override the AWS retry settings with Jets AWS clients.
|
69
|
+
#
|
70
|
+
# The aws-sdk-core has exponential backup with this formula:
|
71
|
+
#
|
72
|
+
# 2 ** c.retries * c.config.retry_base_delay
|
73
|
+
#
|
74
|
+
# So the max delay will be 2 ** 7 * 0.6 = 76.8s
|
75
|
+
#
|
76
|
+
# Only scoping this to deploy because dont want to affect people's application that use the aws sdk.
|
77
|
+
#
|
78
|
+
# There is also additional rate backoff logic elsewhere, since this is only scoped to deploys.
|
79
|
+
#
|
80
|
+
# Useful links:
|
81
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-sdk-core/lib/aws-sdk-core/plugins/retry_errors.rb
|
82
|
+
# https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html
|
83
|
+
#
|
84
|
+
def aws_options
|
85
|
+
options = {
|
86
|
+
retry_limit: 7, # default: 3
|
87
|
+
retry_base_delay: 0.6, # default: 0.3
|
88
|
+
}
|
89
|
+
options.merge!(
|
90
|
+
log_level: :debug,
|
91
|
+
logger: Logger.new($stdout),
|
92
|
+
) if ENV['JETS_DEBUG_AWS_SDK']
|
93
|
+
options
|
94
|
+
end
|
67
95
|
end
|
@@ -26,20 +26,7 @@ class Jets::Commands::Clean
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def delete_log_group(log_group_name)
|
29
|
-
retries = 0
|
30
29
|
logs.delete_log_group(log_group_name: log_group_name)
|
31
|
-
rescue Aws::CloudWatchLogs::Errors::ThrottlingException => e
|
32
|
-
retries += 1
|
33
|
-
seconds = 2 ** retries
|
34
|
-
|
35
|
-
puts "WARN: delete_log_group #{e.class} #{e.message}".color(:yellow)
|
36
|
-
puts "Backing off and will retry in #{seconds} seconds."
|
37
|
-
sleep(seconds)
|
38
|
-
if seconds > 90 # 2 ** 6 is 64 so will give up after 6 retries
|
39
|
-
puts "Giving up after #{retries} retries"
|
40
|
-
else
|
41
|
-
retry
|
42
|
-
end
|
43
30
|
end
|
44
31
|
|
45
32
|
def clean_deploys
|
data/lib/jets/commands/delete.rb
CHANGED
@@ -44,27 +44,7 @@ class Jets::Commands::Delete
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def confirm_project_exists
|
47
|
-
|
48
|
-
begin
|
49
|
-
cfn.describe_stacks(stack_name: parent_stack_name)
|
50
|
-
rescue Aws::CloudFormation::Errors::ValidationError
|
51
|
-
# Aws::CloudFormation::Errors::ValidationError is thrown when the stack
|
52
|
-
# does not exist
|
53
|
-
puts "The parent stack #{Jets.config.project_namespace.color(:green)} for the project #{Jets.config.project_name.color(:green)} does not exist. So it cannot be deleted."
|
54
|
-
exit 0
|
55
|
-
rescue Aws::CloudFormation::Errors::Throttling => e
|
56
|
-
retries += 1
|
57
|
-
seconds = 2 ** retries
|
58
|
-
|
59
|
-
puts "WARN: confirm_project_exists #{e.class} #{e.message}".color(:yellow)
|
60
|
-
puts "Backing off and will retry in #{seconds} seconds."
|
61
|
-
sleep(seconds)
|
62
|
-
if seconds > 90 # 2 ** 6 is 64 so will give up after 6 retries
|
63
|
-
puts "Giving up after #{retries} retries"
|
64
|
-
else
|
65
|
-
retry
|
66
|
-
end
|
67
|
-
end
|
47
|
+
cfn.describe_stacks(stack_name: parent_stack_name)
|
68
48
|
end
|
69
49
|
|
70
50
|
def empty_s3_bucket
|
data/lib/jets/commands/deploy.rb
CHANGED
@@ -9,7 +9,6 @@ module Jets::Commands
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def run
|
12
|
-
aws_config_update!
|
13
12
|
deployment_env = Jets.config.project_namespace.color(:green)
|
14
13
|
puts "Deploying to Lambda #{deployment_env} environment..."
|
15
14
|
return if @options[:noop]
|
@@ -37,29 +36,6 @@ module Jets::Commands
|
|
37
36
|
ship(stack_type: :full, s3_bucket: s3_bucket)
|
38
37
|
end
|
39
38
|
|
40
|
-
# Override the AWS retry settings during a deploy.
|
41
|
-
#
|
42
|
-
# The aws-sdk-core has expondential backup with this formula:
|
43
|
-
#
|
44
|
-
# 2 ** c.retries * c.config.retry_base_delay
|
45
|
-
#
|
46
|
-
# So the max delay will be 2 ** 7 * 0.6 = 76.8s
|
47
|
-
#
|
48
|
-
# Only scoping this to deploy because dont want to affect people's application that use the aws sdk.
|
49
|
-
#
|
50
|
-
# There is also additional rate backoff logic elsewhere, since this is only scoped to deploys.
|
51
|
-
#
|
52
|
-
# Useful links:
|
53
|
-
# https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-sdk-core/lib/aws-sdk-core/plugins/retry_errors.rb
|
54
|
-
# https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html
|
55
|
-
#
|
56
|
-
def aws_config_update!
|
57
|
-
Aws.config.update(
|
58
|
-
retry_limit: 7, # default: 3
|
59
|
-
retry_base_delay: 0.6, # default: 0.3
|
60
|
-
)
|
61
|
-
end
|
62
|
-
|
63
39
|
def create_s3_event_buckets
|
64
40
|
buckets = Jets::Job::Base.s3_events.keys
|
65
41
|
buckets.each do |bucket|
|
@@ -126,7 +102,6 @@ module Jets::Commands
|
|
126
102
|
end
|
127
103
|
|
128
104
|
def find_stack(stack_name)
|
129
|
-
retries = 0
|
130
105
|
resp = cfn.describe_stacks(stack_name: stack_name)
|
131
106
|
resp.stacks.first
|
132
107
|
rescue Aws::CloudFormation::Errors::ValidationError => e
|
@@ -136,18 +111,6 @@ module Jets::Commands
|
|
136
111
|
else
|
137
112
|
raise
|
138
113
|
end
|
139
|
-
rescue Aws::CloudFormation::Errors::Throttling => e
|
140
|
-
retries += 1
|
141
|
-
seconds = 2 ** retries
|
142
|
-
|
143
|
-
puts "WARN: find_stack #{e.class} #{e.message}".color(:yellow)
|
144
|
-
puts "Backing off and will retry in #{seconds} seconds."
|
145
|
-
sleep(seconds)
|
146
|
-
if seconds > 90 # 2 ** 6 is 64 so will give up after 6 retries
|
147
|
-
puts "Giving up after #{retries} retries"
|
148
|
-
else
|
149
|
-
retry
|
150
|
-
end
|
151
114
|
end
|
152
115
|
|
153
116
|
# All CloudFormation states listed here: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-describing-stacks.html
|
data/lib/jets/commands/new.rb
CHANGED
@@ -114,7 +114,14 @@ JS
|
|
114
114
|
after = "const { environment } = require('@rails/webpacker')\n"
|
115
115
|
insert_into_file("config/webpack/environment.js", jquery, after: after)
|
116
116
|
|
117
|
-
|
117
|
+
jets_ujs =<<-JS
|
118
|
+
import Jets from "@rubyonjets/ujs-compat"
|
119
|
+
Jets.start()
|
120
|
+
JS
|
121
|
+
after = "Rails.start()\n"
|
122
|
+
insert_into_file("app/javascript/packs/application.js", jets_ujs, after: after)
|
123
|
+
|
124
|
+
run("yarn add bootstrap jquery popper.js postcss-cssnext @rails/ujs @rubyonjets/ujs-compat")
|
118
125
|
end
|
119
126
|
|
120
127
|
def git_init
|
data/lib/jets/controller/base.rb
CHANGED
@@ -43,7 +43,7 @@ class Jets::Controller
|
|
43
43
|
# Most of the time, you want process! instead of dispatch!
|
44
44
|
#
|
45
45
|
def process!
|
46
|
-
adapter = Jets::Controller::Rack::Adapter.new(event, context
|
46
|
+
adapter = Jets::Controller::Rack::Adapter.new(event, context)
|
47
47
|
adapter.rack_vars(
|
48
48
|
'jets.controller' => self,
|
49
49
|
'lambda.context' => context,
|
@@ -75,6 +75,8 @@ class Jets::Controller
|
|
75
75
|
# dispatch! is useful for megamode or mounted applications
|
76
76
|
#
|
77
77
|
def dispatch!
|
78
|
+
method_override!
|
79
|
+
|
78
80
|
t1 = Time.now
|
79
81
|
log_start
|
80
82
|
|
@@ -99,12 +101,30 @@ class Jets::Controller
|
|
99
101
|
triplet # status, headers, body
|
100
102
|
end
|
101
103
|
|
104
|
+
# Override @meth when POST with _method=delete
|
105
|
+
# By the time processing reaches dispatch which calls method_override!
|
106
|
+
# The Rack::MethodOverride middleware has overriden env['REQUEST_METHOD'] with DELETE
|
107
|
+
# and set env['rack.methodoverride.original_method']
|
108
|
+
def method_override!
|
109
|
+
env = request.env
|
110
|
+
if env['rack.methodoverride.original_method'] && env['REQUEST_METHOD'] == 'DELETE'
|
111
|
+
@original_meth = @meth
|
112
|
+
@meth = "delete"
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
def processing_log
|
117
|
+
processing = "Processing #{self.class.name}##{@meth}"
|
118
|
+
processing << " (original method #{@original_meth})" if @original_meth
|
119
|
+
processing
|
120
|
+
end
|
121
|
+
|
102
122
|
# Documented interface method, careful not to rename
|
103
123
|
def log_start
|
104
124
|
# JSON.dump makes logging look pretty in CloudWatch logs because it keeps it on 1 line
|
105
125
|
ip = request.ip
|
106
126
|
Jets.logger.info "Started #{@event['httpMethod']} \"#{@event['path']}\" for #{ip} at #{Time.now}"
|
107
|
-
Jets.logger.info
|
127
|
+
Jets.logger.info processing_log
|
108
128
|
Jets.logger.info " Event: #{event_log}"
|
109
129
|
Jets.logger.info " Parameters: #{JSON.dump(filtered_parameters.to_h)}"
|
110
130
|
end
|
@@ -5,17 +5,17 @@ class Jets::Controller::Middleware::Local
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def find_route
|
8
|
-
Jets::Router::Finder.new(
|
8
|
+
Jets::Router::Finder.new(path, method).run
|
9
9
|
end
|
10
10
|
|
11
11
|
private
|
12
12
|
attr_reader :env
|
13
13
|
|
14
|
-
def
|
14
|
+
def method
|
15
15
|
env["REQUEST_METHOD"] || "GET"
|
16
16
|
end
|
17
17
|
|
18
|
-
def
|
18
|
+
def path
|
19
19
|
env["PATH_INFO"].sub(/^\//,'')
|
20
20
|
end
|
21
21
|
end
|
@@ -5,13 +5,13 @@ module Jets::Controller::Rack
|
|
5
5
|
extend Memoist
|
6
6
|
|
7
7
|
# Returns back API Gateway response hash structure
|
8
|
-
def self.process(event, context
|
9
|
-
adapter = new(event, context
|
8
|
+
def self.process(event, context)
|
9
|
+
adapter = new(event, context)
|
10
10
|
adapter.process
|
11
11
|
end
|
12
12
|
|
13
|
-
def initialize(event, context
|
14
|
-
@event, @context
|
13
|
+
def initialize(event, context)
|
14
|
+
@event, @context = event, context
|
15
15
|
end
|
16
16
|
|
17
17
|
# 1. Convert API Gateway event event to Rack env
|
@@ -27,12 +27,12 @@ module Jets::Controller::Rack
|
|
27
27
|
def path_with_base_path
|
28
28
|
resource = @event['resource']
|
29
29
|
pathParameters = @event['pathParameters']
|
30
|
-
|
30
|
+
|
31
31
|
if(!pathParameters.nil? and !resource.nil?)
|
32
32
|
resource = pathParameters.reduce(resource) {|resource, parameter|
|
33
33
|
key, value = parameter
|
34
|
-
|
35
|
-
resource = resource.gsub(key, value)
|
34
|
+
resource = resource.gsub("{#{key}+}", value)
|
35
|
+
resource = resource.gsub("{#{key}}", value)
|
36
36
|
resource
|
37
37
|
}
|
38
38
|
end
|
@@ -64,7 +64,9 @@ module Jets::Controller::Rack
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def content_type
|
67
|
-
|
67
|
+
# Rack (local) uses Content-Type and APIGW (remote) uses content-type
|
68
|
+
# Rack::MethodOverride relys on content-type to detect content type properly.
|
69
|
+
headers['Content-Type'] || headers['content-type'] || Jets::Controller::DEFAULT_CONTENT_TYPE
|
68
70
|
end
|
69
71
|
|
70
72
|
def content_length
|
@@ -56,7 +56,7 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
56
56
|
def delete
|
57
57
|
@<%= orm_instance.destroy %>
|
58
58
|
if request.xhr?
|
59
|
-
render json: {success: true}
|
59
|
+
render json: {success: true, location: <%= table_name %>_path}
|
60
60
|
else
|
61
61
|
redirect_to <%= table_name %>_path
|
62
62
|
end
|
@@ -4,6 +4,25 @@ require 'aws-sdk-cloudformation'
|
|
4
4
|
class BasePathMapping
|
5
5
|
def initialize(event, stage_name)
|
6
6
|
@event, @stage_name = event, stage_name
|
7
|
+
aws_config_update!
|
8
|
+
end
|
9
|
+
|
10
|
+
# Override the AWS retry settings. The aws-sdk-core has expondential backup with this formula:
|
11
|
+
#
|
12
|
+
# 2 ** c.retries * c.config.retry_base_delay
|
13
|
+
#
|
14
|
+
# So the max delay will be 2 ** 7 * 0.6 = 76.8s
|
15
|
+
#
|
16
|
+
# Useful links:
|
17
|
+
#
|
18
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-sdk-core/lib/aws-sdk-core/plugins/retry_errors.rb
|
19
|
+
# https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html
|
20
|
+
#
|
21
|
+
def aws_config_update!
|
22
|
+
Aws.config.update(
|
23
|
+
retry_limit: 7, # default: 3
|
24
|
+
retry_base_delay: 0.6, # default: 0.3
|
25
|
+
)
|
7
26
|
end
|
8
27
|
|
9
28
|
# Cannot use update_base_path_mapping to update the base_mapping because it doesnt
|
data/lib/jets/job/base.rb
CHANGED
@@ -26,13 +26,13 @@ module Jets::Job
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def perform_now(meth, event={}, context={})
|
29
|
-
new(event, context, meth).send(meth)
|
29
|
+
new(event.try(:to_unsafe_h), context, meth).send(meth)
|
30
30
|
end
|
31
31
|
|
32
32
|
def perform_later(meth, event={}, context={})
|
33
33
|
if on_lambda?
|
34
34
|
function_name = "#{self.to_s.underscore}-#{meth}"
|
35
|
-
call = Jets::Commands::Call.new(function_name, JSON.dump(event), invocation_type: "Event")
|
35
|
+
call = Jets::Commands::Call.new(function_name, JSON.dump(event.try(:to_unsafe_h)), invocation_type: "Event")
|
36
36
|
call.run
|
37
37
|
else
|
38
38
|
puts "INFO: Not on AWS Lambda. In local mode perform_later executes the job with perform_now instead."
|
@@ -59,26 +59,11 @@ class Jets::Resource::ApiGateway::RestApi::Routes::Change
|
|
59
59
|
|
60
60
|
def method_uri(resource_id, http_method)
|
61
61
|
# https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
http_method: http_method
|
68
|
-
)
|
69
|
-
rescue Aws::APIGateway::Errors::TooManyRequestsException => e
|
70
|
-
retries += 1
|
71
|
-
seconds = 2 ** retries
|
72
|
-
|
73
|
-
puts "WARN: method_uri #{e.class} #{e.message}".color(:yellow)
|
74
|
-
puts "Backing off and will retry in #{seconds} seconds."
|
75
|
-
sleep(seconds)
|
76
|
-
if seconds > 90 # 2 ** 6 is 64 so will give up after 6 retries
|
77
|
-
puts "Giving up after #{retries} retries"
|
78
|
-
else
|
79
|
-
retry
|
80
|
-
end
|
81
|
-
end
|
62
|
+
resp = apigateway.get_method(
|
63
|
+
rest_api_id: rest_api_id,
|
64
|
+
resource_id: resource_id,
|
65
|
+
http_method: http_method
|
66
|
+
)
|
82
67
|
resp.method_integration.uri
|
83
68
|
end
|
84
69
|
|
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: 3.0.
|
4
|
+
version: 3.0.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
@@ -490,16 +490,16 @@ dependencies:
|
|
490
490
|
name: zeitwerk
|
491
491
|
requirement: !ruby/object:Gem::Requirement
|
492
492
|
requirements:
|
493
|
-
- - "
|
493
|
+
- - "~>"
|
494
494
|
- !ruby/object:Gem::Version
|
495
|
-
version:
|
495
|
+
version: 2.4.0
|
496
496
|
type: :runtime
|
497
497
|
prerelease: false
|
498
498
|
version_requirements: !ruby/object:Gem::Requirement
|
499
499
|
requirements:
|
500
|
-
- - "
|
500
|
+
- - "~>"
|
501
501
|
- !ruby/object:Gem::Version
|
502
|
-
version:
|
502
|
+
version: 2.4.0
|
503
503
|
- !ruby/object:Gem::Dependency
|
504
504
|
name: bundler
|
505
505
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1095,7 +1095,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1095
1095
|
- !ruby/object:Gem::Version
|
1096
1096
|
version: '0'
|
1097
1097
|
requirements: []
|
1098
|
-
rubygems_version: 3.
|
1098
|
+
rubygems_version: 3.1.6
|
1099
1099
|
signing_key:
|
1100
1100
|
specification_version: 4
|
1101
1101
|
summary: Ruby Serverless Framework
|