alerty 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/alerty.gemspec +1 -1
- data/lib/alerty/command.rb +11 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3aefd93f293e597e994789dc114fcc562cbe734
|
4
|
+
data.tar.gz: 0d233745290cafd7738d9bb38681caf668b38556
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f692ddec011a57dcd0c40a477cece6b927e9623b3b0f85db287c49625fb1ea1a6d294d16e1efd9a62ab86a6786a1fa25db2fea0fb48019bbd154eb675efaf40
|
7
|
+
data.tar.gz: 2f307d1be4774da9cf5d5576f617928dff211be0648f44b39efc984073f8774d1bdbf551d29931a2607bc03cd8140066c9184756f6d5266cceac4d97b98ab117
|
data/CHANGELOG.md
CHANGED
data/alerty.gemspec
CHANGED
data/lib/alerty/command.rb
CHANGED
@@ -15,7 +15,7 @@ class Alerty
|
|
15
15
|
with_retry do |retries|
|
16
16
|
started_at = Time.now
|
17
17
|
begin
|
18
|
-
result = Frontkick.exec("#{@command} 2>&1", @opts)
|
18
|
+
result = with_clean_env { Frontkick.exec("#{@command} 2>&1", @opts) }
|
19
19
|
rescue Frontkick::Timeout => e
|
20
20
|
record = {
|
21
21
|
hostname: @hostname,
|
@@ -64,6 +64,16 @@ class Alerty
|
|
64
64
|
|
65
65
|
private
|
66
66
|
|
67
|
+
def with_clean_env
|
68
|
+
if defined?(Bundler)
|
69
|
+
Bundler.with_clean_env do
|
70
|
+
yield
|
71
|
+
end
|
72
|
+
else
|
73
|
+
yield
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
67
77
|
def with_retry
|
68
78
|
retries = 0
|
69
79
|
while true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alerty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|