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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de55af21a90c04613a1ff7832f675da5c9f2c667b7c4bafc7c0a7af9df206bf5
4
- data.tar.gz: b84a97c22be2ccaae7df92afa0695158271394ec56f122b1ec5e4b820c4f4655
3
+ metadata.gz: 8d7e8a11bc3eda2d32437fe4e757947beba29c6d1feafc5ad113f0bd6cdbb4b9
4
+ data.tar.gz: 5adc79314c76e4cba8c5fc6fa5ce7cf9b5b987285426e395f24e5de67c302b8f
5
5
  SHA512:
6
- metadata.gz: 838cdb21f09e536bea161809af89d0b3b7b4a49fe875a952f2125fb9ee0f9dfea5c3c94dfe421a0146d17b8e1fbbb6e0b414d6a54d3aade8fd5362d15454eb0c
7
- data.tar.gz: 358abe430463757978b3d2f47b3783d714815ccfb67deac10adc7f3fe7e00a535c46b1c0b6060407b89af32ada4a009544dcacf58a0467feaf393852cf898126
6
+ metadata.gz: 6254128c52c57e6b979f0d3b98d64837fb43f29ff1c3a9e42fff53bbba9ac352ff7239f4ccba309a87875cc38095c08686d602952fa79b3c8bac12e36e9eae9f
7
+ data.tar.gz: 56683e322e8919b0230f0d712bd44a56a35e49256bf9ad7c3e2d628c416300856fe12cb9ab9831a9f554da88bd9fc5c2380882c800ece976fa2b56c27464f633
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Origen
2
2
  MAJOR = 0
3
- MINOR = 61
4
- BUGFIX = 4
3
+ MINOR = 62
4
+ BUGFIX = 0
5
5
  DEV = nil
6
6
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
7
7
  end
@@ -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 version of the IP represented by the object has the bug of the
24
- # given name
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
- name = name.to_s.downcase.to_sym
32
- if bugs[name]
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: origen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.61.4
4
+ version: 0.62.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty