scone 0.1.12 → 0.1.13

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ea0f30952780b892268b6c4dfa5a064a8a8b601786fe45014ec03692d9ea8d4
4
- data.tar.gz: bb63bb0b4700f68560e60d4d9dea2e2775e96738a547a583245feb4876b8f5f3
3
+ metadata.gz: 76ab13b58dcb1e0d42904a2221d3f5faa01175673f409c9baadf892aceaf711d
4
+ data.tar.gz: 9428d85419977cac5d6e97e1999368422f12881307c63e7d07e89417d3191e18
5
5
  SHA512:
6
- metadata.gz: a9def8d44c1f915edebac6b5e86e6a7bc490e347a01415853249a37a54ceeb68b009062c8230c3334f1378be9ce0205f4473a1a168602fb3890b9c793eff724a
7
- data.tar.gz: c2d1ec351c47df702f62a617deb13ae94bd171edc12339e000dc37a79189b03c4979902d0243373041915ad2a126e1168d933fd6df6402e2de7c20c52f2ecfd9
6
+ metadata.gz: 2aca0ebc40cd6b4e5a5fb10031902243e0296a70fa984e5e5d6139c9d1ab4638cf1d9710ef9c105899217371017588479002a4c8c78c415e943228b18d60eaf8
7
+ data.tar.gz: 3f04a0c8fd53fe95753f65744e074da53cc32f54ee6a494e75c53006c286450d2e8c661e5d1092e8ece16fea4b17949433589b25d958d389e9a054aa06e5a434
data/cache/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  *
2
2
  !proc.stat.txt
3
3
  !ifconfig.txt
4
+ !proc.cpuinfo.txt
4
5
  !.gitignore
@@ -0,0 +1,23 @@
1
+ processor : 0
2
+ vendor_id : GenuineIntel
3
+ cpu family : 6
4
+ model : 85
5
+ model name : Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
6
+ stepping : 4
7
+ microcode : 0x1
8
+ cpu MHz : 2294.608
9
+ cache size : 4096 KB
10
+ physical id : 0
11
+ siblings : 1
12
+ core id : 0
13
+ cpu cores : 1
14
+ apicid : 0
15
+ initial apicid : 0
16
+ fpu : yes
17
+ fpu_exception : yes
18
+ cpuid level : 13
19
+ wp : yes
20
+ clflush size : 64
21
+ cache_alignment : 64
22
+ address sizes : 40 bits physical, 48 bits virtual
23
+ power management:
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ #
4
+ # Scone - A Unified SDK for Linux OS Distributions in Ruby
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ # Scone Module
20
+ module Scone
21
+ # Ubuntu Module
22
+ module Ubuntu
23
+ # Hardware Class
24
+ class Hardware
25
+ # Get total cores
26
+ def total_cores(proc_file = "/proc/cpuinfo")
27
+ File.readlines(proc_file).count { |line| line =~ /^processor\s+:\s+\d+/ }
28
+ end
29
+ end
30
+ end
31
+ end
data/lib/scone/version.rb CHANGED
@@ -18,5 +18,5 @@
18
18
 
19
19
  # Scone Module
20
20
  module Scone
21
- VERSION = "0.1.12"
21
+ VERSION = "0.1.13"
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - clivern
@@ -47,6 +47,7 @@ files:
47
47
  - bin/setup
48
48
  - cache/.gitignore
49
49
  - cache/ifconfig.txt
50
+ - cache/proc.cpuinfo.txt
50
51
  - cache/proc.stat.txt
51
52
  - lib/scone.rb
52
53
  - lib/scone/io/directory.rb
@@ -55,6 +56,7 @@ files:
55
56
  - lib/scone/platform.rb
56
57
  - lib/scone/system.rb
57
58
  - lib/scone/ubuntu/group.rb
59
+ - lib/scone/ubuntu/hardware.rb
58
60
  - lib/scone/ubuntu/ip.rb
59
61
  - lib/scone/ubuntu/package.rb
60
62
  - lib/scone/ubuntu/stat.rb