Sha256: 8ddf36288dba1a038d170ce45773ee0699337338359e853717712f216ecd83b9
Contents?: true
Size: 1.02 KB
Versions: 20
Compression:
Stored size: 1.02 KB
Contents
require 'drb/drb' require 'fileutils' require 'json' require 'colorize' require 'henry/input' require 'henry/logger' require 'henry/logger_service' module Henry # Henry Environmet. # To be used as proxy to access the Task execution params from the tests class Environment # The path to the default file export directory # # @return [String] EXPORT_FILE_PATH = "/output" # Imports and returs the Task execution parameters. # # @return [Hash] the Task execution parameters def self.params @@params ||= Input.import!.params end # Gets the Task Logger instance vis DBr. # # @return [Logger] the Task Logger instance. def self.logger return DRbObject.new_with_uri(LoggerService::DRB_URI) end # Copies the file from the given path to the default export directory # # @param [String] path the path of the file to be exported. def self.export_file(path) FileUtils.copy_file(path, "#{EXPORT_FILE_PATH}/#{File.basename(path)}") end end end
Version data entries
20 entries across 20 versions & 1 rubygems