Sha256: cbdf2b18e283cf4b034a7d229e87d7d44ec40d49135088f0b0d3f9f4441f7b15

Contents?: true

Size: 927 Bytes

Versions: 4

Compression:

Stored size: 927 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

  Dsu::Migration::Factory.migrate_if!
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dsu-3.0.0.alpha.5 lib/dsu.rb
dsu-3.0.0.alpha.4 lib/dsu.rb
dsu-3.0.0.alpha.3 lib/dsu.rb
dsu-3.0.0.alpha.1 lib/dsu.rb