editor_opener 0.1.1 → 0.1.2
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/README.md +21 -1
- data/lib/editor_opener/version.rb +1 -1
- data/lib/generators/editor_opener/templates/initializer.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c8b8e6b943f3a78a43389bf47f24c2bc6b9880ad791e7344035ecc6d0057d84
|
4
|
+
data.tar.gz: 136ce7ea6b21b4b181f69e6a1a32f3ed7427a8963b132194fc5df8367020e23f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3fbaa4c31d6b2a1492caa43f36a1587381b0e4b5377fcb5c57349140cf1c84969fcf7c1153d642a8918f5b3085b4dedb264fd015ccdbf5ef72159c1a759f486
|
7
|
+
data.tar.gz: 1fcdb2135fa17421f3472118575a509f3ab5c7a3c8a033726dcd626e230c4ad25937fb592829d237adb5264705f3b0b210f391ba4ffcb901d118075603830ea8
|
data/README.md
CHANGED
@@ -6,6 +6,7 @@ Open source files in your editor directly from Rails error pages. This gem adds
|
|
6
6
|
|
7
7
|
## Features
|
8
8
|
|
9
|
+
- 🔥 **Works with Rails 7.1+**
|
9
10
|
- 🔗 **Clickable file links** in Rails error pages
|
10
11
|
- 📝 **Multiple editor support** - Works with 13+ popular editors
|
11
12
|
- 🎯 **Precise line targeting** - Opens files at the exact error line
|
@@ -172,7 +173,26 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/igorka
|
|
172
173
|
|
173
174
|
## TODO
|
174
175
|
|
175
|
-
- verify it works with old Rails versions
|
176
|
+
- verify it works with old Rails versions (test with 7.1.0 and it works, for older versions it doesn't work)
|
177
|
+
possible fix:
|
178
|
+
```ruby
|
179
|
+
# in railtie.rb
|
180
|
+
if defined?(ActionDispatch::DebugView::RESCUES_TEMPLATE_PATHS)
|
181
|
+
ActionDispatch::DebugView::RESCUES_TEMPLATE_PATHS.unshift(path)
|
182
|
+
else
|
183
|
+
module X
|
184
|
+
def initialize(assigns)
|
185
|
+
paths = [RESCUES_TEMPLATE_PATH]
|
186
|
+
lookup_context = ActionView::LookupContext.new(paths, path)
|
187
|
+
super(lookup_context, assigns, nil)
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
ActionDispatch::DebugView.prepend(X)
|
192
|
+
```
|
193
|
+
But something is wrong in the views. Maybe we need to support older views, and create a new copy of them?
|
194
|
+
Also, you don't see the full exception, maybe this setting `config.action_dispatch.show_exceptions` can help, or capture exception with begin/rescue and print in the console?
|
195
|
+
|
176
196
|
- more tests
|
177
197
|
- support for more error pages?
|
178
198
|
- support for more editors
|
@@ -5,7 +5,7 @@
|
|
5
5
|
EditorOpener.setup do |config|
|
6
6
|
# Set your preferred editor
|
7
7
|
# You can use any of the supported editors listed below:
|
8
|
-
# config.editor = :cursor
|
8
|
+
# config.editor = ENV["EDITOR"] || :cursor
|
9
9
|
|
10
10
|
# Alternatively, you can set the EDITOR environment variable
|
11
11
|
# export EDITOR=cursor
|
@@ -40,4 +40,4 @@ EditorOpener.setup do |config|
|
|
40
40
|
# config.editor = :rubymine # For RubyMine
|
41
41
|
# config.editor = :cursor # For Cursor
|
42
42
|
# config.editor = :zed # For Zed
|
43
|
-
end
|
43
|
+
end if defined?(EditorOpener)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: editor_opener
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Kasyanchuk
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-07-
|
10
|
+
date: 2025-07-04 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: rails
|