vnstat-ruby 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -3
- data/Gemfile.lock +3 -3
- data/VERSION +1 -1
- data/lib/vnstat/parser.rb +2 -1
- data/lib/vnstat/result/hour.rb +1 -1
- data/spec/lib/vnstat/interface_spec.rb +4 -3
- data/spec/lib/vnstat/result/minute_spec.rb +4 -2
- data/vnstat-ruby.gemspec +13 -13
- metadata +15 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e45720705e11abb39cdd36fa8d33059fa14c02b
|
4
|
+
data.tar.gz: 90d8cb6301144a07c7c821d6e205b560a5666c63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8dfeff221f9f06984cc969308a0b11d52880b7bed9e771fd7648b104d0d361e3c1edbcc208a0a789975731599a2a5a9ca70aadd04420f3de19d160325e3cd803
|
7
|
+
data.tar.gz: 06f6358cc008fefb2a06ee4446d5e9cb8e948e3f8b65ffedb1242d1221ac2a85e1bcca4ecb77edee185d52e2dc36e54d918fee36330728613a630c8f369baeb7
|
data/Gemfile
CHANGED
@@ -4,8 +4,8 @@ gem 'nokogiri', '~> 1.6'
|
|
4
4
|
|
5
5
|
group :development do
|
6
6
|
gem 'rspec', '~> 3.0'
|
7
|
-
gem 'yard'
|
7
|
+
gem 'yard', '~> 0'
|
8
8
|
gem 'bundler', '~> 1.0'
|
9
|
-
gem 'jeweler', '~> 2.0.1'
|
10
|
-
gem 'codeclimate-test-reporter', require: false
|
9
|
+
gem 'jeweler', '~> 2.0', '>= 2.0.1'
|
10
|
+
gem 'codeclimate-test-reporter', '~> 0', require: false
|
11
11
|
end
|
data/Gemfile.lock
CHANGED
@@ -74,11 +74,11 @@ PLATFORMS
|
|
74
74
|
|
75
75
|
DEPENDENCIES
|
76
76
|
bundler (~> 1.0)
|
77
|
-
codeclimate-test-reporter
|
78
|
-
jeweler (~> 2.0.1)
|
77
|
+
codeclimate-test-reporter (~> 0)
|
78
|
+
jeweler (~> 2.0, >= 2.0.1)
|
79
79
|
nokogiri (~> 1.6)
|
80
80
|
rspec (~> 3.0)
|
81
|
-
yard
|
81
|
+
yard (~> 0)
|
82
82
|
|
83
83
|
BUNDLED WITH
|
84
84
|
1.10.6
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.3
|
data/lib/vnstat/parser.rb
CHANGED
@@ -36,7 +36,8 @@ module Vnstat
|
|
36
36
|
date = extract_date_from_xml_element(element)
|
37
37
|
hour = element.xpath('time/hour').text.to_i
|
38
38
|
minute = element.xpath('time/minute').text.to_i
|
39
|
-
DateTime.new(date.year, date.month, date.day, hour, minute
|
39
|
+
DateTime.new(date.year, date.month, date.day, hour, minute, 0,
|
40
|
+
DateTime.now.offset)
|
40
41
|
end
|
41
42
|
|
42
43
|
##
|
data/lib/vnstat/result/hour.rb
CHANGED
@@ -179,9 +179,10 @@ describe Vnstat::Interface do
|
|
179
179
|
end
|
180
180
|
|
181
181
|
describe '#updated_at' do
|
182
|
-
it 'returns the DateTime from the updated node' do
|
183
|
-
|
184
|
-
|
182
|
+
it 'returns the DateTime from the updated node in the correct time zone' do
|
183
|
+
time = DateTime.new(2015, 10, 21, 22, 58, 00, DateTime.now.offset)
|
184
|
+
|
185
|
+
expect(subject.updated_at).to eq time
|
185
186
|
end
|
186
187
|
end
|
187
188
|
|
@@ -21,8 +21,10 @@ describe Vnstat::Result::Minute do
|
|
21
21
|
|
22
22
|
it { is_expected.to be_a described_class }
|
23
23
|
|
24
|
-
it 'initializes with the correct #time' do
|
25
|
-
|
24
|
+
it 'initializes with the correct #time with the system time zone' do
|
25
|
+
time = DateTime.new(2015, 2, 3, 12, 34, 00, DateTime.now.offset)
|
26
|
+
|
27
|
+
expect(subject.time).to eq time
|
26
28
|
end
|
27
29
|
|
28
30
|
it 'initializes with the correct #date' do
|
data/vnstat-ruby.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: vnstat-ruby 1.0.
|
5
|
+
# stub: vnstat-ruby 1.0.3 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "vnstat-ruby"
|
9
|
-
s.version = "1.0.
|
9
|
+
s.version = "1.0.3"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Tobias Casper"]
|
14
|
-
s.date = "2015-11-
|
14
|
+
s.date = "2015-11-25"
|
15
15
|
s.description = "Uses the the vnstat CLI to track your network traffic."
|
16
16
|
s.email = "tobias.casper@gmail.com"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -80,7 +80,7 @@ Gem::Specification.new do |s|
|
|
80
80
|
]
|
81
81
|
s.homepage = "http://github.com/tlux/vnstat-ruby"
|
82
82
|
s.licenses = ["MIT"]
|
83
|
-
s.rubygems_version = "2.4.
|
83
|
+
s.rubygems_version = "2.4.3"
|
84
84
|
s.summary = "A Ruby wrapper for vnstat."
|
85
85
|
|
86
86
|
if s.respond_to? :specification_version then
|
@@ -89,25 +89,25 @@ Gem::Specification.new do |s|
|
|
89
89
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
90
90
|
s.add_runtime_dependency(%q<nokogiri>, ["~> 1.6"])
|
91
91
|
s.add_development_dependency(%q<rspec>, ["~> 3.0"])
|
92
|
-
s.add_development_dependency(%q<yard>, ["
|
92
|
+
s.add_development_dependency(%q<yard>, ["~> 0"])
|
93
93
|
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
94
|
-
s.add_development_dependency(%q<jeweler>, ["
|
95
|
-
s.add_development_dependency(%q<codeclimate-test-reporter>, ["
|
94
|
+
s.add_development_dependency(%q<jeweler>, [">= 2.0.1", "~> 2.0"])
|
95
|
+
s.add_development_dependency(%q<codeclimate-test-reporter>, ["~> 0"])
|
96
96
|
else
|
97
97
|
s.add_dependency(%q<nokogiri>, ["~> 1.6"])
|
98
98
|
s.add_dependency(%q<rspec>, ["~> 3.0"])
|
99
|
-
s.add_dependency(%q<yard>, ["
|
99
|
+
s.add_dependency(%q<yard>, ["~> 0"])
|
100
100
|
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
101
|
-
s.add_dependency(%q<jeweler>, ["
|
102
|
-
s.add_dependency(%q<codeclimate-test-reporter>, ["
|
101
|
+
s.add_dependency(%q<jeweler>, [">= 2.0.1", "~> 2.0"])
|
102
|
+
s.add_dependency(%q<codeclimate-test-reporter>, ["~> 0"])
|
103
103
|
end
|
104
104
|
else
|
105
105
|
s.add_dependency(%q<nokogiri>, ["~> 1.6"])
|
106
106
|
s.add_dependency(%q<rspec>, ["~> 3.0"])
|
107
|
-
s.add_dependency(%q<yard>, ["
|
107
|
+
s.add_dependency(%q<yard>, ["~> 0"])
|
108
108
|
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
109
|
-
s.add_dependency(%q<jeweler>, ["
|
110
|
-
s.add_dependency(%q<codeclimate-test-reporter>, ["
|
109
|
+
s.add_dependency(%q<jeweler>, [">= 2.0.1", "~> 2.0"])
|
110
|
+
s.add_dependency(%q<codeclimate-test-reporter>, ["~> 0"])
|
111
111
|
end
|
112
112
|
end
|
113
113
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vnstat-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Casper
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -42,14 +42,14 @@ dependencies:
|
|
42
42
|
name: yard
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
@@ -70,28 +70,34 @@ dependencies:
|
|
70
70
|
name: jeweler
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 2.0.1
|
76
|
+
- - "~>"
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '2.0'
|
76
79
|
type: :development
|
77
80
|
prerelease: false
|
78
81
|
version_requirements: !ruby/object:Gem::Requirement
|
79
82
|
requirements:
|
80
|
-
- - "
|
83
|
+
- - ">="
|
81
84
|
- !ruby/object:Gem::Version
|
82
85
|
version: 2.0.1
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '2.0'
|
83
89
|
- !ruby/object:Gem::Dependency
|
84
90
|
name: codeclimate-test-reporter
|
85
91
|
requirement: !ruby/object:Gem::Requirement
|
86
92
|
requirements:
|
87
|
-
- - "
|
93
|
+
- - "~>"
|
88
94
|
- !ruby/object:Gem::Version
|
89
95
|
version: '0'
|
90
96
|
type: :development
|
91
97
|
prerelease: false
|
92
98
|
version_requirements: !ruby/object:Gem::Requirement
|
93
99
|
requirements:
|
94
|
-
- - "
|
100
|
+
- - "~>"
|
95
101
|
- !ruby/object:Gem::Version
|
96
102
|
version: '0'
|
97
103
|
description: Uses the the vnstat CLI to track your network traffic.
|
@@ -180,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
186
|
version: '0'
|
181
187
|
requirements: []
|
182
188
|
rubyforge_project:
|
183
|
-
rubygems_version: 2.4.
|
189
|
+
rubygems_version: 2.4.3
|
184
190
|
signing_key:
|
185
191
|
specification_version: 4
|
186
192
|
summary: A Ruby wrapper for vnstat.
|