<commit_before>unless Object.const_defined?(:Rake) or Object.const_defined?(:POTLATCH2_KEY)
  OpenStreetMap::Application.config.after_initialize do
    unless webmaster = User.find_by_email("<EMAIL>")
      webmaster = User.create({
        :display_name => "<NAME>",
        :email => "<EMAIL>",
        :pass_crypt => SecureRandom.hex,
        :status => "active"
      }, :without_protection => true)
    end

    permissions = Hash[ClientApplication.all_permissions.map { |p| [ p, true ] }]

    unless id = webmaster.client_applications.find_by_name("iD")
      id = ClientApplication.create(permissions.merge({
        :name => "iD",
        :url => "http://<%= @site %>/",
      }), :without_protection => true)
    end

    ID_KEY = id.key

    unless potlatch = webmaster.client_applications.find_by_name("Potlatch 2")
      potlatch = ClientApplication.create(permissions.merge({
        :name => "Potlatch 2",
        :url => "http://<%= @site %>/",
      }), :without_protection => true)
    end

    POTLATCH2_KEY = potlatch.key

    unless website = webmaster.client_applications.find_by_name("Web Site")
      website = ClientApplication.create(permissions.merge({
        :name => "Web Site",
        :url => "http://<%= @site %>/",
      }), :without_protection => true)
    end

    OAUTH_KEY = website.key
  end<commit_msg>Avoid mass assignment in the dev server rails setup script<commit_after>unless Object.const_defined?(:Rake) or Object.const_defined?(:POTLATCH2_KEY)
  OpenStreetMap::Application.config.after_initialize do
    unless webmaster = User.find_by_email("<EMAIL>")
      webmaster = User.new
      webmaster.display_name = "<NAME>"
      webmaster.email = "<EMAIL>"
      webmaster.pass_crypt = SecureRandom.hex
      webmaster.status = "active"
      webmaster.save!
    end

    permissions = Hash[ClientApplication.all_permissions.map { |p| [ p, true ] }]

    unless id = webmaster.client_applications.find_by_name("iD")
      id = ClientApplication.new
      id.name = "iD"
      id.url = "http://<%= @site %>/"
      id.save!
    end

    ID_KEY = id.key

    unless potlatch = webmaster.client_applications.find_by_name("Potlatch 2")
      potlatch = ClientApplication.new
      potlatch.name = "Potlatch 2"
      potlatch.url = "http://<%= @site %>/"
      potlatch.save!
    end

    POTLATCH2_KEY = potlatch.key

    unless website = webmaster.client_applications.find_by_name("Web Site")
      website = ClientApplication.new
      website.name = "Web Site"
      website.url = "http://<%= @site %>/"
      website.save!
    end

    OAUTH_KEY = website.key
  end
{'fraction_non_alphanumeric': 0.13721732464545802, 'fraction_numerical': 0.0030663089306247606, 'mean_word_length': 2.984732824427481, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 29, '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': '7385354', 'n_tokens_mistral': 873, 'n_tokens_neox': 837, 'n_words': 158}