Skip to content
This repository
Browse code

added missing isolate files

  • Loading branch information...
commit e74620ff790f7cb04a2a3e272cc76146145f7cdc 1 parent 0ae14fe
authored October 16, 2011
1  doc/guide/source/ASTs.textile
Source Rendered
... ...
@@ -0,0 +1 @@
  1
+fox
4  doc/guide/source/Lexers.textile
Source Rendered
... ...
@@ -1,12 +1,10 @@
1  
-h1. Overview
2  
-
3 1
 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›.
4 2
 
5 3
 For a general overview of lexers, check out:
6 4
 * "Lexical Analysis (from Wikipedia)":http://en.wikipedia.org/wiki/Lexical_analysis
7 5
 * "ANTLRv3 Documentation":http://www.antlr.org/wiki/display/ANTLR3/ANTLR+v3+documentation
8 6
 
9  
-h2. How Lexers Differ from Parsers
  7
+h1. How Lexers Differ from Parsers
10 8
 
11 9
 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. 
12 10
 
BIN  java/antlr-full-3.2.1.jar
Binary file not shown
18  vendor/isolate.rb
@@ -8,7 +8,7 @@ module Isolate
8 8
 
9 9
   # Duh.
10 10
 
11  
-  VERSION = "3.1.0.pre.3"
  11
+  VERSION = "3.2.0"
12 12
 
13 13
   # Disable Isolate. If a block is provided, isolation will be
14 14
   # disabled for the scope of the block.
@@ -19,7 +19,7 @@ def self.disable &block
19 19
 
20 20
   # What environment should be isolated? Consults environment
21 21
   # variables <tt>ISOLATE_ENV</tt>, <tt>RAILS_ENV</tt>, and
22  
-  # <tt>RACK_ENV</tt>. Defaults to <tt>development"/tt> if none are
  22
+  # <tt>RACK_ENV</tt>. Defaults to <tt>development"</tt> if none are
23 23
   # set.
24 24
 
25 25
   def self.env
@@ -34,6 +34,13 @@ def self.sandbox
34 34
     @@sandbox
35 35
   end
36 36
 
  37
+  # Set the singleton. Intended for Hoe::Isolate and other tools that
  38
+  # make their own.
  39
+
  40
+  def self.sandbox= o
  41
+    @@sandbox = o
  42
+  end
  43
+
37 44
   # Declare an isolated RubyGems environment, installed in +path+. Any
38 45
   # block given will be <tt>instance_eval</tt>ed, see
39 46
   # Isolate::Sandbox#gem and Isolate::Sandbox#environment for the sort
@@ -70,10 +77,11 @@ def self.now! options = {}, &block
70 77
   end
71 78
 
72 79
   # Poke RubyGems, since we've probably monkeyed with a bunch of paths
73  
-  # and suchlike. Deprecated and scheduled for removal in v4.0.0.
  80
+  # and suchlike. Clears paths, loaded specs, and source indexes.
74 81
 
75 82
   def self.refresh # :nodoc:
76  
-    $stderr.puts "Deprecated, removal in v4.0.0. Use Gem.refresh."
77  
-    Gem.refresh
  83
+    Gem.loaded_specs.clear
  84
+    Gem.clear_paths
  85
+    Gem::Specification.reset
78 86
   end
79 87
 end
4  vendor/isolate/completely.rb
... ...
@@ -0,0 +1,4 @@
  1
+require "isolate"
  2
+require "isolate/rake" if defined?(Rake)
  3
+
  4
+Isolate.now! :system => false
15  vendor/isolate/installer.rb
... ...
@@ -0,0 +1,15 @@
  1
+require "rubygems/dependency_installer"
  2
+
  3
+module Isolate
  4
+  class Installer < Gem::DependencyInstaller
  5
+    def initialize sandbox
  6
+      super :development => false,
  7
+        :generate_rdoc   => false,
  8
+        :generate_ri     => false,
  9
+        :install_dir     => sandbox.path
  10
+
  11
+      # reset super's use of sandbox.path exclusively
  12
+      @source_index = Gem.source_index
  13
+    end
  14
+  end
  15
+end

0 notes on commit e74620f

Please sign in to comment.
Something went wrong with that request. Please try again.