aws-sessionstore-dynamodb 2.0.1 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +39 -0
- data/.gitignore +12 -5
- data/CHANGELOG.md +12 -0
- data/Gemfile +9 -1
- data/VERSION +1 -1
- data/aws-sessionstore-dynamodb.gemspec +7 -3
- data/doc-src/templates/default/layout/html/footer.erb +0 -4
- data/lib/aws/session_store/dynamo_db/configuration.rb +3 -3
- data/spec/aws/session_store/dynamo_db/error/default_error_handler_spec.rb +1 -1
- data/spec/aws/session_store/dynamo_db/garbage_collection_spec.rb +3 -3
- data/spec/aws/session_store/dynamo_db/rack_middleware_spec.rb +2 -1
- data/spec/spec_helper.rb +2 -7
- metadata +40 -9
- data/.travis.yml +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee27fa01f65650a13304791dc345e3ee4b0c9ae10b734a54f57acb72706f4963
|
4
|
+
data.tar.gz: 269c66dbd952cd68d76fc3e1fcec8559fc945f4c745cc4987fb33e42c3c0bd1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68ff2d325413b24ef06bfe8a40f83f209afc93858af6322c648f4f82daac0096b90f7b2521bc5eac4e0d562636db2eea30d7931f97990d69b1f346866005506c
|
7
|
+
data.tar.gz: 5653d32a3a00b7bfbfaee3ddd9449d9a92cb3c369dd31a7fc887194f5a3b12dea141ac6d12f82db552ee82087956c8c0b88803f9bf25c460ea8fc894a58bd0fc
|
@@ -0,0 +1,39 @@
|
|
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
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
2.2.0 (2024-01-25)
|
2
|
+
------------------
|
3
|
+
|
4
|
+
* Feature - Drop support for Ruby 2.3 and 2.4.
|
5
|
+
|
6
|
+
* Issue - Relax `rack` dependency to allow version 3. Adds `rack-session` to the gemspec.
|
7
|
+
|
8
|
+
2.1.0 (2023-06-02)
|
9
|
+
------------------
|
10
|
+
|
11
|
+
* Feature - Improve User-Agent tracking and bump minimum DynamoDB version.
|
12
|
+
|
1
13
|
2.0.1 (2020-11-16)
|
2
14
|
------------------
|
3
15
|
|
data/Gemfile
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
+
if ENV['RACK2']
|
4
|
+
gem 'rack', '~> 2'
|
5
|
+
end
|
6
|
+
|
3
7
|
gemspec
|
4
8
|
|
5
9
|
gem 'rake', require: false
|
@@ -11,6 +15,10 @@ end
|
|
11
15
|
|
12
16
|
group :test do
|
13
17
|
gem 'rspec'
|
14
|
-
gem 'simplecov', require: false
|
15
18
|
gem 'rack-test'
|
19
|
+
gem 'simplecov'
|
20
|
+
|
21
|
+
if RUBY_VERSION >= '3.0'
|
22
|
+
gem 'rexml'
|
23
|
+
end
|
16
24
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0
|
1
|
+
2.2.0
|
@@ -4,7 +4,7 @@ Gem::Specification.new do |spec|
|
|
4
4
|
spec.name = "aws-sessionstore-dynamodb"
|
5
5
|
spec.version = version
|
6
6
|
spec.authors = ["Amazon Web Services"]
|
7
|
-
spec.email = ["
|
7
|
+
spec.email = ["aws-dr-rubygems@amazon.com"]
|
8
8
|
|
9
9
|
spec.summary = "The Amazon DynamoDB Session Store handles sessions " +
|
10
10
|
"for Ruby web applications using a DynamoDB backend."
|
@@ -15,6 +15,10 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
16
16
|
spec.require_paths = ["lib"]
|
17
17
|
|
18
|
-
|
19
|
-
spec.add_dependency '
|
18
|
+
# Require 1.85.0 for user_agent_frameworks config
|
19
|
+
spec.add_dependency 'aws-sdk-dynamodb', '~> 1', '>= 1.85.0'
|
20
|
+
spec.add_dependency 'rack', '>= 2', '< 4'
|
21
|
+
spec.add_dependency 'rack-session', '>= 1', '< 3'
|
22
|
+
|
23
|
+
spec.required_ruby_version = '>= 2.5'
|
20
24
|
end
|
@@ -4,7 +4,3 @@
|
|
4
4
|
<%= YARD::VERSION %> (ruby-<%= RUBY_VERSION %>).
|
5
5
|
<div id="awsdocs-legal-zone-copyright"></div>
|
6
6
|
</div>
|
7
|
-
|
8
|
-
<!-- Gitter chat -->
|
9
|
-
<script>((window.gitter = {}).chat = {}).options = { room: 'aws/aws-sdk-ruby' };</script>
|
10
|
-
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
@@ -192,9 +192,9 @@ module Aws::SessionStore::DynamoDB
|
|
192
192
|
|
193
193
|
# @return [Hash] DDB client.
|
194
194
|
def gen_dynamo_db_client
|
195
|
-
|
196
|
-
|
197
|
-
dynamo_db_client
|
195
|
+
dynamo_db_client = @options[:dynamo_db_client] || Aws::DynamoDB::Client.new
|
196
|
+
# this used to be aws-sessionstore/version on user_agent_suffix
|
197
|
+
dynamo_db_client.config.user_agent_frameworks << "aws-sessionstore-dynamodb"
|
198
198
|
{:dynamo_db_client => dynamo_db_client}
|
199
199
|
end
|
200
200
|
|
@@ -26,7 +26,7 @@ describe Aws::SessionStore::DynamoDB do
|
|
26
26
|
|
27
27
|
let(:base_app) { MultiplierApplication.new }
|
28
28
|
let(:app) { Aws::SessionStore::DynamoDB::RackMiddleware.new(base_app, @options) }
|
29
|
-
let(:client) { double('Aws::DynamoDB::Client') }
|
29
|
+
let(:client) { double('Aws::DynamoDB::Client', config: double(user_agent_frameworks: [])) }
|
30
30
|
|
31
31
|
context 'Error handling for Rack Middleware with default error handler' do
|
32
32
|
it 'raises error for missing secret key' do
|
@@ -124,9 +124,9 @@ describe Aws::SessionStore::DynamoDB::GarbageCollection do
|
|
124
124
|
expect(dynamo_db_client).to receive(:scan).
|
125
125
|
exactly(1).times.and_return(scan_resp3)
|
126
126
|
expect(dynamo_db_client).to receive(:batch_write_item).ordered.
|
127
|
-
with(request_items: { 'sessions' => format_scan_result }).
|
127
|
+
with({request_items: { 'sessions' => format_scan_result }}).
|
128
128
|
and_return(write_resp2)
|
129
|
-
expect(dynamo_db_client).to receive(:batch_write_item).ordered.with(
|
129
|
+
expect(dynamo_db_client).to receive(:batch_write_item).ordered.with({
|
130
130
|
request_items: {
|
131
131
|
'sessions' => [
|
132
132
|
{
|
@@ -151,7 +151,7 @@ describe Aws::SessionStore::DynamoDB::GarbageCollection do
|
|
151
151
|
}
|
152
152
|
]
|
153
153
|
}
|
154
|
-
).and_return(write_resp1)
|
154
|
+
}).and_return(write_resp1)
|
155
155
|
collect_garbage
|
156
156
|
end
|
157
157
|
end
|
@@ -53,7 +53,8 @@ module Aws
|
|
53
53
|
delete_item: 'Deleted',
|
54
54
|
list_tables: { table_names: ['Sessions'] },
|
55
55
|
get_item: { item: { 'data' => sample_packed_data } },
|
56
|
-
update_item: { attributes: { created_at: 'now' } }
|
56
|
+
update_item: { attributes: { created_at: 'now' } },
|
57
|
+
config: double(user_agent_frameworks: [])
|
57
58
|
)
|
58
59
|
end
|
59
60
|
|
data/spec/spec_helper.rb
CHANGED
@@ -13,13 +13,8 @@
|
|
13
13
|
# ANY KIND, either express or implied. See the License for the specific
|
14
14
|
# language governing permissions and limitations under the License.
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
require 'simplecov'
|
19
|
-
SimpleCov.start { add_filter 'spec' }
|
20
|
-
end
|
21
|
-
rescue LoadError
|
22
|
-
end
|
16
|
+
require 'simplecov'
|
17
|
+
SimpleCov.start { add_filter 'spec' }
|
23
18
|
|
24
19
|
$LOAD_PATH << File.join(File.dirname(File.dirname(__FILE__)), 'lib')
|
25
20
|
|
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.0
|
4
|
+
version: 2.2.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:
|
11
|
+
date: 2024-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-dynamodb
|
@@ -17,6 +17,9 @@ dependencies:
|
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.85.0
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -24,32 +27,60 @@ dependencies:
|
|
24
27
|
- - "~>"
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '1'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.85.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: rack
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
|
-
- - "
|
37
|
+
- - ">="
|
32
38
|
- !ruby/object:Gem::Version
|
33
39
|
version: '2'
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '4'
|
34
43
|
type: :runtime
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
38
|
-
- - "
|
47
|
+
- - ">="
|
39
48
|
- !ruby/object:Gem::Version
|
40
49
|
version: '2'
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '4'
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: rack-session
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '1'
|
60
|
+
- - "<"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '3'
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '1'
|
70
|
+
- - "<"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '3'
|
41
73
|
description:
|
42
74
|
email:
|
43
|
-
-
|
44
|
-
- alexwoo@amazon.com
|
75
|
+
- aws-dr-rubygems@amazon.com
|
45
76
|
executables: []
|
46
77
|
extensions: []
|
47
78
|
extra_rdoc_files: []
|
48
79
|
files:
|
49
80
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
81
|
+
- ".github/workflows/ci.yml"
|
50
82
|
- ".gitignore"
|
51
83
|
- ".gitmodules"
|
52
|
-
- ".travis.yml"
|
53
84
|
- ".yardopts"
|
54
85
|
- CHANGELOG.md
|
55
86
|
- CODE_OF_CONDUCT.md
|
@@ -97,14 +128,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
97
128
|
requirements:
|
98
129
|
- - ">="
|
99
130
|
- !ruby/object:Gem::Version
|
100
|
-
version: '
|
131
|
+
version: '2.5'
|
101
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
133
|
requirements:
|
103
134
|
- - ">="
|
104
135
|
- !ruby/object:Gem::Version
|
105
136
|
version: '0'
|
106
137
|
requirements: []
|
107
|
-
rubygems_version: 3.
|
138
|
+
rubygems_version: 3.5.5
|
108
139
|
signing_key:
|
109
140
|
specification_version: 4
|
110
141
|
summary: The Amazon DynamoDB Session Store handles sessions for Ruby web applications
|
data/.travis.yml
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
branches:
|
2
|
-
only:
|
3
|
-
- master
|
4
|
-
|
5
|
-
language: ruby
|
6
|
-
|
7
|
-
rvm:
|
8
|
-
- 2.0
|
9
|
-
- 2.1
|
10
|
-
- 2.2
|
11
|
-
- 2.3
|
12
|
-
- 2.4
|
13
|
-
- 2.5
|
14
|
-
- 2.6
|
15
|
-
- 2.7
|
16
|
-
- jruby-9.1
|
17
|
-
- jruby-9.2
|
18
|
-
|
19
|
-
sudo: false
|
20
|
-
|
21
|
-
env:
|
22
|
-
- AWS_REGION=us-west-2
|
23
|
-
|
24
|
-
script: bundle exec rake spec
|
25
|
-
|
26
|
-
bundler_args: --without docs release repl
|