Module: Vop

Defined in:
lib/vop.rb,
lib/vop/vop.rb,
lib/vop/version.rb,
lib/vop/search_path.rb,
lib/vop/shell/shell.rb,
lib/vop/util/errors.rb,
lib/vop/objects/chain.rb,
lib/vop/objects/entity.rb,
lib/vop/objects/filter.rb,
lib/vop/objects/plugin.rb,
lib/vop/parts/executor.rb,
lib/vop/objects/command.rb,
lib/vop/objects/request.rb,
lib/vop/util/pluralizer.rb,
lib/vop/objects/entities.rb,
lib/vop/objects/response.rb,
lib/vop/shell/shell_input.rb,
lib/vop/parts/entity_loader.rb,
lib/vop/parts/filter_loader.rb,
lib/vop/parts/plugin_finder.rb,
lib/vop/parts/plugin_loader.rb,
lib/vop/parts/command_loader.rb,
lib/vop/syntax/entity_syntax.rb,
lib/vop/syntax/filter_syntax.rb,
lib/vop/syntax/plugin_syntax.rb,
lib/vop/objects/command_param.rb,
lib/vop/shell/shell_formatter.rb,
lib/vop/syntax/command_syntax.rb,
lib/vop/objects/entity_definition.rb,
lib/vop/objects/thing_with_params.rb,
lib/vop/parts/dependency_resolver.rb,
lib/vop/shell/shell_input_readline.rb,
lib/vop/shell/shell_input_testable.rb

Defined Under Namespace

Modules: CommandSyntax, EntitySyntax, Errors, FilterSyntax, PluginSyntax, Pluralizer Classes: Chain, Command, CommandLoader, CommandParam, DependencyResolver, Entities, Entity, EntityDefinition, EntityLoader, Executor, Filter, FilterLoader, InterruptChain, Plugin, PluginFinder, PluginLoader, Request, Response, Shell, ShellFormatter, ShellInput, ShellInputReadline, TestableShellInput, ThingWithParams, Vop

Constant Summary collapse

VERSION =
"0.3.6"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.boot(options = {}) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/vop.rb', line 20

def self.boot(options = {})
  if ENV["VOP_DEV_MODE"]
    sibling_lib_dir = Pathname.new(File.join(File.dirname(__FILE__), "..", "lib")).realpath
    if File.exists? sibling_lib_dir
      $: << sibling_lib_dir
    end
  end

  if ENV["VOP_ORIGIN"]
    options[:origin] = "#{ENV["VOP_ORIGIN"]}:#{Process.pid}@#{`hostname`.strip}"
  end

  ::Vop.setup(options)
end

.gem_dependenciesObject



5
6
7
8
9
10
# File 'lib/vop/search_path.rb', line 5

def self.gem_dependencies
  @cached_gem_dependencies ||= begin
    vop = ::Vop::Vop.new(no_init: true)
    vop.plugins.flat_map { |p| p.external_dependencies[:gem].map(&:first) }.uniq
  end
end

.setup(options = {}) ⇒ Object



16
17
18
# File 'lib/vop.rb', line 16

def self.setup(options = {})
  ::Vop::Vop.new(options)
end

Instance Method Details

#vop_setup(options = {}) ⇒ Object



35
36
37
# File 'lib/vop.rb', line 35

def vop_setup(options = {})
  ::Vop.boot(options)
end