nanoc 4.11.3 → 4.11.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/NEWS.md +6 -0
- data/lib/nanoc.rb +1 -2
- data/lib/nanoc/base/repos.rb +0 -2
- data/lib/nanoc/base/repos/compiled_content_store.rb +2 -1
- data/lib/nanoc/base/repos/site_loader.rb +1 -1
- data/lib/nanoc/base/services/compiler/stages/preprocess.rb +1 -1
- data/lib/nanoc/cli.rb +1 -1
- data/lib/nanoc/cli/commands/create-site.rb +1 -1
- data/lib/nanoc/rule_dsl/action_provider.rb +1 -1
- data/lib/nanoc/spec.rb +1 -1
- data/lib/nanoc/version.rb +1 -1
- metadata +4 -20
- data/lib/nanoc/base/repos/aggregate_data_source.rb +0 -36
- data/lib/nanoc/base/repos/in_mem_data_source.rb +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f85541e423de2233c7f25fe59e834db564e8bc0e5930c1ba019dceac4a8e031b
|
4
|
+
data.tar.gz: bdb60e52d7503d860ea5e3b8056d267d7e0c13611e210988f4bc604a227c7215
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ce2694d3d47c3e2ed2ba3ed947cbc989b53fdacc2209ca81a555bc40e5768c8d57cb745b7ffe30dd1bf296e0428117d5be9602dd1770c85243fad4f7b923409
|
7
|
+
data.tar.gz: cee8be2b76dbb7a457454abc8bd1347422034f1c80692ebc5b3ce90d64d2a79f2981650a42858079858261b2a2767a017145278204c2bdcd0bb0da8b89ba367f
|
data/LICENSE
CHANGED
data/NEWS.md
CHANGED
data/lib/nanoc.rb
CHANGED
@@ -5,7 +5,6 @@ require 'addressable'
|
|
5
5
|
require 'ddplugin'
|
6
6
|
require 'json'
|
7
7
|
require 'parallel'
|
8
|
-
require 'slow_enumerator_tools'
|
9
8
|
|
10
9
|
module Nanoc
|
11
10
|
# @return [String] A string containing information about this Nanoc version
|
@@ -13,7 +12,7 @@ module Nanoc
|
|
13
12
|
#
|
14
13
|
# @api private
|
15
14
|
def self.version_information
|
16
|
-
"Nanoc #{Nanoc::VERSION} © 2007
|
15
|
+
"Nanoc #{Nanoc::VERSION} © 2007–2019 Denis Defreyne.\n" \
|
17
16
|
"Running #{RUBY_ENGINE} #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) on #{RUBY_PLATFORM} with RubyGems #{Gem::VERSION}.\n"
|
18
17
|
end
|
19
18
|
|
data/lib/nanoc/base/repos.rb
CHANGED
@@ -16,6 +16,4 @@ require_relative 'repos/outdatedness_store'
|
|
16
16
|
require_relative 'repos/action_sequence_store'
|
17
17
|
require_relative 'repos/site_loader'
|
18
18
|
require_relative 'repos/compiled_content_store'
|
19
|
-
require_relative 'repos/in_mem_data_source'
|
20
|
-
require_relative 'repos/aggregate_data_source'
|
21
19
|
require_relative 'repos/prefixed_data_source'
|
@@ -44,7 +44,8 @@ module Nanoc
|
|
44
44
|
contract C::KeywordArgs[rep: Nanoc::Core::ItemRep, snapshot: C::Optional[C::Maybe[Symbol]]] => Nanoc::Core::Content
|
45
45
|
def raw_compiled_content(rep:, snapshot: nil)
|
46
46
|
# Get name of last pre-layout snapshot
|
47
|
-
|
47
|
+
has_pre = rep.snapshot_defs.any? { |sd| sd.name == :pre }
|
48
|
+
snapshot_name = snapshot || (has_pre ? :pre : :last)
|
48
49
|
|
49
50
|
# Check existance of snapshot
|
50
51
|
snapshot_def = rep.snapshot_defs.reverse.find { |sd| sd.name == snapshot_name }
|
@@ -16,7 +16,7 @@ module Nanoc
|
|
16
16
|
return if @site.preprocessed?
|
17
17
|
|
18
18
|
if @action_provider.need_preprocessing?
|
19
|
-
@site.data_source = Nanoc::
|
19
|
+
@site.data_source = Nanoc::Core::InMemDataSource.new(@site.items, @site.layouts, @site.data_source)
|
20
20
|
@action_provider.preprocess(@site)
|
21
21
|
|
22
22
|
@dependency_store.items = @site.items
|
data/lib/nanoc/cli.rb
CHANGED
@@ -128,7 +128,7 @@ module Nanoc::CLI
|
|
128
128
|
begin
|
129
129
|
Bundler.require(:nanoc)
|
130
130
|
rescue Bundler::GemfileNotFound
|
131
|
-
# When running
|
131
|
+
# When running Nanoc with Bundler being defined but
|
132
132
|
# no gemfile being present (rubygems automatically loads
|
133
133
|
# Bundler when executing from command line), don't crash.
|
134
134
|
end
|
@@ -50,7 +50,7 @@ module Nanoc::RuleDSL
|
|
50
50
|
end
|
51
51
|
|
52
52
|
site.data_source =
|
53
|
-
Nanoc::
|
53
|
+
Nanoc::Core::InMemDataSource.new(ctx.items._unwrap, ctx.layouts._unwrap, site.data_source)
|
54
54
|
end
|
55
55
|
|
56
56
|
def postprocess(site, compiler)
|
data/lib/nanoc/spec.rb
CHANGED
data/lib/nanoc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.11.
|
4
|
+
version: 4.11.4
|
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-04-
|
11
|
+
date: 2019-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 4.11.
|
47
|
+
version: 4.11.4
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 4.11.
|
54
|
+
version: 4.11.4
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: parallel
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.12'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: slow_enumerator_tools
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '1.0'
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '1.0'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: tomlrb
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -179,14 +165,12 @@ files:
|
|
179
165
|
- lib/nanoc/base/feature.rb
|
180
166
|
- lib/nanoc/base/repos.rb
|
181
167
|
- lib/nanoc/base/repos/action_sequence_store.rb
|
182
|
-
- lib/nanoc/base/repos/aggregate_data_source.rb
|
183
168
|
- lib/nanoc/base/repos/binary_compiled_content_cache.rb
|
184
169
|
- lib/nanoc/base/repos/checksum_store.rb
|
185
170
|
- lib/nanoc/base/repos/compiled_content_cache.rb
|
186
171
|
- lib/nanoc/base/repos/compiled_content_store.rb
|
187
172
|
- lib/nanoc/base/repos/config_loader.rb
|
188
173
|
- lib/nanoc/base/repos/dependency_store.rb
|
189
|
-
- lib/nanoc/base/repos/in_mem_data_source.rb
|
190
174
|
- lib/nanoc/base/repos/item_rep_repo.rb
|
191
175
|
- lib/nanoc/base/repos/outdatedness_store.rb
|
192
176
|
- lib/nanoc/base/repos/prefixed_data_source.rb
|
@@ -1,36 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Nanoc
|
4
|
-
module Int
|
5
|
-
class AggregateDataSource < Nanoc::DataSource
|
6
|
-
def initialize(data_sources, config)
|
7
|
-
super({}, '/', '/', {})
|
8
|
-
|
9
|
-
@data_sources = data_sources
|
10
|
-
@config = config
|
11
|
-
end
|
12
|
-
|
13
|
-
def items
|
14
|
-
@_items ||= begin
|
15
|
-
objs = @data_sources.flat_map(&:items)
|
16
|
-
Nanoc::Core::ItemCollection.new(@config, objs)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
def layouts
|
21
|
-
@_layouts ||= begin
|
22
|
-
objs = @data_sources.flat_map(&:layouts)
|
23
|
-
Nanoc::Core::LayoutCollection.new(@config, objs)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
def item_changes
|
28
|
-
SlowEnumeratorTools.merge(@data_sources.map(&:item_changes))
|
29
|
-
end
|
30
|
-
|
31
|
-
def layout_changes
|
32
|
-
SlowEnumeratorTools.merge(@data_sources.map(&:layout_changes))
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Nanoc
|
4
|
-
module Int
|
5
|
-
class InMemDataSource < Nanoc::DataSource
|
6
|
-
attr_reader :items
|
7
|
-
attr_reader :layouts
|
8
|
-
|
9
|
-
def initialize(items, layouts, orig_data_source = nil)
|
10
|
-
super({}, '/', '/', {})
|
11
|
-
|
12
|
-
@items = items
|
13
|
-
@layouts = layouts
|
14
|
-
@orig_data_source = orig_data_source
|
15
|
-
end
|
16
|
-
|
17
|
-
def item_changes
|
18
|
-
@orig_data_source ? @orig_data_source.item_changes : super
|
19
|
-
end
|
20
|
-
|
21
|
-
def layout_changes
|
22
|
-
@orig_data_source ? @orig_data_source.layout_changes : super
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|