bundler-unload 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/LICENCE ADDED
@@ -0,0 +1,14 @@
1
+ Copyright (c) 2013 Michal Papis
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
14
+
data/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # Bundler Unload
2
+
3
+ Allow unloading `bundler` after `Bundler.load`.
4
+
5
+ ## Installation
6
+
7
+ gem install bundler-unload
8
+
9
+ ## Example 1
10
+
11
+ require 'bundler-unload'
12
+ Bundler.with_bundle do |bundler|
13
+ bundler.spec.do_the_magic
14
+ end
15
+
16
+ ## Example 2
17
+
18
+ require 'bundler-unload'
19
+ rubygems_spec = Bundler.rubygems.plain_specs
20
+ begin
21
+ Bundler.load.spec.do_the_magic
22
+ ensure
23
+ Bundler.unload!(rubygems_spec)
24
+ end
25
+
26
+ ## Authors
27
+
28
+ - Michal Papis <mpapis@gmail.com>
29
+
30
+ ## Thanks
31
+
32
+ - Joshua Hull
33
+ - Carl Lerche
@@ -39,8 +39,7 @@ module Bundler
39
39
 
40
40
  def with_bundle(&block)
41
41
  rubygems_specs = Bundler.rubygems.plain_specs
42
- Bundler.load
43
- yield
42
+ block.call(Bundler.load)
44
43
  ensure
45
44
  unload!(rubygems_specs)
46
45
  end
@@ -1,3 +1,3 @@
1
1
  module BundlerUnload
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler-unload
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michal Papis
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-05-30 00:00:00 +02:00
18
+ date: 2013-05-31 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -44,6 +44,8 @@ extra_rdoc_files: []
44
44
  files:
45
45
  - .gitignore
46
46
  - .ruby-version
47
+ - LICENCE
48
+ - README.md
47
49
  - bundler-unload.gemspec
48
50
  - lib/bundler-unload.rb
49
51
  - lib/bundler-unload/version.rb