Module: RemoteRuby
- Defined in:
- lib/remote_ruby.rb,
lib/remote_ruby/plugin.rb,
lib/remote_ruby/version.rb,
lib/remote_ruby/compiler.rb,
lib/remote_ruby/extensions.rb,
lib/remote_ruby/tee_writer.rb,
lib/remote_ruby/ssh_adapter.rb,
lib/remote_ruby/rails_plugin.rb,
lib/remote_ruby/remote_error.rb,
lib/remote_ruby/cache_adapter.rb,
lib/remote_ruby/parser_factory.rb,
lib/remote_ruby/remote_context.rb,
lib/remote_ruby/adapter_builder.rb,
lib/remote_ruby/caching_adapter.rb,
lib/remote_ruby/stream_prefixer.rb,
lib/remote_ruby/compat_io_reader.rb,
lib/remote_ruby/compat_io_writer.rb,
lib/remote_ruby/locals_extractor.rb,
lib/remote_ruby/source_extractor.rb,
lib/remote_ruby/tmp_file_adapter.rb,
lib/remote_ruby/execution_context.rb,
lib/remote_ruby/text_mode_adapter.rb,
lib/remote_ruby/text_mode_builder.rb,
lib/remote_ruby/connection_adapter.rb
Overview
Namespace module for other RemoteRuby classes. Also contains methods, which are included in the global scope
Defined Under Namespace
Modules: Extensions, ParserFactory
Classes: AdapterBuilder, CacheAdapter, CachingAdapter, CompatIOReader, CompatIOWriter, Compiler, ConnectionAdapter, ExecutionContext, LocalsExtractor, Plugin, RailsPlugin, RemoteContext, RemoteError, SSHAdapter, SourceExtractor, StreamPrefixer, TeeWriter, TextModeAdapter, TextModeBuilder, TmpFileAdapter
Constant Summary
collapse
- DEFAULT_CONFIG_DIR_NAME =
'.remote_ruby'
- DEFAULT_CACHE_DIR_NAME =
'cache'
- DEFAULT_CODE_DIR_NAME =
'code'
- VERSION =
'1.1.0'
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.cache_dir ⇒ Object
Returns the value of attribute cache_dir.
16
17
18
|
# File 'lib/remote_ruby.rb', line 16
def cache_dir
@cache_dir
end
|
.code_dir ⇒ Object
Returns the value of attribute code_dir.
16
17
18
|
# File 'lib/remote_ruby.rb', line 16
def code_dir
@code_dir
end
|
.ignored_types ⇒ Object
Returns the value of attribute ignored_types.
15
16
17
|
# File 'lib/remote_ruby.rb', line 15
def ignored_types
@ignored_types
end
|
.plugins ⇒ Object
Returns the value of attribute plugins.
15
16
17
|
# File 'lib/remote_ruby.rb', line 15
def plugins
@plugins
end
|
.suppress_parser_warnings ⇒ Object
Returns the value of attribute suppress_parser_warnings.
16
17
18
|
# File 'lib/remote_ruby.rb', line 16
def suppress_parser_warnings
@suppress_parser_warnings
end
|
Class Method Details
.clear_cache ⇒ Object
35
36
37
|
# File 'lib/remote_ruby.rb', line 35
def clear_cache
FileUtils.rm_rf(cache_dir)
end
|
.clear_code ⇒ Object
39
40
41
|
# File 'lib/remote_ruby.rb', line 39
def clear_code
FileUtils.rm_rf(code_dir)
end
|
53
54
55
|
# File 'lib/remote_ruby.rb', line 53
def configure
yield self
end
|
.ensure_cache_dir ⇒ Object
23
24
25
|
# File 'lib/remote_ruby.rb', line 23
def ensure_cache_dir
FileUtils.mkdir_p(cache_dir)
end
|
.ensure_code_dir ⇒ Object
27
28
29
|
# File 'lib/remote_ruby.rb', line 27
def ensure_code_dir
FileUtils.mkdir_p(code_dir)
end
|
.ignore_types(*types) ⇒ Object
48
49
50
51
|
# File 'lib/remote_ruby.rb', line 48
def ignore_types(*types)
@ignored_types ||= []
@ignored_types.concat(types)
end
|
.lib_path(*params) ⇒ Object
31
32
33
|
# File 'lib/remote_ruby.rb', line 31
def lib_path(*params)
File.join(root, 'lib', *params)
end
|
.register_plugin(name, klass) ⇒ Object
43
44
45
46
|
# File 'lib/remote_ruby.rb', line 43
def register_plugin(name, klass)
@plugins ||= {}
@plugins[name] = klass
end
|
.root(*params) ⇒ Object
18
19
20
21
|
# File 'lib/remote_ruby.rb', line 18
def root(*params)
root_dir = ::Gem::Specification.find_by_name('remote_ruby').gem_dir
File.join(root_dir, *params)
end
|