Skip to content

Commit

Permalink
Merge pull request #1122 from internetee/do-not-load-the-whole-env-fo…
Browse files Browse the repository at this point in the history
…r-rake-tasks

Do not load the whole environment for rake tasks
  • Loading branch information
vohmar authored Apr 4, 2019
2 parents 65a1ea1 + 030a036 commit f748dd4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 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.

require File.expand_path('../config/environment', __FILE__)
require File.expand_path('../config/application', __FILE__)

Rails.application.load_tasks
2 changes: 1 addition & 1 deletion lib/tasks/bootstrap.rake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
desc 'Bootstraps production-like environment'
task :bootstrap do
task bootstrap: :environment do
AdminUser.create!(
username: 'admin',
email: '[email protected]',
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/domains/release.rake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace :domains do
depending on `release_domains_to_auction` setting
TEXT

task :release do
task release: :environment do
released_domain_count = 0

Domain.release_domains do |domain|
Expand Down

0 comments on commit f748dd4

Please sign in to comment.