Class: VagrantPlugins::GPIICi::Command::InitEnvironment
- Defined in:
- lib/vagrant-gpii-ci/action/init_environment.rb,
lib/vagrant-gpii-ci/command/init.rb
Overview
This action sets up the GPII CI environment
Instance Method Summary collapse
- #call(env) ⇒ Object
- #execute ⇒ Object
-
#initialize(app, env) ⇒ InitEnvironment
constructor
A new instance of InitEnvironment.
Methods inherited from Base
Constructor Details
#initialize(app, env) ⇒ InitEnvironment
Returns a new instance of InitEnvironment.
9 10 11 12 |
# File 'lib/vagrant-gpii-ci/action/init_environment.rb', line 9 def initialize(app, env) @app = app @logger = Log4r::Logger.new("VagrantPlugins::GPIICi::action::init_environment") end |
Instance Method Details
#call(env) ⇒ Object
14 15 16 17 18 |
# File 'lib/vagrant-gpii-ci/action/init_environment.rb', line 14 def call(env) @logger.info('This call does nothing yet') #TODO: Create a .qi.yml file based on a template @app.call(env) end |
#execute ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/vagrant-gpii-ci/command/init.rb', line 9 def execute opts = OptionParser.new do |o| o. = "Usage: vagrant ci test [-h]" end # Parse the options argv = (opts) return if !argv raise Vagrant::Errors::CLIInvalidUsage, help: opts.help.chomp if argv.length > 0 # List the installed plugins action(Action.action_init) # Success, exit status 0 0 end |