nanoc-core 4.12.18 → 4.12.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: feba3686286baa1b227829a6cd05785969bcc62049263e96bfcc50486c1d0d16
4
- data.tar.gz: 17bffd3f7fb1b07d1705be8d9e034525612dc086d3d05d459e3b05d6ac61d49e
3
+ metadata.gz: 335b65420add649070e6039d804ea84e64b08971860ad0a68f5c0d618a8e0c7f
4
+ data.tar.gz: de87b4aa5a63db41455b0872c2aa11dc2244092a5fdfb2aad91ce7cf0cc6c7f6
5
5
  SHA512:
6
- metadata.gz: e7c0887edf8c734cc0aff3328748162799c04604fea18262fdb91596702c1864f107d5a514dd347827ac7a1035d077e09ccb754d307c6be246304b67a75dcf51
7
- data.tar.gz: d0b05bcd9e6697cbe8bf268ffb50af9cdecd35e4ab83fc079a6dc4e08a03681a9461a7fdf268f5ac2c92d55db4fd3188c91581f6162db17f86b05662d198327a
6
+ metadata.gz: 4fe24428563ad00a6bd055a6497e4871825db82d8233d7058ee5f67ec749f7034434d5a65c54f62d03c564e24149178667babb86abf7059afaeb0fd55a382e66
7
+ data.tar.gz: 916affac84faa3b85957454f2833ffc486474474bea5c26af9c47e8a5ea7209e9049345400b24b50706d0fde5ab491a9b8aa901b8221d74b4d365831f4be781e
@@ -4,8 +4,6 @@ module Nanoc
4
4
  module Core
5
5
  # @api private
6
6
  class ConfigLoader
7
- PERMITTED_YAML_CLASSES = [Symbol, Date, Time].freeze
8
-
9
7
  class NoConfigFileFoundError < ::Nanoc::Core::Error
10
8
  def initialize
11
9
  super('No configuration file found')
@@ -56,7 +54,7 @@ module Nanoc
56
54
  end
57
55
 
58
56
  def load_file(filename)
59
- YAML.safe_load_file(filename, permitted_classes: PERMITTED_YAML_CLASSES)
57
+ YamlLoader.load_file(filename)
60
58
  end
61
59
 
62
60
  # @api private
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Nanoc
4
4
  module Core
5
- VERSION = '4.12.18'
5
+ VERSION = '4.12.19'
6
6
  end
7
7
  end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nanoc
4
+ module Core
5
+ # @api private
6
+ module YamlLoader
7
+ OPTIONS = {
8
+ permitted_classes: [Symbol, Date, Time].freeze,
9
+ aliases: true,
10
+ }.freeze
11
+
12
+ private_constant :OPTIONS
13
+
14
+ def self.load(yaml_string)
15
+ YAML.safe_load(yaml_string, **OPTIONS)
16
+ end
17
+
18
+ def self.load_file(filename)
19
+ YAML.safe_load_file(filename, **OPTIONS)
20
+ end
21
+ end
22
+ end
23
+ end
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.18
4
+ version: 4.12.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Defreyne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-15 00:00:00.000000000 Z
11
+ date: 2023-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -98,16 +98,22 @@ dependencies:
98
98
  name: psych
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '4.0'
104
+ - - "<"
105
+ - !ruby/object:Gem::Version
106
+ version: '6.0'
104
107
  type: :runtime
105
108
  prerelease: false
106
109
  version_requirements: !ruby/object:Gem::Requirement
107
110
  requirements:
108
- - - "~>"
111
+ - - ">="
109
112
  - !ruby/object:Gem::Version
110
113
  version: '4.0'
114
+ - - "<"
115
+ - !ruby/object:Gem::Version
116
+ version: '6.0'
111
117
  - !ruby/object:Gem::Dependency
112
118
  name: slow_enumerator_tools
113
119
  requirement: !ruby/object:Gem::Requirement
@@ -296,11 +302,13 @@ files:
296
302
  - lib/nanoc/core/view_context_for_compilation.rb
297
303
  - lib/nanoc/core/view_context_for_pre_compilation.rb
298
304
  - lib/nanoc/core/view_context_for_shell.rb
305
+ - lib/nanoc/core/yaml_loader.rb
299
306
  homepage: https://nanoc.ws/
300
307
  licenses:
301
308
  - MIT
302
309
  metadata:
303
310
  rubygems_mfa_required: 'true'
311
+ source_code_uri: https://github.com/nanoc/nanoc/tree/nanoc-core-v4.12.19/nanoc-core
304
312
  post_install_message:
305
313
  rdoc_options: []
306
314
  require_paths:
@@ -316,7 +324,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
316
324
  - !ruby/object:Gem::Version
317
325
  version: '0'
318
326
  requirements: []
319
- rubygems_version: 3.4.20
327
+ rubygems_version: 3.4.22
320
328
  signing_key:
321
329
  specification_version: 4
322
330
  summary: Core of Nanoc