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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23bf815842f4bd1f2c40d19802e6bde6d2343aee
4
- data.tar.gz: f66d5ae1474538712d06fe75de4e096a462c60d4
3
+ metadata.gz: 42f4e0e239bc73974cc063a39154763d94f6f52d
4
+ data.tar.gz: 7daa0f58d40732a72639779b1caf72d0bf5ad981
5
5
  SHA512:
6
- metadata.gz: 2f95da27dbb3b7bff866d392719e97f5bc07685b3fa5617759a28ca4375551f9c5aef2a929458144eecfb12c384a5c98b31677f45065af866a691e406b0a394a
7
- data.tar.gz: 5089ff9bfda8ff1755eee59deb59fec0e3d82005d0f37d396544ec2b63a788ea52baf6527e2abe1a5811b534a1373fe6257603aeae590beb1da5888efbc4ab64
6
+ metadata.gz: 216db63ecfd21cbccdf772e3482057af37f62d61e0f0f978be129de61b2b65d27399d25bc563ac1df12f0fc608ab39aef7d8837dcd1c6d45d6d2bb8cbc1bdf3a
7
+ data.tar.gz: ffe30b483888aa43b7bcdf8fc8839dab8956c5b04e054fd31286a6adb11118b02f9ff8a8bfeabe1c59779940b880c415f3105784f7cfe6910048a03af9ab9986
data/README.md CHANGED
@@ -17,7 +17,7 @@
17
17
  Add it to your Gemfile:
18
18
 
19
19
  ```rb
20
- gem 'probedock-ruby', '~> 0.1.1'
20
+ gem 'probedock-ruby', '~> 0.1.2'
21
21
  ```
22
22
 
23
23
  Run `bundle install`.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.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 ENV['PROBE_DOCK_CONFIG'] || 'probedock.yml', Dir.pwd
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
- var = "PROBE_DOCK_#{name.upcase}"
161
- ENV.key?(var) ? ENV[var] : nil
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
@@ -3,7 +3,8 @@ require 'securerandom'
3
3
  module ProbeDockProbe
4
4
 
5
5
  class UID
6
- ENVIRONMENT_VARIABLE = 'PROBE_DOCK_TEST_REPORT_UID'
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("$PROBE_DOCK_TEST_REPORT_UID is already defined") if env_var
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
@@ -1,6 +1,6 @@
1
1
  # encoding: UTF-8
2
2
  module ProbeDockProbe
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
 
5
5
  class Error < StandardError; end
6
6
  class PayloadError < Error; end
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.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-07-29 00:00:00.000000000 Z
11
+ date: 2015-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj