activerecord-session_store 1.1.1 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of activerecord-session_store might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/action_dispatch/session/active_record_store.rb +1 -1
- data/lib/active_record/session_store/session.rb +2 -0
- data/lib/active_record/session_store/version.rb +1 -1
- data/lib/active_record/session_store.rb +7 -2
- data/lib/generators/active_record/session_migration_generator.rb +4 -0
- data/lib/generators/active_record/templates/migration.rb +1 -1
- data/lib/tasks/database.rake +0 -1
- metadata +3 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af08a0134b3e5a615c2d9f400c30c9d0b4f5327e21c1254f49cfec775ef73732
|
4
|
+
data.tar.gz: f6dd6871a3df37d22cc652b54b3f76f41746d9f0c5e01920984a3bcc6d516cf6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 300394f621b26e545ba842e3d8c4a78f733cd34768ede33ab07f7f4abfc168fc1fa60c4b10ea47a7046db896395206201e3a0b0aa1680418bd219998ebbd5b46
|
7
|
+
data.tar.gz: f4fd30af09711cc74e0a7365c6c529c99a1cd47a4aa91f8c0314deb4eb0cd552d8b3824e497e5d9af86ac110c98f3b9d5865b771af1db12993401774bdfd7422
|
@@ -98,7 +98,7 @@ module ActionDispatch
|
|
98
98
|
def delete_session(request, session_id, options)
|
99
99
|
logger.silence_logger do
|
100
100
|
if sid = current_session_id(request)
|
101
|
-
if model =
|
101
|
+
if model = @@session_class.find_by_session_id(sid)
|
102
102
|
data = model.data
|
103
103
|
model.destroy
|
104
104
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'active_record'
|
1
2
|
require 'active_record/session_store/version'
|
2
3
|
require 'action_dispatch/session/active_record_store'
|
3
4
|
require "active_record/session_store/extension/logger_silencer"
|
@@ -6,6 +7,8 @@ require 'multi_json'
|
|
6
7
|
|
7
8
|
module ActiveRecord
|
8
9
|
module SessionStore
|
10
|
+
autoload :Session, 'active_record/session_store/session'
|
11
|
+
|
9
12
|
module ClassMethods # :nodoc:
|
10
13
|
mattr_accessor :serializer
|
11
14
|
|
@@ -108,11 +111,13 @@ module ActiveRecord
|
|
108
111
|
end
|
109
112
|
end
|
110
113
|
|
111
|
-
|
114
|
+
ActiveSupport.on_load(:active_record) do
|
115
|
+
require 'active_record/session_store/session'
|
116
|
+
end
|
117
|
+
|
112
118
|
require 'active_record/session_store/sql_bypass'
|
113
119
|
require 'active_record/session_store/railtie' if defined?(Rails)
|
114
120
|
|
115
|
-
ActionDispatch::Session::ActiveRecordStore.session_class = ActiveRecord::SessionStore::Session
|
116
121
|
Logger.send :include, ActiveRecord::SessionStore::Extension::LoggerSilencer
|
117
122
|
|
118
123
|
begin
|
data/lib/tasks/database.rake
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
namespace 'db:sessions' do
|
2
2
|
desc "Creates a sessions migration for use with ActiveRecord::SessionStore"
|
3
3
|
task :create => [:environment, 'db:load_config'] do
|
4
|
-
raise 'Task unavailable to this database (no migration support)' unless ActiveRecord::Base.connection.supports_migrations?
|
5
4
|
Rails.application.load_generators
|
6
5
|
require 'generators/active_record/session_migration_generator'
|
7
6
|
ActiveRecord::Generators::SessionMigrationGenerator.start [ ENV['MIGRATION'] || 'add_sessions_table' ]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-session_store
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -106,20 +106,6 @@ dependencies:
|
|
106
106
|
- - ">="
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '0'
|
109
|
-
- !ruby/object:Gem::Dependency
|
110
|
-
name: appraisal
|
111
|
-
requirement: !ruby/object:Gem::Requirement
|
112
|
-
requirements:
|
113
|
-
- - "~>"
|
114
|
-
- !ruby/object:Gem::Version
|
115
|
-
version: 2.1.0
|
116
|
-
type: :development
|
117
|
-
prerelease: false
|
118
|
-
version_requirements: !ruby/object:Gem::Requirement
|
119
|
-
requirements:
|
120
|
-
- - "~>"
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
version: 2.1.0
|
123
109
|
description:
|
124
110
|
email: david@loudthinking.com
|
125
111
|
executables: []
|
@@ -162,8 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
148
|
- !ruby/object:Gem::Version
|
163
149
|
version: '0'
|
164
150
|
requirements: []
|
165
|
-
|
166
|
-
rubygems_version: 2.7.3
|
151
|
+
rubygems_version: 3.0.3
|
167
152
|
signing_key:
|
168
153
|
specification_version: 4
|
169
154
|
summary: An Action Dispatch session store backed by an Active Record class.
|