Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Commit

Permalink
Define #size for Bundler::SpecSet
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsdeleo committed Mar 14, 2016
1 parent 768adfc commit fd985e2
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions lib/chef-dk/component_test.rb
Expand Up @@ -18,6 +18,15 @@
require 'chef-dk/exceptions'
require 'chef-dk/helpers'

# https://github.com/bundler/bundler/issues/4368
module Bundler
class SpecSet

alias_method :size, :length

end
end

module ChefDK
class ComponentTest

Expand Down Expand Up @@ -148,8 +157,8 @@ def gem_base_dir
# So we first ask if there is a normal version, and if there is not, we ask if there
# is a prerelease version. ">= 0.a" is how we ask for a prerelease version, because a
# prerelease version is defined as "any version with a letter in it."
gem = Gem::Specification::find_by_name(@gem_name_for_base_dir)
gem ||= Gem::Specification::find_by_name(@gem_name_for_base_dir, '>= 0.a')
gem = Gem::Specification.find_by_name(@gem_name_for_base_dir)
gem ||= Gem::Specification.find_by_name(@gem_name_for_base_dir, '>= 0.a')
gem.gem_dir
end

Expand Down

0 comments on commit fd985e2

Please sign in to comment.