require_relative 'boot'

require 'rails/all'

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

module PdfShop
  # mine app
  class Application < Rails::Application
    # Initialize configuration defaults for originally generated Rails version.
    config.load_defaults 5.1
    config.i18n.default_locale = :pl
    config.time_zone = 'Warsaw'
    config.active_record.default_timezone = :local
    # config.autoload_paths << "#{Rails.root}/lib"
    config.eager_load_paths << "#{Rails.root}/lib"
    config.assets.paths << Rails.root.join('app', 'assets', 'fonts')
    config.assets.precompile += %w[.svg .eot .woff .ttf .otf .woff2]
    config =
      YAML.safe_load(File.read(File.expand_path('application.yml', __dir__)))
    config.merge! config.fetch(Rails.env, {})
    config.each do |key, value|
      ENV[key] = value.to_s unless value.is_a? Hash
    end
    # Settings in config/environments/*
    # take precedence over those specified here.
    # Application configuration should go into files in config/initializers
    # -- all .rb files in that directory are automatically loaded.
  end
end
