Sha256: 378a5d9b41b2dd1e904c000561d334bf6adbe529b18feb69793b4dd877ce894d

Contents?: true

Size: 505 Bytes

Versions: 14

Compression:

Stored size: 505 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

14 entries across 14 versions & 2 rubygems

Version Path
avm-tools-0.116.1 sub/eac_git/lib/eac_git/local/remote.rb
avm-tools-0.116.0 sub/eac_git/lib/eac_git/local/remote.rb
avm-tools-0.115.0 sub/eac_git/lib/eac_git/local/remote.rb
avm-tools-0.114.2 sub/eac_git/lib/eac_git/local/remote.rb
avm-tools-0.114.1 sub/eac_git/lib/eac_git/local/remote.rb
eac_git-0.12.0 lib/eac_git/local/remote.rb
avm-tools-0.114.0 sub/eac_git/lib/eac_git/local/remote.rb
eac_git-0.11.0 lib/eac_git/local/remote.rb
avm-tools-0.113.6 sub/eac_git/lib/eac_git/local/remote.rb
avm-tools-0.113.5 sub/eac_git/lib/eac_git/local/remote.rb
avm-tools-0.113.4 sub/eac_git/lib/eac_git/local/remote.rb
avm-tools-0.113.3 sub/eac_git/lib/eac_git/local/remote.rb
avm-tools-0.113.2 sub/eac_git/lib/eac_git/local/remote.rb
eac_git-0.10.0 lib/eac_git/local/remote.rb