ServState 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- M2FjZGFiMjAzMjY2ZGQ4NWFjNjA5MmZlYzU1MDQ0YjczOTVkODI0Ng==
5
- data.tar.gz: !binary |-
6
- N2QwOGUzMjc1Yjk4MTI0ZWM3NDA4MWI0YTAyMWU1ZTcyNDIwN2FmNw==
2
+ SHA1:
3
+ metadata.gz: 529a49b8bedc8e071ed6a120e07d6bcaa44ad3d9
4
+ data.tar.gz: f4b002504fbba84101f00bea3fae9b5e3f4fe0e6
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NTI2Y2I4N2Y1MzczZjRhMDE5NjEwODdkMWFmNWJmNjU1OGM4NThlOTI1OGU0
10
- NTBlY2M2MDc2NDU0ZjRhMmZiZGRjOGM1OTc1YWQzMmU3ODdjOTU5NjQ1ZmRl
11
- MmExNzQ5YTFmNGIwYjcwMTA5NDkyZDFjMWYwZjQ2YWM3NGMzNjI=
12
- data.tar.gz: !binary |-
13
- OTRmM2E5ODM5N2VmOGY3ZWM5Y2Y3OWM1Nzc4ODk3YmQxYzhhYjc1YTFjNWI3
14
- NDM1ZjFjMmI3OWU4ZmQ0YTRkNGM1ZDFmMmNhOTc4ODE2MzYwYjBhMzdiZjZh
15
- MTZhYTQ1MTg4YTA5OWI5MDk0YTVjYWVhMzQyMzRhNzMxYWQ1ZjM=
6
+ metadata.gz: 1be86332f46fff982e08026bad4a4b264f3ac283aa405a1fc91defc8b97fbcc6005764c2b902bb1fb807f2c56d9b29ee22bf3668caec559a3c1dca7ca6927590
7
+ data.tar.gz: c751cac2008021a2c1df9c9b1ec0c2d0239717fdface8096e8bbcf4dd08757dfb3fe1e1c6618a291a818dc0012951ddd5cd5eb114b3b8d8a676196a059ba2a2e
data/.coveralls.yml ADDED
@@ -0,0 +1 @@
1
+ service_name: travis-ci
data/.gitignore CHANGED
@@ -5,7 +5,6 @@
5
5
  .yardoc
6
6
  .rspec
7
7
  .rvmrc
8
- .coveralls.yml
9
8
  Gemfile.lock
10
9
  InstalledFiles
11
10
  _yardoc
@@ -18,5 +17,3 @@ spec/reports
18
17
  test/tmp
19
18
  test/version_tmp
20
19
  tmp
21
-
22
-
data/.travis.yml CHANGED
@@ -1,8 +1,8 @@
1
1
  bundler_args: --without dev
2
2
  rvm:
3
+ - 1.9.3
3
4
  - 2.0.0
4
5
  - 2.1.0
5
- - 1.9.3
6
6
 
7
7
  branches:
8
8
  only:
data/README.md CHANGED
@@ -5,13 +5,28 @@ Very simple tool to watch your LINUX server status.
5
5
 
6
6
  [![Gem Version](https://badge.fury.io/rb/ServState.png)](http://badge.fury.io/rb/ServState)
7
7
  [![Build Status](https://travis-ci.org/ololyay/ServState.png?branch=master)](https://travis-ci.org/ololyay/ServState)
8
+ [![Coverage Status](https://coveralls.io/repos/ololyay/ServState/badge.png?branch=master)](https://coveralls.io/r/ololyay/ServState?branch=master)
8
9
 
9
10
  ## Installation
10
11
 
11
12
  $ gem install ServState
12
13
 
14
+ ## Requirements
15
+ - Ruby 1.9.3 or greater
16
+ - __ip__ util
17
+
18
+ ##Tested on
19
+
20
+ * Debian 7
21
+ * Ubuntu server 10.04
22
+ * Ubuntu server 12.04
23
+ * Ubuntu server 13.10
24
+ * CentOS 6
25
+ * Fedora 19
26
+
13
27
  ## Usage
14
28
 
29
+
15
30
  Defaults:
16
31
  port is 8080
17
32
  without password
@@ -28,10 +43,6 @@ Set password:
28
43
 
29
44
  $ servstate -pass mypass
30
45
 
31
- Show help:
32
-
33
- $ servstate -h
34
-
35
46
  Also you can write code like this:
36
47
  ```ruby
37
48
  require 'ServState'
data/lib/ServState.rb CHANGED
@@ -5,41 +5,46 @@ require_relative "ServState/application"
5
5
 
6
6
  module ServState
7
7
  def self.run!
8
+
9
+ defaults = {
10
+ port: 8080,
11
+ pass: nil
12
+ }
8
13
 
9
- options = Slop.parse(help: true) do
14
+ cl_options = Slop.parse(help: true) do
10
15
  banner 'Usage: servstate [options]'
11
16
  on 'pass=', 'Password to login.'
12
17
  on 'port=', 'Set port.'
13
18
  end
14
19
 
15
- app_port = options.port? ? options[:port] : 8080
16
- app_pass = options.pass? ? options[:pass] : nil
17
- options.inspect
20
+ cl_hash = cl_options.to_hash.reject {|k,v| v.nil? }
21
+
22
+ options = defaults.merge(cl_hash)
23
+
24
+ greeting(options)
25
+
26
+ run do
27
+ port options[:port]
28
+ password options[:pass]
29
+ end
30
+ end
18
31
 
32
+ def self.greeting(options)
19
33
  puts " ____ ____ _ _ "
20
34
  puts "/ ___| ___ _ ____ __/ ___|| |_ __ _| |_ ___ "
21
35
  puts "\\___ \\ / _ \\ '__\\ \\ / /\\___ \\| __/ _` | __/ _ \\"
22
36
  puts " ___) | __/ | \\ V / ___) | || (_| | || __/"
23
37
  puts "|____/ \\___|_| \\_/ |____/ \\__\\__,_|\\__\\___|"
24
- puts "\nPORT: #{app_port}"
25
- if(app_pass)
26
- puts "PASSWORD: #{app_pass}"
38
+ puts "\nPORT: #{options[:port]}"
39
+ if(options[:pass])
40
+ puts "PASSWORD: #{options[:pass]}"
27
41
  else
28
42
  puts "WITHOUT PASSWORD"
29
43
  end
30
44
  puts "\n"*3
31
-
32
- #Rack::Handler::WEBrick.run(Application,{:Port => port, :Password => pass, :AccessLog => []})
33
- Application.set_settings do
34
- port app_port
35
- password app_pass
36
- end
37
- Application.run!
38
-
39
45
  end
40
46
 
41
47
  def self.run &block
42
- p block
43
48
  Application.set_settings &block
44
49
  Application.run!
45
50
  end
@@ -19,6 +19,7 @@ module ServState
19
19
  enable :sessions
20
20
  set :environment, :test
21
21
  set :run, true
22
+ set :logging, false
22
23
  set :show_exceptions, false
23
24
  set :raise_errors, false
24
25
  set :hostname, ServicesManager.hostname
@@ -81,12 +82,12 @@ module ServState
81
82
  end
82
83
  end
83
84
 
84
- error do
85
- @name = settings.hostname
86
- @header = 'Error!'
87
- @text = "Sorry, but something went wrong."
88
- erb :error
89
- end
85
+ # error do
86
+ # @name = settings.hostname
87
+ # @header = 'Error!'
88
+ # @text = "Sorry, but something went wrong."
89
+ # erb :error
90
+ # end
90
91
 
91
92
  not_found do
92
93
  @name = settings.hostname
@@ -35,7 +35,6 @@ module ServState
35
35
  end
36
36
  def normalize(data)
37
37
  result = Hash.new
38
- p data
39
38
  result[:cpu] = data.inject(0){ |sum, n| sum + n[0] } / data.size
40
39
  result[:ram] = data.inject(0){ |sum, n| sum + n[1] } / data.size
41
40
  result[:down] = data.inject(0){ |sum, n| sum + n[2] } / data.size
@@ -9,7 +9,7 @@ module ServState
9
9
  time_diff = Time.new - @old_time
10
10
  @old_time = Time.new
11
11
 
12
- data = net_dev_data
12
+ data = net_data
13
13
 
14
14
  data.each do |interface, values|
15
15
  down = values[0] - @old_traffic[interface][0]
@@ -29,17 +29,23 @@ module ServState
29
29
  def initialize
30
30
  @speeds = Hash.new
31
31
  @old_time = Time.new
32
- @old_traffic = net_dev_data
32
+ @old_traffic = net_data
33
+ update
33
34
  end
34
35
 
35
36
  # returns hash with hash[:interface] = [total download bytes, total upload bytes]
36
- def net_dev_data
37
- lines = IO.readlines('/proc/net/dev').grep(/:/)
37
+ def net_data
38
+ # now we have two problems
39
+ output = `ip -s link`.split("\n").grep(/([0-9]:\ )|(([0-9]+\ +){6})/)
38
40
  data = Hash.new
39
41
 
40
- lines.each do |line|
41
- splited = line.split
42
- data[splited[0].chop.to_sym] = [splited[1].to_i, splited[9].to_i]
42
+ output.each_cons(3) do |lines|
43
+ if lines[0] =~ /^[0-9]:/
44
+ name = lines[0].split[1].chop
45
+ down = lines[1].split[0].to_i
46
+ up = lines[2].split[0].to_i
47
+ data[name] = [down, up]
48
+ end
43
49
  end
44
50
 
45
51
  data
@@ -31,7 +31,7 @@ function renew(){
31
31
  var interfaces=[]
32
32
  $.each(data.network, function(key, value){
33
33
  ip=(data.interfaces[key])?(data.interfaces[key]):('');
34
- interfaces.push('<div class="uk-width-medium-1-4"><div class="uk-panel uk-panel-box"><p><span class="uk-text-bold">'+key+' </span><span id="ram" class="uk-text-muted">'+ip+'</span></p><p class="uk-text-info">Down: '+value[0]+'Kbps</p><p class="uk-text-success">Up: '+value[1]+'Kbps</p></div></div>');
34
+ interfaces.push('<div class="uk-width-medium-1-4"><div class="uk-panel uk-panel-box"><p><span class="uk-text-bold">'+key+' </span><span id="ram" class="uk-text-muted">'+ip+'</span></p><p class="uk-text-info">Down: '+value[0]+'KB/s</p><p class="uk-text-success">Up: '+value[1]+'KB/s</p></div></div>');
35
35
  });
36
36
  $('#traffic').html(interfaces.join(''));
37
37
  removeNotify($('#notification'));
@@ -1,4 +1,3 @@
1
- require 'objspace'
2
1
  module ServState
3
2
  class ServicesManager
4
3
  class << self
@@ -15,7 +14,6 @@ module ServState
15
14
  ram: @usage.ram_usage[:ram_per],
16
15
  down: average_down,
17
16
  up: average_up })
18
- GC.start
19
17
  sleep(5)
20
18
  end
21
19
  end
@@ -12,18 +12,16 @@ module ServState
12
12
  # this function use ifconfig.
13
13
  # TODO: rewrite without using ifconfig
14
14
  def interfaces
15
- ifconfig_output = `ifconfig -a`
16
- ifconfig_lines = ifconfig_output.split("\n").map{ |line| line.chomp }
15
+ ip_output = `ip addr`
16
+ ip_lines = ip_output.split("\n").grep(/([0-9]:\ )|(inet\ )/)
17
17
 
18
18
  faces = Hash.new
19
- name = ''
20
19
 
21
- ifconfig_lines.each do |line|
22
- if line.include? 'Link encap:' # line with interface name
23
- name = line.split[0] # get first word - name of interface
24
- end
25
- if line.include? 'inet addr:' # line with ip
26
- faces[name] = line.scan( /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/).first # get ip
20
+ ip_lines.each_cons(2) do |lines|
21
+ if lines[0] =~ /[0-9]:\ /
22
+ name = lines[0].split[1].chop
23
+ ip = lines[1].scan(/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/).first
24
+ faces[name] = ip
27
25
  end
28
26
  end
29
27
 
@@ -1,3 +1,3 @@
1
1
  module ServState
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -3,11 +3,10 @@ Coveralls.wear!
3
3
  require 'capybara/rspec'
4
4
  require 'capybara-webkit'
5
5
  require './lib/ServState'
6
+ Thread.abort_on_exception=true
6
7
 
7
- ServState::Application.set_settings do
8
- password nil
9
- port 8080
10
- end
8
+ Thread.new { ServState.run! }
9
+ sleep 5
10
+ Capybara.app_host = "http://localhost:8080"
11
11
 
12
- Capybara.app = ServState::Application
13
12
  Capybara.default_driver = :webkit
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+ describe ServState::CpuUsage do
3
+
4
+ let(:instance){ ServState::CpuUsage.new }
5
+
6
+ it 'should has 0 usage at start' do
7
+ expect(instance.usage).to eq(0)
8
+ end
9
+ it 'should has right value' do
10
+ instance.update
11
+ expect(instance.usage).to be_between(0, 100)
12
+ end
13
+ end
@@ -0,0 +1,28 @@
1
+ require 'spec_helper'
2
+
3
+ describe ServState::LogManager do
4
+ let(:manager) { described_class }
5
+ let(:params) { { cpu: 10, ram: 20, down: 30, up: 40 } }
6
+
7
+ it 'should append data to 10min rotator' do
8
+ manager.start
9
+ manager.update(params)
10
+
11
+ output = manager.data('10min')
12
+
13
+ params.each do |key, val|
14
+ expect(output[key].last[:y]).to eq(val)
15
+ end
16
+ end
17
+
18
+ it 'should append data to 1day rotator' do
19
+ manager.start
20
+ 150.times { manager.update(params) }
21
+
22
+ output = manager.data('1day')
23
+
24
+ params.each do |key, val|
25
+ expect(output[key].last[:y]).to eq(val)
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,21 @@
1
+ require 'spec_helper'
2
+ describe ServState::NetworkUsage do
3
+ let(:net) { described_class.new }
4
+
5
+ it 'should has at least lo interface in statistic' do
6
+ expect(net.speeds['lo']).to_not be_nil
7
+ end
8
+
9
+ it 'should has right array on each interface' do
10
+ net.speeds.each do |k, val|
11
+ expect(val).to be_a Array
12
+ expect(val.size).to eq(2)
13
+ end
14
+ end
15
+
16
+ it 'should contain array of not negative numbers' do
17
+ net.speeds.each do |k, val|
18
+ val.each { |x| expect(x).to be >=0 }
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,36 @@
1
+ require 'spec_helper'
2
+
3
+ describe ServState::Rotator do
4
+ let(:size) { 10 }
5
+ let(:rotator) { described_class.new(size) }
6
+
7
+ it 'should create array with right size' do
8
+ expect(rotator.data.size).to eq(size)
9
+ end
10
+
11
+ it 'should create right array structure' do
12
+ expect(rotator.data.first).to eq([0, 0, 0, 0])
13
+ end
14
+
15
+ context 'when add value' do
16
+ let(:params) { { cpu: 1, ram: 2, down: 3, up: 4} }
17
+
18
+ it 'should save array size' do
19
+ rotator.append(params)
20
+ expect(rotator.data.size).to eq(size)
21
+ end
22
+
23
+ it 'should add value' do
24
+ rotator.append(params)
25
+ expect(rotator.data.last).to eq([1, 2, 3, 4])
26
+ expect(rotator.data.first).to eq([0, 0, 0, 0])
27
+ end
28
+
29
+ it 'should rotate values' do
30
+ 9.times { rotator.append(params) }
31
+ expect(rotator.data.first).to eq([0, 0, 0, 0])
32
+ rotator.append(params)
33
+ expect(rotator.data.first).to eq([1, 2 ,3 ,4])
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,95 @@
1
+ require 'spec_helper'
2
+
3
+ describe ServState::UsageManager do
4
+ let(:manager) { described_class.new }
5
+
6
+ context 'interfaces' do
7
+
8
+ it 'should return hash' do
9
+ expect(manager.interfaces).to be_a Hash
10
+ end
11
+
12
+ it 'hash should contain at least lo interface' do
13
+ expect(manager.interfaces.keys).to include 'lo'
14
+ end
15
+
16
+ it 'lo interface should has ip' do
17
+ expect(manager.interfaces['lo']).to eq('127.0.0.1')
18
+ end
19
+ end
20
+
21
+ context 'uptime' do
22
+
23
+ it 'should return hash' do
24
+ expect(manager.uptime).to be_a Hash
25
+ end
26
+
27
+ context 'should has right' do
28
+ let(:upt) { manager.uptime }
29
+
30
+ it 'total_sec value' do
31
+ expect(upt[:total_sec]).to be > 0
32
+ end
33
+
34
+ it 'days value' do
35
+ expect(upt[:days]).to be >= 0
36
+ end
37
+
38
+ it 'hours value' do
39
+ expect(upt[:hours]).to be_between(0, 23)
40
+ end
41
+
42
+ it 'minutes value' do
43
+ expect(upt[:minutes]).to be_between(0, 59)
44
+ end
45
+
46
+ it 'seconds value' do
47
+ expect(upt[:seconds]).to be_between(0, 59)
48
+ end
49
+
50
+ end
51
+ end
52
+
53
+ context 'disk_usage' do
54
+ let(:hash) { manager.disk_usage }
55
+
56
+ it 'should has right types of values' do
57
+
58
+ hash.each do |key, value|
59
+
60
+ expect(key).to be_a String
61
+ expect(value.size).to eq(5)
62
+ expect(value[4]).to be_a String
63
+ expect(value[0]).to be_between(0, 100)
64
+
65
+ end
66
+ end
67
+
68
+ it 'should has total as sum of used and available' do
69
+ hash.each do |key, value|
70
+ expect(value[1]).to be >= value[2] + value[3]
71
+ end
72
+ end
73
+ end
74
+
75
+ context 'ram usage' do
76
+ let(:hash) { manager.ram_usage }
77
+
78
+ it 'should has right values types' do
79
+ expect(hash[:ram].size).to eq(2)
80
+ expect(hash[:swap].size).to eq(2)
81
+
82
+ expect(hash[:ram_per]).to be_between(0, 100)
83
+ expect(hash[:swap_per]).to be_between(0, 100)
84
+ end
85
+
86
+ it 'should has right values' do
87
+ ram_values = hash[:ram]
88
+ expect(ram_values[1]).to be < ram_values[0]
89
+
90
+ swap_values = hash[:swap]
91
+ expect(swap_values[1]).to be < swap_values[0]
92
+ end
93
+
94
+ end
95
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ServState
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Sergienko
@@ -9,132 +9,132 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-18 00:00:00.000000000 Z
12
+ date: 2014-03-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: '1.4'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1.4'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rack
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
34
  version: '1.5'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '1.5'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: slop
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ~>
46
+ - - "~>"
47
47
  - !ruby/object:Gem::Version
48
48
  version: 3.5.0
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ~>
53
+ - - "~>"
54
54
  - !ruby/object:Gem::Version
55
55
  version: 3.5.0
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: bundler
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ~>
60
+ - - "~>"
61
61
  - !ruby/object:Gem::Version
62
62
  version: '1.3'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ~>
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
69
  version: '1.3'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rake
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ! '>='
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - ! '>='
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: rspec
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - ! '>='
88
+ - - ">="
89
89
  - !ruby/object:Gem::Version
90
90
  version: '0'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - ! '>='
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: capybara
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - ! '>='
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - ! '>='
109
+ - - ">="
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0'
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: capybara-webkit
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - ! '>='
116
+ - - ">="
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0'
119
119
  type: :development
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - ! '>='
123
+ - - ">="
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: coveralls
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - ! '>='
130
+ - - ">="
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0'
133
133
  type: :development
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - ! '>='
137
+ - - ">="
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  description: Simple tool to watch your linux server state
@@ -145,8 +145,9 @@ executables:
145
145
  extensions: []
146
146
  extra_rdoc_files: []
147
147
  files:
148
- - .gitignore
149
- - .travis.yml
148
+ - ".coveralls.yml"
149
+ - ".gitignore"
150
+ - ".travis.yml"
150
151
  - Gemfile
151
152
  - LICENSE.txt
152
153
  - README.md
@@ -181,9 +182,14 @@ files:
181
182
  - lib/ServState/views/error.erb
182
183
  - lib/ServState/views/index.erb
183
184
  - lib/ServState/views/login.erb
184
- - spec/charts_json_spec.rb
185
- - spec/dashboard_spec.rb
185
+ - spec/integration/charts_json_spec.rb
186
+ - spec/integration/dashboard_spec.rb
186
187
  - spec/spec_helper.rb
188
+ - spec/unit/cpu_usage_spec.rb
189
+ - spec/unit/log_manager_spec.rb
190
+ - spec/unit/network_usage_spec.rb
191
+ - spec/unit/rotator_spec.rb
192
+ - spec/unit/usage_manager_spec.rb
187
193
  homepage: http://github.com/ololyay/ServState
188
194
  licenses:
189
195
  - MIT
@@ -194,12 +200,12 @@ require_paths:
194
200
  - lib
195
201
  required_ruby_version: !ruby/object:Gem::Requirement
196
202
  requirements:
197
- - - ! '>='
203
+ - - ">="
198
204
  - !ruby/object:Gem::Version
199
205
  version: '0'
200
206
  required_rubygems_version: !ruby/object:Gem::Requirement
201
207
  requirements:
202
- - - ! '>='
208
+ - - ">="
203
209
  - !ruby/object:Gem::Version
204
210
  version: '0'
205
211
  requirements: []
@@ -209,6 +215,11 @@ signing_key:
209
215
  specification_version: 4
210
216
  summary: http://github.com/ololyay/ServState
211
217
  test_files:
212
- - spec/charts_json_spec.rb
213
- - spec/dashboard_spec.rb
218
+ - spec/integration/charts_json_spec.rb
219
+ - spec/integration/dashboard_spec.rb
214
220
  - spec/spec_helper.rb
221
+ - spec/unit/cpu_usage_spec.rb
222
+ - spec/unit/log_manager_spec.rb
223
+ - spec/unit/network_usage_spec.rb
224
+ - spec/unit/rotator_spec.rb
225
+ - spec/unit/usage_manager_spec.rb