mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 18:26:06 +02:00
Merge pull request #1122 from internetee/do-not-load-the-whole-env-for-rake-tasks
Do not load the whole environment for rake tasks
This commit is contained in:
commit
f748dd48f1
3 changed files with 3 additions and 3 deletions
2
Rakefile
2
Rakefile
|
@ -1,6 +1,6 @@
|
||||||
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
||||||
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
||||||
|
|
||||||
require File.expand_path('../config/environment', __FILE__)
|
require File.expand_path('../config/application', __FILE__)
|
||||||
|
|
||||||
Rails.application.load_tasks
|
Rails.application.load_tasks
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
desc 'Bootstraps production-like environment'
|
desc 'Bootstraps production-like environment'
|
||||||
task :bootstrap do
|
task bootstrap: :environment do
|
||||||
AdminUser.create!(
|
AdminUser.create!(
|
||||||
username: 'admin',
|
username: 'admin',
|
||||||
email: 'admin@domain.tld',
|
email: 'admin@domain.tld',
|
||||||
|
|
|
@ -4,7 +4,7 @@ namespace :domains do
|
||||||
depending on `release_domains_to_auction` setting
|
depending on `release_domains_to_auction` setting
|
||||||
TEXT
|
TEXT
|
||||||
|
|
||||||
task :release do
|
task release: :environment do
|
||||||
released_domain_count = 0
|
released_domain_count = 0
|
||||||
|
|
||||||
Domain.release_domains do |domain|
|
Domain.release_domains do |domain|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue