whispr 0.0.2 → 0.0.3
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.
- data/CHANGELOG.md +14 -0
- data/lib/whispr.rb +10 -3
- data/lib/whispr/version.rb +1 -1
- metadata +4 -3
data/CHANGELOG.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
0.0.3
|
2
|
+
- fixes: branch test and call to #update_one from #udpate_many
|
3
|
+
- [1](https://github.com/simulacre/whispr/pull/1): allows passing array to #update [ovesh](https://github.com/ovesh)
|
4
|
+
|
5
|
+
0.0.2
|
6
|
+
- fixes: Whispr#propogate uses floats when checking xFilesFactor
|
7
|
+
- fixes: when Archive#fetch is called with a fromTime that is outside of the archive fromTime will be properly adjusted to the oldest available timestamp
|
8
|
+
|
9
|
+
0.0.1
|
10
|
+
- support whispr-create
|
11
|
+
- support whispr-update
|
12
|
+
- support whispr-fetch
|
13
|
+
- support whispr-dump
|
14
|
+
- support whispr-info
|
data/lib/whispr.rb
CHANGED
@@ -237,10 +237,17 @@ class Whispr
|
|
237
237
|
# Each element of the points list should be a two dimensional Array where
|
238
238
|
# the first element is a timestamp and the second element is a value.
|
239
239
|
def update(*points)
|
240
|
-
|
240
|
+
if points[0].is_a?(Array)
|
241
|
+
# Cover the least exhaustive, and most likely, nested array check first
|
242
|
+
points = points.length == 1 ? points[0] : points.flatten
|
243
|
+
elsif points.any? { |p| p.is_a?(Array) }
|
244
|
+
points = points.flatten
|
245
|
+
end
|
246
|
+
return if points.empty? || points.length % 2 != 0
|
247
|
+
|
241
248
|
# TODO lock the file
|
242
|
-
if points.length ==
|
243
|
-
update_one(points[
|
249
|
+
if points.length == 2
|
250
|
+
update_one(points[1], points[0])
|
244
251
|
else
|
245
252
|
update_many(points)
|
246
253
|
end
|
data/lib/whispr/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whispr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-01-09 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ''
|
15
15
|
email: whispr@simulacre.org
|
@@ -30,6 +30,7 @@ files:
|
|
30
30
|
- bin/whispr-fetch
|
31
31
|
- bin/whispr-info
|
32
32
|
- bin/whispr-update
|
33
|
+
- CHANGELOG.md
|
33
34
|
- README.md
|
34
35
|
homepage: http://github.com/simulacre/whispr
|
35
36
|
licenses: []
|
@@ -51,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
51
52
|
version: '0'
|
52
53
|
requirements: []
|
53
54
|
rubyforge_project:
|
54
|
-
rubygems_version: 1.8.
|
55
|
+
rubygems_version: 1.8.25
|
55
56
|
signing_key:
|
56
57
|
specification_version: 3
|
57
58
|
summary: Read and write Graphite Whisper round-robin files
|