pulse_meter_cli 0.4.12 → 0.4.13

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -2,6 +2,7 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.2
4
4
  - 1.9.3
5
+ - 2.0.0
5
6
  branches:
6
7
  only:
7
8
  - master
data/lib/cmd.rb CHANGED
@@ -68,8 +68,9 @@ module Cmd
68
68
  method_option :format, :default => :table, :desc => "Output format: table or csv"
69
69
  def timeline(name, seconds)
70
70
  with_safe_restore_of(name) do |sensor|
71
+ now = Time.now
71
72
  puts sensor.
72
- timeline(seconds).
73
+ timeline_within(now - seconds, now, true).
73
74
  map {|data| [data.start_time, data.value || '']}.
74
75
  to_table(options[:format])
75
76
  end
@@ -78,7 +79,7 @@ module Cmd
78
79
  desc "timeline_within NAME FROM TILL", "Get sensor's NAME timeline in interval. Time format: YYYY-MM-DD HH:MM:SS"
79
80
  common_options
80
81
  method_option :format, :default => :table, :desc => "Output format: table or csv"
81
- def timeline_within(name, from, till)
82
+ def timeline_within(name, from, till, true)
82
83
  with_safe_restore_of(name) do |sensor|
83
84
  puts sensor.
84
85
  timeline_within(Time.parse(from), Time.parse(till)).
@@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
14
14
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
15
15
  gem.name = "pulse_meter_cli"
16
16
  gem.require_paths = ["lib"]
17
- gem.version = "0.4.12"
17
+ gem.version = "0.4.13"
18
18
 
19
19
  gem.add_runtime_dependency('pulse_meter_core')
20
20
  gem.add_runtime_dependency('terminal-table')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pulse_meter_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.12
4
+ version: 0.4.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-06-16 00:00:00.000000000 Z
13
+ date: 2014-02-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: pulse_meter_core
@@ -249,9 +249,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
249
249
  - - ! '>='
250
250
  - !ruby/object:Gem::Version
251
251
  version: '0'
252
- segments:
253
- - 0
254
- hash: -3626993509759145837
255
252
  requirements: []
256
253
  rubyforge_project:
257
254
  rubygems_version: 1.8.23