<%-
  raw_git_url = "https://rawgit.com/rackerlabs/wadl2swagger/gh-pages/swagger/"
  unless swagger_json.nil?
    full_yaml_url = settings.site_url + url_for(swagger_yaml)
    full_json_url = settings.site_url + url_for(swagger_json)
    edit_url = "http://editor.swagger.io/#/edit?import=#{full_yaml_url}"
  end
  unless log_file.nil?
    validation_log = url_for(log_file)
    validation_img = swagger_validation_image(log_file)
  end
-%>
<tr>
  <td><%= partial 'partials/file_link', :locals => {:file => wadl } %></td>
  <td><%= partial 'partials/file_link', :locals => {:file => swagger_yaml } %></td>
  <td><%= partial 'partials/file_link', :locals => {:file => swagger_json } %></td>
  <%- if swagger_json.nil? -%>
    <td>N/A</td>
    <td>N/A</td>
  <%- else -%>
    <td>
      <a href="<%= validation_log %>"><img src="<%= validation_img %>" target="_blank"/></a>
    </td>
    <td>
      <a href="<%= edit_url %>">Open on Swagger-Editor</a>
    </td>
  <%- end -%>
</tr>

<%-
  raw_git_url = "https://rawgit.com/rackerlabs/wadl2swagger/gh-pages/swagger/"
  unless swagger_json.nil?
    full_yaml_url = settings.site_url + url_for(swagger_yaml)
    full_json_url = settings.site_url + url_for(swagger_json)
    edit_url = "http://editor.swagger.io/#/edit?import=#{full_yaml_url}"
  end
  unless log_file.nil?
    validation_log = settings.site_url + url_for(log_file)
    validation_img = settings.site_url + swagger_validation_image(log_file)
  end
-%>
<tr>
  <td><%= partial 'partials/file_link', :locals => {:file => wadl } %></td>
  <td><%= partial 'partials/file_link', :locals => {:file => swagger_yaml } %></td>
  <td><%= partial 'partials/file_link', :locals => {:file => swagger_json } %></td>
  <%- if swagger_json.nil? -%>
    <td>N/A</td>
    <td>N/A</td>
  <%- else -%>
    <td>
      <%= link_to(validation_log) { image_tag validation_img } %>
    </td>
    <td>
      <a href="<%= edit_url %>" target="_blank">Open on Swagger-Editor</a>
    </td>
  <%- end -%>
</tr>

Fix URLs (subdirectory on github.io)
Fix URLs (subdirectory on github.io)
