Module: Rip::PackageAPI

Included in:
Package
Defined in:
lib/rip/package_api.rb

Instance Method Summary collapse

Instance Method Details

#cached?Boolean

Should this package be cached in rip-packages? Usually so.

Returns:

  • (Boolean)


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?

Returns:

  • (Boolean)


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.

Returns:

  • (Boolean)


82
83
84
# File 'lib/rip/package_api.rb', line 82

def meta_package?
  false
end

#nameObject

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

#versionObject

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