simplessh-rb 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/simplessh/session.rb +5 -2
  2. metadata +1 -1
@@ -47,7 +47,10 @@ module SimpleSSH
47
47
 
48
48
  exec_command("mkdir -m #{file_mode(source).to_s(8)} #{target}").flat_map do |dir_creation_res|
49
49
  if dir_creation_res.success?
50
- Dir.open(source).reject { |p| p == '.' || p == '..' }.reduce(SimpleSSH::Either.return(nil)) do |prev, name|
50
+ Dir.open(source)
51
+ .reject { |p| p == '.' || p == '..' }
52
+ .reduce(SimpleSSH::Either.return(nil)) do |prev, name|
53
+
51
54
  local_path = File.join(source, name)
52
55
  remote_path = "#{target}/#{name}"
53
56
 
@@ -55,7 +58,7 @@ module SimpleSSH
55
58
  if File.file? local_path
56
59
  prev.flat_map { |s| send_file(file_mode(local_path), local_path, remote_path) }
57
60
  else
58
- prev.flat_map { |_| send_directory(local_path, remote_path) }
61
+ prev.flat_map { |_| send_directory(local_path, remote_path, &block) }
59
62
  end
60
63
  else
61
64
  prev
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplessh-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: