Module: Ronin::Repos
- Defined in:
- lib/ronin/repos.rb,
lib/ronin/repos/cli.rb,
lib/ronin/repos/root.rb,
lib/ronin/repos/version.rb,
lib/ronin/repos/cache_dir.rb,
lib/ronin/repos/class_dir.rb,
lib/ronin/repos/exceptions.rb,
lib/ronin/repos/repository.rb,
lib/ronin/repos/cli/command.rb,
lib/ronin/repos/cli/commands/new.rb,
lib/ronin/repos/cli/commands/list.rb,
lib/ronin/repos/cli/commands/show.rb,
lib/ronin/repos/cli/commands/purge.rb,
lib/ronin/repos/cli/commands/remove.rb,
lib/ronin/repos/cli/commands/update.rb,
lib/ronin/repos/cli/commands/install.rb,
lib/ronin/repos/cli/commands/completion.rb
Overview
Top-level methods for accessing repositories.
Defined Under Namespace
Modules: ClassDir Classes: CLI, CacheDir, CommandFailed, CommandNotInstalled, Exception, Repository, RepositoryNotFound
Constant Summary collapse
- ROOT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Path to
ronin-repos
root directory. File.(File.join(__dir__,'..','..','..'))
- VERSION =
ronin-repos version
'0.2.0'
Class Method Summary collapse
-
.cache_dir ⇒ CacheDir
private
The global repositories cache directory.
-
.find_file(path) ⇒ String?
Finds the first matching file.
-
.glob(pattern, &block) ⇒ Array<String>
Finds all files in all repos that matches the glob pattern.
-
.list_files(pattern = '{**/}*.*') ⇒ Set<String>
Lists all files across all installed repos.
Class Method Details
.cache_dir ⇒ CacheDir
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method lazy initializes CacheDir when first called.
The global repositories cache directory.
40 41 42 |
# File 'lib/ronin/repos.rb', line 40 def self.cache_dir @cache_dir ||= CacheDir.new end |
.find_file(path) ⇒ String?
Finds the first matching file.
58 59 60 |
# File 'lib/ronin/repos.rb', line 58 def self.find_file(path) cache_dir.find_file(path) end |
.glob(pattern, &block) ⇒ Array<String>
Finds all files in all repos that matches the glob pattern
78 79 80 |
# File 'lib/ronin/repos.rb', line 78 def self.glob(pattern,&block) cache_dir.glob(pattern,&block) end |
.list_files(pattern = '{**/}*.*') ⇒ Set<String>
Lists all files across all installed repos.
91 92 93 |
# File 'lib/ronin/repos.rb', line 91 def self.list_files(pattern='{**/}*.*') cache_dir.list_files(pattern) end |