activerecord-session_store 1.1.1 → 1.1.2
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.rb +6 -2
- data/lib/active_record/session_store/version.rb +1 -1
- 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: 5e2e1e0844945a064585c4c4a31355830f6586a9175704255a14049798f5fcf2
|
4
|
+
data.tar.gz: b0915247c9a76ef5c63678c0f0ad046378291bdcf94b1bfbcdeca643a010b64a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cd613dbc4b3a84ef0313700aab7222f47e7f6137768564a89e92c0c99583878c18c1c0d5afbaa80ca0e8a2acf0d1705f0a8154f2e89a99fa30af6a947e12926
|
7
|
+
data.tar.gz: a7c262c0d3922c6929d36e6bf909dc6b386dd43f7aadbd19f7e6707f14ba116c570a6f94a4176f548a2e73bbb22cf3c87ffd3c7303664ae4c2eba2f4aaf28acd
|
@@ -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"
|
@@ -108,11 +109,14 @@ module ActiveRecord
|
|
108
109
|
end
|
109
110
|
end
|
110
111
|
|
111
|
-
|
112
|
+
ActiveSupport.on_load(:active_record) do
|
113
|
+
require 'active_record/session_store/session'
|
114
|
+
ActionDispatch::Session::ActiveRecordStore.session_class = ActiveRecord::SessionStore::Session
|
115
|
+
end
|
116
|
+
|
112
117
|
require 'active_record/session_store/sql_bypass'
|
113
118
|
require 'active_record/session_store/railtie' if defined?(Rails)
|
114
119
|
|
115
|
-
ActionDispatch::Session::ActiveRecordStore.session_class = ActiveRecord::SessionStore::Session
|
116
120
|
Logger.send :include, ActiveRecord::SessionStore::Extension::LoggerSilencer
|
117
121
|
|
118
122
|
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.2
|
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-01 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.2
|
167
152
|
signing_key:
|
168
153
|
specification_version: 4
|
169
154
|
summary: An Action Dispatch session store backed by an Active Record class.
|