Class: ContributorsStats::Reader::GhRepo

Inherits:
Object
  • Object
show all
Extended by:
JsonHelper
Defined in:
lib/plugins/contributors_stats/reader/gh_repo.rb

Overview

Plugin to load contributions from Github repository

Class Method Summary collapse

Methods included from JsonHelper

load_json, path_prefix, path_suffix, url_builder

Class Method Details

.load(name) {|data, name| ... } ⇒ Object

load contributions for Github repository param name [String] name of the repository to load return [Array] loaded conributors data

Yields:



12
13
14
15
16
# File 'lib/plugins/contributors_stats/reader/gh_repo.rb', line 12

def self.load(name)
  data = load_json(url_builder("repos/#{name}/contributors"))
  yield(data, name) if block_given?
  data
end