cpu-memory-stats 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "cpu-memory-stats"
8
- s.version = "0.0.2"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ondrej Bartas"]
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
34
34
  s.homepage = "http://github.com/ondrejbartas/cpu-memory-stats"
35
35
  s.licenses = ["MIT"]
36
36
  s.require_paths = ["lib"]
37
- s.rubygems_version = "1.8.24"
37
+ s.rubygems_version = "1.8.10"
38
38
  s.summary = "Get system CPU and Memory usage"
39
39
 
40
40
  if s.respond_to? :specification_version then
data/lib/modules/bsd.rb CHANGED
@@ -8,7 +8,8 @@ module CpuMemoryStats
8
8
 
9
9
  def get_stats
10
10
 
11
- output = {}
11
+ output = { :cpu => {} }
12
+
12
13
  output[:load_avg] = `sysctl -n vm.loadavg`.gsub(/\{|\}/,"").strip.split(" ").collect{|i| i.strip.to_f.round(2)}
13
14
 
14
15
  cpu = `sysctl -n kern.cp_time`.strip.split(" ").collect{|i| i.strip.to_i}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpu-memory-stats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-08-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &70202344471320 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,15 +21,10 @@ dependencies:
21
21
  version: 1.1.5
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ~>
28
- - !ruby/object:Gem::Version
29
- version: 1.1.5
24
+ version_requirements: *70202344471320
30
25
  - !ruby/object:Gem::Dependency
31
26
  name: jeweler
32
- requirement: !ruby/object:Gem::Requirement
27
+ requirement: &70202344470720 !ruby/object:Gem::Requirement
33
28
  none: false
34
29
  requirements:
35
30
  - - ~>
@@ -37,12 +32,7 @@ dependencies:
37
32
  version: 1.8.4
38
33
  type: :development
39
34
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: 1.8.4
35
+ version_requirements: *70202344470720
46
36
  description: Simple gem for getting information about cpu and memory usage (Mac OS
47
37
  X, BSD)
48
38
  email: ondrej@bartas.cz
@@ -80,7 +70,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
80
70
  version: '0'
81
71
  segments:
82
72
  - 0
83
- hash: -1704237501487931525
73
+ hash: 2166164586050326453
84
74
  required_rubygems_version: !ruby/object:Gem::Requirement
85
75
  none: false
86
76
  requirements:
@@ -89,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
79
  version: '0'
90
80
  requirements: []
91
81
  rubyforge_project:
92
- rubygems_version: 1.8.24
82
+ rubygems_version: 1.8.10
93
83
  signing_key:
94
84
  specification_version: 3
95
85
  summary: Get system CPU and Memory usage