Method: Puma::Configuration#config_files

Defined in:
lib/puma/configuration.rb

#config_filesObject

Raises:



259
260
261
262
263
264
265
266
267
268
269
270
271
272
# File 'lib/puma/configuration.rb', line 259

def config_files
  raise NotLoadedError, "ensure load is called before accessing config_files" unless @loaded

  files = @_options.all_of(:config_files)

  return [] if files == ['-']
  return files if files.any?

  first_default_file = %W(config/puma/#{@_options[:environment]}.rb config/puma.rb).find do |f|
    File.exist?(f)
  end

  [first_default_file]
end