Created
January 26, 2017 23:49
-
-
Save emsk/9200603c2da1d6c6451e2d34eb731faf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'octokit' | |
MGEM_LIST_REPO = 'mruby/mgem-list' | |
client = Octokit::Client.new(access_token: '') # Note: Set access token | |
files = client.contents(MGEM_LIST_REPO) | |
puts "count of files: #{files.size}" | |
files.each do |f| | |
next unless /\A.+\.gem\z/ =~ f.path | |
content = client.contents(MGEM_LIST_REPO, path: f.path, accept: 'application/vnd.github.V3.raw') | |
name = content[%r{^name: (.+)$}, 1] | |
description = content[%r{^description: (.+)$}, 1] | |
puts "#{name}: #{description}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment