<commit_before>module L
  module Concerns
    # Moduł rozszerzający klase uzytkownika. Dodaje domyślnie role (admin i user).
    # Automatycznie ładuje moduły devise'a [:database_authenticatable, :timeoutable,
    # :rememberable, :trackable, :registerable]. Dodaje accesible dla atrybutów:
    # :email, :password, :password_confirmation, :remember_me. Definuje walidacje
    # dla :email i :password.
    module LazyUser
      extend ActiveSupport::Concern

      included do 
        has_role :admin, :user, default: :user
        
        devise :database_authenticatable, :timeoutable,
               :rememberable, :trackable, :registerable

        attr_accessible :email, :password, :password_confirmation, :remember_me

        validates :email, presence: true, uniqueness: true, format: { with: /\\A([^@\\s]+)@((?:[-a-z0-9]+\\.)+[a-z]{2,})\\Z/i }
        validates :password, presence: true, confirmation: true, length: {minimum: 5}
      end

    end
  end
end
<commit_msg>Quick fix email validation<commit_after>module L
  module Concerns
    # Moduł rozszerzający klase uzytkownika. Dodaje domyślnie role (admin i user).
    # Automatycznie ładuje moduły devise'a [:database_authenticatable, :timeoutable,
    # :rememberable, :trackable, :registerable]. Dodaje accesible dla atrybutów:
    # :email, :password, :password_confirmation, :remember_me. Definuje walidacje
    # dla :email i :password.
    module LazyUser
      extend ActiveSupport::Concern

      included do 
        has_role :admin, :user, default: :user
        
        devise :database_authenticatable, :timeoutable,
               :rememberable, :trackable, :registerable

        attr_accessible :email, :password, :password_confirmation, :remember_me

        validates :email, presence: true, uniqueness: true, format: { with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i }
        validates :password, presence: true, confirmation: true, length: {minimum: 5}
      end

    end
  end
end

{'fraction_non_alphanumeric': 0.11836115326251896, 'fraction_numerical': 0.004046535154274153, 'mean_word_length': 3.356828193832599, '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': '3279752', 'n_tokens_mistral': 665, 'n_tokens_neox': 636, 'n_words': 165}