kanrisuru 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/kanrisuru/remote/cpu.rb +3 -3
- data/lib/kanrisuru/version.rb +1 -1
- data/spec/unit/remote/cpu_spec.rb +50 -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: a0ae74abc67963114dc04cc67783eaaab104ad77de4bba9dc497cd2307c92e7c
|
4
|
+
data.tar.gz: 94ba0cb2da9fa973cbcf5ff0e866931b64fdd8b529f44e35e0ede06edcd47581
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46b7fa66b9fceb225536604774a655f8ad332a1f1565a10005d8ba679fb2d14c894d16862535a98a555ba5a669e1f43674b61c77f8c718fea36efd4071523194
|
7
|
+
data.tar.gz: b97bbdbf4a2ed6ceb0aef10f63bfc1dad44559d825bdffcc095b979aad2aa9ca3cfdab5c5a0270eb3f96b67cdd93b63d4dad032c8601dc4372ebf54209b127ca
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## Kanrisuru 0.9.1 (November 29, 2021)
|
2
|
+
* Fix type on `address_sizes` for `Kanrisuru::Remote::Cpu` class.
|
3
|
+
* Add unit test cases for the `cpu` class.
|
4
|
+
|
1
5
|
## Kanrisuru 0.9.0 (November 23, 2021)
|
2
6
|
* Add `delete` to `Kanrisuru::Remote::Cluster` class to allow removal of hosts from cluster.
|
3
7
|
* Add functional test cases for remote cluster class.
|
data/lib/kanrisuru/remote/cpu.rb
CHANGED
@@ -75,8 +75,8 @@ module Kanrisuru
|
|
75
75
|
@cpu_architecture.byte_order
|
76
76
|
end
|
77
77
|
|
78
|
-
def
|
79
|
-
@cpu_architecture.
|
78
|
+
def address_sizes
|
79
|
+
@cpu_architecture.address_sizes
|
80
80
|
end
|
81
81
|
|
82
82
|
def cpu_mhz
|
@@ -103,7 +103,7 @@ module Kanrisuru
|
|
103
103
|
@cpu_architecture.flags
|
104
104
|
end
|
105
105
|
|
106
|
-
|
106
|
+
def hyperthreading?
|
107
107
|
threads_per_core > 1
|
108
108
|
end
|
109
109
|
|
data/lib/kanrisuru/version.rb
CHANGED
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe Kanrisuru::Remote::Cpu do
|
6
|
+
before(:all) do
|
7
|
+
StubNetwork.stub!
|
8
|
+
end
|
9
|
+
|
10
|
+
after(:all) do
|
11
|
+
StubNetwork.unstub!
|
12
|
+
end
|
13
|
+
|
14
|
+
let(:host1) do
|
15
|
+
Kanrisuru::Remote::Host.new(
|
16
|
+
host: 'localhost',
|
17
|
+
username: 'ubuntu',
|
18
|
+
keys: ['id_rsa']
|
19
|
+
)
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'responds to methods' do
|
23
|
+
cpu = Kanrisuru::Remote::Cpu.new(host1)
|
24
|
+
|
25
|
+
expect(cpu).to respond_to(:load_average)
|
26
|
+
expect(cpu).to respond_to(:load_average1)
|
27
|
+
expect(cpu).to respond_to(:load_average5)
|
28
|
+
expect(cpu).to respond_to(:load_average15)
|
29
|
+
expect(cpu).to respond_to(:sockets)
|
30
|
+
expect(cpu).to respond_to(:cores)
|
31
|
+
expect(cpu).to respond_to(:total)
|
32
|
+
expect(cpu).to respond_to(:count)
|
33
|
+
expect(cpu).to respond_to(:threads_per_core)
|
34
|
+
expect(cpu).to respond_to(:cores_per_socket)
|
35
|
+
expect(cpu).to respond_to(:numa_nodes)
|
36
|
+
expect(cpu).to respond_to(:vendor_id)
|
37
|
+
expect(cpu).to respond_to(:cpu_family)
|
38
|
+
expect(cpu).to respond_to(:model)
|
39
|
+
expect(cpu).to respond_to(:model_name)
|
40
|
+
expect(cpu).to respond_to(:byte_order)
|
41
|
+
expect(cpu).to respond_to(:address_sizes)
|
42
|
+
expect(cpu).to respond_to(:cpu_mhz)
|
43
|
+
expect(cpu).to respond_to(:cpu_max_mhz)
|
44
|
+
expect(cpu).to respond_to(:cpu_min_mhz)
|
45
|
+
expect(cpu).to respond_to(:hypervisor)
|
46
|
+
expect(cpu).to respond_to(:virtualization_type)
|
47
|
+
expect(cpu).to respond_to(:flags)
|
48
|
+
expect(cpu).to respond_to(:hyperthreading?)
|
49
|
+
end
|
50
|
+
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.9.
|
4
|
+
version: 0.9.1
|
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-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -232,6 +232,7 @@ files:
|
|
232
232
|
- spec/unit/fstab_spec.rb
|
233
233
|
- spec/unit/kanrisuru_spec.rb
|
234
234
|
- spec/unit/mode_spec.rb
|
235
|
+
- spec/unit/remote/cpu_spec.rb
|
235
236
|
- spec/unit/template_spec.rb
|
236
237
|
- spec/unit/util_spec.rb
|
237
238
|
- spec/zz_reboot_spec.rb
|