Sha256: 360f60ec6c74c1d3f61af586ef9f9d17308240809098dff99dc5d1c0383af8e4

Contents?: true

Size: 647 Bytes

Versions: 15

Compression:

Stored size: 647 Bytes

Contents

# frozen_string_literal: true

require "English"

module ReactOnRails
  module GitUtils
    def self.uncommitted_changes?(message_handler)
      return false if ENV["COVERAGE"] == "true"

      status = `git status --porcelain`
      return false if $CHILD_STATUS.success? && status.empty?

      error = if !$CHILD_STATUS.success?
                "You do not have Git installed. Please install Git, and commit your changes before continuing"
              else
                "You have uncommitted code. Please commit or stash your changes before continuing"
              end
      message_handler.add_error(error)
      true
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
react_on_rails-11.3.1 lib/react_on_rails/git_utils.rb
react_on_rails-11.3.1.beta.0 lib/react_on_rails/git_utils.rb
react_on_rails-12.0.3 lib/react_on_rails/git_utils.rb
react_on_rails-12.0.3.beta.0 lib/react_on_rails/git_utils.rb
react_on_rails-12.0.2 lib/react_on_rails/git_utils.rb
react_on_rails-12.0.1 lib/react_on_rails/git_utils.rb
react_on_rails-12.0.0 lib/react_on_rails/git_utils.rb
react_on_rails-12.0.0.pre.beta.4 lib/react_on_rails/git_utils.rb
react_on_rails-12.0.0.pre.beta.3 lib/react_on_rails/git_utils.rb
react_on_rails-12.0.0.pre.beta.2 lib/react_on_rails/git_utils.rb
react_on_rails-12.0.0.pre.beta.1 lib/react_on_rails/git_utils.rb
react_on_rails-12.0.0.pre.beta.0 lib/react_on_rails/git_utils.rb
react_on_rails-11.3.0 lib/react_on_rails/git_utils.rb
react_on_rails-11.2.2 lib/react_on_rails/git_utils.rb
react_on_rails-11.2.1 lib/react_on_rails/git_utils.rb