Sha256: 4e3429e42136cc6b656d1d648ed9821376c722404caa5fefa9b8d4cbfb3c419b

Contents?: true

Size: 725 Bytes

Versions: 32

Compression:

Stored size: 725 Bytes

Contents

# frozen_string_literal: true

require 'avm/files/rotate'
require 'eac_cli/core_ext'

module Avm
  module Tools
    class Runner
      class Files
        class Rotate
          runner_with :help do
            desc 'Rotates a file (Like a backup).'
            arg_opt '-L', '--space-limit', 'Limit by <space> the space used by rotated files.'
            pos_arg :path
          end
          def run
            error_message = rotate.run
            fatal_error(error_message) if error_message
          end

          def rotate
            @rotate ||= ::Avm::Files::Rotate.new(
              parsed.path,
              space_limit: parsed.space_limit
            )
          end
        end
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
avm-tools-0.109.1 lib/avm/tools/runner/files/rotate.rb
avm-tools-0.109.0 lib/avm/tools/runner/files/rotate.rb
avm-tools-0.108.0 lib/avm/tools/runner/files/rotate.rb
avm-tools-0.107.0 lib/avm/tools/runner/files/rotate.rb
avm-tools-0.106.0 lib/avm/tools/runner/files/rotate.rb
avm-tools-0.105.0 lib/avm/tools/runner/files/rotate.rb
avm-tools-0.104.0 lib/avm/tools/runner/files/rotate.rb
avm-tools-0.103.1 lib/avm/tools/runner/files/rotate.rb
avm-tools-0.103.0 lib/avm/tools/runner/files/rotate.rb
avm-tools-0.102.2 lib/avm/tools/runner/files/rotate.rb
avm-tools-0.102.1 lib/avm/tools/runner/files/rotate.rb
avm-tools-0.102.0 lib/avm/tools/runner/files/rotate.rb
avm-tools-0.101.0 lib/avm/tools/runner/files/rotate.rb
avm-tools-0.100.0 lib/avm/tools/runner/files/rotate.rb
avm-tools-0.99.1 lib/avm/tools/runner/files/rotate.rb
avm-tools-0.99.0 lib/avm/tools/runner/files/rotate.rb
avm-tools-0.98.0 lib/avm/tools/runner/files/rotate.rb
avm-tools-0.97.0 lib/avm/tools/runner/files/rotate.rb
avm-tools-0.96.0 lib/avm/tools/runner/files/rotate.rb
avm-tools-0.95.0 lib/avm/tools/runner/files/rotate.rb