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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dd33f82a367cba9cb53594ef8b6606e265267bf7
4
- data.tar.gz: 369d01c3d4b27d19ea7de004054fc8376f5a5d6b
3
+ metadata.gz: a2ad95a80628174ca5a00206818a6ce40f6b0d19
4
+ data.tar.gz: b62933c705ada611ef264e1eb06bf67f74864d57
5
5
  SHA512:
6
- metadata.gz: 2694b5710bf049e67d199b643a07cf7fb456e8d83ee65c51e99f2ca4ef60a3174f564a732018a599191e728cf9e68d7ee36126828849d5bbc1bc9077d7b0e1a5
7
- data.tar.gz: 0004df17a2b3a31d88ace9af26194c6281acd92da24fa58d707d00b3e83934b759d4b42bb453e4003aaa9df3d12d199fdf9cff1be6ec2ff729cfbdd2e44c6600
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? && args[0].children.length == 0
33
- wrap_arg(args[0], 'params')
34
- elsif args[0].hash_type?
35
- next if looks_like_route_definition?(args[0])
36
- next if has_kwsplat?(args[0])
37
- next if has_key?(args[0], :params)
38
-
39
- write_params_hash(
40
- hash_node: args[0],
41
- original_indent: node.loc.expression.source_line.match(/^(\s*)/)[1]
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?
@@ -1,5 +1,5 @@
1
1
  module Rails5
2
2
  module SpecConverter
3
- VERSION = "1.0.12"
3
+ VERSION = "1.0.13"
4
4
  end
5
5
  end
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.12
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-02 00:00:00.000000000 Z
11
+ date: 2016-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser