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 +4 -4
- data/lib/tomlrb/generated_parser.rb +1 -1
- data/lib/tomlrb/scanner.rb +7 -2
- data/lib/tomlrb/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 162de174d672427a5a73f88ce13c95b0038e4da1
|
4
|
+
data.tar.gz: ae5c994fc424ac1543ebf94a28bd215f121de9c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe429636b6f777ab74c08de38abddac63422ec445c65e869eaf0951c68a8fb9cffc601594a2973017baf98b344ae05164b021e14f930a34b5b8acc7b38483786
|
7
|
+
data.tar.gz: 367290bfbe0da65662b3f2743f06242721dae2f46d01f840b99a9285e77ee050bb80ab67e0327624659566036aed00ff5b53deb9e3612ae08e9634266ee6879c
|
data/lib/tomlrb/scanner.rb
CHANGED
@@ -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})
|
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
|
-
|
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
|
data/lib/tomlrb/version.rb
CHANGED
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.
|
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-
|
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:
|