<commit_before>class EventConfiguration < ActiveRecord::Base
  attr_accessible :artistic_closed_date, :contact_email, :currency, :dates_description, :event_url, :location, :logo_image, :long_name, :short_name, :standard_skill, :standard_skill_closed_date, :start_date, :tshirt_closed_date, :test_mode, :waiver, :waiver_url, :comp_noncomp_url

  validates :short_name, :long_name, :presence => true
  validates :event_url, :format => URI::regexp(%w(http https)), :unless => "event_url.nil?"
  validates :comp_noncomp_url, :format => URI::regexp(%w(http https)), :unless => "comp_noncomp_url.nil? or comp_noncomp_url.empty?"
  

  validates :test_mode, :inclusion => { :in => [true, false] } # because it's a boolean
  validates :waiwer, :inclusion => { :in => [true, false] } # because it's a boolean
  validates :standard_skill, :inclusion => { :in => [true, false] } # because it's a boolean
  
  if EventConfiguration.first.standard_skilsel
    validates :standard_skill_closed_date, :presence => true
  end

  after_initialize :init

  def init
    self.test_mode = true if self.test_mode.nil?
  end

  def logo_image=(input_data)
    self.logo_filename = input_data.original_filename
    self.logo_type = input_data.content_type.chomp
    self.logo_binary = input_data.read
  end

  def self.paypal_base_url
    paypal_test_url = "https://www.sandbox.paypal.com"
    paypal_live_url = "https://www.paypal.com"<commit_msg>Fix typos in event config model<commit_after>class EventConfiguration < ActiveRecord::Base
  attr_accessible :artistic_closed_date, :contact_email, :currency, :dates_description, :event_url, :location, :logo_image, :long_name, :short_name, :standard_skill, :standard_skill_closed_date, :start_date, :tshirt_closed_date, :test_mode, :waiver, :waiver_url, :comp_noncomp_url

  validates :short_name, :long_name, :presence => true
  validates :event_url, :format => URI::regexp(%w(http https)), :unless => "event_url.nil?"
  validates :comp_noncomp_url, :format => URI::regexp(%w(http https)), :unless => "comp_noncomp_url.nil? or comp_noncomp_url.empty?"
  

  validates :test_mode, :inclusion => { :in => [true, false] } # because it's a boolean
  validates :waiver, :inclusion => { :in => [true, false] } # because it's a boolean
  validates :standard_skill, :inclusion => { :in => [true, false] } # because it's a boolean
  
  if EventConfiguration.first.standard_skill
    validates :standard_skill_closed_date, :presence => true
  end

  after_initialize :init

  def init
    self.test_mode = true if self.test_mode.nil?
  end

  def logo_image=(input_data)
    self.logo_filename = input_data.original_filename
    self.logo_type = input_data.content_type.chomp
    self.logo_binary = input_data.read
  end

  def self.paypal_base_url
    paypal_test_url = "https://www.sandbox.paypal.com"
    paypal_live_url = "https://www.paypal.com"
{'fraction_non_alphanumeric': 0.12351709699930216, 'fraction_numerical': 0.0, 'mean_word_length': 5.287280701754386, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, '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': '343273', 'n_tokens_mistral': 999, 'n_tokens_neox': 976, 'n_words': 210}