simple-sql 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 435908aca401185b06131575ae1b5c85570c6fe4
4
- data.tar.gz: d238e14b1d859326b0ed4d7e9799d3717d31a821
3
+ metadata.gz: b2efe4d2f3574002cd742ec35b92008be1759d00
4
+ data.tar.gz: 6d91555bba894180b6f0204be9cff494d5a75747
5
5
  SHA512:
6
- metadata.gz: f8a497b87236bb8f0cfe1f6e1db9577bbd6364e8826b41097adec7b235cddbff4cac3cd6535a832f8b6d75e452ea21af6ae64ece5f8f9e826d48adbd59087213
7
- data.tar.gz: 98d60e38cfd0b60128da263bc8372428028e4ce31fb009e324498de16024802bc65a35e9676f863e379154c76fb56066b4a1f43a6561bd629c1fce6d33b41c3b
6
+ metadata.gz: 8c0f34107ae8c103bbfdef1ec6ad5f1c79e66de50c47880e7a0693c18cd6c1ad6f2e4b1800620f65566d82b488dd95fec8d40e604bf9bc2a8bf42051a30e165c
7
+ data.tar.gz: 7e85012e105fd64d0b322c6ec99e020c57ec54b3bc5b7f3d625b8cb69eb7cb056b5da9abdd847bd07893b8183a6e8eb3f52af74f23532fd3db3fd23c7cd75d8d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple-sql (0.2.2)
4
+ simple-sql (0.2.3)
5
5
  pg (~> 0.20)
6
6
  pg_array_parser (~> 0)
7
7
 
@@ -9,6 +9,12 @@ module Simple::SQL::Decoder
9
9
  end
10
10
  end
11
11
 
12
+ def parse_timestamp(s)
13
+ r = ::Time.parse(s)
14
+ return r if r.utc_offset == 0
15
+ Time.gm(r.year, r.mon, r.day, r.hour, r.min, r.sec)
16
+ end
17
+
12
18
  # rubocop:disable Metrics/AbcSize
13
19
  # rubocop:disable Metrics/CyclomaticComplexity
14
20
  # rubocop:disable Metrics/MethodLength
@@ -22,7 +28,7 @@ module Simple::SQL::Decoder
22
28
  when :'integer[]' then s.scan(/-?\d+/).map { |part| Integer(part) }
23
29
  when :"character varying[]" then parse_pg_array(s)
24
30
  when :"text[]" then parse_pg_array(s)
25
- when :"timestamp without time zone" then ::Time.parse(s)
31
+ when :"timestamp without time zone" then parse_timestamp(s)
26
32
  when :hstore then HStore.parse(s)
27
33
  when :json then ::JSON.parse(s)
28
34
  when :jsonb then ::JSON.parse(s)
@@ -1,5 +1,5 @@
1
1
  module Simple
2
2
  module SQL
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-sql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - radiospiel
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-01-20 00:00:00.000000000 Z
12
+ date: 2018-01-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pg_array_parser