<commit_before><%#
  # $HeadURL$
  # $Id$
  #
  # Copyright (c) 2009-2010 by Public Library of Science, a non-profit corporation
  # http://www.plos.org/
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  #
  #     http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
-%>
<%
  source ||= form
  options = source.new_record? ? { 
    :url => sources_path,
  } : {
    :url => source_path(source),
    :html => { :method => :put }
  }
%>
<% form_for :source, source, options do |f| %>
  <%= f.error_messages %>
  <input type="hidden" name="source[class]" value="<%= source.class.name %>"/>

  <p>
    <%= f.label :label %><br />
    <%= f.text_field :name, :size => 50 %>
  </p>
  <p>
    <%= f.check_box :active %>
    <%= f.label :active %>
  </p>

  <% if source.uses_url %>
    <p>
      <%= f.label :url, "URL" %><br />
      <%= f.text_field :url, :size => 90 %>
    </p>
  <% end %>
  
  <% if source.uses_search_url %>
    <p>
      <%= f.label :searchURL, "Search URL" %><br />
      <%= f.text_field :searchURL, :size => 90 %>
    </p>
  <% end %>

  <% if source.uses_username %>
    <p>
      <%= f.label :username %><br />
      <%= f.text_field :username %>
    </p>
  <% end %>

  <% if source.uses_partner_id %>
    <p>
      <%= f.label :partner_id, "Partner ID" %><br />
      <%= f.text_field :partner_id %>
    </p>
  <% end %>

  <% if source.uses_password %>
    <p>
      <%= f.label :password %><br />
      <%= f.password_field :password %>
    </p>
  <% end %>

  <% if source.uses_salt %>
    <p>
      <%= f.label "Public URL salt" %><br />
      <%= f.password_field :salt %>
    </p>
  <% end %>

  <% if source.uses_live_mode %>
    <p>
      <%= f.check_box :live_mode %>
      <%= f.label :live_mode %>
    </p>
  <% end %>
  
  <% if Group.find(:all).size > 0 %>
    <p>
      <%= f.label :group  %><br/>
      <%= select "source", "group_id", Group.find(:all).collect { |g| [ g.name, g.id ] },{:include_blank => true} %>
    </p>
  <% end %>
  
  <p>
    <%= f.label :timeout, "Time to wait for a response from each source. (seconds)" %><br />
    <%= f.text_field :timeout, :size => 3 %>
  </p>  

  <p>
    <%= f.label :staleness_days, "Staleness between updates (days)" %><br />
    <%= f.text_field :staleness_days, :size => 5 %>
  </p>

  <% if source.uses_misc %>
    <p>
      <%= f.label :misc %><br />
      <%= f.text_area :misc %>
    </p>
  <% end %>

  <p>
    <%= f.submit(source.new_record? ? "Create" : "Update") %>
  </p>
<% end %>
<commit_msg>updated misc label<commit_after><%#
  # $HeadURL$
  # $Id$
  #
  # Copyright (c) 2009-2010 by Public Library of Science, a non-profit corporation
  # http://www.plos.org/
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  #
  #     http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
-%>
<%
  source ||= form
  options = source.new_record? ? { 
    :url => sources_path,
  } : {
    :url => source_path(source),
    :html => { :method => :put }
  }
%>
<% form_for :source, source, options do |f| %>
  <%= f.error_messages %>
  <input type="hidden" name="source[class]" value="<%= source.class.name %>"/>

  <p>
    <%= f.label :label %><br />
    <%= f.text_field :name, :size => 50 %>
  </p>
  <p>
    <%= f.check_box :active %>
    <%= f.label :active %>
  </p>

  <% if source.uses_url %>
    <p>
      <%= f.label :url, "URL" %><br />
      <%= f.text_field :url, :size => 90 %>
    </p>
  <% end %>
  
  <% if source.uses_search_url %>
    <p>
      <%= f.label :searchURL, "Search URL" %><br />
      <%= f.text_field :searchURL, :size => 90 %>
    </p>
  <% end %>

  <% if source.uses_username %>
    <p>
      <%= f.label :username %><br />
      <%= f.text_field :username %>
    </p>
  <% end %>

  <% if source.uses_partner_id %>
    <p>
      <%= f.label :partner_id, "Partner ID" %><br />
      <%= f.text_field :partner_id %>
    </p>
  <% end %>

  <% if source.uses_password %>
    <p>
      <%= f.label :password %><br />
      <%= f.password_field :password %>
    </p>
  <% end %>

  <% if source.uses_salt %>
    <p>
      <%= f.label "Public URL salt" %><br />
      <%= f.password_field :salt %>
    </p>
  <% end %>

  <% if source.uses_live_mode %>
    <p>
      <%= f.check_box :live_mode %>
      <%= f.label :live_mode %>
    </p>
  <% end %>
  
  <% if Group.find(:all).size > 0 %>
    <p>
      <%= f.label :group  %><br/>
      <%= select "source", "group_id", Group.find(:all).collect { |g| [ g.name, g.id ] },{:include_blank => true} %>
    </p>
  <% end %>
  
  <p>
    <%= f.label :timeout, "Time to wait for a response from each source. (seconds)" %><br />
    <%= f.text_field :timeout, :size => 3 %>
  </p>  

  <p>
    <%= f.label :staleness_days, "Staleness between updates (days)" %><br />
    <%= f.text_field :staleness_days, :size => 5 %>
  </p>

  <% if source.uses_misc %>
    <p>
      <%= f.label :misc, "Miscellaneous Information" %><br />
      <%= f.text_area :misc %>
    </p>
  <% end %>

  <p>
    <%= f.submit(source.new_record? ? "Create" : "Update") %>
  </p>
<% end %>

{'fraction_non_alphanumeric': 0.20003370407819346, 'fraction_numerical': 0.007077856420626896, 'mean_word_length': 2.408960367604825, 'pattern_counts': {'":': 0, '<': 185, '<?xml version=': 0, '>': 207, 'https://': 0, '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': '7226413', 'n_tokens_mistral': 2410, 'n_tokens_neox': 2167, 'n_words': 558}