pik 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +13 -0
- data/Manifest.txt +35 -1
- data/README.rdoc +99 -39
- data/Rakefile +49 -8
- data/bin/pik_install +23 -0
- data/features/add_command.feature +28 -0
- data/features/checkup_command.feature +0 -0
- data/features/config_command.feature +12 -0
- data/features/default_command.feature +12 -0
- data/features/env.rb +52 -0
- data/features/gemsync_command.feature +0 -0
- data/features/help_command.feature +13 -0
- data/features/implode_command.feature +12 -0
- data/features/install_command.feature +13 -0
- data/features/list_command.feature +18 -0
- data/features/remove_command.feature +18 -0
- data/features/run_command.feature +22 -0
- data/features/step_definitions/pik_commands.rb +140 -0
- data/features/switch_command.feature +35 -0
- data/features/tag_command.feature +18 -0
- data/features/version.feature +9 -0
- data/lib/pik.rb +17 -3
- data/lib/pik/commands/add_command.rb +6 -6
- data/lib/pik/commands/batch_file_editor.rb +22 -8
- data/lib/pik/commands/checkup_command.rb +5 -2
- data/lib/pik/commands/command.rb +30 -26
- data/lib/pik/commands/config_command.rb +54 -2
- data/lib/pik/commands/default_command.rb +19 -5
- data/lib/pik/commands/help_command.rb +1 -1
- data/lib/pik/commands/implode_command.rb +12 -1
- data/lib/pik/commands/install_command.rb +182 -0
- data/lib/pik/commands/list_command.rb +3 -2
- data/lib/pik/commands/remove_command.rb +6 -6
- data/lib/pik/commands/run_command.rb +70 -10
- data/lib/pik/commands/switch_command.rb +10 -10
- data/lib/pik/commands/tag_command.rb +56 -0
- data/lib/pik/config_file.rb +26 -2
- data/lib/pik/contrib/progressbar.rb +237 -0
- data/lib/pik/contrib/unzip.rb +14 -0
- data/lib/pik/contrib/uri_ext.rb +296 -0
- data/lib/pik/contrib/zip/ioextras.rb +155 -0
- data/lib/pik/contrib/zip/stdrubyext.rb +111 -0
- data/lib/pik/contrib/zip/tempfile_bugfixed.rb +195 -0
- data/lib/pik/contrib/zip/zip.rb +1846 -0
- data/lib/pik/contrib/zip/zipfilesystem.rb +609 -0
- data/lib/pik/contrib/zip/ziprequire.rb +90 -0
- data/lib/pik/core_ext/pathname.rb +20 -7
- data/lib/pik/search_path.rb +21 -13
- data/lib/pik/which.rb +52 -0
- data/lib/pik/windows_env.rb +64 -25
- data/spec/add_command_spec.rb +0 -2
- data/spec/batch_file_spec.rb +3 -3
- data/spec/command_spec.rb +0 -7
- data/spec/gemsync_command_spec.rb +1 -1
- data/spec/help_command_spec.rb +1 -1
- data/spec/list_command_spec.rb +1 -1
- data/spec/pathname_spec.rb +30 -0
- data/spec/remove_command_spec.rb +6 -6
- data/spec/run_command_spec.rb +2 -30
- data/spec/search_path_spec.rb +9 -0
- data/spec/switch_command_spec.rb +14 -2
- data/spec/which_spec.rb +7 -0
- data/tools/pik.bat +2 -0
- data/tools/pik/pik +45 -0
- data/tools/pik/pik.exe +0 -0
- data/tools/pik/pik.exy +198 -0
- metadata +50 -21
- data/bin/pik +0 -33
data/History.txt
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
=== 0.2.0 / 2009-10-18
|
2
|
+
|
3
|
+
* pik is now an exerb compile executable, and must be installed to a location that is in the system path, but is
|
4
|
+
seperate from ruby
|
5
|
+
* added pik_install command
|
6
|
+
* added support for IronRuby and Jruby
|
7
|
+
* added install command to install new Ruby versions
|
8
|
+
* added tag and tags command
|
9
|
+
* added cucumber functional tests
|
10
|
+
* updated gem post-install message
|
11
|
+
* changed pik run to run in ruby instead of in a batch file.
|
12
|
+
* Added pik ruby and pik gem commands.
|
13
|
+
|
1
14
|
=== 0.1.1 / 2009-09-25
|
2
15
|
|
3
16
|
* add rubyforge info to README
|
data/Manifest.txt
CHANGED
@@ -2,7 +2,23 @@ History.txt
|
|
2
2
|
Manifest.txt
|
3
3
|
README.rdoc
|
4
4
|
Rakefile
|
5
|
-
bin/
|
5
|
+
bin/pik_install
|
6
|
+
features/add_command.feature
|
7
|
+
features/checkup_command.feature
|
8
|
+
features/config_command.feature
|
9
|
+
features/default_command.feature
|
10
|
+
features/env.rb
|
11
|
+
features/gemsync_command.feature
|
12
|
+
features/help_command.feature
|
13
|
+
features/implode_command.feature
|
14
|
+
features/install_command.feature
|
15
|
+
features/list_command.feature
|
16
|
+
features/remove_command.feature
|
17
|
+
features/run_command.feature
|
18
|
+
features/step_definitions/pik_commands.rb
|
19
|
+
features/switch_command.feature
|
20
|
+
features/tag_command.feature
|
21
|
+
features/version.feature
|
6
22
|
lib/pik.rb
|
7
23
|
lib/pik/batch_file.rb
|
8
24
|
lib/pik/checkup.rb
|
@@ -17,15 +33,27 @@ lib/pik/commands/default_command.rb
|
|
17
33
|
lib/pik/commands/gemsync_command.rb
|
18
34
|
lib/pik/commands/help_command.rb
|
19
35
|
lib/pik/commands/implode_command.rb
|
36
|
+
lib/pik/commands/install_command.rb
|
20
37
|
lib/pik/commands/list_command.rb
|
21
38
|
lib/pik/commands/remove_command.rb
|
22
39
|
lib/pik/commands/run_command.rb
|
23
40
|
lib/pik/commands/switch_command.rb
|
41
|
+
lib/pik/commands/tag_command.rb
|
24
42
|
lib/pik/config_file.rb
|
43
|
+
lib/pik/contrib/progressbar.rb
|
44
|
+
lib/pik/contrib/unzip.rb
|
45
|
+
lib/pik/contrib/uri_ext.rb
|
46
|
+
lib/pik/contrib/zip/ioextras.rb
|
47
|
+
lib/pik/contrib/zip/stdrubyext.rb
|
48
|
+
lib/pik/contrib/zip/tempfile_bugfixed.rb
|
49
|
+
lib/pik/contrib/zip/zip.rb
|
50
|
+
lib/pik/contrib/zip/zipfilesystem.rb
|
51
|
+
lib/pik/contrib/zip/ziprequire.rb
|
25
52
|
lib/pik/core_ext/pathname.rb
|
26
53
|
lib/pik/options.rb
|
27
54
|
lib/pik/runner.rb
|
28
55
|
lib/pik/search_path.rb
|
56
|
+
lib/pik/which.rb
|
29
57
|
lib/pik/windows_env.rb
|
30
58
|
spec/add_command_spec.rb
|
31
59
|
spec/batch_file_spec.rb
|
@@ -35,8 +63,14 @@ spec/default_command_spec.rb
|
|
35
63
|
spec/gemsync_command_spec.rb
|
36
64
|
spec/help_command_spec.rb
|
37
65
|
spec/list_command_spec.rb
|
66
|
+
spec/pathname_spec.rb
|
38
67
|
spec/remove_command_spec.rb
|
39
68
|
spec/run_command_spec.rb
|
40
69
|
spec/search_path_spec.rb
|
41
70
|
spec/spec.opts
|
42
71
|
spec/switch_command_spec.rb
|
72
|
+
spec/which_spec.rb
|
73
|
+
tools/pik.bat
|
74
|
+
tools/pik/pik
|
75
|
+
tools/pik/pik.exe
|
76
|
+
tools/pik/pik.exy
|
data/README.rdoc
CHANGED
@@ -16,31 +16,37 @@ Or to put it another way
|
|
16
16
|
You have to tell it where your different ruby versions live using
|
17
17
|
'pik add'. Then you can change to one by using 'pik switch'.
|
18
18
|
|
19
|
-
It also
|
19
|
+
It also supports running commands/code with all versions configured.
|
20
|
+
|
21
|
+
pik run # Runs commands on the command line
|
22
|
+
pik ruby # Runs using the ruby interpreter for each version (ruby.exe, jruby.bat, ir.exe)
|
23
|
+
pik gem # Runs using the gem command for each version (gem.bat, igem.bat)
|
20
24
|
|
21
25
|
|
22
26
|
== FEATURES/PROBLEMS:
|
23
27
|
|
24
|
-
Changes are to the open cmd session only.
|
25
|
-
|
26
|
-
Only works on MRI at present, support for JRuby, and maybe IronRuby are planned.
|
27
28
|
|
28
29
|
== SYNOPSIS:
|
29
30
|
|
30
|
-
|
31
|
+
>pik help commands
|
31
32
|
|
32
33
|
add Adds another ruby location to pik.
|
33
34
|
checkup|cu Checks your environment for current Ruby best practices.
|
34
35
|
config Adds/modifies configuration options.
|
35
|
-
default
|
36
|
+
default Switches back to the default settings.
|
37
|
+
gem Runs the gem command with all versions that pik is aware of.
|
36
38
|
gemsync Duplicates gems from the current version to the one specified.
|
37
39
|
help Displays help information.
|
38
40
|
implode Removes your pik configuration.
|
41
|
+
install|in Downloads and installs different ruby versions.
|
39
42
|
list|ls Lists ruby versions that pik is aware of.
|
40
43
|
remove|rm Removes a ruby location from pik.
|
41
|
-
|
44
|
+
ruby|rb Runs ruby with all versions that pik is aware of.
|
45
|
+
run Runs command with all versions of ruby that pik is aware of.
|
42
46
|
switch|sw|use Switches ruby versions based on patterns.
|
43
|
-
|
47
|
+
tag Adds the given tag to the current version.
|
48
|
+
tags Runs the pik command against the given tags.
|
49
|
+
|
44
50
|
For help on a particular command, use 'pik help COMMAND'.
|
45
51
|
|
46
52
|
== REQUIREMENTS:
|
@@ -49,13 +55,39 @@ Windows, more than one version of Ruby (otherwise, what's the point?) and Rubyge
|
|
49
55
|
|
50
56
|
== INSTALL:
|
51
57
|
|
52
|
-
1.
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
58
|
+
1. If you've used a version previous to this one, you'll need to uninstall them.
|
59
|
+
Don't worry, this will leave your pik config intact.
|
60
|
+
|
61
|
+
pik run "gem uninstall pik"
|
62
|
+
|
63
|
+
2. Install the pik gem
|
64
|
+
|
65
|
+
gem install pik
|
66
|
+
|
67
|
+
3. You need to install pik to a location that's in your path, but someplace other than your ruby\bin dir
|
68
|
+
|
69
|
+
pik_install C:\some\other\path
|
70
|
+
|
71
|
+
4. Add all the versions of ruby that you want to use with pik
|
72
|
+
|
73
|
+
>pik add
|
74
|
+
Adding: 186: ruby 1.8.6 (2009-03-31 patchlevel 368) [i386-mingw32]
|
75
|
+
Located at: c:/ruby/186-p368-mingw32/bin
|
76
|
+
|
77
|
+
>pik add C:\ruby\IronRuby-091\bin
|
78
|
+
Adding: 091: IronRuby 0.9.1.0 on .NET 2.0.0.0
|
79
|
+
Located at: C:/ruby/IronRuby-091/bin
|
80
|
+
|
81
|
+
>pik add C:\ruby\jruby-1.4.0RC1\bin
|
82
|
+
Adding: 140: jruby 1.4.0RC1 (ruby 1.8.7 patchlevel 174) (2009-09-30 80c263b) (Java HotSpot(TM) Client VM 1.6.0_14) [x86-java]
|
83
|
+
Located at: C:/ruby/jruby-1.4.0RC1/bin
|
84
|
+
|
85
|
+
Note:
|
86
|
+
|
87
|
+
When using IronRuby, I have found that is necesary to configure the GEM_HOME env. variable to a directory
|
88
|
+
inside of the IronRuby lib:
|
89
|
+
|
90
|
+
pik config gem_home=C:\ruby\ironruby-091\lib\ironruby\gems\1.8
|
59
91
|
|
60
92
|
== EXAMPLES:
|
61
93
|
|
@@ -124,30 +156,58 @@ or
|
|
124
156
|
C:\>pik default
|
125
157
|
== Switching to ruby 1.8.6 (2009-03-31 patchlevel 368) [i386-mingw32] ==
|
126
158
|
|
127
|
-
pik run
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
159
|
+
pik run # there
|
160
|
+
|
161
|
+
>tools\pik gem install runt -v
|
162
|
+
Running with IronRuby 0.9.0.0 on .NET 2.0.0.0
|
163
|
+
igem.bat install runt
|
164
|
+
Successfully installed runt-0.7.0
|
165
|
+
1 gem installed
|
166
|
+
|
167
|
+
Running with IronRuby 0.9.1.0 on .NET 2.0.0.0
|
168
|
+
igem.bat install runt
|
169
|
+
Successfully installed runt-0.7.0
|
170
|
+
1 gem installed
|
171
|
+
|
172
|
+
Running with jruby 1.3.1 (ruby 1.8.6p287) (2009-06-15 2fd6c3d) (Java HotSpot(TM) Client VM 1.6.0_14) [x86-java]
|
173
|
+
gem.bat install runt
|
174
|
+
JRuby limited openssl loaded. gem install jruby-openssl for full support.
|
175
|
+
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
|
176
|
+
Successfully installed runt-0.7.0
|
177
|
+
1 gem installed
|
178
|
+
|
179
|
+
Running with jruby 1.4.0RC1 (ruby 1.8.7 patchlevel 174) (2009-09-30 80c263b) (Java HotSpot(TM) Client VM 1.6.0_14) [x86-java]
|
180
|
+
gem.bat install runt
|
181
|
+
JRuby limited openssl loaded. gem install jruby-openssl for full support.
|
182
|
+
http://jruby.kenai.com/pages/JRuby_Builtin_OpenSSL
|
183
|
+
Successfully installed runt-0.7.0
|
184
|
+
1 gem installed
|
185
|
+
|
186
|
+
Running with ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-mswin32]
|
187
|
+
gem.bat install runt
|
188
|
+
Successfully installed runt-0.7.0
|
189
|
+
1 gem installed
|
190
|
+
|
191
|
+
Running with ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
|
192
|
+
gem.bat install runt
|
193
|
+
"C:\\Documents and Settings\\gthiesfeld/.gem/ruby/1.8/cache/runt-0.7.0.gem"
|
194
|
+
Successfully installed runt-0.7.0
|
195
|
+
1 gem installed
|
196
|
+
|
197
|
+
Running with ruby 1.8.6 (2009-03-31 patchlevel 368) [i386-mingw32]
|
198
|
+
gem.bat install runt
|
199
|
+
Successfully installed runt-0.7.0
|
200
|
+
1 gem installed
|
201
|
+
|
202
|
+
Running with ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mingw32]
|
203
|
+
gem.bat install runt
|
204
|
+
Successfully installed runt-0.7.0
|
205
|
+
1 gem installed
|
206
|
+
|
207
|
+
Running with ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]
|
208
|
+
gem.bat install runt
|
209
|
+
Successfully installed runt-0.7.0
|
210
|
+
1 gem installed
|
151
211
|
|
152
212
|
== LICENSE:
|
153
213
|
|
data/Rakefile
CHANGED
@@ -18,15 +18,20 @@ Hoe.spec('pik') do
|
|
18
18
|
|
19
19
|
----------------------------------------------------------------------------
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
21
|
+
1. If you've used a version previous to this one, you'll need to uninstall them.
|
22
|
+
Don't worry, this will leave your pik config intact.
|
23
|
+
|
24
|
+
pik run "gem uninstall pik"
|
25
|
+
|
26
|
+
2. Install the pik gem
|
27
|
+
|
28
|
+
gem install pik
|
29
|
+
|
30
|
+
3. You need to install pik to a location that's in your path, but someplace other than your ruby\bin dir
|
28
31
|
|
29
|
-
|
32
|
+
pik_install C:\\some\\other\\path
|
33
|
+
|
34
|
+
4. Add all the versions of ruby that you want to use with pik
|
30
35
|
|
31
36
|
----------------------------------------------------------------------------
|
32
37
|
|
@@ -34,4 +39,40 @@ PIM
|
|
34
39
|
|
35
40
|
end
|
36
41
|
|
42
|
+
file 'tools/pik/pik.exy' do
|
43
|
+
Dir.chdir 'tools/pik' do
|
44
|
+
sh('ruby -rexerb/mkexy pik')
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
file 'tools/pik/pik.exe', :needs => 'tools/pik/pik.exy' do
|
49
|
+
Dir.chdir 'tools/pik' do
|
50
|
+
sh('ruby -S exerb pik.exy')
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
task :build, :needs => 'tools/pik/pik.exe'
|
55
|
+
|
56
|
+
task :install, :needs => :build do
|
57
|
+
sh('ruby bin/pik_install C:\\bin')
|
58
|
+
end
|
59
|
+
|
60
|
+
task :clobber_exe do
|
61
|
+
rm_rf 'tools/pik/pik.exe'
|
62
|
+
end
|
63
|
+
|
64
|
+
task :clobber_exy, :needs => :clobber_exe do
|
65
|
+
rm_rf 'tools/pik/pik.exy'
|
66
|
+
end
|
67
|
+
|
68
|
+
task :rebuild, :needs => [:clobber_exy, :build]
|
69
|
+
task :reinstall, :needs => [:clobber_exy, :install]
|
70
|
+
|
71
|
+
require 'cucumber'
|
72
|
+
require 'cucumber/rake/task'
|
73
|
+
|
74
|
+
Cucumber::Rake::Task.new(:features) do |t|
|
75
|
+
t.cucumber_opts = "features --format pretty"
|
76
|
+
end
|
77
|
+
|
37
78
|
# vim: syntax=Ruby
|
data/bin/pik_install
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
include FileUtils
|
6
|
+
|
7
|
+
puts "Thank you for using pik.\n\n"
|
8
|
+
|
9
|
+
install_dir = ARGV.first
|
10
|
+
tools_dir = File.join(File.dirname(__FILE__), '..', 'tools')
|
11
|
+
|
12
|
+
if File.directory?(install_dir)
|
13
|
+
puts "Installing to #{install_dir}\n\n"
|
14
|
+
cp File.join(tools_dir, 'pik.bat'), install_dir ,
|
15
|
+
:verbose => true
|
16
|
+
mkdir_p File.join(install_dir, 'pik'), :verbose => true
|
17
|
+
cp File.join(tools_dir, 'pik', 'pik.exe'),
|
18
|
+
File.join(install_dir, 'pik') ,
|
19
|
+
:verbose => true
|
20
|
+
puts "\npik is installed"
|
21
|
+
else
|
22
|
+
puts "#{install_dir} is not a directory. pik was not installed."
|
23
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
Feature: add command
|
2
|
+
In order to add ruby versions to pik
|
3
|
+
A developer
|
4
|
+
Wants a command line interface
|
5
|
+
So that she can add versions.
|
6
|
+
|
7
|
+
Scenario: initial add version
|
8
|
+
Given I have no .pik directory
|
9
|
+
When I run "pik add"
|
10
|
+
Then I should see "creating"
|
11
|
+
Then I should see "Adding: "
|
12
|
+
And I should see "Located at: "
|
13
|
+
|
14
|
+
Scenario: add a version
|
15
|
+
Given I have an empty config.yml
|
16
|
+
When I run "pik add C:\ruby\186-p368-mingw32\bin"
|
17
|
+
Then I should see "Adding: 186: ruby 1.8.6 (2009-03-31 patchlevel 368) [i386-mingw32]"
|
18
|
+
And I should see "Located at: C:\ruby\186-p368-mingw32\bin"
|
19
|
+
|
20
|
+
Scenario: add a version that has already been added
|
21
|
+
Given I have already added "ruby 1.8.6 (2009-03-31 patchlevel 368) [i386-mingw32]"
|
22
|
+
When I run "pik add C:\ruby\186-p368-mingw32\bin"
|
23
|
+
Then I should see "This version has already been added."
|
24
|
+
And nothing should be added to the config file.
|
25
|
+
|
26
|
+
Scenario: add a nonexistent version
|
27
|
+
When I run "pik add C:\ruby\nonexistent_ruby\bin"
|
28
|
+
Then I should see "Couldn't find a Ruby version at C:\ruby\nonexistent_ruby\bin"
|
File without changes
|
@@ -0,0 +1,12 @@
|
|
1
|
+
Feature: config command
|
2
|
+
In order to use multiple ruby versions effectively.
|
3
|
+
A developer
|
4
|
+
Wants a command line interface
|
5
|
+
That allows her to configure pik's behavior.
|
6
|
+
|
7
|
+
Scenario: config gem_home
|
8
|
+
Given I have already added "ruby 1.8.6 (2009-03-31 patchlevel 368) [i386-mingw32]"
|
9
|
+
And I am currently using it.
|
10
|
+
When I run "pik config gem_home default"
|
11
|
+
Then a gem_home option should be added to the config.
|
12
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
Feature: default command
|
2
|
+
In order to easily get back to the original ruby version
|
3
|
+
A developer
|
4
|
+
Wants a command line interface
|
5
|
+
That allows her to switch back to the system defined version.
|
6
|
+
|
7
|
+
Scenario: switching to the default version
|
8
|
+
# Given my default system version is "ruby 1.8.6 (2009-03-31 patchlevel 368) [i386-mingw32]"
|
9
|
+
And I am currently using "ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]"
|
10
|
+
When I run "pik default -v" and check the path
|
11
|
+
Then I should see "ruby 1.8.6 (2009-03-31 patchlevel 368) [i386-mingw32]"
|
12
|
+
And the path should point to "c:\ruby\186-p368-mingw32\bin"
|
data/features/env.rb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
config=<<CONFIG
|
2
|
+
---
|
3
|
+
"090: IronRuby 0.9.0.0 on .NET 2.0.0.0":
|
4
|
+
:gem_home: !ruby/object:Pathname
|
5
|
+
path: c:\\ruby\\ironruby-0.9.0\\lib\\ironruby\\gems\\1.8
|
6
|
+
:path: !ruby/object:Pathname
|
7
|
+
path: C:/ruby/IronRuby-0.9.0/bin
|
8
|
+
"091: IronRuby 0.9.1.0 on .NET 2.0.0.0":
|
9
|
+
:gem_home: !ruby/object:Pathname
|
10
|
+
path: c:\\temp\\ruby\\ironruby_091\\lib\\ironruby\\gems\\1.8
|
11
|
+
:path: !ruby/object:Pathname
|
12
|
+
path: c:/temp/ruby/ironruby_091/bin
|
13
|
+
"131: jruby 1.3.1 (ruby 1.8.6p287) (2009-06-15 2fd6c3d) (Java HotSpot(TM) Client VM 1.6.0_14) [x86-java]":
|
14
|
+
:path: !ruby/object:Pathname
|
15
|
+
path: C:/ruby/jruby-131/bin
|
16
|
+
"140: jruby 1.4.0RC1 (ruby 1.8.7 patchlevel 174) (2009-09-30 80c263b) (Java HotSpot(TM) Client VM 1.6.0_14) [x86-java]":
|
17
|
+
:path: !ruby/object:Pathname
|
18
|
+
path: c:/temp/ruby/jruby_140RC1/bin
|
19
|
+
"185: ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-mswin32]":
|
20
|
+
:path: !ruby/object:Pathname
|
21
|
+
path: C:/ruby/185-p012-mswin32/bin
|
22
|
+
"186: ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]":
|
23
|
+
:path: !ruby/object:Pathname
|
24
|
+
path: C:/ruby/186-p287-mswin32/bin
|
25
|
+
"186: ruby 1.8.6 (2009-03-31 patchlevel 368) [i386-mingw32]":
|
26
|
+
:path: !ruby/object:Pathname
|
27
|
+
path: c:/ruby/186-p368-mingw32/bin
|
28
|
+
"191: ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mingw32]":
|
29
|
+
:path: !ruby/object:Pathname
|
30
|
+
path: C:/ruby/191-p129-mingw32/bin
|
31
|
+
"191: ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]":
|
32
|
+
:path: !ruby/object:Pathname
|
33
|
+
path: C:/ruby/191-p243-mingw32/bin
|
34
|
+
---
|
35
|
+
:download_dir: !ruby/object:Pathname
|
36
|
+
path: c:\\temp\\.pik\\downloads
|
37
|
+
:install_dir: !ruby/object:Pathname
|
38
|
+
path: c:\\temp\\ruby
|
39
|
+
CONFIG
|
40
|
+
|
41
|
+
REAL_PATH = ENV['PATH']
|
42
|
+
FAKE_PIK_HOME = 'c:/temp/.pik'
|
43
|
+
ENV['HOME'] = "C:\\temp"
|
44
|
+
ENV['JAVA_HOME'] = "C:\\Program Files\\Java\\jre6"
|
45
|
+
|
46
|
+
Before do
|
47
|
+
ENV['PATH'] = REAL_PATH
|
48
|
+
FileUtils.rm_rf FAKE_PIK_HOME
|
49
|
+
FileUtils.mkdir_p FAKE_PIK_HOME
|
50
|
+
File.open(File.join(FAKE_PIK_HOME, 'config.yml'), 'w'){|f| f.puts config }
|
51
|
+
end
|
52
|
+
|