public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alex Legler" <a3li@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoo-mirrorstats:master commit in: rsync_mirrors/, distfiles_mirrors/
Date: Tue, 14 Apr 2015 11:40:44 +0000 (UTC)	[thread overview]
Message-ID: <1429011590.1986f0f44c0ab818b5745bcf55063a1b0f44d791.a3li@gentoo> (raw)

commit:     1986f0f44c0ab818b5745bcf55063a1b0f44d791
Author:     Alex Legler <alex <AT> a3li <DOT> li>
AuthorDate: Tue Apr 14 11:39:50 2015 +0000
Commit:     Alex Legler <a3li <AT> gentoo <DOT> org>
CommitDate: Tue Apr 14 11:39:50 2015 +0000
URL:        https://gitweb.gentoo.org/proj/gentoo-mirrorstats.git/commit/?id=1986f0f4

Update mirror data URIs and fetch method

 distfiles_mirrors/get-mirror-list-distfiles.rb | 6 ++++--
 rsync_mirrors/get-mirror-list-rsync.rb         | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/distfiles_mirrors/get-mirror-list-distfiles.rb b/distfiles_mirrors/get-mirror-list-distfiles.rb
index 1aa22ea..0794df3 100755
--- a/distfiles_mirrors/get-mirror-list-distfiles.rb
+++ b/distfiles_mirrors/get-mirror-list-distfiles.rb
@@ -1,8 +1,10 @@
 #!/usr/bin/ruby
 
-%w[ rexml/document net/http ].each {|lib| require lib }
+MIRROR_DATA="https://api.gentoo.org/mirrors/distfiles.xml"
 
-m = Net::HTTP.get('www.gentoo.org', '/main/en/mirrors3.xml?passthru=1')
+%w[ rexml/document open-uri ].each {|lib| require lib }
+
+m = URI.parse(MIRROR_DATA).read
 x = REXML::Document.new(m)
 
 REXML::XPath.each(x, '//*/mirrorgroup[@country]') {|el|

diff --git a/rsync_mirrors/get-mirror-list-rsync.rb b/rsync_mirrors/get-mirror-list-rsync.rb
index 7269ece..252bfd2 100755
--- a/rsync_mirrors/get-mirror-list-rsync.rb
+++ b/rsync_mirrors/get-mirror-list-rsync.rb
@@ -1,8 +1,10 @@
 #!/usr/bin/ruby
 
-%w[ rexml/document net/http ].each {|lib| require lib }
+MIRROR_DATA="https://api.gentoo.org/mirrors/rsync.xml"
 
-m = Net::HTTP.get('www.gentoo.org', '/main/en/mirrors-rsync-data.xml?passthru=1')
+%w[ rexml/document open-uri ].each {|lib| require lib }
+
+m = URI.parse(MIRROR_DATA).read
 x = REXML::Document.new(m)
 
 REXML::XPath.each(x, '//*/mirrorgroup[@country]') {|el|


             reply	other threads:[~2015-04-14 11:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-14 11:40 Alex Legler [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-04-28  7:43 [gentoo-commits] proj/gentoo-mirrorstats:master commit in: rsync_mirrors/, distfiles_mirrors/ Robin H. Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1429011590.1986f0f44c0ab818b5745bcf55063a1b0f44d791.a3li@gentoo \
    --to=a3li@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox