Sha256: adf5a70fc19f1482756e8fcafd2e62c45f12185516c0a0e6b8689d7857d061c8

Contents?: true

Size: 554 Bytes

Versions: 86

Compression:

Stored size: 554 Bytes

Contents

# frozen_string_literal: true

# shamelessly borrowed from rubocop-rails. Thanks!

module RuboCop
  module Cop
    # Common functionality for checking target chef version.
    module TargetChefVersion
      def required_minimum_chef_version
        @minimum_target_chef_version
      end

      def minimum_target_chef_version(version)
        @minimum_target_chef_version = version
      end

      def support_target_chef_version?(version)
        Gem::Version.new(@minimum_target_chef_version) <= Gem::Version.new(version)
      end
    end
  end
end

Version data entries

86 entries across 86 versions & 2 rubygems

Version Path
cookstyle-7.32.8 lib/rubocop/cop/target_chef_version.rb
cookstyle-7.32.7 lib/rubocop/cop/target_chef_version.rb
cookstyle-ng-8.0.0 lib/rubocop/cop/target_chef_version.rb
cookstyle-7.32.2 lib/rubocop/cop/target_chef_version.rb
cookstyle-7.32.1 lib/rubocop/cop/target_chef_version.rb
cookstyle-7.32.0 lib/rubocop/cop/target_chef_version.rb
cookstyle-7.31.9 lib/rubocop/cop/target_chef_version.rb
cookstyle-7.31.7 lib/rubocop/cop/target_chef_version.rb
cookstyle-7.31.3 lib/rubocop/cop/target_chef_version.rb
cookstyle-7.31.1 lib/rubocop/cop/target_chef_version.rb
cookstyle-7.31.0 lib/rubocop/cop/target_chef_version.rb
cookstyle-7.30.4 lib/rubocop/cop/target_chef_version.rb
cookstyle-7.30.3 lib/rubocop/cop/target_chef_version.rb
cookstyle-7.30.1 lib/rubocop/cop/target_chef_version.rb
cookstyle-7.28.2 lib/rubocop/cop/target_chef_version.rb
cookstyle-7.27.0 lib/rubocop/cop/target_chef_version.rb
cookstyle-7.26.1 lib/rubocop/cop/target_chef_version.rb
cookstyle-7.25.10 lib/rubocop/cop/target_chef_version.rb
cookstyle-7.25.9 lib/rubocop/cop/target_chef_version.rb
cookstyle-7.25.8 lib/rubocop/cop/target_chef_version.rb