luban-fluentd 0.1.3 → 0.1.4

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: ee306b1a06dd344ff414ddc8de9683fc3c2f6e65
4
- data.tar.gz: d6cf88d60a8df08b95aa362f745ac3ba7ea8100a
3
+ metadata.gz: 276270dbd85057b1ccb400d6530531dcfa77dc28
4
+ data.tar.gz: b26f31768828c66f702bdd4b2d214f13bbce278a
5
5
  SHA512:
6
- metadata.gz: 81396ad6d99b531bb07c72b2fb85a90cfca2e3d9bda50c90e491f8cddac8c7cc63b95e4dc148d3123e533953209c50e5ae977229500facf2579635ac6847a20b
7
- data.tar.gz: f3646411b8631884ccb57d6b24edbacb2f4639c37b7c90b238a958a2c28692aa1c22488559055ebc27007407ca4ba230961cfb970c4cd18c8ff9202e9a9085f6
6
+ metadata.gz: 7a8c57a59703beef53ee73764cb5bf32433ad48f388ae206f7803e8bc66230f78f8bdf8addfe0ebd6834b69fe028e3915d58861317295a7ca4bceca5a39e2914
7
+ data.tar.gz: 914ca49bf505de15a6dcbdbced31e72bb0f5dd8ed1e626cac336e202a3d6777918c065d84a4707000c2b1b553c2fb8880ac9e8ad87258f05ae6b5ef435716dc2
data/CHANGLOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change log
2
2
 
3
+ ## Version 0.1.4 (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.3 (Sept 04, 2016)
4
10
 
5
11
  Minor enhancements:
@@ -4,24 +4,16 @@ module Luban
4
4
  class Fluentd
5
5
  class Controller < Luban::Deployment::Application::Controller
6
6
  module Commands
7
- def ruby_bin_path
8
- @ruby_bin_path ||= package_bin_path('ruby')
9
- end
10
-
11
- def bundle_executable
12
- @bundle_executable ||= ruby_bin_path.join('bundle')
13
- end
14
-
15
7
  def process_pattern
16
8
  @process_pattern ||= "^supervisor:#{env_name}"
17
9
  end
18
10
 
19
11
  def start_command
20
- @start_command ||= "#{bundle_executable} exec fluentd -c #{control_file_path} -d #{pid_file_path} -o #{log_file_path}"
12
+ @start_command ||= bundle_command("fluentd -c #{control_file_path} -d #{pid_file_path} -o #{log_file_path}")
21
13
  end
22
14
 
23
15
  def stop_command
24
- @stop_command ||= "kill $(cat #{pid_file_path} 2>/dev/null)"
16
+ @stop_command ||= shell_command("kill $(cat #{pid_file_path} 2>/dev/null)")
25
17
  end
26
18
  end
27
19
 
@@ -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) %>; sleep 5'"
7
- stop program = "/bin/bash -c '<%= compose_command(stop_command) %>'"
6
+ start program = "/bin/bash -c 'sleep 1; <%= start_command %>; sleep 5'"
7
+ stop program = "/bin/bash -c '<%= stop_command %>'"
8
8
  if totalmem is greater than 50.0 MB for 40 cycles then restart
9
9
  if failed port <%= port %> for 4 times within 8 cycles then restart
10
10
  if cpu is greater than 80% for 20 cycles then alert
@@ -2,7 +2,7 @@ module Luban
2
2
  module Deployment
3
3
  module Applications
4
4
  class Fluentd
5
- VERSION = '0.1.3'
5
+ VERSION = '0.1.4'
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.13"
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-fluentd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
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-04 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.13
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.13
26
+ version: 0.8.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement