Module: Rip::PackageAPI
- Included in:
- Package
- Defined in:
- lib/rip/package_api.rb
Instance Method Summary collapse
-
#cached? ⇒ Boolean
Should this package be cached in rip-packages? Usually so.
-
#dependencies! ⇒ Object
Packages we depend on.
-
#exists? ⇒ Boolean
Does this package’s source exist?.
-
#fetch! ⇒ Object
Grab the package and stick it in our local cache, if it’s not already there.
-
#files! ⇒ Object
A list of installed files.
-
#meta_package? ⇒ Boolean
Does this package simply install other packages? Usually not.
-
#name ⇒ Object
The package’s name.
-
#unpack! ⇒ Object
Unpack the package we want into the cache.
-
#version ⇒ Object
We weren’t given a specific version, so figure out what the latest version is and return it.
Instance Method Details
#cached? ⇒ Boolean
Should this package be cached in rip-packages? Usually so.
88 89 90 |
# File 'lib/rip/package_api.rb', line 88 def cached? true end |
#dependencies! ⇒ Object
Packages we depend on. Usually handled by Package.
98 99 100 |
# File 'lib/rip/package_api.rb', line 98 def dependencies! [] end |
#exists? ⇒ Boolean
Does this package’s source exist?
60 61 62 |
# File 'lib/rip/package_api.rb', line 60 def exists? true end |
#fetch! ⇒ Object
Grab the package and stick it in our local cache, if it’s not already there.
66 67 68 |
# File 'lib/rip/package_api.rb', line 66 def fetch! ui.puts "fetching #{name}..." end |
#files! ⇒ Object
A list of installed files. Usually handled by Package
93 94 95 |
# File 'lib/rip/package_api.rb', line 93 def files! [] end |
#meta_package? ⇒ Boolean
Does this package simply install other packages? Usually not.
82 83 84 |
# File 'lib/rip/package_api.rb', line 82 def false end |
#name ⇒ Object
The package’s name
49 50 51 |
# File 'lib/rip/package_api.rb', line 49 def name source end |
#unpack! ⇒ Object
Unpack the package we want into the cache.
71 72 73 |
# File 'lib/rip/package_api.rb', line 71 def unpack! ui.puts "unpacking #{self}..." end |
#version ⇒ Object
We weren’t given a specific version, so figure out what the latest version is and return it
55 56 57 |
# File 'lib/rip/package_api.rb', line 55 def version "0.0.1" end |