runnerbean 0.0.1 → 0.0.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: 6db84c5833b28b6b42632acadeaa26ca0229359d
4
- data.tar.gz: 3f99346b043a96c2c944a48000c59ef3aa1ddf1f
3
+ metadata.gz: c92db16e711b588ad071465aa3a1706702b707a9
4
+ data.tar.gz: 0c14b41d5d111e32674b6fd15b5e84eb0215840d
5
5
  SHA512:
6
- metadata.gz: a8a3f81f604839a6828e1be2fdf7e162d2cf7d93b8aff0cef040d2e118acf40ff52e60e54c5ab65110c4dfd2fae0ec40213d7fd8c2e64c273fc37c5b72b70208
7
- data.tar.gz: ea4f22990d4a4dc4a696d3d9f8c58e2f7274ae868e0e9f5bc2d4a0f5574e30bc1f446be494fab272ea4754682480f75c7edfc02439330b87ac99398adf38f7a6
6
+ metadata.gz: 8210b2dd8f3c46f8e9c391b250a6c2842f5b5363a61ec9f7168461e00afad68bf1c23ca62565dcae52fcbc6b408bbdebcd32badb0d3f18108120f0fb832713f1
7
+ data.tar.gz: 846841cd685bc9c3ecd02dd3f9328f8efdf590d115db00cc20374b7cdbf5ad60d0860ab14d39fa88cb433883abfd2dc4d63966414e233775cadfdfa31ff0e363
@@ -6,7 +6,7 @@ $LOAD_PATH.unshift(File.join(APP_ROOT, 'lib'))
6
6
  require 'runnerbean'
7
7
 
8
8
  class Frontend
9
- attr_accessor :log_file_prefix
9
+ attr_accessor :group_name
10
10
 
11
11
  def start_command
12
12
  "echo 'This would be the Frontend start command'"
@@ -26,7 +26,7 @@ class Frontend
26
26
  end
27
27
 
28
28
  class Backend
29
- attr_accessor :log_file_prefix
29
+ attr_accessor :group_name
30
30
 
31
31
  def start_command
32
32
  "echo 'This would be the Backend start command'"
@@ -6,7 +6,7 @@ $LOAD_PATH.unshift(File.join(APP_ROOT, 'lib'))
6
6
  require 'runnerbean'
7
7
 
8
8
  class Frontend
9
- attr_accessor :log_file_prefix
9
+ attr_accessor :group_name
10
10
 
11
11
  def start_command
12
12
  "echo 'This would be the Frontend start command'"
@@ -26,7 +26,7 @@ class Frontend
26
26
  end
27
27
 
28
28
  class Backend
29
- attr_accessor :log_file_prefix
29
+ attr_accessor :group_name
30
30
 
31
31
  def start_command
32
32
  "echo 'This would be the Backend start command'"
data/examples/simple CHANGED
@@ -6,10 +6,10 @@ $LOAD_PATH.unshift(File.join(APP_ROOT, 'lib'))
6
6
  require 'runnerbean'
7
7
 
8
8
  class MyTestProcess
9
- attr_accessor :log_file_prefix
9
+ attr_accessor :group_name
10
10
 
11
11
  def start_command
12
- "echo 'This would be the start command, logging to prefix of #{log_file_prefix}' &&" \
12
+ "echo 'This would be the start command, logging to prefix of #{group_name}' &&" \
13
13
  "echo '... with a following delay of #{sleep_after_start}'"
14
14
  end
15
15
 
@@ -18,7 +18,7 @@ class MyTestProcess
18
18
  end
19
19
 
20
20
  def kill_command
21
- "echo 'This would be the kill command, logging to prefix of #{log_file_prefix}' &&" \
21
+ "echo 'This would be the kill command, logging to prefix of #{group_name}' &&" \
22
22
  "echo '... with a following delay of #{sleep_after_kill}'"
23
23
  end
24
24
 
@@ -28,7 +28,7 @@ module Runnerbean
28
28
  end
29
29
 
30
30
  def generic_command(command)
31
- request_log_files
31
+ set_group_name_on_processes
32
32
 
33
33
  commands = find_commands(command)
34
34
  execute(*commands)
@@ -37,8 +37,8 @@ module Runnerbean
37
37
  sleep_for(*sleep_times)
38
38
  end
39
39
 
40
- def request_log_files
41
- processes.each { |p| p.log_file_prefix = name }
40
+ def set_group_name_on_processes
41
+ processes.each { |p| p.group_name = name }
42
42
  end
43
43
 
44
44
  def find_commands(command)
@@ -1,3 +1,3 @@
1
1
  module Runnerbean
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
@@ -14,7 +14,7 @@ module Runnerbean
14
14
  start_command: the_frontend_start,
15
15
  sleep_after_start: 7,
16
16
  sleep_after_kill: 2,
17
- :'log_file_prefix=' => nil
17
+ :'group_name=' => nil
18
18
  )
19
19
  end
20
20
  let(:the_worker_kill) { 'kill_that_worker' }
@@ -23,7 +23,7 @@ module Runnerbean
23
23
  name: 'name_of_the_worker',
24
24
  kill_command: the_worker_kill,
25
25
  sleep_after_kill: 4,
26
- :'log_file_prefix=' => nil
26
+ :'group_name=' => nil
27
27
  )
28
28
  end
29
29
  before { allow(Kernel).to receive(:system).with(anything) }
@@ -75,7 +75,7 @@ module Runnerbean
75
75
  end
76
76
 
77
77
  it 'instructs process to log to logfile, prefixed with group name' do
78
- expect(the_frontend).to receive(:log_file_prefix=).with(group.name)
78
+ expect(the_frontend).to receive(:group_name=).with(group.name)
79
79
  subject
80
80
  end
81
81
 
@@ -14,7 +14,7 @@ module Runnerbean
14
14
  start_command: the_frontend_start,
15
15
  sleep_after_start: 7,
16
16
  sleep_after_kill: 2,
17
- :'log_file_prefix=' => nil
17
+ :'group_name=' => nil
18
18
  )
19
19
  end
20
20
  let(:the_worker_kill) { 'kill_that_worker' }
@@ -22,7 +22,7 @@ module Runnerbean
22
22
  double('the worker',
23
23
  kill_command: the_worker_kill,
24
24
  sleep_after_kill: 4,
25
- :'log_file_prefix=' => nil
25
+ :'group_name=' => nil
26
26
  )
27
27
  end
28
28
  before { allow(Kernel).to receive(:system).with(anything) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runnerbean
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - baob