-
Notifications
You must be signed in to change notification settings - Fork 45
/
ruby.go
35 lines (26 loc) · 878 Bytes
/
ruby.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package ruby
import (
"path"
"github.com/adrg/xdg"
http2 "github.com/wolfi-dev/wolfictl/pkg/http"
)
type Options struct {
// RubyVersion is the version of Ruby to search for within the wolfi
// directory. Used to search for packages importing ruby-${RubyVersion}
RubyVersion string
// RubyUpdateVersion is the version of Ruby to update to
RubyUpdateVersion string
// Path is the path to the wolfi directory or a single package to check
Path string
// Client is the client used to communicate with Github
Client *http2.RLHTTPClient
// NoCache instructs the client to not use cached results
NoCache bool
}
const (
rubyKey = "ruby-"
rubyVersionKey = "required_ruby_version"
gemspecSuffix = ".gemspec"
requiredRubyVersionKey = "required_ruby_version"
)
var rubyCacheDirectory = path.Join(xdg.CacheHome, "wolfictl", "ruby")