Skip to content

Commit cd48349

Browse files
committed
Speed up nanoc compilation by providing checksums for items.
Git has unique checksum for each item anyway.
1 parent 7bc6977 commit cd48349

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/nanoc/github.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def items
2323
identifier = Nanoc::Identifier.new("/#{item[:name]}")
2424
metadata, data = decode(item[:content])
2525

26-
new_item(data, metadata, identifier)
26+
new_item(data, metadata, identifier, checksum_data: item[:sha])
2727
end
2828
end
2929
end

test/source_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def test_item
8585
Some content.
8686
EOC
8787
assert_equal ({}), item.attributes
88+
assert_equal "3c612584217e21ae00d532a86e0e35685131dbba", item.checksum_data
8889
end
8990
end
9091

0 commit comments

Comments
 (0)