yk_command 0.5.3 → 0.5.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b14860e741967bf1e1962b731b5e6410041dcd2f0a7b306e36b617ae08fdac11
|
4
|
+
data.tar.gz: 22c4cff5793fe6f6e4c20e25203f92e463a986feaf7a6a5d54542e3199e8bc02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d3cf9617030efc50565b6b468997b5812ae6b5701abb92c3094452fab63e0d39fff69faed885b502559c81dea16e69c0747ab017f5ec1d4ff5d579ffdd9cd7f
|
7
|
+
data.tar.gz: 02eb89e280b18fdf83f6acde3abc29108a5ee50e712e27bd6467e6c4a98b97d0582fbde87e082305772dff5cef9b137e295fa273b514cae81dc3b87238a64048
|
data/Gemfile.lock
CHANGED
@@ -24,8 +24,12 @@ module YkCommand
|
|
24
24
|
|
25
25
|
|
26
26
|
def initialize(path)
|
27
|
-
config = YkConfig.new
|
28
|
-
|
27
|
+
@config = YkConfig.new path
|
28
|
+
|
29
|
+
server_config = @config.read_config SERVER_ENV_CONFIG_FILE
|
30
|
+
@app_server_api = Request.new(server_config)
|
31
|
+
@bot_config = @config.read_config BOT_CONFIG_FILE
|
32
|
+
|
29
33
|
end
|
30
34
|
|
31
35
|
def dependency(path = nil)
|
@@ -125,12 +129,8 @@ module YkCommand
|
|
125
129
|
|
126
130
|
def bot_message(path,success_name_list,failed_name_list)
|
127
131
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
bot_config = YkConfig.new.read_config path , BOT_CONFIG_FILE
|
132
|
-
if bot_config
|
133
|
-
bot = WxBot.new(bot_config)
|
132
|
+
if @bot_config
|
133
|
+
bot = WxBot.new(@bot_config)
|
134
134
|
bot.send_result_to_group(success_name_list,failed_name_list)
|
135
135
|
bot.send_news_to_group
|
136
136
|
end
|
@@ -13,8 +13,9 @@ module YkCommand
|
|
13
13
|
no_commands do
|
14
14
|
def initialize
|
15
15
|
path = __dir__
|
16
|
-
|
17
|
-
@
|
16
|
+
config = YkConfig.new path
|
17
|
+
@gitlab_srvice =YkGitlab.new(config.read_config GITLAB_CONFIG_FILE)
|
18
|
+
@api_service = Request.new(config.read_config SERVER_ENV_CONFIG_FILE)
|
18
19
|
end
|
19
20
|
|
20
21
|
def update_app_data
|
@@ -7,16 +7,18 @@ module YkCommand
|
|
7
7
|
|
8
8
|
include Thor::Actions
|
9
9
|
no_commands do
|
10
|
-
|
10
|
+
|
11
|
+
def initialize(config_path)
|
12
|
+
@at_path = config_path
|
11
13
|
hostA = 'yeah'
|
12
14
|
hostB = 'ka'
|
13
15
|
config_repo_url = "http://gitlab.#{hostA}#{hostB}.com/App/iOS/YKComponents/com-manage-platform-resources/configruation-files.git"
|
14
|
-
system("git clone #{config_repo_url} #{at_path+'/configruation-files'}")
|
15
|
-
|
16
|
-
|
17
|
-
FileUtils.copy_file "#{at_path+'/configruation-files/'+file_name}", config_file_path
|
18
|
-
FileUtils.remove_dir("#{at_path+'/configruation-files'}", true)
|
16
|
+
system("git clone #{config_repo_url} #{@at_path+'/configruation-files'}")
|
17
|
+
FileUtils.remove_dir("#{@at_path+'/configruation-files/.git'}", true)
|
18
|
+
end
|
19
19
|
|
20
|
+
def read_config(file_name)
|
21
|
+
config_file_path = "#{@at_path+'/configruation-files/'+file_name}"
|
20
22
|
File.exist?(config_file_path) ? YAML.load_file(config_file_path) : {}
|
21
23
|
end
|
22
24
|
end
|
data/lib/yk_command/version.rb
CHANGED