rails5-spec-converter 1.0.13 → 1.0.14
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9a3ed6b378206c21ca92e7fd621dd2e414cbfbc
|
4
|
+
data.tar.gz: 963503b2f6e547cabb3bf11a147d055e7d04c53a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3fdfd22196475dc10ff315347fb4057903b7ec98fa5a8a906b579abc3c2ffb4b0ebe7c073175ee2e296756a7494f4fa6b29647bf326212fc9255e99c9b4acfe
|
7
|
+
data.tar.gz: f2706c33bd3f869a9030f9296325666b61b0183d5085591991b73c7174687b33110cd85de0dc83a43452c940255af686315b7fc838bbf74743bd267eea9a5231
|
@@ -32,12 +32,13 @@ module Rails5
|
|
32
32
|
if args[0].hash_type?
|
33
33
|
if args[0].children.length == 0
|
34
34
|
wrap_arg(args[0], 'params')
|
35
|
-
elsif has_kwsplat?(args[0])
|
36
|
-
warn_about_ambiguous_params(node) if @options.warn_about_ambiguous_params?
|
37
|
-
next
|
38
35
|
else
|
39
36
|
next if looks_like_route_definition?(args[0])
|
40
37
|
next if has_key?(args[0], :params)
|
38
|
+
if has_kwsplat?(args[0])
|
39
|
+
warn_about_ambiguous_params(node) if @options.warn_about_ambiguous_params?
|
40
|
+
next unless @options.wrap_ambiguous_params?
|
41
|
+
end
|
41
42
|
|
42
43
|
write_params_hash(
|
43
44
|
hash_node: args[0],
|
@@ -137,6 +138,8 @@ module Rails5
|
|
137
138
|
|
138
139
|
def indent_of_first_value_if_multiline(hash_node, original_indent)
|
139
140
|
return nil if hash_node.children.length == 0
|
141
|
+
return nil unless hash_node.children[0].pair_type?
|
142
|
+
|
140
143
|
first_value = hash_node.children[0].children[1]
|
141
144
|
return nil unless first_value.hash_type? || first_value.array_type?
|
142
145
|
value_str_lines = node_to_string(first_value).split("\n")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails5-spec-converter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Travis Grathwell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|