fluent-plugin-sakuraio 0.0.4 → 0.0.5

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: 9c40653a7dcc890f6e28e07b89772bd15c6b2af4
4
- data.tar.gz: d6f6288302dc6ddf994904a5b57b03bd8f40eac2
3
+ metadata.gz: 7192fc68701dbba7439d09b9904c8ba1e1dad910
4
+ data.tar.gz: b32997b1e8f3e02e152e5ac020e9237e5bc8d4c7
5
5
  SHA512:
6
- metadata.gz: 59479b2c35f8ad0244965a8551a501bed08327be0806ef9990f2cc13bce504170e5e4fa37ff526eba82d3871bbc97fabb117819dd3490997cc58ae46e632eae8
7
- data.tar.gz: 1c6b551ed7ac8b9f25cc1e57da7839a51187dff5e72abfcd11bcdf7516315ca7de30e8ec52ba830361a604ed91ceeeff5e4227a9e29a3255cb91da44d9f12c35
6
+ metadata.gz: 9258b69bf1c74cb1a10efd7c95328558763da025abce7028ae748b6bf0c23fdd3ee17a0a662299642bf139a0eb7aa8db9534269afd5dc26d4121069054f000ed
7
+ data.tar.gz: addeaf81f1dbb421ad747b5c4c6619fa909527337936ecaa26a5366fef79f1cd6bb2d19ca1926e64bbf59563e3e65a661e3626253403fc2af70c71b98e1bf690
@@ -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-sakuraio'
7
- spec.version = '0.0.4'
7
+ spec.version = '0.0.5'
8
8
  spec.authors = ['Yuya Kusakabe']
9
9
  spec.email = ['yuya.kusakabe@gmail.com']
10
10
 
@@ -15,6 +15,7 @@ module Fluent::Plugin
15
15
  def configure(conf)
16
16
  super
17
17
 
18
+ @time_parser = Fluent::TimeParser.new(nil)
18
19
  end
19
20
 
20
21
  def start
@@ -80,7 +81,7 @@ module Fluent::Plugin
80
81
  'module' => j['module'],
81
82
  'is_online' => j['payload']['is_online']
82
83
  },
83
- 'time' => Time.parse(j['datetime']).to_i
84
+ 'time' => @time_parser.parse(j['datetime'])
84
85
  }
85
86
  records.push(record)
86
87
  records
@@ -97,7 +98,7 @@ module Fluent::Plugin
97
98
  'longitude' => c['longitude'],
98
99
  'range_m' => c['range_m']
99
100
  },
100
- 'time' => Time.parse(j['datetime']).to_i
101
+ 'time' => @time_parser.parse(j['datetime'])
101
102
  }
102
103
  records.push(record)
103
104
  end
@@ -105,7 +106,7 @@ module Fluent::Plugin
105
106
  end
106
107
 
107
108
  def parse_channels(records, j)
108
- message_time = Time.parse(j['datetime']).to_i
109
+ message_time = @time_parser.parse(j['datetime'])
109
110
  tag = j['module']
110
111
  j['payload']['channels'].each do |c|
111
112
  record = {
@@ -116,7 +117,7 @@ module Fluent::Plugin
116
117
  'type' => c['type'],
117
118
  'value' => c['value']
118
119
  },
119
- 'time' => Time.parse(c['datetime']).to_i || message_time
120
+ 'time' => @time_parser.parse(c['datetime']) || message_time
120
121
  }
121
122
  records.push(record)
122
123
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-sakuraio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuya Kusakabe