generate ConfigurationFile.ini dynamically from attributes
还没有人认领这个 Issue。
评估
调研方向
从 ./templates/default/ConfigurationFile.ini 开始,将其当前渲染结果与 issue 中的示例环境 JSON 进行比较。验证 @properties 的提供方式,然后确认标量属性会渲染为带引号的值,数组会渲染为以空格分隔的带引号项,并以所示输出作为完成标准。
由索引模型根据 Issue 内容生成。
描述
Handle configuration file creation dynamically from attributes:
./templates/default/ConfigurationFile.ini:
<% @properties.each_pair do |key, value| -%>
<% if value.is_a? Array -%>
<%= key %>=<%= value.map { |item| %("#{item}") }.join(' ') %>
<% else -%>
<%= key %>="<%= value %>"
<% end -%>
<% end -%>
example environment json:
{
"sql_server": {
"install": {
"properties": {
"key1": "value1",
"key2": "value2",
"array": ["item1", "item2", "item3"]
}
}
}
}
end result:
key1="value1"
key2="value2"
array="item1" "item2" "item3"
This way the comments are lost, but also that can be attached if really necessary
- 主要语言
- Ruby
- 星标
- 64
- 派生
- 116
- 平均合并
- 5 小时 30 分钟
- 30 天内合并 PR
- 1
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
sous-chefs/sql_server 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 15/100
sous-chefs/sql_server#184 ·
-
难度 3/5 1-2 天 新手友好度 25/100
sous-chefs/sql_server#158 ·
-
难度 2/5 1-3 小时 新手友好度 45/100
sous-chefs/sql_server#131 · 5 条评论 ·
-
难度 3/5 1-2 天 新手友好度 25/100
sous-chefs/sql_server#128 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
sous-chefs/sql_server#118 · 3 条评论 ·
查看 sous-chefs/sql_server 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 90/100
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
mastodon/mastodon#40755 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
L: docker L: elm L: github:actions L: helm L: ruby:bundler
难度 2/5 1-3 小时 新手友好度 85/100
dependabot/dependabot-core#16425 ·
维护者通常 2 天内回复