Skip to content

Instantly share code, notes, and snippets.

@JacksonGariety
Created January 14, 2014 21:32
Show Gist options
  • Save JacksonGariety/8426181 to your computer and use it in GitHub Desktop.
Save JacksonGariety/8426181 to your computer and use it in GitHub Desktop.
APICache.store = Moneta.new(:File, :dir => 'moneta')
repos = APICache.get("starred", :fail => []) do
repos = []
# GET
Octokit.starred(Octokit.user.login).each do |repo|
repos << [
repo.name.yellow || '',
repo.description || '',
repo.language || '',
repo.owner.login || '',
repo.stargazers_count.to_s.blue || '0',
Time.parse(repo.updated_at.to_s || '').time_ago_in_words
]
end
repos
end
puts repos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment