module Warbler::BundlerHelper
Public Class Methods
to_spec(spec)
click to toggle source
# File lib/warbler/bundler_helper.rb, line 9 def to_spec(spec) # JRuby <= 1.7.20 does not handle respond_to? with method_missing right # thus a `spec.respond_to?(:to_spec) ? spec.to_spec : spec` won't do : if ::Bundler.const_defined?(:StubSpecification) # since Bundler 1.10.1 spec = spec.to_spec if spec.is_a?(::Bundler::StubSpecification) else spec = spec.to_spec if spec.respond_to?(:to_spec) end spec end
Private Instance Methods
to_spec(spec)
click to toggle source
# File lib/warbler/bundler_helper.rb, line 9 def to_spec(spec) # JRuby <= 1.7.20 does not handle respond_to? with method_missing right # thus a `spec.respond_to?(:to_spec) ? spec.to_spec : spec` won't do : if ::Bundler.const_defined?(:StubSpecification) # since Bundler 1.10.1 spec = spec.to_spec if spec.is_a?(::Bundler::StubSpecification) else spec = spec.to_spec if spec.respond_to?(:to_spec) end spec end