Class: Eco::API::UseCases::Default::Utils::TrackFiles

Inherits:
Custom::UseCase show all
Defined in:
lib/eco/api/usecases/default/utils/track_files_case.rb,
lib/eco/api/usecases/default/utils/cli/track_files_cli.rb

Overview

Tracks the files of a source folder into a file

Defined Under Namespace

Classes: Cli

Constant Summary collapse

OUT_HEADERS =
%w[
  ref_id
  filename
  filesize
  s3_path
].freeze
REF_ID_PATH_POSITION =
:last
BASE_S3_PATH =
'uploads'.freeze

Instance Method Summary collapse

Methods inherited from Common::Loaders::UseCase

#cli_apply!, #initialize

Methods included from Common::Loaders::UseCase::CliIdentify

#cli, #cli!

Methods included from Common::Loaders::UseCase::TargetModel

#target_model

Methods included from Common::Loaders::UseCase::Type

#type

Methods inherited from Common::Loaders::CaseBase

#name, name_only_once!, original_name

Constructor Details

This class inherits a constructor from Eco::API::Common::Loaders::UseCase

Instance Method Details

#main(*_args) ⇒ Object

S3_SUBPATH = 'org-name'.freeze



19
20
21
22
23
24
25
# File 'lib/eco/api/usecases/default/utils/track_files_case.rb', line 19

def main(*_args)
  if simulate?
    count_files
  else
    generate_file
  end
end