class SigtermExtensions::Boot::Command

Public Instance Methods

exec(_cmd, _args) click to toggle source
# File lib/sigterm_extensions/staging/boot/command.rb, line 10
      def exec(_cmd, _args)
        FileUtils.cp(GEMFILE_LOCK, GEMFILE_NEXT_LOCK)

        File.open(GEMFILE, 'a+') do |f|
          f.write(<<-EOM)
  Plugin.send(:load_plugin, 'boot') if Plugin.installed?('boot')
  if ENV['#{::SigtermExtensions::Boot.env_next}']
    enable_dual_booting if Plugin.installed?('boot')
    # Add any gem you want here, they will be loaded only when running
    # bundler command prefixed with `#{::SigtermExtensions::Boot.env_next}=1`.
  end
  EOM
        end
      end
setup() click to toggle source
# File lib/sigterm_extensions/staging/boot/command.rb, line 6
def setup
  self.class.command('boot')
end