Sha256: a9702344435a7a869717823349aeacad07560afb6e83d17fc866db9c1c5dc6ca

Contents?: true

Size: 499 Bytes

Versions: 48

Compression:

Stored size: 499 Bytes

Contents

# frozen_string_literal: true

require 'eac_git/remote'
require 'eac_ruby_utils/core_ext'

module EacGit
  class Local
    class Remote
      NO_SUCH_REMOTE_CODE = 128

      enable_simple_cache

      common_constructor :local, :name

      def exist?
        url
      end

      # @return [String, nil]
      def url
        local.command('remote', 'get-url', name)
          .execute!(exit_outputs: { NO_SUCH_REMOTE_CODE => nil })
          .if_present(nil, &:strip)
      end
    end
  end
end

Version data entries

48 entries across 48 versions & 3 rubygems

Version Path
eac_tools-0.37.0 sub/eac_git/lib/eac_git/local/remote.rb
eac_tools-0.36.1 sub/eac_git/lib/eac_git/local/remote.rb
eac_tools-0.36.0 sub/eac_git/lib/eac_git/local/remote.rb
eac_tools-0.35.0 sub/eac_git/lib/eac_git/local/remote.rb
eac_tools-0.34.0 sub/eac_git/lib/eac_git/local/remote.rb
eac_git-0.12.3 lib/eac_git/local/remote.rb
eac_tools-0.33.0 sub/eac_git/lib/eac_git/local/remote.rb
eac_tools-0.32.0 sub/eac_git/lib/eac_git/local/remote.rb
eac_tools-0.31.1 sub/eac_git/lib/eac_git/local/remote.rb
eac_git-0.12.2 lib/eac_git/local/remote.rb
avm-tools-0.129.0 sub/eac_git/lib/eac_git/local/remote.rb
eac_tools-0.16.0 sub/avm-tools/sub/eac_git/lib/eac_git/local/remote.rb
avm-tools-0.128.0 sub/eac_git/lib/eac_git/local/remote.rb
eac_tools-0.15.0 sub/avm-tools/sub/eac_git/lib/eac_git/local/remote.rb
eac_tools-0.14.0 sub/avm-tools/sub/eac_git/lib/eac_git/local/remote.rb
eac_tools-0.13.0 sub/avm-tools/sub/eac_git/lib/eac_git/local/remote.rb
avm-tools-0.127.0 sub/eac_git/lib/eac_git/local/remote.rb
eac_tools-0.12.0 sub/avm-tools/sub/eac_git/lib/eac_git/local/remote.rb
avm-tools-0.126.0 sub/eac_git/lib/eac_git/local/remote.rb
eac_tools-0.11.1 sub/avm-tools/sub/eac_git/lib/eac_git/local/remote.rb