firebug 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +18 -0
- data/firebug.gemspec +7 -7
- data/lib/action_dispatch/session/code_igniter_store.rb +10 -2
- data/lib/firebug/errors.rb +2 -2
- data/lib/firebug/string_io_reader.rb +4 -1
- data/lib/firebug/version.rb +1 -1
- metadata +13 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47f730e5a45a44a96661d01fc4331f33103c9b306e5a910f5b9ec868f858d960
|
4
|
+
data.tar.gz: 7ebbfa00cacbc730ee3a18666dd6a35b7212fb7baa9fcd9d24017cf28fd5fa8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35361b28047791b6d8f24cad802da7423dcb663f7fa2941f26d9f1fc7489074955b9604941eac1e5fd660305415c37b7ca5aac6c38d4df9d29d16d0d52ee8adc
|
7
|
+
data.tar.gz: 863583e8e78b2f607b0802a77c6ed42a49ca3d646ae0420816cbe4d9bb5b73466ff9d03ef116cccd0ecc5faab8cbce2cd1e76fa35d92efbe92f8ffbe905fd6e1
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# 1.2.2
|
2
|
+
|
3
|
+
* Fix for reading multibyte characters.
|
4
|
+
* Added a test for the multibyte character bug.
|
5
|
+
* Added tests for silence logger
|
6
|
+
* Renamed `Firebug::FirebugError` to `Firebug::Error`.
|
7
|
+
|
8
|
+
# 1.2.1
|
9
|
+
|
10
|
+
* Fixed nested empty hash bug and added a test for it.
|
11
|
+
* Added more documentation.
|
12
|
+
|
13
|
+
# 1.2.0
|
14
|
+
|
15
|
+
* Rewrote `Firebug::Unserializer` to use `StringIO` instead of `StringScanner`.
|
16
|
+
In most cases this results in a 10x performance increase.
|
17
|
+
* Updated `.ruby-version` and `Dockerfile` to use Ruby 2.6
|
18
|
+
* Updated development dependencies.
|
data/firebug.gemspec
CHANGED
@@ -11,21 +11,21 @@ Gem::Specification.new do |spec| # rubocop:disable BlockLength
|
|
11
11
|
spec.email = ['aaron@rvshare.com']
|
12
12
|
|
13
13
|
spec.summary = 'Gem for working with CodeIgniter sessions'
|
14
|
-
spec.description =
|
14
|
+
spec.description = spec.summary
|
15
15
|
spec.homepage = 'https://github.com/rvshare/firebug'
|
16
16
|
spec.license = 'MIT'
|
17
17
|
|
18
|
-
spec.files
|
19
|
-
f.match(%r{^(test|spec|features)/})
|
20
|
-
end
|
18
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
19
|
spec.bindir = 'exe'
|
22
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
21
|
spec.require_paths = ['lib']
|
24
22
|
|
25
|
-
spec.metadata['yard.run']
|
23
|
+
spec.metadata['yard.run'] = 'yri' # use "yard" to build full HTML docs.
|
24
|
+
spec.metadata['changelog_uri'] = 'https://github.com/rvshare/firebug/blob/master/CHANGELOG.md'
|
25
|
+
spec.metadata['source_code_uri'] = spec.homepage
|
26
26
|
|
27
|
-
spec.add_dependency 'actionpack', '
|
28
|
-
spec.add_dependency 'activerecord', '
|
27
|
+
spec.add_dependency 'actionpack', '>= 5.0'
|
28
|
+
spec.add_dependency 'activerecord', '>= 5.0'
|
29
29
|
spec.add_dependency 'ruby-mcrypt', '~> 0.2'
|
30
30
|
|
31
31
|
spec.add_development_dependency 'bundler', '~> 2.0', '>= 2.0.1'
|
@@ -9,6 +9,8 @@ module ActionDispatch # :nodoc:
|
|
9
9
|
class CodeIgniterStore < AbstractStore
|
10
10
|
# The key name used to store the session model in the request env.
|
11
11
|
SESSION_RECORD_KEY = 'rack.session.record'
|
12
|
+
# The request env hash key that has the logger instance.
|
13
|
+
ACTION_DISPATCH_LOGGER_KEY = 'action_dispatch.logger'
|
12
14
|
|
13
15
|
# @param [Object] app
|
14
16
|
# @param [Hash] options
|
@@ -126,6 +128,8 @@ module ActionDispatch # :nodoc:
|
|
126
128
|
Firebug.decrypt_cookie(sid)[:session_id]
|
127
129
|
end
|
128
130
|
|
131
|
+
# Attempts to find an existing session record or returns a new one.
|
132
|
+
#
|
129
133
|
# @param [ActionDispatch::Request] req
|
130
134
|
# @param [String] sid
|
131
135
|
# @return [Firebug::Session]
|
@@ -147,6 +151,8 @@ module ActionDispatch # :nodoc:
|
|
147
151
|
)
|
148
152
|
end
|
149
153
|
|
154
|
+
# The parameters used to find a session in the database.
|
155
|
+
#
|
150
156
|
# @param [ActionDispatch::Request] req
|
151
157
|
# @param [String] sid
|
152
158
|
# @return [Hash]
|
@@ -159,10 +165,12 @@ module ActionDispatch # :nodoc:
|
|
159
165
|
params
|
160
166
|
end
|
161
167
|
|
168
|
+
# If silence logger is enabled, disable logger output for the block.
|
169
|
+
#
|
162
170
|
# @param [ActionDispatch::Request] req
|
163
171
|
def silence_logger(req)
|
164
|
-
logger = req.env[
|
165
|
-
if logger && Firebug.config.silence_logger
|
172
|
+
logger = req.env[ACTION_DISPATCH_LOGGER_KEY] || ActiveRecord::Base.logger
|
173
|
+
if logger.respond_to?(:silence) && Firebug.config.silence_logger
|
166
174
|
logger.silence { yield }
|
167
175
|
else
|
168
176
|
yield
|
data/lib/firebug/errors.rb
CHANGED
@@ -9,7 +9,10 @@ module Firebug
|
|
9
9
|
# @param [Boolean] include If +char+ should be included in the result.
|
10
10
|
# @return [String, nil]
|
11
11
|
def read_until(char, include: true)
|
12
|
-
|
12
|
+
# because UTF-8 is a variable-length encoding and +String#index+ returns the character index, not the byte index,
|
13
|
+
# we use +String#b+ to convert the string to ASCII-8BIT. This forces Ruby to treat each byte as a single
|
14
|
+
# character. This is needed because we have to know how many bytes from +pos+ the +char+ is.
|
15
|
+
if (idx = string.b.index(char, pos)) # rubocop:disable Style/GuardClause
|
13
16
|
read(idx - pos + (include ? 1 : 0))
|
14
17
|
end
|
15
18
|
end
|
data/lib/firebug/version.rb
CHANGED
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firebug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Frase
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03
|
11
|
+
date: 2019-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '5.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activerecord
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '5.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '5.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: ruby-mcrypt
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -233,6 +233,7 @@ files:
|
|
233
233
|
- ".rubocop.yml"
|
234
234
|
- ".ruby-gemset"
|
235
235
|
- ".ruby-version"
|
236
|
+
- CHANGELOG.md
|
236
237
|
- CODE_OF_CONDUCT.md
|
237
238
|
- Gemfile
|
238
239
|
- LICENSE.txt
|
@@ -258,6 +259,8 @@ licenses:
|
|
258
259
|
- MIT
|
259
260
|
metadata:
|
260
261
|
yard.run: yri
|
262
|
+
changelog_uri: https://github.com/rvshare/firebug/blob/master/CHANGELOG.md
|
263
|
+
source_code_uri: https://github.com/rvshare/firebug
|
261
264
|
post_install_message:
|
262
265
|
rdoc_options: []
|
263
266
|
require_paths:
|