Class: Space::Model::Repo::Bundle
- Inherits:
-
Object
- Object
- Space::Model::Repo::Bundle
- Includes:
- Source
- Defined in:
- lib/space/model/repo/bundle.rb
Instance Attribute Summary collapse
-
#repos ⇒ Object
readonly
Returns the value of attribute repos.
Attributes included from Source
Instance Method Summary collapse
- #clean? ⇒ Boolean
- #deps ⇒ Object
- #info ⇒ Object
-
#initialize(repo, repos) ⇒ Bundle
constructor
A new instance of Bundle.
Methods included from Source
#commands, included, #refresh, #update
Methods included from Events
events, notify, #notify, sources, subscribe, subscriptions
Constructor Details
#initialize(repo, repos) ⇒ Bundle
Returns a new instance of Bundle.
15 16 17 18 19 |
# File 'lib/space/model/repo/bundle.rb', line 15 def initialize(repo, repos) @repo = repo @repos = repos super(repo.path) end |
Instance Attribute Details
#repos ⇒ Object (readonly)
Returns the value of attribute repos.
13 14 15 |
# File 'lib/space/model/repo/bundle.rb', line 13 def repos @repos end |
Instance Method Details
#clean? ⇒ Boolean
21 22 23 |
# File 'lib/space/model/repo/bundle.rb', line 21 def clean? info =~ /dependencies are satisfied/ end |
#deps ⇒ Object
29 30 31 32 33 |
# File 'lib/space/model/repo/bundle.rb', line 29 def deps result(:list).scan(/\* ([\w-]+) \(.* ([\d|\w]+)\)/).map do |name, ref| Dependency.new(repos.find_by_name(name), ref) if repos.names.include?(name) end.compact end |
#info ⇒ Object
25 26 27 |
# File 'lib/space/model/repo/bundle.rb', line 25 def info result(:check).split("\n").first || '' end |