grid_runner 0.0.3 → 0.0.4

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: d49e545bf848dc4a673783528ec585911a6c0b62
4
- data.tar.gz: 5086539852b643a39558fc369d2de82f989d3522
3
+ metadata.gz: a7dea49a431b5ff8db24f1b06fb785c891f7ca87
4
+ data.tar.gz: d609049c7c8709c2556428a8ee56658ea0ac6433
5
5
  SHA512:
6
- metadata.gz: 564d917d50adcbb457aa7f4e493bb3bfc88d06b1850b6b83436d551e8dea7d9d94d0864e2c5bc53dcf774bc1809b675ab03ba8533d40bcc5fe2e058ccb8c10c6
7
- data.tar.gz: 53d378bf8223f0503f93930b3deb7f235a9c9828a8b69903e73dd5643f4cb85536c3910f709b41bc81853c48b2e59c62e54dc2668e5da386230e36a1f41d1eea
6
+ metadata.gz: 14ed1e1240f475b84b7e7e0a27da27d74315bd73311b97aaf244cd4dcd3a593746070adaff220d0093992f491cb5ad1d1dccaa700e5b6c1c69f4b78f5ee87a38
7
+ data.tar.gz: 3b5f5f00cff814228eb5550795a212d8503f52ac1ff33705f210a3db855ac701b9a31f3898f9b0be4d4c08c5bc8b707c87ed2b572809192b9b219e0c5380679f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grid_runner (0.0.1)
4
+ grid_runner (0.0.3)
5
5
  gli (= 2.13.4)
6
6
 
7
7
  GEM
@@ -55,3 +55,6 @@ DEPENDENCIES
55
55
  rainbow
56
56
  rake
57
57
  rdoc
58
+
59
+ BUNDLED WITH
60
+ 1.10.6
Binary file
@@ -69,11 +69,19 @@ class App
69
69
 
70
70
  private
71
71
 
72
+ def self.app_process_from_grep(stdout)
73
+ stdout.split(/\n/).find do |l|
74
+ (l.match("sbt") || l.match("elasticsearch")) &&
75
+ !l.match("grep") &&
76
+ !l.match("grid_runner")
77
+ end
78
+ end
79
+
72
80
  def self.ps_out(name)
73
81
  stdout, stderr, cmd_status = Open3.capture3("ps aux | grep #{name}")
74
82
  if cmd_status.success?
75
83
  # find processes that are either sbt or ES, and filter out the grep command itself
76
- if p = stdout.split(/\n/).find {|l| (l.match("sbt") || l.match("elasticsearch")) && !l.match("grep") }
84
+ if p = app_process_from_grep(stdout)
77
85
  proc_status = :running
78
86
  pid = p.match(/\d{1,8}\s/)[0]
79
87
  else
@@ -1,3 +1,3 @@
1
1
  module GridRunner
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grid_runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - NickyPStraightStylinOnEm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-30 00:00:00.000000000 Z
11
+ date: 2015-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -80,6 +80,7 @@ files:
80
80
  - Rakefile
81
81
  - bin/grid_runner
82
82
  - grid_runner-0.0.1.gem
83
+ - grid_runner-0.0.3.gem
83
84
  - grid_runner.gemspec
84
85
  - grid_runner.rdoc
85
86
  - lib/grid_runner.rb