firebug 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69cfa23d0d545d5872bdb14c5a7765e2805d6d37
4
- data.tar.gz: '09242ef207f5c2576f67413a6f3fc939899d36ba'
3
+ metadata.gz: ef6c8ae1e1881ea7e83acd34654b9bb9c04f986f
4
+ data.tar.gz: e71bb0ec5f5befe7b41ea12eb7cbb0510fecb3ba
5
5
  SHA512:
6
- metadata.gz: b87db7bd612ad76f69302c83705d35bc30de23cbbb587b163f03ca687540e0e2869435d9b9d7b04d931708425336906637aff1b808bf3ba6ed40f2ac82868f2d
7
- data.tar.gz: 8de211aadea06efc8a5dd6976175fdc5b64f507eb3b7ed9b24687d07f4fd4cb92a8866fae2ecb20db82a23335107db250d452233ef6aada4e94510f7bd886497
6
+ metadata.gz: 7d4baa0cc89ea7ab978b78e8a293b16770c1c643fa090d19a76021b2f52cc99237768bd8e13279f16d2e61da2f0412ca0ed78d57570a6698165a47fe4d38df0a
7
+ data.tar.gz: aa51002e6552cfbe37f8b36278265508c73b8bf132db3f070bb053fcaecc1c1b0d300025dd94ae415dd92a4c4424548d7ce49ec2957f2cbc7b705e3c9b8d20d3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- firebug (0.1.4)
4
+ firebug (0.1.5)
5
5
  actionpack (~> 5.0)
6
6
  activerecord (~> 5.0)
7
7
  ruby-mcrypt (~> 0.2)
@@ -76,8 +76,12 @@ module ActionDispatch
76
76
  # @return [Firebug::Session]
77
77
  def find_session_model(req, sid=nil)
78
78
  if sid
79
- model = Firebug::Session.find_by(session_id: sid)
79
+ p = { session_id: sid }
80
+ p[:user_agent] = req.user_agent if Firebug.configuration.match_user_agent
81
+ model = Firebug::Session.find_by(p)
80
82
  return model if model
83
+ # use a different session ID in case the reason for not finding the record is because the user_agent
84
+ # didn't match.
81
85
  sid = generate_sid
82
86
  end
83
87
 
@@ -6,11 +6,13 @@ module Firebug
6
6
  # @attr [String] key the encryption key used to encrypt and decrypt cookies.
7
7
  # @attr [String] table_name the name of the sessions table.
8
8
  # @attr [Boolean] truncate_useragent truncate the user-agent to 120 characters.
9
+ # @attr [Boolean] match_user_agent use the user-agent in addition to the session ID.
9
10
  class Configuration
10
11
  attr_reader :table_name
11
12
 
12
13
  attr_accessor :key
13
14
  attr_accessor :truncate_useragent
15
+ attr_accessor :match_user_agent
14
16
 
15
17
  # Sets the table name for +Firebug::Session+
16
18
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Firebug
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firebug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Frase