48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# File 'lib/nanoc/github.rb', line 48
def up
stack = Faraday::RackBuilder.new do |builder|
builder.use Faraday::HttpCache,
serializer: Marshal,
shared_cache: false,
store: Cache.new(tmp_dir),
logger: verbose ? logger : nil
builder.use ModifyMaxAge, time: max_age
builder.use Faraday::Request::Retry,
exceptions: [Octokit::ServerError]
builder.use Octokit::Middleware::FollowRedirects
builder.use Octokit::Response::RaiseError
builder.use Octokit::Response::FeedParser
builder.adapter Faraday.default_adapter
end
Octokit.middleware = stack
end
|