Sha256: 3769e8fbf509aa60919dcdb952206f53a23b6e2bba018b9fc17e92c815f6834d

Contents?: true

Size: 956 Bytes

Versions: 6

Compression:

Stored size: 956 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!(options: { pretend: false })
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dsu-3.0.0.alpha.12 lib/dsu.rb
dsu-3.0.0.alpha.11 lib/dsu.rb
dsu-3.0.0.alpha.10 lib/dsu.rb
dsu-3.0.0.alpha.9 lib/dsu.rb
dsu-3.0.0.alpha.8 lib/dsu.rb
dsu-3.0.0.alpha.7 lib/dsu.rb