bundler-unload 1.0.0

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.
@@ -0,0 +1 @@
1
+ /*.gem
@@ -0,0 +1 @@
1
+ 1.8.7
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+ # -*- encoding: utf-8 -*-
3
+
4
+ Kernel.load File.expand_path("../lib/bundler-unload/version.rb", __FILE__)
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "bundler-unload"
8
+ s.version = BundlerUnload::VERSION
9
+ s.authors = ["Michal Papis"]
10
+ s.email = ["mpapis@gmail.com"]
11
+ s.homepage = "https://github.com/mpapis/bundler-unload"
12
+ s.summary = %q{Allow unloading bundler after Bundler.load}
13
+
14
+ s.files = `git ls-files`.split("\n")
15
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
+
17
+ s.add_development_dependency "bundler" # do not force runtime so it can be silently ignored
18
+ #s.add_development_dependency "smf-gem"
19
+ end
@@ -0,0 +1,48 @@
1
+ require "bundler"
2
+
3
+ module Bundler
4
+ class RubygemsIntegration
5
+ class Legacy
6
+ def plain_specs
7
+ Gem.source_index.gems
8
+ end
9
+ def plain_specs=(specs)
10
+ Gem.source_index.instance_variable_set(:@gems, specs)
11
+ end
12
+ end
13
+
14
+ class Modern
15
+ def plain_specs
16
+ Gem::Specification._all
17
+ end
18
+ def plain_specs=(specs)
19
+ Gem::Specification.all = specs
20
+ end
21
+ end
22
+
23
+ class Future
24
+ def plain_specs
25
+ Gem::Specification._all
26
+ end
27
+ def plain_specs=(specs)
28
+ Gem::Specification.all = specs
29
+ end
30
+ end
31
+ end
32
+
33
+ class << self
34
+ def unload!(rubygems_specs)
35
+ @load = nil
36
+ ENV.replace(ORIGINAL_ENV)
37
+ Bundler.rubygems.plain_specs = rubygems_specs
38
+ end
39
+
40
+ def with_bundle(&block)
41
+ rubygems_specs = Bundler.rubygems.plain_specs
42
+ Bundler.load
43
+ yield
44
+ ensure
45
+ unload!(rubygems_specs)
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,3 @@
1
+ module BundlerUnload
2
+ VERSION = "1.0.0"
3
+ end
metadata ADDED
@@ -0,0 +1,85 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bundler-unload
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
+ prerelease:
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 0
10
+ version: 1.0.0
11
+ platform: ruby
12
+ authors:
13
+ - Michal Papis
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2013-05-30 00:00:00 +02:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: bundler
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
33
+ type: :development
34
+ version_requirements: *id001
35
+ description:
36
+ email:
37
+ - mpapis@gmail.com
38
+ executables: []
39
+
40
+ extensions: []
41
+
42
+ extra_rdoc_files: []
43
+
44
+ files:
45
+ - .gitignore
46
+ - .ruby-version
47
+ - bundler-unload.gemspec
48
+ - lib/bundler-unload.rb
49
+ - lib/bundler-unload/version.rb
50
+ has_rdoc: true
51
+ homepage: https://github.com/mpapis/bundler-unload
52
+ licenses: []
53
+
54
+ post_install_message:
55
+ rdoc_options: []
56
+
57
+ require_paths:
58
+ - lib
59
+ required_ruby_version: !ruby/object:Gem::Requirement
60
+ none: false
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ hash: 3
65
+ segments:
66
+ - 0
67
+ version: "0"
68
+ required_rubygems_version: !ruby/object:Gem::Requirement
69
+ none: false
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ hash: 3
74
+ segments:
75
+ - 0
76
+ version: "0"
77
+ requirements: []
78
+
79
+ rubyforge_project:
80
+ rubygems_version: 1.6.2
81
+ signing_key:
82
+ specification_version: 3
83
+ summary: Allow unloading bundler after Bundler.load
84
+ test_files: []
85
+