machine 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/machine.rb +2 -0
- data/lib/machine/freebsd/info.rb +20 -0
- data/lib/machine/version.rb +2 -1
- metadata +3 -2
data/lib/machine.rb
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
module Machine
|
3
|
+
class Info
|
4
|
+
class Cpu < CpuDefault
|
5
|
+
class << self
|
6
|
+
def cores_size
|
7
|
+
`sysctl -n hw.ncpu`.to_i
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class Memory
|
13
|
+
class << self
|
14
|
+
def mem_total
|
15
|
+
`sysctl -n hw.realmem`.to_i
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/machine/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: machine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sys-proctable
|
@@ -39,6 +39,7 @@ files:
|
|
39
39
|
- lib/machine.rb
|
40
40
|
- lib/machine/darwin/info.rb
|
41
41
|
- lib/machine/default/info.rb
|
42
|
+
- lib/machine/freebsd/info.rb
|
42
43
|
- lib/machine/linux/info.rb
|
43
44
|
- lib/machine/process_status.rb
|
44
45
|
- lib/machine/version.rb
|