test_ids 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/version.rb +2 -2
- data/lib/test_ids/allocator.rb +3 -0
- data/lib/test_ids.rb +13 -0
- data/program/prb1.rb +1 -0
- 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: bb082e87d6a2fe94daeb06ca7afe3666bab6b9b0
|
4
|
+
data.tar.gz: c6ea82a1417478b63413bf51e7cd58bfca6fe828
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a24cabcbdf2d02a3ac2f9f0a3575ea0c211939f560ac0f2df4cc14ef9d43c043793fd4a3aaeb248e5f5102fdaf9a54b34a451084820088e5d0722ba67ef868c9
|
7
|
+
data.tar.gz: 08095b4eaeba91a616ff7cbbccfe1f610ab5e3ea6e9ed6fcdbdb8217e82f32c4eaa72a96a545cc1b166fcfcf155c7dc16d9687e93065c7624b76903022d344ff
|
data/config/version.rb
CHANGED
data/lib/test_ids/allocator.rb
CHANGED
@@ -51,6 +51,9 @@ module TestIds
|
|
51
51
|
t['bin'] ||= allocate_bin
|
52
52
|
t['softbin'] ||= allocate_softbin(t['bin'])
|
53
53
|
t['number'] ||= allocate_number(t['bin'], t['softbin'])
|
54
|
+
t['bin'] = nil if t['bin'] == :none
|
55
|
+
t['softbin'] = nil if t['softbin'] == :none
|
56
|
+
t['number'] = nil if t['number'] == :none
|
54
57
|
# Record that there has been a reference to the final numbers
|
55
58
|
time = Time.now.to_f
|
56
59
|
store['references']['bin'][t['bin'].to_s] = time if t['bin']
|
data/lib/test_ids.rb
CHANGED
@@ -19,6 +19,19 @@ module TestIds
|
|
19
19
|
end
|
20
20
|
|
21
21
|
class <<self
|
22
|
+
# Allocates a number to the given test and returns a new hash containing
|
23
|
+
# :bin, :softbin and :number keys.
|
24
|
+
#
|
25
|
+
# The given options hash is not modified by calling this method.
|
26
|
+
#
|
27
|
+
# Use the same arguments as you would normally pass to flow.test, the numbers
|
28
|
+
# returned will be the same as would be injected into flow.test.
|
29
|
+
def allocate(instance, options = {})
|
30
|
+
opts = options.dup
|
31
|
+
current_configuration.allocator.allocate(instance, opts)
|
32
|
+
{ bin: opts[:bin], softbin: opts[:softbin], number: opts[:number] }
|
33
|
+
end
|
34
|
+
|
22
35
|
def current_configuration
|
23
36
|
configuration(@configuration_id)
|
24
37
|
end
|
data/program/prb1.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test_ids
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen McGinty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|