Sha256: 9c9a144157b076894f24bf15d4f869ec79abb33ba9aaf396a0060eded0e9643c

Contents?: true

Size: 664 Bytes

Versions: 6

Compression:

Stored size: 664 Bytes

Contents

module Gem
  module Release
    class Context
      class Git
        def clean?
          system 'git diff-index --quiet HEAD'
        end

        def remotes
          `git remote`.split("\n")
        end

        def tags
          `git tag`.split("\n")
        end

        def user_name
          str = `git config --get user.name`.strip
          str unless str.empty?
        end

        def user_email
          str = `git config --get user.email`.strip
          str unless str.empty?
        end

        def user_login
          str = `git config --get github.user`.strip
          str.empty? ? user_name : str
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gem-release-2.2.0 lib/gem/release/context/git.rb
gem-release-2.1.1 lib/gem/release/context/git.rb
gem-release-2.1.0 lib/gem/release/context/git.rb
gem-release-2.0.4 lib/gem/release/context/git.rb
gem-release-2.0.3 lib/gem/release/context/git.rb
gem-release-2.0.2 lib/gem/release/context/git.rb