Skip to content

Commit

Permalink
Remove require that is no longer required in Rails 8 to patch IRB how…
Browse files Browse the repository at this point in the history
… we like

It resulted in deprecation warning:

```
DEPRECATION WARNING: `rails/console/methods` has been deprecated and will be removed in Rails 8.1.
Please directly use IRB's extension API to add new commands or helpers to the console.
For more details, please visit: https://github.com/ruby/irb/blob/master/EXTEND_IRB.md
```

But we didn't need the require at all in Rails 8 to patch what we wanted to patch -- not sure if extension API would let us or be appropriate to patch what we want, but this seems to be working.
  • Loading branch information
jrochkind committed Dec 12, 2024
1 parent 299c3b8 commit d95e9e5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions config/initializers/patch_irb_console.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
require "rails/console/methods"
require "rails/commands/console/irb_console"

require "rails/commands/console/irb_console"

# Over-ride rails method that puts the env in console prompt,
# so console prompt in staging says 'staging'.
Expand All @@ -9,7 +7,6 @@
# show up differently in console, so prompt can serve it's cautionary function to
# distinguish production


module OverrideIrbConsoleColorizedEnv
def colorized_env
if ScihistDigicoll::Env.staging?
Expand Down

0 comments on commit d95e9e5

Please sign in to comment.