Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made #make_rule_memory_serializable() use Nanoc::Checksummer #461

Merged
merged 1 commit into from Jul 20, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/nanoc/base/compilation/rules_collection.rb
Expand Up @@ -198,17 +198,17 @@ def new_rule_memory_for_rep(rep)
end
memoize :new_rule_memory_for_rep

# Makes the given rule memory serializable by calling `#inspect` on the
# filter arguments, so that objects such as classes and filenames can be
# serialized.
# Makes the given rule memory serializable by calling
# `Nanoc::Checksummer#calc` on the filter arguments, so that objects such as
# classes and filenames can be serialized.
#
# @param [Array] rs The rule memory for a certain item rep
#
# @return [Array] The serializable rule memory
def make_rule_memory_serializable(rs)
rs.map do |r|
if r[0] == :filter
[ r[0], r[1], r[2].to_a.map { |a| a.inspect } ]
[ r[0], r[1], r[2].to_a.map { |a| Nanoc::Checksummer.calc(a) } ]
else
r
end
Expand Down