Skip to content
代码片段 群组 项目
未验证 提交 fdceefac 编辑于 作者: Rémy Coutable's avatar Rémy Coutable
浏览文件

Memoize the Keeps::Helpers::Milestones#current_milestone method


Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
上级 2cf11abe
No related branches found
No related tags found
无相关合并请求
......@@ -18,8 +18,10 @@ def past_milestone(milestones_ago:)
private
def current_milestone
milestone = File.read(File.expand_path('../../VERSION', __dir__))
milestone.gsub(/^(\d+\.\d+).*$/, '\1').chomp
@current_milestone ||=
File.read(File.expand_path('../../VERSION', __dir__))
.gsub(/^(\d+\.\d+).*$/, '\1')
.chomp
end
def current_milestone_index
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册