Sha256: b5d20eb8a30b0ddc30a292f477eeeb65676367a291b05b5c93828a3ab3eeb1df

Contents?: true

Size: 784 Bytes

Versions: 35

Compression:

Stored size: 784 Bytes

Contents

require "guard/config"
fail "Deprecations disabled (strict mode)" if Guard::Config.new.strict?

module Guard
  module Deprecated
    module Watcher
      def self.add_deprecated(klass)
        klass.send(:extend, ClassMethods)
      end

      module ClassMethods
        MATCH_GUARDFILE = <<-EOS.gsub(/^\s*/, "")
          Starting with Guard 2.8.3 this method is deprecated.
        EOS

        def match_guardfile?(files)
          require "guard/guardfile/evaluator"
          UI.deprecation(MATCH_GUARDFILE)
          options = ::Guard.state.session.evaluator_options
          evaluator = ::Guard::Guardfile::Evaluator.new(options)
          path = evaluator.guardfile_path
          files.any? { |file| File.expand_path(file) == path }
        end
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 8 rubygems

Version Path
guard-2.19.1 lib/guard/deprecated/watcher.rb
guard-2.19.0 lib/guard/deprecated/watcher.rb
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/guard-2.18.1/lib/guard/deprecated/watcher.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/guard-2.18.1/lib/guard/deprecated/watcher.rb
guard-2.18.1 lib/guard/deprecated/watcher.rb
op_connect-0.1.2 vendor/bundle/ruby/3.1.0/gems/guard-2.18.0/lib/guard/deprecated/watcher.rb
guard-2.18.0 lib/guard/deprecated/watcher.rb
guard-2.17.0 lib/guard/deprecated/watcher.rb
qiita_org-0.1.35 gems/ruby/2.7.0/gems/guard-2.16.2/lib/guard/deprecated/watcher.rb
qiita_org-0.1.34 gems/ruby/2.7.0/gems/guard-2.16.2/lib/guard/deprecated/watcher.rb
qiita_org-0.1.33 gems/ruby/2.7.0/gems/guard-2.16.2/lib/guard/deprecated/watcher.rb
qiita_org-0.1.32 gems/ruby/2.7.0/gems/guard-2.16.2/lib/guard/deprecated/watcher.rb
qiita_org-0.1.31 gems/ruby/2.7.0/gems/guard-2.16.2/lib/guard/deprecated/watcher.rb
qiita_org-0.1.30 gems/ruby/2.7.0/gems/guard-2.16.2/lib/guard/deprecated/watcher.rb
qiita_org-0.1.29 gems/ruby/2.7.0/gems/guard-2.16.2/lib/guard/deprecated/watcher.rb
qiita_org-0.1.28 gems/ruby/2.7.0/gems/guard-2.16.2/lib/guard/deprecated/watcher.rb
qiita_org-0.1.27 gems/ruby/2.7.0/gems/guard-2.16.2/lib/guard/deprecated/watcher.rb
qiita_org-0.1.26 gems/ruby/2.7.0/gems/guard-2.16.2/lib/guard/deprecated/watcher.rb
qiita_org-0.1.25 gems/ruby/2.7.0/gems/guard-2.16.2/lib/guard/deprecated/watcher.rb
guard-2.16.2 lib/guard/deprecated/watcher.rb