<commit_before>module SatutempatLocale
  module Server
    class PullHandler
      include Archive::Tar

      def initialize folder_path
        @folder_path      = folder_path
        @last_update_file = "#{ normalize_folder_path(folder_path) }/.last_update"
      end

      def perform!
        raise PullRejectedError unless can_perform?
        puts 'Export from database...'
        export_each
        puts 'Create marker...'
        create_marker
        puts 'Pack folder...'
        pack_folder
        puts 'Done.'
      end

      def file_path
        @file_path
      end

      private
        def export_each
          Storage.export_each SatutempatLocale::Server.configuration.locale_path
        end
<commit_msg>check if folder exist after dump<commit_after>module SatutempatLocale
  module Server
    class PullHandler
      include Archive::Tar

      def initialize folder_path
        @folder_path      = folder_path
        @last_update_file = "#{ normalize_folder_path(folder_path) }/.last_update"
      end

      def perform!
        puts 'Export from database...'
        export_each

        raise PullRejectedError unless can_perform?
        puts 'Create marker...'
        create_marker
        puts 'Pack folder...'
        pack_folder
        puts 'Done.'
      end

      def file_path
        @file_path
      end

      private
        def export_each
          Storage.export_each SatutempatLocale::Server.configuration.locale_path
        end

{'fraction_non_alphanumeric': 0.059379217273954114, 'fraction_numerical': 0.0, 'mean_word_length': 1.995959595959596, 'pattern_counts': {'":': 0, '<': 3, '<?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': '967714', 'n_tokens_mistral': 399, 'n_tokens_neox': 391, 'n_words': 103}