Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add minimal support for bundler/Gemfile in setup

  • Loading branch information...
commit 9114457d487353a0c16e521284ad164835c64b4e 1 parent 9c23f10
@mpapis mpapis authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 lib/shoes/setup.rb
View
13 lib/shoes/setup.rb
@@ -103,6 +103,19 @@ def gem name, version = nil
@steps << [:gem, arg]
end
+ # TODO: add GUI
+ def bundler options = {}
+ bundler_version = options[:version] || Gem::Requirement.default
+ bundler_file = options[:file] || "Gemfile"
+ Gem::Specification.find_by_name( "bundler", bundler_version ).activate
+ rescue Gem::LoadError
+ Gem::DependencyInstaller.new.install("bundler", bundler_version)
+ ensure
+ require 'bundler'
+ require 'bundler/cli'
+ Bundler::CLI.new(:gemfile => bundler_file).install
+ end
+
def source uri
@steps << [:source, uri]
end
Please sign in to comment.
Something went wrong with that request. Please try again.