sshake 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b0227ad150af036e9e0690dc6386ff569c523766bc177e55cd4774b13e4af50
4
- data.tar.gz: 350de20e2172024878b5b3e7dd2a6cc47eb620d459a3094c973a09cc766f0ac0
3
+ metadata.gz: 1af9f1f3daa52b3136755fa4d2578825c2862aa4c18eaa04b483f52a50b70036
4
+ data.tar.gz: 151058a1bf0d2f28dc721fe1ad9fc1c3dca8ecdaa58a4658903ef2e6b70fe7b6
5
5
  SHA512:
6
- metadata.gz: 56f1bebcf07705ed634e2e42ddd1fad9a0eb96ded95393808e7e8c709819c6876aa475c28d1dcb41255857f78396420812353132bd011c8c1a350913dc7d378e
7
- data.tar.gz: f2c0e6e0879c7fa6507179b807b46602bad6d0d1aa96368fe2380262ae4d6d03bcb81d10d86b6cb06686ed3b5741718e32d1438a927cb459bb22bf4b5f7dfd72
6
+ metadata.gz: 9962e5b2b8c0d96bdc94a01d85685e6c1cd1f141ce9c6edbe8f88d04af67151c95f94127409c83427e33b93fdf12abf856dd38943266b9603edcc2b214f79393
7
+ data.tar.gz: 607754279f740459b74faa80cbf96755c97ab79ab5682be245e252330ae149a916d7f7834f98585fb44d6857121d81fb3b64056e4f4d1348d71bcdc183c162f7
@@ -81,6 +81,10 @@ module SSHake
81
81
  raise Error, 'You cannot provide a block and options'
82
82
  end
83
83
 
84
+ if hash.is_a?(ExecutionOptions)
85
+ return hash
86
+ end
87
+
84
88
  if block
85
89
  ExecutionOptions.from_block(&block)
86
90
  elsif hash.is_a?(Hash)
@@ -5,6 +5,11 @@ require 'sshake/execution_options_dsl'
5
5
  module SSHake
6
6
  class ExecutionOptions
7
7
 
8
+ def initialize
9
+ dsl = ExecutionOptionsDSL.new(self)
10
+ yield dsl if block_given?
11
+ end
12
+
8
13
  # The timeout
9
14
  #
10
15
  # @return [Integer]
@@ -91,7 +91,7 @@ module SSHake
91
91
  def execute(commands, options = nil, &block)
92
92
  options = create_options(options, block)
93
93
  command_to_execute = prepare_commands(commands, options)
94
-
94
+
95
95
  # Execute the command
96
96
  response = Response.new
97
97
  response.command = command_to_execute
@@ -2,6 +2,6 @@
2
2
 
3
3
  module SSHake
4
4
 
5
- VERSION = '2.0.2'
5
+ VERSION = '2.0.3'
6
6
 
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sshake
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Cooke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-09 00:00:00.000000000 Z
11
+ date: 2024-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: klogger-logger
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
- rubygems_version: 3.2.32
106
+ rubygems_version: 3.5.9
107
107
  signing_key:
108
108
  specification_version: 4
109
109
  summary: A wrapper for net/ssh to make running commands more fun