Skip to content

Commit

Permalink
Add USTC for RubyGems and sync mirrors info
Browse files Browse the repository at this point in the history
[GitHub #64]
  • Loading branch information
ccmywish committed Sep 4, 2024
1 parent a6e9d4c commit 8fb009f
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions src/recipe/lang/Ruby.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,32 @@
* File Authors : Aoran Zeng <[email protected]>
* Contributors : Nil Null <[email protected]>
* Created On : <2023-08-29>
* Last Modified : <2024-08-17>
* Last Modified : <2024-09-04>
* ------------------------------------------------------------*/

static MirrorSite
RubyChina = {"rubychina", "RubyChina", "Ruby China 社区", "https://gems.ruby-china.com/",
"https://gems.ruby-china.com/rubygems/gems/nokogiri-1.15.0-java.gem"}; // 9.9 MB

/**
* @time 2024-05-25 更新
* @note {
* 下面的源,并非都实现正确,
* BFSU 和 Tuna 以及 阿里的镜像都有问题,会循环遍历一个gem的所有版本,导致安装时间相当长
* @time 2024-09-04 同步
* @sync https://github.com/RubyMetric/chsrc/discussions/62
* @sync https://github.com/RubyMetric/chsrc/wiki/Ruby-MirrorSite
*
* 若实现正确:
* 1. 目前北外最快最稳定
* 2. 腾讯挺快,个别时候不稳定,但稳定时能达到4.5MB甚至以上
* 3. tuna 有时快有时慢,不稳定,一般在3MB以下
* 4. rubychina 有时快有时慢,快时一般在 2MB以下,慢时一般在1MB以下
* 5. 阿里云最不稳定,经常最慢
* }
* @note 曾经的问题 https://ruby-china.org/topics/43331
*/
static SourceInfo
pl_ruby_sources[] = {
{&Upstream, "https://rubygems.org"},
{&Huawei, "https://mirrors.huaweicloud.com/repository/rubygems/"},
{&Tencent, "https://mirrors.tencent.com/rubygems/"},
{&RubyChina, "https://gems.ruby-china.com/"}
{&RubyChina, "https://gems.ruby-china.com/"},
{&Ustc, "https://mirrors.ustc.edu.cn/rubygems/"}

// {&Bfsu, "https://mirrors.bfsu.edu.cn/rubygems/"},
// {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/rubygems/"},
// {&Bfsu, "https://mirrors.bfsu.edu.cn/rubygems/"},

// {&Tencent, "https://mirrors.tencent.com/rubygems/"},
// {&Ali, "https://mirrors.aliyun.com/rubygems/"},
// {&Huawei, "https://mirrors.huaweicloud.com/repository/rubygems/"},
};
def_sources_n(pl_ruby);

Expand Down Expand Up @@ -115,7 +110,7 @@ pl_ruby_feat (char *option)
fi.can_english = false;
fi.can_user_define = true;

fi.note = "华为开源镜像站提供的源可能存在问题";
fi.note = NULL;
return fi;
}

Expand Down

0 comments on commit 8fb009f

Please sign in to comment.