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)


80
81
82
# File 'lib/rip/package_api.rb', line 80

def cached?
  true
end

#dependencies!Object

Packages we depend on. Usually handled by Package.



90
91
92
# File 'lib/rip/package_api.rb', line 90

def dependencies!
  []
end

#exists?Boolean

Does this package’s source exist?

Returns:

  • (Boolean)


52
53
54
# File 'lib/rip/package_api.rb', line 52

def exists?
  true
end

#fetch!Object

Grab the package and stick it in our local cache, if it’s not already there.



58
59
60
# File 'lib/rip/package_api.rb', line 58

def fetch!
  ui.puts "fetching #{name}..."
end

#files!Object

A list of installed files. Usually handled by Package



85
86
87
# File 'lib/rip/package_api.rb', line 85

def files!
  []
end

#meta_package?Boolean

Does this package simply install other packages? Usually not.

Returns:

  • (Boolean)


74
75
76
# File 'lib/rip/package_api.rb', line 74

def meta_package?
  false
end

#nameObject

The package’s name



41
42
43
# File 'lib/rip/package_api.rb', line 41

def name
  source
end

#unpack!Object

Unpack the package we want into the cache.



63
64
65
# File 'lib/rip/package_api.rb', line 63

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



47
48
49
# File 'lib/rip/package_api.rb', line 47

def version
  "0.0.1"
end