⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
2.7.0
/
system
/
Gem
/
FakeFetcher
/
View File Name :
cdesc-FakeFetcher.ri
U:RDoc::NormalClass[iI"FakeFetcher:ETI"Gem::FakeFetcher;TI"Object;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[I"KA fake Gem::RemoteFetcher for use in tests or to avoid real live HTTP ;TI"3requests when testing code that uses RubyGems.;To:RDoc::Markup::BlankLine o; ;[I" Example:;T@o:RDoc::Markup::Verbatim;[I"%@fetcher = Gem::FakeFetcher.new ;TI"J@fetcher.data['http://gems.example.com/yaml'] = source_index.to_yaml ;TI"+Gem::RemoteFetcher.fetcher = @fetcher ;TI" ;TI"5use nested array if multiple response is needed ;TI" ;TI"s@fetcher.data['http://gems.example.com/sequence'] = [['Success', 200, 'OK'], ['Failed', 401, 'Unauthorized']] ;TI" ;TI"Y@fetcher.fetch_path('http://gems.example.com/sequence') # => ['Success', 200, 'OK'] ;TI"b@fetcher.fetch_path('http://gems.example.com/sequence') # => ['Failed', 401, 'Unauthorized'] ;TI" ;TI"# invoke RubyGems code ;TI" ;TI"paths = @fetcher.paths ;TI">assert_equal 'http://gems.example.com/yaml', paths.shift ;TI"+assert paths.empty?, paths.join(', ') ;T:@format0o; ;[I":See RubyGems' tests for more examples of FakeFetcher.;T: @fileI"#lib/rubygems/test_utilities.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[ I" data;TI"R;T:publicFI"#lib/rubygems/test_utilities.rb;T[ I"last_request;T@/;F@0[ I" paths;TI"RW;T;F@0[ [ [[I" class;T[[;[[I"new;T@0[:protected[ [:private[ [I" instance;T[[;[ [I"cache_update_path;T@0[I" download;T@0[I"download_to_cache;T@0[I"fetch_path;T@0[I"fetch_size;T@0[I"find_data;T@0[I"open_uri_or_path;T@0[I"request;T@0[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ; 0;0[@+@+cRDoc::TopLevel