rails_trace_viewer 0.1.4 → 0.1.5

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: abac85cedd4d86a997eea9b60f1b449e88ff3799cd13926fa83c143c3d3d1abb
4
- data.tar.gz: 5fc903e2e18a93e94acb048a6b3350c06346840e285119f9e9221d9dc3f76b68
3
+ metadata.gz: ccd4662dd091e0540f859db98c0e6c23ba98e88f5bfe21d52767da706d835c8c
4
+ data.tar.gz: 010bc30ea226863d326de29a8e644ea9c0cf5a35c13c1d3a527f43bd52b4a8bd
5
5
  SHA512:
6
- metadata.gz: 20aa8961b4ce0797d78614075b8cb100f30b28a1a98e9286d839da5ef04c852f7fcc519b97a3228c8ad1bb2642341726048f5a6bae10337f92e0dc23c75d03ed
7
- data.tar.gz: 9769095c141f0bf4024fea8a6e74da56600e4299eaf2b7d98cfb53139e442856e08ae7dad0a26f30f1fadb244b5a57c5e32cf5b5244b2e0b9cef28a8d0723a01
6
+ metadata.gz: 94ffaa94f15c34f6fc31f25e57ee39d935f27203dbf81b613b729688cf97dbf2f20a9336072d75be81355927b23f4ceb10346ee9a635d8bfa70e723707d0e5af
7
+ data.tar.gz: 4d0a55a47f0369b5e5b5674cb61cbe3fa50c503a5945b31273043d58f82995e857be2cacc6576d9d9dfd876fee4036f8f1502900b42918fd281df22ab292cbf3
data/README.md CHANGED
@@ -3,8 +3,8 @@
3
3
  An educational and debugging tool for Ruby on Rails to visualize the request lifecycle in real-time.
4
4
 
5
5
  <div align="center">
6
- <a href="https://youtu.be/duSncwziSwE">
7
- <img src="https://markdown-videos-api.jorgenkh.no/url?url=https%3A%2F%2Fyoutu.be%2FduSncwziSwE" alt="Watch the Demo" style="width:100%; max-width:800px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.15);">
6
+ <a href="https://youtu.be/NfhT-iVbRTs">
7
+ <img src="https://markdown-videos-api.jorgenkh.no/url?url=https%3A%2F%2Fyoutu.be%2FNfhT-iVbRTs" alt="Watch the Demo" style="width:100%; max-width:800px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.15);">
8
8
  </a>
9
9
  </div>
10
10
 
@@ -1,7 +1,9 @@
1
1
  module RailsTraceViewer
2
2
  class RouteResolver
3
3
  def self.resolve(path, method)
4
- recognized = Rails.application.routes.recognize_path(path, method: method.downcase.to_sym)
4
+ http_verb = method.to_s.downcase.to_sym
5
+
6
+ recognized = Rails.application.routes.recognize_path(path, method: http_verb)
5
7
 
6
8
  route = Rails.application.routes.routes.find do |r|
7
9
  r.defaults[:controller] == recognized[:controller] &&
@@ -13,8 +15,12 @@ module RailsTraceViewer
13
15
  verb: method,
14
16
  path: path
15
17
  }
16
- rescue
17
- nil
18
+ rescue StandardError
19
+ {
20
+ name: "(unrecognized)",
21
+ verb: method,
22
+ path: path
23
+ }
18
24
  end
19
25
  end
20
26
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsTraceViewer
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_trace_viewer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aditya-JOSH