<commit_before>#   Copyright (c) 2010, Diaspora Inc.  This file is
#   licensed under the Affero General Public License version 3 or later.  See
#   the COPYRIGHT file.

require File.join(File.dirname(__FILE__), "..", "..", "config", "environment")

def set_app_config username
  current_config = YAML.load(File.read(Rails.root.join('config', 'app_config.yml.example')))
  current_config[Rails.env.to_s] ||= {}
  current_config[Rails.env.to_s]['pod_url'] = "#{username}.joindiaspora.com"
  current_config['default']['pod_url'] = "#{username}.joindiaspora.com"
  file = File.new(Rails.root.join('config','app_config.yml'),'w')
  file.write(current_config.to_yaml)
  file.close
end

username = "tom"
set_app_config username

# Create seed user
user = User.instantiate!( :email => "<EMAIL>",
                     :username => "tom",
                    :password => "<PASSWORD>",
                    :password_confirmation => "<PASSWORD>",
                    :person => Person.new(
                      :profile => Profile.new( :first_name => "Alexander", :last_name => "Hamiltom" ))
                  )
user.person.save!

user2 = User.instantiate!( :email => "<EMAIL>",
                     :username => "korth",
                    :password => "<PASSWORD>",
                    :password_confirmation => "<PASSWORD>",
                    :person => Person.new(
                      :profile => Profile.new( :first_name => "Evan", :last_name => "Korth")))<commit_msg>Don't overwrite existing pod_url in db:seed:dev<commit_after>#   Copyright (c) 2010, Diaspora Inc.  This file is
#   licensed under the Affero General Public License version 3 or later.  See
#   the COPYRIGHT file.

require File.join(File.dirname(__FILE__), "..", "..", "config", "environment")

def set_app_config username
  current_config = YAML.load(File.read(Rails.root.join('config', 'app_config.yml.example')))
  current_config[Rails.env.to_s] ||= {}
  current_config[Rails.env.to_s]['pod_url'] ||= "#{username}.joindiaspora.com"
  current_config['default']['pod_url'] ||= "#{username}.joindiaspora.com"
  file = File.new(Rails.root.join('config','app_config.yml'),'w')
  file.write(current_config.to_yaml)
  file.close
end

username = "tom"
set_app_config username

# Create seed user
user = User.instantiate!( :email => "<EMAIL>",
                     :username => "tom",
                    :password => "<PASSWORD>",
                    :password_confirmation => "<PASSWORD>",
                    :person => Person.new(
                      :profile => Profile.new( :first_name => "Alexander", :last_name => "Hamiltom" ))
                  )
user.person.save!

user2 = User.instantiate!( :email => "<EMAIL>",
                     :username => "korth",
                    :password => "<PASSWORD>",
                    :password_confirmation => "<PASSWORD>",
                    :person => Person.new(
                      :profile => Profile.new( :first_name => "Evan", :last_name => "Korth")))
{'fraction_non_alphanumeric': 0.1622983870967742, 'fraction_numerical': 0.004032258064516129, 'mean_word_length': 2.621654501216545, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 47, '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': '754999', 'n_tokens_mistral': 937, 'n_tokens_neox': 880, 'n_words': 180}