diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-12-25 18:20:50 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-12-26 17:18:10 +0800 |
commit | 8139895b4362817cf947431fab9c95ce223b87ae (patch) | |
tree | 3419ad5cdde44bad709024a886c523f57e7b4881 /lib/tasks | |
parent | 29749f92b7f86d45af41509262601e47ee848d92 (diff) | |
download | gitlab-ce-8139895b4362817cf947431fab9c95ce223b87ae.tar.gz |
Use `Gitlab::Utils::Override` over defined?(super)
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/dev.rake | 5 | ||||
-rw-r--r-- | lib/tasks/lint.rake | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/lib/tasks/dev.rake b/lib/tasks/dev.rake index e65609d7001..4beb94eeb8e 100644 --- a/lib/tasks/dev.rake +++ b/lib/tasks/dev.rake @@ -7,4 +7,9 @@ namespace :dev do Rake::Task["gitlab:setup"].invoke Rake::Task["gitlab:shell:setup"].invoke end + + desc "GitLab | Eager load application" + task load: :environment do + Rails.application.eager_load! + end end diff --git a/lib/tasks/lint.rake b/lib/tasks/lint.rake index 7b63e93db0e..3ab406eff2c 100644 --- a/lib/tasks/lint.rake +++ b/lib/tasks/lint.rake @@ -1,5 +1,17 @@ unless Rails.env.production? namespace :lint do + task :static_verification_env do + ENV['STATIC_VERIFICATION'] = 'true' + end + + desc "GitLab | lint | Static verification" + task static_verification: %w[ + lint:static_verification_env + dev:load + ] do + Gitlab::Utils::Override.verify! + end + desc "GitLab | lint | Lint JavaScript files using ESLint" task :javascript do Rake::Task['eslint'].invoke |