Sha256: 4755747f5d05fbb71c20d3092bd4230ab6d776d3992ec4cb33f7f22bbcec894c

Contents?: true

Size: 623 Bytes

Versions: 4

Compression:

Stored size: 623 Bytes

Contents

module Repomen
  module Repo
    module Service
      class BitBucket < Base
        SERVICE_REGEXP = /(https:\/\/|git\@)bitbucket.org[\:\/]([^\/]+)\/([^\.]+)\.git$/

        # @param url [String]
        def applicable?
          url =~ SERVICE_REGEXP
        end

        def handler_class
          Handler::Git
        end

        # overriding 'git_hub' here to make directories look prettier
        def name
          :bitbucket
        end

        def repo_name
          url =~ SERVICE_REGEXP && $3
        end

        def user_name
          url =~ SERVICE_REGEXP && $2
        end

      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
repomen-0.1.3 lib/repomen/repo/service/bit_bucket.rb
repomen-0.1.2 lib/repomen/repo/service/bit_bucket.rb
repomen-0.1.1 lib/repomen/repo/service/bit_bucket.rb
repomen-0.1.0 lib/repomen/repo/service/bit_bucket.rb