luban-elasticsearch 0.1.1 → 0.1.2

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: c7e609163b6c607d76660ecb403fd237a9410470
4
- data.tar.gz: d2412a4ddfa38750a469735fe234a0533978d0b8
3
+ metadata.gz: b371bbc0111a8b46fde780031c66149e1f2a7d97
4
+ data.tar.gz: 7ecf5f64b9975b93e9598c035c650ddf4830dcca
5
5
  SHA512:
6
- metadata.gz: ef8c206e5dcf1d78d84f01949467e8f80d13013ab2da4a954c0689301e65609aea06303170a2966b23e5f78558925a8c71c51b9b464ef795344b04ce58e1ae74
7
- data.tar.gz: e3241e4fcb14c54650f2dc457e281e46ce2b2ff967ea124cdf3fdeb598be807a2e8c553ccd75b322faeb18a5f50b92b967743cf82b3072c8567446915286cf53
6
+ metadata.gz: a4a11c0dfe1390bb354952fd5b35fa90f92af42540f35c6878e1635395be6eab0d6123bdcaa0704f72fbfcbd3c236d9f990a137fcc94000a79ac2958b6b2e084
7
+ data.tar.gz: de30203dbef5ed12b93854d4b3f575a3608774e94afedef7463856b5517d46c975cd985337368bc79a237878d9ab595e75b5ca5fcdfb9f25d12338c0c2342436
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 (Aug 31, 2016)
4
10
 
5
11
  Minor enhancements:
@@ -17,11 +17,11 @@ module Luban
17
17
  end
18
18
 
19
19
  def start_command
20
- @start_command ||= "PATH=#{java_bin_path}:$PATH #{elasticsearch_executable} -d -p #{pid_file_path} --path.conf=#{profile_path}"
20
+ @start_command ||= shell_command("PATH=#{java_bin_path}:$PATH #{elasticsearch_executable} -d -p #{pid_file_path} --path.conf=#{profile_path}")
21
21
  end
22
22
 
23
23
  def stop_command
24
- @stop_command ||= "kill $(cat #{pid_file_path} 2>/dev/null)"
24
+ @stop_command ||= shell_command("kill $(cat #{pid_file_path} 2>/dev/null)")
25
25
  end
26
26
  end
27
27
 
@@ -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 Elasticsearch
5
- VERSION = '0.1.1'
5
+ VERSION = '0.1.2'
6
6
  end
7
7
  end
8
8
  end
@@ -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.6"
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-elasticsearch
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-08-31 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.6
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.6
26
+ version: 0.8.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement