Sha256: 0d16d659227b7f316f315be463283cfce927950582be11efb1c323eb6ddd749a

Contents?: true

Size: 390 Bytes

Versions: 13

Compression:

Stored size: 390 Bytes

Contents

class Ghn
  class Aliases
    def initialize
      @aliases = {}

      `git config --get-regexp ghn.alias`.each_line.each do |line|
        line.chomp!
        alias_name, repo_full_name = line.split(/\s+/)
        alias_name = alias_name.split('.')[-1]
        @aliases[alias_name] = repo_full_name
      end
    end

    def find(alias_name)
      @aliases[alias_name]
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ghn-2.4.1 lib/ghn/aliases.rb
ghn-2.4.0 lib/ghn/aliases.rb
ghn-2.3.0 lib/ghn/aliases.rb
ghn-2.2.0 lib/ghn/aliases.rb
ghn-2.1.2 lib/ghn/aliases.rb
ghn-2.1.1 lib/ghn/aliases.rb
ghn-2.1.0 lib/ghn/aliases.rb
ghn-2.0.0 lib/ghn/aliases.rb
ghn-2.0.0.pre5 lib/ghn/aliases.rb
ghn-2.0.0.pre4 lib/ghn/aliases.rb
ghn-2.0.0.pre3 lib/ghn/aliases.rb
ghn-2.0.0.pre2 lib/ghn/aliases.rb
ghn-2.0.0.pre1 lib/ghn/aliases.rb