gct 0.3.91 → 0.3.92

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: 2544c8db653759d99e1ddc1007090e03db770c715f30d9e5f5f770076226ddd0
4
- data.tar.gz: aee1cfc33e68777d545884cdb0025c2018821d83ecb2668ea33a3e8b51cad34f
3
+ metadata.gz: f56c709eefbd77dd98e8a28edc0843b6aa03b6736a4d5c395b7e5ebbdb788dba
4
+ data.tar.gz: 53e1af2275b00d0aa11a83199f9d830ac63559f99a9f63fb046f63ca8e5dfb93
5
5
  SHA512:
6
- metadata.gz: ec1ef12cfdf4ff81fa1fb7678da36d05a50657d5dbf4453718270657755330bed58eba1492ea42ca4ad9ce8c829a6083ac92101ce892ae2f0809741eb464fbdd
7
- data.tar.gz: dd8d0bbf4646aca64790eae2c21aa9910f7912ee202f0a9547048978190813c1bcca6a19e338ce6865d3c73931e72bb0875ad8ae5783dfda8ca8d11b8002c29c
6
+ metadata.gz: 898c5d910ceec03da053813748b246121ff5cc379910f4b86ebf1ef5ab46096a7e86e8c7cf2e9dba381abe29c138dc263be5fd49a54a42b130562bc0ed8ce184
7
+ data.tar.gz: ec2228784c42ac7bf0ef80e1a7e422e9c1f9f2df630350febf66a04bf49411f3aa8a61f85e453f226ff0cf77160b9d220ad8e2b6382a90243d9eae29649450f0
@@ -10,7 +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
+ config_map = Hash.new() if !config_map
14
14
  config_map[key] = value
15
15
  yaml_file = File.open(@path, "w")
16
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.91".freeze unless defined? Gct::VERSION
5
+ VERSION = "0.3.92".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.91
4
+ version: 0.3.92
5
5
  platform: ruby
6
6
  authors:
7
7
  - jieming