rosa-build/config/initializers/github.rb

14 lines
557 B
Ruby
Raw Normal View History

2015-12-15 07:25:48 +00:00
#configuration of Github api gem
Github_blobs_api = Octokit::Client.new(login: ENV['GITHUB_REPO_BOT_LOGIN'], password: ENV['GITHUB_REPO_BOT_PASSWORD'])
2016-03-08 02:40:23 +00:00
Octokit.configure do |c|
c.login = ENV["GITHUB_LOGIN"]
c.password = ENV["GITHUB_PASSWORD"]
end
Octokit.middleware = Faraday::RackBuilder.new do |builder|
store = ActiveSupport::Cache.lookup_store(:redis_store, ENV['REDIS_URL'].to_s + '/1')
builder.use Faraday::HttpCache, store: store, shared_cache: false
builder.use Octokit::Response::RaiseError
builder.adapter Faraday.default_adapter
end