nanoc 4.0.0b2 → 4.0.0b3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +11 -22
- data/NEWS.md +20 -0
- data/Rakefile +0 -2
- data/bin/nanoc +0 -2
- data/lib/nanoc.rb +0 -2
- data/lib/nanoc/base.rb +1 -2
- data/lib/nanoc/base/checksummer.rb +0 -2
- data/lib/nanoc/base/compilation/checksum_store.rb +0 -2
- data/lib/nanoc/base/compilation/compiled_content_cache.rb +0 -2
- data/lib/nanoc/base/compilation/compiler.rb +0 -2
- data/lib/nanoc/base/compilation/compiler_dsl.rb +0 -2
- data/lib/nanoc/base/compilation/dependency_tracker.rb +0 -2
- data/lib/nanoc/base/compilation/filter.rb +0 -2
- data/lib/nanoc/base/compilation/item_rep_proxy.rb +0 -2
- data/lib/nanoc/base/compilation/item_rep_recorder_proxy.rb +0 -2
- data/lib/nanoc/base/compilation/outdatedness_checker.rb +0 -2
- data/lib/nanoc/base/compilation/outdatedness_reasons.rb +0 -2
- data/lib/nanoc/base/compilation/rule.rb +0 -2
- data/lib/nanoc/base/compilation/rule_context.rb +0 -2
- data/lib/nanoc/base/compilation/rule_memory_calculator.rb +0 -2
- data/lib/nanoc/base/compilation/rule_memory_store.rb +0 -2
- data/lib/nanoc/base/compilation/rules_collection.rb +0 -2
- data/lib/nanoc/base/context.rb +0 -2
- data/lib/nanoc/base/core_ext.rb +0 -2
- data/lib/nanoc/base/core_ext/array.rb +0 -2
- data/lib/nanoc/base/core_ext/hash.rb +0 -2
- data/lib/nanoc/base/core_ext/pathname.rb +0 -2
- data/lib/nanoc/base/core_ext/string.rb +0 -2
- data/lib/nanoc/base/directed_graph.rb +0 -2
- data/lib/nanoc/base/error.rb +0 -2
- data/lib/nanoc/base/errors.rb +0 -2
- data/lib/nanoc/base/identifiable_collection.rb +0 -2
- data/lib/nanoc/base/memoization.rb +0 -2
- data/lib/nanoc/base/notification_center.rb +0 -2
- data/lib/nanoc/base/pattern.rb +0 -2
- data/lib/nanoc/base/plugin_registry.rb +0 -2
- data/lib/nanoc/base/result_data/item_rep.rb +0 -2
- data/lib/nanoc/base/source_data/code_snippet.rb +0 -2
- data/lib/nanoc/base/source_data/configuration.rb +0 -2
- data/lib/nanoc/base/source_data/data_source.rb +0 -2
- data/lib/nanoc/base/source_data/identifier.rb +0 -2
- data/lib/nanoc/base/source_data/item.rb +0 -2
- data/lib/nanoc/base/source_data/layout.rb +0 -2
- data/lib/nanoc/base/source_data/site.rb +1 -3
- data/lib/nanoc/base/store.rb +0 -2
- data/lib/nanoc/base/temp_filename_factory.rb +0 -2
- data/lib/nanoc/base/views/config.rb +0 -2
- data/lib/nanoc/base/views/identifiable_collection.rb +0 -2
- data/lib/nanoc/base/views/item.rb +3 -5
- data/lib/nanoc/base/views/item_collection.rb +0 -2
- data/lib/nanoc/base/views/item_rep.rb +0 -2
- data/lib/nanoc/base/views/item_rep_collection.rb +48 -0
- data/lib/nanoc/base/views/layout.rb +0 -2
- data/lib/nanoc/base/views/layout_collection.rb +0 -2
- data/lib/nanoc/base/views/mutable_config.rb +0 -2
- data/lib/nanoc/base/views/mutable_identifiable_collection.rb +0 -2
- data/lib/nanoc/base/views/mutable_item.rb +0 -2
- data/lib/nanoc/base/views/mutable_item_collection.rb +0 -2
- data/lib/nanoc/base/views/mutable_layout.rb +0 -2
- data/lib/nanoc/base/views/mutable_layout_collection.rb +0 -2
- data/lib/nanoc/base/views/site.rb +0 -2
- data/lib/nanoc/cli.rb +0 -2
- data/lib/nanoc/cli/ansi_string_colorizer.rb +0 -2
- data/lib/nanoc/cli/cleaning_stream.rb +0 -2
- data/lib/nanoc/cli/command_runner.rb +0 -2
- data/lib/nanoc/cli/commands/check.rb +0 -2
- data/lib/nanoc/cli/commands/compile.rb +0 -2
- data/lib/nanoc/cli/commands/create-site.rb +7 -25
- data/lib/nanoc/cli/commands/deploy.rb +0 -2
- data/lib/nanoc/cli/commands/nanoc.rb +0 -2
- data/lib/nanoc/cli/commands/prune.rb +0 -2
- data/lib/nanoc/cli/commands/shell.rb +0 -2
- data/lib/nanoc/cli/commands/show-data.rb +0 -2
- data/lib/nanoc/cli/commands/show-plugins.rb +0 -2
- data/lib/nanoc/cli/commands/show-rules.rb +0 -2
- data/lib/nanoc/cli/commands/view.rb +0 -2
- data/lib/nanoc/cli/error_handler.rb +0 -2
- data/lib/nanoc/cli/logger.rb +0 -2
- data/lib/nanoc/cli/stream_cleaners.rb +0 -2
- data/lib/nanoc/cli/stream_cleaners/abstract.rb +0 -2
- data/lib/nanoc/cli/stream_cleaners/ansi_colors.rb +0 -2
- data/lib/nanoc/cli/stream_cleaners/utf8.rb +0 -2
- data/lib/nanoc/data_sources.rb +1 -5
- data/lib/nanoc/data_sources/filesystem.rb +2 -2
- data/lib/nanoc/data_sources/filesystem_unified.rb +0 -2
- data/lib/nanoc/extra.rb +0 -2
- data/lib/nanoc/extra/checking.rb +0 -2
- data/lib/nanoc/extra/checking/check.rb +23 -15
- data/lib/nanoc/extra/checking/checks.rb +0 -2
- data/lib/nanoc/extra/checking/checks/css.rb +1 -3
- data/lib/nanoc/extra/checking/checks/external_links.rb +0 -2
- data/lib/nanoc/extra/checking/checks/html.rb +1 -3
- data/lib/nanoc/extra/checking/checks/internal_links.rb +3 -5
- data/lib/nanoc/extra/checking/checks/mixed_content.rb +0 -2
- data/lib/nanoc/extra/checking/checks/stale.rb +2 -4
- data/lib/nanoc/extra/checking/dsl.rb +0 -2
- data/lib/nanoc/extra/checking/issue.rb +0 -2
- data/lib/nanoc/extra/checking/runner.rb +1 -3
- data/lib/nanoc/extra/core_ext.rb +0 -2
- data/lib/nanoc/extra/core_ext/pathname.rb +0 -2
- data/lib/nanoc/extra/core_ext/time.rb +0 -2
- data/lib/nanoc/extra/deployer.rb +0 -2
- data/lib/nanoc/extra/deployers.rb +0 -2
- data/lib/nanoc/extra/deployers/fog.rb +40 -8
- data/lib/nanoc/extra/deployers/rsync.rb +0 -2
- data/lib/nanoc/extra/filesystem_tools.rb +0 -2
- data/lib/nanoc/extra/jruby_nokogiri_warner.rb +0 -2
- data/lib/nanoc/extra/link_collector.rb +0 -2
- data/lib/nanoc/extra/piper.rb +0 -2
- data/lib/nanoc/extra/pruner.rb +0 -2
- data/lib/nanoc/filters.rb +0 -2
- data/lib/nanoc/filters/asciidoc.rb +0 -2
- data/lib/nanoc/filters/bluecloth.rb +0 -2
- data/lib/nanoc/filters/coffeescript.rb +0 -2
- data/lib/nanoc/filters/colorize_syntax.rb +0 -2
- data/lib/nanoc/filters/erb.rb +0 -2
- data/lib/nanoc/filters/erubis.rb +0 -2
- data/lib/nanoc/filters/haml.rb +0 -2
- data/lib/nanoc/filters/handlebars.rb +0 -2
- data/lib/nanoc/filters/kramdown.rb +0 -2
- data/lib/nanoc/filters/less.rb +0 -2
- data/lib/nanoc/filters/markaby.rb +0 -2
- data/lib/nanoc/filters/maruku.rb +0 -2
- data/lib/nanoc/filters/mustache.rb +0 -2
- data/lib/nanoc/filters/pandoc.rb +0 -2
- data/lib/nanoc/filters/rainpress.rb +0 -2
- data/lib/nanoc/filters/rdiscount.rb +0 -2
- data/lib/nanoc/filters/rdoc.rb +0 -2
- data/lib/nanoc/filters/redcarpet.rb +0 -2
- data/lib/nanoc/filters/redcloth.rb +0 -2
- data/lib/nanoc/filters/relativize_paths.rb +0 -2
- data/lib/nanoc/filters/rubypants.rb +0 -2
- data/lib/nanoc/filters/sass.rb +0 -2
- data/lib/nanoc/filters/sass/sass_filesystem_importer.rb +0 -2
- data/lib/nanoc/filters/slim.rb +0 -2
- data/lib/nanoc/filters/typogruby.rb +0 -2
- data/lib/nanoc/filters/uglify_js.rb +0 -2
- data/lib/nanoc/filters/xsl.rb +0 -2
- data/lib/nanoc/filters/yui_compressor.rb +0 -2
- data/lib/nanoc/helpers.rb +0 -2
- data/lib/nanoc/helpers/blogging.rb +0 -2
- data/lib/nanoc/helpers/breadcrumbs.rb +0 -2
- data/lib/nanoc/helpers/capturing.rb +0 -2
- data/lib/nanoc/helpers/filtering.rb +0 -2
- data/lib/nanoc/helpers/html_escape.rb +0 -2
- data/lib/nanoc/helpers/link_to.rb +0 -2
- data/lib/nanoc/helpers/rendering.rb +0 -2
- data/lib/nanoc/helpers/tagging.rb +0 -2
- data/lib/nanoc/helpers/text.rb +0 -2
- data/lib/nanoc/helpers/xml_sitemap.rb +0 -2
- data/lib/nanoc/version.rb +1 -3
- data/nanoc.gemspec +1 -3
- data/tasks/doc.rake +0 -2
- data/tasks/test.rake +0 -2
- data/test/base/checksummer_spec.rb +0 -2
- data/test/base/core_ext/array_spec.rb +0 -2
- data/test/base/core_ext/hash_spec.rb +0 -2
- data/test/base/core_ext/pathname_spec.rb +0 -2
- data/test/base/core_ext/string_spec.rb +0 -2
- data/test/base/temp_filename_factory_spec.rb +0 -2
- data/test/base/test_checksum_store.rb +0 -2
- data/test/base/test_code_snippet.rb +0 -2
- data/test/base/test_compiler.rb +0 -2
- data/test/base/test_compiler_dsl.rb +1 -3
- data/test/base/test_context.rb +0 -2
- data/test/base/test_data_source.rb +0 -2
- data/test/base/test_dependency_tracker.rb +0 -2
- data/test/base/test_directed_graph.rb +0 -2
- data/test/base/test_filter.rb +0 -2
- data/test/base/test_item.rb +0 -2
- data/test/base/test_item_array.rb +0 -2
- data/test/base/test_item_rep.rb +0 -2
- data/test/base/test_item_rep_recorder_proxy.rb +0 -2
- data/test/base/test_layout.rb +0 -2
- data/test/base/test_memoization.rb +0 -2
- data/test/base/test_notification_center.rb +0 -2
- data/test/base/test_outdatedness_checker.rb +1 -3
- data/test/base/test_plugin.rb +0 -2
- data/test/base/test_rule.rb +0 -2
- data/test/base/test_rule_context.rb +0 -2
- data/test/base/test_site.rb +1 -3
- data/test/base/test_store.rb +0 -2
- data/test/cli/commands/test_check.rb +0 -2
- data/test/cli/commands/test_compile.rb +0 -2
- data/test/cli/commands/test_create_site.rb +1 -3
- data/test/cli/commands/test_deploy.rb +0 -2
- data/test/cli/commands/test_help.rb +0 -2
- data/test/cli/commands/test_info.rb +0 -2
- data/test/cli/commands/test_prune.rb +2 -4
- data/test/cli/test_cleaning_stream.rb +0 -2
- data/test/cli/test_cli.rb +0 -6
- data/test/cli/test_error_handler.rb +0 -2
- data/test/cli/test_logger.rb +0 -2
- data/test/data_sources/test_filesystem.rb +0 -2
- data/test/data_sources/test_filesystem_unified.rb +15 -2
- data/test/extra/checking/checks/test_css.rb +3 -5
- data/test/extra/checking/checks/test_external_links.rb +5 -7
- data/test/extra/checking/checks/test_html.rb +2 -4
- data/test/extra/checking/checks/test_internal_links.rb +5 -7
- data/test/extra/checking/checks/test_mixed_content.rb +8 -10
- data/test/extra/checking/checks/test_stale.rb +1 -3
- data/test/extra/checking/test_check.rb +2 -6
- data/test/extra/checking/test_dsl.rb +0 -2
- data/test/extra/checking/test_runner.rb +0 -2
- data/test/extra/core_ext/test_pathname.rb +0 -2
- data/test/extra/core_ext/test_time.rb +0 -2
- data/test/extra/deployers/test_fog.rb +147 -2
- data/test/extra/deployers/test_rsync.rb +0 -2
- data/test/extra/test_filesystem_tools.rb +0 -2
- data/test/extra/test_link_collector.rb +0 -2
- data/test/extra/test_piper.rb +0 -2
- data/test/filters/test_asciidoc.rb +0 -2
- data/test/filters/test_bluecloth.rb +0 -2
- data/test/filters/test_coffeescript.rb +0 -2
- data/test/filters/test_colorize_syntax.rb +0 -2
- data/test/filters/test_erb.rb +0 -2
- data/test/filters/test_erubis.rb +0 -2
- data/test/filters/test_haml.rb +0 -2
- data/test/filters/test_handlebars.rb +0 -2
- data/test/filters/test_kramdown.rb +0 -2
- data/test/filters/test_less.rb +0 -2
- data/test/filters/test_markaby.rb +0 -2
- data/test/filters/test_maruku.rb +0 -2
- data/test/filters/test_mustache.rb +0 -2
- data/test/filters/test_pandoc.rb +0 -2
- data/test/filters/test_rainpress.rb +0 -2
- data/test/filters/test_rdiscount.rb +0 -2
- data/test/filters/test_rdoc.rb +0 -2
- data/test/filters/test_redcarpet.rb +0 -2
- data/test/filters/test_redcloth.rb +0 -2
- data/test/filters/test_relativize_paths.rb +0 -2
- data/test/filters/test_rubypants.rb +0 -2
- data/test/filters/test_sass.rb +0 -2
- data/test/filters/test_slim.rb +0 -2
- data/test/filters/test_typogruby.rb +0 -2
- data/test/filters/test_uglify_js.rb +0 -2
- data/test/filters/test_xsl.rb +0 -2
- data/test/filters/test_yui_compressor.rb +0 -2
- data/test/gem_loader.rb +0 -2
- data/test/helper.rb +1 -3
- data/test/helpers/test_blogging.rb +0 -2
- data/test/helpers/test_breadcrumbs.rb +0 -2
- data/test/helpers/test_capturing.rb +0 -2
- data/test/helpers/test_filtering.rb +0 -2
- data/test/helpers/test_html_escape.rb +0 -2
- data/test/helpers/test_link_to.rb +0 -2
- data/test/helpers/test_rendering.rb +0 -2
- data/test/helpers/test_tagging.rb +0 -2
- data/test/helpers/test_text.rb +0 -2
- data/test/helpers/test_xml_sitemap.rb +0 -2
- data/test/test_gem.rb +0 -5
- metadata +5 -6
- data/lib/nanoc/data_sources/filesystem_verbose.rb +0 -71
- data/test/data_sources/test_filesystem_verbose.rb +0 -308
@@ -1,5 +1,3 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
1
|
module Nanoc::Int
|
4
2
|
# The in-memory representation of a nanoc site. It holds references to the
|
5
3
|
# following site data:
|
@@ -21,7 +19,7 @@ module Nanoc::Int
|
|
21
19
|
# The default configuration for a data source. A data source's
|
22
20
|
# configuration overrides these options.
|
23
21
|
DEFAULT_DATA_SOURCE_CONFIG = {
|
24
|
-
type: '
|
22
|
+
type: 'filesystem',
|
25
23
|
items_root: '/',
|
26
24
|
layouts_root: '/',
|
27
25
|
config: {},
|
data/lib/nanoc/base/store.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
1
|
module Nanoc
|
4
2
|
class ItemView
|
5
3
|
# @api private
|
@@ -107,7 +105,7 @@ module Nanoc
|
|
107
105
|
#
|
108
106
|
# @return [nil] if the item has no parent
|
109
107
|
def parent
|
110
|
-
Nanoc::ItemView.new(@item.parent)
|
108
|
+
@item.parent && Nanoc::ItemView.new(@item.parent)
|
111
109
|
end
|
112
110
|
|
113
111
|
# @return [Boolean] True if the item is binary, false otherwise
|
@@ -127,9 +125,9 @@ module Nanoc
|
|
127
125
|
|
128
126
|
# Returns the representations of this item.
|
129
127
|
#
|
130
|
-
# @return [
|
128
|
+
# @return [Nanoc::ItemRepCollectionView]
|
131
129
|
def reps
|
132
|
-
|
130
|
+
Nanoc::ItemRepCollectionView.new(@item.reps)
|
133
131
|
end
|
134
132
|
|
135
133
|
# @api private
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module Nanoc
|
2
|
+
class ItemRepCollectionView
|
3
|
+
include Enumerable
|
4
|
+
|
5
|
+
# @api private
|
6
|
+
def initialize(item_reps)
|
7
|
+
@item_reps = item_reps
|
8
|
+
end
|
9
|
+
|
10
|
+
# @api private
|
11
|
+
def unwrap
|
12
|
+
@item_reps
|
13
|
+
end
|
14
|
+
|
15
|
+
def to_ary
|
16
|
+
@item_reps.map { |ir| Nanoc::ItemRepView.new(ir) }
|
17
|
+
end
|
18
|
+
|
19
|
+
# Calls the given block once for each item rep, passing that item rep as a parameter.
|
20
|
+
#
|
21
|
+
# @yieldparam [Nanoc::ItemRepView] item rep
|
22
|
+
#
|
23
|
+
# @yieldreturn [void]
|
24
|
+
#
|
25
|
+
# @return [self]
|
26
|
+
def each
|
27
|
+
@item_reps.each { |ir| yield Nanoc::ItemRepView.new(ir) }
|
28
|
+
self
|
29
|
+
end
|
30
|
+
|
31
|
+
# @return [Integer]
|
32
|
+
def size
|
33
|
+
@item_reps.size
|
34
|
+
end
|
35
|
+
|
36
|
+
# Return the item rep with the given name, or nil if no item rep exists.
|
37
|
+
#
|
38
|
+
# @param [Symbol] rep_name
|
39
|
+
#
|
40
|
+
# @return [nil] if no item rep with the given name was found
|
41
|
+
#
|
42
|
+
# @return [Nanoc::ItemRepView] if an item rep with the given name was found
|
43
|
+
def [](rep_name)
|
44
|
+
res = @item_reps.find { |ir| ir.name == rep_name }
|
45
|
+
res && Nanoc::ItemRepView.new(res)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
data/lib/nanoc/cli.rb
CHANGED
@@ -1,11 +1,7 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
1
|
usage 'create-site [options] path'
|
4
2
|
aliases :create_site, :cs
|
5
3
|
summary 'create a site'
|
6
|
-
description "
|
7
|
-
Create a new site at the given path. The site will use the `filesystem_unified` data source by default, but this can be changed using the `--datasource` command-line option.
|
8
|
-
"
|
4
|
+
description "Create a new site at the given path. The site will use the `filesystem` data source."
|
9
5
|
flag nil, :force, "Force creation of new site. Disregards previous existence of site in destination"
|
10
6
|
|
11
7
|
module Nanoc::CLI::Commands
|
@@ -62,8 +58,7 @@ prune:
|
|
62
58
|
# “layout/” directories in the site directory.
|
63
59
|
data_sources:
|
64
60
|
-
|
65
|
-
# The type is the identifier of the data source.
|
66
|
-
# `filesystem_unified`.
|
61
|
+
# The type is the identifier of the data source.
|
67
62
|
type: #{Nanoc::Int::Site::DEFAULT_DATA_SOURCE_CONFIG[:type]}
|
68
63
|
|
69
64
|
# The path where items should be mounted (comparable to mount points in
|
@@ -77,18 +72,13 @@ data_sources:
|
|
77
72
|
# same as the items root, but applies to layouts rather than items.
|
78
73
|
layouts_root: #{Nanoc::Int::Site::DEFAULT_DATA_SOURCE_CONFIG[:layouts_root]}
|
79
74
|
|
80
|
-
# Whether to allow periods in identifiers. When turned off, everything
|
81
|
-
# past the first period is considered to be the extension, and when
|
82
|
-
# turned on, only the characters past the last period are considered to
|
83
|
-
# be the extension. For example, a file named “content/about.html.erb”
|
84
|
-
# will have the identifier “/about/” when turned off, but when turned on
|
85
|
-
# it will become “/about.html/” instead.
|
86
|
-
allow_periods_in_identifiers: false
|
87
|
-
|
88
75
|
# The encoding to use for input files. If your input files are not in
|
89
76
|
# UTF-8 (which they should be!), change this.
|
90
77
|
encoding: utf-8
|
91
78
|
|
79
|
+
# The kind of identifier to use for items and layouts. The default is
|
80
|
+
# “full”, meaning that identifiers include file extensions. This can also
|
81
|
+
# be “legacy”, primarily used by older nanoc sites.
|
92
82
|
identifier_type: full
|
93
83
|
|
94
84
|
# Configuration for the “check” command, which run unit tests on the site.
|
@@ -291,14 +281,11 @@ EOS
|
|
291
281
|
EOS
|
292
282
|
|
293
283
|
def run
|
294
|
-
#
|
284
|
+
# Extract arguments
|
295
285
|
if arguments.length != 1
|
296
286
|
raise Nanoc::Int::Errors::GenericTrivial, "usage: #{command.usage}"
|
297
287
|
end
|
298
|
-
|
299
|
-
# Extract arguments and options
|
300
|
-
path = arguments[0]
|
301
|
-
data_source = options[:datasource] || 'filesystem_unified'
|
288
|
+
path = arguments[0]
|
302
289
|
|
303
290
|
# Check whether site exists
|
304
291
|
if File.exist?(path) && (!File.directory?(path) || !(Dir.entries(path) - %w{ . .. }).empty?) && !options[:force]
|
@@ -307,11 +294,6 @@ EOS
|
|
307
294
|
"Re-run the command using --force to create the site anyway."
|
308
295
|
end
|
309
296
|
|
310
|
-
# Check whether data source exists
|
311
|
-
if Nanoc::DataSource.named(data_source).nil?
|
312
|
-
raise Nanoc::Int::Errors::GenericTrivial, "Unrecognised data source: #{data_source}"
|
313
|
-
end
|
314
|
-
|
315
297
|
# Setup notifications
|
316
298
|
Nanoc::Int::NotificationCenter.on(:file_created) do |file_path|
|
317
299
|
Nanoc::CLI::Logger.instance.file(:high, :create, file_path)
|
data/lib/nanoc/cli/logger.rb
CHANGED
data/lib/nanoc/data_sources.rb
CHANGED
@@ -1,12 +1,8 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
1
|
# @api private
|
4
2
|
module Nanoc::DataSources
|
5
3
|
autoload 'Filesystem', 'nanoc/data_sources/filesystem'
|
6
4
|
autoload 'FilesystemUnified', 'nanoc/data_sources/filesystem_unified'
|
7
|
-
autoload 'FilesystemVerbose', 'nanoc/data_sources/filesystem_verbose'
|
8
5
|
|
9
|
-
Nanoc::DataSource.register '::Nanoc::DataSources::FilesystemVerbose', :filesystem_verbose
|
10
6
|
Nanoc::DataSource.register '::Nanoc::DataSources::FilesystemUnified', :filesystem_unified
|
11
|
-
Nanoc::DataSource.register '::Nanoc::DataSources::
|
7
|
+
Nanoc::DataSource.register '::Nanoc::DataSources::FilesystemUnified', :filesystem
|
12
8
|
end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
1
|
module Nanoc::DataSources
|
4
2
|
# Provides functionality common across all filesystem data sources.
|
5
3
|
#
|
@@ -47,6 +45,8 @@ module Nanoc::DataSources
|
|
47
45
|
def load_objects(dir_name, kind, klass)
|
48
46
|
res = []
|
49
47
|
|
48
|
+
return [] if dir_name.nil?
|
49
|
+
|
50
50
|
all_split_files_in(dir_name).each do |base_filename, (meta_ext, content_exts)|
|
51
51
|
content_exts.each do |content_ext|
|
52
52
|
# Get filenames
|