cloud_monitor_agent 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: dd1db6788631ccb4787dc061cc8516ae8e8e93b2
4
- data.tar.gz: 35abff2bd5510228c8af6067ff8b54958776f02d
3
+ metadata.gz: 2b4136e1502eb9d07ba91c02e86e3f57c76757cd
4
+ data.tar.gz: d1062b2a771b2d7324e9c83cc04a465af00799d1
5
5
  SHA512:
6
- metadata.gz: 71e9f94aa23f4d7fbb12bf531d75177d007ec1aba8ba39ed8363314d9f2ea5f06374fa2f97afba01326a9e0ec0eabc838a27f7d935b9f59969af396f7aa678fd
7
- data.tar.gz: 156f74df3cd36070878934005b1e08c06dcf4d18f04be33d91dc6a3000707909d681a54b8949572fd72e76395fe5ef3fd8ede07d98c0710b3185f27a3a76879f
6
+ metadata.gz: 976b148254c1b36a5d3bb199a40431ec317c54e549eb708546197759eddbeeb4914d40da01c6c752cd8318dcf141cbe70804de0fec6dcde35befd85efb6ddede
7
+ data.tar.gz: 6369345bf59de90749a76a91736ab25577ccd41c56108feef94f99d08dbcfc37ea3a81b380d37c7e38f8f2a9b217300600c8316b0aa93f372a3178d5f240ff9a
data/Gemfile CHANGED
@@ -3,5 +3,6 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in usagewatch_ext.gemspec
4
4
  gemspec
5
5
  gem 'usagewatch_ext'
6
+ gem 'rspec'
6
7
  gem 'coveralls', :require => false
7
8
  gem 'dotenv'
@@ -24,5 +24,4 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  spec.add_development_dependency "bundler", "~> 1.3"
26
26
  spec.add_development_dependency "rake"
27
- spec.add_development_dependency 'rspec'
28
27
  end
data/lib/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module CloudMonitor
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  OS = RUBY_PLATFORM
4
4
  end
@@ -1,5 +1,6 @@
1
1
  require 'rspec'
2
2
  require 'spec_helper'
3
+ require './lib/cloud_monitor_agent'
3
4
 
4
5
  describe 'IncludeLibrary' do
5
6
  it 'should include the library' do
@@ -13,7 +14,7 @@ describe 'Should Initilize API' do
13
14
  a = CloudMonitorAgent.new("http://localhost:9292/api/v1/push_info", "6a44b2afb6d719a321567a56a37171d5", 60)
14
15
  a.api_url.class.should be(String)
15
16
  a.api_url.should_not be_nil
16
- a.api_url.class.should be("http://localhost:9292/api/v1/push_info")
17
+ a.api_url.should eq("http://localhost:9292/api/v1/push_info")
17
18
  end
18
19
  end
19
20
 
@@ -22,16 +23,16 @@ describe 'Should Initilize Token' do
22
23
  a = CloudMonitorAgent.new("http://localhost:9292/api/v1/push_info", "6a44b2afb6d719a321567a56a37171d5", 60)
23
24
  a.token.class.should be(String)
24
25
  a.token.should_not be_nil
25
- a.token.class.should be("6a44b2afb6d719a321567a56a37171d5")
26
+ a.token.should eq("6a44b2afb6d719a321567a56a37171d5")
26
27
  end
27
28
  end
28
29
 
29
30
  describe 'Should Initilize delay time' do
30
31
  it "should send data after proper delay" do
31
32
  a = CloudMonitorAgent.new("http://localhost:9292/api/v1/push_info", "6a44b2afb6d719a321567a56a37171d5", 60)
32
- a.delay.class.should be(Integer)
33
+ a.delay.class.should be(Fixnum)
33
34
  a.delay.should_not be_nil
34
- a.deply.class.should be(60)
35
+ a.delay.should eq(60)
35
36
  end
36
37
  end
37
38
 
@@ -39,26 +40,26 @@ describe 'Payload Verification' do
39
40
  it "should contain proper token on payload" do
40
41
  a = CloudMonitorAgent.new("http://localhost:9292/api/v1/push_info", "6a44b2afb6d719a321567a56a37171d5", 60)
41
42
  payload = a.getPayload
42
- payload.token.should be(String)
43
- payload.token.should_not be_nil
44
- payload.token.token.should be("6a44b2afb6d719a321567a56a37171d5")
43
+ payload[:token].class.should be(String)
44
+ payload[:token].should_not be_nil
45
+ payload[:token].should eq("6a44b2afb6d719a321567a56a37171d5")
45
46
  end
46
47
 
47
48
  it "should be the percentage of cpu used" do
48
49
  a = CloudMonitorAgent.new("http://localhost:9292/api/v1/push_info", "6a44b2afb6d719a321567a56a37171d5", 60)
49
50
  payload = a.getPayload
50
- payload.uw_cpuused.class.should be(Float)
51
- payload.uw_cpuused.should_not be_nil
52
- payload.uw_cpuused.should be <= 100
53
- payload.uw_cpuused.should be >= 0
51
+ payload[:cpu_used].class.should be(Float)
52
+ payload[:cpu_used].should_not be_nil
53
+ payload[:cpu_used].should be <= 100
54
+ payload[:cpu_used].should be >= 0
54
55
  end
55
56
 
56
57
  it "should be the percentage of GB of disk used" do
57
58
  a = CloudMonitorAgent.new("http://localhost:9292/api/v1/push_info", "6a44b2afb6d719a321567a56a37171d5", 60)
58
59
  payload = a.getPayload
59
- payload.uw_diskused_perc.class.should be(Float)
60
- payload.uw_diskused_perc.should_not be_nil
61
- payload.uw_diskused_perc.should be <= 100
62
- payload.uw_diskused_perc.should be >= 0
60
+ payload[:disk_used].class.should be(Float)
61
+ payload[:disk_used].should_not be_nil
62
+ payload[:disk_used].should be <= 100
63
+ payload[:disk_used].should be >= 0
63
64
  end
64
65
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloud_monitor_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - G SubbaRao
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: rspec
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
55
  description: A Ruby Gem with methods to send statistics such as CPU, Disk, TCP/UDP
70
56
  Connections, Load, Bandwidth, Disk I/O, and Memory to remote address
71
57
  email: