origen 0.61.4 → 0.62.0
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 +2 -2
- data/lib/origen/bugs/bug.rb +8 -0
- data/lib/origen/bugs.rb +11 -9
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8d7e8a11bc3eda2d32437fe4e757947beba29c6d1feafc5ad113f0bd6cdbb4b9
|
|
4
|
+
data.tar.gz: 5adc79314c76e4cba8c5fc6fa5ce7cf9b5b987285426e395f24e5de67c302b8f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6254128c52c57e6b979f0d3b98d64837fb43f29ff1c3a9e42fff53bbba9ac352ff7239f4ccba309a87875cc38095c08686d602952fa79b3c8bac12e36e9eae9f
|
|
7
|
+
data.tar.gz: 56683e322e8919b0230f0d712bd44a56a35e49256bf9ad7c3e2d628c416300856fe12cb9ab9831a9f554da88bd9fc5c2380882c800ece976fa2b56c27464f633
|
data/config/version.rb
CHANGED
data/lib/origen/bugs/bug.rb
CHANGED
|
@@ -10,9 +10,17 @@ module Origen
|
|
|
10
10
|
@name = name
|
|
11
11
|
@affected_versions = [options[:affected_version] || options[:affected_versions]].flatten.compact
|
|
12
12
|
@fixed_on_version = options[:fixed_on_version]
|
|
13
|
+
@unfixable = options[:unfixable]
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# An unfixable bug applies regardless of the IP version.
|
|
17
|
+
def unfixable?
|
|
18
|
+
!!@unfixable
|
|
13
19
|
end
|
|
14
20
|
|
|
15
21
|
def present_on_version?(version, _options = {})
|
|
22
|
+
return true if unfixable?
|
|
23
|
+
|
|
16
24
|
if affected_versions.empty?
|
|
17
25
|
if fixed_on_version
|
|
18
26
|
version < fixed_on_version
|
data/lib/origen/bugs.rb
CHANGED
|
@@ -20,20 +20,22 @@ module Origen
|
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
# Returns true if the
|
|
24
|
-
#
|
|
23
|
+
# Returns true if the IP represented by the object has the bug of the given name.
|
|
24
|
+
# Bugs explicitly declared with unfixable: true can be queried without a version
|
|
25
|
+
# attribute.
|
|
25
26
|
def has_bug?(name, _options = {})
|
|
27
|
+
name = name.to_s.downcase.to_sym
|
|
28
|
+
bug = bugs[name]
|
|
29
|
+
|
|
30
|
+
return true if bug && bug.unfixable?
|
|
31
|
+
|
|
26
32
|
unless respond_to?(:version) && version
|
|
27
|
-
puts 'To test for the presence of a bug the object must implement an attribute'
|
|
33
|
+
puts 'To test for the presence of a versioned bug the object must implement an attribute'
|
|
28
34
|
puts "called 'version' which returns the IP version represented by the the object."
|
|
29
35
|
fail 'Version undefined!'
|
|
30
36
|
end
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
bugs[name].present_on_version?(version)
|
|
34
|
-
else
|
|
35
|
-
false
|
|
36
|
-
end
|
|
37
|
+
|
|
38
|
+
bug ? bug.present_on_version?(version) : false
|
|
37
39
|
end
|
|
38
40
|
|
|
39
41
|
# Returns a hash containing all known bugs associated with
|