isolate 3.4.0 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a900a23d0c2f0cc6a1008059a1f3617b676a1b6324d5a2df8dab6783017014a4
4
- data.tar.gz: 6f5701b5ec22dff766cc996a8901c948c816f4c2a265c7d79e17c8252cbd0143
3
+ metadata.gz: ca0b6c46244e7c3677b3d9ac0ddfa79f90915b59667030dcb616a717a740dda3
4
+ data.tar.gz: 1ab9f7a50d03bc985672f6bb1e316fccc838e6ded721a3872b58f64f999e28de
5
5
  SHA512:
6
- metadata.gz: a1be0a0b6c85184531c784afa2eccfc7de5ca8efde0aa407cf74c6dc6773ac8448d3cdf3c942a9d0a036d5c3bfcc310dc9f2ddb3e1a6b028658f6162e7173c1d
7
- data.tar.gz: 12202665c1e1a13d941602a73094d81240d0911056119a3aced03675ef03cb63088a820619c8b66ae902016a8e683931b33b7b1bf31dcab8415488c88e6819b3
6
+ metadata.gz: 33ae43937126229c7a21b4d48d8aff7bc765cc60d3085604af3af378661d696624b7a311cca4f287cc5f1f6f42a38a3e7573491d1862d7850a912f9c4ec5e412
7
+ data.tar.gz: 9b05a270c2ae63dd20c3466ec6537b148c0e2b9fc076a1453635c51f6f7a0848e093b1044ca08f4ab979f349c51a14520be4527a183d003448e549de5642cd3b
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,10 @@
1
+ === 3.5.0 / 2020-02-29
2
+
3
+ * 2 minor enhancements:
4
+
5
+ * Added :name option for sandboxes, mapping to path=~/.gem/repos/:name.
6
+ * Hoe isolate now defaults to system:true for its sandbox.
7
+
1
8
  === 3.4.0 / 2019-12-17
2
9
 
3
10
  * 2 minor enhancements:
@@ -46,7 +46,7 @@ class Hoe # :nodoc:
46
46
  sandbox = ::Isolate.sandbox
47
47
 
48
48
  # reset, now that they've had a chance to change it
49
- sandbox.options :path => isolate_dir, :system => false
49
+ sandbox.options :path => isolate_dir, :system => true
50
50
 
51
51
  task :isolate do
52
52
  self.extra_deps.each do |name, version|
@@ -8,7 +8,7 @@ module Isolate
8
8
 
9
9
  # Duh.
10
10
 
11
- VERSION = "3.4.0"
11
+ VERSION = "3.5.0"
12
12
 
13
13
  # Disable Isolate. If a block is provided, isolation will be
14
14
  # disabled for the scope of the block.
@@ -65,6 +65,8 @@ module Isolate
65
65
  # <tt>"tmp/isolate"</tt>, and a Ruby version specifier suffix
66
66
  # will be added if <tt>:multiruby</tt> is +true+.
67
67
  #
68
+ # :name:: Like path, but expands to: ~/.gem/repos/#{name}/ (like ohmygems)
69
+ #
68
70
  # :system:: Should system gems be allowed to satisfy dependencies?
69
71
  # Default is +true+.
70
72
  #
@@ -43,6 +43,11 @@ module Isolate
43
43
  @files = []
44
44
  @options = options
45
45
 
46
+ path, name = options.values_at :path, :name
47
+
48
+ raise ArgumentError, "can't specify both name and path!" if name && path
49
+ options[:path] = File.expand_path("~/.gem/repos/#{name}") if name
50
+
46
51
  fire :initializing
47
52
 
48
53
  user = File.expand_path "~/.isolate/user.rb"
@@ -331,22 +331,31 @@ class TestIsolateSandbox < Isolate::Test
331
331
  assert_equal Gem::Requirement.new("2.0"), monkey.requirement
332
332
  end
333
333
 
334
+ def test_initialize__name
335
+ exp = File.expand_path "~/.gem/repos/project_name"
336
+
337
+ outer = self
338
+
339
+ s = sandbox :name => "project_name" do |inner|
340
+ outer.assert_equal exp, inner.options[:path]
341
+ end
342
+
343
+ assert_equal exp, s.options[:path]
344
+ end
345
+
334
346
  def test_options
335
347
  @sandbox.options :hello => :monkey
336
348
  assert_equal :monkey, @sandbox.options[:hello]
337
349
  end
338
350
 
339
351
  def test_path
340
- s = sandbox :multiruby => false do
341
- options :path => "tmp/foo"
342
- end
343
-
352
+ s = sandbox :multiruby => false, :path => "tmp/foo"
344
353
  assert_equal File.expand_path("tmp/foo"), s.path
345
354
 
346
- v = [Gem.ruby_engine, RbConfig::CONFIG["ruby_version"]].join "-"
347
- s = sandbox :multiruby => true
355
+ v = "%s-%s" % [Gem.ruby_engine, RbConfig::CONFIG["ruby_version"]]
348
356
  p = File.expand_path("tmp/test/#{v}")
349
357
 
358
+ s = sandbox :multiruby => true
350
359
  assert_equal p, s.path
351
360
 
352
361
  s = sandbox :path => "tmp/test/#{v}", :multiruby => false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isolate
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 3.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -31,7 +31,7 @@ cert_chain:
31
31
  m5x9IDiApM+vCELNwDXXGNFEnQBBK+wAe4Pek8o1V1TTOxL1kGPewVOitX1p3xoN
32
32
  h7iEjga8iM1LbZUfiISZ+WrB
33
33
  -----END CERTIFICATE-----
34
- date: 2019-12-18 00:00:00.000000000 Z
34
+ date: 2020-03-01 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: hoe-seattlerb
@@ -129,14 +129,14 @@ dependencies:
129
129
  requirements:
130
130
  - - "~>"
131
131
  - !ruby/object:Gem::Version
132
- version: '3.20'
132
+ version: '3.22'
133
133
  type: :development
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
137
  - - "~>"
138
138
  - !ruby/object:Gem::Version
139
- version: '3.20'
139
+ version: '3.22'
140
140
  description: |-
141
141
  Isolate is a very simple RubyGems sandbox. It provides a way to
142
142
  express and automatically install your project's Gem dependencies.
metadata.gz.sig CHANGED
Binary file