hydna 0.1.3 → 0.1.4

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hydna.rb +8 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 200bbb62cca0140bb1d1c3860f2343e601084016
4
- data.tar.gz: 9efc99d7d7df77fe959042f0bbe76babf1925548
3
+ metadata.gz: 564b13acd26193b03acf7fd05a4424a89520a82d
4
+ data.tar.gz: e445b224a8acbe40c906abaed4c81da0fe5e8e9a
5
5
  SHA512:
6
- metadata.gz: f768c7f9d6bd6dbdc27d1664f3cb801c041cd5d69c16656f6bd33d30e9342d1efe23301c1f523501500ed0c69e433d47009ef576c2b5cb47e28e41469706a65d
7
- data.tar.gz: 436c5ee02e7f49f1454f7642d0b434542375ca33bb4645f1680db01e3c2f34ee0c811f49b5b3425cc96936b5a7e1aef1346e64f5e1b0519ab2c0a299592094ae
6
+ metadata.gz: 13c9522c00c9b2f0ec22c24cb97fe753e93b8cec86932710705f5c01acdf99c5fe809c4cb4568331c02213fea853a7301946bab4c19d255e23b1862afd716ea6
7
+ data.tar.gz: 4da7afc09fd7100de9e90f686a2f855dd0dab928d2e981bd19376b3d1d3b009e7b1b27b6e8b5202aad42cbb71f5a5caf1d2f9408f3d2aabe91b2a986e199e07a
data/lib/hydna.rb CHANGED
@@ -27,7 +27,7 @@ module Hydna
27
27
 
28
28
  end
29
29
 
30
- def self.push(domain, data, prio=1, ctoken=nil, agent='hydna-ruby-push')
30
+ def self.push(domain, data, prio=0, ctoken=nil, agent='hydna-ruby-push')
31
31
 
32
32
  headers = {
33
33
  'Content-Type' => 'text/plain',
@@ -134,6 +134,13 @@ module Hydna
134
134
  if parts.length > 3
135
135
  raise "Unable to parse channel"
136
136
  end
137
+
138
+ pos = parts[1].index('x')
139
+
140
+ if pos != nil
141
+ channel = parts[1].slice(pos+1, parts[1].length).hex
142
+ return channel
143
+ end
137
144
 
138
145
  if !is_numeric(parts[1])
139
146
  raise "Invalid channel"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydna
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Isak Wiström