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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f4cd6bf3128b3bfd282c7245a9eed0930128a28
4
- data.tar.gz: 000c9f5f617a544ce51b40d7d7a97621432b292b
3
+ metadata.gz: 3e45720705e11abb39cdd36fa8d33059fa14c02b
4
+ data.tar.gz: 90d8cb6301144a07c7c821d6e205b560a5666c63
5
5
  SHA512:
6
- metadata.gz: 6ed11ec33f8d67565e94975c61eec4a831653510304b9808a39178ac042cc008d991fe3cfa93ee1826b9ded04e6826a86fb1e5b05a0971a04f8d85a75ff6895e
7
- data.tar.gz: f0e5232cabc27e4d5843f38c08e7e2c354175427703668cc1e94eea222220d83d0132bed667ba2677fcc89b447e239aed03aeb779133906583538a110a19cb7b
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.2
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
  ##
@@ -49,7 +49,7 @@ module Vnstat
49
49
  #
50
50
  # @return [DateTime]
51
51
  def time
52
- DateTime.new(year, month, day, hour)
52
+ DateTime.new(year, month, day, hour, 0, DateTime.now.offset)
53
53
  end
54
54
  end
55
55
  end
@@ -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
- datetime = DateTime.new(2015, 10, 21, 22, 58)
184
- expect(subject.updated_at).to eq datetime
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
- expect(subject.time).to eq DateTime.new(2015, 2, 3, 12, 34)
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.2 ruby lib
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.2"
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-24"
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.5.1"
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>, [">= 0"])
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>, ["~> 2.0.1"])
95
- s.add_development_dependency(%q<codeclimate-test-reporter>, [">= 0"])
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>, [">= 0"])
99
+ s.add_dependency(%q<yard>, ["~> 0"])
100
100
  s.add_dependency(%q<bundler>, ["~> 1.0"])
101
- s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
102
- s.add_dependency(%q<codeclimate-test-reporter>, [">= 0"])
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>, [">= 0"])
107
+ s.add_dependency(%q<yard>, ["~> 0"])
108
108
  s.add_dependency(%q<bundler>, ["~> 1.0"])
109
- s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
110
- s.add_dependency(%q<codeclimate-test-reporter>, [">= 0"])
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.2
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-24 00:00:00.000000000 Z
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.5.1
189
+ rubygems_version: 2.4.3
184
190
  signing_key:
185
191
  specification_version: 4
186
192
  summary: A Ruby wrapper for vnstat.