traduki-clt 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1bd2a1ac0af8318f0480961206289eeb74070709
4
- data.tar.gz: ac8e677f8b52494c0461fbdbc3d9a13d8cc34832
3
+ metadata.gz: f8ef5e860f4839102793da54efb6d39dd0476fd3
4
+ data.tar.gz: 63cfdcbdb3309125a054909cd344cff58be3b26f
5
5
  SHA512:
6
- metadata.gz: d29a1841fda0b41738ab3468ffbf0e908cf5b375855f67af1348771da5257567689ce6b69f253e73256fe5eb308e21a0313da937bbd35e65803b1954f7c37eef
7
- data.tar.gz: 11a60547a79632f35368c44f2f073393df94df87407ed8415024512874cd990fac1db7588013e727fdfbdb974da9013dc2114ec10cf9cc1750bbaf96f7fd2bee
6
+ metadata.gz: 29e875062a4d9d09163696a9bee5e222bbceeff035841f72ddda00f68c8bb0931c40a735eec20255464841ad3633662f5b2ba9253752b4bbdddec88d5c66ebe4
7
+ data.tar.gz: cff04a53e59a5c53c301aef39ad4d70f58f4eb5d6ce785d969dd4d94259c85ec52430ba011b7a2801d2435ca9ca3546e18b2fb88ca1059a8e26372556479cb9c
@@ -40,8 +40,8 @@ module Traduki
40
40
  end
41
41
 
42
42
  def create_internal_config
43
- File.open(@langdir + '/traduki.json', 'w') { |f| f.write "// Please DON'T edit this file.\n" }
44
- File.open(@langdir + '/traduki.json', 'a') { |f| f.write JSON.dump generate_config }
43
+ # File.open(@langdir + '/traduki.json', 'w') { |f| f.write "// Please DON'T edit this file.\n" }
44
+ File.open(@langdir + '/traduki.json', 'w') { |f| f.write JSON.dump generate_config }
45
45
  end
46
46
 
47
47
  def generate_config
@@ -1,3 +1,5 @@
1
+ require 'pp'
2
+
1
3
  module Traduki
2
4
  class HashTool
3
5
  def self.validate_dotkey(dotkey)
@@ -57,18 +59,12 @@ module Traduki
57
59
  result = contrast.clone
58
60
  result.each do |key, _|
59
61
  if result[key].is_a?(Hash) && dict[key].is_a?(Hash)
60
- clean(dict[key], result[key])
61
- next
62
- end
63
- if result[key].is_a?(String) && dict[key].is_a?(String)
62
+ result[key] = clean(dict[key], result[key])
63
+ elsif result[key].is_a?(String) && dict[key].is_a?(String)
64
64
  result[key] = dict[key]
65
- end
66
-
67
- if result[key].is_a?(String) && dict[key].is_a?(Hash)
65
+ elsif result[key].is_a?(String) && dict[key].is_a?(Hash)
68
66
  result[key] = dict['_'] unless dict['_'].nil?
69
- end
70
-
71
- if result[key].is_a?(Hash) && dict[key].is_a?(String)
67
+ elsif result[key].is_a?(Hash) && dict[key].is_a?(String)
72
68
  result[key]['_'] = dict[key]
73
69
  end
74
70
  end
@@ -1,3 +1,3 @@
1
1
  module Traduki
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.1.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: traduki-clt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vergil Choi