luban 0.8.9 → 0.8.10

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
  SHA1:
3
- metadata.gz: f69ca20908081660c8df1151d3de642e93faf8eb
4
- data.tar.gz: 549dcf375a340e2c247990a71694958ff8e5e226
3
+ metadata.gz: 93138388605dfd36238452d9c61eda0ba31c838f
4
+ data.tar.gz: bfe1d55d44ef71c128c855115aacd1a679b998a4
5
5
  SHA512:
6
- metadata.gz: e1b38c2d2deb962245497d79b8c83267c2cb725f7b0e3d2ef3c95f892736c4562c4a47bcbfb907a08d597774808ca75abbe81acc5d4a43ce3088c69b76342a63
7
- data.tar.gz: f4ace74cdcb381e706bf207b946160927aedd832e79735408fa7137010185ba91c60b12e0e6b0656bc1d7e38e3d676dd6a74e359ddbb3fa6d6fd4722541d5425
6
+ metadata.gz: 93051b080c0bfca59e1f44fed83e752be9271b5849feb63927f50c94bbeef072165c1064ba779101c7f695e636406a419616b2b289ebe2624a0db342ed7bba17
7
+ data.tar.gz: 0e0aa51ed17722f15313f15490e739079efd8180c0e59883847e75cd2ebb4336cce0927b9d637741cee97f1497f5ff6cde50a5e7719f4cca12540cf5c0eda640
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Change log
2
2
 
3
+ ## Version 0.8.10 (Sept 29, 2016)
4
+
5
+ Minor enhancements:
6
+ * Enhanced monitor status check up by service/application
7
+
8
+ Bug fixes:
9
+ * Increased keep_releases from 1 to 5 in Publisher to solve puma restart failure
10
+
3
11
  ## Version 0.8.9 (Sept 28, 2016)
4
12
 
5
13
  Minor enhancements:
@@ -160,7 +160,7 @@ module Luban
160
160
  "#{release_name} in #{stage} #{project} is published successfully."
161
161
  end
162
162
 
163
- def cleanup_releases(keep_releases = 1)
163
+ def cleanup_releases(keep_releases = 5)
164
164
  files = capture(:ls, '-xtd', releases_path.join("#{release_version}-*")).split(" ")
165
165
  if files.count > keep_releases
166
166
  files.last(files.count - keep_releases).each { |f| rmdir(f) }
@@ -149,7 +149,7 @@ module Luban
149
149
  end
150
150
 
151
151
  module Monitor
152
- Actions = %i(monitor_on monitor_off monitor_reload)
152
+ Actions = %i(monitor_on monitor_off monitor_reload monitor_check)
153
153
  Actions.each do |action|
154
154
  define_method(action) do |args:, opts:|
155
155
  raise NotImplementedError, "#{self.class.name}##{__method__} is an abstract method."
@@ -181,6 +181,12 @@ module Luban
181
181
  desc "Reload monitor configuration"
182
182
  action! :monitor_reload
183
183
  end
184
+
185
+ task :status do
186
+ desc "Check monitor status"
187
+ switch :summary, "Show status summary", short: :s
188
+ action! :monitor_check
189
+ end
184
190
  end
185
191
  end
186
192
  end
@@ -139,6 +139,10 @@ module Luban
139
139
  reload_monitor_process(output: :update_result)
140
140
  end
141
141
 
142
+ def monitor_check
143
+ check_monitor_status(output: :update_result)
144
+ end
145
+
142
146
  def monitor_process(output: :info)
143
147
  if monitor_process!
144
148
  send(output, "Turned on process monitor for #{service_entry}")
@@ -163,6 +167,10 @@ module Luban
163
167
  end
164
168
  end
165
169
 
170
+ def check_monitor_status(output: :info)
171
+ send(output, check_monitor_status!)
172
+ end
173
+
166
174
  def default_pending_seconds; 30; end
167
175
  def default_pending_interval; 1; end
168
176
 
@@ -240,6 +248,10 @@ module Luban
240
248
  def reload_monitor_process!
241
249
  test(reload_monitor_command)
242
250
  end
251
+
252
+ def check_monitor_status!
253
+ capture(check_monitor_command(service_entry, summary: task.opts.summary))
254
+ end
243
255
  end
244
256
 
245
257
  include Base
@@ -1,5 +1,5 @@
1
1
  module Luban
2
2
  module Deployment
3
- VERSION = "0.8.9"
3
+ VERSION = "0.8.10"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luban
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.9
4
+ version: 0.8.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rubyist Lei
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-28 00:00:00.000000000 Z
11
+ date: 2016-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: luban-cli