nanoc-core 4.11.1 → 4.11.2

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
  SHA256:
3
- metadata.gz: 6b14c2953e85fe025ebc7b886e49e7c5479f9a2a5e4ae490b427760ed916646b
4
- data.tar.gz: cdc17c42152a6ef9474e1406d1f2078884b298833213707b54cd2825785fe448
3
+ metadata.gz: 88b7b9df65548c9c0fc675054ce420c5b81c4be85f42fbe68357a69f74b8dfc3
4
+ data.tar.gz: 668532d1aad92d0775cd521bcc0a17af669e6ccba9431d1e4858eb36e9c8d796
5
5
  SHA512:
6
- metadata.gz: 0b039e4fdf615feb7cacd556600fa3cf967290335d2034cbe9046b59613ea0e8b736078aa83ca2fc2c921869ee50cf4e62f5fa823341674612ae72801df53dbc
7
- data.tar.gz: e1b1374ba0c0bd461de1ccb8ec658dbe65f49c9b0eae2a48efe138757cea4f0f66c0a3b79e0243b9cbc6d6ad312b6a589dbbd3f620bea0948da37b79b82d156d
6
+ metadata.gz: 4eb2feeb52ae3925ae7a877934a595151835939281d3af4a8263b9b54f1ec848255aeb7c68490fb908d0591d3a0eb5378285267b31f7e68c5162a87202fece30
7
+ data.tar.gz: 24f2f09de0e1d872a7253c9e6bc6f7679934ae78877c70bb0e009853a965abb4c3514bda94350dd4d8c13220205c1eb5b4fced77c29cb7e53b645399c8167f4c
@@ -41,6 +41,11 @@ module Nanoc
41
41
  def binary?
42
42
  raise NotImplementedError
43
43
  end
44
+
45
+ contract C::None => C::Bool
46
+ def textual?
47
+ !binary?
48
+ end
44
49
  end
45
50
  end
46
51
  end
@@ -48,6 +48,10 @@ module Nanoc
48
48
  @thread.join
49
49
  end
50
50
 
51
+ def force_stop
52
+ @queue << DONE
53
+ end
54
+
51
55
  def on(name, id = nil, &block)
52
56
  @notifications[name] << { id: id, block: block }
53
57
  end
@@ -88,6 +92,11 @@ module Nanoc
88
92
  @_instance = nil
89
93
  end
90
94
 
95
+ def force_reset
96
+ instance.force_stop
97
+ @_instance = nil
98
+ end
99
+
91
100
  def sync
92
101
  instance.sync
93
102
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Nanoc
4
4
  module Core
5
- VERSION = '4.11.1'
5
+ VERSION = '4.11.2'
6
6
  end
7
7
  end
data/lib/nanoc/core.rb CHANGED
@@ -9,52 +9,28 @@ require 'ddmemoize'
9
9
  require 'ddmetrics'
10
10
  require 'ddplugin'
11
11
  require 'hamster'
12
+ require 'zeitwerk'
12
13
 
13
14
  DDMemoize.enable_metrics
14
15
 
15
- module Nanoc
16
- # @api private
17
- module Core
16
+ inflector_class = Class.new(Zeitwerk::Inflector) do
17
+ def camelize(basename, abspath)
18
+ case basename
19
+ when 'version'
20
+ 'VERSION'
21
+ else
22
+ super(basename.tr('-', '_'), abspath.tr('-', '_'))
23
+ end
18
24
  end
19
25
  end
20
26
 
21
- require 'nanoc/core/version'
27
+ loader = Zeitwerk::Loader.new
28
+ loader.inflector = inflector_class.new
29
+ loader.push_dir(__dir__ + '/..')
30
+ loader.ignore(File.expand_path('core/core_ext', __dir__))
31
+ loader.setup
32
+ loader.eager_load
22
33
 
23
- require 'nanoc/core/contracts_support'
24
- require 'nanoc/core/lazy_value'
25
- require 'nanoc/core/error'
26
-
27
- require 'nanoc/core/code_snippet'
28
- require 'nanoc/core/configuration'
29
- require 'nanoc/core/content'
30
- require 'nanoc/core/context'
31
- require 'nanoc/core/directed_graph'
32
- require 'nanoc/core/pattern'
33
- require 'nanoc/core/identifiable_collection'
34
- require 'nanoc/core/identifier'
35
- require 'nanoc/core/core_ext/array'
36
- require 'nanoc/core/core_ext/hash'
37
- require 'nanoc/core/core_ext/string'
38
- require 'nanoc/core/temp_filename_factory'
39
-
40
- require 'nanoc/core/binary_content'
41
- require 'nanoc/core/item_collection'
42
- require 'nanoc/core/layout_collection'
43
- require 'nanoc/core/regexp_pattern'
44
- require 'nanoc/core/string_pattern'
45
- require 'nanoc/core/textual_content'
46
-
47
- require 'nanoc/core/document'
48
- require 'nanoc/core/item'
49
- require 'nanoc/core/layout'
50
-
51
- require 'nanoc/core/item_rep'
52
- require 'nanoc/core/snapshot_def'
53
-
54
- require 'nanoc/core/checksummer'
55
- require 'nanoc/core/notification_center'
56
-
57
- require 'nanoc/core/processing_action'
58
- require 'nanoc/core/processing_actions'
59
-
60
- require 'nanoc/core/data_source'
34
+ require_relative 'core/core_ext/array'
35
+ require_relative 'core/core_ext/hash'
36
+ require_relative 'core/core_ext/string'
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.11.1
4
+ version: 4.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Defreyne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-09 00:00:00.000000000 Z
11
+ date: 2019-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ddmemoize
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.19'
83
+ - !ruby/object:Gem::Dependency
84
+ name: zeitwerk
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.0'
83
97
  description: Contains the core of Nanoc
84
98
  email: denis+rubygems@denis.ws
85
99
  executables: []