Last active
August 29, 2015 14:18
-
-
Save mizutaki/a1a7106e2bb1d9f12064 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' | |
require 'openssl' | |
#見にいく証明書のパスを表示 | |
OpenSSL::X509::DEFAULT_CERT_FILE = "C:/Ruby22-x64/bin/cacert.pem" | |
p OpenSSL::X509::DEFAULT_CERT_FILE | |
#危険なコード HTTPS接続時にSSLチェックを行わなくする設定 | |
#OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE | |
#インスタンス化 | |
#認証なし | |
repos = Octokit.repositories("mizutaki", {sort: :pushed_at}) | |
#OAuth 認証あり | |
#cl = Octokit::Client.new(login: "ユーザ名", oauth_token: "token_string") | |
#repos = cl.repositories("ユーザ名", {sort: :pushed_at}) | |
repos.each do |repo| | |
puts "[#{repo.name}]" | |
end | |
=begin | |
def create_gist(options = {}) | |
post 'gists', options | |
end | |
=end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment