luban-kibana 0.1.1 → 0.1.2

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: adc7e78ce9b0e17531c87d41b02c3424e931822e
4
- data.tar.gz: 4c079e9cf67d08b9540d39bb5790fab23bec510f
3
+ metadata.gz: 76f71722971cdc1936980873599332a3373fc64b
4
+ data.tar.gz: de5a9f357a8ae6e676c205093f279eb46c7704f5
5
5
  SHA512:
6
- metadata.gz: 7546a2e85c98763eed2fb7e6b72113e65d32bf6da969139f0991615d3f09d1c754e342bb90e44771e4937c74c639dbdcf4b14965878601777d69f4c78e1bac8d
7
- data.tar.gz: f0e07bc437f5c71776d9fc82021fada033e2098347cb9ef0abc90d60d3e9b3eb397645903af6e4d524af40db2babbc8af98b65d2f58a359e3ab2c1437e8e6d15
6
+ metadata.gz: 8f4d9b2c0f330d462e79b1aacbd747b7a08b2b5bbd1f1367364789e4d13fb26bfecb9f9ab7a709487860711d0896ad2edceccc20fd950d00187e0d7b9f0396c6
7
+ data.tar.gz: 3532f992180c7a100a354c99594df8fe1b33e13eb778931c638fce0173d7c6d9e1eaea393a7c78dc40f924d14190546cdd8e80d0f3a2007c91bce9cef1af07f9
data/CHANGLOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change log
2
2
 
3
+ ## Version 0.1.2 (Sept 20, 2016)
4
+
5
+ Minor enhancements:
6
+ * Refactored the way of composing shell commands
7
+ * As a result, bumped up the gem dependency on Luban to version 0.8.0
8
+
3
9
  ## Version 0.1.1 (Sept 02, 2016)
4
10
 
5
11
  Minor enhancements:
@@ -8,20 +8,17 @@ module Luban
8
8
  base.define_executable 'kibana'
9
9
  end
10
10
 
11
- def shell_command_output
12
- @shell_command_output ||= ''
13
- end
14
-
15
11
  def process_pattern
16
12
  @process_pattern ||= "#{control_file_path}$"
17
13
  end
18
14
 
19
15
  def start_command
20
- @start_command ||= "#{kibana_executable} -c #{control_file_path} >/dev/null 2>&1 &"
16
+ #@start_command ||= shell_command("#{kibana_executable} -c #{control_file_path}")
17
+ @start_command ||= shell_command("#{kibana_executable} -c #{control_file_path}", output: nil) + ' &'
21
18
  end
22
19
 
23
20
  def stop_command
24
- @stop_command ||= "kill $(cat #{pid_file_path} 2>/dev/null) 2>&1"
21
+ @stop_command ||= shell_command("kill $(cat #{pid_file_path} 2>/dev/null)")
25
22
  end
26
23
  end
27
24
 
@@ -3,8 +3,8 @@
3
3
  check process <%= service_entry %>
4
4
  with pidfile <%= pid_file_path %>
5
5
  onreboot laststate
6
- start program = "/bin/bash -c 'sleep 1; <%= compose_command(start_command) %>'"
7
- stop program = "/bin/bash -c '<%= compose_command(stop_command) %>'"
6
+ start program = "/bin/bash -c 'sleep 1; <%= start_command %>'"
7
+ stop program = "/bin/bash -c '<%= stop_command %>'"
8
8
  if failed port <%= port %> for 4 times within 8 cycles then restart
9
9
  if cpu is greater than 80% for 20 cycles then alert
10
10
  if loadavg(5min) greater than 10 for 40 cycles then restart
@@ -2,7 +2,7 @@ module Luban
2
2
  module Deployment
3
3
  module Packages
4
4
  class Kibana
5
- VERSION = '0.1.1'
5
+ VERSION = '0.1.2'
6
6
  end
7
7
  end
8
8
  end
data/luban-kibana.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.7.12"
23
+ spec.add_dependency 'luban', ">= 0.8.0"
24
24
 
25
25
  spec.add_development_dependency "bundler", "~> 1.12"
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-kibana
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
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-02 00:00:00.000000000 Z
11
+ date: 2016-09-20 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.7.12
19
+ version: 0.8.0
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.7.12
26
+ version: 0.8.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement