isolate 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.rdoc +5 -0
 - data/README.rdoc +1 -1
 - data/Rakefile +1 -1
 - data/lib/isolate/sandbox.rb +9 -9
 - data/lib/isolate.rb +7 -2
 - data/test/test_isolate_entry.rb +3 -3
 - metadata +11 -11
 
    
        data/CHANGELOG.rdoc
    CHANGED
    
    
    
        data/README.rdoc
    CHANGED
    
    
    
        data/Rakefile
    CHANGED
    
    | 
         @@ -7,7 +7,7 @@ Hoe.spec "isolate" do 
     | 
|
| 
       7 
7 
     | 
    
         
             
              developer "John Barnette", "code@jbarnette.com"
         
     | 
| 
       8 
8 
     | 
    
         
             
              developer "Ryan Davis",    "ryand-ruby@zenspider.com"
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
     | 
    
         
            -
              require_ruby_version     ">= 1.8. 
     | 
| 
      
 10 
     | 
    
         
            +
              require_ruby_version     ">= 1.8.6"
         
     | 
| 
       11 
11 
     | 
    
         
             
              require_rubygems_version ">= 1.3.6"
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
13 
     | 
    
         
             
              self.extra_rdoc_files = Dir["*.rdoc"]
         
     | 
    
        data/lib/isolate/sandbox.rb
    CHANGED
    
    | 
         @@ -282,18 +282,18 @@ module Isolate 
     | 
|
| 
       282 
282 
     | 
    
         
             
                # easier.
         
     | 
| 
       283 
283 
     | 
    
         | 
| 
       284 
284 
     | 
    
         
             
                def legitimize! deps = entries
         
     | 
| 
       285 
     | 
    
         
            -
                  [] 
     | 
| 
       286 
     | 
    
         
            -
                    deps.flatten.each do |dep|
         
     | 
| 
       287 
     | 
    
         
            -
                      spec = index.find_name(dep.name, dep.requirement).last
         
     | 
| 
      
 285 
     | 
    
         
            +
                  specs = []
         
     | 
| 
       288 
286 
     | 
    
         | 
| 
       289 
     | 
    
         
            -
             
     | 
| 
       290 
     | 
    
         
            -
             
     | 
| 
       291 
     | 
    
         
            -
                        specs << spec
         
     | 
| 
       292 
     | 
    
         
            -
                      end
         
     | 
| 
       293 
     | 
    
         
            -
                    end
         
     | 
| 
      
 287 
     | 
    
         
            +
                  deps.flatten.each do |dep|
         
     | 
| 
      
 288 
     | 
    
         
            +
                    spec = index.find_name(dep.name, dep.requirement).last
         
     | 
| 
       294 
289 
     | 
    
         | 
| 
       295 
     | 
    
         
            -
                     
     | 
| 
      
 290 
     | 
    
         
            +
                    if spec
         
     | 
| 
      
 291 
     | 
    
         
            +
                      specs.concat legitimize!(spec.runtime_dependencies)
         
     | 
| 
      
 292 
     | 
    
         
            +
                      specs << spec
         
     | 
| 
      
 293 
     | 
    
         
            +
                    end
         
     | 
| 
       296 
294 
     | 
    
         
             
                  end
         
     | 
| 
      
 295 
     | 
    
         
            +
             
     | 
| 
      
 296 
     | 
    
         
            +
                  specs.uniq
         
     | 
| 
       297 
297 
     | 
    
         
             
                end
         
     | 
| 
       298 
298 
     | 
    
         
             
              end
         
     | 
| 
       299 
299 
     | 
    
         
             
            end
         
     | 
    
        data/lib/isolate.rb
    CHANGED
    
    | 
         @@ -8,7 +8,7 @@ module Isolate 
     | 
|
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
              # Duh.
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
       11 
     | 
    
         
            -
              VERSION = "2.0. 
     | 
| 
      
 11 
     | 
    
         
            +
              VERSION = "2.0.1"
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
13 
     | 
    
         
             
              # Disable Isolate. If a block is provided, isolation will be
         
     | 
| 
       14 
14 
     | 
    
         
             
              # disabled for the scope of the block.
         
     | 
| 
         @@ -31,8 +31,13 @@ module Isolate 
     | 
|
| 
       31 
31 
     | 
    
         
             
              def self.gems path, options = {}, &block # :nodoc:
         
     | 
| 
       32 
32 
     | 
    
         
             
                warn "Isolate.gems is deprecated, use Isolate.now! instead.\n" +
         
     | 
| 
       33 
33 
     | 
    
         
             
                     "Isolate.gems will be removed in v3.0."
         
     | 
| 
      
 34 
     | 
    
         
            +
                compat = {
         
     | 
| 
      
 35 
     | 
    
         
            +
                  :path => path,
         
     | 
| 
      
 36 
     | 
    
         
            +
                  :multiruby => false,
         
     | 
| 
      
 37 
     | 
    
         
            +
                  :system => false,
         
     | 
| 
      
 38 
     | 
    
         
            +
                }
         
     | 
| 
       34 
39 
     | 
    
         | 
| 
       35 
     | 
    
         
            -
                now! options.merge( 
     | 
| 
      
 40 
     | 
    
         
            +
                now! options.merge(compat), &block
         
     | 
| 
       36 
41 
     | 
    
         
             
              end
         
     | 
| 
       37 
42 
     | 
    
         | 
| 
       38 
43 
     | 
    
         
             
              # Deprecated. See Isolate.sandbox.
         
     | 
    
        data/test/test_isolate_entry.rb
    CHANGED
    
    | 
         @@ -49,9 +49,9 @@ class TestIsolateEntry < Isolate::Test 
     | 
|
| 
       49 
49 
     | 
    
         
             
              def test_matches_spec?
         
     | 
| 
       50 
50 
     | 
    
         
             
                entry = e "hi", "1.1"
         
     | 
| 
       51 
51 
     | 
    
         | 
| 
       52 
     | 
    
         
            -
                assert entry.matches_spec?(spec 
     | 
| 
       53 
     | 
    
         
            -
                assert !entry.matches_spec?(spec 
     | 
| 
       54 
     | 
    
         
            -
                assert !entry.matches_spec?(spec 
     | 
| 
      
 52 
     | 
    
         
            +
                assert entry.matches_spec?(spec("hi", "1.1"))
         
     | 
| 
      
 53 
     | 
    
         
            +
                assert !entry.matches_spec?(spec("bye", "1.1"))
         
     | 
| 
      
 54 
     | 
    
         
            +
                assert !entry.matches_spec?(spec("hi", "1.2"))
         
     | 
| 
       55 
55 
     | 
    
         
             
              end
         
     | 
| 
       56 
56 
     | 
    
         | 
| 
       57 
57 
     | 
    
         
             
              def test_update
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,13 +1,13 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: isolate
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
     | 
    
         
            -
              hash:  
     | 
| 
      
 4 
     | 
    
         
            +
              hash: 13
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       6 
6 
     | 
    
         
             
              segments: 
         
     | 
| 
       7 
7 
     | 
    
         
             
              - 2
         
     | 
| 
       8 
8 
     | 
    
         
             
              - 0
         
     | 
| 
       9 
     | 
    
         
            -
              -  
     | 
| 
       10 
     | 
    
         
            -
              version: 2.0. 
     | 
| 
      
 9 
     | 
    
         
            +
              - 1
         
     | 
| 
      
 10 
     | 
    
         
            +
              version: 2.0.1
         
     | 
| 
       11 
11 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       12 
12 
     | 
    
         
             
            authors: 
         
     | 
| 
       13 
13 
     | 
    
         
             
            - John Barnette
         
     | 
| 
         @@ -16,7 +16,7 @@ autorequire: 
     | 
|
| 
       16 
16 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       17 
17 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
       19 
     | 
    
         
            -
            date: 2010-05- 
     | 
| 
      
 19 
     | 
    
         
            +
            date: 2010-05-24 00:00:00 -07:00
         
     | 
| 
       20 
20 
     | 
    
         
             
            default_executable: 
         
     | 
| 
       21 
21 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       22 
22 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
         @@ -27,12 +27,12 @@ dependencies: 
     | 
|
| 
       27 
27 
     | 
    
         
             
                requirements: 
         
     | 
| 
       28 
28 
     | 
    
         
             
                - - ">="
         
     | 
| 
       29 
29 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
       30 
     | 
    
         
            -
                    hash:  
     | 
| 
      
 30 
     | 
    
         
            +
                    hash: 7
         
     | 
| 
       31 
31 
     | 
    
         
             
                    segments: 
         
     | 
| 
       32 
32 
     | 
    
         
             
                    - 2
         
     | 
| 
       33 
33 
     | 
    
         
             
                    - 0
         
     | 
| 
       34 
     | 
    
         
            -
                    -  
     | 
| 
       35 
     | 
    
         
            -
                    version: 2.0. 
     | 
| 
      
 34 
     | 
    
         
            +
                    - 4
         
     | 
| 
      
 35 
     | 
    
         
            +
                    version: 2.0.4
         
     | 
| 
       36 
36 
     | 
    
         
             
              type: :development
         
     | 
| 
       37 
37 
     | 
    
         
             
              version_requirements: *id001
         
     | 
| 
       38 
38 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
         @@ -120,12 +120,12 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       120 
120 
     | 
    
         
             
              requirements: 
         
     | 
| 
       121 
121 
     | 
    
         
             
              - - ">="
         
     | 
| 
       122 
122 
     | 
    
         
             
                - !ruby/object:Gem::Version 
         
     | 
| 
       123 
     | 
    
         
            -
                  hash:  
     | 
| 
      
 123 
     | 
    
         
            +
                  hash: 59
         
     | 
| 
       124 
124 
     | 
    
         
             
                  segments: 
         
     | 
| 
       125 
125 
     | 
    
         
             
                  - 1
         
     | 
| 
       126 
126 
     | 
    
         
             
                  - 8
         
     | 
| 
       127 
     | 
    
         
            -
                  -  
     | 
| 
       128 
     | 
    
         
            -
                  version: 1.8. 
     | 
| 
      
 127 
     | 
    
         
            +
                  - 6
         
     | 
| 
      
 128 
     | 
    
         
            +
                  version: 1.8.6
         
     | 
| 
       129 
129 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement 
         
     | 
| 
       130 
130 
     | 
    
         
             
              none: false
         
     | 
| 
       131 
131 
     | 
    
         
             
              requirements: 
         
     | 
| 
         @@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       140 
140 
     | 
    
         
             
            requirements: []
         
     | 
| 
       141 
141 
     | 
    
         | 
| 
       142 
142 
     | 
    
         
             
            rubyforge_project: isolate
         
     | 
| 
       143 
     | 
    
         
            -
            rubygems_version: 1.3.7 
     | 
| 
      
 143 
     | 
    
         
            +
            rubygems_version: 1.3.7
         
     | 
| 
       144 
144 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       145 
145 
     | 
    
         
             
            specification_version: 3
         
     | 
| 
       146 
146 
     | 
    
         
             
            summary: Isolate is a very simple RubyGems sandbox
         
     |