wwtd 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wwtd/ruby.rb +8 -0
- data/lib/wwtd/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d9ae340ebde5c58a6443316f36e1c26752f4614
|
4
|
+
data.tar.gz: 0cb0c16415a6de251e2c836e2063d6bf40ec61ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7574429770ae432b3d82b505cc1f24eae15dccd4e8b8cac6a615ddb87247d369d0472506f3a15bdc07942fa0811481907fcb13807f605bdb24202b56bf6530a
|
7
|
+
data.tar.gz: a9d04375884d559c22ccc37902fe973aaf56e81642eb511708ec58bc9cd6002635fcb0557e16ef3e4531a1957a1c54d8fb7d2cd97c46651375e548404f7852c4
|
data/lib/wwtd/ruby.rb
CHANGED
@@ -6,6 +6,7 @@ module WWTD
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# - rvm: "rvm xxx do"
|
9
|
+
# - chruby: "chruby-exec xxx --"
|
9
10
|
# - others: env hash
|
10
11
|
# - unknown: nil
|
11
12
|
def switch_statement(version, options={})
|
@@ -14,6 +15,9 @@ module WWTD
|
|
14
15
|
if rvm_executable
|
15
16
|
command = "rvm #{version} do "
|
16
17
|
command if cache_command("#{command} ruby -v")
|
18
|
+
elsif chruby_executable
|
19
|
+
command = "chruby-exec #{version} -- "
|
20
|
+
command if cache_command("#{command} ruby -v")
|
17
21
|
elsif options[:rerun]
|
18
22
|
if rbenv_executable
|
19
23
|
# cannot call different ruby from inside ruby, but ok for copy-paste
|
@@ -54,6 +58,10 @@ module WWTD
|
|
54
58
|
cache_command("which rbenv")
|
55
59
|
end
|
56
60
|
|
61
|
+
def chruby_executable
|
62
|
+
cache_command("which chruby-exec")
|
63
|
+
end
|
64
|
+
|
57
65
|
def cache_command(command)
|
58
66
|
cache(command) do
|
59
67
|
if result = capture(command)
|
data/lib/wwtd/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wwtd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: michael@grosser.it
|