Sha256: 07e89b8eec71a2a8d09730eb8498ccd35f6fd622fca779c3ea0e6651676e3e86

Contents?: true

Size: 922 Bytes

Versions: 1

Compression:

Stored size: 922 Bytes

Contents

# frozen_string_literal: true

require 'active_support/core_ext/hash/indifferent_access'
require 'active_support/core_ext/object/blank'
require 'i18n'
require 'thor'
require 'time'

I18n.load_path += Dir[File.join(__dir__, 'locales/**/*', '*.yml')]
# I18n.default_locale = :en # (note that `en` is already the default!)

Dir.glob("#{__dir__}/core/**/*.rb").each do |file|
  require file
end

Array.include(WrapAndJoin)
Hash.include(ColorThemeColors)
Hash.include(ColorThemeMode)

require_relative 'dsu/env'
require 'pry-byebug' if Dsu.env.development?

Dir.glob("#{__dir__}/dsu/**/*.rb").each do |file|
  require file
end

unless Dsu.env.test? || Dsu.env.development?
  if Dsu::Migration::Service.run_migrations?
    begin
      Dsu::Migration::Service.new.call
    rescue StandardError => e
      puts I18n.t('migrations.error.failed', message: e.message)
      exit 1
    end
  end

  Migration::Factory.migrate_if!
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dsu-3.0.0.alpha.0 lib/dsu.rb