pry-rails 0.3.10 → 0.3.11
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41cf7797bc227eb06eb453085ab2b045943d5994a2f619a91c9a5820ca42f561
|
4
|
+
data.tar.gz: 9efdf50c92a2f68ba75c63e48856b21e9372905d64001fa0c07a9c25ccc88924
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4c411a091a7c3841ba74293ce7400fba5aa663388b41c0368e7c78b3cd7f527c1c97107930cfd1918e1b5614cc34d2b83c5af397b055daafd2afab7933c5e7c
|
7
|
+
data.tar.gz: 34e938fb579b8968bf7e9a3fb6265976a3f68a28eae47c8c67d16ebe7904499b8b734bd32c2dd531fe0dac0bff6673fa69136fb4d2dd72ec5135132ac134be21
|
@@ -52,11 +52,11 @@ class PryRails::FindRoute < Pry::ClassCommand
|
|
52
52
|
if all_routes.any?
|
53
53
|
grouped_routes = all_routes.group_by { |route| route.defaults[:controller] }
|
54
54
|
result = grouped_routes.each_with_object("") do |(controller, routes), res|
|
55
|
-
res << "Routes for " +
|
55
|
+
res << "Routes for " + bold(controller.to_s.camelize + "Controller") + "\n"
|
56
56
|
res << "--\n"
|
57
57
|
routes.each do |route|
|
58
58
|
spec = route.path.is_a?(String) ? route.path : route.path.spec
|
59
|
-
res << "#{route.defaults[:action]} #{
|
59
|
+
res << "#{route.defaults[:action]} #{bold(verb_for(route))} #{spec} #{route_helper(route.name)}" + "\n"
|
60
60
|
end
|
61
61
|
res << "\n"
|
62
62
|
end
|
@@ -17,10 +17,14 @@ class PryRails::ShowMiddleware < Pry::ClassCommand
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def process
|
20
|
-
#
|
20
|
+
# Assumes there is only one Rack::Server instance.
|
21
|
+
# TODO: Figure out what replaced Rack::Server so that we can show the
|
22
|
+
# entire middleware stack on recent Rails versions.
|
21
23
|
server = nil
|
22
|
-
|
23
|
-
|
24
|
+
if defined?(Rack::Server)
|
25
|
+
ObjectSpace.each_object(Rack::Server) do |object|
|
26
|
+
server = object
|
27
|
+
end
|
24
28
|
end
|
25
29
|
|
26
30
|
middlewares = []
|
data/lib/pry-rails/version.rb
CHANGED