Sha256: cdb68b555d295c8904c0e28e1875b28eb77282243b126a90ac03cf2565019d8f

Contents?: true

Size: 668 Bytes

Versions: 4

Compression:

Stored size: 668 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? ? git_user_name : str
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gem-release-2.0.1 lib/gem/release/context/git.rb
gem-release-2.0.0.rc.3 lib/gem/release/context/git.rb
gem-release-2.0.0.rc.2 lib/gem/release/context/git.rb
gem-release-2.0.0.rc.1 lib/gem/release/context/git.rb