ssport 0.1.6 → 0.1.7

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
  SHA256:
3
- metadata.gz: b2fd06e0655ad5e381028f80555ac448cf6cb636a33e45d58b712b56baaa6d11
4
- data.tar.gz: 20022567ddca6646e0be6d135a4a21ff47c260af67618c30b7c4326c532b9514
3
+ metadata.gz: 2c5e6c37204227134e265ab48c21310472669c87926acae5fb93a0491dbb21d9
4
+ data.tar.gz: 1fa5fb76476d3ace4d553ccf95e527287bb50bd07c702aee797ecdc8e72ee911
5
5
  SHA512:
6
- metadata.gz: fc47d219b8ffed252442c930e43d83b2f5c5f13e5884766cb1929a0ee25bf431174128044859f2270b0346544410c3361ba034115450c1cc09052795857384b2
7
- data.tar.gz: c070ceea5b805d07f20e7c30e8374e9c6cc6f4ec3dc89553facaa1ae64a641eb4d5f7babe4f52e4c54466b79cde41ead0ec3d17cfbce64a35195dabc1694d79d
6
+ metadata.gz: acbdc0077733ad0d05d28ef2cbfe0337e6a17aca46c8c134414912127208332282531847c0b5e254ce43e2d715416f15f6733aadc32ff0e14f264a82e9cc878f
7
+ data.tar.gz: f56253d62a442943dd28db7c151afa99856b86fa1eaf293e11fffa6e62881ebd7561233f0aaa92351e40b5a79ea13321c8d73e7c3de8aaa306a50d6ccf0ef226
data/lib/ssport/config.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require "colorize"
2
+ require "json"
2
3
 
3
4
  class Config
4
5
 
@@ -23,6 +24,8 @@ class Config
23
24
  p "---------bengin parse #{@config_file} ------------"
24
25
  if File.exist? @config_file
25
26
  file_content = File.read @config_file
27
+ p "-------------old config---------------"
28
+ p file_content
26
29
  @config_json = JSON.parse file_content
27
30
  else
28
31
  p "Config 文件不存在".colorize(:red)
@@ -31,7 +34,6 @@ class Config
31
34
 
32
35
  def changeField(config_key, option_key)
33
36
  option_value = @options[option_key]
34
- p "---------bengin change #{config_key} : #{option_value} ------------"
35
37
  if option_value
36
38
  @config_json[config_key] = option_value
37
39
  end
@@ -41,7 +43,10 @@ class Config
41
43
  changeField @@SERVER_PORT , :port
42
44
  changeField @@PASSWORD , :password
43
45
  changeField @@METHOD , :method
44
- File.write @config_file , @config_json.to_json
46
+ final_config = @config_json.to_json
47
+ p "-------------new config---------------"
48
+ p final_config
49
+ File.write @config_file , final_config
45
50
  end
46
51
 
47
52
 
@@ -1,3 +1,3 @@
1
1
  module Ssport
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
data/lib/ssport.rb CHANGED
@@ -3,7 +3,6 @@ require "ssport/config"
3
3
  require "colorize"
4
4
  require 'fileutils'
5
5
  require 'optparse'
6
- require 'json'
7
6
  require 'net/ssh'
8
7
 
9
8
  module Ssport
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ssport
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - kaich