-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
better messages during qa_server:install; better installation instruc…
…tions in README
- Loading branch information
Showing
5 changed files
with
51 additions
and
13 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,24 +1,31 @@ | ||
require 'rails/generators' | ||
|
||
class QaServer::ConfigGenerator < Rails::Generators::Base | ||
source_root File.expand_path('../templates', __FILE__) | ||
|
||
desc """ | ||
This generator installs the qa_server configuration files into your application for: | ||
* authority configs | ||
* authority scenarios | ||
* i18n | ||
""" | ||
|
||
source_root File.expand_path('../templates', __FILE__) | ||
def banner | ||
say_status('info', 'INSTALLING QA_SERVER CONFIGURATIONS', :blue) | ||
end | ||
|
||
def authority_configs | ||
say_status('info', ' -- adding authority configurations', :blue) | ||
directory "config/authorities/linked_data", recursive: false | ||
end | ||
|
||
def authority_scenarios | ||
say_status('info', ' -- adding authority validations', :blue) | ||
directory "config/authorities/linked_data/scenarios", recursive: false | ||
end | ||
|
||
def inject_i18n | ||
say_status('info', ' -- adding i18n translations', :blue) | ||
copy_file 'config/locales/qa_server.en.yml' | ||
end | ||
end |
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,14 +1,18 @@ | ||
class QaServer::ModelsGenerator < Rails::Generators::Base | ||
source_root File.expand_path('../templates', __FILE__) | ||
desc 'This generator makes the following changes to your application: | ||
1. Copies database migrations' | ||
|
||
desc """ | ||
This generator makes the following changes to your application: | ||
1. Copies database migrations | ||
""" | ||
|
||
def banner | ||
say_status('info', 'GENERATING QA SERVER MODELS', :blue) | ||
say_status('info', 'INSTALLING QA_SERVER MODELS AND MIGRATIONS', :blue) | ||
end | ||
|
||
# Setup the database migrations | ||
def copy_migrations | ||
say_status('info', ' -- installing migrations', :blue) | ||
rake 'qa_server:install:migrations' | ||
end | ||
end |