aws-sessionstore-dynamodb 2.2.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/LICENSE +172 -9
- data/VERSION +1 -1
- data/lib/aws/session_store/dynamo_db/configuration.rb +134 -208
- data/lib/aws/session_store/dynamo_db/errors/base_handler.rb +5 -3
- data/lib/aws/session_store/dynamo_db/errors/default_handler.rb +13 -12
- data/lib/aws/session_store/dynamo_db/errors.rb +27 -0
- data/lib/aws/session_store/dynamo_db/garbage_collection.rb +85 -93
- data/lib/aws/session_store/dynamo_db/locking/base.rb +31 -32
- data/lib/aws/session_store/dynamo_db/locking/null.rb +4 -3
- data/lib/aws/session_store/dynamo_db/locking/pessimistic.rb +32 -20
- data/lib/aws/session_store/dynamo_db/locking.rb +10 -0
- data/lib/aws/session_store/dynamo_db/rack_middleware.rb +45 -49
- data/lib/aws/session_store/dynamo_db/table.rb +64 -67
- data/lib/aws-sessionstore-dynamodb.rb +12 -14
- metadata +25 -70
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -6
- data/.github/workflows/ci.yml +0 -39
- data/.gitignore +0 -12
- data/.gitmodules +0 -3
- data/.yardopts +0 -4
- data/CODE_OF_CONDUCT.md +0 -4
- data/CONTRIBUTING.md +0 -61
- data/Gemfile +0 -24
- data/README.md +0 -125
- data/Rakefile +0 -35
- data/aws-sessionstore-dynamodb.gemspec +0 -24
- data/doc-src/templates/default/layout/html/footer.erb +0 -6
- data/doc-src/templates/default/layout/html/layout.erb +0 -31
- data/lib/aws/session_store/dynamo_db/invalid_id_error.rb +0 -7
- data/lib/aws/session_store/dynamo_db/lock_wait_timeout_error.rb +0 -7
- data/lib/aws/session_store/dynamo_db/missing_secret_key_error.rb +0 -7
- data/lib/aws/session_store/dynamo_db/version.rb +0 -7
- data/spec/aws/session_store/dynamo_db/app_config.yml +0 -16
- data/spec/aws/session_store/dynamo_db/configuration_spec.rb +0 -81
- data/spec/aws/session_store/dynamo_db/error/default_error_handler_spec.rb +0 -64
- data/spec/aws/session_store/dynamo_db/garbage_collection_spec.rb +0 -158
- data/spec/aws/session_store/dynamo_db/locking/threaded_sessions_spec.rb +0 -96
- data/spec/aws/session_store/dynamo_db/rack_middleware_database_spec.rb +0 -130
- data/spec/aws/session_store/dynamo_db/rack_middleware_spec.rb +0 -148
- data/spec/aws/session_store/dynamo_db/table_spec.rb +0 -48
- data/spec/spec_helper.rb +0 -65
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rack/session/abstract/id'
|
2
4
|
require 'openssl'
|
3
5
|
require 'aws-sdk-dynamodb'
|
@@ -6,55 +8,29 @@ module Aws::SessionStore::DynamoDB
|
|
6
8
|
# This class is an ID based Session Store Rack Middleware
|
7
9
|
# that uses a DynamoDB backend for session storage.
|
8
10
|
class RackMiddleware < Rack::Session::Abstract::Persisted
|
9
|
-
# @return [Configuration] An instance of Configuration that is used for
|
10
|
-
# this middleware.
|
11
|
-
attr_reader :config
|
12
|
-
|
13
11
|
# Initializes SessionStore middleware.
|
14
12
|
#
|
15
13
|
# @param app Rack application.
|
16
14
|
# @option (see Configuration#initialize)
|
17
|
-
# @raise [Aws::DynamoDB::Errors::ResourceNotFoundException] If valid table
|
18
|
-
#
|
19
|
-
# @raise [Aws::SessionStore::DynamoDB::MissingSecretKey] If secret key is
|
20
|
-
# not provided.
|
15
|
+
# @raise [Aws::DynamoDB::Errors::ResourceNotFoundException] If a valid table name is not provided.
|
16
|
+
# @raise [Aws::SessionStore::DynamoDB::MissingSecretKey] If a secret key is not provided.
|
21
17
|
def initialize(app, options = {})
|
22
18
|
super
|
23
19
|
@config = Configuration.new(options)
|
20
|
+
validate_config
|
24
21
|
set_locking_strategy
|
25
22
|
end
|
26
23
|
|
27
|
-
|
28
|
-
|
29
|
-
# Sets locking strategy for session handler
|
30
|
-
#
|
31
|
-
# @return [Locking::Null] If locking is not enabled.
|
32
|
-
# @return [Locking::Pessimistic] If locking is enabled.
|
33
|
-
def set_locking_strategy
|
34
|
-
if @config.enable_locking
|
35
|
-
@lock = Aws::SessionStore::DynamoDB::Locking::Pessimistic.new(@config)
|
36
|
-
else
|
37
|
-
@lock = Aws::SessionStore::DynamoDB::Locking::Null.new(@config)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
# Determines if the correct session table name is being used for
|
42
|
-
# this application. Also tests existence of secret key.
|
24
|
+
# Get session from the database or create a new session.
|
43
25
|
#
|
44
|
-
# @raise [Aws::DynamoDB::Errors::
|
45
|
-
#
|
46
|
-
def validate_config
|
47
|
-
raise MissingSecretKeyError unless @config.secret_key
|
48
|
-
end
|
49
|
-
|
50
|
-
# Gets session data.
|
26
|
+
# @raise [Aws::SessionStore::DynamoDB::Errors::LockWaitTimeoutError] If the session
|
27
|
+
# has waited too long to obtain lock.
|
51
28
|
def find_session(req, sid)
|
52
|
-
validate_config
|
53
29
|
case verify_hmac(sid)
|
54
30
|
when nil
|
55
31
|
set_new_session_properties(req.env)
|
56
32
|
when false
|
57
|
-
handle_error { raise InvalidIDError }
|
33
|
+
handle_error { raise Errors::InvalidIDError }
|
58
34
|
set_new_session_properties(req.env)
|
59
35
|
else
|
60
36
|
data = @lock.get_session_data(req.env, sid)
|
@@ -62,11 +38,6 @@ module Aws::SessionStore::DynamoDB
|
|
62
38
|
end
|
63
39
|
end
|
64
40
|
|
65
|
-
def set_new_session_properties(env)
|
66
|
-
env['dynamo_db.new_session'] = 'true'
|
67
|
-
[generate_sid, {}]
|
68
|
-
end
|
69
|
-
|
70
41
|
# Sets the session in the database after packing data.
|
71
42
|
#
|
72
43
|
# @return [Hash] If session has been saved.
|
@@ -83,27 +54,50 @@ module Aws::SessionStore::DynamoDB
|
|
83
54
|
generate_sid unless options[:drop]
|
84
55
|
end
|
85
56
|
|
57
|
+
# @return [Configuration] An instance of Configuration that is used for
|
58
|
+
# this middleware.
|
59
|
+
attr_reader :config
|
60
|
+
|
61
|
+
private
|
62
|
+
|
63
|
+
def set_locking_strategy
|
64
|
+
@lock =
|
65
|
+
if @config.enable_locking
|
66
|
+
Aws::SessionStore::DynamoDB::Locking::Pessimistic.new(@config)
|
67
|
+
else
|
68
|
+
Aws::SessionStore::DynamoDB::Locking::Null.new(@config)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def validate_config
|
73
|
+
raise Errors::MissingSecretKeyError unless @config.secret_key
|
74
|
+
end
|
75
|
+
|
76
|
+
# Sets new session properties.
|
77
|
+
def set_new_session_properties(env)
|
78
|
+
env['dynamo_db.new_session'] = 'true'
|
79
|
+
[generate_sid, {}]
|
80
|
+
end
|
81
|
+
|
86
82
|
# Each database operation is placed in this rescue wrapper.
|
87
83
|
# This wrapper will call the method, rescue any exceptions and then pass
|
88
84
|
# exceptions to the configured session handler.
|
89
|
-
def handle_error(env = nil
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
@config.error_handler.handle_error(e, env)
|
95
|
-
end
|
85
|
+
def handle_error(env = nil)
|
86
|
+
yield
|
87
|
+
rescue Aws::DynamoDB::Errors::Base,
|
88
|
+
Aws::SessionStore::DynamoDB::Errors::InvalidIDError => e
|
89
|
+
@config.error_handler.handle_error(e, env)
|
96
90
|
end
|
97
91
|
|
98
92
|
# Generate HMAC hash based on MD5
|
99
93
|
def generate_hmac(sid, secret)
|
100
|
-
OpenSSL::HMAC.hexdigest(OpenSSL::Digest
|
94
|
+
OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('MD5'), secret, sid).strip
|
101
95
|
end
|
102
96
|
|
103
97
|
# Generate sid with HMAC hash
|
104
98
|
def generate_sid(secure = @sid_secure)
|
105
|
-
sid = super
|
106
|
-
|
99
|
+
sid = super
|
100
|
+
"#{generate_hmac(sid, @config.secret_key)}--" + sid
|
107
101
|
end
|
108
102
|
|
109
103
|
# Verify digest of HMACed hash
|
@@ -112,8 +106,10 @@ module Aws::SessionStore::DynamoDB
|
|
112
106
|
# @return [false] If the HMAC id has been corrupted.
|
113
107
|
def verify_hmac(sid)
|
114
108
|
return unless sid
|
115
|
-
|
109
|
+
|
110
|
+
digest, ver_sid = sid.split('--')
|
116
111
|
return false unless ver_sid
|
112
|
+
|
117
113
|
digest == generate_hmac(ver_sid, @config.secret_key)
|
118
114
|
end
|
119
115
|
end
|
@@ -1,85 +1,82 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'aws-sdk-dynamodb'
|
2
4
|
require 'logger'
|
3
5
|
|
4
6
|
module Aws::SessionStore::DynamoDB
|
5
|
-
# This
|
7
|
+
# This module provides a way to create and delete a session table.
|
6
8
|
module Table
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
logger << "Table #{config.table_name} is now ready to use.\n"
|
20
|
-
rescue Aws::DynamoDB::Errors::ResourceInUseException
|
21
|
-
logger << "Table #{config.table_name} already exists, skipping creation.\n"
|
22
|
-
end
|
9
|
+
class << self
|
10
|
+
# Creates a session table.
|
11
|
+
# @option (see Configuration#initialize)
|
12
|
+
def create_table(options = {})
|
13
|
+
config = load_config(options)
|
14
|
+
config.dynamo_db_client.create_table(create_opts(config))
|
15
|
+
logger.info "Table #{config.table_name} created, waiting for activation..."
|
16
|
+
config.dynamo_db_client.wait_until(:table_exists, table_name: config.table_name)
|
17
|
+
logger.info "Table #{config.table_name} is now ready to use."
|
18
|
+
rescue Aws::DynamoDB::Errors::ResourceInUseException
|
19
|
+
logger.warn "Table #{config.table_name} already exists, skipping creation."
|
20
|
+
end
|
23
21
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
22
|
+
# Deletes a session table.
|
23
|
+
# @option (see Configuration#initialize)
|
24
|
+
def delete_table(options = {})
|
25
|
+
config = load_config(options)
|
26
|
+
config.dynamo_db_client.delete_table(table_name: config.table_name)
|
27
|
+
config.dynamo_db_client.wait_until(:table_not_exists, table_name: config.table_name)
|
28
|
+
logger.info "Table #{config.table_name} deleted."
|
29
|
+
end
|
30
30
|
|
31
|
-
|
32
|
-
def logger
|
33
|
-
@logger ||= Logger.new($STDOUT)
|
34
|
-
end
|
31
|
+
private
|
35
32
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
def load_config(options = {})
|
40
|
-
Aws::SessionStore::DynamoDB::Configuration.new(options)
|
41
|
-
end
|
33
|
+
def logger
|
34
|
+
@logger ||= Logger.new($stdout)
|
35
|
+
end
|
42
36
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
end
|
37
|
+
# Loads configuration options.
|
38
|
+
# @option (see Configuration#initialize)
|
39
|
+
def load_config(options = {})
|
40
|
+
Aws::SessionStore::DynamoDB::Configuration.new(options)
|
41
|
+
end
|
49
42
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
:key_schema => [ {:attribute_name => hash_key, :key_type => 'HASH'} ]
|
56
|
-
}
|
57
|
-
end
|
43
|
+
def create_opts(config)
|
44
|
+
properties(config.table_name, config.table_key).merge(
|
45
|
+
throughput(config.read_capacity, config.write_capacity)
|
46
|
+
)
|
47
|
+
end
|
58
48
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
{ :provisioned_throughput => units }
|
64
|
-
end
|
49
|
+
# @return Properties for the session table.
|
50
|
+
def properties(table_name, hash_key)
|
51
|
+
attributes(hash_key).merge(schema(table_name, hash_key))
|
52
|
+
end
|
65
53
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
54
|
+
# @return [Hash] Attribute settings for creating the session table.
|
55
|
+
def attributes(hash_key)
|
56
|
+
{
|
57
|
+
attribute_definitions: [
|
58
|
+
{ attribute_name: hash_key, attribute_type: 'S' }
|
59
|
+
]
|
60
|
+
}
|
61
|
+
end
|
71
62
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
63
|
+
# @return Schema values for the session table.
|
64
|
+
def schema(table_name, hash_key)
|
65
|
+
{
|
66
|
+
table_name: table_name,
|
67
|
+
key_schema: [{ attribute_name: hash_key, key_type: 'HASH' }]
|
68
|
+
}
|
69
|
+
end
|
79
70
|
|
80
|
-
|
71
|
+
# @return Throughput for the session table.
|
72
|
+
def throughput(read, write)
|
73
|
+
{
|
74
|
+
provisioned_throughput: {
|
75
|
+
read_capacity_units: read,
|
76
|
+
write_capacity_units: write
|
77
|
+
}
|
78
|
+
}
|
81
79
|
end
|
82
80
|
end
|
83
|
-
|
84
81
|
end
|
85
82
|
end
|
@@ -1,19 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Aws
|
2
4
|
module SessionStore
|
3
|
-
|
5
|
+
# Namespace for DynamoDB rack session storage.
|
6
|
+
module DynamoDB
|
7
|
+
VERSION = File.read(File.expand_path('../VERSION', __dir__)).strip
|
8
|
+
end
|
4
9
|
end
|
5
10
|
end
|
6
11
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
require 'aws/session_store/dynamo_db/garbage_collection'
|
14
|
-
require 'aws/session_store/dynamo_db/locking/base'
|
15
|
-
require 'aws/session_store/dynamo_db/locking/null'
|
16
|
-
require 'aws/session_store/dynamo_db/locking/pessimistic'
|
17
|
-
require 'aws/session_store/dynamo_db/rack_middleware'
|
18
|
-
require 'aws/session_store/dynamo_db/table'
|
19
|
-
require 'aws/session_store/dynamo_db/version'
|
12
|
+
require_relative 'aws/session_store/dynamo_db/configuration'
|
13
|
+
require_relative 'aws/session_store/dynamo_db/errors'
|
14
|
+
require_relative 'aws/session_store/dynamo_db/garbage_collection'
|
15
|
+
require_relative 'aws/session_store/dynamo_db/locking'
|
16
|
+
require_relative 'aws/session_store/dynamo_db/rack_middleware'
|
17
|
+
require_relative 'aws/session_store/dynamo_db/table'
|
metadata
CHANGED
@@ -1,124 +1,89 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sessionstore-dynamodb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.1
|
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-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rack
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 1.85.0
|
19
|
+
version: '3'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 1.85.0
|
26
|
+
version: '3'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
|
-
name: rack
|
28
|
+
name: rack-session
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
36
30
|
requirements:
|
37
|
-
- - "
|
31
|
+
- - "~>"
|
38
32
|
- !ruby/object:Gem::Version
|
39
33
|
version: '2'
|
40
|
-
- - "<"
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: '4'
|
43
34
|
type: :runtime
|
44
35
|
prerelease: false
|
45
36
|
version_requirements: !ruby/object:Gem::Requirement
|
46
37
|
requirements:
|
47
|
-
- - "
|
38
|
+
- - "~>"
|
48
39
|
- !ruby/object:Gem::Version
|
49
40
|
version: '2'
|
50
|
-
- - "<"
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: '4'
|
53
41
|
- !ruby/object:Gem::Dependency
|
54
|
-
name:
|
42
|
+
name: aws-sdk-dynamodb
|
55
43
|
requirement: !ruby/object:Gem::Requirement
|
56
44
|
requirements:
|
57
|
-
- - "
|
45
|
+
- - "~>"
|
58
46
|
- !ruby/object:Gem::Version
|
59
47
|
version: '1'
|
60
|
-
- - "
|
48
|
+
- - ">="
|
61
49
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
50
|
+
version: 1.85.0
|
63
51
|
type: :runtime
|
64
52
|
prerelease: false
|
65
53
|
version_requirements: !ruby/object:Gem::Requirement
|
66
54
|
requirements:
|
67
|
-
- - "
|
55
|
+
- - "~>"
|
68
56
|
- !ruby/object:Gem::Version
|
69
57
|
version: '1'
|
70
|
-
- - "
|
58
|
+
- - ">="
|
71
59
|
- !ruby/object:Gem::Version
|
72
|
-
version:
|
73
|
-
description:
|
60
|
+
version: 1.85.0
|
61
|
+
description: The Amazon DynamoDB Session Store handles sessions for Rack web applications
|
62
|
+
using a DynamoDB backend.
|
74
63
|
email:
|
75
64
|
- aws-dr-rubygems@amazon.com
|
76
65
|
executables: []
|
77
66
|
extensions: []
|
78
67
|
extra_rdoc_files: []
|
79
68
|
files:
|
80
|
-
- ".github/PULL_REQUEST_TEMPLATE.md"
|
81
|
-
- ".github/workflows/ci.yml"
|
82
|
-
- ".gitignore"
|
83
|
-
- ".gitmodules"
|
84
|
-
- ".yardopts"
|
85
69
|
- CHANGELOG.md
|
86
|
-
- CODE_OF_CONDUCT.md
|
87
|
-
- CONTRIBUTING.md
|
88
|
-
- Gemfile
|
89
70
|
- LICENSE
|
90
|
-
- README.md
|
91
|
-
- Rakefile
|
92
71
|
- VERSION
|
93
|
-
- aws-sessionstore-dynamodb.gemspec
|
94
|
-
- doc-src/templates/default/layout/html/footer.erb
|
95
|
-
- doc-src/templates/default/layout/html/layout.erb
|
96
72
|
- lib/aws-sessionstore-dynamodb.rb
|
97
73
|
- lib/aws/session_store/dynamo_db/configuration.rb
|
74
|
+
- lib/aws/session_store/dynamo_db/errors.rb
|
98
75
|
- lib/aws/session_store/dynamo_db/errors/base_handler.rb
|
99
76
|
- lib/aws/session_store/dynamo_db/errors/default_handler.rb
|
100
77
|
- lib/aws/session_store/dynamo_db/garbage_collection.rb
|
101
|
-
- lib/aws/session_store/dynamo_db/
|
102
|
-
- lib/aws/session_store/dynamo_db/lock_wait_timeout_error.rb
|
78
|
+
- lib/aws/session_store/dynamo_db/locking.rb
|
103
79
|
- lib/aws/session_store/dynamo_db/locking/base.rb
|
104
80
|
- lib/aws/session_store/dynamo_db/locking/null.rb
|
105
81
|
- lib/aws/session_store/dynamo_db/locking/pessimistic.rb
|
106
|
-
- lib/aws/session_store/dynamo_db/missing_secret_key_error.rb
|
107
82
|
- lib/aws/session_store/dynamo_db/rack_middleware.rb
|
108
83
|
- lib/aws/session_store/dynamo_db/table.rb
|
109
|
-
|
110
|
-
- spec/aws/session_store/dynamo_db/app_config.yml
|
111
|
-
- spec/aws/session_store/dynamo_db/configuration_spec.rb
|
112
|
-
- spec/aws/session_store/dynamo_db/error/default_error_handler_spec.rb
|
113
|
-
- spec/aws/session_store/dynamo_db/garbage_collection_spec.rb
|
114
|
-
- spec/aws/session_store/dynamo_db/locking/threaded_sessions_spec.rb
|
115
|
-
- spec/aws/session_store/dynamo_db/rack_middleware_database_spec.rb
|
116
|
-
- spec/aws/session_store/dynamo_db/rack_middleware_spec.rb
|
117
|
-
- spec/aws/session_store/dynamo_db/table_spec.rb
|
118
|
-
- spec/spec_helper.rb
|
119
|
-
homepage: http://github.com/aws/aws-sessionstore-dynamodb-ruby
|
84
|
+
homepage: https://github.com/aws/aws-sessionstore-dynamodb-ruby
|
120
85
|
licenses:
|
121
|
-
- Apache
|
86
|
+
- Apache-2.0
|
122
87
|
metadata: {}
|
123
88
|
post_install_message:
|
124
89
|
rdoc_options: []
|
@@ -128,25 +93,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
128
93
|
requirements:
|
129
94
|
- - ">="
|
130
95
|
- !ruby/object:Gem::Version
|
131
|
-
version: '2.
|
96
|
+
version: '2.7'
|
132
97
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
98
|
requirements:
|
134
99
|
- - ">="
|
135
100
|
- !ruby/object:Gem::Version
|
136
101
|
version: '0'
|
137
102
|
requirements: []
|
138
|
-
rubygems_version: 3.5.
|
103
|
+
rubygems_version: 3.5.11
|
139
104
|
signing_key:
|
140
105
|
specification_version: 4
|
141
|
-
summary:
|
142
|
-
|
143
|
-
test_files:
|
144
|
-
- spec/aws/session_store/dynamo_db/app_config.yml
|
145
|
-
- spec/aws/session_store/dynamo_db/configuration_spec.rb
|
146
|
-
- spec/aws/session_store/dynamo_db/error/default_error_handler_spec.rb
|
147
|
-
- spec/aws/session_store/dynamo_db/garbage_collection_spec.rb
|
148
|
-
- spec/aws/session_store/dynamo_db/locking/threaded_sessions_spec.rb
|
149
|
-
- spec/aws/session_store/dynamo_db/rack_middleware_database_spec.rb
|
150
|
-
- spec/aws/session_store/dynamo_db/rack_middleware_spec.rb
|
151
|
-
- spec/aws/session_store/dynamo_db/table_spec.rb
|
152
|
-
- spec/spec_helper.rb
|
106
|
+
summary: Amazon DynamoDB Session Store for Rack web applications.
|
107
|
+
test_files: []
|
data/.github/workflows/ci.yml
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
name: CI
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- main
|
7
|
-
|
8
|
-
pull_request:
|
9
|
-
branches:
|
10
|
-
- main
|
11
|
-
|
12
|
-
jobs:
|
13
|
-
test:
|
14
|
-
runs-on: ubuntu-latest
|
15
|
-
strategy:
|
16
|
-
fail-fast: false
|
17
|
-
matrix:
|
18
|
-
ruby: [2.5, 2.6, 2.7, '3.0', 3.1, 3.2, 3.3, jruby-9.2, jruby-9.3, jruby-9.4]
|
19
|
-
env: [RACK2, RACK3]
|
20
|
-
|
21
|
-
steps:
|
22
|
-
- name: Setup Ruby
|
23
|
-
uses: ruby/setup-ruby@v1
|
24
|
-
with:
|
25
|
-
ruby-version: ${{ matrix.ruby }}
|
26
|
-
|
27
|
-
- uses: actions/checkout@v4
|
28
|
-
|
29
|
-
- name: Setup environment
|
30
|
-
run: |
|
31
|
-
echo "${{ matrix.env }}=1" >> $GITHUB_ENV
|
32
|
-
|
33
|
-
- name: Install gems
|
34
|
-
run: |
|
35
|
-
bundle config set --local without 'docs'
|
36
|
-
bundle install
|
37
|
-
|
38
|
-
- name: Tests
|
39
|
-
run: bundle exec rake spec
|
data/.gitignore
DELETED
data/.gitmodules
DELETED
data/.yardopts
DELETED
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,4 +0,0 @@
|
|
1
|
-
## Code of Conduct
|
2
|
-
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
|
3
|
-
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
|
4
|
-
opensource-codeofconduct@amazon.com with any additional questions or comments.
|
data/CONTRIBUTING.md
DELETED
@@ -1,61 +0,0 @@
|
|
1
|
-
# Contributing Guidelines
|
2
|
-
|
3
|
-
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
|
4
|
-
documentation, we greatly value feedback and contributions from our community.
|
5
|
-
|
6
|
-
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
|
7
|
-
information to effectively respond to your bug report or contribution.
|
8
|
-
|
9
|
-
|
10
|
-
## Reporting Bugs/Feature Requests
|
11
|
-
|
12
|
-
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
|
13
|
-
|
14
|
-
When filing an issue, please check [existing open](https://github.com/aws/aws-sessionstore-dynamodb-ruby/issues), or [recently closed](https://github.com/aws/aws-sessionstore-dynamodb-ruby/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
|
15
|
-
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
|
16
|
-
|
17
|
-
* A reproducible test case or series of steps
|
18
|
-
* The version of our code being used
|
19
|
-
* Any modifications you've made relevant to the bug
|
20
|
-
* Anything unusual about your environment or deployment
|
21
|
-
|
22
|
-
|
23
|
-
## Contributing via Pull Requests
|
24
|
-
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
|
25
|
-
|
26
|
-
1. You are working against the latest source on the *master* branch.
|
27
|
-
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
|
28
|
-
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
|
29
|
-
|
30
|
-
To send us a pull request, please:
|
31
|
-
|
32
|
-
1. Fork the repository.
|
33
|
-
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
|
34
|
-
3. Ensure local tests pass.
|
35
|
-
4. Commit to your fork using clear commit messages.
|
36
|
-
5. Send us a pull request, answering any default questions in the pull request interface.
|
37
|
-
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
|
38
|
-
|
39
|
-
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
|
40
|
-
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
|
41
|
-
|
42
|
-
|
43
|
-
## Finding contributions to work on
|
44
|
-
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels ((enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/aws/aws-sessionstore-dynamodb-ruby/labels/help%20wanted) issues is a great place to start.
|
45
|
-
|
46
|
-
|
47
|
-
## Code of Conduct
|
48
|
-
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
|
49
|
-
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
|
50
|
-
opensource-codeofconduct@amazon.com with any additional questions or comments.
|
51
|
-
|
52
|
-
|
53
|
-
## Security issue notifications
|
54
|
-
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
|
55
|
-
|
56
|
-
|
57
|
-
## Licensing
|
58
|
-
|
59
|
-
See the [LICENSE](https://github.com/aws/aws-sessionstore-dynamodb-ruby/blob/master/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
|
60
|
-
|
61
|
-
We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
|