kanrisuru 0.8.19 → 0.8.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/kanrisuru/version.rb +1 -1
- data/spec/functional/core/find_spec.rb +8 -2
- data/spec/functional/core/path_spec.rb +8 -2
- data/spec/functional/core/socket_spec.rb +8 -2
- data/spec/functional/core/stat_spec.rb +8 -2
- data/spec/functional/core/stream_spec.rb +8 -2
- data/spec/functional/core/transfer_spec.rb +8 -2
- data/spec/helper/expect_helpers.rb +1 -1
- data/spec/helper/stub_network.rb +45 -25
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0969518ec2898fe5ceaa74c897cdb0df384541d8cd8cd51e311e7f4915ce4155'
|
4
|
+
data.tar.gz: b57d0acd7d23116f2bf6934feaa77d83f007eede49a48f93efb47a241baf0434
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de82086f075e8deb1fcec6b8ca3205c384192a3dcf9a24d5852a75dcbaf1127e65c2121cc247cc64ac86647735447bfb3e5065f1aa808f0d0f279cf34e6ec3bd
|
7
|
+
data.tar.gz: e6944d4a4727ced09f581e10e5a55aba3f32147fc65d5ffa7857cbfa73e4e448b0ecaacaadd0bb332cf572f17771f7225ea74dcd2ada656ff10f8320f5e09a81
|
data/CHANGELOG.md
CHANGED
data/lib/kanrisuru/version.rb
CHANGED
@@ -2,9 +2,15 @@
|
|
2
2
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
|
-
StubNetwork.stub!
|
6
|
-
|
7
5
|
RSpec.describe Kanrisuru::Core::Find do
|
6
|
+
before(:all) do
|
7
|
+
StubNetwork.stub!
|
8
|
+
end
|
9
|
+
|
10
|
+
after(:all) do
|
11
|
+
StubNetwork.unstub!
|
12
|
+
end
|
13
|
+
|
8
14
|
let(:host) do
|
9
15
|
Kanrisuru::Remote::Host.new(
|
10
16
|
host: 'localhost',
|
@@ -2,9 +2,15 @@
|
|
2
2
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
|
-
StubNetwork.stub!
|
6
|
-
|
7
5
|
RSpec.describe Kanrisuru::Core::Path do
|
6
|
+
before(:all) do
|
7
|
+
StubNetwork.stub!
|
8
|
+
end
|
9
|
+
|
10
|
+
after(:all) do
|
11
|
+
StubNetwork.unstub!
|
12
|
+
end
|
13
|
+
|
8
14
|
let(:host) do
|
9
15
|
Kanrisuru::Remote::Host.new(
|
10
16
|
host: 'localhost',
|
@@ -2,9 +2,15 @@
|
|
2
2
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
|
-
StubNetwork.stub!
|
6
|
-
|
7
5
|
RSpec.describe Kanrisuru::Core::Socket do
|
6
|
+
before(:all) do
|
7
|
+
StubNetwork.stub!
|
8
|
+
end
|
9
|
+
|
10
|
+
after(:all) do
|
11
|
+
StubNetwork.unstub!
|
12
|
+
end
|
13
|
+
|
8
14
|
let(:host) do
|
9
15
|
Kanrisuru::Remote::Host.new(
|
10
16
|
host: 'localhost',
|
@@ -2,9 +2,15 @@
|
|
2
2
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
|
-
StubNetwork.stub!
|
6
|
-
|
7
5
|
RSpec.describe Kanrisuru::Core::Stat do
|
6
|
+
before(:all) do
|
7
|
+
StubNetwork.stub!
|
8
|
+
end
|
9
|
+
|
10
|
+
after(:all) do
|
11
|
+
StubNetwork.unstub!
|
12
|
+
end
|
13
|
+
|
8
14
|
let(:host) do
|
9
15
|
Kanrisuru::Remote::Host.new(
|
10
16
|
host: 'localhost',
|
@@ -2,9 +2,15 @@
|
|
2
2
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
|
-
StubNetwork.stub!
|
6
|
-
|
7
5
|
RSpec.describe Kanrisuru::Core::Stream do
|
6
|
+
before(:all) do
|
7
|
+
StubNetwork.stub!
|
8
|
+
end
|
9
|
+
|
10
|
+
after(:all) do
|
11
|
+
StubNetwork.unstub!
|
12
|
+
end
|
13
|
+
|
8
14
|
let(:host) do
|
9
15
|
Kanrisuru::Remote::Host.new(
|
10
16
|
host: 'localhost',
|
@@ -2,9 +2,15 @@
|
|
2
2
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
|
-
StubNetwork.stub!
|
6
|
-
|
7
5
|
RSpec.describe Kanrisuru::Core::Stat do
|
6
|
+
before(:all) do
|
7
|
+
StubNetwork.stub!
|
8
|
+
end
|
9
|
+
|
10
|
+
after(:all) do
|
11
|
+
StubNetwork.unstub!
|
12
|
+
end
|
13
|
+
|
8
14
|
let(:host) do
|
9
15
|
Kanrisuru::Remote::Host.new(
|
10
16
|
host: 'localhost',
|
data/spec/helper/stub_network.rb
CHANGED
@@ -3,41 +3,61 @@
|
|
3
3
|
class StubNetwork
|
4
4
|
class << self
|
5
5
|
def stub!
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
command.handle_status(0)
|
13
|
-
command.handle_data(nil)
|
6
|
+
unless Kanrisuru::Remote::Host.instance_methods(false).include?(:execute_with_retries_alias)
|
7
|
+
Kanrisuru::Remote::Host.class_eval do
|
8
|
+
alias_method :execute_with_retries_alias, :execute_with_retries
|
9
|
+
def execute_with_retries(command)
|
10
|
+
command.handle_status(0)
|
11
|
+
command.handle_data(nil)
|
14
12
|
|
15
|
-
|
13
|
+
command
|
14
|
+
end
|
16
15
|
end
|
17
16
|
end
|
18
17
|
|
19
|
-
Kanrisuru::Remote::Os.
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
18
|
+
unless Kanrisuru::Remote::Os.instance_methods(false).include?(:initialize_alias)
|
19
|
+
Kanrisuru::Remote::Os.class_eval do
|
20
|
+
alias_method :initialize_alias, :initialize
|
21
|
+
def initialize(host)
|
22
|
+
@host = host
|
23
|
+
|
24
|
+
@kernel_name = 'Linux'
|
25
|
+
@kernel_version = '#91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021'
|
26
|
+
@operating_system = 'GNU/Linux'
|
27
|
+
@hardware_platform = 'x86_64'
|
28
|
+
@processor = 'x86_64'
|
29
|
+
@release = 'ubuntu'
|
30
|
+
@version = 20.0
|
31
|
+
end
|
30
32
|
end
|
31
33
|
end
|
32
34
|
|
33
|
-
Kanrisuru::Result.
|
34
|
-
|
35
|
-
|
36
|
-
|
35
|
+
unless Kanrisuru::Result.instance_methods(false).include?(:initialize_alias)
|
36
|
+
Kanrisuru::Result.class_eval do
|
37
|
+
alias_method :initialize_alias, :initialize
|
38
|
+
def initialize(command)
|
39
|
+
@command = command
|
40
|
+
@data = nil
|
37
41
|
|
38
|
-
|
42
|
+
@error = @command.to_a if @command.failure?
|
43
|
+
end
|
39
44
|
end
|
40
45
|
end
|
41
46
|
end
|
47
|
+
|
48
|
+
def unstub!
|
49
|
+
Kanrisuru::Remote::Host.class_eval do
|
50
|
+
alias_method :execute_with_retries, :execute_with_retries_alias
|
51
|
+
end
|
52
|
+
|
53
|
+
Kanrisuru::Remote::Os.class_eval do
|
54
|
+
alias_method :initialize, :initialize_alias
|
55
|
+
end
|
56
|
+
|
57
|
+
Kanrisuru::Result.class_eval do
|
58
|
+
alias_method :initialize, :initialize_alias
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
42
62
|
end
|
43
63
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kanrisuru
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Mammina
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|