Module: RemoteRuby

Defined in:
lib/remote_ruby.rb,
lib/remote_ruby/runner.rb,
lib/remote_ruby/flavour.rb,
lib/remote_ruby/version.rb,
lib/remote_ruby/compiler.rb,
lib/remote_ruby/unmarshaler.rb,
lib/remote_ruby/stream_cacher.rb,
lib/remote_ruby/locals_extractor.rb,
lib/remote_ruby/source_extractor.rb,
lib/remote_ruby/execution_context.rb,
lib/remote_ruby/connection_adapter.rb,
lib/remote_ruby/flavour/rails_flavour.rb,
lib/remote_ruby/connection_adapter/eval_adapter.rb,
lib/remote_ruby/connection_adapter/cache_adapter.rb,
lib/remote_ruby/connection_adapter/caching_adapter.rb,
lib/remote_ruby/connection_adapter/ssh_stdin_adapter.rb,
lib/remote_ruby/connection_adapter/local_stdin_adapter.rb,
lib/remote_ruby/connection_adapter/stdin_process_adapter.rb

Overview

Namespace module for other RemoteRuby classes. Also contains methods, which are included in the global scope

Defined Under Namespace

Classes: CacheAdapter, CachingAdapter, Compiler, ConnectionAdapter, EvalAdapter, ExecutionContext, Flavour, LocalStdinAdapter, LocalsExtractor, RailsFlavour, Runner, SSHStdinAdapter, SourceExtractor, StdinProcessAdapter, StreamCacher, Unmarshaler

Constant Summary collapse

VERSION =
'0.1.3'.freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.lib_path(*params) ⇒ Object


18
19
20
# File 'lib/remote_ruby.rb', line 18

def self.lib_path(*params)
  File.join(root, 'lib', *params)
end

.root(*params) ⇒ Object


13
14
15
16
# File 'lib/remote_ruby.rb', line 13

def self.root(*params)
  root_dir = ::Gem::Specification.find_by_name('remote_ruby').gem_dir
  File.join(root_dir, *params)
end

Instance Method Details

#remotely(args = {}, &block) ⇒ Object


7
8
9
10
11
# File 'lib/remote_ruby.rb', line 7

def remotely(args = {}, &block)
  locals = args.delete(:locals)
  execution_context = ::RemoteRuby::ExecutionContext.new(**args)
  execution_context.execute(locals, &block)
end