Sha256: c4f170ab281f1ff96149d5b7f34e012512e3a919a9ee9d4ae9ce241919b0b73e

Contents?: true

Size: 619 Bytes

Versions: 8

Compression:

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

8 entries across 8 versions & 1 rubygems

Version Path
repomen-0.2.1 lib/repomen/repo/service/bit_bucket.rb
repomen-0.2.0 lib/repomen/repo/service/bit_bucket.rb
repomen-0.2.0.rc1 lib/repomen/repo/service/bit_bucket.rb
repomen-0.1.8 lib/repomen/repo/service/bit_bucket.rb
repomen-0.1.7 lib/repomen/repo/service/bit_bucket.rb
repomen-0.1.6 lib/repomen/repo/service/bit_bucket.rb
repomen-0.1.5 lib/repomen/repo/service/bit_bucket.rb
repomen-0.1.4 lib/repomen/repo/service/bit_bucket.rb