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,394 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
|
4
|
+
require 'test/unit'
|
5
|
+
case ENV['JSON']
|
6
|
+
when 'pure' then require 'json/pure'
|
7
|
+
when 'ext' then require 'json/ext'
|
8
|
+
else require 'json'
|
9
|
+
end
|
10
|
+
require 'stringio'
|
11
|
+
|
12
|
+
unless Array.method_defined?(:permutation)
|
13
|
+
begin
|
14
|
+
require 'enumerator'
|
15
|
+
require 'permutation'
|
16
|
+
class Array
|
17
|
+
def permutation
|
18
|
+
Permutation.for(self).to_enum.map { |x| x.project }
|
19
|
+
end
|
20
|
+
end
|
21
|
+
rescue LoadError
|
22
|
+
warn "Skipping permutation tests."
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
class TC_JSON < Test::Unit::TestCase
|
27
|
+
include JSON
|
28
|
+
|
29
|
+
def setup
|
30
|
+
@ary = [1, "foo", 3.14, 4711.0, 2.718, nil, [1,-2,3], false, true].map do
|
31
|
+
|x| [x]
|
32
|
+
end
|
33
|
+
@ary_to_parse = ["1", '"foo"', "3.14", "4711.0", "2.718", "null",
|
34
|
+
"[1,-2,3]", "false", "true"].map do
|
35
|
+
|x| "[#{x}]"
|
36
|
+
end
|
37
|
+
@hash = {
|
38
|
+
'a' => 2,
|
39
|
+
'b' => 3.141,
|
40
|
+
'c' => 'c',
|
41
|
+
'd' => [ 1, "b", 3.14 ],
|
42
|
+
'e' => { 'foo' => 'bar' },
|
43
|
+
'g' => "\"\0\037",
|
44
|
+
'h' => 1000.0,
|
45
|
+
'i' => 0.001
|
46
|
+
}
|
47
|
+
@json = '{"a":2,"b":3.141,"c":"c","d":[1,"b",3.14],"e":{"foo":"bar"},'\
|
48
|
+
'"g":"\\"\\u0000\\u001f","h":1.0E3,"i":1.0E-3}'
|
49
|
+
end
|
50
|
+
|
51
|
+
def test_construction
|
52
|
+
parser = JSON::Parser.new('test')
|
53
|
+
assert_equal 'test', parser.source
|
54
|
+
end
|
55
|
+
|
56
|
+
def assert_equal_float(expected, is)
|
57
|
+
assert_in_delta(expected.first, is.first, 1e-2)
|
58
|
+
end
|
59
|
+
|
60
|
+
def test_parse_simple_arrays
|
61
|
+
assert_equal([], parse('[]'))
|
62
|
+
assert_equal([], parse(' [ ] '))
|
63
|
+
assert_equal([nil], parse('[null]'))
|
64
|
+
assert_equal([false], parse('[false]'))
|
65
|
+
assert_equal([true], parse('[true]'))
|
66
|
+
assert_equal([-23], parse('[-23]'))
|
67
|
+
assert_equal([23], parse('[23]'))
|
68
|
+
assert_equal([0.23], parse('[0.23]'))
|
69
|
+
assert_equal([0.0], parse('[0e0]'))
|
70
|
+
assert_raises(JSON::ParserError) { parse('[+23.2]') }
|
71
|
+
assert_raises(JSON::ParserError) { parse('[+23]') }
|
72
|
+
assert_raises(JSON::ParserError) { parse('[.23]') }
|
73
|
+
assert_raises(JSON::ParserError) { parse('[023]') }
|
74
|
+
assert_equal_float [3.141], parse('[3.141]')
|
75
|
+
assert_equal_float [-3.141], parse('[-3.141]')
|
76
|
+
assert_equal_float [3.141], parse('[3141e-3]')
|
77
|
+
assert_equal_float [3.141], parse('[3141.1e-3]')
|
78
|
+
assert_equal_float [3.141], parse('[3141E-3]')
|
79
|
+
assert_equal_float [3.141], parse('[3141.0E-3]')
|
80
|
+
assert_equal_float [-3.141], parse('[-3141.0e-3]')
|
81
|
+
assert_equal_float [-3.141], parse('[-3141e-3]')
|
82
|
+
assert_raises(ParserError) { parse('[NaN]') }
|
83
|
+
assert parse('[NaN]', :allow_nan => true).first.nan?
|
84
|
+
assert_raises(ParserError) { parse('[Infinity]') }
|
85
|
+
assert_equal [1.0/0], parse('[Infinity]', :allow_nan => true)
|
86
|
+
assert_raises(ParserError) { parse('[-Infinity]') }
|
87
|
+
assert_equal [-1.0/0], parse('[-Infinity]', :allow_nan => true)
|
88
|
+
assert_equal([""], parse('[""]'))
|
89
|
+
assert_equal(["foobar"], parse('["foobar"]'))
|
90
|
+
assert_equal([{}], parse('[{}]'))
|
91
|
+
end
|
92
|
+
|
93
|
+
def test_parse_simple_objects
|
94
|
+
assert_equal({}, parse('{}'))
|
95
|
+
assert_equal({}, parse(' { } '))
|
96
|
+
assert_equal({ "a" => nil }, parse('{ "a" : null}'))
|
97
|
+
assert_equal({ "a" => nil }, parse('{"a":null}'))
|
98
|
+
assert_equal({ "a" => false }, parse('{ "a" : false } '))
|
99
|
+
assert_equal({ "a" => false }, parse('{"a":false}'))
|
100
|
+
assert_raises(JSON::ParserError) { parse('{false}') }
|
101
|
+
assert_equal({ "a" => true }, parse('{"a":true}'))
|
102
|
+
assert_equal({ "a" => true }, parse(' { "a" : true } '))
|
103
|
+
assert_equal({ "a" => -23 }, parse(' { "a" : -23 } '))
|
104
|
+
assert_equal({ "a" => -23 }, parse(' { "a" : -23 } '))
|
105
|
+
assert_equal({ "a" => 23 }, parse('{"a":23 } '))
|
106
|
+
assert_equal({ "a" => 23 }, parse(' { "a" : 23 } '))
|
107
|
+
assert_equal({ "a" => 0.23 }, parse(' { "a" : 0.23 } '))
|
108
|
+
assert_equal({ "a" => 0.23 }, parse(' { "a" : 0.23 } '))
|
109
|
+
end
|
110
|
+
|
111
|
+
if Array.method_defined?(:permutation)
|
112
|
+
def test_parse_more_complex_arrays
|
113
|
+
a = [ nil, false, true, "foßbar", [ "n€st€d", true ], { "nested" => true, "n€ßt€ð2" => {} }]
|
114
|
+
a.permutation.each do |perm|
|
115
|
+
json = pretty_generate(perm)
|
116
|
+
assert_equal perm, parse(json)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
def test_parse_complex_objects
|
121
|
+
a = [ nil, false, true, "foßbar", [ "n€st€d", true ], { "nested" => true, "n€ßt€ð2" => {} }]
|
122
|
+
a.permutation.each do |perm|
|
123
|
+
s = "a"
|
124
|
+
orig_obj = perm.inject({}) { |h, x| h[s.dup] = x; s = s.succ; h }
|
125
|
+
json = pretty_generate(orig_obj)
|
126
|
+
assert_equal orig_obj, parse(json)
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
def test_parse_arrays
|
132
|
+
assert_equal([1,2,3], parse('[1,2,3]'))
|
133
|
+
assert_equal([1.2,2,3], parse('[1.2,2,3]'))
|
134
|
+
assert_equal([[],[[],[]]], parse('[[],[[],[]]]'))
|
135
|
+
end
|
136
|
+
|
137
|
+
def test_parse_values
|
138
|
+
assert_equal([""], parse('[""]'))
|
139
|
+
assert_equal(["\\"], parse('["\\\\"]'))
|
140
|
+
assert_equal(['"'], parse('["\""]'))
|
141
|
+
assert_equal(['\\"\\'], parse('["\\\\\\"\\\\"]'))
|
142
|
+
assert_equal(["\"\b\n\r\t\0\037"],
|
143
|
+
parse('["\"\b\n\r\t\u0000\u001f"]'))
|
144
|
+
for i in 0 ... @ary.size
|
145
|
+
assert_equal(@ary[i], parse(@ary_to_parse[i]))
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
def test_parse_array
|
150
|
+
assert_equal([], parse('[]'))
|
151
|
+
assert_equal([], parse(' [ ] '))
|
152
|
+
assert_equal([1], parse('[1]'))
|
153
|
+
assert_equal([1], parse(' [ 1 ] '))
|
154
|
+
assert_equal(@ary,
|
155
|
+
parse('[[1],["foo"],[3.14],[47.11e+2],[2718.0E-3],[null],[[1,-2,3]]'\
|
156
|
+
',[false],[true]]'))
|
157
|
+
assert_equal(@ary, parse(%Q{ [ [1] , ["foo"] , [3.14] \t , [47.11e+2]
|
158
|
+
, [2718.0E-3 ],\r[ null] , [[1, -2, 3 ]], [false ],[ true]\n ] }))
|
159
|
+
end
|
160
|
+
|
161
|
+
class SubArray < Array; end
|
162
|
+
|
163
|
+
class SubArray2 < Array
|
164
|
+
def to_json(*a)
|
165
|
+
{
|
166
|
+
JSON.create_id => self.class.name,
|
167
|
+
'ary' => to_a,
|
168
|
+
}.to_json(*a)
|
169
|
+
end
|
170
|
+
|
171
|
+
def self.json_create(o)
|
172
|
+
o.delete JSON.create_id
|
173
|
+
o['ary']
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
def test_parse_array_custom_class
|
178
|
+
res = parse('[]', :array_class => SubArray)
|
179
|
+
assert_equal([], res)
|
180
|
+
assert_equal(SubArray, res.class)
|
181
|
+
end
|
182
|
+
|
183
|
+
def test_parse_object
|
184
|
+
assert_equal({}, parse('{}'))
|
185
|
+
assert_equal({}, parse(' { } '))
|
186
|
+
assert_equal({'foo'=>'bar'}, parse('{"foo":"bar"}'))
|
187
|
+
assert_equal({'foo'=>'bar'}, parse(' { "foo" : "bar" } '))
|
188
|
+
end
|
189
|
+
|
190
|
+
class SubHash < Hash
|
191
|
+
end
|
192
|
+
|
193
|
+
class SubHash2 < Hash
|
194
|
+
def to_json(*a)
|
195
|
+
{
|
196
|
+
JSON.create_id => self.class.name,
|
197
|
+
}.merge(self).to_json(*a)
|
198
|
+
end
|
199
|
+
|
200
|
+
def self.json_create(o)
|
201
|
+
o.delete JSON.create_id
|
202
|
+
self[o]
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
def test_parse_object_custom_class
|
207
|
+
res = parse('{}', :object_class => SubHash2)
|
208
|
+
assert_equal({}, res)
|
209
|
+
assert_equal(SubHash2, res.class)
|
210
|
+
end
|
211
|
+
|
212
|
+
def test_generation_of_core_subclasses_with_new_to_json
|
213
|
+
obj = SubHash2["foo" => SubHash2["bar" => true]]
|
214
|
+
obj_json = JSON(obj)
|
215
|
+
obj_again = JSON(obj_json)
|
216
|
+
assert_kind_of SubHash2, obj_again
|
217
|
+
assert_kind_of SubHash2, obj_again['foo']
|
218
|
+
assert obj_again['foo']['bar']
|
219
|
+
assert_equal obj, obj_again
|
220
|
+
assert_equal ["foo"], JSON(JSON(SubArray2["foo"]))
|
221
|
+
end
|
222
|
+
|
223
|
+
def test_generation_of_core_subclasses_with_default_to_json
|
224
|
+
assert_equal '{"foo":"bar"}', JSON(SubHash["foo" => "bar"])
|
225
|
+
assert_equal '["foo"]', JSON(SubArray["foo"])
|
226
|
+
end
|
227
|
+
|
228
|
+
def test_generation_of_core_subclasses
|
229
|
+
obj = SubHash["foo" => SubHash["bar" => true]]
|
230
|
+
obj_json = JSON(obj)
|
231
|
+
obj_again = JSON(obj_json)
|
232
|
+
assert_kind_of Hash, obj_again
|
233
|
+
assert_kind_of Hash, obj_again['foo']
|
234
|
+
assert obj_again['foo']['bar']
|
235
|
+
assert_equal obj, obj_again
|
236
|
+
end
|
237
|
+
|
238
|
+
def test_parser_reset
|
239
|
+
parser = Parser.new(@json)
|
240
|
+
assert_equal(@hash, parser.parse)
|
241
|
+
assert_equal(@hash, parser.parse)
|
242
|
+
end
|
243
|
+
|
244
|
+
def test_comments
|
245
|
+
json = <<EOT
|
246
|
+
{
|
247
|
+
"key1":"value1", // eol comment
|
248
|
+
"key2":"value2" /* multi line
|
249
|
+
* comment */,
|
250
|
+
"key3":"value3" /* multi line
|
251
|
+
// nested eol comment
|
252
|
+
* comment */
|
253
|
+
}
|
254
|
+
EOT
|
255
|
+
assert_equal(
|
256
|
+
{ "key1" => "value1", "key2" => "value2", "key3" => "value3" },
|
257
|
+
parse(json))
|
258
|
+
json = <<EOT
|
259
|
+
{
|
260
|
+
"key1":"value1" /* multi line
|
261
|
+
// nested eol comment
|
262
|
+
/* illegal nested multi line comment */
|
263
|
+
* comment */
|
264
|
+
}
|
265
|
+
EOT
|
266
|
+
assert_raises(ParserError) { parse(json) }
|
267
|
+
json = <<EOT
|
268
|
+
{
|
269
|
+
"key1":"value1" /* multi line
|
270
|
+
// nested eol comment
|
271
|
+
closed multi comment */
|
272
|
+
and again, throw an Error */
|
273
|
+
}
|
274
|
+
EOT
|
275
|
+
assert_raises(ParserError) { parse(json) }
|
276
|
+
json = <<EOT
|
277
|
+
{
|
278
|
+
"key1":"value1" /*/*/
|
279
|
+
}
|
280
|
+
EOT
|
281
|
+
assert_equal({ "key1" => "value1" }, parse(json))
|
282
|
+
end
|
283
|
+
|
284
|
+
def test_backslash
|
285
|
+
data = [ '\\.(?i:gif|jpe?g|png)$' ]
|
286
|
+
json = '["\\\\.(?i:gif|jpe?g|png)$"]'
|
287
|
+
assert_equal json, JSON.generate(data)
|
288
|
+
assert_equal data, JSON.parse(json)
|
289
|
+
#
|
290
|
+
data = [ '\\"' ]
|
291
|
+
json = '["\\\\\""]'
|
292
|
+
assert_equal json, JSON.generate(data)
|
293
|
+
assert_equal data, JSON.parse(json)
|
294
|
+
#
|
295
|
+
json = '["/"]'
|
296
|
+
data = JSON.parse(json)
|
297
|
+
assert_equal ['/'], data
|
298
|
+
assert_equal json, JSON.generate(data)
|
299
|
+
#
|
300
|
+
json = '["\""]'
|
301
|
+
data = JSON.parse(json)
|
302
|
+
assert_equal ['"'], data
|
303
|
+
assert_equal json, JSON.generate(data)
|
304
|
+
json = '["\\\'"]'
|
305
|
+
data = JSON.parse(json)
|
306
|
+
assert_equal ["'"], data
|
307
|
+
assert_equal '["\'"]', JSON.generate(data)
|
308
|
+
end
|
309
|
+
|
310
|
+
def test_wrong_inputs
|
311
|
+
assert_raises(ParserError) { JSON.parse('"foo"') }
|
312
|
+
assert_raises(ParserError) { JSON.parse('123') }
|
313
|
+
assert_raises(ParserError) { JSON.parse('[] bla') }
|
314
|
+
assert_raises(ParserError) { JSON.parse('[] 1') }
|
315
|
+
assert_raises(ParserError) { JSON.parse('[] []') }
|
316
|
+
assert_raises(ParserError) { JSON.parse('[] {}') }
|
317
|
+
assert_raises(ParserError) { JSON.parse('{} []') }
|
318
|
+
assert_raises(ParserError) { JSON.parse('{} {}') }
|
319
|
+
assert_raises(ParserError) { JSON.parse('[NULL]') }
|
320
|
+
assert_raises(ParserError) { JSON.parse('[FALSE]') }
|
321
|
+
assert_raises(ParserError) { JSON.parse('[TRUE]') }
|
322
|
+
assert_raises(ParserError) { JSON.parse('[07] ') }
|
323
|
+
assert_raises(ParserError) { JSON.parse('[0a]') }
|
324
|
+
assert_raises(ParserError) { JSON.parse('[1.]') }
|
325
|
+
assert_raises(ParserError) { JSON.parse(' ') }
|
326
|
+
end
|
327
|
+
|
328
|
+
def test_nesting
|
329
|
+
assert_raises(JSON::NestingError) { JSON.parse '[[]]', :max_nesting => 1 }
|
330
|
+
assert_raises(JSON::NestingError) { JSON.parser.new('[[]]', :max_nesting => 1).parse }
|
331
|
+
assert_equal [[]], JSON.parse('[[]]', :max_nesting => 2)
|
332
|
+
too_deep = '[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]'
|
333
|
+
too_deep_ary = eval too_deep
|
334
|
+
assert_raises(JSON::NestingError) { JSON.parse too_deep }
|
335
|
+
assert_raises(JSON::NestingError) { JSON.parser.new(too_deep).parse }
|
336
|
+
assert_raises(JSON::NestingError) { JSON.parse too_deep, :max_nesting => 19 }
|
337
|
+
ok = JSON.parse too_deep, :max_nesting => 20
|
338
|
+
assert_equal too_deep_ary, ok
|
339
|
+
ok = JSON.parse too_deep, :max_nesting => nil
|
340
|
+
assert_equal too_deep_ary, ok
|
341
|
+
ok = JSON.parse too_deep, :max_nesting => false
|
342
|
+
assert_equal too_deep_ary, ok
|
343
|
+
ok = JSON.parse too_deep, :max_nesting => 0
|
344
|
+
assert_equal too_deep_ary, ok
|
345
|
+
assert_raises(JSON::NestingError) { JSON.generate [[]], :max_nesting => 1 }
|
346
|
+
assert_equal '[[]]', JSON.generate([[]], :max_nesting => 2)
|
347
|
+
assert_raises(JSON::NestingError) { JSON.generate too_deep_ary }
|
348
|
+
assert_raises(JSON::NestingError) { JSON.generate too_deep_ary, :max_nesting => 19 }
|
349
|
+
ok = JSON.generate too_deep_ary, :max_nesting => 20
|
350
|
+
assert_equal too_deep, ok
|
351
|
+
ok = JSON.generate too_deep_ary, :max_nesting => nil
|
352
|
+
assert_equal too_deep, ok
|
353
|
+
ok = JSON.generate too_deep_ary, :max_nesting => false
|
354
|
+
assert_equal too_deep, ok
|
355
|
+
ok = JSON.generate too_deep_ary, :max_nesting => 0
|
356
|
+
assert_equal too_deep, ok
|
357
|
+
end
|
358
|
+
|
359
|
+
def test_symbolize_names
|
360
|
+
assert_equal({ "foo" => "bar", "baz" => "quux" },
|
361
|
+
JSON.parse('{"foo":"bar", "baz":"quux"}'))
|
362
|
+
assert_equal({ :foo => "bar", :baz => "quux" },
|
363
|
+
JSON.parse('{"foo":"bar", "baz":"quux"}', :symbolize_names => true))
|
364
|
+
end
|
365
|
+
|
366
|
+
def test_load_dump
|
367
|
+
too_deep = '[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]'
|
368
|
+
assert_equal too_deep, JSON.dump(eval(too_deep))
|
369
|
+
assert_kind_of String, Marshal.dump(eval(too_deep))
|
370
|
+
assert_raises(ArgumentError) { JSON.dump(eval(too_deep), 19) }
|
371
|
+
assert_raises(ArgumentError) { Marshal.dump(eval(too_deep), 19) }
|
372
|
+
assert_equal too_deep, JSON.dump(eval(too_deep), 20)
|
373
|
+
assert_kind_of String, Marshal.dump(eval(too_deep), 20)
|
374
|
+
output = StringIO.new
|
375
|
+
JSON.dump(eval(too_deep), output)
|
376
|
+
assert_equal too_deep, output.string
|
377
|
+
output = StringIO.new
|
378
|
+
JSON.dump(eval(too_deep), output, 20)
|
379
|
+
assert_equal too_deep, output.string
|
380
|
+
end
|
381
|
+
|
382
|
+
def test_big_integers
|
383
|
+
json1 = JSON([orig = (1 << 31) - 1])
|
384
|
+
assert_equal orig, JSON[json1][0]
|
385
|
+
json2 = JSON([orig = 1 << 31])
|
386
|
+
assert_equal orig, JSON[json2][0]
|
387
|
+
json3 = JSON([orig = (1 << 62) - 1])
|
388
|
+
assert_equal orig, JSON[json3][0]
|
389
|
+
json4 = JSON([orig = 1 << 62])
|
390
|
+
assert_equal orig, JSON[json4][0]
|
391
|
+
json5 = JSON([orig = 1 << 64])
|
392
|
+
assert_equal orig, JSON[json5][0]
|
393
|
+
end
|
394
|
+
end
|
@@ -0,0 +1,162 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- coding:utf-8 -*-
|
3
|
+
|
4
|
+
require 'test/unit'
|
5
|
+
case ENV['JSON']
|
6
|
+
when 'pure' then require 'json/pure'
|
7
|
+
when 'ext' then require 'json/ext'
|
8
|
+
else require 'json'
|
9
|
+
end
|
10
|
+
require 'json/add/core'
|
11
|
+
require 'date'
|
12
|
+
|
13
|
+
class TC_JSONAddition < Test::Unit::TestCase
|
14
|
+
include JSON
|
15
|
+
|
16
|
+
class A
|
17
|
+
def initialize(a)
|
18
|
+
@a = a
|
19
|
+
end
|
20
|
+
|
21
|
+
attr_reader :a
|
22
|
+
|
23
|
+
def ==(other)
|
24
|
+
a == other.a
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.json_create(object)
|
28
|
+
new(*object['args'])
|
29
|
+
end
|
30
|
+
|
31
|
+
def to_json(*args)
|
32
|
+
{
|
33
|
+
'json_class' => self.class.name,
|
34
|
+
'args' => [ @a ],
|
35
|
+
}.to_json(*args)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
class B
|
40
|
+
def self.json_creatable?
|
41
|
+
false
|
42
|
+
end
|
43
|
+
|
44
|
+
def to_json(*args)
|
45
|
+
{
|
46
|
+
'json_class' => self.class.name,
|
47
|
+
}.to_json(*args)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
class C
|
52
|
+
def self.json_creatable?
|
53
|
+
false
|
54
|
+
end
|
55
|
+
|
56
|
+
def to_json(*args)
|
57
|
+
{
|
58
|
+
'json_class' => 'TC_JSONAddition::Nix',
|
59
|
+
}.to_json(*args)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def test_extended_json
|
64
|
+
a = A.new(666)
|
65
|
+
assert A.json_creatable?
|
66
|
+
json = generate(a)
|
67
|
+
a_again = JSON.parse(json)
|
68
|
+
assert_kind_of a.class, a_again
|
69
|
+
assert_equal a, a_again
|
70
|
+
end
|
71
|
+
|
72
|
+
def test_extended_json_disabled
|
73
|
+
a = A.new(666)
|
74
|
+
assert A.json_creatable?
|
75
|
+
json = generate(a)
|
76
|
+
a_again = JSON.parse(json, :create_additions => true)
|
77
|
+
assert_kind_of a.class, a_again
|
78
|
+
assert_equal a, a_again
|
79
|
+
a_hash = JSON.parse(json, :create_additions => false)
|
80
|
+
assert_kind_of Hash, a_hash
|
81
|
+
assert_equal(
|
82
|
+
{"args"=>[666], "json_class"=>"TC_JSONAddition::A"}.sort_by { |k,| k },
|
83
|
+
a_hash.sort_by { |k,| k }
|
84
|
+
)
|
85
|
+
end
|
86
|
+
|
87
|
+
def test_extended_json_fail1
|
88
|
+
b = B.new
|
89
|
+
assert !B.json_creatable?
|
90
|
+
json = generate(b)
|
91
|
+
assert_equal({ "json_class"=>"TC_JSONAddition::B" }, JSON.parse(json))
|
92
|
+
end
|
93
|
+
|
94
|
+
def test_extended_json_fail2
|
95
|
+
c = C.new
|
96
|
+
assert !C.json_creatable?
|
97
|
+
json = generate(c)
|
98
|
+
assert_raises(ArgumentError, NameError) { JSON.parse(json) }
|
99
|
+
end
|
100
|
+
|
101
|
+
def test_raw_strings
|
102
|
+
raw = ''
|
103
|
+
raw.respond_to?(:encode!) and raw.encode!(Encoding::ASCII_8BIT)
|
104
|
+
raw_array = []
|
105
|
+
for i in 0..255
|
106
|
+
raw << i
|
107
|
+
raw_array << i
|
108
|
+
end
|
109
|
+
json = raw.to_json_raw
|
110
|
+
json_raw_object = raw.to_json_raw_object
|
111
|
+
hash = { 'json_class' => 'String', 'raw'=> raw_array }
|
112
|
+
assert_equal hash, json_raw_object
|
113
|
+
assert_match /\A\{.*\}\Z/, json
|
114
|
+
assert_match /"json_class":"String"/, json
|
115
|
+
assert_match /"raw":\[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255\]/, json
|
116
|
+
raw_again = JSON.parse(json)
|
117
|
+
assert_equal raw, raw_again
|
118
|
+
end
|
119
|
+
|
120
|
+
MyJsonStruct = Struct.new 'MyJsonStruct', :foo, :bar
|
121
|
+
|
122
|
+
def test_core
|
123
|
+
t = Time.now
|
124
|
+
assert_equal t.inspect, JSON(JSON(t)).inspect
|
125
|
+
d = Date.today
|
126
|
+
assert_equal d, JSON(JSON(d))
|
127
|
+
d = DateTime.civil(2007, 6, 14, 14, 57, 10, Rational(1, 12), 2299161)
|
128
|
+
assert_equal d, JSON(JSON(d))
|
129
|
+
assert_equal 1..10, JSON(JSON(1..10))
|
130
|
+
assert_equal 1...10, JSON(JSON(1...10))
|
131
|
+
assert_equal "a".."c", JSON(JSON("a".."c"))
|
132
|
+
assert_equal "a"..."c", JSON(JSON("a"..."c"))
|
133
|
+
s = MyJsonStruct.new 4711, 'foot'
|
134
|
+
assert_equal s, JSON(JSON(s))
|
135
|
+
struct = Struct.new :foo, :bar
|
136
|
+
s = struct.new 4711, 'foot'
|
137
|
+
assert_raises(JSONError) { JSON(s) }
|
138
|
+
begin
|
139
|
+
raise TypeError, "test me"
|
140
|
+
rescue TypeError => e
|
141
|
+
e_json = JSON.generate e
|
142
|
+
e_again = JSON e_json
|
143
|
+
assert_kind_of TypeError, e_again
|
144
|
+
assert_equal e.message, e_again.message
|
145
|
+
assert_equal e.backtrace, e_again.backtrace
|
146
|
+
end
|
147
|
+
assert_equal(/foo/, JSON(JSON(/foo/)))
|
148
|
+
assert_equal(/foo/i, JSON(JSON(/foo/i)))
|
149
|
+
end
|
150
|
+
|
151
|
+
def test_utc_datetime
|
152
|
+
now = Time.now
|
153
|
+
d = DateTime.parse(now.to_s) # usual case
|
154
|
+
assert_equal d, JSON.parse(d.to_json)
|
155
|
+
d = DateTime.parse(now.utc.to_s) # of = 0
|
156
|
+
assert_equal d, JSON.parse(d.to_json)
|
157
|
+
d = DateTime.civil(2008, 6, 17, 11, 48, 32, Rational(1,24))
|
158
|
+
assert_equal d, JSON.parse(d.to_json)
|
159
|
+
d = DateTime.civil(2008, 6, 17, 11, 48, 32, Rational(12,24))
|
160
|
+
assert_equal d, JSON.parse(d.to_json)
|
161
|
+
end
|
162
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
|
4
|
+
require 'test/unit'
|
5
|
+
case ENV['JSON']
|
6
|
+
when 'pure' then require 'json/pure'
|
7
|
+
when 'ext' then require 'json/ext'
|
8
|
+
else require 'json'
|
9
|
+
end
|
10
|
+
require 'iconv'
|
11
|
+
|
12
|
+
class TC_JSONEncoding < Test::Unit::TestCase
|
13
|
+
include JSON
|
14
|
+
|
15
|
+
def setup
|
16
|
+
@utf_8 = '["© ≠ €!"]'
|
17
|
+
@parsed = [ "© ≠ €!" ]
|
18
|
+
@utf_16_data = Iconv.iconv('utf-16be', 'utf-8', @parsed.first)
|
19
|
+
@generated = '["\u00a9 \u2260 \u20ac!"]'
|
20
|
+
if defined?(::Encoding)
|
21
|
+
@utf_8_ascii_8bit = @utf_8.dup.force_encoding(Encoding::ASCII_8BIT)
|
22
|
+
@utf_16be, = Iconv.iconv('utf-16be', 'utf-8', @utf_8)
|
23
|
+
@utf_16be_ascii_8bit = @utf_16be.dup.force_encoding(Encoding::ASCII_8BIT)
|
24
|
+
@utf_16le, = Iconv.iconv('utf-16le', 'utf-8', @utf_8)
|
25
|
+
@utf_16le_ascii_8bit = @utf_16le.dup.force_encoding(Encoding::ASCII_8BIT)
|
26
|
+
@utf_32be, = Iconv.iconv('utf-32be', 'utf-8', @utf_8)
|
27
|
+
@utf_32be_ascii_8bit = @utf_32be.dup.force_encoding(Encoding::ASCII_8BIT)
|
28
|
+
@utf_32le, = Iconv.iconv('utf-32le', 'utf-8', @utf_8)
|
29
|
+
@utf_32le_ascii_8bit = @utf_32le.dup.force_encoding(Encoding::ASCII_8BIT)
|
30
|
+
else
|
31
|
+
@utf_8_ascii_8bit = @utf_8.dup
|
32
|
+
@utf_16be, = Iconv.iconv('utf-16be', 'utf-8', @utf_8)
|
33
|
+
@utf_16be_ascii_8bit = @utf_16be.dup
|
34
|
+
@utf_16le, = Iconv.iconv('utf-16le', 'utf-8', @utf_8)
|
35
|
+
@utf_16le_ascii_8bit = @utf_16le.dup
|
36
|
+
@utf_32be, = Iconv.iconv('utf-32be', 'utf-8', @utf_8)
|
37
|
+
@utf_32be_ascii_8bit = @utf_32be.dup
|
38
|
+
@utf_32le, = Iconv.iconv('utf-32le', 'utf-8', @utf_8)
|
39
|
+
@utf_32le_ascii_8bit = @utf_32le.dup
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_parse
|
44
|
+
assert_equal @parsed, JSON.parse(@utf_8)
|
45
|
+
assert_equal @parsed, JSON.parse(@utf_16be)
|
46
|
+
assert_equal @parsed, JSON.parse(@utf_16le)
|
47
|
+
assert_equal @parsed, JSON.parse(@utf_32be)
|
48
|
+
assert_equal @parsed, JSON.parse(@utf_32le)
|
49
|
+
end
|
50
|
+
|
51
|
+
def test_parse_ascii_8bit
|
52
|
+
assert_equal @parsed, JSON.parse(@utf_8_ascii_8bit)
|
53
|
+
assert_equal @parsed, JSON.parse(@utf_16be_ascii_8bit)
|
54
|
+
assert_equal @parsed, JSON.parse(@utf_16le_ascii_8bit)
|
55
|
+
assert_equal @parsed, JSON.parse(@utf_32be_ascii_8bit)
|
56
|
+
assert_equal @parsed, JSON.parse(@utf_32le_ascii_8bit)
|
57
|
+
end
|
58
|
+
|
59
|
+
def test_generate
|
60
|
+
assert_equal @generated, JSON.generate(@parsed, :ascii_only => true)
|
61
|
+
if defined?(::Encoding)
|
62
|
+
assert_equal @generated, JSON.generate(@utf_16_data, :ascii_only => true)
|
63
|
+
else
|
64
|
+
# XXX checking of correct utf8 data is not as strict (yet?) without :ascii_only
|
65
|
+
assert_raises(JSON::GeneratorError) { JSON.generate(@utf_16_data, :ascii_only => true) }
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
|
4
|
+
require 'test/unit'
|
5
|
+
case ENV['JSON']
|
6
|
+
when 'pure' then require 'json/pure'
|
7
|
+
when 'ext' then require 'json/ext'
|
8
|
+
else require 'json'
|
9
|
+
end
|
10
|
+
|
11
|
+
class TC_JSONFixtures < Test::Unit::TestCase
|
12
|
+
def setup
|
13
|
+
fixtures = File.join(File.dirname(__FILE__), 'fixtures/*.json')
|
14
|
+
passed, failed = Dir[fixtures].partition { |f| f['pass'] }
|
15
|
+
@passed = passed.inject([]) { |a, f| a << [ f, File.read(f) ] }.sort
|
16
|
+
@failed = failed.inject([]) { |a, f| a << [ f, File.read(f) ] }.sort
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_passing
|
20
|
+
for name, source in @passed
|
21
|
+
assert JSON.parse(source),
|
22
|
+
"Did not pass for fixture '#{name}'"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_failing
|
27
|
+
for name, source in @failed
|
28
|
+
assert_raises(JSON::ParserError, JSON::NestingError,
|
29
|
+
"Did not fail for fixture '#{name}'") do
|
30
|
+
JSON.parse(source)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|