about summary refs log tree commit diff
path: root/lib/rails
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-02-12 10:28:32 +0100
committerClaire <claire.github-309c@sitedethib.com>2021-02-12 10:28:32 +0100
commit5e11f3a6e1de864da8a7e694f18eaa3b5e4c7379 (patch)
treef0dc221cad560933a921fc2b4d85fad065a7601a /lib/rails
parenta30a40c4379b26890b6453083ef213e672658902 (diff)
parent15ced8728ff89932e3f8febf119f63c78ac9a960 (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/javascript/styles/mastodon/modal.scss`:
  For some reason we changed the file loading path in glitch-soc,
  but now upstream has completely changed how the logo is loaded.
  Applied upstream changes.
Diffstat (limited to 'lib/rails')
-rw-r--r--lib/rails/engine_extensions.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/rails/engine_extensions.rb b/lib/rails/engine_extensions.rb
new file mode 100644
index 000000000..4848b15f2
--- /dev/null
+++ b/lib/rails/engine_extensions.rb
@@ -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)