Sha256: 6c9149aedc52922f050650fa6e45c4ca2e757065df0bc58fc4524141e3862020
Contents?: true
Size: 627 Bytes
Versions: 5
Compression:
Stored size: 627 Bytes
Contents
# frozen_string_literal: true require "dry/monads" module Gemsmith module Tools # Validates whether a gem can be published or not. class Validator include Dry::Monads[:result] def initialize container: Container @container = container end def call specification executor.capture3("git", "status", "--porcelain").then do |_stdout, _stderr, status| status.success? ? Success(specification) : Failure("Project has uncommitted changes.") end end private attr_reader :container def executor = container[__method__] end end end
Version data entries
5 entries across 5 versions & 1 rubygems