|
@@ -68,12 +68,10 @@ module Blazer
|
|
|
|
|
|
def self.data_sources
|
|
def self.data_sources
|
|
@data_sources ||= begin
|
|
@data_sources ||= begin
|
|
- ds = Hash[
|
|
|
|
- settings["data_sources"].map do |id, s|
|
|
|
|
- [id, Blazer::DataSource.new(id, s)]
|
|
|
|
- end
|
|
|
|
- ]
|
|
|
|
- ds.default = ds.values.first
|
|
|
|
|
|
+ ds = Hash.new { |hash, key| raise Blazer::Error, "Unknown data source: #{key}" }
|
|
|
|
+ settings["data_sources"].each do |id, s|
|
|
|
|
+ ds[id] = Blazer::DataSource.new(id, s)
|
|
|
|
+ end
|
|
ds
|
|
ds
|
|
end
|
|
end
|
|
end
|
|
end
|