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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d7652583a50398a131c7f55eb47307dc5aec0a521d3663462e37345afc3e206
4
- data.tar.gz: 2428aeee0b984176fddfd3c1307039be50d38296725990384f8465a18a578d6a
3
+ metadata.gz: 6c8b8e6b943f3a78a43389bf47f24c2bc6b9880ad791e7344035ecc6d0057d84
4
+ data.tar.gz: 136ce7ea6b21b4b181f69e6a1a32f3ed7427a8963b132194fc5df8367020e23f
5
5
  SHA512:
6
- metadata.gz: 59d2f5d010666fe3b600e87fbb044d14850abd6b7a71673ff8672398040e389f90d9c844022f41683fa2fca18303823e346dc478d9a48ad20416589419efe709
7
- data.tar.gz: 29be85c61c83125543cb25c3a2348c6ae94597118e5f3cb97244c0e91ecff11b7d1659df7f125fb4c2d4fb80a42e3a36506b3057b57e994b81c8257266d54f97
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
@@ -1,3 +1,3 @@
1
1
  module EditorOpener
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -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.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-03 00:00:00.000000000 Z
10
+ date: 2025-07-04 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails