Sha256: 02592a7be2e36f98047205c1589a8f8011fd73b5e56a7f9d6d6a00804e3b8a7a

Contents?: true

Size: 346 Bytes

Versions: 10

Compression:

Stored size: 346 Bytes

Contents

module PT::Flow
  class Repo

    def user
      path.split('/').first
    end

    def name
      path.split('/').last
    end

    def url
      "https://github.com/#{user}/#{name}"
    end

    private

      def path
        @path ||= `git config --get remote.origin.url`.strip.match(/github.com[:\/](\S+\/\S+)\.git/)[1]
      end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
pt-flow-2.7.0 lib/pt-flow/repo.rb
pt-flow-2.6.1 lib/pt-flow/repo.rb
pt-flow-2.6.0 lib/pt-flow/repo.rb
pt-flow-2.5.0 lib/pt-flow/repo.rb
pt-flow-2.4.0 lib/pt-flow/repo.rb
pt-flow-2.3.3 lib/pt-flow/repo.rb
pt-flow-2.3.2 lib/pt-flow/repo.rb
pt-flow-2.3.1 lib/pt-flow/repo.rb
pt-flow-2.3.0 lib/pt-flow/repo.rb
pt-flow-2.2.1 lib/pt-flow/repo.rb