luban-monit 0.2.5 → 0.2.6

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
  SHA1:
3
- metadata.gz: 9a71315f94723462847395ad405ba19c0b67757f
4
- data.tar.gz: 587244ddcfadf3f2f2ccff51fcfa55d030a4933b
3
+ metadata.gz: e58b7aba75280b03c95a8ed17d461adbee4ff040
4
+ data.tar.gz: 488320f87da8acbb13bc2cad8d3c41f25d4c5a0d
5
5
  SHA512:
6
- metadata.gz: 91c969fa300170979a1388969f025f1352eb69825875beb2701961bfd2616d31960df990742e7d2f879ad45e7942b802249c463ebbbc505fb94e12d214e606d6
7
- data.tar.gz: 8b36d85febed7cc815e5c27a3ca784aa016ddb5920d9b48b7709d82aeb72fe4af467eda6826012a8c58b98a0d7110bc98783d34a850bbfd403a7e2aef7467a3a
6
+ metadata.gz: 5dd06bdbc4ee62129465050f38e66f6fd1c22951e1d940731db0c63252d5460f94efe826e604c490202e84971b5d35db1e6682bb50aa0fe9e323bf16fdc8e685
7
+ data.tar.gz: db7ce317cbfba2fec9345aa10088005b52b487bf1a4ad684d90ed93ceb3f278ad3eab1cd3fbeff9672fc07fce63eafd9901faa8a43688541827b17598c1341a9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Change log
2
2
 
3
+ ## Version 0.2.6 (Sept 29, 2016)
4
+
5
+ Minor enhancements:
6
+ * Added public control command to perform monitor status checkup by service/application
7
+ * Added switch #summary for subcommand #status to show short summary on process status
8
+ * As a result, bump up gem dependency of Luban to version 0.8.10
9
+
3
10
  ## Version 0.2.5 (Sept 28, 2016)
4
11
 
5
12
  Minor enhancements:
@@ -29,6 +29,13 @@ module Luban
29
29
  super
30
30
 
31
31
  commands[:control].alter do
32
+ task :status do
33
+ desc "Check process status"
34
+ switch :summary, "Show status summary", short: :s
35
+ argument :service_entry, "Service entry name", required: false
36
+ action! :check_process
37
+ end
38
+
32
39
  task :config_test do
33
40
  desc "Syntax check on control file"
34
41
  action! :config_test
@@ -24,6 +24,10 @@ module Luban
24
24
  def reload_monitor_command
25
25
  @reload_monitor_command ||= shell_command("#{monit_command} reload")
26
26
  end
27
+
28
+ def check_monitor_command(service_entry, summary: false)
29
+ shell_command("#{monit_command} #{summary ? :summary : :status} #{service_entry}")
30
+ end
27
31
  end
28
32
 
29
33
  include Public
@@ -70,7 +74,7 @@ module Luban
70
74
  end
71
75
 
72
76
  def check_process!
73
- capture(shell_command("#{monit_command} status"))
77
+ capture(check_monitor_command(task.args.service_entry, summary: task.opts.summary))
74
78
  end
75
79
 
76
80
  def match_process!
@@ -2,7 +2,7 @@ module Luban
2
2
  module Deployment
3
3
  module Packages
4
4
  class Monit
5
- VERSION = '0.2.5'
5
+ VERSION = '0.2.6'
6
6
  end
7
7
  end
8
8
  end
data/luban-monit.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ["lib"]
21
21
 
22
22
  spec.required_ruby_version = ">= 2.1.0"
23
- spec.add_dependency 'luban', ">= 0.8.8"
23
+ spec.add_dependency 'luban', ">= 0.8.10"
24
24
 
25
25
  spec.add_development_dependency "bundler", "~> 1.11"
26
26
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luban-monit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rubyist Chi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-27 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
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.8.8
19
+ version: 0.8.10
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.8.8
26
+ version: 0.8.10
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement