Sha256: ebebe910f3b47e85c9e5c4d7c3b75f2da549b1506e8ad8c284af00e799c4f36e

Contents?: true

Size: 897 Bytes

Versions: 1

Compression:

Stored size: 897 Bytes

Contents

require "bundler/gem_tasks"

module Bundler
  class GemHelper
    def install_gem(built_gem_path = nil, local = false)
      path = File.expand_path(File.dirname(__FILE__))
      path = path.gsub('/', '\/').strip
      `sed -i -e "s/__RB2EXE_GEM_PATH__/#{path}/g" #{Dir.pwd}/bin/rb2exe`
      `ln -s #{Dir.pwd}/bin/rb2exe #{Dir.pwd}/../../../bin/rb2exe`
      `ln -s #{Dir.pwd}/bin/rb2exe /usr/local/bin/`
      # `sudo ln -s #{Dir.pwd}/bin/rb2exe /usr/local/bin/`

      built_gem_path ||= build_gem
      out, _ = sh_with_code("gem install '#{built_gem_path}'#{" --local" if local}")
      raise "Couldn't install gem, run `gem install #{built_gem_path}' for more detailed output" unless out[/Successfully installed/]
      Bundler.ui.confirm "#{name} (#{version}) installed."
    end
  end
end

task :default => :spec do
  `sed -i -e "s/__RB2EXE_GEM_PATH__/HEHEHE/g" #{Dir.pwd}/bin/rb2exe`
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rb2exe-0.1.39 Rakefile