Class: Avm::EacRailsBase1::Instances::Base

Inherits:
Avm::EacWebappBase0::Instances::Base
  • Object
show all
Includes:
Avm::EacRubyBase1::Instances::Mixin
Defined in:
lib/avm/eac_rails_base1/instances/base.rb

Constant Summary collapse

DEFAULT_RAILS_ENVIRONMENT =
'production'

Instance Method Summary collapse

Instance Method Details

#bundle(*args) ⇒ Object



19
20
21
# File 'lib/avm/eac_rails_base1/instances/base.rb', line 19

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

#data_package_createAvm::Instances::Data::Package

Returns:

  • (Avm::Instances::Data::Package)


24
25
26
# File 'lib/avm/eac_rails_base1/instances/base.rb', line 24

def data_package_create
  super.add_unit('database', database_unit)
end

#gemfile_sourceAddressable::URI

Returns:

  • (Addressable::URI)


29
30
31
# File 'lib/avm/eac_rails_base1/instances/base.rb', line 29

def gemfile_source
  application.local_source.gemfile_source
end

#processesArray<Avm::Instances::Process>

Returns:

  • (Array<Avm::Instances::Process>)


34
35
36
# File 'lib/avm/eac_rails_base1/instances/base.rb', line 34

def processes
  super + [::Avm::EacRailsBase1::Instances::Processes::TasksScheduler.new(self)]
end

#rake(*args) ⇒ Object



38
39
40
# File 'lib/avm/eac_rails_base1/instances/base.rb', line 38

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

#the_gemObject



42
43
44
45
46
# File 'lib/avm/eac_rails_base1/instances/base.rb', line 42

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