vertiginous-pik 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +7 -0
- data/README.txt +40 -16
- data/bin/pik +11 -13
- data/lib/pik.rb +1 -1
- data/lib/pik/runner.rb +2 -1
- data/messages/messages.yml +14 -5
- metadata +3 -3
data/History.txt
CHANGED
data/README.txt
CHANGED
@@ -5,12 +5,23 @@ Gordon Thiesfeld
|
|
5
5
|
|
6
6
|
== DESCRIPTION:
|
7
7
|
|
8
|
-
PIK
|
8
|
+
PIK is a tool to switch between multiple versions of ruby on Windows. You have to tell it where
|
9
|
+
your different ruby versions are located using 'pik add'. Then you can change to one by using
|
10
|
+
'pik switch'.
|
11
|
+
|
12
|
+
It also has a "sort of" multiruby functionality in 'pik run'.
|
13
|
+
|
9
14
|
|
10
15
|
== FEATURES/PROBLEMS:
|
11
16
|
|
12
17
|
Currently, changes are to the open cmd session only. I haven't wired up the --global switch yet.
|
13
18
|
|
19
|
+
Specs are very incomplete.
|
20
|
+
|
21
|
+
'pik config' could be dangerous. Use only if you know what you're doing.
|
22
|
+
|
23
|
+
Only works on CRuby at present.
|
24
|
+
|
14
25
|
== SYNOPSIS:
|
15
26
|
|
16
27
|
pik commands are:
|
@@ -19,26 +30,39 @@ Gordon Thiesfeld
|
|
19
30
|
checkup Checks your environment for current Ruby best practices.
|
20
31
|
run Runs command with all version of ruby that pik is aware of.
|
21
32
|
rm Remove a ruby location from pik.
|
33
|
+
switch Switches to a different version.
|
22
34
|
help Diskplays help topics.
|
23
35
|
|
24
36
|
|
25
37
|
For help on a particular command, use 'pik help COMMAND'.
|
26
38
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
Example:
|
40
|
+
|
41
|
+
C:\>pik run "gem in hpricot --no-ri --no-rdoc"
|
42
|
+
== Running with 185: ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-mswin32] ==
|
43
|
+
Successfully installed hpricot-0.8.1-x86-mswin32
|
44
|
+
1 gem installed
|
45
|
+
|
46
|
+
== Running with 186: ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] ==
|
47
|
+
Successfully installed hpricot-0.8.1-x86-mswin32
|
48
|
+
1 gem installed
|
49
|
+
|
50
|
+
== Running with 186: ruby 1.8.6 (2009-03-31 patchlevel 368) [i386-mingw32] ==
|
51
|
+
Building native extensions. This could take a while...
|
52
|
+
Successfully installed hpricot-0.8.1
|
53
|
+
1 gem installed
|
54
|
+
|
55
|
+
== Running with 191: ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mingw32] ==
|
56
|
+
Building native extensions. This could take a while...
|
57
|
+
ERROR: Error installing hpricot:
|
58
|
+
ERROR: Failed to build gem native extension.
|
59
|
+
|
60
|
+
... Errors because I haven't added the devkit ...
|
61
|
+
|
62
|
+
== Running with 191: ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mingw32] ==
|
63
|
+
Building native extensions. This could take a while...
|
64
|
+
Successfully installed hpricot-0.8.1
|
65
|
+
1 gem installed
|
42
66
|
|
43
67
|
== REQUIREMENTS:
|
44
68
|
|
data/bin/pik
CHANGED
@@ -1,22 +1,20 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
# pik 186
|
4
|
-
# pik 186 mingw
|
5
|
-
# pik 191 --system
|
6
|
-
|
7
|
-
|
2
|
+
|
3
|
+
# pik switch 186
|
4
|
+
# pik switch 186 mingw
|
5
|
+
# pik switch 191 --system
|
6
|
+
|
8
7
|
# pik config default=186 mingw
|
9
8
|
# pik config home
|
10
9
|
# pik config rubyopt=(on|off)
|
11
|
-
|
10
|
+
|
12
11
|
# pik checkup
|
13
|
-
|
12
|
+
|
14
13
|
# pik search
|
15
14
|
# pik add (path_to_ruby)
|
16
15
|
# pik help (command)
|
17
|
-
|
18
|
-
|
16
|
+
|
17
|
+
|
19
18
|
require File.join(File.dirname(__FILE__), '..', 'lib', 'pik')
|
20
|
-
|
21
|
-
Pik::Runner.execute
|
22
|
-
|
19
|
+
|
20
|
+
Pik::Runner.execute
|
data/lib/pik.rb
CHANGED
data/lib/pik/runner.rb
CHANGED
@@ -46,7 +46,7 @@ class Pik
|
|
46
46
|
def run(command)
|
47
47
|
current_dir = @config[get_version]
|
48
48
|
@config.sort.each do |version,ruby_dir|
|
49
|
-
@pik_batch.echo "Running with #{version}"
|
49
|
+
@pik_batch.echo " == Running with #{version} == "
|
50
50
|
switch_path_to(ruby_dir)
|
51
51
|
@pik_batch.call command
|
52
52
|
@pik_batch.echo "."
|
@@ -113,6 +113,7 @@ class Pik
|
|
113
113
|
|
114
114
|
def help(arg='help')
|
115
115
|
@hl.say(message[arg])
|
116
|
+
puts
|
116
117
|
end
|
117
118
|
|
118
119
|
def message
|
data/messages/messages.yml
CHANGED
@@ -24,16 +24,24 @@ ls: |-
|
|
24
24
|
rm: |-
|
25
25
|
<%= File.basename($0) %> rm [patern1 pattern2 ... pattern*]
|
26
26
|
|
27
|
-
Removes
|
27
|
+
Removes ruby versions, if you no longer care about them.
|
28
28
|
|
29
29
|
run: |-
|
30
30
|
<%= File.basename($0) %> run "command args"
|
31
31
|
|
32
|
-
|
33
|
-
<%= File.basename($0) %>
|
32
|
+
switch: |-
|
33
|
+
<%= File.basename($0) %> switch [patern1 pattern2 ... pattern*]
|
34
|
+
|
35
|
+
Switches ruby versions based on a pattern.
|
34
36
|
|
35
|
-
|
36
|
-
|
37
|
+
Examples:
|
38
|
+
|
39
|
+
C:\>pik switch 186 mingw
|
40
|
+
Switching to 186: ruby 1.8.6 (2009-03-31 patchlevel 368) [i386-mingw32]
|
41
|
+
|
42
|
+
C:>pik switch 191 p0
|
43
|
+
Switching to 191: ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mingw32]
|
44
|
+
|
37
45
|
|
38
46
|
commands: |-
|
39
47
|
|
@@ -44,6 +52,7 @@ commands: |-
|
|
44
52
|
list|ls Lists ruby versions that <%= File.basename($0) %> is aware of.
|
45
53
|
run Runs command with all version of ruby that <%= File.basename($0) %> is aware of.
|
46
54
|
rm Remove a ruby location from <%= File.basename($0) %>.
|
55
|
+
switch Switches to another ruby location.
|
47
56
|
help Displays help topics.
|
48
57
|
|
49
58
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vertiginous-pik
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gordon Thiesfeld
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.12.2
|
34
34
|
version:
|
35
|
-
description: PIK
|
35
|
+
description: PIK is a tool to switch between multiple versions of ruby on Windows. You have to tell it where your different ruby versions are located using 'pik add'. Then you can change to one by using 'pik switch'. It also has a "sort of" multiruby functionality in 'pik run'.
|
36
36
|
email:
|
37
37
|
- gthiesfeld@gmail.com
|
38
38
|
executables:
|
@@ -86,6 +86,6 @@ rubyforge_project: pik
|
|
86
86
|
rubygems_version: 1.2.0
|
87
87
|
signing_key:
|
88
88
|
specification_version: 3
|
89
|
-
summary: PIK
|
89
|
+
summary: PIK is a tool to switch between multiple versions of ruby on Windows
|
90
90
|
test_files: []
|
91
91
|
|