<commit_before>module WithoutScope
  module ActsAsRevisable
    module Deletable
      def self.included(base)        
        base.instance_eval do
          define_callbacks :before_revise_on_destroy, :after_revise_on_destroy
        end
      end
      
      def destroy
        now = Time.now
        
        prev = self.revisions.first
        self.revisable_deleted_at = now
        self.revisable_is_current = false
        
        self.revisable_current_at = if prev
          prev.update_attribute(:revisable_revised_at, now)
          prev.revisable_revised_at + 1.second
        else
          self.created_at
        end
        
        self.revisable_revised_at = self.revisable_deleted_at
        
        return false unless run_callbacks(:before_revise_on_destroy) { |r, o| r == false}
        returning(self.save(:without_revision => true)) do
          run_callbacks(:after_revise_on_destroy)
        end<commit_msg>Use Time.zone.new for deleted_at timestamp.<commit_after>module WithoutScope
  module ActsAsRevisable
    module Deletable
      def self.included(base)        
        base.instance_eval do
          define_callbacks :before_revise_on_destroy, :after_revise_on_destroy
        end
      end
      
      def destroy
        now = Time.zone.now
        
        prev = self.revisions.first
        self.revisable_deleted_at = now
        self.revisable_is_current = false
        
        self.revisable_current_at = if prev
          prev.update_attribute(:revisable_revised_at, now)
          prev.revisable_revised_at + 1.second
        else
          self.created_at
        end
        
        self.revisable_revised_at = self.revisable_deleted_at
        
        return false unless run_callbacks(:before_revise_on_destroy) { |r, o| r == false}
        returning(self.save(:without_revision => true)) do
          run_callbacks(:after_revise_on_destroy)
        end
{'fraction_non_alphanumeric': 0.05860805860805861, 'fraction_numerical': 0.0010465724751439038, 'mean_word_length': 2.1089430894308943, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3210581', 'n_tokens_mistral': 579, 'n_tokens_neox': 576, 'n_words': 103}