josh-vmparty 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. data/lib/tasks/ruby19.rake +10 -7
  2. metadata +2 -2
@@ -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
- if has_system_utility? "ruby1.9"
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? "ruby-1.9.1-preview1/"
17
- puts "Downloading ruby-1.9.1-preview1.tar.gz"
18
- download_and_unzip "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-preview1.tar.gz"
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 "ruby-1.9.1-preview1.tar.gz has already been downloaded"
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/ruby-1.9.1-preview1/"
55
+ remove "/tmp/#{RUBY19_FILE}/"
53
56
  end
54
57
 
55
58
  def open_ruby19_folder(&block)
56
- chdir("/tmp/ruby-1.9.1-preview1/", &block)
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.1
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-11-30 00:00:00 -08:00
12
+ date: 2008-12-03 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15