   end
 
   # Returns github page url or rubygems gem page url
-  # TODO: check if github page really exists
   defp gem_page(gem) do
     api_url = "https://rubygems.org/api/v1/gems/#{gem}.json"
     response = HTTPoison.get! api_url

      |> List.last
    end
  end
end

      json = JSX.decode! response.body
      repo = get_repo_name(json["homepage_uri"]) || get_repo_name(json["source_code_uri"])

      if repo && github_exists?(repo) do
        "https://github.com/#{repo}"
      else
        json["project_uri"]
      end
    end
  end

