Class: Anamo::Fstree::Thor
- Inherits:
-
Thor
- Object
- Thor
- Anamo::Fstree::Thor
- Defined in:
- lib/anamo/fstree/thor.rb
Instance Method Summary collapse
Instance Method Details
#exec ⇒ Object
142 143 144 145 146 147 |
# File 'lib/anamo/fstree/thor.rb', line 142 def exec inspect send end |
#inspect ⇒ Object
153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/anamo/fstree/thor.rb', line 153 def inspect FileUtils.rm_rf temp_folder FileUtils.mkdir_p temp_folder idx = 0 paths.each do |path, depth| traverser = Traverser.new(path, Writer.new(temp_folder, idx, path), depth, exclusions) traverser.compute idx = idx + 1 end end |
#send ⇒ Object
172 173 174 175 176 177 178 179 180 181 |
# File 'lib/anamo/fstree/thor.rb', line 172 def send files = {} Dir["#{temp_folder}/*"].each do |file| files[File.basename(file, '.*')] = UploadIO.new(File.new(file), "application/gzip", File.basename(file)) end ::Anamo::Api.new.post_fstree files end |