gecko-pusher 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
data/README.md
CHANGED
@@ -63,10 +63,10 @@ Creating a channel returns an object that makes it easy to send messages to Geck
|
|
63
63
|
|
64
64
|
### RAG widgets
|
65
65
|
|
66
|
-
channel.push(100, 200, 300)
|
67
|
-
channel.push(100, "desc", 222, "desc", 300 "desc")
|
68
|
-
channel.push(:green, 100)
|
69
|
-
channel.push(:green, 100, "Description")
|
66
|
+
channel.push(100, 200, 300) // Pushes RAG values with no description
|
67
|
+
channel.push(100, "desc", 222, "desc", 300 "desc") // Push RAG values with descriptions
|
68
|
+
channel.push(:green, 100) // Just push a green value
|
69
|
+
channel.push(:green, 100, "Description") // Push a green value with a description
|
70
70
|
|
71
71
|
### Line charts
|
72
72
|
|
@@ -95,12 +95,12 @@ If you want to embellish points with additional styling information, you have to
|
|
95
95
|
an array, the first element being as above, the second element being the point options. You can mix/match the two ways - the API
|
96
96
|
will figure it out:
|
97
97
|
|
98
|
-
channel.push(["192.168.0.1", {colour: "FF0000", size: 3}])
|
99
|
-
channel.push([[-51.424, 0.02323], {size: 8}])
|
100
|
-
channel.push([{city_name: "London", country_code: "GB"}, {...}])
|
101
|
-
channel.push(["host.dsci.it", {colour: "00FF00"}])
|
98
|
+
channel.push(["192.168.0.1", {colour: "FF0000", size: 3}]) // Push IP address
|
99
|
+
channel.push([[-51.424, 0.02323], {size: 8}]) // Push Lat/Long
|
100
|
+
channel.push([{city_name: "London", country_code: "GB"}, {...}]) // Push address
|
101
|
+
channel.push(["host.dsci.it", {colour: "00FF00"}]) // Push hostname
|
102
102
|
channel.push(["192.168.0.1", {colour: "FF0000", size: 3}],
|
103
|
-
|
103
|
+
[[-51.424, 0.02323], {size: 8}]) // Push any combination of above as multiple args
|
104
104
|
|
105
105
|
channel.push("192.168.0.1",
|
106
106
|
[{city_name: "London", country_code: "GB"}, {...}],
|
data/lib/gecko-pusher.rb
CHANGED
@@ -5,7 +5,9 @@ module Gecko
|
|
5
5
|
|
6
6
|
def push(*args)
|
7
7
|
data = if is_basic_rag?(*args)
|
8
|
-
{ item: [ { value: args[0]
|
8
|
+
{ item: [ { value: args[0], text: "" },
|
9
|
+
{ value: args[1], text: "" },
|
10
|
+
{ value: args[2], text: "" } ] }
|
9
11
|
elsif is_basic_rag_with_descriptions?(*args)
|
10
12
|
{ item: [ { value: args[0], text: args[1] },
|
11
13
|
{ value: args[2], text: args[3]},
|
data/lib/gecko-pusher/version.rb
CHANGED
@@ -15,9 +15,9 @@ describe Gecko::Pusher::Channel::RagCol do
|
|
15
15
|
it "should push RAG values" do
|
16
16
|
data = {
|
17
17
|
item: [
|
18
|
-
{ value: 100 },
|
19
|
-
{ value: 200 },
|
20
|
-
{ value: 300 }
|
18
|
+
{ value: 100, text: "" },
|
19
|
+
{ value: 200, text: "" },
|
20
|
+
{ value: 300, text: "" }
|
21
21
|
]
|
22
22
|
}
|
23
23
|
stub = stub_gecko_post(WIDGET_KEY, data)
|
@@ -15,9 +15,9 @@ describe Gecko::Pusher::Channel::Rag do
|
|
15
15
|
it "should push RAG values" do
|
16
16
|
data = {
|
17
17
|
item: [
|
18
|
-
{ value: 100 },
|
19
|
-
{ value: 200 },
|
20
|
-
{ value: 300 }
|
18
|
+
{ value: 100, text: "" },
|
19
|
+
{ value: 200, text: "" },
|
20
|
+
{ value: 300, text: "" }
|
21
21
|
]
|
22
22
|
}
|
23
23
|
stub = stub_gecko_post(WIDGET_KEY, data)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gecko-pusher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
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: 2012-
|
12
|
+
date: 2012-07-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -191,7 +191,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
191
191
|
version: '0'
|
192
192
|
segments:
|
193
193
|
- 0
|
194
|
-
hash:
|
194
|
+
hash: -3038743330907665277
|
195
195
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
196
196
|
none: false
|
197
197
|
requirements:
|
@@ -200,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
200
200
|
version: '0'
|
201
201
|
segments:
|
202
202
|
- 0
|
203
|
-
hash:
|
203
|
+
hash: -3038743330907665277
|
204
204
|
requirements: []
|
205
205
|
rubyforge_project:
|
206
206
|
rubygems_version: 1.8.23
|