fluent-plugin-osmocom-spectrum-sense 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 19812cf0a12d78c0870f56d4b1ec53f76ee2b7b6
4
- data.tar.gz: 4dba9f5da1d792f431065bf0c100d79c48c7d770
3
+ metadata.gz: 7be42b5e843442703afb760f321640f25636f323
4
+ data.tar.gz: 14623581ced7b8a5d5d42122547b4a53942180b0
5
5
  SHA512:
6
- metadata.gz: dbc0d4fcdddce1a730338d37935ec2b73a065573600b9ba0e2c8f2a63bac18788238074a0eefe46b496ccde13035267672d0499c67288dbec7c4830e698afc65
7
- data.tar.gz: 50ae16bbbaa9c3da1d2c640f98550ca160719d89aa54c90573700d9a4d5e9884cd632e5f645cbb352e68744bc30ffe577ef3bcda76e2e1f0ea17b069c0fb8a50
6
+ metadata.gz: 04a55d5d003b7c80bdf5188449705a5b52efd897f2b8e53193d06132341cdebcc7504d18a9243c700502104996a2469d5dc48c8f15fb685e90023b536c1b48ec
7
+ data.tar.gz: 9ab52bbc6bd7c78391450536c6510cd4e77ef5adbb77d727fd8a229de7387ceea29241d002b3c4b155d7b19a34a34f3ccbf72c92a7928f597fdf03d0b26df6dd
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-plugin-osmocom-spectrum-sense"
7
- spec.version = "0.0.2"
7
+ spec.version = "0.0.3"
8
8
  spec.authors = ["enukane"]
9
9
  spec.email = ["enukane@glenda9.org"]
10
10
 
@@ -87,11 +87,11 @@ module Fluent
87
87
  match = line.match(REG)
88
88
  next unless match
89
89
  obj = {
90
- :time => Time.parse(match[:time]),
91
- :center_freq => match[:center_freq].to_f,
92
- :freq => match[:freq].to_f,
93
- :power_db => match[:power_db].to_f,
94
- :noise_floor_db => match[:noise_floor_db].to_f,
90
+ "updated_at" => Time.parse(match[:time]),
91
+ "center_freq" => match[:center_freq].to_f,
92
+ "freq" => match[:freq].to_f,
93
+ "power_db" => match[:power_db].to_f,
94
+ "noise_floor_db" => match[:noise_floor_db].to_f,
95
95
  }
96
96
  log.debug "new osmocom_spectrum_sense input => #{obj}"
97
97
  collected << obj
@@ -102,8 +102,10 @@ module Fluent
102
102
  end
103
103
 
104
104
  collected.each do |obj|
105
- time = obj[:time].nil? ? Engine.now : Fluent::EventTime.from_time(obj[:time])
106
- obj.delete(:time) # including time could problem in some output plugin
105
+ time = obj["updated_at"].nil? ? Engine.now : Fluent::EventTime.from_time(obj["updated_at"])
106
+ if obj["updated_at"].is_a?(Time)
107
+ obj["updated_at"] = obj["updated_at"].strftime("%Y-%m-%d %H:%M:%S.%6N")
108
+ end
107
109
  router.emit(@tag, time, obj)
108
110
  end
109
111
  rescue => e
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-osmocom-spectrum-sense
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - enukane
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-13 00:00:00.000000000 Z
11
+ date: 2016-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler