aws-sessionstore-dynamodb 2.1.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -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 +25 -47
  17. data/.github/PULL_REQUEST_TEMPLATE.md +0 -6
  18. data/.github/workflows/ci.yml +0 -32
  19. data/.gitignore +0 -6
  20. data/.gitmodules +0 -3
  21. data/.travis.yml +0 -24
  22. data/.yardopts +0 -4
  23. data/CODE_OF_CONDUCT.md +0 -4
  24. data/CONTRIBUTING.md +0 -61
  25. data/Gemfile +0 -20
  26. data/LICENSE +0 -12
  27. data/README.md +0 -125
  28. data/Rakefile +0 -35
  29. data/aws-sessionstore-dynamodb.gemspec +0 -21
  30. data/doc-src/templates/default/layout/html/footer.erb +0 -6
  31. data/doc-src/templates/default/layout/html/layout.erb +0 -31
  32. data/lib/aws/session_store/dynamo_db/invalid_id_error.rb +0 -7
  33. data/lib/aws/session_store/dynamo_db/lock_wait_timeout_error.rb +0 -7
  34. data/lib/aws/session_store/dynamo_db/missing_secret_key_error.rb +0 -7
  35. data/lib/aws/session_store/dynamo_db/version.rb +0 -7
  36. data/spec/aws/session_store/dynamo_db/app_config.yml +0 -16
  37. data/spec/aws/session_store/dynamo_db/configuration_spec.rb +0 -81
  38. data/spec/aws/session_store/dynamo_db/error/default_error_handler_spec.rb +0 -64
  39. data/spec/aws/session_store/dynamo_db/garbage_collection_spec.rb +0 -158
  40. data/spec/aws/session_store/dynamo_db/locking/threaded_sessions_spec.rb +0 -96
  41. data/spec/aws/session_store/dynamo_db/rack_middleware_database_spec.rb +0 -130
  42. data/spec/aws/session_store/dynamo_db/rack_middleware_spec.rb +0 -148
  43. data/spec/aws/session_store/dynamo_db/table_spec.rb +0 -48
  44. data/spec/spec_helper.rb +0 -70
@@ -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.1.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: 2023-06-02 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
@@ -32,6 +32,20 @@ dependencies:
32
32
  version: 1.85.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rack
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '3'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '3'
47
+ - !ruby/object:Gem::Dependency
48
+ name: rack-session
35
49
  requirement: !ruby/object:Gem::Requirement
36
50
  requirements:
37
51
  - - "~>"
@@ -46,55 +60,28 @@ dependencies:
46
60
  version: '2'
47
61
  description:
48
62
  email:
49
- - mamuller@amazon.com
50
- - alexwoo@amazon.com
63
+ - aws-dr-rubygems@amazon.com
51
64
  executables: []
52
65
  extensions: []
53
66
  extra_rdoc_files: []
54
67
  files:
55
- - ".github/PULL_REQUEST_TEMPLATE.md"
56
- - ".github/workflows/ci.yml"
57
- - ".gitignore"
58
- - ".gitmodules"
59
- - ".travis.yml"
60
- - ".yardopts"
61
68
  - CHANGELOG.md
62
- - CODE_OF_CONDUCT.md
63
- - CONTRIBUTING.md
64
- - Gemfile
65
- - LICENSE
66
- - README.md
67
- - Rakefile
69
+ - LICENSE.txt
68
70
  - VERSION
69
- - aws-sessionstore-dynamodb.gemspec
70
- - doc-src/templates/default/layout/html/footer.erb
71
- - doc-src/templates/default/layout/html/layout.erb
72
71
  - lib/aws-sessionstore-dynamodb.rb
73
72
  - lib/aws/session_store/dynamo_db/configuration.rb
73
+ - lib/aws/session_store/dynamo_db/errors.rb
74
74
  - lib/aws/session_store/dynamo_db/errors/base_handler.rb
75
75
  - lib/aws/session_store/dynamo_db/errors/default_handler.rb
76
76
  - lib/aws/session_store/dynamo_db/garbage_collection.rb
77
- - lib/aws/session_store/dynamo_db/invalid_id_error.rb
78
- - lib/aws/session_store/dynamo_db/lock_wait_timeout_error.rb
79
77
  - lib/aws/session_store/dynamo_db/locking/base.rb
80
78
  - lib/aws/session_store/dynamo_db/locking/null.rb
81
79
  - lib/aws/session_store/dynamo_db/locking/pessimistic.rb
82
- - lib/aws/session_store/dynamo_db/missing_secret_key_error.rb
83
80
  - lib/aws/session_store/dynamo_db/rack_middleware.rb
84
81
  - lib/aws/session_store/dynamo_db/table.rb
85
- - lib/aws/session_store/dynamo_db/version.rb
86
- - spec/aws/session_store/dynamo_db/app_config.yml
87
- - spec/aws/session_store/dynamo_db/configuration_spec.rb
88
- - spec/aws/session_store/dynamo_db/error/default_error_handler_spec.rb
89
- - spec/aws/session_store/dynamo_db/garbage_collection_spec.rb
90
- - spec/aws/session_store/dynamo_db/locking/threaded_sessions_spec.rb
91
- - spec/aws/session_store/dynamo_db/rack_middleware_database_spec.rb
92
- - spec/aws/session_store/dynamo_db/rack_middleware_spec.rb
93
- - spec/aws/session_store/dynamo_db/table_spec.rb
94
- - spec/spec_helper.rb
95
- homepage: http://github.com/aws/aws-sessionstore-dynamodb-ruby
82
+ homepage: https://github.com/aws/aws-sessionstore-dynamodb-ruby
96
83
  licenses:
97
- - Apache License 2.0
84
+ - Apache-2.0
98
85
  metadata: {}
99
86
  post_install_message:
100
87
  rdoc_options: []
@@ -104,25 +91,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
91
  requirements:
105
92
  - - ">="
106
93
  - !ruby/object:Gem::Version
107
- version: '0'
94
+ version: '2.7'
108
95
  required_rubygems_version: !ruby/object:Gem::Requirement
109
96
  requirements:
110
97
  - - ">="
111
98
  - !ruby/object:Gem::Version
112
99
  version: '0'
113
100
  requirements: []
114
- rubygems_version: 3.4.10
101
+ rubygems_version: 3.5.11
115
102
  signing_key:
116
103
  specification_version: 4
117
- 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
118
105
  using a DynamoDB backend.
119
- test_files:
120
- - spec/aws/session_store/dynamo_db/app_config.yml
121
- - spec/aws/session_store/dynamo_db/configuration_spec.rb
122
- - spec/aws/session_store/dynamo_db/error/default_error_handler_spec.rb
123
- - spec/aws/session_store/dynamo_db/garbage_collection_spec.rb
124
- - spec/aws/session_store/dynamo_db/locking/threaded_sessions_spec.rb
125
- - spec/aws/session_store/dynamo_db/rack_middleware_database_spec.rb
126
- - spec/aws/session_store/dynamo_db/rack_middleware_spec.rb
127
- - spec/aws/session_store/dynamo_db/table_spec.rb
128
- - 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,32 +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.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, 3.2, jruby-9.1, jruby-9.2, jruby-9.3, jruby-9.4]
19
-
20
- steps:
21
- - name: Setup
22
- uses: ruby/setup-ruby@v1
23
- with:
24
- ruby-version: ${{ matrix.ruby }}
25
-
26
- - uses: actions/checkout@v2
27
-
28
- - name: Install
29
- run: bundle install --without docs
30
-
31
- - name: Test
32
- run: bundle exec rake spec
data/.gitignore DELETED
@@ -1,6 +0,0 @@
1
- doc
2
- coverage
3
- .yardoc
4
- Gemfile.lock
5
- .release
6
- .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/.travis.yml DELETED
@@ -1,24 +0,0 @@
1
- branches:
2
- only:
3
- - master
4
-
5
- language: ruby
6
-
7
- rvm:
8
- - 2.2
9
- - 2.3
10
- - 2.4
11
- - 2.5
12
- - 2.6
13
- - 2.7
14
- - jruby-9.1
15
- - jruby-9.2
16
-
17
- sudo: false
18
-
19
- env:
20
- - AWS_REGION=us-west-2
21
-
22
- script: bundle exec rake spec
23
-
24
- bundler_args: --without docs release repl
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,20 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- gem 'rake', require: false
6
-
7
- group :docs do
8
- gem 'yard'
9
- gem 'yard-sitemap', '~> 1.0'
10
- end
11
-
12
- group :test do
13
- gem 'rspec'
14
- gem 'simplecov', require: false
15
- gem 'rack-test'
16
-
17
- if RUBY_VERSION >= '3.0'
18
- gem 'rexml'
19
- end
20
- 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.