active_elastic_job 1.4.3 → 1.4.4

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
  SHA1:
3
- metadata.gz: e235c668ed6b4cc4d6b462061c0e63d8786f4a90
4
- data.tar.gz: a54b85273c167cb0abeed10739fe82533a7251ef
3
+ metadata.gz: a6b7c54fdcbabb34214e4b940dbfd798fd133128
4
+ data.tar.gz: f4c7b2667b760e1691e629f62140d5ca91d79853
5
5
  SHA512:
6
- metadata.gz: ad76b1050b01e79f40116296cbc9f146a7d354551b61b1aa8b953546f45f733c9d349ed0ea0d4589e2abc327cb005356fbb9000ca2c822d361fb7dcc04fbd099
7
- data.tar.gz: 59ffc700b728075af2e670cae7a07acf2dee007d43e4283dbfcd895ab6277874d7ea55a09dbf2182302141d75b8ec896e53c18b084e9e8b989e0b0e84291ac34
6
+ metadata.gz: 2534e2ceea1616dce0f359facac6de3a7af43797accbd3df18f8d469abb959ed4521e01d773310059395b71b96b898aa9ff190e0af1c6c6137306239821655b3
7
+ data.tar.gz: 08abba9af61fbb9fb3337f0718a6bd3045c036e873c221143381ec41df9aae6d87ca2619d82baca3062c97645630d02ea146c0d3bca139c865ac648fbb900bf4
@@ -60,7 +60,9 @@ module ActiveElasticJob
60
60
  secret_key_base = Rails.application.secrets[:secret_key_base]
61
61
  @verifier ||= ActiveElasticJob::MessageVerifier.new(secret_key_base)
62
62
  digest = request.headers[DIGEST_HEADER_NAME]
63
- @verifier.verify!(request.body.string, digest)
63
+ message = request.body_stream.read
64
+ request.body_stream.rewind
65
+ @verifier.verify!(message, digest)
64
66
  end
65
67
 
66
68
  def aws_sqsd?(request)
@@ -3,7 +3,11 @@ module ActiveElasticJob
3
3
  initializer "active_elastic_job.insert_middleware" do |app|
4
4
  disabled = ENV['DISABLE_SQS_CONSUMER']
5
5
  if disabled == 'false' || disabled.nil?
6
- app.config.middleware.use "ActiveElasticJob::Rack::SqsMessageConsumer"
6
+ if app.config.force_ssl
7
+ app.config.middleware.insert_before("ActionDispatch::SSL","ActiveElasticJob::Rack::SqsMessageConsumer")
8
+ else
9
+ app.config.middleware.use("ActiveElasticJob::Rack::SqsMessageConsumer")
10
+ end
7
11
  end
8
12
  end
9
13
  end
@@ -2,7 +2,7 @@ module ActiveElasticJob
2
2
  module VERSION
3
3
  MAJOR = 1
4
4
  MINOR = 4
5
- TINY = 3
5
+ TINY = 4
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_elastic_job
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tawan Sierek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-06 00:00:00.000000000 Z
11
+ date: 2016-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk