Sha256: 5795be0d87136e76bf5136044bceb14a6aedc67ed946f17788e0e07d38323ecc

Contents?: true

Size: 469 Bytes

Versions: 19

Compression:

Stored size: 469 Bytes

Contents

module Rpush
  class Deprecation
    def self.muted
      orig_val = Thread.current[:rpush_mute_deprecations]
      Thread.current[:rpush_mute_deprecations] = true
      yield
    ensure
      Thread.current[:rpush_mute_deprecations] = orig_val
    end

    def self.muted?
      Thread.current[:rpush_mute_deprecations] == true
    end

    def self.warn(msg)
      return if Rpush::Deprecation.muted?
      STDERR.puts "DEPRECATION WARNING: #{msg}"
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
rpush-2.3.2-java lib/rpush/deprecation.rb
rpush-2.3.2 lib/rpush/deprecation.rb
rpush-2.3.1-java lib/rpush/deprecation.rb
rpush-2.3.1 lib/rpush/deprecation.rb
rpush-2.3.0-java lib/rpush/deprecation.rb
rpush-2.3.0 lib/rpush/deprecation.rb
rpush-2.3.0.rc1 lib/rpush/deprecation.rb
rpush-2.2.0-java lib/rpush/deprecation.rb
rpush-2.2.0 lib/rpush/deprecation.rb
rpush-2.1.0-java lib/rpush/deprecation.rb
rpush-2.1.0 lib/rpush/deprecation.rb
rpush-2.0.1-java lib/rpush/deprecation.rb
rpush-2.0.1 lib/rpush/deprecation.rb
rpush-2.0.0-java lib/rpush/deprecation.rb
rpush-2.0.0 lib/rpush/deprecation.rb
rpush-2.0.0.rc1-java lib/rpush/deprecation.rb
rpush-2.0.0.rc1 lib/rpush/deprecation.rb
rpush-2.0.0.beta2 lib/rpush/deprecation.rb
rpush-2.0.0.beta1 lib/rpush/deprecation.rb