putio 0.0.1.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +27 -0
- data/Rakefile +21 -0
- data/Readme.md +32 -0
- data/development/ruby/1.8/bin/convert_to_should_syntax +19 -0
- data/development/ruby/1.8/bin/edit_json.rb +19 -0
- data/development/ruby/1.8/bin/prettify_json.rb +19 -0
- data/development/ruby/1.8/cache/crack-0.1.8.gem +0 -0
- data/development/ruby/1.8/cache/fakeweb-1.3.0.gem +0 -0
- data/development/ruby/1.8/cache/hashie-0.4.0.gem +0 -0
- data/development/ruby/1.8/cache/json-1.4.6.gem +0 -0
- data/development/ruby/1.8/cache/omg-0.0.6.gem +0 -0
- data/development/ruby/1.8/cache/shoulda-2.11.3.gem +0 -0
- data/development/ruby/1.8/gems/crack-0.1.8/.gitignore +6 -0
- data/development/ruby/1.8/gems/crack-0.1.8/History +25 -0
- data/development/ruby/1.8/gems/crack-0.1.8/LICENSE +20 -0
- data/development/ruby/1.8/gems/crack-0.1.8/README.rdoc +42 -0
- data/development/ruby/1.8/gems/crack-0.1.8/Rakefile +52 -0
- data/development/ruby/1.8/gems/crack-0.1.8/crack.gemspec +63 -0
- data/development/ruby/1.8/gems/crack-0.1.8/lib/crack/core_extensions.rb +128 -0
- data/development/ruby/1.8/gems/crack-0.1.8/lib/crack/json.rb +68 -0
- data/development/ruby/1.8/gems/crack-0.1.8/lib/crack/xml.rb +214 -0
- data/development/ruby/1.8/gems/crack-0.1.8/lib/crack.rb +8 -0
- data/development/ruby/1.8/gems/crack-0.1.8/test/crack_test.rb +4 -0
- data/development/ruby/1.8/gems/crack-0.1.8/test/data/twittersearch-firefox.json +1 -0
- data/development/ruby/1.8/gems/crack-0.1.8/test/data/twittersearch-ie.json +1 -0
- data/development/ruby/1.8/gems/crack-0.1.8/test/hash_test.rb +56 -0
- data/development/ruby/1.8/gems/crack-0.1.8/test/json_test.rb +69 -0
- data/development/ruby/1.8/gems/crack-0.1.8/test/string_test.rb +31 -0
- data/development/ruby/1.8/gems/crack-0.1.8/test/test_helper.rb +12 -0
- data/development/ruby/1.8/gems/crack-0.1.8/test/xml_test.rb +489 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/.autotest +5 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/.gitignore +7 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/CHANGELOG +215 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/LICENSE.txt +19 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/README.rdoc +189 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/Rakefile +67 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/fakeweb.gemspec +126 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/lib/fake_web/ext/net_http.rb +72 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/lib/fake_web/registry.rb +127 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/lib/fake_web/responder.rb +122 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/lib/fake_web/response.rb +10 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/lib/fake_web/stub_socket.rb +15 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/lib/fake_web/utility.rb +87 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/lib/fake_web.rb +215 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/lib/fakeweb.rb +2 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/fixtures/google_response_from_curl +12 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/fixtures/google_response_with_transfer_encoding +17 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/fixtures/google_response_without_transfer_encoding +11 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/fixtures/test_example.txt +1 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/fixtures/test_txt_file +3 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/test_allow_net_connect.rb +168 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/test_deprecations.rb +54 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/test_fake_authentication.rb +92 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/test_fake_web.rb +590 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/test_fake_web_open_uri.rb +58 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/test_helper.rb +90 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/test_last_request.rb +29 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/test_missing_open_uri.rb +25 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/test_missing_pathname.rb +37 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/test_other_net_http_libraries.rb +36 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/test_precedence.rb +79 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/test_query_string.rb +45 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/test_regexes.rb +157 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/test_response_headers.rb +79 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/test_trailing_slashes.rb +53 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/test_utility.rb +83 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/right_http_connection-1.2.4/History.txt +59 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/right_http_connection-1.2.4/Manifest.txt +7 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/right_http_connection-1.2.4/README.txt +54 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/right_http_connection-1.2.4/Rakefile +103 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/right_http_connection-1.2.4/lib/net_fix.rb +160 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/right_http_connection-1.2.4/lib/right_http_connection.rb +435 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/right_http_connection-1.2.4/setup.rb +1585 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/samuel-0.2.1/.document +5 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/samuel-0.2.1/.gitignore +5 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/samuel-0.2.1/LICENSE +20 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/samuel-0.2.1/README.rdoc +70 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/samuel-0.2.1/Rakefile +62 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/samuel-0.2.1/VERSION +1 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/samuel-0.2.1/lib/samuel/net_http.rb +10 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/samuel-0.2.1/lib/samuel/request.rb +96 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/samuel-0.2.1/lib/samuel.rb +52 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/samuel-0.2.1/samuel.gemspec +69 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/samuel-0.2.1/test/request_test.rb +193 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/samuel-0.2.1/test/samuel_test.rb +42 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/samuel-0.2.1/test/test_helper.rb +66 -0
- data/development/ruby/1.8/gems/fakeweb-1.3.0/test/vendor/samuel-0.2.1/test/thread_test.rb +32 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/.document +5 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/.gitignore +7 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/Gemfile +12 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/Gemfile.lock +24 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/LICENSE +20 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/README.rdoc +119 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/Rakefile +47 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/VERSION +1 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/hashie.gemspec +71 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/lib/hashie/clash.rb +86 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/lib/hashie/dash.rb +111 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/lib/hashie/hash.rb +24 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/lib/hashie/hash_extensions.rb +49 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/lib/hashie/mash.rb +178 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/lib/hashie/trash.rb +55 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/lib/hashie.rb +9 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/spec/hashie/clash_spec.rb +42 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/spec/hashie/dash_spec.rb +156 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/spec/hashie/hash_spec.rb +22 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/spec/hashie/mash_spec.rb +241 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/spec/hashie/trash_spec.rb +70 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/spec/spec.opts +3 -0
- data/development/ruby/1.8/gems/hashie-0.4.0/spec/spec_helper.rb +13 -0
- data/development/ruby/1.8/gems/json-1.4.6/.require_paths +4 -0
- data/development/ruby/1.8/gems/json-1.4.6/CHANGES +179 -0
- data/development/ruby/1.8/gems/json-1.4.6/COPYING +58 -0
- data/development/ruby/1.8/gems/json-1.4.6/GPL +340 -0
- data/development/ruby/1.8/gems/json-1.4.6/README +356 -0
- data/development/ruby/1.8/gems/json-1.4.6/Rakefile +292 -0
- data/development/ruby/1.8/gems/json-1.4.6/TODO +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/VERSION +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log +52 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast-autocorrelation.dat +1000 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast.dat +1001 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty-autocorrelation.dat +900 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty.dat +901 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe-autocorrelation.dat +1000 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe.dat +1001 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log +261 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast-autocorrelation.dat +1000 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast.dat +1001 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty-autocorrelation.dat +1000 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty.dat +1001 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe-autocorrelation.dat +1000 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe.dat +1001 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log +262 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator-autocorrelation.dat +1000 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator.dat +1001 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log +82 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log +34 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser-autocorrelation.dat +900 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser.dat +901 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log +81 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser-autocorrelation.dat +1000 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser.dat +1001 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log +82 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser-autocorrelation.dat +1000 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser.dat +1001 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log +82 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser-autocorrelation.dat +1000 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser.dat +1001 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log +82 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/generator2_benchmark.rb +222 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/generator_benchmark.rb +224 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/ohai.json +1216 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/ohai.ruby +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/parser2_benchmark.rb +251 -0
- data/development/ruby/1.8/gems/json-1.4.6/benchmarks/parser_benchmark.rb +259 -0
- data/development/ruby/1.8/gems/json-1.4.6/bin/edit_json.rb +9 -0
- data/development/ruby/1.8/gems/json-1.4.6/bin/prettify_json.rb +75 -0
- data/development/ruby/1.8/gems/json-1.4.6/data/example.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/data/index.html +38 -0
- data/development/ruby/1.8/gems/json-1.4.6/data/prototype.js +4184 -0
- data/development/ruby/1.8/gems/json-1.4.6/ext/json/ext/generator/Makefile +157 -0
- data/development/ruby/1.8/gems/json-1.4.6/ext/json/ext/generator/extconf.rb +20 -0
- data/development/ruby/1.8/gems/json-1.4.6/ext/json/ext/generator/generator.bundle +0 -0
- data/development/ruby/1.8/gems/json-1.4.6/ext/json/ext/generator/generator.c +1417 -0
- data/development/ruby/1.8/gems/json-1.4.6/ext/json/ext/generator/generator.h +197 -0
- data/development/ruby/1.8/gems/json-1.4.6/ext/json/ext/generator/generator.o +0 -0
- data/development/ruby/1.8/gems/json-1.4.6/ext/json/ext/generator/mkmf.log +10 -0
- data/development/ruby/1.8/gems/json-1.4.6/ext/json/ext/json/ext/generator.bundle +0 -0
- data/development/ruby/1.8/gems/json-1.4.6/ext/json/ext/json/ext/parser.bundle +0 -0
- data/development/ruby/1.8/gems/json-1.4.6/ext/json/ext/parser/Makefile +157 -0
- data/development/ruby/1.8/gems/json-1.4.6/ext/json/ext/parser/extconf.rb +15 -0
- data/development/ruby/1.8/gems/json-1.4.6/ext/json/ext/parser/mkmf.log +10 -0
- data/development/ruby/1.8/gems/json-1.4.6/ext/json/ext/parser/parser.bundle +0 -0
- data/development/ruby/1.8/gems/json-1.4.6/ext/json/ext/parser/parser.c +1935 -0
- data/development/ruby/1.8/gems/json-1.4.6/ext/json/ext/parser/parser.h +71 -0
- data/development/ruby/1.8/gems/json-1.4.6/ext/json/ext/parser/parser.o +0 -0
- data/development/ruby/1.8/gems/json-1.4.6/ext/json/ext/parser/parser.rl +792 -0
- data/development/ruby/1.8/gems/json-1.4.6/install.rb +26 -0
- data/development/ruby/1.8/gems/json-1.4.6/lib/json/Array.xpm +21 -0
- data/development/ruby/1.8/gems/json-1.4.6/lib/json/FalseClass.xpm +21 -0
- data/development/ruby/1.8/gems/json-1.4.6/lib/json/Hash.xpm +21 -0
- data/development/ruby/1.8/gems/json-1.4.6/lib/json/Key.xpm +73 -0
- data/development/ruby/1.8/gems/json-1.4.6/lib/json/NilClass.xpm +21 -0
- data/development/ruby/1.8/gems/json-1.4.6/lib/json/Numeric.xpm +28 -0
- data/development/ruby/1.8/gems/json-1.4.6/lib/json/String.xpm +96 -0
- data/development/ruby/1.8/gems/json-1.4.6/lib/json/TrueClass.xpm +21 -0
- data/development/ruby/1.8/gems/json-1.4.6/lib/json/add/core.rb +148 -0
- data/development/ruby/1.8/gems/json-1.4.6/lib/json/add/rails.rb +58 -0
- data/development/ruby/1.8/gems/json-1.4.6/lib/json/common.rb +391 -0
- data/development/ruby/1.8/gems/json-1.4.6/lib/json/editor.rb +1371 -0
- data/development/ruby/1.8/gems/json-1.4.6/lib/json/ext.rb +15 -0
- data/development/ruby/1.8/gems/json-1.4.6/lib/json/json.xpm +1499 -0
- data/development/ruby/1.8/gems/json-1.4.6/lib/json/pure/generator.rb +439 -0
- data/development/ruby/1.8/gems/json-1.4.6/lib/json/pure/parser.rb +309 -0
- data/development/ruby/1.8/gems/json-1.4.6/lib/json/pure.rb +77 -0
- data/development/ruby/1.8/gems/json-1.4.6/lib/json/version.rb +8 -0
- data/development/ruby/1.8/gems/json-1.4.6/lib/json.rb +10 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail1.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail10.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail11.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail12.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail13.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail14.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail18.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail19.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail2.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail20.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail21.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail22.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail23.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail24.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail25.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail27.json +2 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail28.json +2 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail3.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail4.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail5.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail6.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail7.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail8.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail9.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/pass1.json +56 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/pass15.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/pass16.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/pass17.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/pass2.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/pass26.json +1 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/fixtures/pass3.json +6 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/test_json.rb +394 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/test_json_addition.rb +162 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/test_json_encoding.rb +68 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/test_json_fixtures.rb +34 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/test_json_generate.rb +181 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/test_json_rails.rb +144 -0
- data/development/ruby/1.8/gems/json-1.4.6/tests/test_json_unicode.rb +76 -0
- data/development/ruby/1.8/gems/json-1.4.6/tools/fuzz.rb +139 -0
- data/development/ruby/1.8/gems/json-1.4.6/tools/server.rb +61 -0
- data/development/ruby/1.8/gems/omg-0.0.6/.document +5 -0
- data/development/ruby/1.8/gems/omg-0.0.6/.gitignore +21 -0
- data/development/ruby/1.8/gems/omg-0.0.6/LICENSE +20 -0
- data/development/ruby/1.8/gems/omg-0.0.6/README.rdoc +35 -0
- data/development/ruby/1.8/gems/omg-0.0.6/Rakefile +52 -0
- data/development/ruby/1.8/gems/omg-0.0.6/TODO +1 -0
- data/development/ruby/1.8/gems/omg-0.0.6/VERSION +1 -0
- data/development/ruby/1.8/gems/omg-0.0.6/lib/omg.rb +43 -0
- data/development/ruby/1.8/gems/omg-0.0.6/omg.gemspec +53 -0
- data/development/ruby/1.8/gems/omg-0.0.6/test/helper.rb +10 -0
- data/development/ruby/1.8/gems/omg-0.0.6/test/test_omg.rb +7 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/CONTRIBUTION_GUIDELINES.rdoc +10 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/MIT-LICENSE +22 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/README.rdoc +154 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/Rakefile +70 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/bin/convert_to_should_syntax +42 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/action_controller/macros.rb +221 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/action_controller/matchers/assign_to_matcher.rb +112 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/action_controller/matchers/filter_param_matcher.rb +74 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/action_controller/matchers/redirect_to_matcher.rb +62 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/action_controller/matchers/render_template_matcher.rb +54 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/action_controller/matchers/render_with_layout_matcher.rb +99 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/action_controller/matchers/respond_with_content_type_matcher.rb +74 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/action_controller/matchers/respond_with_matcher.rb +85 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/action_controller/matchers/route_matcher.rb +93 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/action_controller/matchers/set_session_matcher.rb +98 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb +100 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/action_controller/matchers.rb +39 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/action_controller.rb +34 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/action_mailer/assertions.rb +42 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/action_mailer/matchers/have_sent_email.rb +110 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/action_mailer/matchers.rb +22 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/action_mailer.rb +13 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/active_record/assertions.rb +69 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/active_record/helpers.rb +32 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/active_record/macros.rb +457 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/active_record/matchers/allow_mass_assignment_of_matcher.rb +83 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/active_record/matchers/allow_value_matcher.rb +110 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/active_record/matchers/association_matcher.rb +226 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/active_record/matchers/ensure_inclusion_of_matcher.rb +87 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/active_record/matchers/ensure_length_of_matcher.rb +141 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/active_record/matchers/have_db_column_matcher.rb +169 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/active_record/matchers/have_db_index_matcher.rb +112 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/active_record/matchers/have_readonly_attribute_matcher.rb +59 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/active_record/matchers/validate_acceptance_of_matcher.rb +41 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/active_record/matchers/validate_format_of_matcher.rb +65 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/active_record/matchers/validate_numericality_of_matcher.rb +39 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/active_record/matchers/validate_presence_of_matcher.rb +60 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/active_record/matchers/validate_uniqueness_of_matcher.rb +148 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/active_record/matchers/validation_matcher.rb +56 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/active_record/matchers.rb +42 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/active_record.rb +16 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/assertions.rb +79 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/autoload_macros.rb +46 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/context.rb +433 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/helpers.rb +8 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/integrations/rspec.rb +13 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/integrations/rspec2.rb +22 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/integrations/test_unit.rb +22 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/macros.rb +161 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/private_helpers.rb +13 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/proc_extensions.rb +14 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/rails.rb +8 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/tasks/list_tests.rake +29 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/tasks/yaml_to_shoulda.rake +28 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/tasks.rb +3 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/version.rb +4 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda.rb +9 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/rails/init.rb +8 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/README +36 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/fail_macros.rb +55 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/fixtures/addresses.yml +3 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/fixtures/friendships.yml +0 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/fixtures/posts.yml +5 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/fixtures/products.yml +0 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/fixtures/taggings.yml +0 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/fixtures/tags.yml +9 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/fixtures/users.yml +6 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/functional/posts_controller_test.rb +121 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/functional/users_controller_test.rb +19 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/action_mailer/have_sent_email_test.rb +70 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/active_record/allow_mass_assignment_of_matcher_test.rb +74 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/active_record/allow_value_matcher_test.rb +64 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/active_record/association_matcher_test.rb +263 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/active_record/ensure_inclusion_of_matcher_test.rb +81 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/active_record/ensure_length_of_matcher_test.rb +158 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/active_record/have_db_column_matcher_test.rb +169 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/active_record/have_db_index_matcher_test.rb +91 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/active_record/have_readonly_attributes_matcher_test.rb +29 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/active_record/validate_acceptance_of_matcher_test.rb +44 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/active_record/validate_format_of_matcher_test.rb +39 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/active_record/validate_numericality_of_matcher_test.rb +52 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/active_record/validate_presence_of_matcher_test.rb +86 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/active_record/validate_uniqueness_of_matcher_test.rb +147 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/controller/assign_to_matcher_test.rb +45 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/controller/filter_param_matcher_test.rb +40 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/controller/redirect_to_matcher_test.rb +37 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/controller/render_template_matcher_test.rb +37 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/controller/render_with_layout_matcher_test.rb +47 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/controller/respond_with_content_type_matcher_test.rb +32 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/controller/respond_with_matcher_test.rb +96 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/controller/route_matcher_test.rb +75 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/controller/set_session_matcher_test.rb +48 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/matchers/controller/set_the_flash_matcher.rb +95 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/other/autoload_macro_test.rb +18 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/other/context_test.rb +372 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/other/convert_to_should_syntax_test.rb +63 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/other/helpers_test.rb +317 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/other/private_helpers_test.rb +32 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/other/should_test.rb +271 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_model_builder.rb +130 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/controllers/application_controller.rb +22 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/controllers/posts_controller.rb +87 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/controllers/users_controller.rb +84 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/helpers/application_helper.rb +3 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/helpers/posts_helper.rb +2 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/helpers/users_helper.rb +2 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/models/address.rb +7 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/models/flea.rb +11 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/models/friendship.rb +4 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/models/notifier.rb +8 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/models/pets/cat.rb +7 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/models/pets/dog.rb +10 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/models/post.rb +12 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/models/product.rb +12 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/models/profile.rb +2 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/models/registration.rb +2 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/models/tag.rb +8 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/models/tagging.rb +4 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/models/treat.rb +3 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/models/user.rb +32 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/views/layouts/posts.rhtml +19 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/views/layouts/users.rhtml +17 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/views/layouts/wide.html.erb +1 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/views/notifier/the_email.html.erb +1 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/views/posts/edit.rhtml +27 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/views/posts/index.rhtml +25 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/views/posts/new.rhtml +26 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/views/posts/show.rhtml +18 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/views/users/edit.rhtml +22 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/views/users/index.rhtml +22 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/views/users/new.rhtml +21 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/app/views/users/show.rhtml +13 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/config/boot.rb +110 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/config/database.yml +4 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/config/environment.rb +17 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/config/environments/test.rb +23 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/config/initializers/new_rails_defaults.rb +15 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/config/initializers/shoulda.rb +8 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/config/routes.rb +6 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/db/migrate/001_create_users.rb +19 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/db/migrate/002_create_posts.rb +13 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/db/migrate/003_create_taggings.rb +12 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/db/migrate/004_create_tags.rb +11 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/db/migrate/005_create_dogs.rb +12 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/db/migrate/006_create_addresses.rb +14 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/db/migrate/007_create_fleas.rb +11 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/db/migrate/008_create_dogs_fleas.rb +12 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/db/migrate/009_create_products.rb +17 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/db/migrate/010_create_friendships.rb +14 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/db/migrate/011_create_treats.rb +12 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/db/migrate/20090506203502_create_profiles.rb +12 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/db/migrate/20090506203536_create_registrations.rb +14 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/db/migrate/20090513104502_create_cats.rb +12 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/db/schema.rb +0 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/log/test.log +50381 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/public/404.html +30 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/public/422.html +30 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/public/500.html +30 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/script/console +3 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/script/generate +3 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/test/shoulda_macros/custom_macro.rb +6 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/vendor/gems/gem_with_macro-0.0.1/shoulda_macros/gem_macro.rb +6 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_root/vendor/plugins/plugin_with_macro/shoulda_macros/plugin_macro.rb +6 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails2_test_helper.rb +6 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_model_builder.rb +118 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/Gemfile +28 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/README +244 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/Rakefile +10 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/controllers/application_controller.rb +22 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/controllers/posts_controller.rb +87 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/controllers/users_controller.rb +82 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/helpers/application_helper.rb +2 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/models/address.rb +7 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/models/flea.rb +11 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/models/friendship.rb +4 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/models/notifier.rb +8 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/models/pets/cat.rb +7 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/models/pets/dog.rb +10 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/models/post.rb +12 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/models/product.rb +12 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/models/profile.rb +2 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/models/registration.rb +2 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/models/tag.rb +8 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/models/tagging.rb +4 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/models/treat.rb +3 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/models/user.rb +32 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/views/layouts/application.html.erb +14 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/views/layouts/posts.rhtml +19 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/views/layouts/users.rhtml +17 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/views/layouts/wide.html.erb +1 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/views/notifier/the_email.html.erb +1 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/views/posts/edit.rhtml +27 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/views/posts/index.rhtml +25 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/views/posts/new.rhtml +24 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/views/posts/show.rhtml +18 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/views/users/edit.rhtml +22 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/views/users/index.rhtml +22 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/views/users/new.rhtml +21 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/app/views/users/show.rhtml +13 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/config/application.rb +46 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/config/boot.rb +6 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/config/database.yml +22 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/config/environment.rb +5 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/config/environments/development.rb +19 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/config/environments/production.rb +42 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/config/environments/test.rb +32 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/config/initializers/backtrace_silencers.rb +7 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/config/initializers/inflections.rb +10 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/config/initializers/mime_types.rb +5 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/config/initializers/secret_token.rb +7 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/config/initializers/session_store.rb +8 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/config/locales/en.yml +5 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/config/routes.rb +4 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/config.ru +4 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/db/migrate/001_create_users.rb +19 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/db/migrate/002_create_posts.rb +13 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/db/migrate/003_create_taggings.rb +12 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/db/migrate/004_create_tags.rb +11 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/db/migrate/005_create_dogs.rb +12 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/db/migrate/006_create_addresses.rb +14 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/db/migrate/007_create_fleas.rb +11 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/db/migrate/008_create_dogs_fleas.rb +12 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/db/migrate/009_create_products.rb +17 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/db/migrate/010_create_friendships.rb +14 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/db/migrate/011_create_treats.rb +12 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/db/migrate/20090506203502_create_profiles.rb +12 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/db/migrate/20090506203536_create_registrations.rb +14 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/db/migrate/20090513104502_create_cats.rb +12 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/db/seeds.rb +7 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/db/test.sqlite3 +0 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/log/test.log +10834 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/public/404.html +26 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/public/422.html +26 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/public/500.html +26 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/public/favicon.ico +0 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/public/images/rails.png +0 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/public/index.html +279 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/public/javascripts/application.js +2 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/public/javascripts/controls.js +965 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/public/javascripts/dragdrop.js +974 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/public/javascripts/effects.js +1123 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/public/javascripts/prototype.js +4874 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/public/javascripts/rails.js +118 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/public/robots.txt +5 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/script/rails +9 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/test/performance/browsing_test.rb +9 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_root/test/test_helper.rb +13 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rails3_test_helper.rb +6 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/rspec_test.rb +207 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/test_helper.rb +36 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/unit/address_test.rb +10 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/unit/cat_test.rb +7 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/unit/dog_test.rb +9 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/unit/flea_test.rb +14 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/unit/friendship_test.rb +6 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/unit/post_test.rb +15 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/unit/product_test.rb +23 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/unit/tag_test.rb +11 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/unit/tagging_test.rb +6 -0
- data/development/ruby/1.8/gems/shoulda-2.11.3/test/unit/user_test.rb +46 -0
- data/development/ruby/1.8/specifications/crack-0.1.8.gemspec +30 -0
- data/development/ruby/1.8/specifications/fakeweb-1.3.0.gemspec +34 -0
- data/development/ruby/1.8/specifications/hashie-0.4.0.gemspec +33 -0
- data/development/ruby/1.8/specifications/json-1.4.6.gemspec +34 -0
- data/development/ruby/1.8/specifications/omg-0.0.6.gemspec +30 -0
- data/development/ruby/1.8/specifications/shoulda-2.11.3.gemspec +32 -0
- data/lib/putio/client.rb +74 -0
- data/lib/putio/putio.rb +5 -0
- data/lib/putio.rb +4 -0
- data/putio.gemspec +25 -0
- data/test/fixtures/user_friends.json +1 -0
- data/test/fixtures/user_info.json +1 -0
- data/test/test_helper.rb +19 -0
- data/test/units/client_test.rb +11 -0
- data/test/units/putio_test.rb +11 -0
- data/test/units/user_test.rb +39 -0
- metadata +675 -0
@@ -0,0 +1,215 @@
|
|
1
|
+
fakeweb (1.3.0)
|
2
|
+
|
3
|
+
* improve response header registration so you can pass an array to set a header
|
4
|
+
more than once [Myron Marston]
|
5
|
+
|
6
|
+
* fix an exception when the response's :body option was set to nil [Chris Zingel]
|
7
|
+
|
8
|
+
* fix that stubbed requests weren't mutating the Net::HTTP request object to set
|
9
|
+
the body and content-length, like real requests do [Chris Kampmeier]
|
10
|
+
|
11
|
+
* add FakeWeb.last_request [Chris Kampmeier]
|
12
|
+
|
13
|
+
* assigning a String or Regexp to FakeWeb.allow_net_connect= sets a whitelist
|
14
|
+
for outbound requests [Dan Dofter, Tim Carey-Smith, Ben Woosley]
|
15
|
+
|
16
|
+
|
17
|
+
fakeweb (1.2.8)
|
18
|
+
|
19
|
+
* support Pathname objects where a filename is expected [Chris Kampmeier]
|
20
|
+
|
21
|
+
* fix compatibility with Ruby 1.9.2 [Chris Kampmeier]
|
22
|
+
|
23
|
+
* simplify storage of FakeWeb::VERSION [Josh Peek, Woody Peterson, Ben Woosley]
|
24
|
+
|
25
|
+
|
26
|
+
fakeweb (1.2.7)
|
27
|
+
|
28
|
+
* revert to sorting query params before matching requests against regexps,
|
29
|
+
instead of the 1.2.6 behavior that tried every possible order combination;
|
30
|
+
that was factorial-time, which made matching hang for requests with long query
|
31
|
+
strings [Jason Wadsworth, David Dollar, Blaine Cook]
|
32
|
+
|
33
|
+
* print a warning when FakeWeb is loaded before RightHttpConnection or after
|
34
|
+
Samuel, other libs that patch Net::HTTP [Chris Kampmeier, Ben Brinckerhoff]
|
35
|
+
|
36
|
+
|
37
|
+
fakeweb (1.2.6)
|
38
|
+
|
39
|
+
* fix that query params in a regex would have to be sorted for it to ever match
|
40
|
+
a request URI [Chris Kampmeier, Ben Hall]
|
41
|
+
|
42
|
+
* improve regex handling so registration with an explicit port (like
|
43
|
+
/example.com:80/) matches a request that uses an implied port
|
44
|
+
(like "http://example.com/") [Chris Kampmeier, Dan Dofter]
|
45
|
+
|
46
|
+
* refactor URI registry to reduce duplication; now about twice as fast at
|
47
|
+
handling requests [Chris Kampmeier]
|
48
|
+
|
49
|
+
* Add FakeWeb::VERSION so you can programmatically determine what version of
|
50
|
+
FakeWeb is loaded without using RubyGems [Chris Kampmeier, Chris Wanstrath]
|
51
|
+
|
52
|
+
|
53
|
+
fakeweb (1.2.5)
|
54
|
+
|
55
|
+
* fix handling of userinfo strings that contain percent-encoded unsafe
|
56
|
+
characters [Chris Kampmeier, Ken Mayer]
|
57
|
+
|
58
|
+
* fix that exact matches against strings/URIs with the :any method had a lower
|
59
|
+
precedence than regex matches using a real HTTP method (exact matches now
|
60
|
+
always take precedence) [Chris Kampmeier]
|
61
|
+
|
62
|
+
* change request handling to raise an exception when more than one registered
|
63
|
+
regex matches a request URI [Chris Kampmeier]
|
64
|
+
|
65
|
+
|
66
|
+
fakeweb (1.2.4)
|
67
|
+
|
68
|
+
* add experimental support for matching URIs via regular expressions
|
69
|
+
[Jacqui Maher, Tiago Albineli Motta, Peter Wagene]
|
70
|
+
|
71
|
+
* fix an exception when registering with the :response option and a string that
|
72
|
+
is the same as the name of a directory in the current path [Chris Kampmeier]
|
73
|
+
|
74
|
+
* DEPRECATION: Calling FakeWeb.register_uri with a :string or :file option is
|
75
|
+
now deprecated. Both options have been replaced with a unified :body option,
|
76
|
+
since they supply the response body (as opposed to :response, which supplies
|
77
|
+
the full response including headers) [Chris Kampmeier]
|
78
|
+
|
79
|
+
* add support for specifying HTTP headers as options to FakeWeb.register_uri
|
80
|
+
when using the :string or :file response types, since those methods only
|
81
|
+
specify a response body [David Michael, Chris Kampmeier]
|
82
|
+
|
83
|
+
* DEPRECATION: Calling FakeWeb.register_uri and FakeWeb.registered_uri? without
|
84
|
+
an HTTP method as the first argument is now deprecated. To match against any
|
85
|
+
HTTP method (the pre-1.2.0 behavior), use :any [Chris Kampmeier]
|
86
|
+
|
87
|
+
|
88
|
+
fakeweb (1.2.3)
|
89
|
+
|
90
|
+
* fix the #http_version of :file and :string responses, which was returning the
|
91
|
+
request URI instead of something sensible like "1.0" [Chris Kampmeier]
|
92
|
+
|
93
|
+
* add method aliases in the Net::HTTP patch to eliminate warnings when running
|
94
|
+
with -w [Joshua Clingenpeel]
|
95
|
+
|
96
|
+
* fix that removing the redefinition of OpenURI::HTTPError in 1.2.0 caused
|
97
|
+
:exception responses to raise when OpenURI isn't available [Chris Kampmeier]
|
98
|
+
|
99
|
+
* fix registering an :exception response with classes that require arguments for
|
100
|
+
instantiation, like Interrupt's subclasses [Chris Kampmeier]
|
101
|
+
|
102
|
+
|
103
|
+
fakeweb (1.2.2)
|
104
|
+
|
105
|
+
* fix that HTTP Digest and OAuth requests could raise URI::InvalidURIErrors
|
106
|
+
[Bill Kocik, Chris Kampmeier]
|
107
|
+
|
108
|
+
|
109
|
+
fakeweb (1.2.1)
|
110
|
+
|
111
|
+
* fix that query parameters are handled correctly when registering with a URI
|
112
|
+
object [Anselmo Alves, Chris Kampmeier]
|
113
|
+
|
114
|
+
* fix an exception when registering with the :response option and a string
|
115
|
+
containing "\0" [Jonathan Baudanza, Chris Kampmeier]
|
116
|
+
|
117
|
+
* fix that trailing slashes were considered significant for requests to the root
|
118
|
+
of a domain [Chris Kampmeier]
|
119
|
+
|
120
|
+
* add support for HTTP basic authentication via userinfo strings in URIs
|
121
|
+
[Michael Bleigh]
|
122
|
+
|
123
|
+
|
124
|
+
fakeweb (1.2.0)
|
125
|
+
|
126
|
+
* add lib/fakeweb.rb so you can require "fakeweb" as well [Chris Kampmeier]
|
127
|
+
|
128
|
+
* fix compatibility with Ruby 1.9.1 [Chris Kampmeier]
|
129
|
+
|
130
|
+
* fix that newlines in file-based responses could be doubled in the response
|
131
|
+
object's body [Mark Menard, Chris Kampmeier]
|
132
|
+
|
133
|
+
* fix unnecessary munging of the transfer-encoding header, which improves
|
134
|
+
compatibility with mechanize [Mark Menard]
|
135
|
+
|
136
|
+
* fix a test and the RCov dependency to be compatible with JRuby [Mark Menard]
|
137
|
+
|
138
|
+
* remove an unnecessary redefinition of OpenURI::HTTPError [Josh Nichols]
|
139
|
+
|
140
|
+
* rearrange implementation code into separate files, one per class [Josh Nichols]
|
141
|
+
|
142
|
+
* fix a bug where FakeWeb.response_for would raise if the request wasn't
|
143
|
+
registered [Chris Kampmeier]
|
144
|
+
|
145
|
+
* add HTTP method support, so FakeWeb takes both the URI and method into
|
146
|
+
account for registration, requests, and responses. Backwards-compatible with
|
147
|
+
the old method signatures, which didn't have a method param. [Chris Kampmeier]
|
148
|
+
|
149
|
+
* start work on Ruby 1.9 compatibility [Chris Kampmeier]
|
150
|
+
|
151
|
+
* add FakeWeb.allow_net_connect= to enable/disable the pass-through to
|
152
|
+
Net::HTTP for unregistered URIs [Mislav Marohnić, Chris Kampmeier]
|
153
|
+
|
154
|
+
* remove setup.rb, since most people use RubyGems [Mislav Marohnić]
|
155
|
+
|
156
|
+
* fix that 'http://example.com/?' (empty query) matches a registered
|
157
|
+
'http://example.com/', and vice-versa [Mislav Marohnić]
|
158
|
+
|
159
|
+
* improve the test suite to not rely on an internet connection [Chris Kampmeier]
|
160
|
+
|
161
|
+
* use `rake test` instead of `rake tests` [Josh Nichols]
|
162
|
+
|
163
|
+
* fix an incompatibility with Ruby 1.8.6 p36 where you'd get "Errno::EINTR:
|
164
|
+
Interrupted system call" exceptions in Socket#sysread for any non-faked
|
165
|
+
request [Chris Kampmeier]
|
166
|
+
|
167
|
+
* response rotation: you can now optionally call FakeWeb.register_uri with an
|
168
|
+
array of options hashes; these are used, in order, to respond to
|
169
|
+
repeated requests (to repeat a response more than once before rotating, use
|
170
|
+
the :times option). Once you run out of responses, further requests always
|
171
|
+
receive the last response. [Michael Shapiro]
|
172
|
+
|
173
|
+
* add support for Net::HTTP's undocumented full-URI request style (fixes
|
174
|
+
URI::InvalidURIErrors that you might see in older libraries) [Chris Kampmeier]
|
175
|
+
|
176
|
+
* sort query params before storing internally, so that
|
177
|
+
http://example.com/?a=1&b=2 and http://example.com/?b=2&a=1 are considered the
|
178
|
+
same URL (although this is technically incorrect, it's much more
|
179
|
+
convenient--most web apps work that way, and Net::HTTP's use of a hash to pass
|
180
|
+
query params means that the order in which FakeWeb stores them can be
|
181
|
+
unpredictable) [Chris Kampmeier]
|
182
|
+
|
183
|
+
* add support for ports in URLs, so that http://example.com/ and
|
184
|
+
http://example.com:3000/ are not the same [Chris Kampmeier]
|
185
|
+
|
186
|
+
* fix for non-faked SSL requests failing with "Unable to create local socket"
|
187
|
+
[Chris Kampmeier]
|
188
|
+
|
189
|
+
* update Rakefile to fix warning about deprecated code [Chris Kampmeier]
|
190
|
+
|
191
|
+
|
192
|
+
fakeweb (1.1.2)
|
193
|
+
|
194
|
+
* add required dependencies to GemSpec to ensure that tests pass in firebrigade
|
195
|
+
(http://firebrigade.seattlerb.org/) [Blaine Cook]
|
196
|
+
|
197
|
+
|
198
|
+
fakeweb (1.1.1)
|
199
|
+
|
200
|
+
* fix for non-existence of :string method on File as presented by open-uri
|
201
|
+
[Blaine Cook]
|
202
|
+
|
203
|
+
* fix for curl example test - google redirects to ccTLDs for those outside US
|
204
|
+
[Blaine Cook]
|
205
|
+
|
206
|
+
|
207
|
+
fakeweb (1.1.0)
|
208
|
+
|
209
|
+
* update code to correspond to ruby 1.8.4 (breaks compatibility with ruby 1.8.2)
|
210
|
+
[Blaine Cook]
|
211
|
+
|
212
|
+
|
213
|
+
fakeweb (1.0.0)
|
214
|
+
|
215
|
+
* initial import [Blaine Cook]
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright 2006-2010 Blaine Cook, Chris Kampmeier, and other contributors
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
@@ -0,0 +1,189 @@
|
|
1
|
+
= FakeWeb
|
2
|
+
|
3
|
+
FakeWeb is a helper for faking web requests in Ruby. It works at a global
|
4
|
+
level, without modifying code or writing extensive stubs.
|
5
|
+
|
6
|
+
|
7
|
+
== Installation
|
8
|
+
|
9
|
+
gem install fakeweb
|
10
|
+
|
11
|
+
Note: the gem was previously available as +FakeWeb+ (capital letters), but now
|
12
|
+
all versions are simply registered as +fakeweb+. If you have any old +FakeWeb+
|
13
|
+
gems lying around, remove them: <tt>gem uninstall FakeWeb</tt>
|
14
|
+
|
15
|
+
|
16
|
+
== Help and discussion
|
17
|
+
|
18
|
+
RDocs for the current release are available at http://fakeweb.rubyforge.org.
|
19
|
+
|
20
|
+
There's a mailing list for questions and discussion at
|
21
|
+
http://groups.google.com/group/fakeweb-users.
|
22
|
+
|
23
|
+
The main source repository is http://github.com/chrisk/fakeweb.
|
24
|
+
|
25
|
+
== Examples
|
26
|
+
|
27
|
+
Start by requiring FakeWeb:
|
28
|
+
|
29
|
+
require 'fakeweb'
|
30
|
+
|
31
|
+
=== Registering basic string responses
|
32
|
+
|
33
|
+
FakeWeb.register_uri(:get, "http://example.com/test1", :body => "Hello World!")
|
34
|
+
|
35
|
+
Net::HTTP.get(URI.parse("http://example.com/test1"))
|
36
|
+
=> "Hello World!"
|
37
|
+
|
38
|
+
Net::HTTP.get(URI.parse("http://example.com/test2"))
|
39
|
+
=> FakeWeb is bypassed and the response from a real request is returned
|
40
|
+
|
41
|
+
You can also call <tt>register_uri</tt> with a regular expression, to match
|
42
|
+
more than one URI.
|
43
|
+
|
44
|
+
FakeWeb.register_uri(:get, %r|http://example\.com/|, :body => "Hello World!")
|
45
|
+
|
46
|
+
Net::HTTP.get(URI.parse("http://example.com/test3"))
|
47
|
+
=> "Hello World!"
|
48
|
+
|
49
|
+
=== Replaying a recorded response
|
50
|
+
|
51
|
+
page = `curl -is http://www.google.com/`
|
52
|
+
FakeWeb.register_uri(:get, "http://www.google.com/", :response => page)
|
53
|
+
|
54
|
+
Net::HTTP.get(URI.parse("http://www.google.com/"))
|
55
|
+
# => Full response, including headers
|
56
|
+
|
57
|
+
=== Adding a custom status to the response
|
58
|
+
|
59
|
+
FakeWeb.register_uri(:get, "http://example.com/", :body => "Nothing to be found 'round here",
|
60
|
+
:status => ["404", "Not Found"])
|
61
|
+
|
62
|
+
Net::HTTP.start("example.com") do |req|
|
63
|
+
response = req.get("/")
|
64
|
+
response.code # => "404"
|
65
|
+
response.message # => "Not Found"
|
66
|
+
response.body # => "Nothing to be found 'round here"
|
67
|
+
end
|
68
|
+
|
69
|
+
=== Responding to any HTTP method
|
70
|
+
|
71
|
+
FakeWeb.register_uri(:any, "http://example.com", :body => "response for any HTTP method")
|
72
|
+
|
73
|
+
If you use the <tt>:any</tt> symbol, the URI you specify will be completely
|
74
|
+
stubbed out (regardless of the HTTP method of the request). This can be useful
|
75
|
+
for RPC-style services, where the HTTP method isn't significant. (Older
|
76
|
+
versions of FakeWeb always behaved like this, and didn't accept the first
|
77
|
+
+method+ argument above; this syntax is now deprecated.)
|
78
|
+
|
79
|
+
=== Rotating responses
|
80
|
+
|
81
|
+
You can optionally call <tt>FakeWeb.register_uri</tt> with an array of options
|
82
|
+
hashes; these are used, in order, to respond to repeated requests. Once you run
|
83
|
+
out of responses, further requests always receive the last response. (You can
|
84
|
+
also send a response more than once before rotating, by specifying a
|
85
|
+
<tt>:times</tt> option for that response.)
|
86
|
+
|
87
|
+
FakeWeb.register_uri(:delete, "http://example.com/posts/1",
|
88
|
+
[{:body => "Post 1 deleted.", :status => ["200", "OK"]},
|
89
|
+
{:body => "Post not found", :status => ["404", "Not Found"]}])
|
90
|
+
|
91
|
+
Net::HTTP.start("example.com") do |req|
|
92
|
+
req.delete("/posts/1").body # => "Post 1 deleted"
|
93
|
+
req.delete("/posts/1").body # => "Post not found"
|
94
|
+
req.delete("/posts/1").body # => "Post not found"
|
95
|
+
end
|
96
|
+
|
97
|
+
=== Using HTTP basic authentication
|
98
|
+
|
99
|
+
You can fake requests that use basic authentication by adding +userinfo+ strings
|
100
|
+
to your URIs:
|
101
|
+
|
102
|
+
FakeWeb.register_uri(:get, "http://example.com/secret", :body => "Unauthorized", :status => ["401", "Unauthorized"])
|
103
|
+
FakeWeb.register_uri(:get, "http://user:pass@example.com/secret", :body => "Authorized")
|
104
|
+
|
105
|
+
Net::HTTP.start("example.com") do |http|
|
106
|
+
req = Net::HTTP::Get.new("/secret")
|
107
|
+
http.request(req) # => "Unauthorized"
|
108
|
+
req.basic_auth("user", "pass")
|
109
|
+
http.request(req) # => "Authorized"
|
110
|
+
end
|
111
|
+
|
112
|
+
=== Clearing registered URIs
|
113
|
+
|
114
|
+
The FakeWeb registry is a singleton that lasts for the duration of your program,
|
115
|
+
maintaining every fake response you register. If needed, you can clean out the
|
116
|
+
registry and remove all registered URIs:
|
117
|
+
|
118
|
+
FakeWeb.clean_registry
|
119
|
+
|
120
|
+
=== Blocking all real requests
|
121
|
+
|
122
|
+
When you're using FakeWeb to replace _all_ of your requests, it's useful to
|
123
|
+
catch when requests are made for unregistered URIs (unlike the default
|
124
|
+
behavior, which is to pass those requests through to Net::HTTP as usual).
|
125
|
+
|
126
|
+
FakeWeb.allow_net_connect = false
|
127
|
+
Net::HTTP.get(URI.parse("http://example.com/"))
|
128
|
+
=> raises FakeWeb::NetConnectNotAllowedError
|
129
|
+
|
130
|
+
FakeWeb.allow_net_connect = true
|
131
|
+
Net::HTTP.get(URI.parse("http://example.com/"))
|
132
|
+
=> FakeWeb is bypassed and the response from a real request is returned
|
133
|
+
|
134
|
+
It's recommended that you set <tt>FakeWeb.allow_net_connect = false</tt> in the
|
135
|
+
setup for your tests.
|
136
|
+
|
137
|
+
==== Allowing requests to a specific server
|
138
|
+
|
139
|
+
If you want to prevent your tests from hitting the internet while allowing
|
140
|
+
access to a specific server for integration testing, you can assign a URI or
|
141
|
+
+Regexp+ to be used as a whitelist for outbound requests:
|
142
|
+
|
143
|
+
FakeWeb.allow_net_connect = %r[^https?://localhost]
|
144
|
+
Net::HTTP.get(URI.parse("http://localhost/path")) # => allowed
|
145
|
+
Net::HTTP.get(URI.parse("http://example.com/")) # => raises FakeWeb::NetConnectNotAllowedError
|
146
|
+
|
147
|
+
=== Specifying HTTP response headers
|
148
|
+
|
149
|
+
When you register a response using the <tt>:body</tt> option, you're only
|
150
|
+
setting the body of the response. If you want to add headers to these responses,
|
151
|
+
simply add the header as an option to +register_uri+:
|
152
|
+
|
153
|
+
FakeWeb.register_uri(:get, "http://example.com/hello.txt", :body => "Hello", :content_type => "text/plain")
|
154
|
+
|
155
|
+
This sets the "Content-Type" header in the response.
|
156
|
+
|
157
|
+
=== Checking the last request
|
158
|
+
|
159
|
+
It's often useful to retrieve the last request made by your code, so you can
|
160
|
+
write tests for its content. FakeWeb keeps track of the last request, whether it
|
161
|
+
was stubbed or not:
|
162
|
+
|
163
|
+
Net::HTTP.get(URI.parse("http://example.com"))
|
164
|
+
FakeWeb.last_request # => Net::HTTP::Get request object
|
165
|
+
|
166
|
+
== More info
|
167
|
+
|
168
|
+
FakeWeb lets you decouple your test environment from live services without
|
169
|
+
modifying code or writing extensive stubs.
|
170
|
+
|
171
|
+
In addition to the conceptual advantage of having idempotent request
|
172
|
+
behaviour, FakeWeb makes tests run faster than if they were made to remote (or
|
173
|
+
even local) web servers. It also makes it possible to run tests without a
|
174
|
+
network connection or in situations where the server is behind a firewall or
|
175
|
+
has host-based access controls.
|
176
|
+
|
177
|
+
FakeWeb works with anything based on Net::HTTP--both higher-level wrappers,
|
178
|
+
like OpenURI, as well as a ton of libraries for popular web services.
|
179
|
+
|
180
|
+
|
181
|
+
== Known Issues
|
182
|
+
|
183
|
+
* Request bodies are ignored, including PUT and POST parameters. If you need
|
184
|
+
different responses for different request bodies, you need to request
|
185
|
+
different URLs, and register different responses for each. (Query strings are
|
186
|
+
fully supported, though.) We're currently considering how the API should
|
187
|
+
change to add support for request bodies in 1.3.0. Your input would be really
|
188
|
+
helpful: see http://groups.google.com/group/fakeweb-users/browse_thread/thread/44d190a6b12e4273
|
189
|
+
for a discussion of some different options. Thanks!
|
@@ -0,0 +1,67 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
version = '1.3.0'
|
5
|
+
|
6
|
+
begin
|
7
|
+
require 'jeweler'
|
8
|
+
Jeweler::Tasks.new do |gem|
|
9
|
+
gem.name = "fakeweb"
|
10
|
+
gem.rubyforge_project = "fakeweb"
|
11
|
+
gem.version = version
|
12
|
+
gem.summary = "A tool for faking responses to HTTP requests"
|
13
|
+
gem.description = "FakeWeb is a helper for faking web requests in Ruby. It works at a global level, without modifying code or writing extensive stubs."
|
14
|
+
gem.email = ["chris@kampers.net", "romeda@gmail.com"]
|
15
|
+
gem.authors = ["Chris Kampmeier", "Blaine Cook"]
|
16
|
+
gem.homepage = "http://github.com/chrisk/fakeweb"
|
17
|
+
gem.add_development_dependency "mocha", ">= 0.9.5"
|
18
|
+
end
|
19
|
+
rescue LoadError
|
20
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
require 'rake/testtask'
|
25
|
+
Rake::TestTask.new(:test) do |test|
|
26
|
+
test.test_files = FileList["test/**/*.rb"].exclude("test/test_helper.rb", "test/vendor")
|
27
|
+
test.libs << "test"
|
28
|
+
test.verbose = false
|
29
|
+
test.warning = true
|
30
|
+
end
|
31
|
+
|
32
|
+
task :default => [:check_dependencies, :test]
|
33
|
+
|
34
|
+
|
35
|
+
begin
|
36
|
+
require 'rcov/rcovtask'
|
37
|
+
Rcov::RcovTask.new do |t|
|
38
|
+
t.test_files = FileList["test/**/*.rb"].exclude("test/test_helper.rb", "test/vendor")
|
39
|
+
t.libs << "test"
|
40
|
+
t.rcov_opts << "--sort coverage"
|
41
|
+
t.rcov_opts << "--exclude gems"
|
42
|
+
t.warning = true
|
43
|
+
end
|
44
|
+
rescue LoadError
|
45
|
+
print "rcov support disabled "
|
46
|
+
if RUBY_PLATFORM =~ /java/
|
47
|
+
puts "(running under JRuby)"
|
48
|
+
else
|
49
|
+
puts "(install RCov to enable the `rcov` task)"
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
|
54
|
+
begin
|
55
|
+
require 'sdoc'
|
56
|
+
require 'rdoc/task'
|
57
|
+
Rake::RDocTask.new do |rdoc|
|
58
|
+
rdoc.main = "README.rdoc"
|
59
|
+
rdoc.rdoc_files.include("README.rdoc", "CHANGELOG", "LICENSE.txt", "lib/*.rb")
|
60
|
+
rdoc.title = "FakeWeb #{version} API Documentation"
|
61
|
+
rdoc.rdoc_dir = "doc"
|
62
|
+
rdoc.template = "direct"
|
63
|
+
rdoc.options << "--line-numbers" << "--show-hash" << "--charset=utf-8"
|
64
|
+
end
|
65
|
+
rescue LoadError
|
66
|
+
puts "SDoc (or a dependency) not available. Install it with: gem install sdoc"
|
67
|
+
end
|
@@ -0,0 +1,126 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{fakeweb}
|
8
|
+
s.version = "1.3.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Chris Kampmeier", "Blaine Cook"]
|
12
|
+
s.date = %q{2010-08-22}
|
13
|
+
s.description = %q{FakeWeb is a helper for faking web requests in Ruby. It works at a global level, without modifying code or writing extensive stubs.}
|
14
|
+
s.email = ["chris@kampers.net", "romeda@gmail.com"]
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".autotest",
|
21
|
+
".gitignore",
|
22
|
+
"CHANGELOG",
|
23
|
+
"LICENSE.txt",
|
24
|
+
"README.rdoc",
|
25
|
+
"Rakefile",
|
26
|
+
"fakeweb.gemspec",
|
27
|
+
"lib/fake_web.rb",
|
28
|
+
"lib/fake_web/ext/net_http.rb",
|
29
|
+
"lib/fake_web/registry.rb",
|
30
|
+
"lib/fake_web/responder.rb",
|
31
|
+
"lib/fake_web/response.rb",
|
32
|
+
"lib/fake_web/stub_socket.rb",
|
33
|
+
"lib/fake_web/utility.rb",
|
34
|
+
"lib/fakeweb.rb",
|
35
|
+
"test/fixtures/google_response_from_curl",
|
36
|
+
"test/fixtures/google_response_with_transfer_encoding",
|
37
|
+
"test/fixtures/google_response_without_transfer_encoding",
|
38
|
+
"test/fixtures/test_example.txt",
|
39
|
+
"test/fixtures/test_txt_file",
|
40
|
+
"test/test_allow_net_connect.rb",
|
41
|
+
"test/test_deprecations.rb",
|
42
|
+
"test/test_fake_authentication.rb",
|
43
|
+
"test/test_fake_web.rb",
|
44
|
+
"test/test_fake_web_open_uri.rb",
|
45
|
+
"test/test_helper.rb",
|
46
|
+
"test/test_last_request.rb",
|
47
|
+
"test/test_missing_open_uri.rb",
|
48
|
+
"test/test_missing_pathname.rb",
|
49
|
+
"test/test_other_net_http_libraries.rb",
|
50
|
+
"test/test_precedence.rb",
|
51
|
+
"test/test_query_string.rb",
|
52
|
+
"test/test_regexes.rb",
|
53
|
+
"test/test_response_headers.rb",
|
54
|
+
"test/test_trailing_slashes.rb",
|
55
|
+
"test/test_utility.rb",
|
56
|
+
"test/vendor/right_http_connection-1.2.4/History.txt",
|
57
|
+
"test/vendor/right_http_connection-1.2.4/Manifest.txt",
|
58
|
+
"test/vendor/right_http_connection-1.2.4/README.txt",
|
59
|
+
"test/vendor/right_http_connection-1.2.4/Rakefile",
|
60
|
+
"test/vendor/right_http_connection-1.2.4/lib/net_fix.rb",
|
61
|
+
"test/vendor/right_http_connection-1.2.4/lib/right_http_connection.rb",
|
62
|
+
"test/vendor/right_http_connection-1.2.4/setup.rb",
|
63
|
+
"test/vendor/samuel-0.2.1/.document",
|
64
|
+
"test/vendor/samuel-0.2.1/.gitignore",
|
65
|
+
"test/vendor/samuel-0.2.1/LICENSE",
|
66
|
+
"test/vendor/samuel-0.2.1/README.rdoc",
|
67
|
+
"test/vendor/samuel-0.2.1/Rakefile",
|
68
|
+
"test/vendor/samuel-0.2.1/VERSION",
|
69
|
+
"test/vendor/samuel-0.2.1/lib/samuel.rb",
|
70
|
+
"test/vendor/samuel-0.2.1/lib/samuel/net_http.rb",
|
71
|
+
"test/vendor/samuel-0.2.1/lib/samuel/request.rb",
|
72
|
+
"test/vendor/samuel-0.2.1/samuel.gemspec",
|
73
|
+
"test/vendor/samuel-0.2.1/test/request_test.rb",
|
74
|
+
"test/vendor/samuel-0.2.1/test/samuel_test.rb",
|
75
|
+
"test/vendor/samuel-0.2.1/test/test_helper.rb",
|
76
|
+
"test/vendor/samuel-0.2.1/test/thread_test.rb"
|
77
|
+
]
|
78
|
+
s.homepage = %q{http://github.com/chrisk/fakeweb}
|
79
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
80
|
+
s.require_paths = ["lib"]
|
81
|
+
s.rubyforge_project = %q{fakeweb}
|
82
|
+
s.rubygems_version = %q{1.3.7}
|
83
|
+
s.summary = %q{A tool for faking responses to HTTP requests}
|
84
|
+
s.test_files = [
|
85
|
+
"test/test_allow_net_connect.rb",
|
86
|
+
"test/test_deprecations.rb",
|
87
|
+
"test/test_fake_authentication.rb",
|
88
|
+
"test/test_fake_web.rb",
|
89
|
+
"test/test_fake_web_open_uri.rb",
|
90
|
+
"test/test_helper.rb",
|
91
|
+
"test/test_last_request.rb",
|
92
|
+
"test/test_missing_open_uri.rb",
|
93
|
+
"test/test_missing_pathname.rb",
|
94
|
+
"test/test_other_net_http_libraries.rb",
|
95
|
+
"test/test_precedence.rb",
|
96
|
+
"test/test_query_string.rb",
|
97
|
+
"test/test_regexes.rb",
|
98
|
+
"test/test_response_headers.rb",
|
99
|
+
"test/test_trailing_slashes.rb",
|
100
|
+
"test/test_utility.rb",
|
101
|
+
"test/vendor/right_http_connection-1.2.4/lib/net_fix.rb",
|
102
|
+
"test/vendor/right_http_connection-1.2.4/lib/right_http_connection.rb",
|
103
|
+
"test/vendor/right_http_connection-1.2.4/setup.rb",
|
104
|
+
"test/vendor/samuel-0.2.1/lib/samuel/net_http.rb",
|
105
|
+
"test/vendor/samuel-0.2.1/lib/samuel/request.rb",
|
106
|
+
"test/vendor/samuel-0.2.1/lib/samuel.rb",
|
107
|
+
"test/vendor/samuel-0.2.1/test/request_test.rb",
|
108
|
+
"test/vendor/samuel-0.2.1/test/samuel_test.rb",
|
109
|
+
"test/vendor/samuel-0.2.1/test/test_helper.rb",
|
110
|
+
"test/vendor/samuel-0.2.1/test/thread_test.rb"
|
111
|
+
]
|
112
|
+
|
113
|
+
if s.respond_to? :specification_version then
|
114
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
115
|
+
s.specification_version = 3
|
116
|
+
|
117
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
118
|
+
s.add_development_dependency(%q<mocha>, [">= 0.9.5"])
|
119
|
+
else
|
120
|
+
s.add_dependency(%q<mocha>, [">= 0.9.5"])
|
121
|
+
end
|
122
|
+
else
|
123
|
+
s.add_dependency(%q<mocha>, [">= 0.9.5"])
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
@@ -0,0 +1,72 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
require 'net/https'
|
3
|
+
require 'stringio'
|
4
|
+
|
5
|
+
module Net #:nodoc: all
|
6
|
+
|
7
|
+
class BufferedIO
|
8
|
+
def initialize_with_fakeweb(io, debug_output = nil)
|
9
|
+
@read_timeout = 60
|
10
|
+
@rbuf = ''
|
11
|
+
@debug_output = debug_output
|
12
|
+
|
13
|
+
@io = case io
|
14
|
+
when Socket, OpenSSL::SSL::SSLSocket, IO
|
15
|
+
io
|
16
|
+
when String
|
17
|
+
if !io.include?("\0") && File.exists?(io) && !File.directory?(io)
|
18
|
+
File.open(io, "r")
|
19
|
+
else
|
20
|
+
StringIO.new(io)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
raise "Unable to create local socket" unless @io
|
24
|
+
end
|
25
|
+
alias_method :initialize_without_fakeweb, :initialize
|
26
|
+
alias_method :initialize, :initialize_with_fakeweb
|
27
|
+
end
|
28
|
+
|
29
|
+
class HTTP
|
30
|
+
class << self
|
31
|
+
def socket_type_with_fakeweb
|
32
|
+
FakeWeb::StubSocket
|
33
|
+
end
|
34
|
+
alias_method :socket_type_without_fakeweb, :socket_type
|
35
|
+
alias_method :socket_type, :socket_type_with_fakeweb
|
36
|
+
end
|
37
|
+
|
38
|
+
def request_with_fakeweb(request, body = nil, &block)
|
39
|
+
FakeWeb.last_request = request
|
40
|
+
|
41
|
+
uri = FakeWeb::Utility.request_uri_as_string(self, request)
|
42
|
+
method = request.method.downcase.to_sym
|
43
|
+
|
44
|
+
if FakeWeb.registered_uri?(method, uri)
|
45
|
+
@socket = Net::HTTP.socket_type.new
|
46
|
+
FakeWeb::Utility.produce_side_effects_of_net_http_request(request, body)
|
47
|
+
FakeWeb.response_for(method, uri, &block)
|
48
|
+
elsif FakeWeb.allow_net_connect?(uri)
|
49
|
+
connect_without_fakeweb
|
50
|
+
request_without_fakeweb(request, body, &block)
|
51
|
+
else
|
52
|
+
uri = FakeWeb::Utility.strip_default_port_from_uri(uri)
|
53
|
+
raise FakeWeb::NetConnectNotAllowedError,
|
54
|
+
"Real HTTP connections are disabled. Unregistered request: #{request.method} #{uri}"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
alias_method :request_without_fakeweb, :request
|
58
|
+
alias_method :request, :request_with_fakeweb
|
59
|
+
|
60
|
+
|
61
|
+
def connect_with_fakeweb
|
62
|
+
unless @@alredy_checked_for_net_http_replacement_libs ||= false
|
63
|
+
FakeWeb::Utility.puts_warning_for_net_http_replacement_libs_if_needed
|
64
|
+
@@alredy_checked_for_net_http_replacement_libs = true
|
65
|
+
end
|
66
|
+
nil
|
67
|
+
end
|
68
|
+
alias_method :connect_without_fakeweb, :connect
|
69
|
+
alias_method :connect, :connect_with_fakeweb
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|