test_ids 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/config/version.rb +1 -1
- data/lib/test_ids/allocator.rb +10 -16
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2715a10e5e999b8e7cb1d8240803232fadf178139e64a2f44186d69b65602a15
|
4
|
+
data.tar.gz: 2b550ced04afc190362992970a7cfaeb76e7ba78d519894ebdeb04391cd3b721
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d62fc377c3bcbd5e840ed16c17e3749d7611f95e89eee17fe4bfa5ae7b572e6db8f12bf6016393f103e3dc2c59363205b5c90ad8ad999d43d87ba52017fd349
|
7
|
+
data.tar.gz: dfe969df5389777ea3545f506b78046b0d5596d49fc37890b7eab748329337ee955050ed6756c0977d22420408b6329c1dcaab1f400e0d8ef744c386bd197f13
|
data/config/version.rb
CHANGED
data/lib/test_ids/allocator.rb
CHANGED
@@ -33,24 +33,15 @@ module TestIds
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def range_item(range, options)
|
36
|
-
|
37
|
-
#
|
38
|
-
|
39
|
-
|
40
|
-
lines = File.readlines(file)
|
41
|
-
# Remove any header comment lines since these are not valid JSON
|
42
|
-
lines.shift while lines.first =~ /^\/\// && !lines.empty?
|
43
|
-
s = JSON.load(lines.join("\n"))
|
44
|
-
rangehash = s['pointers']['ranges']
|
45
|
-
if rangehash.nil?
|
46
|
-
rangehash = store['pointers']['ranges'] ||= {}
|
47
|
-
else
|
48
|
-
rangehash = Hash[rangehash.map { |k, v| [k.to_sym, v] }]
|
49
|
-
end
|
36
|
+
# This is the actual fix, it should now not be dependent on the json file being read in, instead the store pointers
|
37
|
+
# will be utilized to get the correct number assigned from the range.
|
38
|
+
if store['pointers']['ranges'].nil?
|
39
|
+
rangehash = {}
|
50
40
|
else
|
51
|
-
|
52
|
-
rangehash =
|
41
|
+
rangehash = store['pointers']['ranges']
|
42
|
+
rangehash = Hash[rangehash.map { |k, v| [k.to_sym, v] }]
|
53
43
|
end
|
44
|
+
orig_options = options.dup
|
54
45
|
# Check the database to see if the passed in range has already been included in the database hash
|
55
46
|
if rangehash.key?(:"#{range}")
|
56
47
|
# Read out the database hash to see what the last_softbin given out was for that range.
|
@@ -82,6 +73,9 @@ module TestIds
|
|
82
73
|
Origen.log.error 'Assigned value not in range'
|
83
74
|
fail
|
84
75
|
end
|
76
|
+
# Since the assigned value for this test has now changed, update store to contain the newly assigned value
|
77
|
+
# so that when the json file is written, it contains the latest assigned value name.
|
78
|
+
store['pointers']['ranges'] = rangehash
|
85
79
|
assigned_value
|
86
80
|
end
|
87
81
|
|
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: 1.1.
|
4
|
+
version: 1.1.2
|
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: 2020-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|
@@ -100,8 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: 1.8.11
|
102
102
|
requirements: []
|
103
|
-
|
104
|
-
rubygems_version: 2.7.7
|
103
|
+
rubygems_version: 3.0.3
|
105
104
|
signing_key:
|
106
105
|
specification_version: 4
|
107
106
|
summary: Origen plugin to assign and track test program bins and test numbers
|