raindeer 1.0.19 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/router/trie_node.rb +4 -1
- data/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dc2d583e65f44a3e7ee2fc2f432b9db9ec2acbaf8ddb6cd65a52c27afa1001cd
|
|
4
|
+
data.tar.gz: 63a16521b844783bcc53bf40adb4f7ece41c7c75d0ee628f9e9d8fe5e4e05bbd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8194bfc57958f56b010dab6bc80341956c8665da364a46859cca1e85116444a3bb8d53cb203a1c3928445ac1cf2ef60b8f2e32e8ddd20b351ab93a1f87f5b466
|
|
7
|
+
data.tar.gz: f9192d7f85cc4353df5408be39fab125275a9b8f2e1b56abcc2a211e2f2f8fb42cc7a6a34aae21ea4e2fa547bb8db398cddb356853ff005f0b530e3b0b4e5091
|
data/lib/router/trie_node.rb
CHANGED
|
@@ -22,9 +22,12 @@ module Rain
|
|
|
22
22
|
@nodes[key]
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
+
# A param is kept once, though more routes pass through it, like /users/:id and /users/:id/edit, or it'd match twice.
|
|
25
26
|
def upsert_child(key: String)
|
|
27
|
+
return @nodes[key] if @nodes.key?(key)
|
|
28
|
+
|
|
26
29
|
@params << key if key.start_with?(':')
|
|
27
|
-
@nodes[key]
|
|
30
|
+
@nodes[key] = TrieNode.new
|
|
28
31
|
end
|
|
29
32
|
end
|
|
30
33
|
end
|
data/lib/version.rb
CHANGED