This repository was archived by the owner on Feb 24, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545#end if GitHub::Config::Secrets
4646
4747
48+ # Strategies
49+ require 'github-api-client/strategies/ask'
50+ GitHub ::Config ::Options [ :strategy ] = GitHub ::Strategies ::Ask # GitHub::CachingStrategy
51+
52+
4853# General placeholder for all of the GitHub API sweets
4954module GitHub
5055end
Original file line number Diff line number Diff line change 1+ module GitHub
2+ module Strategies
3+ module Ask
4+ class << self
5+ def should_refresh? ( model )
6+ puts "Should I refresh #{ Fetchers ::Helpers . const_name ( model ) } ? [y/n]"
7+ return gets . chomp == 'y'
8+ end
9+
10+ def update_strategy ( model ) ; end # no need for updating on this strategy
11+ end
12+ end
13+ end
14+ end
Original file line number Diff line number Diff line change @@ -2,12 +2,14 @@ module GitHub
22 class CachingStrategyNotImplemented < StandardError ; end
33 # Template
44 module CachingStrategy
5- def should_refresh? ( model )
6- throw CachingStrategyNotImplemented
7- end
8-
9- def update_strategy ( model )
10- throw CachingStrategyNotImplemented
5+ class << self
6+ def should_refresh? ( model )
7+ throw CachingStrategyNotImplemented
8+ end
9+
10+ def update_strategy ( model )
11+ throw CachingStrategyNotImplemented
12+ end
1113 end
1214 end
1315end
You can’t perform that action at this time.
0 commit comments