Created
May 13, 2016 09:04
-
-
Save ritxi/0280a652cdafbc7c06c70b661b3f1ada to your computer and use it in GitHub Desktop.
Revisions
-
ritxi created this gist
May 13, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ --color --require spec_helper --require ~/.unbundled_require --format Fuubar This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ def unbundled_require(gem, options = {}) if defined?(::Bundler) spec_path = Dir.glob("#{Gem.dir}/specifications/#{gem}-*.gemspec").last if spec_path.nil? warn "Couldn't find #{gem}" return end spec = Gem::Specification.load spec_path spec.activate end begin require options[:require] || gem yield if block_given? rescue Exception => err warn "Couldn't load #{gem}: #{err}" end end