smartcloud 0.0.180 → 0.0.185

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: d99f52b901768f9b2f528e164dd7b73193639062faca90bf85afe5c39530ea59
4
- data.tar.gz: ba422d333a7bdbd6b4462afd54316dc5e76b7bdab5ecd1c22924dca5204e509e
3
+ metadata.gz: c484a6fcf7dcb984273371aa62fdd8276a1ac34f8198e7bd14b54e6ca3c6f7a2
4
+ data.tar.gz: f003009d8c5849c28540a4c7e807540015afdda3996d59464cf075be16c67f1a
5
5
  SHA512:
6
- metadata.gz: 44700ca49b1c8bfae9b8c58db309cb48229905ea62c8d4305d0fad3c8c5d306ba244caa44ca5df2f0059240452aa0faadcaf6ff604572607c520e35a120d66ed
7
- data.tar.gz: dbec0cdc6106064832ba60dfdf3528e48aa6e6d3293b5ca1b079c94cbfeb76a761c1378b8bcfa235de33aaa3313ad71ffcfb6d618a60c06c262a8c83c245ebf8
6
+ metadata.gz: f84e907973d6c90a7a8b72ff84c7b21d92ff9a1e57d8b63947ad26490473c6f506caad65fa83dad6a9f750f7e8c6da154dcd93da2d28748c081ec6e8b01f5483
7
+ data.tar.gz: e35384f303b0d2b381371c412672686ff1ba8c199fad3097063694b90e6ce3ff3b41351a09da38a0d10acf38c5b7a2a62785701ab87acc6d62fc4c280ac02151
@@ -26,7 +26,6 @@ module Smartcloud
26
26
 
27
27
  # Perform bundle install
28
28
  def bundle_install?
29
- logger.info ""
30
29
  logger.info "Performing bundle install ..."
31
30
 
32
31
  set_logger_formatter_tabs
@@ -47,7 +46,6 @@ module Smartcloud
47
46
 
48
47
  # Perform pre-compiling of assets
49
48
  def precompile_assets?
50
- logger.info ""
51
49
  logger.info "Installing Javascript dependencies & pre-compiling assets ..."
52
50
 
53
51
  set_logger_formatter_tabs
@@ -68,31 +66,24 @@ module Smartcloud
68
66
 
69
67
  # Perform starting of web server
70
68
  def start_web_server?
71
- logger.debug ""
72
69
  logger.debug "Starting Web Server ..."
73
70
 
74
71
  # Remove server.pid if it exists
75
72
  FileUtils.rm("tmp/pids/server.pid") if File.exist? "tmp/pids/server.pid"
76
73
 
77
74
  # if system("god -c Godfile -D")
78
- logger.info ""
79
75
  logger.info "Launched Application ... Success."
80
- # return true
76
+ return true
81
77
  # end
82
- return false
78
+ # return false
83
79
  end
84
80
 
85
81
  def set_logger_formatter_arrow
86
82
  logger.formatter = proc do |severity, datetime, progname, message|
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"
83
+ severity_text = { "DEBUG" => "\u{1f527} #{severity}:", "INFO" => " \u{276f}", "WARN" => "\u{2757} #{severity}:",
84
+ "ERROR" => "\u{274c} #{severity}:", "FATAL" => "\u{2b55} #{severity}:", "UNKNOWN" => "\u{2753} #{severity}:"
85
+ }
86
+ "\t\t\t\t#{severity_text[severity]} #{message}\n"
96
87
  end
97
88
  end
98
89
 
@@ -220,15 +220,10 @@ 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
-
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"
223
+ severity_text = { "DEBUG" => "\u{1f527} #{severity}:", "INFO" => " \u{276f}", "WARN" => "\u{2757} #{severity}:",
224
+ "ERROR" => "\u{274c} #{severity}:", "FATAL" => "\u{2b55} #{severity}:", "UNKNOWN" => "\u{2753} #{severity}:"
225
+ }
226
+ "\t\t\t\t#{severity_text[severity]} #{message}\n"
232
227
  end
233
228
 
234
229
  # Load vars and environment
@@ -296,7 +291,6 @@ module Smartcloud
296
291
  end
297
292
 
298
293
  def self.start_app_rails(appname, container_path, container_path_with_version)
299
- logger.info ""
300
294
  logger.info "Ruby on Rails application detected."
301
295
 
302
296
  # Setup rails env
@@ -310,9 +304,10 @@ module Smartcloud
310
304
  system("grep -q '^RAILS_MASTER_KEY=' #{env_path} || echo 'RAILS_MASTER_KEY=yourmasterkey' >> #{env_path}")
311
305
  logger.warn "Please set your RAILS_MASTER_KEY env var for this rails app." if system("grep -q '^RAILS_MASTER_KEY=yourmasterkey' #{env_path}")
312
306
 
313
- # Setup gems folder. If this is not created then docker will create it while running the container,
307
+ # Setup app folders. If this is not created then docker will create it while running the container,
314
308
  # but the folder will have root user assigned instead of the current user.
315
- FileUtils.mkdir_p("#{container_path}/gems")
309
+ FileUtils.mkdir_p("#{container_path}/app/vendor/bundle")
310
+ FileUtils.mkdir_p("#{container_path}/app/public")
316
311
 
317
312
  # Setup Godfile
318
313
  unless File.exist? "#{container_path_with_version}/Godfile"
@@ -336,7 +331,8 @@ module Smartcloud
336
331
  --expose='5000' \
337
332
  --volume='#{Smartcloud.config.user_home_path}/.smartcloud/config:#{Smartcloud.config.user_home_path}/.smartcloud/config' \
338
333
  --volume='#{container_path_with_version}:/app' \
339
- --volume='#{container_path}/gems:/app/vendor/bundle' \
334
+ --volume='#{container_path}/app/vendor/bundle:/app/vendor/bundle' \
335
+ --volume='#{container_path}/app/public:/app/public' \
340
336
  --workdir='/app' \
341
337
  --restart='always' \
342
338
  --network='nginx-network' \
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.180
4
+ version: 0.0.185
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timeboard