Sha256: c2884a75c2f5ac1938f7bf7057754e6e92e9198ed763a390d19f36233139139d

Contents?: true

Size: 514 Bytes

Versions: 2

Compression:

Stored size: 514 Bytes

Contents

#!/usr/bin/env ruby

require 'riserva'
require 'riserva/command_line'

class RiservaExecutable
  def initialize
    ENV['RISERVA_CONFIG'] ||= Choice[:config]
  end

  def call
    case Choice[:perform]
    when 'backup'
      Riserva::Commands::Backup.new.call
    when 'clean'
      Riserva::Commands::Clean.new.call
    end
  end
end

riserva = RiservaExecutable.new

begin
  riserva.call
rescue StandardError => error
  Riserva.logger.fatal(error.message)
  Riserva.logger.debug(error.backtrace.join("\n"))
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
riserva-0.1.7 bin/riserva
riserva-0.1.6 bin/riserva