hanami-utils 1.3.4 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/hanami-utils.gemspec +1 -1
- data/lib/hanami/logger/filter.rb +12 -1
- data/lib/hanami/utils/files.rb +1 -0
- data/lib/hanami/utils/hash.rb +2 -2
- data/lib/hanami/utils/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4939f478fe78b3060ebf7f744977332a2dea527f84bcd4ba809cf2fc6b9c02d
|
4
|
+
data.tar.gz: 9b291ed5abecc39bd86da3605699b2770fa6f17f16d382802d3691ce4545bd42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39cc6955396c483181fb2ee9aa520fc862fe9a8a8e40bbe248302bda58053f71009ebe143a9d403f27da12236aa6d3e607876c3a5d29b8de97b8b7cbb4fb6e3b
|
7
|
+
data.tar.gz: b789c74a652f67bfa79c6dd349ee77d03af433850cd11e268abf3e1a9050da6bbab9227f48d1b6a61454f9e384662e0d7d8c400c7cf6c4734bf0430594d1a78a
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
# Hanami::Utils
|
2
2
|
Ruby core extentions and class utilities for Hanami
|
3
3
|
|
4
|
+
## v1.3.5 - 2019-10-25
|
5
|
+
### Fixed
|
6
|
+
- [Ivan Kabluchkov] Ensure `Hanami::Logger` filters to not crash when logger stream is a closed tempfile
|
7
|
+
- [Luca Guidi] Ensure `Utils::Files.append` to append contents properly when existing file doesn't end with a newline
|
8
|
+
|
4
9
|
## v1.3.4 - 2019-09-27
|
5
10
|
### Added
|
6
11
|
- [Luca Guidi] Let `Utils::BasicObject` to lookup constants at the top-level namespace
|
data/hanami-utils.gemspec
CHANGED
@@ -22,6 +22,6 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_dependency 'concurrent-ruby', '~> 1.0'
|
23
23
|
|
24
24
|
spec.add_development_dependency 'bundler', '>= 1.6', '< 3'
|
25
|
-
spec.add_development_dependency 'rake', '~>
|
25
|
+
spec.add_development_dependency 'rake', '~> 13'
|
26
26
|
spec.add_development_dependency 'rspec', '~> 3.7'
|
27
27
|
end
|
data/lib/hanami/logger/filter.rb
CHANGED
@@ -42,7 +42,7 @@ module Hanami
|
|
42
42
|
# @api private
|
43
43
|
def _key_paths(hash, base = nil)
|
44
44
|
hash.inject([]) do |results, (k, v)|
|
45
|
-
results + (
|
45
|
+
results + (_key_paths?(v) ? _key_paths(v, _build_path(base, k)) : [_build_path(base, k)])
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
@@ -63,6 +63,17 @@ module Hanami
|
|
63
63
|
res + [correct_key]
|
64
64
|
end
|
65
65
|
end
|
66
|
+
|
67
|
+
# Check if the given value can be iterated (`Enumerable`) and that isn't a `File`.
|
68
|
+
# This is useful to detect closed `Tempfiles`.
|
69
|
+
#
|
70
|
+
# @since 1.3.5
|
71
|
+
# @api private
|
72
|
+
#
|
73
|
+
# @see https://github.com/hanami/utils/pull/342
|
74
|
+
def _key_paths?(value)
|
75
|
+
value.is_a?(Enumerable) && !value.is_a?(File)
|
76
|
+
end
|
66
77
|
end
|
67
78
|
end
|
68
79
|
end
|
data/lib/hanami/utils/files.rb
CHANGED
data/lib/hanami/utils/hash.rb
CHANGED
@@ -6,7 +6,7 @@ module Hanami
|
|
6
6
|
# Hash on steroids
|
7
7
|
# @since 0.1.0
|
8
8
|
#
|
9
|
-
# rubocop:disable ClassLength
|
9
|
+
# rubocop:disable Metrics/ClassLength
|
10
10
|
class Hash
|
11
11
|
# @since 0.6.0
|
12
12
|
# @api private
|
@@ -520,6 +520,6 @@ module Hanami
|
|
520
520
|
@hash.respond_to?(method_name, include_private)
|
521
521
|
end
|
522
522
|
end
|
523
|
-
# rubocop:enable ClassLength
|
523
|
+
# rubocop:enable Metrics/ClassLength
|
524
524
|
end
|
525
525
|
end
|
data/lib/hanami/utils/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanami-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: transproc
|
@@ -64,14 +64,14 @@ dependencies:
|
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
67
|
+
version: '13'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
74
|
+
version: '13'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: rspec
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '0'
|
146
146
|
requirements: []
|
147
|
-
rubygems_version: 3.0.
|
147
|
+
rubygems_version: 3.0.6
|
148
148
|
signing_key:
|
149
149
|
specification_version: 4
|
150
150
|
summary: Ruby core extentions and Hanami utilities
|