tomlrb 1.2.1 → 1.2.2

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: 64117f3a577cfcd9bbc975be47a6a0061612f36a
4
- data.tar.gz: 2886bbb9497c1b73a4f0442469bd574e20a254b9
3
+ metadata.gz: 162de174d672427a5a73f88ce13c95b0038e4da1
4
+ data.tar.gz: ae5c994fc424ac1543ebf94a28bd215f121de9c5
5
5
  SHA512:
6
- metadata.gz: c2e83d516b635303da1344b21241e0bc68ea44475972b38469a3be2fbd41ad277db8c81c85dc683e929f8fc9b823df9146188bbf197a7424477a199855312288
7
- data.tar.gz: b828a8dc43fdebafdd78e8c2c6419d81ce2491da3194da0008c10da9ebdab39e763a7a967c21037db9b6d3c303faf8910d4628d9792e858189d7f5127ade5468
6
+ metadata.gz: fe429636b6f777ab74c08de38abddac63422ec445c65e869eaf0951c68a8fb9cffc601594a2973017baf98b344ae05164b021e14f930a34b5b8acc7b38483786
7
+ data.tar.gz: 367290bfbe0da65662b3f2743f06242721dae2f46d01f840b99a9285e77ee050bb80ab67e0327624659566036aed00ff5b53deb9e3612ae08e9634266ee6879c
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # DO NOT MODIFY!!!!
3
- # This file is automatically generated by Racc 1.4.13
3
+ # This file is automatically generated by Racc 1.4.14
4
4
  # from Racc grammer file "".
5
5
  #
6
6
 
@@ -9,7 +9,7 @@ module Tomlrb
9
9
  STRING_MULTI = /"{3}([\s\S]*?"{3,4})/m
10
10
  STRING_LITERAL = /(['])(?:\\?.)*?\1/
11
11
  STRING_LITERAL_MULTI = /'{3}([\s\S]*?'{3})/m
12
- DATETIME = /(-?\d{4})-(\d{2})-(\d{2})(?:t|\s)(\d{2}):(\d{2}):(\d{2}(?:\.\d+)?)?(z|[-+]\d{2}:\d{2})/i
12
+ DATETIME = /(-?\d{4})-(\d{2})-(\d{2})(?:(?:t|\s)(\d{2}):(\d{2}):(\d{2}(?:\.\d+)?))?(z|[-+]\d{2}:\d{2})?/i
13
13
  FLOAT = /[+-]?(?:[0-9_]+\.[0-9_]*|\.[0-9_]+|\d+(?=[eE]))(?:[eE][+-]?[0-9_]+)?/
14
14
  INTEGER = /[+-]?\d(_?\d)*/
15
15
  TRUE = /true/
@@ -42,7 +42,12 @@ module Tomlrb
42
42
  end
43
43
 
44
44
  def process_datetime
45
- args = [ @ss[1], @ss[2], @ss[3], @ss[4], @ss[5], @ss[6].to_f, @ss[7].gsub('Z', '+00:00') ]
45
+ if @ss[7].nil?
46
+ offset = Time.now.utc_offset
47
+ else
48
+ offset = @ss[7].gsub('Z', '+00:00')
49
+ end
50
+ args = [ @ss[1], @ss[2], @ss[3], @ss[4] || 0, @ss[5] || 0, @ss[6].to_f, offset ]
46
51
  [:DATETIME, args]
47
52
  end
48
53
  end
@@ -1,3 +1,3 @@
1
1
  module Tomlrb
2
- VERSION = "1.2.1"
2
+ VERSION = "1.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tomlrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francois Bernier
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-09 00:00:00.000000000 Z
11
+ date: 2016-06-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A racc based toml parser
14
14
  email:
@@ -61,4 +61,3 @@ signing_key:
61
61
  specification_version: 4
62
62
  summary: A racc based toml parser
63
63
  test_files: []
64
- has_rdoc: