josh-vmparty 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tasks/ruby19.rake +10 -7
- metadata +2 -2
data/lib/tasks/ruby19.rake
CHANGED
@@ -2,8 +2,11 @@ desc "Install or update Ruby 1.9"
|
|
2
2
|
task :ruby19 => "ruby19:default"
|
3
3
|
|
4
4
|
namespace :ruby19 do
|
5
|
+
RUBY19_FILE = "ruby-1.9.1-preview2"
|
6
|
+
|
5
7
|
task :default do
|
6
|
-
|
8
|
+
version = `ruby1.9 --version` rescue nil
|
9
|
+
if version =~ /^ruby 1\.9\.1/ && version =~ /2008\-12\-01/ # Preview 2
|
7
10
|
puts "Ruby 1.9 has already been installed"
|
8
11
|
else
|
9
12
|
Rake::Task["ruby19:install"].invoke
|
@@ -13,11 +16,11 @@ namespace :ruby19 do
|
|
13
16
|
|
14
17
|
task :download do
|
15
18
|
chdir "/tmp" do
|
16
|
-
unless exists? "
|
17
|
-
puts "Downloading
|
18
|
-
download_and_unzip "http://ftp.ruby-lang.org/pub/ruby/1.9
|
19
|
+
unless exists? "#{RUBY19_FILE}/"
|
20
|
+
puts "Downloading #{RUBY19_FILE}.tar.gz"
|
21
|
+
download_and_unzip "http://ftp.ruby-lang.org/pub/ruby/1.9/#{RUBY19_FILE}.tar.gz"
|
19
22
|
else
|
20
|
-
puts "
|
23
|
+
puts "#{RUBY19_FILE}.tar.gz has already been downloaded"
|
21
24
|
end
|
22
25
|
end
|
23
26
|
end
|
@@ -49,10 +52,10 @@ namespace :ruby19 do
|
|
49
52
|
end
|
50
53
|
|
51
54
|
task :clean do
|
52
|
-
remove "/tmp/
|
55
|
+
remove "/tmp/#{RUBY19_FILE}/"
|
53
56
|
end
|
54
57
|
|
55
58
|
def open_ruby19_folder(&block)
|
56
|
-
chdir("/tmp/
|
59
|
+
chdir("/tmp/#{RUBY19_FILE}/", &block)
|
57
60
|
end
|
58
61
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: josh-vmparty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Peek
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-12-03 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|