origen 0.60.5 → 0.60.6
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/origen/loader.rb +14 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a8de77b7e1b7c8c36dbfbe4c09cfed6abf1fd1d508d915f2b06af3c62595fac
|
4
|
+
data.tar.gz: 13f365bc2529ba358d79bc281442190f4f41c723fa10d533badd4b349f476ea7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fec7b03350e86093b6733a2f870df766110489fa54bae7868d0d761b6a61811945f5483e4f57be963a0a3f4832dfef58abb924b85050da460e1b853ea5887192
|
7
|
+
data.tar.gz: 7cc42194880ba198e6e5dfa0b14321a96a6fcc83ad87c83b25fc0d5a0c759c90bfd20135fcebbf4362ebd785905d19da1deb532df9a4aac22badbb9f5918cb15
|
data/config/version.rb
CHANGED
data/lib/origen/loader.rb
CHANGED
@@ -117,11 +117,23 @@ module Origen
|
|
117
117
|
# If a block definition exists for the given model, then this will load it and apply it to
|
118
118
|
# the model.
|
119
119
|
# if options[:inherit] is passed, it will first try to load the files for the class name contained
|
120
|
-
# in that option, even if its from a plugin app
|
120
|
+
# in that option, even if its from a plugin app. Additionally, any bugs/features will be inherited
|
121
|
+
# as well unless disable_bug_inheritance or disable_feature_inheritance options are passed
|
121
122
|
# Returns true if a model is found and loaded, otherwise nil.
|
122
123
|
def self.load_block(model, options = {})
|
123
124
|
model = model.model # Ensure we have a handle on the model and not its controller
|
124
125
|
loaded = nil
|
126
|
+
|
127
|
+
if options[:inherit]
|
128
|
+
# pass down any bugs/features from the inherited block class
|
129
|
+
unless options[:disable_bug_inheritance]
|
130
|
+
model.class.instance_variable_set(:@bugs, options[:inherit].constantize.bugs.merge(model.class.bugs))
|
131
|
+
end
|
132
|
+
unless options[:disable_feature_inheritance]
|
133
|
+
model.class.instance_variable_set(:@features, options[:inherit].constantize.features.merge(model.class.features))
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
125
137
|
if local_app = options[:app] || model.app
|
126
138
|
if options[:path]
|
127
139
|
local_full_paths = Array(options[:path])
|
@@ -132,6 +144,7 @@ module Origen
|
|
132
144
|
end
|
133
145
|
app_paths_map = { local_app => local_full_paths }
|
134
146
|
if options[:inherit]
|
147
|
+
# update app_paths_map with the relevant inherited files
|
135
148
|
inherit_full_paths = options[:inherit].split('::')
|
136
149
|
inherit_app = Origen.app(inherit_full_paths.shift.underscore.to_sym)
|
137
150
|
inherit_full_paths = [inherit_full_paths.join('/')]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: origen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.60.
|
4
|
+
version: 0.60.6
|
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: 2022-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|