File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -384,7 +384,7 @@ You can now configure cache parameters as follows
384384
385385``` ruby
386386Github .configure do |config |
387- config.stack do |builder |
387+ config.stack = proc do |builder |
388388 builder.use Faraday ::HttpCache , store: Rails .cache
389389 end
390390end
Original file line number Diff line number Diff line change @@ -59,8 +59,7 @@ def stack(options = {})
5959 def connection ( api , options = { } )
6060 connection_options = default_options ( options )
6161 clear_cache unless options . empty?
62- builder = api . stack ? api . stack : stack ( options . merge! ( api : api ) )
63- connection_options . merge! ( builder : builder )
62+ connection_options . merge! ( builder : stack ( options . merge! ( api : api ) ) )
6463 connection_options . deep_merge! ( options [ :connection_options ] ) if options [ :connection_options ]
6564 if ENV [ 'DEBUG' ]
6665 p "Connection options : \n "
Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ def self.default(options = {})
2424 builder . use Github ::Response ::Jsonize
2525 builder . use Github ::Response ::AtomParser
2626 end
27+ if api . stack
28+ api . stack . call ( builder )
29+ end
2730 builder . use Github ::Response ::RaiseError
2831 builder . adapter options [ :adapter ]
2932 end
You can’t perform that action at this time.
0 commit comments