class CodeClimate
Public Class Methods
new(api_token)
click to toggle source
# File lib/code_climate.rb, line 11 def initialize(api_token) self.class.default_params api_token: api_token end
Public Instance Methods
get(*args)
click to toggle source
Expose some HTTParty class things
# File lib/code_climate.rb, line 16 def get(*args) self.class.get(*args) end
repo_details(repo_id)
click to toggle source
# File lib/code_climate.rb, line 28 def repo_details(repo_id) get("/repos/#{repo_id}") end
repo_details_by_name(repo_name)
click to toggle source
# File lib/code_climate.rb, line 32 def repo_details_by_name(repo_name) get("/repos/#{repo_id(repo_name)}") end
repo_id(repo_name)
click to toggle source
# File lib/code_climate.rb, line 24 def repo_id(repo_name) repo_list.find { |repo| repo["url"].include?(repo_name) }["id"] end
repo_list()
click to toggle source
# File lib/code_climate.rb, line 20 def repo_list get('/repos') end