st2csv 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: 850475404375d2bea6fce268c397e05d952d7bde
4
- data.tar.gz: 4fdadda3cdeada2841e718faa03418d6dbf1378f
3
+ metadata.gz: b6ecc6800516d9fbcc548fd19db4db7e4c5ee4c7
4
+ data.tar.gz: 035bd0d164a485f3fc695920d45c13770446cbbb
5
5
  SHA512:
6
- metadata.gz: 6aa71f5d121b18bcdf8aa5eea3219fcd40cde48c24e690f4564ee1eb110f775aac2b6c9263fc984e8d1393f531edb73d611ef76712cca8fd1416d59d6e5cc7ca
7
- data.tar.gz: e9faebd670e2d84daf62413144ac2e18cbf6a7761fc12e2ef9caac32c9267149924e55ffe769ad61b0230721daa130de9429cbc45bafc36e8a609c020dbe104a
6
+ metadata.gz: 3771f09e1e89af8716b4196fea659dc4f94d2962a5b35cc342cc6b35958726d9dc0b2d3622f6c8c86ae3e85fdf81d73fee6d7a23d19027844da3fb77e888a0e6
7
+ data.tar.gz: 772adc3aa3f30711aad7b8b0978ff3c38208ab2b85dbfbcd7c421f746314180e6cb8bb2c635b9e43ea9e9d2a6d339abc3e6eb2b89b47ae721adda02b47fa8c39
@@ -11,10 +11,10 @@ module St2csv
11
11
 
12
12
  def convert
13
13
  csv_string = CSV.generate(options = {force_quotes: true}) do |csv|
14
- csv << ["datetime","loop_id","traffic_count"]
14
+ csv << ["datetime","traffic_loop_id","traffic_count"]
15
15
  JSON.parse(@json_string).each do |hash|
16
16
  csv << [hash["DATETIME"].scan(/(\d{4}-\d{1,2}-\d{1,2}).([\d:]*)/).join(' '),
17
- hash["LOOP_ID"],
17
+ hash["LOOP_ID"].sub('-','00'),
18
18
  hash["TRAFFIC_COUNT"]
19
19
  ]
20
20
  end
@@ -1,3 +1,3 @@
1
1
  module St2csv
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: st2csv
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
  - Arvinder Singh
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-01 00:00:00.000000000 Z
11
+ date: 2016-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler