smartcloud 0.0.173 → 0.0.174
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/smartcloud/grids/buildpacker.rb +23 -8
- data/lib/smartcloud/grids/runner.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d2679c6e9eaf9e186eb9dd86a5620490b12a761ad3cf88bd8ab5410fb0edcc0
|
4
|
+
data.tar.gz: 72e051e91d386f6bf8d70b9370b851b74c7182749285929cfc0cb3b11458dc13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bef0d06808308bf829ea78049fe339cb08f2dc1550db0de070932c2d5d0b8335d96097a1baf53f02505d87ef0d2ccc76f234a019685d396b5903eee4197723f
|
7
|
+
data.tar.gz: 5be6aedcc18398a619c5bbdb7d0d1a9fe5bfcfb8ac48e2e3766e8589ef005da403e95a31ae55d0e55f2bf5d3d927c8f4261f3e7a15435f22fc24abcb2e41e12a
|
@@ -28,28 +28,42 @@ module Smartcloud
|
|
28
28
|
def bundle_install?
|
29
29
|
logger.info ""
|
30
30
|
logger.info "Performing bundle install ..."
|
31
|
+
|
31
32
|
set_logger_formatter_tabs
|
33
|
+
exit_status = nil
|
32
34
|
Open3.popen2e("bundle", "install", "--deployment", "--clean") do |stdin, stdout_and_stderr, wait_thr|
|
33
35
|
stdout_and_stderr.each { |line| logger.info "#{line}" }
|
34
|
-
|
36
|
+
exit_status = wait_thr.value.success?
|
35
37
|
end
|
36
38
|
set_logger_formatter_arrow
|
37
|
-
|
38
|
-
|
39
|
+
|
40
|
+
if exit_status
|
41
|
+
return true
|
42
|
+
else
|
43
|
+
logger.error "Could not complete bundle install."
|
44
|
+
return false
|
45
|
+
end
|
39
46
|
end
|
40
47
|
|
41
48
|
# Perform pre-compiling of assets
|
42
49
|
def precompile_assets?
|
43
50
|
logger.info ""
|
44
51
|
logger.info "Installing Javascript dependencies & pre-compiling assets ..."
|
52
|
+
|
45
53
|
set_logger_formatter_tabs
|
54
|
+
exit_status = nil
|
46
55
|
Open3.popen2e("bundle", "exec", "rails", "assets:precompile") do |stdin, stdout_and_stderr, wait_thr|
|
47
56
|
stdout_and_stderr.each { |line| logger.info "#{line}" }
|
48
|
-
|
57
|
+
exit_status = wait_thr.value.success?
|
49
58
|
end
|
50
59
|
set_logger_formatter_arrow
|
51
|
-
|
52
|
-
|
60
|
+
|
61
|
+
if exit_status
|
62
|
+
return true
|
63
|
+
else
|
64
|
+
logger.error "Could not install Javascript dependencies or pre-compile assets."
|
65
|
+
return false
|
66
|
+
end
|
53
67
|
end
|
54
68
|
|
55
69
|
# Perform starting of web server
|
@@ -70,13 +84,14 @@ module Smartcloud
|
|
70
84
|
|
71
85
|
def set_logger_formatter_arrow
|
72
86
|
logger.formatter = proc do |severity, datetime, progname, message|
|
73
|
-
"
|
87
|
+
severity_text = (severity == 'INFO') ? " " : "#{severity}:"
|
88
|
+
"\t\t\t------> #{severity_text} #{message}\n"
|
74
89
|
end
|
75
90
|
end
|
76
91
|
|
77
92
|
def set_logger_formatter_tabs
|
78
93
|
logger.formatter = proc do |severity, datetime, progname, message|
|
79
|
-
"\t\t\t\t#{message}"
|
94
|
+
"\t\t\t\t #{message}"
|
80
95
|
end
|
81
96
|
end
|
82
97
|
end
|
@@ -220,7 +220,8 @@ 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
|
-
|
223
|
+
severity_text = (severity == 'INFO') ? " " : "#{severity}:"
|
224
|
+
"\t\t\t------> #{severity_text} #{message}\n"
|
224
225
|
end
|
225
226
|
|
226
227
|
# Load vars and environment
|