Class: Lucid::CLI::Plugin

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/lucid/cli/plugin.rb

Instance Method Summary collapse

Instance Method Details

#install(name) ⇒ Object


7
8
9
10
11
12
13
14
15
16
17
# File 'lib/lucid/cli/plugin.rb', line 7

def install(name)
  say_status :plugin_install, "Installing '#{name}' plugin"
  # append_file 'Gemfile', "gem 'lucid-#{name}', path: '../'"
  Bundler.with_clean_env do
    run 'bundle install'
  end
  say_status :plugin_install, 'Running install hooks'
  Bundler.with_clean_env do
    run %Q{bundle exec ruby -e 'require "lucid-mud"; require "lucid/generators/#{name}/install/install_generator"; Lucid::Generators::#{name.classify}::InstallGenerator.start([])'}
  end
end