active_elastic_job 3.0.0.alpha → 3.0.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: 4fa6153074f7ae6a834972d070137734873cafdf2fe4807ead1a838ca9d497cf
|
4
|
+
data.tar.gz: e1b5905ce2c23f3d11a795883e8ee7be8be9c60fd391af4c76a2c252b99c6a4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32dfb859495c2658137eb010c4e58e8be5872e8be54a6e245852157beefb2ce1bf542a350d263b9b493d70ce0a4d5f26d935a14e325f6eabd9c6f75bb2ce5d24
|
7
|
+
data.tar.gz: 2a44d66bef9a7903abb96c2d2ca899465cf8cd34ea770eb96cab20ccccffa4ee60360cbca2f7ceba0f9ff31709cc890d37fc219de11beda451df1f9e49016ffe
|
@@ -47,7 +47,7 @@ module ActiveElasticJob
|
|
47
47
|
rescue ActiveElasticJob::MessageVerifier::InvalidDigest => e
|
48
48
|
return FORBIDDEN_RESPONSE
|
49
49
|
end
|
50
|
-
return OK_RESPONSE
|
50
|
+
return OK_RESPONSE
|
51
51
|
end
|
52
52
|
end
|
53
53
|
@app.call(env)
|
@@ -118,11 +118,15 @@ module ActiveElasticJob
|
|
118
118
|
end
|
119
119
|
|
120
120
|
def sent_from_docker_host?(request)
|
121
|
-
app_runs_in_docker_container? && request
|
121
|
+
app_runs_in_docker_container? && ip_originates_from_docker?(request)
|
122
|
+
end
|
123
|
+
|
124
|
+
def ip_originates_from_docker?(request)
|
125
|
+
(request.remote_ip =~ DOCKER_HOST_IP).present? or (request.remote_addr =~ DOCKER_HOST_IP).present?
|
122
126
|
end
|
123
127
|
|
124
128
|
def app_runs_in_docker_container?
|
125
|
-
|
129
|
+
(`[ -f /proc/1/cgroup ] && cat /proc/1/cgroup` =~ /(ecs|docker)/).present?
|
126
130
|
end
|
127
131
|
end
|
128
132
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_elastic_job
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tawan Sierek
|
8
8
|
- Joey Paris
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-02-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk-sqs
|
@@ -207,7 +207,7 @@ homepage: https://github.com/active-elastic-job/active-elastic-job
|
|
207
207
|
licenses:
|
208
208
|
- MIT
|
209
209
|
metadata: {}
|
210
|
-
post_install_message:
|
210
|
+
post_install_message:
|
211
211
|
rdoc_options: []
|
212
212
|
require_paths:
|
213
213
|
- lib
|
@@ -218,12 +218,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
218
218
|
version: '2.5'
|
219
219
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
220
220
|
requirements:
|
221
|
-
- - "
|
221
|
+
- - ">="
|
222
222
|
- !ruby/object:Gem::Version
|
223
|
-
version:
|
223
|
+
version: '0'
|
224
224
|
requirements: []
|
225
225
|
rubygems_version: 3.1.2
|
226
|
-
signing_key:
|
226
|
+
signing_key:
|
227
227
|
specification_version: 4
|
228
228
|
summary: Active Elastic Job is a simple to use Active Job backend for Rails applications
|
229
229
|
deployed on the Amazon Elastic Beanstalk platform.
|