heartbeat-client 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -9,5 +9,4 @@ group :development do
9
9
  gem "bundler", "~> 1.0.0"
10
10
  gem "jeweler", "~> 1.5.2"
11
11
  gem "rcov", ">= 0"
12
- gem 'sys-cpu'
13
12
  end
data/Gemfile.lock CHANGED
@@ -2,7 +2,6 @@ GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
4
  daemons (1.1.4)
5
- ffi (1.0.11)
6
5
  git (1.2.5)
7
6
  httparty (0.8.1)
8
7
  multi_json
@@ -16,8 +15,6 @@ GEM
16
15
  rake (0.9.2.2)
17
16
  rcov (0.9.11)
18
17
  shoulda (2.11.3)
19
- sys-cpu (0.7.0)
20
- ffi (>= 1.0.0)
21
18
 
22
19
  PLATFORMS
23
20
  ruby
@@ -29,4 +26,3 @@ DEPENDENCIES
29
26
  jeweler (~> 1.5.2)
30
27
  rcov
31
28
  shoulda
32
- sys-cpu
data/Rakefile CHANGED
@@ -19,12 +19,8 @@ Jeweler::Tasks.new do |gem|
19
19
  gem.description = "Heartbeat Client in Ruby"
20
20
  gem.email = "kiessler@inceedo.com"
21
21
  gem.authors = ["Oliver Kiessler"]
22
- # Include your dependencies below. Runtime dependencies are required when using your gem,
23
- # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
24
22
  gem.add_runtime_dependency 'daemons'
25
- # gem.add_runtime_dependency 'sys-cpu'
26
23
  gem.add_runtime_dependency 'httparty'
27
- # gem.add_development_dependency 'rspec', '> 1.2.3'
28
24
  end
29
25
  Jeweler::RubygemsDotOrgTasks.new
30
26
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
@@ -2,11 +2,9 @@ require 'rubygems'
2
2
  gem 'httparty'
3
3
  require 'httparty'
4
4
  require 'logger'
5
- require "sys/cpu" rescue nil
6
5
  require 'pp'
7
6
 
8
7
  class Heartbeat
9
- include Sys
10
8
  include HTTParty
11
9
  base_uri 'http://heartbeat-server.herokuapp.com'
12
10
 
@@ -25,9 +23,7 @@ class Heartbeat
25
23
  def self.create(apikey)
26
24
  cpu = 0; load_average = 0; memory_used = 0; memory_free = 0
27
25
 
28
- if self.is_mac?
29
- load_average = CPU.load_avg.first
30
- elsif self.is_linux?
26
+ if self.is_linux?
31
27
  cpus = `iostat -c`.split
32
28
  cpu = 100 - cpus.last.to_i
33
29
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heartbeat-client
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 4
10
- version: 0.1.4
9
+ - 5
10
+ version: 0.1.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Oliver Kiessler
@@ -115,26 +115,12 @@ dependencies:
115
115
  segments:
116
116
  - 0
117
117
  version: "0"
118
- name: sys-cpu
119
- prerelease: false
120
- type: :development
121
- requirement: *id007
122
- - !ruby/object:Gem::Dependency
123
- version_requirements: &id008 !ruby/object:Gem::Requirement
124
- none: false
125
- requirements:
126
- - - ">="
127
- - !ruby/object:Gem::Version
128
- hash: 3
129
- segments:
130
- - 0
131
- version: "0"
132
118
  name: daemons
133
119
  prerelease: false
134
120
  type: :runtime
135
- requirement: *id008
121
+ requirement: *id007
136
122
  - !ruby/object:Gem::Dependency
137
- version_requirements: &id009 !ruby/object:Gem::Requirement
123
+ version_requirements: &id008 !ruby/object:Gem::Requirement
138
124
  none: false
139
125
  requirements:
140
126
  - - ">="
@@ -146,7 +132,7 @@ dependencies:
146
132
  name: httparty
147
133
  prerelease: false
148
134
  type: :runtime
149
- requirement: *id009
135
+ requirement: *id008
150
136
  description: Heartbeat Client in Ruby
151
137
  email: kiessler@inceedo.com
152
138
  executables: []