Permalink
Browse files

added missing isolate files

  • Loading branch information...
1 parent 0ae14fe commit e74620ff790f7cb04a2a3e272cc76146145f7cdc Kyle Yetter committed Oct 16, 2011
@@ -0,0 +1 @@
+fox
@@ -1,12 +1,10 @@
-h1. Overview
-
A lexer's job is to take a stream of text and chop it up into a sequence of *tokens* -- little strings categorized with type codes like @NUMBER@ or @KEYWORD@. For more information on tokens and their characteristics, read ‹Tokens›.
For a general overview of lexers, check out:
* "Lexical Analysis (from Wikipedia)":http://en.wikipedia.org/wiki/Lexical_analysis
* "ANTLRv3 Documentation":http://www.antlr.org/wiki/display/ANTLR3/ANTLR+v3+documentation
-h2. How Lexers Differ from Parsers
+h1. How Lexers Differ from Parsers
I do not intend to cover many details of lexical analysis in this article. However, highlighting a few of the key differences between lexers and parsers should help clarify the documentation below for users who are new to ANTLR.
View
Binary file not shown.
View
@@ -8,7 +8,7 @@ module Isolate
# Duh.
- VERSION = "3.1.0.pre.3"
+ VERSION = "3.2.0"
# Disable Isolate. If a block is provided, isolation will be
# disabled for the scope of the block.
@@ -19,7 +19,7 @@ def self.disable &block
# What environment should be isolated? Consults environment
# variables <tt>ISOLATE_ENV</tt>, <tt>RAILS_ENV</tt>, and
- # <tt>RACK_ENV</tt>. Defaults to <tt>development"/tt> if none are
+ # <tt>RACK_ENV</tt>. Defaults to <tt>development"</tt> if none are
# set.
def self.env
@@ -34,6 +34,13 @@ def self.sandbox
@@sandbox
end
+ # Set the singleton. Intended for Hoe::Isolate and other tools that
+ # make their own.
+
+ def self.sandbox= o
+ @@sandbox = o
+ end
+
# Declare an isolated RubyGems environment, installed in +path+. Any
# block given will be <tt>instance_eval</tt>ed, see
# Isolate::Sandbox#gem and Isolate::Sandbox#environment for the sort
@@ -70,10 +77,11 @@ def self.now! options = {}, &block
end
# Poke RubyGems, since we've probably monkeyed with a bunch of paths
- # and suchlike. Deprecated and scheduled for removal in v4.0.0.
+ # and suchlike. Clears paths, loaded specs, and source indexes.
def self.refresh # :nodoc:
- $stderr.puts "Deprecated, removal in v4.0.0. Use Gem.refresh."
- Gem.refresh
+ Gem.loaded_specs.clear
+ Gem.clear_paths
+ Gem::Specification.reset
end
end
@@ -0,0 +1,4 @@
+require "isolate"
+require "isolate/rake" if defined?(Rake)
+
+Isolate.now! :system => false
@@ -0,0 +1,15 @@
+require "rubygems/dependency_installer"
+
+module Isolate
+ class Installer < Gem::DependencyInstaller
+ def initialize sandbox
+ super :development => false,
+ :generate_rdoc => false,
+ :generate_ri => false,
+ :install_dir => sandbox.path
+
+ # reset super's use of sandbox.path exclusively
+ @source_index = Gem.source_index
+ end
+ end
+end

0 comments on commit e74620f

Please sign in to comment.