Skip to content

Commit

Permalink
Merge pull request #92 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 2.1.0
  • Loading branch information
andyone authored Jun 19, 2020
2 parents 871fdb9 + 485a9db commit 9d0ca70
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
29 changes: 12 additions & 17 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import (
"pkg.re/essentialkaos/ek.v12/progress"
"pkg.re/essentialkaos/ek.v12/req"
"pkg.re/essentialkaos/ek.v12/signal"
"pkg.re/essentialkaos/ek.v12/sliceutil"
"pkg.re/essentialkaos/ek.v12/sortutil"
"pkg.re/essentialkaos/ek.v12/strutil"
"pkg.re/essentialkaos/ek.v12/system"
Expand All @@ -58,7 +57,7 @@ import (
// App info
const (
APP = "RBInstall"
VER = "2.0.0"
VER = "2.1.0"
DESC = "Utility for installing prebuilt Ruby versions to RBEnv"
)

Expand Down Expand Up @@ -435,24 +434,24 @@ func showDetailedInfo(rubyVersion string) {
url := fmt.Sprintf("%s/%s/%s", knf.GetS(STORAGE_URL), info.Path, info.File)
added := timeutil.Format(time.Unix(info.Added, 0), "%Y/%m/%d %H:%M")

fmtc.Printf(" {*}%-12s{!} {s}|{!} %s\n", "Name", info.Name)
fmtc.Printf(" {*}%-12s{!} {s}|{!} %s\n", "URL", url)
fmtc.Printf(" {*}%-12s{!} {s}|{!} %s\n", "Size", fmtutil.PrettySize(info.Size))
fmtc.Printf(" {*}%-12s{!} {s}|{!} %s\n", "Checksum", strutil.Head(info.Hash, 7))
fmtc.Printf(" {*}%-12s{!} {s}|{!} %s\n", "Added", added)
fmtc.Printf(" {*}%-16s{!} {s}|{!} %s\n", "Name", info.Name)
fmtc.Printf(" {*}%-16s{!} {s}|{!} %s\n", "URL", url)
fmtc.Printf(" {*}%-16s{!} {s}|{!} %s\n", "Size", fmtutil.PrettySize(info.Size))
fmtc.Printf(" {*}%-16s{!} {s}|{!} %s\n", "SHA-256 Checksum", info.Hash)
fmtc.Printf(" {*}%-16s{!} {s}|{!} %s\n", "Added", added)

if isVersionInstalled(info.Name) {
installDate, _ := fsutil.GetMTime(getVersionPath(info.Name))
installDateStr := timeutil.Format(installDate, "%Y/%m/%d %H:%M")
fmtc.Printf(" {*}%-12s{!} {s}|{!} Yes {s-}(%s){!}\n", "Installed", installDateStr)
fmtc.Printf(" {*}%-16s{!} {s}|{!} Yes {s-}(%s){!}\n", "Installed", installDateStr)
} else {
fmtc.Printf(" {*}%-12s{!} {s}|{!} No\n", "Installed")
fmtc.Printf(" {*}%-16s{!} {s}|{!} No\n", "Installed")
}

if info.EOL {
fmtc.Printf(" {*}%-12s{!} {s}|{!} {r}Yes{!}\n", "EOL")
fmtc.Printf(" {*}%-16s{!} {s}|{!} {r}Yes{!}\n", "EOL")
} else {
fmtc.Printf(" {*}%-12s{!} {s}|{!} No\n", "EOL")
fmtc.Printf(" {*}%-16s{!} {s}|{!} No\n", "EOL")
}

if len(info.Variations) != 0 {
Expand Down Expand Up @@ -1526,12 +1525,8 @@ func checkRBEnv() {

// checkDependencies check dependencies for given category
func checkDependencies(info *index.VersionInfo, category string) {
rubiesOnJava := []string{index.CATEGORY_JRUBY, index.CATEGORY_TRUFFLE}

if sliceutil.Contains(rubiesOnJava, category) {
if env.Which("java") == "" {
printErrorAndExit("Java is required for this variation of Ruby")
}
if category == index.CATEGORY_JRUBY && env.Which("java") == "" {
printErrorAndExit("Java is required for this variation of Ruby")
}

if strings.HasSuffix(info.Name, "jemalloc") {
Expand Down
5 changes: 4 additions & 1 deletion common/eol.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"2.0": true,
"2.1": true,
"2.2": true,
"2.3": true,
"2.4": true,
"jruby-1.6": true,
"jruby-1.7": true,
"jruby-9.0": true
"jruby-9.0": true,
"jruby-9.1": true
}
7 changes: 5 additions & 2 deletions common/rbinstall.spec
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

Summary: Utility for installing prebuilt Ruby to rbenv
Name: rbinstall
Version: 2.0.0
Version: 2.1.0
Release: 0%{?dist}
Group: Applications/System
License: EKOL
Expand All @@ -56,7 +56,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Requires: rbenv ca-certificates p7zip >= 16

BuildRequires: golang >= 1.13
BuildRequires: golang >= 1.14

Provides: %{name} = %{version}-%{release}

Expand Down Expand Up @@ -143,6 +143,9 @@ rm -rf %{buildroot}
################################################################################

%changelog
* Sat Jun 20 2020 Anton Novojilov <[email protected]> - 2.1.0-0
- [cli] Improved UI

* Wed May 20 2020 Anton Novojilov <[email protected]> - 2.0.0-0
- [cli] Improved UI
- [cli] Removed REE and Rubinius support
Expand Down

0 comments on commit 9d0ca70

Please sign in to comment.