Module: Avm::EacRailsBase1::RunnerWith::Bundle
- Defined in:
- lib/avm/eac_rails_base1/runner_with/bundle.rb
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- DEFAULT_RAILS_ENVIRONMENT_CONSTANT =
'DEFAULT_RAILS_ENVIRONMENT'
Instance Method Summary collapse
- #bundle_command ⇒ Object
- #bundle_run ⇒ Object
- #default_rails_environment ⇒ Object
- #rails_environment ⇒ Object
- #rails_instance ⇒ Object
Instance Method Details
#bundle_command ⇒ Object
29 30 31 |
# File 'lib/avm/eac_rails_base1/runner_with/bundle.rb', line 29 def bundle_command rails_instance.bundle(*bundle_args).envvar('RAILS_ENV', rails_environment) end |
#bundle_run ⇒ Object
33 34 35 36 37 |
# File 'lib/avm/eac_rails_base1/runner_with/bundle.rb', line 33 def bundle_run infov 'Bundle arguments', ::Shellwords.join(bundle_args) infov 'Rails environment', rails_environment bundle_command.system! end |
#default_rails_environment ⇒ Object
39 40 41 |
# File 'lib/avm/eac_rails_base1/runner_with/bundle.rb', line 39 def default_rails_environment self.class.default_rails_environment end |
#rails_environment ⇒ Object
51 52 53 |
# File 'lib/avm/eac_rails_base1/runner_with/bundle.rb', line 51 def rails_environment parsed.environment.presence || default_rails_environment end |
#rails_instance ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/avm/eac_rails_base1/runner_with/bundle.rb', line 43 def rails_instance if respond_to?(:runner_context) runner_context.call(:instance) else context(:instance) end end |