lib/inquisitio/configuration.rb in inquisitio-1.1.2 vs lib/inquisitio/configuration.rb in inquisitio-1.2.0

- old
+ new

@@ -4,10 +4,11 @@ end class Configuration SETTINGS = [ + :api_version, :search_endpoint, :document_endpoint, :default_search_size, :dry_run, :logger, @@ -30,9 +31,12 @@ private def get_or_raise(setting) val = instance_variable_get("@#{setting.to_s}") + if setting == :api_version && val.nil? + val = '2011-02-01' + end val.nil?? raise(InquisitioConfigurationError.new("Configuration for #{setting} is not set")) : val end end end