lib/test_ids.rb in test_ids-1.0.0 vs lib/test_ids.rb in test_ids-1.1.0
- old
+ new
@@ -69,11 +69,12 @@
end
# @api private
def inject_flow_id(options)
if Origen.interface_loaded?
- options[:test_ids_flow_id] = Origen.interface.flow.id
+ flow = Origen.interface.flow
+ options[:test_ids_flow_id] = flow.try(:top_level).try(:id) || flow.id
end
end
# Load an existing allocator, which will be loaded with a configuration based on what has
# been serialized into the database if present, otherwise it will have an empty configuration.
@@ -124,9 +125,14 @@
def config=(id)
unless @configuration[id]
fail "The TestIds configuration '#{id}' has not been defined yet!"
end
@configuration_id = id
+ end
+
+ # Return an Array of configuration IDs
+ def configs
+ @configuration.ids
end
def bin_config=(id)
@bin_config = id
end