lib/nanoc3/base/site.rb in nanoc3-3.1.0b1 vs lib/nanoc3/base/site.rb in nanoc3-3.1.0b2

- old
+ new

@@ -26,11 +26,11 @@ class Site # The default configuration for a data source. A data source's # configuration overrides these options. DEFAULT_DATA_SOURCE_CONFIG = { - :type => 'filesystem_compact', + :type => 'filesystem_unified', :items_root => '/', :layouts_root => '/', :config => {} } @@ -159,12 +159,12 @@ def load_data(force=false) # Don't load data twice return if instance_variable_defined?(:@data_loaded) && @data_loaded && !force # Load all data - data_sources.each { |ds| ds.use } load_code_snippets(force) + data_sources.each { |ds| ds.use } load_rules load_items load_layouts data_sources.each { |ds| ds.unuse } @@ -228,11 +228,11 @@ # Get code snippets @code_snippets = Dir['lib/**/*.rb'].sort.map do |filename| Nanoc3::CodeSnippet.new( File.read(filename), - filename.sub(/^lib\//, ''), + filename, File.stat(filename).mtime ) end # Execute code snippets @@ -250,10 +250,10 @@ # Get rule data @rules = File.read(rules_filename) @rules_mtime = File.stat(rules_filename).mtime # Load DSL - dsl.instance_eval(@rules) + dsl.instance_eval(@rules, "./#{rules_filename}") end # Loads this site’s items, sets up item child-parent relationships and # builds each item's list of item representations. def load_items