Fix measure upstream for RubyGems

[GitHub #124]
This commit is contained in:
Aoran Zeng 2024-11-22 10:57:09 +08:00
parent 3c683ca339
commit f9d360d2bf
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98

View File

@ -4,11 +4,17 @@
* File Authors : Aoran Zeng <ccmywish@qq.com> * File Authors : Aoran Zeng <ccmywish@qq.com>
* Contributors : Nil Null <nil@null.org> * Contributors : Nil Null <nil@null.org>
* Created On : <2023-08-29> * Created On : <2023-08-29>
* Last Modified : <2024-11-21> * Last Modified : <2024-11-22>
* ------------------------------------------------------------*/ * ------------------------------------------------------------*/
static MirrorSite_t static SourceProvider_t UpstreamRuby =
RubyChina = { {
"upstream", "RubyGems.org", "上游默认源 RubyGems.org", "https://rubygems.org",
{NotSkip, NA, NA, "https://rubygems.org/gems/nokogiri-1.15.0-java.gem"}
};
static MirrorSite_t RubyChina =
{
"rubychina", "RubyChina", "Ruby China 社区", "https://gems.ruby-china.com/", "rubychina", "RubyChina", "Ruby China 社区", "https://gems.ruby-china.com/",
{NotSkip, NA, NA, "https://gems.ruby-china.com/rubygems/gems/nokogiri-1.15.0-java.gem"} // 9.9 MB {NotSkip, NA, NA, "https://gems.ruby-china.com/rubygems/gems/nokogiri-1.15.0-java.gem"} // 9.9 MB
}; };
@ -20,9 +26,9 @@ RubyChina = {
* *
* @note https://ruby-china.org/topics/43331 * @note https://ruby-china.org/topics/43331
*/ */
static Source_t static Source_t pl_ruby_sources[] =
pl_ruby_sources[] = { {
{&UpstreamProvider, "https://rubygems.org"}, {&UpstreamRuby, "https://rubygems.org"},
{&RubyChina, "https://gems.ruby-china.com/"}, {&RubyChina, "https://gems.ruby-china.com/"},
{&Ustc, "https://mirrors.ustc.edu.cn/rubygems/"} {&Ustc, "https://mirrors.ustc.edu.cn/rubygems/"}
@ -64,8 +70,6 @@ pl_ruby_setsrc (char *option)
{ {
chsrc_ensure_program ("gem"); chsrc_ensure_program ("gem");
chsrc_set_measure_upstream ("https://rubygems.org/gems/nokogiri-1.15.0-java.gem");
chsrc_yield_source_and_confirm (pl_ruby); chsrc_yield_source_and_confirm (pl_ruby);
char *cmd = NULL; char *cmd = NULL;