2015-12-15 07:25:48 +00:00
|
|
|
#configuration of Github api gem
|
|
|
|
|
2020-11-15 00:07:03 +00:00
|
|
|
Github_blobs_api = Octokit::Client.new(access_token: ENV["GITHUB_REPO_BOT_ACCESS_TOKEN"])
|
2016-03-08 02:40:23 +00:00
|
|
|
|
2016-03-28 10:56:04 +01:00
|
|
|
Octokit.configure do |c|
|
2020-11-15 00:07:03 +00:00
|
|
|
c.access_token = ENV["GITHUB_ACCESS_TOKEN"]
|
2016-03-28 10:56:04 +01:00
|
|
|
end
|
|
|
|
Octokit.middleware = Faraday::RackBuilder.new do |builder|
|
|
|
|
store = ActiveSupport::Cache.lookup_store(:redis_store, ENV['REDIS_URL'].to_s + '/1')
|
2016-04-29 15:10:30 +01:00
|
|
|
builder.use Faraday::HttpCache, store: store, shared_cache: false, serializer: Marshal
|
2016-03-28 10:56:04 +01:00
|
|
|
builder.use Octokit::Response::RaiseError
|
|
|
|
builder.adapter Faraday.default_adapter
|
2020-11-15 00:07:03 +00:00
|
|
|
end
|