62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# File 'lib/collins_shell/asset.rb', line 62
def find
client = get_collins_client
tags = options.tags || [:stuff]
selector = get_selector options.selector, tags, options["size"], options.remote
assets = client.find selector
if options.details then
assets.each do |asset|
if not options.quiet then
logs = []
if options.logs and not options.exec? then
logs = client.logs(asset, :size => 5000, :SORT => "DESC").reverse
end
printer = CollinsShell::AssetPrinter.new asset, self, :separator => '*',
:logs => logs,
:detailed => !options.exec?
puts printer
end
asset_exec asset, options.exec, options.confirm, options.threads
end
else
if not options.quiet then
print_find_results assets, options.tags, :header => options., :url => options.url
end
assets.each {|asset| asset_exec(asset, options.exec, options.confirm, options.threads)}
end
finalize_exec
end
|