aws-sessionstore-dynamodb 2.2.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/LICENSE.txt +202 -0
  4. data/VERSION +1 -1
  5. data/lib/aws/session_store/dynamo_db/configuration.rb +119 -204
  6. data/lib/aws/session_store/dynamo_db/errors/base_handler.rb +2 -0
  7. data/lib/aws/session_store/dynamo_db/errors/default_handler.rb +13 -12
  8. data/lib/aws/session_store/dynamo_db/errors.rb +27 -0
  9. data/lib/aws/session_store/dynamo_db/garbage_collection.rb +84 -93
  10. data/lib/aws/session_store/dynamo_db/locking/base.rb +31 -32
  11. data/lib/aws/session_store/dynamo_db/locking/null.rb +4 -3
  12. data/lib/aws/session_store/dynamo_db/locking/pessimistic.rb +32 -20
  13. data/lib/aws/session_store/dynamo_db/rack_middleware.rb +45 -49
  14. data/lib/aws/session_store/dynamo_db/table.rb +64 -67
  15. data/lib/aws-sessionstore-dynamodb.rb +14 -14
  16. metadata +18 -64
  17. data/.github/PULL_REQUEST_TEMPLATE.md +0 -6
  18. data/.github/workflows/ci.yml +0 -39
  19. data/.gitignore +0 -12
  20. data/.gitmodules +0 -3
  21. data/.yardopts +0 -4
  22. data/CODE_OF_CONDUCT.md +0 -4
  23. data/CONTRIBUTING.md +0 -61
  24. data/Gemfile +0 -24
  25. data/LICENSE +0 -12
  26. data/README.md +0 -125
  27. data/Rakefile +0 -35
  28. data/aws-sessionstore-dynamodb.gemspec +0 -24
  29. data/doc-src/templates/default/layout/html/footer.erb +0 -6
  30. data/doc-src/templates/default/layout/html/layout.erb +0 -31
  31. data/lib/aws/session_store/dynamo_db/invalid_id_error.rb +0 -7
  32. data/lib/aws/session_store/dynamo_db/lock_wait_timeout_error.rb +0 -7
  33. data/lib/aws/session_store/dynamo_db/missing_secret_key_error.rb +0 -7
  34. data/lib/aws/session_store/dynamo_db/version.rb +0 -7
  35. data/spec/aws/session_store/dynamo_db/app_config.yml +0 -16
  36. data/spec/aws/session_store/dynamo_db/configuration_spec.rb +0 -81
  37. data/spec/aws/session_store/dynamo_db/error/default_error_handler_spec.rb +0 -64
  38. data/spec/aws/session_store/dynamo_db/garbage_collection_spec.rb +0 -158
  39. data/spec/aws/session_store/dynamo_db/locking/threaded_sessions_spec.rb +0 -96
  40. data/spec/aws/session_store/dynamo_db/rack_middleware_database_spec.rb +0 -130
  41. data/spec/aws/session_store/dynamo_db/rack_middleware_spec.rb +0 -148
  42. data/spec/aws/session_store/dynamo_db/table_spec.rb +0 -48
  43. 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
- # name is not provided.
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
- private
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::ResourceNotFoundException] If wrong table
45
- # name.
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, &block)
90
- begin
91
- yield
92
- rescue Aws::DynamoDB::Errors::Base,
93
- Aws::SessionStore::DynamoDB::InvalidIDError => e
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::MD5.new, secret, sid).strip()
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(secure)
106
- sid = "#{generate_hmac(sid, @config.secret_key)}--" + sid
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
- digest, ver_sid = sid.split("--")
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 class provides a way to create and delete a session table.
7
+ # This module provides a way to create and delete a session table.
6
8
  module Table
7
- module_function
8
-
9
- # Creates a session table.
10
- # @option (see Configuration#initialize)
11
- def create_table(options = {})
12
- config = load_config(options)
13
- ddb_options = properties(config.table_name, config.table_key).merge(
14
- throughput(config.read_capacity, config.write_capacity)
15
- )
16
- config.dynamo_db_client.create_table(ddb_options)
17
- logger << "Table #{config.table_name} created, waiting for activation...\n"
18
- block_until_created(config)
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
- # Deletes a session table.
25
- # @option (see Configuration#initialize)
26
- def delete_table(options = {})
27
- config = load_config(options)
28
- config.dynamo_db_client.delete_table(:table_name => config.table_name)
29
- end
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
- # @api private
32
- def logger
33
- @logger ||= Logger.new($STDOUT)
34
- end
31
+ private
35
32
 
36
- # Loads configuration options.
37
- # @option (see Configuration#initialize)
38
- # @api private
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
- # @return [Hash] Attribute settings for creating a session table.
44
- # @api private
45
- def attributes(hash_key)
46
- attributes = [{:attribute_name => hash_key, :attribute_type => 'S'}]
47
- { :attribute_definitions => attributes }
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
- # @return Shema values for session table
51
- # @api private
52
- def schema(table_name, hash_key)
53
- {
54
- :table_name => table_name,
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
- # @return Throughput for Session table
60
- # @api private
61
- def throughput(read, write)
62
- units = {:read_capacity_units=> read, :write_capacity_units => write}
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
- # @return Properties for Session table
67
- # @api private
68
- def properties(table_name, hash_key)
69
- attributes(hash_key).merge(schema(table_name, hash_key))
70
- end
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
- # @api private
73
- def block_until_created(config)
74
- created = false
75
- until created
76
- params = { :table_name => config.table_name }
77
- response = config.dynamo_db_client.describe_table(params)
78
- created = response[:table][:table_status] == 'ACTIVE'
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
- sleep 10
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,19 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Aws
2
4
  module SessionStore
3
- module DynamoDB; end
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
- require 'aws/session_store/dynamo_db/configuration'
8
- require 'aws/session_store/dynamo_db/invalid_id_error'
9
- require 'aws/session_store/dynamo_db/missing_secret_key_error'
10
- require 'aws/session_store/dynamo_db/lock_wait_timeout_error'
11
- require 'aws/session_store/dynamo_db/errors/base_handler'
12
- require 'aws/session_store/dynamo_db/errors/default_handler'
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/base'
16
+ require_relative 'aws/session_store/dynamo_db/locking/null'
17
+ require_relative 'aws/session_store/dynamo_db/locking/pessimistic'
18
+ require_relative 'aws/session_store/dynamo_db/rack_middleware'
19
+ require_relative 'aws/session_store/dynamo_db/table'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sessionstore-dynamodb
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 3.0.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-01-25 00:00:00.000000000 Z
11
+ date: 2024-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-dynamodb
@@ -34,42 +34,30 @@ dependencies:
34
34
  name: rack
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- version: '2'
40
- - - "<"
37
+ - - "~>"
41
38
  - !ruby/object:Gem::Version
42
- version: '4'
39
+ version: '3'
43
40
  type: :runtime
44
41
  prerelease: false
45
42
  version_requirements: !ruby/object:Gem::Requirement
46
43
  requirements:
47
- - - ">="
48
- - !ruby/object:Gem::Version
49
- version: '2'
50
- - - "<"
44
+ - - "~>"
51
45
  - !ruby/object:Gem::Version
52
- version: '4'
46
+ version: '3'
53
47
  - !ruby/object:Gem::Dependency
54
48
  name: rack-session
55
49
  requirement: !ruby/object:Gem::Requirement
56
50
  requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- version: '1'
60
- - - "<"
51
+ - - "~>"
61
52
  - !ruby/object:Gem::Version
62
- version: '3'
53
+ version: '2'
63
54
  type: :runtime
64
55
  prerelease: false
65
56
  version_requirements: !ruby/object:Gem::Requirement
66
57
  requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- version: '1'
70
- - - "<"
58
+ - - "~>"
71
59
  - !ruby/object:Gem::Version
72
- version: '3'
60
+ version: '2'
73
61
  description:
74
62
  email:
75
63
  - aws-dr-rubygems@amazon.com
@@ -77,48 +65,23 @@ executables: []
77
65
  extensions: []
78
66
  extra_rdoc_files: []
79
67
  files:
80
- - ".github/PULL_REQUEST_TEMPLATE.md"
81
- - ".github/workflows/ci.yml"
82
- - ".gitignore"
83
- - ".gitmodules"
84
- - ".yardopts"
85
68
  - CHANGELOG.md
86
- - CODE_OF_CONDUCT.md
87
- - CONTRIBUTING.md
88
- - Gemfile
89
- - LICENSE
90
- - README.md
91
- - Rakefile
69
+ - LICENSE.txt
92
70
  - 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
71
  - lib/aws-sessionstore-dynamodb.rb
97
72
  - lib/aws/session_store/dynamo_db/configuration.rb
73
+ - lib/aws/session_store/dynamo_db/errors.rb
98
74
  - lib/aws/session_store/dynamo_db/errors/base_handler.rb
99
75
  - lib/aws/session_store/dynamo_db/errors/default_handler.rb
100
76
  - lib/aws/session_store/dynamo_db/garbage_collection.rb
101
- - lib/aws/session_store/dynamo_db/invalid_id_error.rb
102
- - lib/aws/session_store/dynamo_db/lock_wait_timeout_error.rb
103
77
  - lib/aws/session_store/dynamo_db/locking/base.rb
104
78
  - lib/aws/session_store/dynamo_db/locking/null.rb
105
79
  - lib/aws/session_store/dynamo_db/locking/pessimistic.rb
106
- - lib/aws/session_store/dynamo_db/missing_secret_key_error.rb
107
80
  - lib/aws/session_store/dynamo_db/rack_middleware.rb
108
81
  - lib/aws/session_store/dynamo_db/table.rb
109
- - lib/aws/session_store/dynamo_db/version.rb
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
82
+ homepage: https://github.com/aws/aws-sessionstore-dynamodb-ruby
120
83
  licenses:
121
- - Apache License 2.0
84
+ - Apache-2.0
122
85
  metadata: {}
123
86
  post_install_message:
124
87
  rdoc_options: []
@@ -128,25 +91,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
128
91
  requirements:
129
92
  - - ">="
130
93
  - !ruby/object:Gem::Version
131
- version: '2.5'
94
+ version: '2.7'
132
95
  required_rubygems_version: !ruby/object:Gem::Requirement
133
96
  requirements:
134
97
  - - ">="
135
98
  - !ruby/object:Gem::Version
136
99
  version: '0'
137
100
  requirements: []
138
- rubygems_version: 3.5.5
101
+ rubygems_version: 3.5.11
139
102
  signing_key:
140
103
  specification_version: 4
141
- summary: The Amazon DynamoDB Session Store handles sessions for Ruby web applications
104
+ summary: The Amazon DynamoDB Session Store handles sessions for Rack web applications
142
105
  using a DynamoDB backend.
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
+ test_files: []
@@ -1,6 +0,0 @@
1
- *Issue #, if available:*
2
-
3
- *Description of changes:*
4
-
5
-
6
- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
@@ -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
@@ -1,12 +0,0 @@
1
- .DS_Store
2
-
3
- /.byebug_history
4
- /.bundle
5
- /.yardoc
6
- /doc
7
- /Gemfile.lock
8
- /coverage
9
- *.gem
10
- /.release
11
-
12
- .idea/
data/.gitmodules DELETED
@@ -1,3 +0,0 @@
1
- [submodule "tasks/release"]
2
- path = tasks/release
3
- url = https://github.com/aws/aws-sdk-ruby-release-tools.git
data/.yardopts DELETED
@@ -1,4 +0,0 @@
1
- --title 'AWS DynamoDB Session Store'
2
- --template-path doc-src/templates
3
- --hide-api private
4
- --plugin sitemap
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.
data/Gemfile DELETED
@@ -1,24 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- if ENV['RACK2']
4
- gem 'rack', '~> 2'
5
- end
6
-
7
- gemspec
8
-
9
- gem 'rake', require: false
10
-
11
- group :docs do
12
- gem 'yard'
13
- gem 'yard-sitemap', '~> 1.0'
14
- end
15
-
16
- group :test do
17
- gem 'rspec'
18
- gem 'rack-test'
19
- gem 'simplecov'
20
-
21
- if RUBY_VERSION >= '3.0'
22
- gem 'rexml'
23
- end
24
- end
data/LICENSE DELETED
@@ -1,12 +0,0 @@
1
- Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
-
3
- Licensed under the Apache License, Version 2.0 (the "License"). You
4
- may not use this file except in compliance with the License. A copy of
5
- the License is located at
6
-
7
- http://aws.amazon.com/apache2.0/
8
-
9
- or in the "license" file accompanying this file. This file is
10
- distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
- ANY KIND, either express or implied. See the License for the specific
12
- language governing permissions and limitations under the License.