nanoc-core 4.12.20 → 4.12.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nanoc/core/checksummer.rb +12 -7
- data/lib/nanoc/core/core_ext/array.rb +12 -8
- data/lib/nanoc/core/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6675a38101ebd10dc14bdea793786af898d8824034f13386ae3ebd1b66ca6f5
|
4
|
+
data.tar.gz: b4618d8ac489152d3bd30274365aea2fccda7a96f75875b25dbca604d0fac9a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5db81b09e8c17f60baa6b190bb52864bf2ba526cb38c5e6d304c46021c00e6a0ed6aa7d9e8d55221398cd5dee7535e910ed5859fba7084bdb5950ace2a4eb6c6
|
7
|
+
data.tar.gz: 8c90d0f5dea91f2bd4d5d67f5280a34428f58553689cfc9b5576222a5a37378f46bf0668c4400426f3e2008320d106db7617ccaa8166045c7f66d033f14374fc
|
@@ -61,14 +61,19 @@ module Nanoc
|
|
61
61
|
|
62
62
|
private
|
63
63
|
|
64
|
-
def update(obj, digest, visited =
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
digest.update(
|
64
|
+
def update(obj, digest, visited = {})
|
65
|
+
num = visited[obj]
|
66
|
+
if num
|
67
|
+
# If there already is an entry for this object, refer to it by its number.
|
68
|
+
digest.update("@#{num}")
|
69
69
|
else
|
70
|
-
|
71
|
-
|
70
|
+
# This object isn’t known yet. Assign it a new number.
|
71
|
+
num = visited.length
|
72
|
+
visited[obj] = num
|
73
|
+
|
74
|
+
digest.update(obj.class.to_s)
|
75
|
+
digest.update("##{num}<")
|
76
|
+
behavior_for(obj).update(obj, digest) { |o| update(o, digest, visited) }
|
72
77
|
digest.update('>')
|
73
78
|
end
|
74
79
|
end
|
@@ -10,19 +10,23 @@ module Nanoc
|
|
10
10
|
#
|
11
11
|
# @return [Array] The converted array
|
12
12
|
def __nanoc_symbolize_keys_recursively
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
map do |element|
|
14
|
+
if element.respond_to?(:__nanoc_symbolize_keys_recursively)
|
15
|
+
element.__nanoc_symbolize_keys_recursively
|
16
|
+
else
|
17
|
+
element
|
18
|
+
end
|
16
19
|
end
|
17
|
-
array
|
18
20
|
end
|
19
21
|
|
20
22
|
def __nanoc_stringify_keys_recursively
|
21
|
-
|
22
|
-
|
23
|
-
|
23
|
+
map do |element|
|
24
|
+
if element.respond_to?(:__nanoc_stringify_keys_recursively)
|
25
|
+
element.__nanoc_stringify_keys_recursively
|
26
|
+
else
|
27
|
+
element
|
28
|
+
end
|
24
29
|
end
|
25
|
-
array
|
26
30
|
end
|
27
31
|
|
28
32
|
# Freezes the contents of the array, as well as all array elements. The
|
data/lib/nanoc/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanoc-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.12.
|
4
|
+
version: 4.12.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Defreyne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: base64
|
@@ -322,7 +322,7 @@ licenses:
|
|
322
322
|
- MIT
|
323
323
|
metadata:
|
324
324
|
rubygems_mfa_required: 'true'
|
325
|
-
source_code_uri: https://github.com/nanoc/nanoc/tree/nanoc-core-v4.12.
|
325
|
+
source_code_uri: https://github.com/nanoc/nanoc/tree/nanoc-core-v4.12.21/nanoc-core
|
326
326
|
post_install_message:
|
327
327
|
rdoc_options: []
|
328
328
|
require_paths:
|
@@ -338,7 +338,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
338
338
|
- !ruby/object:Gem::Version
|
339
339
|
version: '0'
|
340
340
|
requirements: []
|
341
|
-
rubygems_version: 3.5.
|
341
|
+
rubygems_version: 3.5.9
|
342
342
|
signing_key:
|
343
343
|
specification_version: 4
|
344
344
|
summary: Core of Nanoc
|