Module: Hoe::Isolate

Defined in:
lib/hoe/isolate.rb

Overview

This module is a Hoe plugin. You can set its attributes in your Rakefile’s Hoe spec, like this:

Hoe.plugin :isolate

Hoe.spec "myproj" do
  self.isolate_dir = "tmp/isolated"
end

NOTE! The Isolate plugin is a little bit special: It messes with the plugin ordering to make sure that it comes before everything else.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#isolate_dirObject

Where should Isolate, um, isolate? [default: "tmp/gems"]



23
24
25
# File 'lib/hoe/isolate.rb', line 23

def isolate_dir
  @isolate_dir
end

Instance Method Details

#define_isolate_tasksObject

HACK



31
32
33
34
35
36
37
38
39
# File 'lib/hoe/isolate.rb', line 31

def define_isolate_tasks # HACK
  i = ::Isolate.new self.isolate_dir, :cleanup => true

  (self.extra_deps + self.extra_dev_deps).each do |name, version|
    i.gem name, *Array(version)
  end

  i.activate
end

#initialize_isolateObject

:nodoc:



25
26
27
28
29
# File 'lib/hoe/isolate.rb', line 25

def initialize_isolate # :nodoc:
  # Tee hee! Move ourselves to the front to beat out :test.
  Hoe.plugins.unshift Hoe.plugins.delete(:isolate)
  self.isolate_dir ||= "tmp/gems"
end