fixture_fox 0.2.10 → 0.2.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fixture_fox/analyzer.rb +1 -1
- data/lib/fixture_fox/hash_parser.rb +3 -0
- data/lib/fixture_fox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cf37f03383fc19551436b76335937340a395e950afa53cd69a31301eba90617
|
4
|
+
data.tar.gz: 6f111e9b53feada12ceb1bfb97f9cf25ce92c6593e1510be4b1ddb5448de602f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52e931efe15f0338b793833a31b7d1ab8cbd33e7d4b17b793d71e5e0d83e5f32a066bd0756fd28f6eb545460b1544599e7bab1b1a88bf426e432ed04552283f8
|
7
|
+
data.tar.gz: 550060ab0b66239b5d893bf6a5d4383753d84de39863f8f58085adb236da228997393d15946103017809d46be713ea5f3b5393fb6b2b2846eabff7dfc3140380
|
data/lib/fixture_fox/analyzer.rb
CHANGED
@@ -174,7 +174,7 @@ module FixtureFox
|
|
174
174
|
end
|
175
175
|
|
176
176
|
values.each { |value|
|
177
|
-
if value.is_a?(klass) || !f.type.array? &&
|
177
|
+
if value.nil? || value.is_a?(klass) || !f.type.array? &&
|
178
178
|
(klass == Time || klass == Date) &&
|
179
179
|
value.is_a?(String) &&
|
180
180
|
value =~ /^\d\d\d\d-\d\d-\d\d(?: \d\d:\d\d(?::\d\d)?)?$/
|
@@ -11,6 +11,9 @@ private
|
|
11
11
|
def parse
|
12
12
|
@s[@i] == "{" or raise "Missing initial '{' in hash literal: #{@s.inspect}"
|
13
13
|
@i += 1
|
14
|
+
while @i < @s.size && @s[@i] == " " # Skip spaces before first key
|
15
|
+
@i += 1
|
16
|
+
end
|
14
17
|
pairs = []
|
15
18
|
while @i < @s.size && @s[@i] !~ /[,\}]/
|
16
19
|
pairs << extract_key_value
|
data/lib/fixture_fox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fixture_fox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Claus Rasmussen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|