Skip to content

Commit

Permalink
started rake boot:strap
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenhaddox committed Oct 31, 2010
1 parent bb5db2f commit d3fe6ae
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -2,4 +2,4 @@ source "http://rubygems.org"
gem "rack"
gem "sinatra"
gem "haml"
gem "less"
gem "less"
28 changes: 25 additions & 3 deletions README
@@ -1,11 +1,33 @@
h1. RVM::FW Edition
# RVM::FW Edition

RVM::FW is meant to be a simple Sinatra application that you can easily deploy on an intranet server and enable quick and easy access to install multiple ruby versions side-by-side the way RVM does at home.

## Setting up RVM::FW

h2. Random self-notes:
NOTE: This will eventually work, right now we are still working on the boot:strap rake task. If you want to help feel free to pitch in by looking at the [related issue](http://github.com/stevenhaddox/rvm_fw/issues).
Once you have RVM::FW downloaded locally you need to download the rubies that you want to serve (probably before you deploy if you're behind a firewall). In order to do this simply run:

h3. RVM install workflow
$ rake boot:strap

NOTE: This will eventually become [dynamic](), but in the interim you need to modify the views/db.txt file to hardcode your final deployed URL instead of 'rvm-fw.local'.

## Deploy

The application comes pre-configured to work with Phusion Passenger easily. Overall it's just a simple Sinatra application so feel free to customize as needed and push it all to your server (just make sure the ruby installs are included in your deploy).

## Configuring RVM to work with RVM::FW

Just visit: http://[your-server]/db to get a plain-text file that your users need to copy and paste into: ~/.rvm/config/user. This file overrides the defaults built into RVM's ~/.rvm/config/db and will point it to your RVM::FW instance to download it's rubies.

# I could benefit from RVM::FW - How do I help?

Fork away and start hacking on any of our [open issues](http://github.com/stevenhaddox/rvm_fw/issues).



## Random miscellaneous self-notes:

### RVM install workflow

- Downloads into .rvm/archives
- Extracts downloads into .rvm/src
2 changes: 2 additions & 0 deletions Rakefile
@@ -0,0 +1,2 @@
# import all .rake files under lib/tasks
Dir.glob('lib/tasks/*.rake').each { |r| import r }
14 changes: 7 additions & 7 deletions config/rubies.yml
@@ -1,14 +1,14 @@
---
ruby-1.9.2-p0.tar.gz:
:md5:
:md5: 755aba44607c580fddc25e7c89260460
:path_prefix: ruby-lang/1.9/
:url: ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.gz
ruby-1.9.1-p378.tar.gz:
:md5: 9fc5941bda150ac0a33b299e1e53654c
:path_prefix: ruby-lang/1.9/
:url: ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p378.tar.gz
ruby-1.8.7-p302.tar.gz:
:md5:
:md5: a6a9e37079ed8cf8726b455dad3de939
:path_prefix: ruby-lang/1.8/
:url: ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p302.tar.gz
ruby-1.8.6-p399.tar.gz:
Expand All @@ -28,22 +28,22 @@ rubygems-1.3.6.tgz:
:path_prefix: rubygems/
:url: http://rubyforge.org/frs/download.php/69365/rubygems-1.3.6.tgz
rubygems-1.3.5.tgz:
:md5:
:md5: 6e317335898e73beab15623cdd5f8cff
:path_prefix: rubygems/
:url: http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
jruby-bin-1.5.3.tar.gz:
:md5:
:md5: ccb0b2dbc300d8dd4ad1bd4da48b8320
:path_prefix: jruby/1.5.3/
:url: http://jruby.org.s3.amazonaws.com/downloads/1.5.3/jruby-bin-1.5.3.tar.gz
rubinius-1.1.0-2010923.tar.gz:
:md5:
:md5: e2ae16238b201de09975abe19da09ea9
:path_prefix: rubinius/
:url: http://asset.rubini.us/rubinius-1.1.0-20100923.tar.gz
ruby-enterprise-1.8.7-2010.02.tar.gz:
:md5:
:md5: 4df7b09c01adfd711b0ab76837611542
:path_prefix: ree/
:url: http://rubyforge.org/frs/download.php/71096/ruby-enterprise-1.8.7-2010.02.tar.gz
MacRuby 0.7.1.zip:
:md5:
:md5: e8245dcd03c0757dfae7e6fee913947a
:path_prefix: macruby/
:url: http://www.macruby.org/files/MacRuby%200.7.1.zip
27 changes: 16 additions & 11 deletions lib/tasks/bootstrap.rake
@@ -1,15 +1,20 @@
require 'yaml'

namespace :boot do
task :strap do
@rubies =
puts "i like boots!"
@rubies = YAML::load_file('config/rubies.yml')
@rubies.each do |ruby, params|
puts "---"
puts "Starting #{ruby}"

#create path from params[:path_prefix]
puts "Creating directory public/rubies/#{params[:path_prefix]}"
FileUtils.mkdir_p "public/rubies/#{params[:path_prefix]}"

#download each ruby from params[:url]
puts "Downloading #{ruby}..."
# wget #{params[:url]} public/rubies/#{params[:path_prefix]}
puts "Completed download"
end
end
end

# yaml_obj = YAML::dump( test_obj )
# # -> ---
# - dogs
# - cats
# - badgers
# ruby_obj = YAML::load( yaml_obj )
# # => ["dogs", "cats", "badgers"]
#

0 comments on commit d3fe6ae

Please sign in to comment.