gct 0.3.9 → 0.3.91

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3916a6b218a57f70b55c78f86fc05ab29bd9c0db6718ba525249a62b6f92b514
4
- data.tar.gz: bffb1a3d12eba75d4ee371c95c1a0145027d75c5d50e399520a4d7d6b9ac16e7
3
+ metadata.gz: 2544c8db653759d99e1ddc1007090e03db770c715f30d9e5f5f770076226ddd0
4
+ data.tar.gz: aee1cfc33e68777d545884cdb0025c2018821d83ecb2668ea33a3e8b51cad34f
5
5
  SHA512:
6
- metadata.gz: d3e6420ec4067f11b7a72f6406949739abce31b8e0772ecede4dda7653385154dce1e89cb3bc2dc9d0707c8a15c1ff8dfd0639bb84d18d8a2e17f79b235a2c02
7
- data.tar.gz: 2e8d40284080f8a079137afe3e3c44c336d7294603549811608f33e24c91e016ebbff240c0db30a1db3c0c67ad164c74c8f77f9c0251981057a000a0f177f22c
6
+ metadata.gz: ec1ef12cfdf4ff81fa1fb7678da36d05a50657d5dbf4453718270657755330bed58eba1492ea42ca4ad9ce8c829a6083ac92101ce892ae2f0809741eb464fbdd
7
+ data.tar.gz: dd8d0bbf4646aca64790eae2c21aa9910f7912ee202f0a9547048978190813c1bcca6a19e338ce6865d3c73931e72bb0875ad8ae5783dfda8ca8d11b8002c29c
@@ -10,6 +10,7 @@ module Gct
10
10
  def yaml_write(key, value)
11
11
  begin
12
12
  config_map = YAML.load(File.open(@path, "r"))
13
+ config_map = Hash.new() if config_map.nil? || config_map.empty?
13
14
  config_map[key] = value
14
15
  yaml_file = File.open(@path, "w")
15
16
  YAML::dump(config_map, yaml_file)
@@ -2,5 +2,5 @@ module Gct
2
2
  # freeze 冻结对象,将对象变成一个常量
3
3
  # unless 右边的代码块成立,才会运行左边的代码块
4
4
  # defined? 是用来判断本地变量是否存在,也可用来判断是否存在方法
5
- VERSION = "0.3.9".freeze unless defined? Gct::VERSION
5
+ VERSION = "0.3.91".freeze unless defined? Gct::VERSION
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.3.91
5
5
  platform: ruby
6
6
  authors:
7
7
  - jieming