<commit_before><% @title = @rubygem.name %>
<% @subtitle = @latest_version.try(:slug) %>

<%= content_for :head, auto_discovery_link_tag(:atom, rubygem_versions_path(@rubygem, format: "atom"), {title: "#{@rubygem.name} Version Feed"}) %>

<% if @rubygem.versions.count.zero? %>
  <div class="t-body">
    <p><%= t '.not_hosted_notice' %></p>
  </div>
<% else %>
  <div class="l-overflow">
    <div class="l-colspan--l colspan--l--has-border">
      <% if @latest_version.indexed %>
        <div class="gem__intro">
          <div id="markup" class="gem__desc">
            <%= simple_markup(@latest_version.info) %>
          </div>
        </div>
      <% else %>
        <div class="t-body">
          <p><%= t('.yanked_notice', :more_info_link => link_to(t('.yank_info_link_text'), "http://help.rubygems.org/faqs/gemcutter/removing-a-published-rubygem")).html_safe %></p>
        </div>
      <% end %>

      <% if @versions.present? %>
        <div class="l-half--l">
          <div class="versions">
            <h3 class="t-list__heading"><%= t '.versions_header' %>:</h3>
            <ol class="gem__versions t-list__items">
              <%= render @versions %>
            </ol>
            <% if show_all_versions_link?(@rubygem) %>
              <%= link_to t('.show_all_versions', :count => @rubygem.versions.count), rubygem_versions_url(@rubygem), :class => "gem__see-all-versions t-link--gray t-link--has-arrow" %>
            <% end %>
          </div>
        </div>
      <% end %>

      <%= render :partial => "rubygems/dependencies", :locals => { :dependencies => @latest_version.dependencies.runtime } %>
      <%= render :partial => "rubygems/dependencies", :locals => { :dependencies => @latest_version.dependencies.development } %>

      <% if @latest_version.requirements.present? %>
        <div class="l-half--l">
          <h3 class="t-list__heading"><%= t '.requirements_header' %>:</h3>
          <div class="t-list__items">
            <% Array(@latest_version.requirements).each do |requirement| %>
              <p><%= requirement %></p>
            <% end %>
          </div>
        </div>
      <% end %>

      <div class="gem__members">
        <% if @latest_version.indexed %>
          <% if @latest_version.authors.present? %>
            <h3 class="t-list__heading"><%= t '.authors_header' %>:</h3>
            <ul class="t-list__items">
              <li class="t-list__item">
                <p><%= @latest_version.authors %></p>
              </li>
            </ul>
          <% end %>

          <% if @rubygem.owners.present? %>
            <h3 class="t-list__heading"><%= t '.owners_header' %>:</h3>
            <div class="gem__owners">
              <%= links_to_owners(@rubygem) %>
            </div>
          <% end %>
        <% end %>
      </div>
    </div>

    <div class="gem__aside l-col--r--pad">
      <% if @latest_version.indexed %>
        <% unless Rails.env.recovery? %>
          <div class="gem__downloads-wrap" data-href="<%= api_v1_download_path(@latest_version.full_name, :format => 'json') %>">
            <h2 class="gem__downloads__heading t-text--s">
              <%= t('stats.show.total_downloads') %>
              <span class="gem__downloads"><%= number_with_delimiter(@rubygem.downloads) %></span>
            </h2>
            <h2 class="gem__downloads__heading t-text--s">
              <%= t('.downloads_for_this_version') %>
              <span class="gem__downloads"><%= number_with_delimiter(@latest_version.downloads_count) %></span>
            </h2>
            <% if @versions.present? %>
              <% if show_all_versions_link?(@rubygem) %>
                <%= link_to t('.show_all_versions', :count => @rubygem.versions.count), rubygem_versions_url(@rubygem), :class => "gem__see-all-versions t-link--gray t-link--has-arrow" %>
              <% end %>
            <% end %>
          </div>
        <% end %>
      <% end %>

      <h2 class="gem__ruby-version__heading t-list__heading">
        Required Ruby Version:
        <i class="gem__ruby-version">
          <% if @latest_version.ruby_version %>
            <%= @latest_version.ruby_version %>
          <% else %>
            None
          <% end %>
        </i>
      </h2>

      <% if @latest_version.indexed %>
        <h2 class="gem__ruby-version__heading t-list__heading">
          <%= t '.licenses_header' %>:
          <span class="gem__ruby-version">
            <p><%= formatted_licenses @latest_version.licenses %></p>
          </span>
        </h2>

        <h2 class="gem__ruby-version__heading t-list__heading">
          <%= t '.bundler_header' %>:
          <div class="gem__code-wrap">
            <span class="gem__code"><%= @latest_version.to_bundler %></span></code>
            <span class="gem__code__icon" id="js-gem__code--gemfile" data-clipboard-text="<%= @latest_version.to_bundler %>">=</span>
            <span class="gem__code__tooltip--copy">Copy to clipboard</span>
            <span class="gem__code__tooltip--copied">Copied!</span>
          </div>
        </h2>
        <h2 class="gem__ruby-version__heading t-list__heading">
          <%= t '.install' %>:
          <div class="gem__code-wrap">
            <span class="gem__code"><%= @latest_version.to_install %></span></code>
            <span class="gem__code__icon" id="js-gem__code--install" data-clipboard-text="<%= @latest_version.to_install %>">=</span>
            <span class="gem__code__tooltip--copy">Copy to clipboard</span>
            <span class="gem__code__tooltip--copied">Copied!</span>
          </div>
        </h2>
      <% end %>

      <h3 class="t-list__heading"><%= t '.links.header' %>:</h3>
      <div class="t-list__items">
        <%= link_to t('edit'), edit_rubygem_path(@rubygem), :class => "gem__link t-list__item", :id => "edit" if @rubygem.owned_by?(current_user) %>

        <% if @latest_version.indexed %>
          <% if @rubygem.linkset.present? %>
            <%= link_to_page t('.links.home'), @rubygem.linkset.home %>
            <%= link_to_page t('.links.code'), @rubygem.linkset.code %>
            <%= link_to_page t('.links.docs'), @rubygem.linkset.docs %>
            <%= link_to_page t('.links.wiki'), @rubygem.linkset.wiki %>
            <%= link_to_page t('.links.mail'), @rubygem.linkset.mail %>
            <%= link_to_page t('.links.bugs'), @rubygem.linkset.bugs %>
          <% end %>
        <% end %>

        <%= download_link(@latest_version) %>
        <%= documentation_link(@latest_version, @rubygem.linkset) %>
        <%= badge_link(@rubygem) %>
        <%= subscribe_link(@rubygem) if @latest_version.indexed %>
        <%= unsubscribe_link(@rubygem) %>
        <%= atom_link(@rubygem) %>
        <!--
          Not ready yet on the Gittip side! :-(
          https://github.com/gittip/www.gittip.com/issues/1591
        <%= gittip_link(@rubygem) if @rubygem.gittip_enabled? %>
        -->
      </div>
    </div>
  </div>
<% end %>

<% content_for :javascript do %>
  <script>
    var client = new ZeroClipboard( document.getElementById("js-gem__code--gemfile") );
    var client2 = new ZeroClipboard( document.getElementById("js-gem__code--install") );
  </script>
<% end %>
<commit_msg>Remove trailing code tags causing warnings when parsing page in tests<commit_after><% @title = @rubygem.name %>
<% @subtitle = @latest_version.try(:slug) %>

<%= content_for :head, auto_discovery_link_tag(:atom, rubygem_versions_path(@rubygem, format: "atom"), {title: "#{@rubygem.name} Version Feed"}) %>

<% if @rubygem.versions.count.zero? %>
  <div class="t-body">
    <p><%= t '.not_hosted_notice' %></p>
  </div>
<% else %>
  <div class="l-overflow">
    <div class="l-colspan--l colspan--l--has-border">
      <% if @latest_version.indexed %>
        <div class="gem__intro">
          <div id="markup" class="gem__desc">
            <%= simple_markup(@latest_version.info) %>
          </div>
        </div>
      <% else %>
        <div class="t-body">
          <p><%= t('.yanked_notice', :more_info_link => link_to(t('.yank_info_link_text'), "http://help.rubygems.org/faqs/gemcutter/removing-a-published-rubygem")).html_safe %></p>
        </div>
      <% end %>

      <% if @versions.present? %>
        <div class="l-half--l">
          <div class="versions">
            <h3 class="t-list__heading"><%= t '.versions_header' %>:</h3>
            <ol class="gem__versions t-list__items">
              <%= render @versions %>
            </ol>
            <% if show_all_versions_link?(@rubygem) %>
              <%= link_to t('.show_all_versions', :count => @rubygem.versions.count), rubygem_versions_url(@rubygem), :class => "gem__see-all-versions t-link--gray t-link--has-arrow" %>
            <% end %>
          </div>
        </div>
      <% end %>

      <%= render :partial => "rubygems/dependencies", :locals => { :dependencies => @latest_version.dependencies.runtime } %>
      <%= render :partial => "rubygems/dependencies", :locals => { :dependencies => @latest_version.dependencies.development } %>

      <% if @latest_version.requirements.present? %>
        <div class="l-half--l">
          <h3 class="t-list__heading"><%= t '.requirements_header' %>:</h3>
          <div class="t-list__items">
            <% Array(@latest_version.requirements).each do |requirement| %>
              <p><%= requirement %></p>
            <% end %>
          </div>
        </div>
      <% end %>

      <div class="gem__members">
        <% if @latest_version.indexed %>
          <% if @latest_version.authors.present? %>
            <h3 class="t-list__heading"><%= t '.authors_header' %>:</h3>
            <ul class="t-list__items">
              <li class="t-list__item">
                <p><%= @latest_version.authors %></p>
              </li>
            </ul>
          <% end %>

          <% if @rubygem.owners.present? %>
            <h3 class="t-list__heading"><%= t '.owners_header' %>:</h3>
            <div class="gem__owners">
              <%= links_to_owners(@rubygem) %>
            </div>
          <% end %>
        <% end %>
      </div>
    </div>

    <div class="gem__aside l-col--r--pad">
      <% if @latest_version.indexed %>
        <% unless Rails.env.recovery? %>
          <div class="gem__downloads-wrap" data-href="<%= api_v1_download_path(@latest_version.full_name, :format => 'json') %>">
            <h2 class="gem__downloads__heading t-text--s">
              <%= t('stats.show.total_downloads') %>
              <span class="gem__downloads"><%= number_with_delimiter(@rubygem.downloads) %></span>
            </h2>
            <h2 class="gem__downloads__heading t-text--s">
              <%= t('.downloads_for_this_version') %>
              <span class="gem__downloads"><%= number_with_delimiter(@latest_version.downloads_count) %></span>
            </h2>
            <% if @versions.present? %>
              <% if show_all_versions_link?(@rubygem) %>
                <%= link_to t('.show_all_versions', :count => @rubygem.versions.count), rubygem_versions_url(@rubygem), :class => "gem__see-all-versions t-link--gray t-link--has-arrow" %>
              <% end %>
            <% end %>
          </div>
        <% end %>
      <% end %>

      <h2 class="gem__ruby-version__heading t-list__heading">
        Required Ruby Version:
        <i class="gem__ruby-version">
          <% if @latest_version.ruby_version %>
            <%= @latest_version.ruby_version %>
          <% else %>
            None
          <% end %>
        </i>
      </h2>

      <% if @latest_version.indexed %>
        <h2 class="gem__ruby-version__heading t-list__heading">
          <%= t '.licenses_header' %>:
          <span class="gem__ruby-version">
            <p><%= formatted_licenses @latest_version.licenses %></p>
          </span>
        </h2>

        <h2 class="gem__ruby-version__heading t-list__heading">
          <%= t '.bundler_header' %>:
          <div class="gem__code-wrap">
            <span class="gem__code"><%= @latest_version.to_bundler %></span>
            <span class="gem__code__icon" id="js-gem__code--gemfile" data-clipboard-text="<%= @latest_version.to_bundler %>">=</span>
            <span class="gem__code__tooltip--copy">Copy to clipboard</span>
            <span class="gem__code__tooltip--copied">Copied!</span>
          </div>
        </h2>
        <h2 class="gem__ruby-version__heading t-list__heading">
          <%= t '.install' %>:
          <div class="gem__code-wrap">
            <span class="gem__code"><%= @latest_version.to_install %></span>
            <span class="gem__code__icon" id="js-gem__code--install" data-clipboard-text="<%= @latest_version.to_install %>">=</span>
            <span class="gem__code__tooltip--copy">Copy to clipboard</span>
            <span class="gem__code__tooltip--copied">Copied!</span>
          </div>
        </h2>
      <% end %>

      <h3 class="t-list__heading"><%= t '.links.header' %>:</h3>
      <div class="t-list__items">
        <%= link_to t('edit'), edit_rubygem_path(@rubygem), :class => "gem__link t-list__item", :id => "edit" if @rubygem.owned_by?(current_user) %>

        <% if @latest_version.indexed %>
          <% if @rubygem.linkset.present? %>
            <%= link_to_page t('.links.home'), @rubygem.linkset.home %>
            <%= link_to_page t('.links.code'), @rubygem.linkset.code %>
            <%= link_to_page t('.links.docs'), @rubygem.linkset.docs %>
            <%= link_to_page t('.links.wiki'), @rubygem.linkset.wiki %>
            <%= link_to_page t('.links.mail'), @rubygem.linkset.mail %>
            <%= link_to_page t('.links.bugs'), @rubygem.linkset.bugs %>
          <% end %>
        <% end %>

        <%= download_link(@latest_version) %>
        <%= documentation_link(@latest_version, @rubygem.linkset) %>
        <%= badge_link(@rubygem) %>
        <%= subscribe_link(@rubygem) if @latest_version.indexed %>
        <%= unsubscribe_link(@rubygem) %>
        <%= atom_link(@rubygem) %>
        <!--
          Not ready yet on the Gittip side! :-(
          https://github.com/gittip/www.gittip.com/issues/1591
        <%= gittip_link(@rubygem) if @rubygem.gittip_enabled? %>
        -->
      </div>
    </div>
  </div>
<% end %>

<% content_for :javascript do %>
  <script>
    var client = new ZeroClipboard( document.getElementById("js-gem__code--gemfile") );
    var client2 = new ZeroClipboard( document.getElementById("js-gem__code--install") );
  </script>
<% end %>

{'fraction_non_alphanumeric': 0.18422145328719725, 'fraction_numerical': 0.003875432525951557, 'mean_word_length': 2.31217052486821, 'pattern_counts': {'":': 0, '<': 375, '<?xml version=': 0, '>': 403, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1056857', 'n_tokens_mistral': 5024, 'n_tokens_neox': 4616, 'n_words': 738}