<commit_before>require 'fileutils'

# Finalizes the release into a directory in target_path
# 
# The directory name will have the format PREFIX-VERSION
#
module HtmlMockup::Release::Finalizers
  class Dir < Base
    

  end
end<commit_msg>Implement Dir finalizer<commit_after>require 'fileutils'

# Finalizes the release into a directory in target_path
# 
# The directory name will have the format PREFIX-VERSION
#
module HtmlMockup::Release::Finalizers
  class Dir < Base
    
    # @option options :prefix Prefix to put before the version (default = "html")
    def call(release, options = {})
      name = [(options[:prefix] || "html"), release.scm.version].join("-")
      
      release.log(self, "Finalizing release to #{release.target_path + name}")
      FileUtils.cp_r release.build_path, release.target_path + name
    end
  end
end
{'fraction_non_alphanumeric': 0.09619952494061758, 'fraction_numerical': 0.0, 'mean_word_length': 3.9881656804733727, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1356396', 'n_tokens_mistral': 248, 'n_tokens_neox': 247, 'n_words': 80}