smartcloud 0.0.179 → 0.0.180

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: 5727c34e5622dea44b960f1f3eb41e40b7df6eaf2eaad20f8d33c11f9acb511f
4
- data.tar.gz: 10d0b0e2b46353c022c09b833679b8d4a348d5bcbc94155a7de36dc5b1d815e1
3
+ metadata.gz: d99f52b901768f9b2f528e164dd7b73193639062faca90bf85afe5c39530ea59
4
+ data.tar.gz: ba422d333a7bdbd6b4462afd54316dc5e76b7bdab5ecd1c22924dca5204e509e
5
5
  SHA512:
6
- metadata.gz: 944428d52771c6a82426e0b9f1e4369ea24c5a618e0ba107d83d057f79230353cb2f6ce0ad888bd1f144cfd5e8e438d67f2e1eeb3aca9feaa53ca1d264ca8081
7
- data.tar.gz: 59178a6073f8b95fc0913b39b871e524460c2a637450c4e7b922ecb9df47377bbc00d7579bb7ff762a2fcfb235185242402611fa841758f7d267aaa391e931ef
6
+ metadata.gz: 44700ca49b1c8bfae9b8c58db309cb48229905ea62c8d4305d0fad3c8c5d306ba244caa44ca5df2f0059240452aa0faadcaf6ff604572607c520e35a120d66ed
7
+ data.tar.gz: dbec0cdc6106064832ba60dfdf3528e48aa6e6d3293b5ca1b079c94cbfeb76a761c1378b8bcfa235de33aaa3313ad71ffcfb6d618a60c06c262a8c83c245ebf8
@@ -84,14 +84,21 @@ module Smartcloud
84
84
 
85
85
  def set_logger_formatter_arrow
86
86
  logger.formatter = proc do |severity, datetime, progname, message|
87
- severity_text = (severity == 'INFO') ? "" : "#{severity}:"
88
- "\t\t\t\t> #{severity_text} #{message}\n"
87
+ severity_text = (severity == 'INFO') ? "" : "#{severity}: "
88
+
89
+ SYMBOL_DEBUG = "\u{1f527}"
90
+ SYMBOL_INFO = "\u{1f604}"
91
+ SYMBOL_WARN = "\u{2753}"
92
+ SYMBOL_ERROR, SYMBOL_FATAL = "\u{274c}"
93
+ symbol_text = (message == "") ? "" : Object.const_get("SYMBOL_#{severity}")
94
+
95
+ "\t\t\t\t#{symbol_text} #{severity_text}#{message}\n"
89
96
  end
90
97
  end
91
98
 
92
99
  def set_logger_formatter_tabs
93
100
  logger.formatter = proc do |severity, datetime, progname, message|
94
- "\t\t\t\t\t #{message}"
101
+ "\t\t\t\t #{message}"
95
102
  end
96
103
  end
97
104
  end
@@ -220,8 +220,15 @@ module Smartcloud
220
220
 
221
221
  def self.prereceive_app(appname, username, oldrev, newrev, refname)
222
222
  logger.formatter = proc do |severity, datetime, progname, message|
223
- severity_text = (severity == 'INFO') ? "" : "#{severity}:"
224
- "\t\t\t\t> #{severity_text} #{message}\n"
223
+ severity_text = (severity == 'INFO') ? "" : "#{severity}: "
224
+
225
+ SYMBOL_DEBUG = "\u{1f527}"
226
+ SYMBOL_INFO = "\u{1f604}"
227
+ SYMBOL_WARN = "\u{2753}"
228
+ SYMBOL_ERROR, SYMBOL_FATAL = "\u{274c}"
229
+ symbol_text = (message == "") ? "" : Object.const_get("SYMBOL_#{severity}")
230
+
231
+ "\t\t\t\t#{symbol_text} #{severity_text}#{message}\n"
225
232
  end
226
233
 
227
234
  # Load vars and environment
@@ -338,14 +345,14 @@ module Smartcloud
338
345
  system("docker network connect solr-network #{appname}_new")
339
346
  system("docker network connect mysql-network #{appname}_new")
340
347
 
341
- system("docker start --attach #{appname}_new")
342
-
343
- # Runs only if #{appname}_new has been started successfully and is reachable.
344
- # self.hot_reloading_app(appname)
345
- # self.clean_up(container_path)
346
-
347
- # Runs only if #{appname}_new starting has failed.
348
- # self.stop_app("#{appname}_new")
348
+ if system("docker start --attach #{appname}_new")
349
+ # Runs only if #{appname}_new has been started successfully and is reachable.
350
+ self.hot_reloaded_app(appname)
351
+ self.clean_up(container_path)
352
+ else
353
+ # Runs only if #{appname}_new starting has failed.
354
+ self.stop_app("#{appname}_new")
355
+ end
349
356
  end
350
357
  end
351
358
 
@@ -366,7 +373,7 @@ module Smartcloud
366
373
  end
367
374
 
368
375
  # Hot reloading app containers and removing old app container
369
- def self.hot_reloading_app(appname)
376
+ def self.hot_reloaded_app(appname)
370
377
  logger.debug "Hot reloading '#{appname}' containers ..."
371
378
 
372
379
  container_id = `docker ps -a -q --filter='name=^#{appname}$'`.chomp
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.179
4
+ version: 0.0.180
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timeboard