Sha256: eb9b85df35543df9ea91854d99ca7f84b05ecc09f552338eb53011b79a99cf48
Contents?: true
Size: 525 Bytes
Versions: 11
Compression:
Stored size: 525 Bytes
Contents
module NightcrawlerSwift class Sync < Command def initialize @upload = Upload.new @logger = NightcrawlerSwift.logger end def execute dir_path @logger.info "[NightcrawlerSwift] dir_path: #{dir_path}" Dir["#{dir_path}/**/**"].each do |fullpath| path = fullpath.gsub("#{dir_path}/", "") unless File.directory?(fullpath) @logger.info "[NightcrawlerSwift] #{path}" @upload.execute path, File.open(fullpath, "r") end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems