Sha256: c463498b25159d3ce9012bd195ba924e16086144160761f9bed8d6b5b30ab5f2

Contents?: true

Size: 462 Bytes

Versions: 4

Compression:

Stored size: 462 Bytes

Contents

# frozen_string_literal: true

module NeetoCompliance
  class CommonGemfileVerifier < Base
    def local_copy
      "Gemfile.common.rb"
    end

    def commons_copy
      NeetoCompliance::NeetoCommons.path.join "gemfiles", local_copy
    end

    def verify_command
      "diff -N #{commons_copy} #{local_copy}"
    end

    def valid?
      `#{verify_command}`.empty?
    end

    def autofix_command
      "cp #{commons_copy} #{local_copy}"
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
neeto-compliance-1.0.58 lib/neeto_compliance/verifiers/common_gemfile_verifier.rb
neetob-0.1.2 neeto_compliance/lib/neeto_compliance/verifiers/common_gemfile_verifier.rb
neetob-0.1.1 /Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/common_gemfile_verifier.rb
neetob-0.1.0 /Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/common_gemfile_verifier.rb