probedock-ruby 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/probe_dock_ruby/config.rb +7 -3
- data/lib/probe_dock_ruby/uid.rb +6 -3
- data/lib/probe_dock_ruby.rb +1 -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: 42f4e0e239bc73974cc063a39154763d94f6f52d
|
4
|
+
data.tar.gz: 7daa0f58d40732a72639779b1caf72d0bf5ad981
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 216db63ecfd21cbccdf772e3482057af37f62d61e0f0f978be129de61b2b65d27399d25bc563ac1df12f0fc608ab39aef7d8837dcd1c6d45d6d2bb8cbc1bdf3a
|
7
|
+
data.tar.gz: ffe30b483888aa43b7bcdf8fc8839dab8956c5b04e054fd31286a6adb11118b02f9ff8a8bfeabe1c59779940b880c415f3105784f7cfe6910048a03af9ab9986
|
data/README.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
@@ -148,7 +148,7 @@ module ProbeDockProbe
|
|
148
148
|
end
|
149
149
|
|
150
150
|
def working_config_file
|
151
|
-
File.expand_path
|
151
|
+
File.expand_path parse_env_option(:config) || 'probedock.yml', Dir.pwd
|
152
152
|
end
|
153
153
|
|
154
154
|
def parse_env_flag name, default = false
|
@@ -157,8 +157,12 @@ module ProbeDockProbe
|
|
157
157
|
end
|
158
158
|
|
159
159
|
def parse_env_option name
|
160
|
-
|
161
|
-
|
160
|
+
|
161
|
+
var = "PROBEDOCK_#{name.to_s.upcase}"
|
162
|
+
return ENV[var] if ENV.key? var
|
163
|
+
|
164
|
+
old_var = "PROBE_DOCK_#{name.to_s.upcase}"
|
165
|
+
ENV.key?(old_var) ? ENV[old_var] : nil
|
162
166
|
end
|
163
167
|
|
164
168
|
def parse_general_options h
|
data/lib/probe_dock_ruby/uid.rb
CHANGED
@@ -3,7 +3,8 @@ require 'securerandom'
|
|
3
3
|
module ProbeDockProbe
|
4
4
|
|
5
5
|
class UID
|
6
|
-
ENVIRONMENT_VARIABLE = '
|
6
|
+
ENVIRONMENT_VARIABLE = 'PROBEDOCK_TEST_REPORT_UID'
|
7
|
+
OLD_ENVIRONMENT_VARIABLE = 'PROBE_DOCK_TEST_REPORT_UID'
|
7
8
|
|
8
9
|
class Error < ProbeDockProbe::Error; end
|
9
10
|
|
@@ -25,12 +26,14 @@ module ProbeDockProbe
|
|
25
26
|
end
|
26
27
|
|
27
28
|
def generate_uid_to_env
|
28
|
-
raise Error.new("$
|
29
|
+
raise Error.new("$PROBEDOCK_TEST_REPORT_UID is already defined") if env_var
|
29
30
|
ENV[ENVIRONMENT_VARIABLE] = generate_uid
|
31
|
+
ENV.delete OLD_ENVIRONMENT_VARIABLE
|
30
32
|
end
|
31
33
|
|
32
34
|
def clean_uid
|
33
35
|
ENV.delete ENVIRONMENT_VARIABLE
|
36
|
+
ENV.delete OLD_ENVIRONMENT_VARIABLE
|
34
37
|
FileUtils.remove_entry_secure uid_file if @workspace and File.exists?(uid_file)
|
35
38
|
end
|
36
39
|
|
@@ -42,7 +45,7 @@ module ProbeDockProbe
|
|
42
45
|
end
|
43
46
|
|
44
47
|
def env_var
|
45
|
-
ENV[ENVIRONMENT_VARIABLE]
|
48
|
+
ENV[ENVIRONMENT_VARIABLE] || ENV[OLD_ENVIRONMENT_VARIABLE]
|
46
49
|
end
|
47
50
|
|
48
51
|
def current_uid
|
data/lib/probe_dock_ruby.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: probedock-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Oulevay (Alpha Hydrae)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|