Sha256: abdaf77464b1c8eaee4aa5c74198b863e616db28aecb1ee472c8727fc4f0ab58

Contents?: true

Size: 643 Bytes

Versions: 15

Compression:

Stored size: 643 Bytes

Contents

#--
# Copyright (c) 2014-2015 JRuby Team
# This source code is available under the MIT license.
# See the file LICENSE.txt for details.
#++

module Warbler
  module BundlerHelper
    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
    module_function :to_spec
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
warbler_updated-2.1.0 lib/warbler/bundler_helper.rb
warbler-2.0.5 lib/warbler/bundler_helper.rb
warbler-2.0.4 lib/warbler/bundler_helper.rb
warbler-1.4.10 lib/warbler/bundler_helper.rb
warbler-2.0.3 lib/warbler/bundler_helper.rb
warbler-2.0.2 lib/warbler/bundler_helper.rb
warbler-2.0.1 lib/warbler/bundler_helper.rb
warbler-2.0.0 lib/warbler/bundler_helper.rb
warbler-2.0.0.rc3 lib/warbler/bundler_helper.rb
warbler-2.0.0.rc2 lib/warbler/bundler_helper.rb
warbler-2.0.0.rc1 lib/warbler/bundler_helper.rb
warbler-2.0.0.pre3 lib/warbler/bundler_helper.rb
warbler-2.0.0.pre2 lib/warbler/bundler_helper.rb
warbler-1.4.9 lib/warbler/bundler_helper.rb
warbler-1.4.8 lib/warbler/bundler_helper.rb