rails_error_dashboard 0.5.13 → 0.5.14

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: f0771a79dec323d80d0182e82dd4f5e9b9af6374a036baab00aa8b219c49ab38
4
- data.tar.gz: 79facf6902dca535dae648469452b95f9fc093fe79b5f318790542384e6de4a1
3
+ metadata.gz: 3d5f1adc32eb6c1aa41f178cc07a1787a66ce3740e2aa55210e3de90c1cb2c42
4
+ data.tar.gz: 7f899e1133788ab3cc4a65246d995d4fedffdf5d9d357f1089b05d570ab5a77a
5
5
  SHA512:
6
- metadata.gz: d36de8595bd53ad2ec533d6d98fc7ba149b6dc218af477271daaa1f764456a72bdb64ac905090dfcc66749b6abfe833f983579890a7fbdaf254426549a61cc4a
7
- data.tar.gz: 56729d084a67b300f231bb74a4108962a05c02ce73e97638dd9461464f14cc92e3085465e6645d69070e3b47f5281a3e081cd8cd8aa562ac3dfb373260a6b3a4
6
+ metadata.gz: 11f7b9bec8eaa7b6f90025e27291a5d5fff523196dbb8564122d69319c69c162384b3b8d3a5cb9d647ae59b55c2bfb78f5a09f3ecbe900139ac945629e3f4939
7
+ data.tar.gz: f2dc12d460f41480cd879193f12556a4342541ebc0f6b57a494cc5347492289ab7531f6160d1fd0c9306ebebb148219f9f891c8f71e6dcb9321f257e198b9621
data/README.md CHANGED
@@ -527,7 +527,7 @@ Built with [Rails](https://rubyonrails.org/) · UI by [Bootstrap 5](https://getb
527
527
 
528
528
  [![Contributors](https://contrib.rocks/image?repo=AnjanJ/rails_error_dashboard)](https://github.com/AnjanJ/rails_error_dashboard/graphs/contributors)
529
529
 
530
- Special thanks to [@bonniesimon](https://github.com/bonniesimon), [@gundestrup](https://github.com/gundestrup), [@midwire](https://github.com/midwire), [@RafaelTurtle](https://github.com/RafaelTurtle), and [@j4rs](https://github.com/j4rs). See [CONTRIBUTORS.md](CONTRIBUTORS.md) for the full list.
530
+ Special thanks to [@bonniesimon](https://github.com/bonniesimon), [@gundestrup](https://github.com/gundestrup), [@midwire](https://github.com/midwire), [@RafaelTurtle](https://github.com/RafaelTurtle), [@j4rs](https://github.com/j4rs), and [@gmarziou](https://github.com/gmarziou). See [CONTRIBUTORS.md](CONTRIBUTORS.md) for the full list.
531
531
 
532
532
  ---
533
533
 
@@ -66,7 +66,7 @@ module RailsErrorDashboard
66
66
  hostname = @error.respond_to?(:hostname) && @error.hostname.presence
67
67
  return nil unless hostname
68
68
 
69
- scheme = hostname.include?("localhost") ? "http" : "https"
69
+ scheme = local_host?(hostname) ? "http" : "https"
70
70
  "#{scheme}://#{hostname}#{request_url}"
71
71
  end
72
72
 
@@ -75,6 +75,10 @@ module RailsErrorDashboard
75
75
  escaped = str.to_s.gsub("'") { "'\\''" }
76
76
  "'#{escaped}'"
77
77
  end
78
+
79
+ def local_host?(hostname)
80
+ hostname.match?(/\A(localhost|127\.\d+\.\d+\.\d+|::1|0\.0\.0\.0)(:\d+)?\z/)
81
+ end
78
82
  end
79
83
  end
80
84
  end
@@ -1,3 +1,3 @@
1
1
  module RailsErrorDashboard
2
- VERSION = "0.5.13"
2
+ VERSION = "0.5.14"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_error_dashboard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.13
4
+ version: 0.5.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anjan Jagirdar
@@ -496,7 +496,7 @@ metadata:
496
496
  funding_uri: https://github.com/sponsors/AnjanJ
497
497
  post_install_message: |
498
498
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
499
- RED (Rails Error Dashboard) v0.5.13
499
+ RED (Rails Error Dashboard) v0.5.14
500
500
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
501
501
 
502
502
  First install: