mongo_session_store 3.2.1 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +136 -0
- data/.github/workflows/danger-comment.yml +17 -0
- data/.github/workflows/danger.yml +53 -0
- data/.gitignore +2 -0
- data/.rubocop.yml +15 -6
- data/.rubocop_todo.yml +195 -0
- data/CHANGELOG.md +20 -13
- data/Dangerfile +5 -1
- data/Gemfile +2 -0
- data/Gemfile.danger +5 -0
- data/README.md +71 -9
- data/RELEASING.md +37 -0
- data/docker-compose.yml +5 -0
- data/gemfiles/rails-5.1-mongoid.gemfile +1 -1
- data/gemfiles/rails-6.0-mongo.gemfile +4 -1
- data/gemfiles/rails-6.0-mongoid.gemfile +4 -1
- data/gemfiles/rails-8.1-mongo.gemfile +15 -0
- data/gemfiles/rails-8.1-mongoid.gemfile +15 -0
- data/gemfiles/rails-current-mongo.gemfile +16 -0
- data/gemfiles/rails-current-mongoid.gemfile +3 -0
- data/lib/mongo_session_store/mongo_store.rb +1 -1
- data/lib/mongo_session_store/mongo_store_base.rb +7 -0
- data/lib/mongo_session_store/mongoid_store.rb +1 -0
- data/lib/mongo_session_store/version.rb +1 -1
- data/mongo_session_store.gemspec +4 -7
- data/script/test +20 -0
- data/script/test_inner +19 -0
- data/script/testenv +6 -0
- data/spec/.rubocop.yml +1 -1
- data/spec/integrations/devise_spec.rb +2 -2
- data/spec/lib/mongo_session_store/legacy_serialization_spec.rb +17 -0
- data/spec/lib/mongo_session_store/serialization_spec.rb +36 -0
- data/spec/lib/mongo_session_store/stale_sessions_spec.rb +77 -0
- data/spec/lib/mongo_session_store/version_spec.rb +8 -0
- data/spec/rails_helper.rb +4 -0
- data/spec/spec_helper.rb +14 -2
- data/spec/support/apps/rails_6.0_app/config/database.yml +9 -3
- data/spec/support/apps/rails_6.0_app/config/environments/test.rb +1 -1
- data/spec/support/helpers/test_database_helper.rb +1 -3
- data/spec/support/rack_app.rb +3 -1
- metadata +42 -235
- data/.travis.yml +0 -109
- data/gemfiles/rails-4.0-mongo.gemfile +0 -9
- data/gemfiles/rails-4.0-mongoid.gemfile +0 -9
- data/gemfiles/rails-4.1-mongo.gemfile +0 -9
- data/gemfiles/rails-4.1-mongoid.gemfile +0 -9
- data/gemfiles/rails-4.2-mongo.gemfile +0 -9
- data/gemfiles/rails-4.2-mongoid.gemfile +0 -9
- data/spec/support/apps/rails_4.0_app/Rakefile +0 -6
- data/spec/support/apps/rails_4.0_app/app/controllers/application_controller.rb +0 -5
- data/spec/support/apps/rails_4.0_app/app/controllers/home_controller.rb +0 -2
- data/spec/support/apps/rails_4.0_app/app/models/user.rb +0 -5
- data/spec/support/apps/rails_4.0_app/app/views/home/index.html.erb +0 -9
- data/spec/support/apps/rails_4.0_app/app/views/layouts/application.html.erb +0 -17
- data/spec/support/apps/rails_4.0_app/bin/bundle +0 -3
- data/spec/support/apps/rails_4.0_app/bin/rails +0 -4
- data/spec/support/apps/rails_4.0_app/bin/rake +0 -4
- data/spec/support/apps/rails_4.0_app/config/application.rb +0 -11
- data/spec/support/apps/rails_4.0_app/config/boot.rb +0 -4
- data/spec/support/apps/rails_4.0_app/config/database.yml +0 -11
- data/spec/support/apps/rails_4.0_app/config/environment.rb +0 -5
- data/spec/support/apps/rails_4.0_app/config/environments/development.rb +0 -12
- data/spec/support/apps/rails_4.0_app/config/environments/test.rb +0 -19
- data/spec/support/apps/rails_4.0_app/config/initializers/devise.rb +0 -254
- data/spec/support/apps/rails_4.0_app/config/initializers/secret_token.rb +0 -12
- data/spec/support/apps/rails_4.0_app/config/initializers/session_store.rb +0 -1
- data/spec/support/apps/rails_4.0_app/config/locales/devise.en.yml +0 -59
- data/spec/support/apps/rails_4.0_app/config/locales/en.yml +0 -23
- data/spec/support/apps/rails_4.0_app/config/mongo.yml +0 -11
- data/spec/support/apps/rails_4.0_app/config/mongoid.yml +0 -13
- data/spec/support/apps/rails_4.0_app/config/routes.rb +0 -5
- data/spec/support/apps/rails_4.0_app/config.ru +0 -4
- data/spec/support/apps/rails_4.0_app/db/migrate/20140301171212_add_devise_users.rb +0 -11
- data/spec/support/apps/rails_4.0_app/db/schema.rb +0 -25
- data/spec/support/apps/rails_4.0_app/lib/assets/.keep +0 -0
- data/spec/support/apps/rails_4.0_app/lib/tasks/.keep +0 -0
- data/spec/support/apps/rails_4.0_app/log/.keep +0 -0
- data/spec/support/apps/rails_4.1_app/Rakefile +0 -3
- data/spec/support/apps/rails_4.1_app/app/controllers/application_controller.rb +0 -5
- data/spec/support/apps/rails_4.1_app/app/controllers/home_controller.rb +0 -2
- data/spec/support/apps/rails_4.1_app/app/models/user.rb +0 -5
- data/spec/support/apps/rails_4.1_app/app/views/home/index.html.erb +0 -9
- data/spec/support/apps/rails_4.1_app/app/views/layouts/application.html.erb +0 -17
- data/spec/support/apps/rails_4.1_app/bin/bundle +0 -3
- data/spec/support/apps/rails_4.1_app/bin/rails +0 -4
- data/spec/support/apps/rails_4.1_app/bin/rake +0 -4
- data/spec/support/apps/rails_4.1_app/config/application.rb +0 -11
- data/spec/support/apps/rails_4.1_app/config/boot.rb +0 -4
- data/spec/support/apps/rails_4.1_app/config/database.yml +0 -11
- data/spec/support/apps/rails_4.1_app/config/environment.rb +0 -5
- data/spec/support/apps/rails_4.1_app/config/environments/development.rb +0 -12
- data/spec/support/apps/rails_4.1_app/config/environments/test.rb +0 -19
- data/spec/support/apps/rails_4.1_app/config/initializers/devise.rb +0 -254
- data/spec/support/apps/rails_4.1_app/config/initializers/session_store.rb +0 -1
- data/spec/support/apps/rails_4.1_app/config/locales/devise.en.yml +0 -59
- data/spec/support/apps/rails_4.1_app/config/locales/en.yml +0 -23
- data/spec/support/apps/rails_4.1_app/config/mongo.yml +0 -11
- data/spec/support/apps/rails_4.1_app/config/mongoid.yml +0 -13
- data/spec/support/apps/rails_4.1_app/config/routes.rb +0 -5
- data/spec/support/apps/rails_4.1_app/config/secrets.yml +0 -22
- data/spec/support/apps/rails_4.1_app/config.ru +0 -2
- data/spec/support/apps/rails_4.1_app/db/migrate/20140301171212_add_devise_users.rb +0 -11
- data/spec/support/apps/rails_4.1_app/db/schema.rb +0 -25
- data/spec/support/apps/rails_4.1_app/lib/assets/.keep +0 -0
- data/spec/support/apps/rails_4.1_app/lib/tasks/.keep +0 -0
- data/spec/support/apps/rails_4.1_app/log/.keep +0 -0
- data/spec/support/apps/rails_4.2_app/Rakefile +0 -2
- data/spec/support/apps/rails_4.2_app/app/controllers/application_controller.rb +0 -5
- data/spec/support/apps/rails_4.2_app/app/controllers/home_controller.rb +0 -2
- data/spec/support/apps/rails_4.2_app/app/models/user.rb +0 -5
- data/spec/support/apps/rails_4.2_app/app/views/home/index.html.erb +0 -9
- data/spec/support/apps/rails_4.2_app/app/views/layouts/application.html.erb +0 -15
- data/spec/support/apps/rails_4.2_app/bin/bundle +0 -3
- data/spec/support/apps/rails_4.2_app/bin/rails +0 -8
- data/spec/support/apps/rails_4.2_app/bin/rake +0 -4
- data/spec/support/apps/rails_4.2_app/config/application.rb +0 -11
- data/spec/support/apps/rails_4.2_app/config/boot.rb +0 -3
- data/spec/support/apps/rails_4.2_app/config/database.yml +0 -11
- data/spec/support/apps/rails_4.2_app/config/environment.rb +0 -5
- data/spec/support/apps/rails_4.2_app/config/environments/development.rb +0 -12
- data/spec/support/apps/rails_4.2_app/config/environments/test.rb +0 -19
- data/spec/support/apps/rails_4.2_app/config/initializers/devise.rb +0 -254
- data/spec/support/apps/rails_4.2_app/config/initializers/session_store.rb +0 -1
- data/spec/support/apps/rails_4.2_app/config/locales/en.yml +0 -23
- data/spec/support/apps/rails_4.2_app/config/mongo.yml +0 -11
- data/spec/support/apps/rails_4.2_app/config/mongoid.yml +0 -13
- data/spec/support/apps/rails_4.2_app/config/routes.rb +0 -5
- data/spec/support/apps/rails_4.2_app/config/secrets.yml +0 -22
- data/spec/support/apps/rails_4.2_app/config.ru +0 -4
- data/spec/support/apps/rails_4.2_app/db/migrate/20140301171212_add_devise_users.rb +0 -11
- data/spec/support/apps/rails_4.2_app/db/schema.rb +0 -25
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8e3d5855f45006aba783cdc7edb80d07a3721d985c40b156548e596a2e1a50bb
|
|
4
|
+
data.tar.gz: 01a005c71cd44b77044bbfea12df9121d03ccf8a6bf80bd8f7626a3153ed216d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 90ae3da4b0804b39df8710b2c69bf66a1a5330422cab88d091cf41e177713b038bcd8626342ef6dc7a26615bb0efddfe6f7e5f498bd694b33d1272bfa2c5b1ff
|
|
7
|
+
data.tar.gz: 8cfe12b69f98fb936e51404a9cf54b8d330ce805e174c0b020dcc606d9c2906a76eccb9e41fe2e1afe6f525599fb471e6c7c72a6216d72a499cddcee96e1b49e
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
types:
|
|
9
|
+
- opened
|
|
10
|
+
- reopened
|
|
11
|
+
- synchronize
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: "${{ github.workflow }}-${{ github.ref }}"
|
|
15
|
+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
contents: read
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
test:
|
|
22
|
+
name: "Ruby ${{ matrix.ruby }} / ${{ matrix.gemfile }} / Rails ${{ matrix.rails || 'pinned' }}"
|
|
23
|
+
runs-on: ubuntu-22.04
|
|
24
|
+
timeout-minutes: 15
|
|
25
|
+
|
|
26
|
+
strategy:
|
|
27
|
+
fail-fast: false
|
|
28
|
+
matrix:
|
|
29
|
+
ruby:
|
|
30
|
+
- "3.4"
|
|
31
|
+
- "3.3"
|
|
32
|
+
gemfile:
|
|
33
|
+
- gemfiles/rails-6.0-mongo.gemfile
|
|
34
|
+
- gemfiles/rails-6.0-mongoid.gemfile
|
|
35
|
+
include:
|
|
36
|
+
- { ruby: "3.1", rails: "~> 6.1.0", mongoid: "~> 8.0", mongodb: "6.0", gemfile: gemfiles/rails-current-mongo.gemfile }
|
|
37
|
+
- { ruby: "3.1", rails: "~> 6.1.0", mongoid: "~> 8.0", mongodb: "6.0", gemfile: gemfiles/rails-current-mongoid.gemfile }
|
|
38
|
+
- { ruby: "3.1", rails: "~> 7.0.0", mongoid: "~> 8.0", mongodb: "6.0", gemfile: gemfiles/rails-current-mongo.gemfile }
|
|
39
|
+
- { ruby: "3.1", rails: "~> 7.0.0", mongoid: "~> 8.0", mongodb: "6.0", gemfile: gemfiles/rails-current-mongoid.gemfile }
|
|
40
|
+
- { ruby: "3.2", rails: "~> 7.1.0", mongoid: "~> 8.0", mongodb: "6.0", gemfile: gemfiles/rails-current-mongo.gemfile }
|
|
41
|
+
- { ruby: "3.2", rails: "~> 7.1.0", mongoid: "~> 8.0", mongodb: "6.0", gemfile: gemfiles/rails-current-mongoid.gemfile }
|
|
42
|
+
- { ruby: "3.3", rails: "~> 7.2.0", mongoid: "~> 9.0", mongodb: "7.0", gemfile: gemfiles/rails-current-mongo.gemfile }
|
|
43
|
+
- { ruby: "3.3", rails: "~> 7.2.0", mongoid: "~> 9.0", mongodb: "7.0", gemfile: gemfiles/rails-current-mongoid.gemfile }
|
|
44
|
+
- { ruby: "3.4", rails: "~> 8.0.0", mongoid: "~> 9.0", mongodb: "8.0", sqlite: "~> 2.1", gemfile: gemfiles/rails-current-mongo.gemfile }
|
|
45
|
+
- { ruby: "3.4", rails: "~> 8.0.0", mongoid: "~> 9.0", mongodb: "8.0", sqlite: "~> 2.1", gemfile: gemfiles/rails-current-mongoid.gemfile }
|
|
46
|
+
- gemfile: gemfiles/rails-8.1-mongo.gemfile
|
|
47
|
+
ruby: "3.4"
|
|
48
|
+
mongodb: "8.0"
|
|
49
|
+
- gemfile: gemfiles/rails-8.1-mongoid.gemfile
|
|
50
|
+
ruby: "3.4"
|
|
51
|
+
mongodb: "8.0"
|
|
52
|
+
- gemfile: gemfiles/rails-8.1-mongo.gemfile
|
|
53
|
+
ruby: "4.0"
|
|
54
|
+
mongodb: "8.0"
|
|
55
|
+
- gemfile: gemfiles/rails-8.1-mongoid.gemfile
|
|
56
|
+
ruby: "4.0"
|
|
57
|
+
mongodb: "8.0"
|
|
58
|
+
coverage: "true"
|
|
59
|
+
- gemfile: gemfiles/rails-5.2-mongo.gemfile
|
|
60
|
+
ruby: "2.7"
|
|
61
|
+
- gemfile: gemfiles/rails-5.2-mongoid.gemfile
|
|
62
|
+
ruby: "2.7"
|
|
63
|
+
- gemfile: gemfiles/rails-5.1-mongo.gemfile
|
|
64
|
+
ruby: "2.6"
|
|
65
|
+
- gemfile: gemfiles/rails-5.1-mongoid.gemfile
|
|
66
|
+
ruby: "2.6"
|
|
67
|
+
- gemfile: gemfiles/rails-5.0-mongo.gemfile
|
|
68
|
+
ruby: "2.6"
|
|
69
|
+
- gemfile: gemfiles/rails-5.0-mongoid.gemfile
|
|
70
|
+
ruby: "2.6"
|
|
71
|
+
|
|
72
|
+
services:
|
|
73
|
+
mongodb:
|
|
74
|
+
image: mongo:${{ matrix.mongodb || '4.4' }}
|
|
75
|
+
ports:
|
|
76
|
+
- 27017:27017
|
|
77
|
+
options: >-
|
|
78
|
+
--health-cmd "bash -c 'echo > /dev/tcp/127.0.0.1/27017'"
|
|
79
|
+
--health-interval 10s
|
|
80
|
+
--health-timeout 5s
|
|
81
|
+
--health-retries 10
|
|
82
|
+
|
|
83
|
+
env:
|
|
84
|
+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
|
85
|
+
COVERAGE: ${{ matrix.coverage }}
|
|
86
|
+
RAILS_VERSION: ${{ matrix.rails }}
|
|
87
|
+
MONGOID_VERSION: ${{ matrix.mongoid }}
|
|
88
|
+
SQLITE_VERSION: ${{ matrix.sqlite || '~> 1.4' }}
|
|
89
|
+
|
|
90
|
+
steps:
|
|
91
|
+
- name: Checkout project
|
|
92
|
+
uses: actions/checkout@v7
|
|
93
|
+
|
|
94
|
+
- name: Set up Ruby
|
|
95
|
+
uses: ruby/setup-ruby@v1
|
|
96
|
+
with:
|
|
97
|
+
ruby-version: ${{ matrix.ruby }}
|
|
98
|
+
bundler-cache: true
|
|
99
|
+
|
|
100
|
+
- name: Run tests
|
|
101
|
+
run: bundle exec rake test
|
|
102
|
+
|
|
103
|
+
- name: Cover Mongo adapter
|
|
104
|
+
if: ${{ matrix.coverage == 'true' }}
|
|
105
|
+
env:
|
|
106
|
+
BUNDLE_GEMFILE: gemfiles/rails-8.1-mongo.gemfile
|
|
107
|
+
run: |
|
|
108
|
+
bundle install --jobs 4 --retry 3
|
|
109
|
+
bundle exec rake test
|
|
110
|
+
|
|
111
|
+
- name: Report coverage
|
|
112
|
+
if: ${{ matrix.coverage == 'true' }}
|
|
113
|
+
uses: coverallsapp/github-action@v2
|
|
114
|
+
with:
|
|
115
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
116
|
+
file: coverage/.resultset.json
|
|
117
|
+
format: simplecov
|
|
118
|
+
|
|
119
|
+
rubocop:
|
|
120
|
+
name: "RuboCop"
|
|
121
|
+
runs-on: ubuntu-latest
|
|
122
|
+
timeout-minutes: 10
|
|
123
|
+
|
|
124
|
+
steps:
|
|
125
|
+
- name: Checkout project
|
|
126
|
+
uses: actions/checkout@v7
|
|
127
|
+
|
|
128
|
+
- name: Set up Ruby
|
|
129
|
+
uses: ruby/setup-ruby@v1
|
|
130
|
+
with:
|
|
131
|
+
ruby-version: "3.3"
|
|
132
|
+
gemfile: gemfiles/rails-6.0-mongo.gemfile
|
|
133
|
+
bundler-cache: true
|
|
134
|
+
|
|
135
|
+
- name: Run RuboCop
|
|
136
|
+
run: bundle exec rubocop
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: Danger Comment
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows: [Danger]
|
|
6
|
+
types: [completed]
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
actions: read
|
|
11
|
+
issues: write
|
|
12
|
+
pull-requests: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
comment:
|
|
16
|
+
uses: numbata/danger-pr-comment/.github/workflows/danger-comment.yml@v0.1.0
|
|
17
|
+
secrets: inherit
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Danger
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, reopened, edited, synchronize]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: danger-${{ github.event.pull_request.number }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
danger:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
timeout-minutes: 10
|
|
18
|
+
|
|
19
|
+
env:
|
|
20
|
+
BUNDLE_GEMFILE: Gemfile.danger
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- name: Checkout repository
|
|
24
|
+
uses: actions/checkout@v7
|
|
25
|
+
with:
|
|
26
|
+
fetch-depth: 0
|
|
27
|
+
|
|
28
|
+
- name: Set up Ruby
|
|
29
|
+
uses: ruby/setup-ruby@v1
|
|
30
|
+
with:
|
|
31
|
+
ruby-version: '3.4'
|
|
32
|
+
bundler-cache: true
|
|
33
|
+
|
|
34
|
+
- name: Run Danger
|
|
35
|
+
id: danger
|
|
36
|
+
continue-on-error: true
|
|
37
|
+
env:
|
|
38
|
+
DANGER_GITHUB_API_TOKEN: ${{ github.token }}
|
|
39
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
40
|
+
DANGER_REPORT_PATH: ${{ runner.temp }}/danger-report.json
|
|
41
|
+
run: bundle exec danger dry_run
|
|
42
|
+
|
|
43
|
+
- name: Upload Danger report
|
|
44
|
+
if: ${{ always() }}
|
|
45
|
+
uses: actions/upload-artifact@v4
|
|
46
|
+
with:
|
|
47
|
+
name: danger-report
|
|
48
|
+
path: ${{ runner.temp }}/danger-report.json
|
|
49
|
+
if-no-files-found: error
|
|
50
|
+
|
|
51
|
+
- name: Fail if Danger failed
|
|
52
|
+
if: ${{ steps.danger.outcome == 'failure' }}
|
|
53
|
+
run: exit 1
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
|
2
|
+
|
|
1
3
|
AllCops:
|
|
2
|
-
TargetRubyVersion: 2.
|
|
4
|
+
TargetRubyVersion: 2.6
|
|
5
|
+
NewCops: enable
|
|
3
6
|
Include:
|
|
4
|
-
- "
|
|
7
|
+
- "**/*.rb"
|
|
8
|
+
- "**/*.gemspec"
|
|
9
|
+
- "**/*.gemfile"
|
|
10
|
+
- "**/Gemfile"
|
|
11
|
+
- "**/Gemfile.danger"
|
|
12
|
+
- "**/Rakefile"
|
|
13
|
+
- "**/Dangerfile"
|
|
5
14
|
Exclude:
|
|
6
15
|
- "gemfiles/vendor/**/*"
|
|
7
16
|
- "perf/benchmark.rb"
|
|
@@ -21,19 +30,19 @@ Style/StringLiterals:
|
|
|
21
30
|
Style/StringLiteralsInInterpolation:
|
|
22
31
|
EnforcedStyle: double_quotes
|
|
23
32
|
|
|
24
|
-
|
|
33
|
+
Layout/ParameterAlignment:
|
|
25
34
|
EnforcedStyle: with_fixed_indentation
|
|
26
35
|
|
|
27
|
-
|
|
36
|
+
Layout/MultilineOperationIndentation:
|
|
28
37
|
EnforcedStyle: indented
|
|
29
38
|
|
|
30
|
-
|
|
39
|
+
Layout/HashAlignment:
|
|
31
40
|
EnforcedLastArgumentHashStyle: ignore_implicit
|
|
32
41
|
|
|
33
42
|
Style/HashSyntax:
|
|
34
43
|
EnforcedStyle: hash_rockets
|
|
35
44
|
|
|
36
|
-
|
|
45
|
+
Layout/FirstArrayElementIndentation:
|
|
37
46
|
EnforcedStyle: consistent
|
|
38
47
|
|
|
39
48
|
Style/FormatString:
|
data/.rubocop_todo.yml
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# This configuration was generated by
|
|
2
|
+
# `rubocop --auto-gen-config`
|
|
3
|
+
# on 2026-10-17 03:50:12 UTC using RuboCop version 1.92.0.
|
|
4
|
+
# The point is for the user to remove these configuration records
|
|
5
|
+
# one by one as the offenses are removed from the code base.
|
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
|
8
|
+
|
|
9
|
+
# Offense count: 26
|
|
10
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
11
|
+
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation.
|
|
12
|
+
Bundler/OrderedGems:
|
|
13
|
+
Exclude:
|
|
14
|
+
- 'gemfiles/rails-5.0-mongo.gemfile'
|
|
15
|
+
- 'gemfiles/rails-5.0-mongoid.gemfile'
|
|
16
|
+
- 'gemfiles/rails-5.1-mongo.gemfile'
|
|
17
|
+
- 'gemfiles/rails-5.1-mongoid.gemfile'
|
|
18
|
+
- 'gemfiles/rails-5.2-mongo.gemfile'
|
|
19
|
+
- 'gemfiles/rails-5.2-mongoid.gemfile'
|
|
20
|
+
- 'gemfiles/rails-6.0-mongo.gemfile'
|
|
21
|
+
- 'gemfiles/rails-6.0-mongoid.gemfile'
|
|
22
|
+
- 'gemfiles/rails-8.1-mongo.gemfile'
|
|
23
|
+
- 'gemfiles/rails-8.1-mongoid.gemfile'
|
|
24
|
+
- 'gemfiles/rails-current-mongo.gemfile'
|
|
25
|
+
|
|
26
|
+
# Offense count: 1
|
|
27
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
28
|
+
Gemspec/DeprecatedAttributeAssignment:
|
|
29
|
+
Exclude:
|
|
30
|
+
- 'mongo_session_store.gemspec'
|
|
31
|
+
|
|
32
|
+
# Offense count: 3
|
|
33
|
+
# Configuration parameters: EnforcedStyle, AllowedGems.
|
|
34
|
+
# SupportedStyles: Gemfile, gems.rb, gemspec
|
|
35
|
+
Gemspec/DevelopmentDependencies:
|
|
36
|
+
Exclude:
|
|
37
|
+
- 'mongo_session_store.gemspec'
|
|
38
|
+
|
|
39
|
+
# Offense count: 1
|
|
40
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
41
|
+
Gemspec/RequireMFA:
|
|
42
|
+
Exclude:
|
|
43
|
+
- 'mongo_session_store.gemspec'
|
|
44
|
+
|
|
45
|
+
# Offense count: 1
|
|
46
|
+
Gemspec/RequiredRubyVersion:
|
|
47
|
+
Exclude:
|
|
48
|
+
- 'mongo_session_store.gemspec'
|
|
49
|
+
|
|
50
|
+
# Offense count: 1
|
|
51
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
52
|
+
Layout/EmptyLineAfterGuardClause:
|
|
53
|
+
Exclude:
|
|
54
|
+
- 'lib/mongo_session_store/mongo_store.rb'
|
|
55
|
+
|
|
56
|
+
# Offense count: 2
|
|
57
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
58
|
+
# Configuration parameters: EnforcedStyle.
|
|
59
|
+
# SupportedStyles: space, no_space
|
|
60
|
+
Layout/LineContinuationSpacing:
|
|
61
|
+
Exclude:
|
|
62
|
+
- 'lib/mongo_session_store/mongo_store.rb'
|
|
63
|
+
|
|
64
|
+
# Offense count: 1
|
|
65
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
66
|
+
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
67
|
+
# SupportedStyles: aligned, indented
|
|
68
|
+
Layout/LineEndStringConcatenationIndentation:
|
|
69
|
+
Exclude:
|
|
70
|
+
- 'lib/mongo_session_store/mongo_store.rb'
|
|
71
|
+
|
|
72
|
+
# Offense count: 5
|
|
73
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
74
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
75
|
+
Lint/AmbiguousBlockAssociation:
|
|
76
|
+
Exclude:
|
|
77
|
+
- 'spec/lib/mongo_session_store/mongo_store/session_spec.rb'
|
|
78
|
+
- 'spec/lib/mongo_session_store/mongo_store_base_spec.rb'
|
|
79
|
+
|
|
80
|
+
# Offense count: 3
|
|
81
|
+
# Configuration parameters: AllowedMethods.
|
|
82
|
+
# AllowedMethods: enums
|
|
83
|
+
Lint/ConstantDefinitionInBlock:
|
|
84
|
+
Exclude:
|
|
85
|
+
- 'Rakefile'
|
|
86
|
+
|
|
87
|
+
# Offense count: 17
|
|
88
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
89
|
+
# AllowedMethods: refine
|
|
90
|
+
Metrics/BlockLength:
|
|
91
|
+
Max: 215
|
|
92
|
+
|
|
93
|
+
# Offense count: 12
|
|
94
|
+
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
|
95
|
+
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
|
|
96
|
+
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
|
|
97
|
+
Naming/FileName:
|
|
98
|
+
Exclude:
|
|
99
|
+
- 'Rakefile.rb'
|
|
100
|
+
- 'gemfiles/rails-5.0-mongo.gemfile'
|
|
101
|
+
- 'gemfiles/rails-5.0-mongoid.gemfile'
|
|
102
|
+
- 'gemfiles/rails-5.1-mongo.gemfile'
|
|
103
|
+
- 'gemfiles/rails-5.1-mongoid.gemfile'
|
|
104
|
+
- 'gemfiles/rails-5.2-mongo.gemfile'
|
|
105
|
+
- 'gemfiles/rails-5.2-mongoid.gemfile'
|
|
106
|
+
- 'gemfiles/rails-6.0-mongo.gemfile'
|
|
107
|
+
- 'gemfiles/rails-6.0-mongoid.gemfile'
|
|
108
|
+
- 'gemfiles/rails-8.1-mongo.gemfile'
|
|
109
|
+
- 'gemfiles/rails-8.1-mongoid.gemfile'
|
|
110
|
+
- 'gemfiles/rails-current-mongo.gemfile'
|
|
111
|
+
- 'gemfiles/rails-current-mongoid.gemfile'
|
|
112
|
+
|
|
113
|
+
# Offense count: 5
|
|
114
|
+
Security/MarshalLoad:
|
|
115
|
+
Exclude:
|
|
116
|
+
- 'lib/mongo_session_store/mongo_store.rb'
|
|
117
|
+
- 'lib/mongo_session_store/mongoid_store.rb'
|
|
118
|
+
- 'spec/lib/mongo_session_store/mongo_store/session_spec.rb'
|
|
119
|
+
|
|
120
|
+
# Offense count: 34
|
|
121
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
122
|
+
# Configuration parameters: EnforcedStyle.
|
|
123
|
+
# SupportedStyles: always, always_true, never
|
|
124
|
+
Style/FrozenStringLiteralComment:
|
|
125
|
+
Enabled: false
|
|
126
|
+
|
|
127
|
+
# Offense count: 1
|
|
128
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
129
|
+
# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
|
|
130
|
+
Style/GuardClause:
|
|
131
|
+
Exclude:
|
|
132
|
+
- 'Rakefile'
|
|
133
|
+
|
|
134
|
+
# Offense count: 1
|
|
135
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
136
|
+
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
|
137
|
+
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
|
138
|
+
# SupportedShorthandSyntax: always, never, either, consistent, either_consistent
|
|
139
|
+
Style/HashSyntax:
|
|
140
|
+
Exclude:
|
|
141
|
+
- 'Dangerfile'
|
|
142
|
+
|
|
143
|
+
# Offense count: 1
|
|
144
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
145
|
+
Style/IfUnlessModifier:
|
|
146
|
+
Exclude:
|
|
147
|
+
- 'Rakefile'
|
|
148
|
+
|
|
149
|
+
# Offense count: 1
|
|
150
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
151
|
+
# Configuration parameters: InverseMethods, InverseBlocks.
|
|
152
|
+
Style/InverseMethods:
|
|
153
|
+
Exclude:
|
|
154
|
+
- 'spec/support/helpers/test_database_helper.rb'
|
|
155
|
+
|
|
156
|
+
# Offense count: 3
|
|
157
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
158
|
+
# Configuration parameters: EnforcedStyle, Recursive.
|
|
159
|
+
# SupportedStyles: literals, strict
|
|
160
|
+
Style/MutableConstant:
|
|
161
|
+
Exclude:
|
|
162
|
+
- 'Rakefile'
|
|
163
|
+
|
|
164
|
+
# Offense count: 1
|
|
165
|
+
Style/OpenStructUse:
|
|
166
|
+
Exclude:
|
|
167
|
+
- 'spec/lib/mongo_session_store/mongo_store_base_spec.rb'
|
|
168
|
+
|
|
169
|
+
# Offense count: 1
|
|
170
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
171
|
+
Style/RedundantConstantBase:
|
|
172
|
+
Exclude:
|
|
173
|
+
- 'spec/spec_helper.rb'
|
|
174
|
+
|
|
175
|
+
# Offense count: 1
|
|
176
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
177
|
+
Style/RedundantParentheses:
|
|
178
|
+
Exclude:
|
|
179
|
+
- 'lib/mongo_session_store/mongo_store_base.rb'
|
|
180
|
+
|
|
181
|
+
# Offense count: 1
|
|
182
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
183
|
+
# Configuration parameters: EnforcedStyle.
|
|
184
|
+
# SupportedStyles: implicit, explicit
|
|
185
|
+
Style/RescueStandardError:
|
|
186
|
+
Exclude:
|
|
187
|
+
- 'Rakefile'
|
|
188
|
+
|
|
189
|
+
# Offense count: 1
|
|
190
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
191
|
+
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
|
192
|
+
# SupportedStyles: single_quotes, double_quotes
|
|
193
|
+
Style/StringLiterals:
|
|
194
|
+
Exclude:
|
|
195
|
+
- 'Dangerfile'
|
data/CHANGELOG.md
CHANGED
|
@@ -1,26 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
### 3.3.0 (2026/10/18)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
* [#57](https://github.com/mongoid/mongo_session_store/pull/57): Cover legacy session decoding and fix private decoder delegation in the plain-driver adapter - [@dblock](https://github.com/dblock).
|
|
4
|
+
* [#55](https://github.com/mongoid/mongo_session_store/pull/55): Add explicit bulk stale-session cleanup with an application-selected cutoff for both adapters - [@dblock](https://github.com/dblock).
|
|
5
|
+
* [#54](https://github.com/mongoid/mongo_session_store/pull/54): Document and test storing permitted parameter hashes rather than request-bearing Rails parameter objects in sessions - [@dblock](https://github.com/dblock).
|
|
6
|
+
* [#53](https://github.com/mongoid/mongo_session_store/pull/53): Cover Rails 6.1 through 8.0 in CI, update RuboCop, isolate Danger permissions, and report both adapters' coverage to Coveralls - [@dblock](https://github.com/dblock).
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
### 3.2.2 (2026/10/14)
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
* [#51](https://github.com/mongoid/mongo_session_store/pull/51): Modernize CI through Ruby 4.0, Rails 8.1, Mongoid 9 and MongoDB 8 while retaining legacy Rails combinations - [@dblock](https://github.com/dblock).
|
|
11
|
+
* [#51](https://github.com/mongoid/mongo_session_store/pull/51): Explicitly load ActionDispatch before defining the session store - [@dblock](https://github.com/dblock).
|
|
12
|
+
* [#48](https://github.com/mongoid/mongo_session_store/pull/48): Migrate Danger to danger-pr-comment - [@dblock](https://github.com/dblock).
|
|
13
|
+
|
|
14
|
+
### 3.2.1 (2020/04/27)
|
|
8
15
|
|
|
9
16
|
* [#45](https://github.com/mongoid/mongo_session_store/pull/45): Add Rails 6.0 to test setup - [@tombruijn](https://github.com/tombruijn).
|
|
10
17
|
* [#46](https://github.com/mongoid/mongo_session_store/pull/46): Fix Rack::Session::Cookie middleware bug - [@streetlogics](https://github.com/streetlogics) & [@tombruijn](https://github.com/tombruijn).
|
|
11
18
|
|
|
12
|
-
|
|
19
|
+
### 3.2.0 (2019/04/26)
|
|
13
20
|
|
|
14
21
|
* [#32](https://github.com/mongoid/mongo_session_store/pull/32): Add Rails 5.1 support - [@tombruijn](https://github.com/tombruijn).
|
|
15
22
|
* [#36](https://github.com/mongoid/mongo_session_store/pull/36): Add gem specific main error class - [@tombruijn](https://github.com/tombruijn).
|
|
16
23
|
* [#38](https://github.com/mongoid/mongo_session_store/pull/38): Support rails 5.2 - [@tombruijn](https://github.com/tombruijn).
|
|
17
24
|
* [#41](https://github.com/mongoid/mongo_session_store/pull/41): Add Ruby 2.5 and 2.6 support - [@tombruijn](https://github.com/tombruijn).
|
|
18
25
|
|
|
19
|
-
|
|
26
|
+
### 3.1.0 (2017/05/02)
|
|
20
27
|
|
|
21
28
|
* [#31](https://github.com/mongoid/mongo_session_store/pull/31): Add Rails 5.0 support - [@tombruijn](https://github.com/tombruijn).
|
|
22
29
|
|
|
23
|
-
|
|
30
|
+
### 3.0.0 (2017/04/27)
|
|
24
31
|
|
|
25
32
|
* Drop Ruby 1.8, 1.9 and 2.0 support - [@tombruijn](https://github.com/tombruijn).
|
|
26
33
|
* Drop explicit MongoMapper support - [@tombruijn](https://github.com/tombruijn).
|
|
@@ -39,7 +46,7 @@
|
|
|
39
46
|
* [#28](https://github.com/mongoid/mongo_session_store/pull/28): Support Ruby 2.4 - [@tombruijn](https://github.com/tombruijn).
|
|
40
47
|
* [#29](https://github.com/mongoid/mongo_session_store/pull/29): Use rails default session id generation - [@tombruijn](https://github.com/tombruijn).
|
|
41
48
|
|
|
42
|
-
|
|
49
|
+
### 2.0.0 (2010/10/13)
|
|
43
50
|
|
|
44
51
|
* Fix MongoMapper indexes - [@nmerouze](https://github.com/nmerouze).
|
|
45
52
|
* Add Rails 3 support for Mongoid - [@nmerouze](https://github.com/nmerouze).
|
|
@@ -47,23 +54,23 @@
|
|
|
47
54
|
* Support MongoMapper 0.7.5 - [@hsbt](https://github.com/hsbt).
|
|
48
55
|
* Fix issue where ActionPack expects `set_session` to return the (new) session_id when session is created successfully - [@memuller](https://github.com/memuller).
|
|
49
56
|
|
|
50
|
-
|
|
57
|
+
### 1.1.2 (2010/03/05)
|
|
51
58
|
|
|
52
59
|
* Generate a new session document if the current session document doesn't exist - [@shingara](https://github.com/shingara).
|
|
53
60
|
|
|
54
|
-
|
|
61
|
+
### 1.1.1 (2010/02/21)
|
|
55
62
|
|
|
56
63
|
* Fix `updated_at` index for MongoMapper session documents - [@nmerouze](https://github.com/nmerouze).
|
|
57
64
|
|
|
58
|
-
|
|
65
|
+
### 1.1.0 (2010/02/17)
|
|
59
66
|
|
|
60
67
|
* Add Mongoid support - [@nmerouze](https://github.com/nmerouze).
|
|
61
68
|
|
|
62
|
-
|
|
69
|
+
### 1.0.1 (2010/01/22)
|
|
63
70
|
|
|
64
71
|
* Add gemspec and specify actionpack dependency - [@nmerouze](https://github.com/nmerouze).
|
|
65
72
|
|
|
66
|
-
|
|
73
|
+
### 1.0.0 (2010/01/22)
|
|
67
74
|
|
|
68
75
|
* Initial version of the gem - [@tpitale](https://github.com/tpitale), [@compressed](https://github.com/compressed).
|
|
69
76
|
* MongoMapper session store support - [@tpitale](https://github.com/tpitale), [@compressed](https://github.com/compressed).
|
data/Dangerfile
CHANGED
data/Gemfile
CHANGED