rails5-spec-converter 1.0.12 → 1.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails5/spec_converter/text_transformer.rb +15 -11
- data/lib/rails5/spec_converter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2ad95a80628174ca5a00206818a6ce40f6b0d19
|
4
|
+
data.tar.gz: b62933c705ada611ef264e1eb06bf67f74864d57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c9826d565a002ee422600fc89ecf4e76192fd8a1907cadbb9824e5d9735eefe631b1c87defe4c74c28c89ec2bb2c5e0b3d26e63bc56bd45c901e836b26383e4
|
7
|
+
data.tar.gz: e8e15ce5668212d0499c091d4575ca95d56c17597eff66ff677c68a3c50c7fd4b5fdb7bf014416ceaafd272971c38af60643443a478ef589e3987e48005a7a25
|
@@ -29,17 +29,21 @@ module Rails5
|
|
29
29
|
next unless args.length > 0
|
30
30
|
next unless target.nil? && HTTP_VERBS.include?(verb)
|
31
31
|
|
32
|
-
if args[0].hash_type?
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
32
|
+
if args[0].hash_type?
|
33
|
+
if args[0].children.length == 0
|
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
|
+
else
|
39
|
+
next if looks_like_route_definition?(args[0])
|
40
|
+
next if has_key?(args[0], :params)
|
41
|
+
|
42
|
+
write_params_hash(
|
43
|
+
hash_node: args[0],
|
44
|
+
original_indent: node.loc.expression.source_line.match(/^(\s*)/)[1]
|
45
|
+
)
|
46
|
+
end
|
43
47
|
else
|
44
48
|
warn_about_ambiguous_params(node) if @options.warn_about_ambiguous_params?
|
45
49
|
wrap_arg(args[0], 'params') if @options.wrap_ambiguous_params?
|
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.13
|
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-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|