|
@@ -68,10 +68,12 @@ module Blazer
|
|
|
|
|
|
def self.data_sources
|
|
def self.data_sources
|
|
@data_sources ||= begin
|
|
@data_sources ||= begin
|
|
- 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 = Hash[
|
|
|
|
+ settings["data_sources"].map do |id, s|
|
|
|
|
+ [id, Blazer::DataSource.new(id, s)]
|
|
|
|
+ end
|
|
|
|
+ ]
|
|
|
|
+ ds.default = ds.values.first
|
|
ds
|
|
ds
|
|
end
|
|
end
|
|
end
|
|
end
|