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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69ef2fc8f7b887d468429b3649f00916007a913d805bbd3f1df1631a37e69944
4
- data.tar.gz: 82a554f1d27375976f2c4cfc27bb02c42ff798250d8e1b57446a0a3cf099f2b8
3
+ metadata.gz: 5e2e1e0844945a064585c4c4a31355830f6586a9175704255a14049798f5fcf2
4
+ data.tar.gz: b0915247c9a76ef5c63678c0f0ad046378291bdcf94b1bfbcdeca643a010b64a
5
5
  SHA512:
6
- metadata.gz: 7bde42c0fce200c98e80adfc855bf1f4ca9b91b6990aa1e988917c9998c3822fff14b52a3a8f41b444eec9bd8b2c5a85e729ab7dcb050d1ace893b87df68b2fe
7
- data.tar.gz: 3094effc2159cafd363cf085e670d3f09cd33f8a90d994ce4717be1c6ed8a06319717b6d2785ee30630df20413ac35b13e43a0a419485a65b41dca69474aced8
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 = get_session_model(request, sid)
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
- require 'active_record/session_store/session'
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
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module SessionStore
3
- VERSION = '1.1.1'
3
+ VERSION = "1.1.2".freeze
4
4
  end
5
5
  end
@@ -19,6 +19,10 @@ module ActiveRecord
19
19
  end
20
20
  current_table_name
21
21
  end
22
+
23
+ def migration_version
24
+ "[#{ActiveRecord::Migration.current_version}]" if ActiveRecord::Migration.respond_to?(:current_version)
25
+ end
22
26
  end
23
27
  end
24
28
  end
@@ -1,4 +1,4 @@
1
- class <%= migration_class_name %> < ActiveRecord::Migration
1
+ class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version %>
2
2
  def change
3
3
  create_table :<%= session_table_name %> do |t|
4
4
  t.string :session_id, :null => false
@@ -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.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: 2018-03-12 00:00:00.000000000 Z
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
- rubyforge_project:
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.