-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert authentication generator to Rails command
Generators require the whole app to be booted, which involves having access to the DB, loading all controlers, etc. which we don't need for just generating the credentials, and might not work when trying to add production credentials because many apps aren't prepared to boot for production in another environment.
- Loading branch information
Showing
3 changed files
with
12 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
namespace :mission_control do | ||
namespace :jobs do | ||
desc "Configure HTTP Basic Authentication" | ||
task "authentication:init" do | ||
Rails::Command.invoke :generate, [ "mission_control:jobs:authentication" ] | ||
task "authentication:configure" => :environment do | ||
MissionControl::Jobs::Authentication.configure | ||
end | ||
end | ||
end |