aws-sdk-rails 3.6.1 → 3.6.2

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: 839c723ba30e8acd11e135351278a0422b4f7e6a09a364b8a3fda7d33aa2e899
4
- data.tar.gz: af1ba6b6525f17e6a46cc16aa4ccbaaf8317860ddf5cd6128d3883c82660ee24
3
+ metadata.gz: 6dcc9e1a5e3c78d6952327013a71e7e1b2516025c9191eafde4751154854b494
4
+ data.tar.gz: 51eb886b4149c80f585b2ee358a14def1f4c96ab08da36545330518b47442eb5
5
5
  SHA512:
6
- metadata.gz: 8288a0c8551bc30cac782c7510a825fdcd9d8ba31bd1d2feda8c2a20ad29f569194237f686f191f1a57ee12eb91a08bb1c5b65b07519af5b62bd7f56ab3f79cb
7
- data.tar.gz: d6835fc12e6a4a5bc9573b4c5b997a1df5d17e49c28ea2ea16e76f8ebc7b2c8c515026b0a48fb0b15eaab3ba22f1904782f553a03a784dcd665d71723ddd47bd
6
+ metadata.gz: 6b2a91990771c25123f531e82dc4bc67d6c27c6866ccc219b765eefc38181321f5871f9b9f23189bf8a603a513756e25eb70a47f76858f59a8762798f44e301a
7
+ data.tar.gz: a336bdcd1e91d0b21df76f8fde5382d1792491e611be00804ac2f03a1a64eaa656295ab6e13675201d79aeb710f91bff955dcbd7b846faeb884dbbd2e64e15c4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.6.1
1
+ 3.6.2
@@ -1,4 +1,5 @@
1
1
  require 'aws-sessionstore-dynamodb'
2
+ require 'action_dispatch/middleware/session/abstract_store'
2
3
 
3
4
  module ActionDispatch
4
5
  module Session
@@ -9,11 +10,14 @@ module ActionDispatch
9
10
  # This class will use the Rails secret_key_base unless otherwise provided.
10
11
  #
11
12
  # Configuration can also be provided in YAML files from Rails config, either
12
- # in "config/session_store.yml" or "config/session_store/#{Rails.env}.yml".
13
+ # in "config/session_store.yml" or "config/session_store/#\\{Rails.env}.yml".
13
14
  # Configuration files that are environment-specific will take precedence.
14
15
  #
15
16
  # @see https://docs.aws.amazon.com/sdk-for-ruby/aws-sessionstore-dynamodb/api/Aws/SessionStore/DynamoDB/Configuration.html
16
17
  class DynamodbStore < Aws::SessionStore::DynamoDB::RackMiddleware
18
+ include StaleSessionCheck
19
+ include SessionObject
20
+
17
21
  def initialize(app, options = {})
18
22
  options[:config_file] ||= config_file if config_file.exist?
19
23
  options[:secret_key] ||= Rails.application.secret_key_base
@@ -30,13 +30,15 @@ module ActiveJob
30
30
  # job_id is unique per initialization of job
31
31
  # Remove it from message dup id to ensure run-once behavior
32
32
  # with ActiveJob retries
33
- send_message_opts[:message_deduplication_id] =
34
- Digest::SHA256.hexdigest(
35
- Aws::Json.dump(body.except('job_id'))
36
- )
33
+ send_message_opts[:message_deduplication_id] =
34
+ Digest::SHA256.hexdigest(Aws::Json.dump(body.except('job_id')))
37
35
 
38
- send_message_opts[:message_group_id] = Aws::Rails::SqsActiveJob.config.message_group_id
36
+ message_group_id = job.message_group_id if job.respond_to?(:message_group_id)
37
+ message_group_id ||= Aws::Rails::SqsActiveJob.config.message_group_id
38
+
39
+ send_message_opts[:message_group_id] = message_group_id
39
40
  end
41
+
40
42
  Aws::Rails::SqsActiveJob.config.client.send_message(send_message_opts)
41
43
  end
42
44
 
@@ -11,7 +11,7 @@ module Aws
11
11
 
12
12
  def initialize(app)
13
13
  @app = app
14
- @logger = ActiveSupport::Logger.new(STDOUT)
14
+ @logger = ::Rails.logger
15
15
  end
16
16
 
17
17
  def call(env)
@@ -20,7 +20,7 @@ module Aws
20
20
  # Pass through unless user agent is the SQS Daemon
21
21
  return @app.call(env) unless from_sqs_daemon?(request)
22
22
 
23
- @logger.debug('aws-rails-sdk middleware detected call from Elastic Beanstalk SQS Daemon.')
23
+ @logger.debug('aws-sdk-rails middleware detected call from Elastic Beanstalk SQS Daemon.')
24
24
 
25
25
  # Only accept requests from this user agent if it is from localhost or a docker host in case of forgery.
26
26
  unless request.local? || sent_from_docker_host?(request)
@@ -9,11 +9,11 @@ module AwsRecord
9
9
  end
10
10
 
11
11
  def create_model
12
- template "model.rb", File.join("app/models", class_path, "#{file_name}.rb")
12
+ template "model.erb", File.join("app/models", class_path, "#{file_name}.rb")
13
13
  end
14
14
 
15
15
  def create_table_config
16
- template "table_config.rb", File.join("db/table_config", class_path, "#{file_name}_config.rb") if options["table_config"]
16
+ template "table_config.erb", File.join("db/table_config", class_path, "#{file_name}_config.rb") if options["table_config"]
17
17
  end
18
18
 
19
19
  end
@@ -18,7 +18,7 @@ module DynamoDb
18
18
  # of a DynamoDB session table.
19
19
  def generate_migration_file
20
20
  migration_template(
21
- 'session_store_migration.rb',
21
+ 'session_store_migration.erb',
22
22
  "db/migrate/#{name.underscore}.rb"
23
23
  )
24
24
  end
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.6.1
4
+ version: 3.6.2
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: 2021-06-08 00:00:00.000000000 Z
11
+ date: 2022-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-record
@@ -136,13 +136,13 @@ files:
136
136
  - lib/generators/aws_record/generated_attribute.rb
137
137
  - lib/generators/aws_record/model/USAGE
138
138
  - lib/generators/aws_record/model/model_generator.rb
139
- - lib/generators/aws_record/model/templates/model.rb
140
- - lib/generators/aws_record/model/templates/table_config.rb
139
+ - lib/generators/aws_record/model/templates/model.erb
140
+ - lib/generators/aws_record/model/templates/table_config.erb
141
141
  - lib/generators/aws_record/secondary_index.rb
142
142
  - lib/generators/dynamo_db/session_store_migration/USAGE
143
143
  - lib/generators/dynamo_db/session_store_migration/session_store_migration_generator.rb
144
144
  - lib/generators/dynamo_db/session_store_migration/templates/dynamo_db_session_store.yml
145
- - lib/generators/dynamo_db/session_store_migration/templates/session_store_migration.rb
145
+ - lib/generators/dynamo_db/session_store_migration/templates/session_store_migration.erb
146
146
  - lib/tasks/aws_record/migrate.rake
147
147
  - lib/tasks/dynamo_db/session_store.rake
148
148
  homepage: https://github.com/aws/aws-sdk-rails
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  - !ruby/object:Gem::Version
165
165
  version: '0'
166
166
  requirements: []
167
- rubygems_version: 3.2.3
167
+ rubygems_version: 3.2.7
168
168
  signing_key:
169
169
  specification_version: 4
170
170
  summary: AWS SDK for Ruby on Rails Plugin