diffend-monitor 0.2.27 → 0.2.28

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
  SHA256:
3
- metadata.gz: 9d673c7a2172eef25077265ce5f85be8245908fc8c1fa94b931a1861381b4acb
4
- data.tar.gz: 809cda9d08c37b810272ec8bd4d071bb00204fd52dae851b9e11a55811da6b20
3
+ metadata.gz: 9042954f4e7d0e9dc7aa2e8553711fe078409db7ebaf4371a5f1a35de587ea5c
4
+ data.tar.gz: 2887faa65020fbd0b37b049c3338f540f662ca78869d22636f692d1df3b9447a
5
5
  SHA512:
6
- metadata.gz: d777a04280d95fdf3e4956b862e9ff2e1f7badeb18381d28fe65139626a82ed312f612d8351b7f2d4c33de5d9a4ae303a11133b1662b597aeaeeba3ff4938c03
7
- data.tar.gz: '047268ba1136f705d023ed83d101aae23c01e96327a7dcb3e27b85ae501d4821af1ee8a2cbc4e3004f16ef6bc9862241bb6ce524f8bdd156c90e41f7462e7525'
6
+ metadata.gz: f828ca7415cb0713688f1b90f9d806ec3f5369b8cf3f34da097b919dcdcbae13dc45f52f0f248af10cdf754ad302f4c9e3a4435d9b319b258e1e0ca10433b7eb
7
+ data.tar.gz: a3fbb0e11aff1cabe4e4f443a069b8209854b651c37eff3a794a4b01bb6e92651c1d0a8c6a897a74b68f5bedf41ab3aaa122283977a68e4744e93bdb71b12ad4
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## [Unreleased][master]
4
4
 
5
+ ## [0.2.28] (2020-09-19)
6
+ - start `Diffend::Monitor` only if not in development or test ([#44](https://github.com/diffend-io/diffend-ruby/pull/44))
7
+ - better host command expose ([#45](https://github.com/diffend-io/diffend-ruby/pull/45))
8
+
5
9
  ## [0.2.27] (2020-09-16)
6
10
  - introduce `Diffend::RequestObject` ([#40](https://github.com/diffend-io/diffend-ruby/pull/40))
7
11
  - clean up error codes and introduce `DIFFEND_INGORE_EXCEPTIONS` ([#41](https://github.com/diffend-io/diffend-ruby/pull/41))
@@ -60,7 +64,8 @@
60
64
 
61
65
  - initial release
62
66
 
63
- [master]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.27...HEAD
67
+ [master]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.28...HEAD
68
+ [0.2.28]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.27...v0.2.28
64
69
  [0.2.27]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.26...v0.2.27
65
70
  [0.2.26]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.25...v0.2.26
66
71
  [0.2.25]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.24...v0.2.25
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- diffend (0.2.27)
4
+ diffend (0.2.28)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -29,7 +29,7 @@
29
29
  # Diffend main namespace
30
30
  module Diffend
31
31
  # Current plugin version
32
- VERSION = '0.2.27'
32
+ VERSION = '0.2.28'
33
33
  # Diffend homepage
34
34
  HOMEPAGE = 'https://diffend.io'
35
35
 
@@ -57,8 +57,12 @@ module Diffend
57
57
 
58
58
  raise Errors::EmptyConfigurationFile if content.empty?
59
59
 
60
- OpenStruct.new(parse_file(content).merge(build_path: build_path))
61
- .tap(&Validator.method(:call))
60
+ OpenStruct.new(
61
+ parse_file(content)
62
+ .merge(build_path: build_path)
63
+ .merge(diffend_env: ENV['DIFFEND_ENV'] || 'development')
64
+ )
65
+ .tap(&Validator.method(:call))
62
66
  end
63
67
 
64
68
  def parse_file(content)
@@ -22,7 +22,9 @@
22
22
  versions/remote
23
23
  ].each { |file| require "diffend/voting/#{file}" }
24
24
 
25
- Thread.new do
26
- track = Diffend::Track.new
27
- track.start
25
+ unless %w[development test].include?(ENV['DIFFEND_ENV'])
26
+ Thread.new do
27
+ track = Diffend::Track.new
28
+ track.start
29
+ end
28
30
  end
@@ -162,10 +162,16 @@ module Diffend
162
162
  #
163
163
  # @return [Hash]
164
164
  def build_host_command
165
- {
166
- 'name' => $PROGRAM_NAME.split('/').last.strip,
167
- 'options' => ARGV.join(' ')
168
- }
165
+ if File.exist?($PROGRAM_NAME)
166
+ array = `ps -p #{Process.pid} -o command=`.strip.split(' ')
167
+ array.shift if array.first.end_with?('bin/ruby')
168
+ name = array.shift.split('/').last.strip
169
+ command = "#{name} #{array.join(' ')}"
170
+
171
+ { 'name' => command, 'title' => '' }
172
+ else
173
+ { 'name' => ARGV.join(' '), 'title' => $PROGRAM_NAME }
174
+ end
169
175
  end
170
176
 
171
177
  # Build host ips, except localhost and loopback
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diffend-monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.27
4
+ version: 0.2.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomasz Pajor
@@ -35,7 +35,7 @@ cert_chain:
35
35
  2DND//YJUikn1zwbz1kT70XmHd97B4Eytpln7K+M1u2g1pHVEPW4owD/ammXNpUy
36
36
  nt70FcDD4yxJQ+0YNiHd0N8IcVBM1TMIVctMNQ==
37
37
  -----END CERTIFICATE-----
38
- date: 2020-09-16 00:00:00.000000000 Z
38
+ date: 2020-09-19 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: bundler
metadata.gz.sig CHANGED
Binary file