Sha256: 3360652cfcff3ae1d4b4a2a846f616e84eea408eca840fa8058c6ec40558d187

Contents?: true

Size: 989 Bytes

Versions: 19

Compression:

Stored size: 989 Bytes

Contents

# frozen_string_literal: true

require 'avm/eac_rails_base1/instances/runners'
require 'avm/eac_ruby_base1/instances/mixin'
require 'avm/eac_ruby_base1/sources/base'
require 'avm/eac_webapp_base0/instances/base'

module Avm
  module EacRailsBase1
    module Instances
      class Base < ::Avm::EacWebappBase0::Instances::Base
        include ::Avm::EacRubyBase1::Instances::Mixin

        DEFAULT_RAILS_ENVIRONMENT = 'production'

        def bundle(*args)
          the_gem.bundle(*args).chdir_root.envvar('RAILS_ENV', DEFAULT_RAILS_ENVIRONMENT)
        end

        # @return [Avm::Instances::Data::Package]
        def data_package_create
          super.add_unit('database', database_unit)
        end

        def rake(*args)
          bundle('exec', 'rake', *args)
        end

        def the_gem
          @the_gem ||= ::Avm::EacRubyBase1::Sources::Base.new(
            ::File.join(read_entry('install.path'))
          ).env_set(host_env)
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
eac_tools-0.69.1 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb
eac_tools-0.69.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb
eac_tools-0.68.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb
eac_tools-0.67.1 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb
eac_tools-0.67.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb
eac_tools-0.66.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb
eac_tools-0.65.1 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb
eac_tools-0.65.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb
eac_tools-0.64.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb
eac_tools-0.63.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb
avm-eac_rails_base1-0.8.4 lib/avm/eac_rails_base1/instances/base.rb
eac_tools-0.62.1 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb
eac_tools-0.62.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb
eac_tools-0.61.1 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb
eac_tools-0.61.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb
eac_tools-0.60.3 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb
eac_tools-0.60.2 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb
avm-eac_rails_base1-0.8.3 lib/avm/eac_rails_base1/instances/base.rb
eac_tools-0.60.1 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb