aws-sdk-rails 3.11.0 → 3.12.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4db4f6778275cb1b836119e1d593fa7d9ebc2e629bbe4818685fdc36dffa286f
|
4
|
+
data.tar.gz: 567aed0fd65308e3e1ab9df0875d2d5d3dbbe2b2228d4756dbc55edbf84e481e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56b130425e1fcd11fd2cbcb41a8bc0159c02cc2ae821a8c95cd8553cfb3bfb63492cffaed8205e2cbd142272eb5ee6351e31a143ec12259c2ac226f511f0aec4
|
7
|
+
data.tar.gz: e5db0e0c8a1e955a12ca48e57e6d2d64f4758a083cb2d9a28eec4b7c45ef6eed5084543f63b2f4714cd5ca797a16c160172fab0e61b201119205a3eef7e95a79
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.12.0
|
@@ -85,7 +85,15 @@ module Aws
|
|
85
85
|
end
|
86
86
|
|
87
87
|
def app_runs_in_docker_container?
|
88
|
-
@app_runs_in_docker_container ||=
|
88
|
+
@app_runs_in_docker_container ||= in_docker_container_with_cgroup1? || in_docker_container_with_cgroup2?
|
89
|
+
end
|
90
|
+
|
91
|
+
def in_docker_container_with_cgroup1?
|
92
|
+
File.exist?('/proc/1/cgroup') && File.read('/proc/1/cgroup') =~ %r{/docker/}
|
93
|
+
end
|
94
|
+
|
95
|
+
def in_docker_container_with_cgroup2?
|
96
|
+
File.exist?('/proc/self/mountinfo') && File.read('/proc/self/mountinfo') =~ %r{/docker/containers/}
|
89
97
|
end
|
90
98
|
|
91
99
|
def default_gw_ips
|
@@ -24,26 +24,24 @@ module Aws
|
|
24
24
|
|
25
25
|
def execute(message)
|
26
26
|
@executor.post(message) do |message|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
@logger.debug e.backtrace.join("\n")
|
27
|
+
job = JobRunner.new(message)
|
28
|
+
@logger.info("Running job: #{job.id}[#{job.class_name}]")
|
29
|
+
job.run
|
30
|
+
message.delete
|
31
|
+
rescue Aws::Json::ParseError => e
|
32
|
+
@logger.error "Unable to parse message body: #{message.data.body}. Error: #{e}."
|
33
|
+
rescue StandardError => e
|
34
|
+
job_msg = job ? "#{job.id}[#{job.class_name}]" : 'unknown job'
|
35
|
+
@logger.info "Error processing job #{job_msg}: #{e}"
|
36
|
+
@logger.debug e.backtrace.join("\n")
|
38
37
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
end
|
38
|
+
if @retry_standard_errors && !job.exception_executions?
|
39
|
+
@logger.info(
|
40
|
+
'retry_standard_errors is enabled and job has not ' \
|
41
|
+
"been retried by Rails. Leaving #{job_msg} in the queue."
|
42
|
+
)
|
43
|
+
else
|
44
|
+
message.delete
|
47
45
|
end
|
48
46
|
end
|
49
47
|
end
|
@@ -39,8 +39,8 @@ module Aws
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def self.to_message_attributes(record)
|
42
|
-
record['messageAttributes'].
|
43
|
-
|
42
|
+
record['messageAttributes'].transform_values do |value|
|
43
|
+
{
|
44
44
|
string_value: value['stringValue'],
|
45
45
|
binary_value: value['binaryValue'],
|
46
46
|
string_list_values: ['stringListValues'],
|
@@ -53,12 +53,10 @@ module AwsRecord
|
|
53
53
|
|
54
54
|
def parse_attributes!
|
55
55
|
self.attributes = (attributes || []).map do |attr|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
next
|
61
|
-
end
|
56
|
+
GeneratedAttribute.parse(attr)
|
57
|
+
rescue ArgumentError => e
|
58
|
+
@parse_errors << e
|
59
|
+
next
|
62
60
|
end
|
63
61
|
self.attributes = attributes.compact
|
64
62
|
|
@@ -167,28 +165,26 @@ module AwsRecord
|
|
167
165
|
|
168
166
|
def parse_gsis!
|
169
167
|
@gsis = (options['gsi'] || []).map do |raw_idx|
|
170
|
-
|
171
|
-
|
168
|
+
idx = SecondaryIndex.parse(raw_idx)
|
169
|
+
|
170
|
+
attributes = self.attributes.select { |attr| attr.name == idx.hash_key }
|
171
|
+
if attributes.empty?
|
172
|
+
@parse_errors << ArgumentError.new("Could not find attribute #{idx.hash_key} for gsi #{idx.name} hkey")
|
173
|
+
next
|
174
|
+
end
|
172
175
|
|
173
|
-
|
176
|
+
if idx.range_key
|
177
|
+
attributes = self.attributes.select { |attr| attr.name == idx.range_key }
|
174
178
|
if attributes.empty?
|
175
|
-
@parse_errors << ArgumentError.new("Could not find attribute #{idx.
|
179
|
+
@parse_errors << ArgumentError.new("Could not find attribute #{idx.range_key} for gsi #{idx.name} rkey")
|
176
180
|
next
|
177
181
|
end
|
178
|
-
|
179
|
-
if idx.range_key
|
180
|
-
attributes = self.attributes.select { |attr| attr.name == idx.range_key }
|
181
|
-
if attributes.empty?
|
182
|
-
@parse_errors << ArgumentError.new("Could not find attribute #{idx.range_key} for gsi #{idx.name} rkey")
|
183
|
-
next
|
184
|
-
end
|
185
|
-
end
|
186
|
-
|
187
|
-
idx
|
188
|
-
rescue ArgumentError => e
|
189
|
-
@parse_errors << e
|
190
|
-
next
|
191
182
|
end
|
183
|
+
|
184
|
+
idx
|
185
|
+
rescue ArgumentError => e
|
186
|
+
@parse_errors << e
|
187
|
+
next
|
192
188
|
end
|
193
189
|
|
194
190
|
@gsis = @gsis.compact
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-record
|
@@ -191,14 +191,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
191
191
|
requirements:
|
192
192
|
- - ">="
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: '2.
|
194
|
+
version: '2.5'
|
195
195
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
196
196
|
requirements:
|
197
197
|
- - ">="
|
198
198
|
- !ruby/object:Gem::Version
|
199
199
|
version: '0'
|
200
200
|
requirements: []
|
201
|
-
rubygems_version: 3.4.
|
201
|
+
rubygems_version: 3.4.22
|
202
202
|
signing_key:
|
203
203
|
specification_version: 4
|
204
204
|
summary: AWS SDK for Ruby on Rails Plugin
|