Module: DataKitten::Hosts::Bitbucket

Defined in:
lib/data_kitten/hosts/bitbucket.rb

Overview

Bitbucket host module. Automatically mixed into Dataset for datasets that are loaded from Bitbucket.

See Also:

Instance Method Summary collapse

Instance Method Details

#bitbucket_path(path = '') ⇒ String

Helper for generating Bitbucket URLs

Examples:

dataset = Dataset.new('https://bitbucket.org/floppy/hot-drinks.git')
dataset.bitbucket_path           # => 'https://bitbucket.org/floppy/hot-drinks/'
dataset.bitbucket_path('pull-requests') # => 'https://bitbucket.org/floppy/hot-drinks/pull-requests'

Parameters:

  • path (String) (defaults to: '')

    The path to append to the Bitbucket base URL.

Returns:

  • (String)

    The supplied path with the Bitbucket base URL prepended



36
37
38
# File 'lib/data_kitten/hosts/bitbucket.rb', line 36

def bitbucket_path(path = '')
  "https://bitbucket.org/#{bitbucket_user_name}/#{bitbucket_repository_name}/#{path}"
end

#hostSymbol

Where the dataset is hosted.

Returns:

  • (Symbol)

    :bitbucket

See Also:



22
23
24
# File 'lib/data_kitten/hosts/bitbucket.rb', line 22

def host
  :bitbucket
end