Module: CuttingEdge::GitlabMixin

Defined in:
lib/cutting_edge/repo.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



56
57
58
# File 'lib/cutting_edge/repo.rb', line 56

def included(base)
  base.extend ClassMethods
end

Instance Method Details

#url_for_file(file) ⇒ Object



51
52
53
# File 'lib/cutting_edge/repo.rb', line 51

def url_for_file(file)
  File.join(host, '/api/v4/projects', "#{@org}%2f#{@name}", 'repository/files/', file.gsub('/', '%2f'), "raw?ref=#{@branch}")
end

#url_for_projectObject



47
48
49
# File 'lib/cutting_edge/repo.rb', line 47

def url_for_project
  File.join(host, @org, @name)
end