rails5-spec-converter 1.0.3 → 1.0.4
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: 828614a89d1694bc81dafc184bbfa9ac32f60719
|
4
|
+
data.tar.gz: dafbae38f00ecc71e583f3415ae28e9f2972e30b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46e9d313500d4615d4f220bae8381c963668332a5d8803a1870d6fb3fdef58ff394c185d89d3a0b6873652e45bba8d29bbc230abff808b189f64ae572b4f21de
|
7
|
+
data.tar.gz: 4eee1870ad1c50952d0d6b443c273817f2470c3ac697d893366c759b6bc6b1477831f545b4a468522960a95e95bf354993bd14f7668c4fa494188f89eb00aebe
|
@@ -45,13 +45,16 @@ module Rails5
|
|
45
45
|
|
46
46
|
def looks_like_route_definition?(hash_node)
|
47
47
|
keys = hash_node.children.map { |pair| pair.children[0].children[0] }
|
48
|
-
|
48
|
+
route_definition_keys = [:to, :controller]
|
49
|
+
return true if route_definition_keys.all? { |k| keys.include?(k) }
|
49
50
|
|
50
51
|
hash_node.children.each do |pair|
|
51
52
|
key = pair.children[0].children[0]
|
52
|
-
value = pair.children[1].children[0]
|
53
53
|
if key == :to
|
54
|
-
|
54
|
+
if pair.children[1].str_type?
|
55
|
+
value = pair.children[1].children[0]
|
56
|
+
return true if value.match(/^\w+#\w+$/)
|
57
|
+
end
|
55
58
|
end
|
56
59
|
end
|
57
60
|
|