Sha256: bdd930c9d847794baf28c6d443ece2b0219f1dd8fa313a9bf24b1a64f0ea1acc

Contents?: true

Size: 992 Bytes

Versions: 27

Compression:

Stored size: 992 Bytes

Contents

module RSpec
  module Core
    module Deprecation
      # @private
      #
      # Used internally to print deprecation warnings
      def deprecate(deprecated, replacement_or_hash={}, ignore_version=nil)
        # Temporarily support old and new APIs while we transition the other
        # rspec libs to use a hash for the 2nd arg and no version arg
        data = Hash === replacement_or_hash ? replacement_or_hash : { :replacement => replacement_or_hash }
        call_site = caller.find { |line| line !~ %r{/lib/rspec/(core|mocks|expectations|matchers|rails)/} }

        RSpec.configuration.reporter.deprecation(
          {
            :deprecated => deprecated,
            :call_site => call_site
          }.merge(data)
        )
      end

      # @private
      #
      # Used internally to print deprecation warnings
      def warn_deprecation(message)
        RSpec.configuration.reporter.deprecation :message => message
      end
    end
  end

  extend(Core::Deprecation)
end

Version data entries

27 entries across 27 versions & 8 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/lib/rspec/core/deprecation.rb
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/lib/rspec/core/deprecation.rb
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/lib/rspec/core/deprecation.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/lib/rspec/core/deprecation.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/lib/rspec/core/deprecation.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/lib/rspec/core/deprecation.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/lib/rspec/core/deprecation.rb
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/lib/rspec/core/deprecation.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/rspec-core-2.14.8/lib/rspec/core/deprecation.rb
dxruby_rp5-0.0.4 spec/vendor/rspec-core-2.14.7/lib/rspec/core/deprecation.rb
rspec-core-2.14.8 lib/rspec/core/deprecation.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/rspec-core-2.14.7/lib/rspec/core/deprecation.rb
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/deprecation.rb
dxruby_rp5-0.0.3 spec/vendor/rspec-core-2.14.7/lib/rspec/core/deprecation.rb
tuktuk-rails-0.0.10 vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/deprecation.rb
tuktuk-rails-0.0.9 vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/deprecation.rb
tuktuk-rails-0.0.8 vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/deprecation.rb
tuktuk-rails-0.0.7 vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/deprecation.rb
dxruby_rp5-0.0.2 spec/vendor/rspec-core-2.14.7/lib/rspec/core/deprecation.rb
dxruby_rp5-0.0.1 spec/vendor/rspec-core-2.14.7/lib/rspec/core/deprecation.rb