kanrisuru 0.8.21 → 0.8.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/kanrisuru/version.rb +1 -1
- data/spec/functional/core/apt_spec.rb +96 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 610fa46fc1f2af6ea5b805092f9528858c586cfad6c9754b18bdad109eaa9e77
|
4
|
+
data.tar.gz: 210c27c89350d4b5cbbba4b5677711d2032f8d4bbbc7bac79a2c2a722f0c6caa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd1f29eb444fe67904563cc2f0edaf3480c068e374f75242f7d802d94588c7023549186ddce860f9ac1b79a66413435f18b57f36b3b53cfa5f688ca32689ba8f
|
7
|
+
data.tar.gz: 3e784e517b5fa233c97b14dee47ab7f58562ebf2b484c602bd6d59ce1853a8749d7c53268574368269be7b4a711eac02bf6ce60bed1454232bf4d6a8a18b389d
|
data/CHANGELOG.md
CHANGED
data/lib/kanrisuru/version.rb
CHANGED
@@ -0,0 +1,96 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe Kanrisuru::Core::Apt do
|
6
|
+
before(:all) do
|
7
|
+
StubNetwork.stub!
|
8
|
+
end
|
9
|
+
|
10
|
+
after(:all) do
|
11
|
+
StubNetwork.unstub!
|
12
|
+
end
|
13
|
+
|
14
|
+
let(:host) do
|
15
|
+
Kanrisuru::Remote::Host.new(
|
16
|
+
host: 'localhost',
|
17
|
+
username: 'ubuntu',
|
18
|
+
keys: ['id_rsa']
|
19
|
+
)
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'prepares apt list command' do
|
23
|
+
expect_command(host.apt('list'), 'apt list')
|
24
|
+
expect_command(host.apt('list',
|
25
|
+
installed: true,
|
26
|
+
upgradeable: true,
|
27
|
+
all_versions: true,
|
28
|
+
), 'apt list --installed --upgradeable --all-versions')
|
29
|
+
|
30
|
+
expect_command(host.apt('list', package_name: 'nginx'), 'apt list -a nginx')
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'prepares apt update command' do
|
34
|
+
expect_command(host.apt('update'), 'apt-get update -y')
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'prepares apt upgrade command' do
|
38
|
+
expect_command(host.apt('upgrade'), 'apt-get upgrade -y')
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'prepares apt full-upgrade command' do
|
42
|
+
expect_command(host.apt('full-upgrade'), 'apt full-upgrade -y')
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'prepares apt install command' do
|
46
|
+
expect_command(host.apt('install',
|
47
|
+
packages: 'nginx'
|
48
|
+
),
|
49
|
+
'apt-get install -y nginx'
|
50
|
+
)
|
51
|
+
|
52
|
+
expect_command(host.apt('install',
|
53
|
+
packages: 'monit',
|
54
|
+
no_upgrade: true,
|
55
|
+
reinstall: true
|
56
|
+
),
|
57
|
+
'apt-get install -y --no-upgrade --reinstall monit'
|
58
|
+
)
|
59
|
+
|
60
|
+
expect_command(host.apt('install',
|
61
|
+
packages: ['build-essential', 'manpages-dev'],
|
62
|
+
only_upgrade: true,
|
63
|
+
),
|
64
|
+
'apt-get install -y --only-upgrade build-essential manpages-dev'
|
65
|
+
)
|
66
|
+
end
|
67
|
+
|
68
|
+
it 'prepares apt remove command' do
|
69
|
+
expect_command(host.apt('remove', packages: ['python']), 'apt-get remove -y python')
|
70
|
+
end
|
71
|
+
|
72
|
+
it 'prepares apt purge command' do
|
73
|
+
expect_command(host.apt('purge', packages: ['python']), 'apt-get purge -y python')
|
74
|
+
end
|
75
|
+
|
76
|
+
it 'prepares apt autoremove command' do
|
77
|
+
expect_command(host.apt('autoremove'), 'apt-get autoremove -y')
|
78
|
+
end
|
79
|
+
|
80
|
+
it 'prepares apt search command' do
|
81
|
+
expect_command(host.apt('search', query: 'ruby'), 'apt search ruby')
|
82
|
+
end
|
83
|
+
|
84
|
+
it 'prepares apt show command' do
|
85
|
+
expect_command(host.apt('show', packages: 'ruby'), 'apt show -a ruby')
|
86
|
+
end
|
87
|
+
|
88
|
+
it 'prepares apt clean command' do
|
89
|
+
expect_command(host.apt('clean'), 'apt-get clean')
|
90
|
+
end
|
91
|
+
|
92
|
+
it 'prepares apt autoclean command' do
|
93
|
+
expect_command(host.apt('autoclean'), 'apt-get autoclean')
|
94
|
+
end
|
95
|
+
|
96
|
+
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.22
|
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-
|
11
|
+
date: 2021-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -173,6 +173,7 @@ files:
|
|
173
173
|
- lib/kanrisuru/util/os_family.rb
|
174
174
|
- lib/kanrisuru/util/signal.rb
|
175
175
|
- lib/kanrisuru/version.rb
|
176
|
+
- spec/functional/core/apt_spec.rb
|
176
177
|
- spec/functional/core/find_spec.rb
|
177
178
|
- spec/functional/core/path_spec.rb
|
178
179
|
- spec/functional/core/socket_spec.rb
|