fluent-plugin-elb-access-log 0.1.1 → 0.1.2

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: 708a7b3cc210ec51adf16b678c510529335d9659
4
- data.tar.gz: 81a788c178174442d67752d883c03afbf6c44605
3
+ metadata.gz: 21a7e6d462160d816a3dfe5da025c6fb1a00694d
4
+ data.tar.gz: cb934a403a9f146836e33579bc6bccbcbd9f0d9e
5
5
  SHA512:
6
- metadata.gz: b39bfbb3267a1472decb677a86e230b03376df6aacc4a6b91ab491f2ebbb13849a9da5e5e8e547ddf62a235a42846461abdf583692dd415469b843c697073eb8
7
- data.tar.gz: f317d442e2ca203561f5cb0037eef80b50e18d2945d68a3d7e9b234eec57c738753d363fb3038664d5769cd9cf5a12e1aee13c236b47106c2c6bef108591738d
6
+ metadata.gz: e42e25afeb0fc1960e924af399d0dae9b76aab989404ebc2f3731f49778761f4dc01cc0e18a20b82d8b39e18c27d586a9b49b4d6acd4085bc27c559307a1e305
7
+ data.tar.gz: 6a75465ed44cdb3d39f65f67d489f2463eddb5252820fdba82800d8ca1362f0bd714b5c5af148830f2df670194882af253df9001ad1e7621f4f8d1192d13e85d
@@ -147,7 +147,7 @@ class Fluent::ElbAccessLogInput < Fluent::Input
147
147
  parse_request!(record)
148
148
 
149
149
  time = Time.parse(record['timestamp'])
150
- router.emit(@tag, time, record)
150
+ router.emit(@tag, time.to_i, record)
151
151
  end
152
152
  end
153
153
 
@@ -1,3 +1,3 @@
1
1
  module FluentPluginElbAccessLog
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
@@ -9,6 +9,8 @@ describe 'Fluent::ElbAccessLogInput#configure' do
9
9
 
10
10
  before do
11
11
  Timecop.freeze(today)
12
+ allow(FileUtils).to receive(:touch)
13
+ allow(File).to receive(:read) { nil }
12
14
  end
13
15
 
14
16
  context 'when default' do
@@ -29,6 +29,7 @@ describe Fluent::ElbAccessLogInput do
29
29
  before do
30
30
  Timecop.freeze(today)
31
31
  allow_any_instance_of(Fluent::ElbAccessLogInput).to receive(:client) { client }
32
+ allow(FileUtils).to receive(:touch)
32
33
  end
33
34
 
34
35
  after do
@@ -93,7 +94,7 @@ describe Fluent::ElbAccessLogInput do
93
94
 
94
95
  let(:expected_emits) do
95
96
  [["elb.access_log",
96
- Time.parse('2015-05-24 19:55:36 UTC'),
97
+ Time.parse('2015-05-24 19:55:36 UTC').to_i,
97
98
  {"timestamp"=>"2015-05-24T19:55:36.000000Z",
98
99
  "elb"=>"hoge",
99
100
  "client_port"=>"14.14.124.20:57673",
@@ -121,7 +122,7 @@ describe Fluent::ElbAccessLogInput do
121
122
  "request.uri.query"=>nil,
122
123
  "request.uri.fragment"=>nil}],
123
124
  ["elb.access_log",
124
- Time.parse('2015-05-24 19:55:36 UTC'),
125
+ Time.parse('2015-05-24 19:55:36 UTC').to_i,
125
126
  {"timestamp"=>"2015-05-24T19:55:36.000000Z",
126
127
  "elb"=>"hoge",
127
128
  "client_port"=>"14.14.124.20:57673",
@@ -149,7 +150,7 @@ describe Fluent::ElbAccessLogInput do
149
150
  "request.uri.query"=>nil,
150
151
  "request.uri.fragment"=>nil}],
151
152
  ["elb.access_log",
152
- Time.parse('2015-05-25 19:55:36 UTC'),
153
+ Time.parse('2015-05-25 19:55:36 UTC').to_i,
153
154
  {"timestamp"=>"2015-05-25T19:55:36.000000Z",
154
155
  "elb"=>"hoge",
155
156
  "client_port"=>"14.14.124.20:57673",
@@ -177,7 +178,7 @@ describe Fluent::ElbAccessLogInput do
177
178
  "request.uri.query"=>nil,
178
179
  "request.uri.fragment"=>nil}],
179
180
  ["elb.access_log",
180
- Time.parse('2015-05-25 19:55:36 UTC'),
181
+ Time.parse('2015-05-25 19:55:36 UTC').to_i,
181
182
  {"timestamp"=>"2015-05-25T19:55:36.000000Z",
182
183
  "elb"=>"hoge",
183
184
  "client_port"=>"14.14.124.20:57673",
@@ -245,7 +246,7 @@ describe Fluent::ElbAccessLogInput do
245
246
 
246
247
  let(:expected_emits) do
247
248
  [["any.tag",
248
- Time.parse('2015-05-24 19:55:36 UTC'),
249
+ Time.parse('2015-05-24 19:55:36 UTC').to_i,
249
250
  {"timestamp"=>"2015-05-24T19:55:36.000000Z",
250
251
  "elb"=>"hoge",
251
252
  "client_port"=>"14.14.124.20:57673",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-elb-access-log
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara