Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Fix obsolete digitalocean.rake file breaking rake tasks (mastodon#15618)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored Feb 11, 2021
1 parent be3b9f8 commit 6feaad3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
require_relative '../lib/chewy/strategy/custom_sidekiq'
require_relative '../lib/webpacker/manifest_extensions'
require_relative '../lib/webpacker/helper_extensions'
require_relative '../lib/rails/engine_extensions'

Dotenv::Railtie.load

Expand Down
11 changes: 11 additions & 0 deletions lib/rails/engine_extensions.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module Rails
module EngineExtensions
# Rewrite task loading code to filter digitalocean.rake task
def run_tasks_blocks(app)
Railtie.instance_method(:run_tasks_blocks).bind(self).call(app)
paths["lib/tasks"].existent.reject { |ext| ext.end_with?('digitalocean.rake') }.sort.each { |ext| load(ext) }
end
end
end

Rails::Engine.prepend(Rails::EngineExtensions)

0 comments on commit 6feaad3

Please sign in to comment.