rails5-spec-converter 1.0.21 → 1.0.22

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: 2b243c703f835ef357017c5dd87464e345b44dca
4
- data.tar.gz: a1acb2cea1494ccbcc37e7fcb3988d2924be9b5b
3
+ metadata.gz: 427f7dc30dd3cf4bd47d8fa81cb76dc67af01e16
4
+ data.tar.gz: af054a465c522657dd8b34544bc4a20609f9beb2
5
5
  SHA512:
6
- metadata.gz: 1cbaa53a1fcd05235f7cbd8e940879307e908003fbd8f83c0021fd338fdea0384d0456b743eb89c21fb4b335304beebfd59855ba92a3a2c0f80370fbf8658821
7
- data.tar.gz: b6be580cefc1bd2bd3acea6624463d325285e17ed46f8fb728189199133f66938c059e672533686136ae988ece1aca658802f298e24dce9cc36d35b8f9add2b9
6
+ metadata.gz: 174bf93337cba877b6acb4d80fa5971457be07d1c719c98fe7e7a3b1a357be85fa4610216230031adc1244f91bcba0ae1c02c21b6e27a5e852aade7471eac42f
7
+ data.tar.gz: 24b722ce305474f002a69ebfd87dc494e9766a4559d30bf01b2db11ffc96eb0157a463ad3d0a1f24076430f354bcd1ca1e3da68ee803cc938582d39ff6cd5865
@@ -69,10 +69,13 @@ module Rails5
69
69
  return nil unless params && params.hash_type?
70
70
 
71
71
  params.children.each do |node|
72
- if node.pair_type? && node.children.all?(&:sym_type?)
73
- key, value = node.children.map { |sym| sym.children.first }
74
- return :controller if key == :type && value == :controller
75
- return :request if key == :type && value == :request
72
+ if node.pair_type? && node.children.first.sym_type?
73
+ key_node, value_node = node.children
74
+ next unless key_node.children.first == :type
75
+
76
+ value_str = value_node.children.first.to_s
77
+ return :controller if value_str == 'controller'
78
+ return :request if value_str == 'request'
76
79
  end
77
80
  end
78
81
 
@@ -1,5 +1,5 @@
1
1
  module Rails5
2
2
  module SpecConverter
3
- VERSION = "1.0.21"
3
+ VERSION = "1.0.22"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails5-spec-converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.21
4
+ version: 1.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis Grathwell