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,69 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
require 'test_helper'
|
3
|
+
|
4
|
+
class JsonTest < Test::Unit::TestCase
|
5
|
+
TESTS = {
|
6
|
+
%q({"data": "G\u00fcnter"}) => {"data" => "Günter"},
|
7
|
+
%q({"returnTo":{"\/categories":"\/"}}) => {"returnTo" => {"/categories" => "/"}},
|
8
|
+
%q({returnTo:{"\/categories":"\/"}}) => {"returnTo" => {"/categories" => "/"}},
|
9
|
+
%q({"return\\"To\\":":{"\/categories":"\/"}}) => {"return\"To\":" => {"/categories" => "/"}},
|
10
|
+
%q({"returnTo":{"\/categories":1}}) => {"returnTo" => {"/categories" => 1}},
|
11
|
+
%({"returnTo":[1,"a"]}) => {"returnTo" => [1, "a"]},
|
12
|
+
%({"returnTo":[1,"\\"a\\",", "b"]}) => {"returnTo" => [1, "\"a\",", "b"]},
|
13
|
+
%({a: "'", "b": "5,000"}) => {"a" => "'", "b" => "5,000"},
|
14
|
+
%({a: "a's, b's and c's", "b": "5,000"}) => {"a" => "a's, b's and c's", "b" => "5,000"},
|
15
|
+
%({a: "2007-01-01"}) => {'a' => Date.new(2007, 1, 1)},
|
16
|
+
%({a: "2007-01-01 01:12:34 Z"}) => {'a' => Time.utc(2007, 1, 1, 1, 12, 34)},
|
17
|
+
# Handle ISO 8601 date/time format http://en.wikipedia.org/wiki/ISO_8601
|
18
|
+
%({a: "2007-01-01T01:12:34Z"}) => {'a' => Time.utc(2007, 1, 1, 1, 12, 34)},
|
19
|
+
# no time zone
|
20
|
+
%({a: "2007-01-01 01:12:34"}) => {'a' => "2007-01-01 01:12:34"},
|
21
|
+
%({"bio": "1985-01-29: birthdate"}) => {'bio' => '1985-01-29: birthdate'},
|
22
|
+
%([]) => [],
|
23
|
+
%({}) => {},
|
24
|
+
%(1) => 1,
|
25
|
+
%("") => "",
|
26
|
+
%("\\"") => "\"",
|
27
|
+
%(null) => nil,
|
28
|
+
%(true) => true,
|
29
|
+
%(false) => false,
|
30
|
+
%q("http:\/\/test.host\/posts\/1") => "http://test.host/posts/1"
|
31
|
+
}
|
32
|
+
|
33
|
+
TESTS.each do |json, expected|
|
34
|
+
should "should decode json (#{json})" do
|
35
|
+
lambda {
|
36
|
+
Crack::JSON.parse(json).should == expected
|
37
|
+
}.should_not raise_error
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
should "should raise error for failed decoding" do
|
42
|
+
lambda {
|
43
|
+
Crack::JSON.parse(%({: 1}))
|
44
|
+
}.should raise_error(Crack::ParseError)
|
45
|
+
end
|
46
|
+
|
47
|
+
should "should be able to parse a JSON response from a Twitter search about 'firefox'" do
|
48
|
+
data = ''
|
49
|
+
File.open(File.dirname(__FILE__) + "/data/twittersearch-firefox.json", "r") { |f|
|
50
|
+
data = f.read
|
51
|
+
}
|
52
|
+
|
53
|
+
lambda {
|
54
|
+
Crack::JSON.parse(data)
|
55
|
+
}.should_not raise_error(Crack::ParseError)
|
56
|
+
end
|
57
|
+
|
58
|
+
should "should be able to parse a JSON response from a Twitter search about 'internet explorer'" do
|
59
|
+
data = ''
|
60
|
+
File.open(File.dirname(__FILE__) + "/data/twittersearch-ie.json", "r") { |f|
|
61
|
+
data = f.read
|
62
|
+
}
|
63
|
+
|
64
|
+
lambda {
|
65
|
+
Crack::JSON.parse(data)
|
66
|
+
}.should_not raise_error(Crack::ParseError)
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class CrackTest < Test::Unit::TestCase
|
4
|
+
context "snake_case" do
|
5
|
+
should "lowercases one word CamelCase" do
|
6
|
+
"Merb".snake_case.should == "merb"
|
7
|
+
end
|
8
|
+
|
9
|
+
should "makes one underscore snake_case two word CamelCase" do
|
10
|
+
"MerbCore".snake_case.should == "merb_core"
|
11
|
+
end
|
12
|
+
|
13
|
+
should "handles CamelCase with more than 2 words" do
|
14
|
+
"SoYouWantContributeToMerbCore".snake_case.should == "so_you_want_contribute_to_merb_core"
|
15
|
+
end
|
16
|
+
|
17
|
+
should "handles CamelCase with more than 2 capital letter in a row" do
|
18
|
+
"CNN".snake_case.should == "cnn"
|
19
|
+
"CNNNews".snake_case.should == "cnn_news"
|
20
|
+
"HeadlineCNNNews".snake_case.should == "headline_cnn_news"
|
21
|
+
end
|
22
|
+
|
23
|
+
should "does NOT change one word lowercase" do
|
24
|
+
"merb".snake_case.should == "merb"
|
25
|
+
end
|
26
|
+
|
27
|
+
should "leaves snake_case as is" do
|
28
|
+
"merb_core".snake_case.should == "merb_core"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'test/unit'
|
3
|
+
require 'shoulda'
|
4
|
+
gem 'jnunemaker-matchy', '>= 0.4.0'
|
5
|
+
require 'matchy'
|
6
|
+
|
7
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
8
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
9
|
+
require 'crack'
|
10
|
+
|
11
|
+
class Test::Unit::TestCase
|
12
|
+
end
|
@@ -0,0 +1,489 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class XmlTest < Test::Unit::TestCase
|
4
|
+
should "should transform a simple tag with content" do
|
5
|
+
xml = "<tag>This is the contents</tag>"
|
6
|
+
Crack::XML.parse(xml).should == { 'tag' => 'This is the contents' }
|
7
|
+
end
|
8
|
+
|
9
|
+
should "should work with cdata tags" do
|
10
|
+
xml = <<-END
|
11
|
+
<tag>
|
12
|
+
<![CDATA[
|
13
|
+
text inside cdata
|
14
|
+
]]>
|
15
|
+
</tag>
|
16
|
+
END
|
17
|
+
Crack::XML.parse(xml)["tag"].strip.should == "text inside cdata"
|
18
|
+
end
|
19
|
+
|
20
|
+
should "should transform a simple tag with attributes" do
|
21
|
+
xml = "<tag attr1='1' attr2='2'></tag>"
|
22
|
+
hash = { 'tag' => { 'attr1' => '1', 'attr2' => '2' } }
|
23
|
+
Crack::XML.parse(xml).should == hash
|
24
|
+
end
|
25
|
+
|
26
|
+
should "should transform repeating siblings into an array" do
|
27
|
+
xml =<<-XML
|
28
|
+
<opt>
|
29
|
+
<user login="grep" fullname="Gary R Epstein" />
|
30
|
+
<user login="stty" fullname="Simon T Tyson" />
|
31
|
+
</opt>
|
32
|
+
XML
|
33
|
+
|
34
|
+
Crack::XML.parse(xml)['opt']['user'].class.should == Array
|
35
|
+
|
36
|
+
hash = {
|
37
|
+
'opt' => {
|
38
|
+
'user' => [{
|
39
|
+
'login' => 'grep',
|
40
|
+
'fullname' => 'Gary R Epstein'
|
41
|
+
},{
|
42
|
+
'login' => 'stty',
|
43
|
+
'fullname' => 'Simon T Tyson'
|
44
|
+
}]
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
Crack::XML.parse(xml).should == hash
|
49
|
+
end
|
50
|
+
|
51
|
+
should "should not transform non-repeating siblings into an array" do
|
52
|
+
xml =<<-XML
|
53
|
+
<opt>
|
54
|
+
<user login="grep" fullname="Gary R Epstein" />
|
55
|
+
</opt>
|
56
|
+
XML
|
57
|
+
|
58
|
+
Crack::XML.parse(xml)['opt']['user'].class.should == Hash
|
59
|
+
|
60
|
+
hash = {
|
61
|
+
'opt' => {
|
62
|
+
'user' => {
|
63
|
+
'login' => 'grep',
|
64
|
+
'fullname' => 'Gary R Epstein'
|
65
|
+
}
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
Crack::XML.parse(xml).should == hash
|
70
|
+
end
|
71
|
+
|
72
|
+
context "Parsing xml with text and attributes" do
|
73
|
+
setup do
|
74
|
+
xml =<<-XML
|
75
|
+
<opt>
|
76
|
+
<user login="grep">Gary R Epstein</user>
|
77
|
+
<user>Simon T Tyson</user>
|
78
|
+
</opt>
|
79
|
+
XML
|
80
|
+
@data = Crack::XML.parse(xml)
|
81
|
+
end
|
82
|
+
|
83
|
+
should "correctly parse text nodes" do
|
84
|
+
@data.should == {
|
85
|
+
'opt' => {
|
86
|
+
'user' => [
|
87
|
+
'Gary R Epstein',
|
88
|
+
'Simon T Tyson'
|
89
|
+
]
|
90
|
+
}
|
91
|
+
}
|
92
|
+
end
|
93
|
+
|
94
|
+
should "be parse attributes for text node if present" do
|
95
|
+
@data['opt']['user'][0].attributes.should == {'login' => 'grep'}
|
96
|
+
end
|
97
|
+
|
98
|
+
should "default attributes to empty hash if not present" do
|
99
|
+
@data['opt']['user'][1].attributes.should == {}
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
should "should typecast an integer" do
|
104
|
+
xml = "<tag type='integer'>10</tag>"
|
105
|
+
Crack::XML.parse(xml)['tag'].should == 10
|
106
|
+
end
|
107
|
+
|
108
|
+
should "should typecast a true boolean" do
|
109
|
+
xml = "<tag type='boolean'>true</tag>"
|
110
|
+
Crack::XML.parse(xml)['tag'].should be(true)
|
111
|
+
end
|
112
|
+
|
113
|
+
should "should typecast a false boolean" do
|
114
|
+
["false"].each do |w|
|
115
|
+
Crack::XML.parse("<tag type='boolean'>#{w}</tag>")['tag'].should be(false)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
should "should typecast a datetime" do
|
120
|
+
xml = "<tag type='datetime'>2007-12-31 10:32</tag>"
|
121
|
+
Crack::XML.parse(xml)['tag'].should == Time.parse( '2007-12-31 10:32' ).utc
|
122
|
+
end
|
123
|
+
|
124
|
+
should "should typecast a date" do
|
125
|
+
xml = "<tag type='date'>2007-12-31</tag>"
|
126
|
+
Crack::XML.parse(xml)['tag'].should == Date.parse('2007-12-31')
|
127
|
+
end
|
128
|
+
|
129
|
+
xml_entities = {
|
130
|
+
"<" => "<",
|
131
|
+
">" => ">",
|
132
|
+
'"' => """,
|
133
|
+
"'" => "'",
|
134
|
+
"&" => "&"
|
135
|
+
}
|
136
|
+
should "should unescape html entities" do
|
137
|
+
xml_entities.each do |k,v|
|
138
|
+
xml = "<tag>Some content #{v}</tag>"
|
139
|
+
Crack::XML.parse(xml)['tag'].should =~ Regexp.new(k)
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
should "should unescape XML entities in attributes" do
|
144
|
+
xml_entities.each do |k,v|
|
145
|
+
xml = "<tag attr='Some content #{v}'></tag>"
|
146
|
+
Crack::XML.parse(xml)['tag']['attr'].should =~ Regexp.new(k)
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
should "should undasherize keys as tags" do
|
151
|
+
xml = "<tag-1>Stuff</tag-1>"
|
152
|
+
Crack::XML.parse(xml).keys.should include( 'tag_1' )
|
153
|
+
end
|
154
|
+
|
155
|
+
should "should undasherize keys as attributes" do
|
156
|
+
xml = "<tag1 attr-1='1'></tag1>"
|
157
|
+
Crack::XML.parse(xml)['tag1'].keys.should include( 'attr_1')
|
158
|
+
end
|
159
|
+
|
160
|
+
should "should undasherize keys as tags and attributes" do
|
161
|
+
xml = "<tag-1 attr-1='1'></tag-1>"
|
162
|
+
Crack::XML.parse(xml).keys.should include( 'tag_1' )
|
163
|
+
Crack::XML.parse(xml)['tag_1'].keys.should include( 'attr_1')
|
164
|
+
end
|
165
|
+
|
166
|
+
should "should render nested content correctly" do
|
167
|
+
xml = "<root><tag1>Tag1 Content <em><strong>This is strong</strong></em></tag1></root>"
|
168
|
+
Crack::XML.parse(xml)['root']['tag1'].should == "Tag1 Content <em><strong>This is strong</strong></em>"
|
169
|
+
end
|
170
|
+
|
171
|
+
should "should render nested content with splshould text nodes correctly" do
|
172
|
+
xml = "<root>Tag1 Content<em>Stuff</em> Hi There</root>"
|
173
|
+
Crack::XML.parse(xml)['root'].should == "Tag1 Content<em>Stuff</em> Hi There"
|
174
|
+
end
|
175
|
+
|
176
|
+
should "should ignore attributes when a child is a text node" do
|
177
|
+
xml = "<root attr1='1'>Stuff</root>"
|
178
|
+
Crack::XML.parse(xml).should == { "root" => "Stuff" }
|
179
|
+
end
|
180
|
+
|
181
|
+
should "should ignore attributes when any child is a text node" do
|
182
|
+
xml = "<root attr1='1'>Stuff <em>in italics</em></root>"
|
183
|
+
Crack::XML.parse(xml).should == { "root" => "Stuff <em>in italics</em>" }
|
184
|
+
end
|
185
|
+
|
186
|
+
should "should correctly transform multiple children" do
|
187
|
+
xml = <<-XML
|
188
|
+
<user gender='m'>
|
189
|
+
<age type='integer'>35</age>
|
190
|
+
<name>Home Simpson</name>
|
191
|
+
<dob type='date'>1988-01-01</dob>
|
192
|
+
<joined-at type='datetime'>2000-04-28 23:01</joined-at>
|
193
|
+
<is-cool type='boolean'>true</is-cool>
|
194
|
+
</user>
|
195
|
+
XML
|
196
|
+
|
197
|
+
hash = {
|
198
|
+
"user" => {
|
199
|
+
"gender" => "m",
|
200
|
+
"age" => 35,
|
201
|
+
"name" => "Home Simpson",
|
202
|
+
"dob" => Date.parse('1988-01-01'),
|
203
|
+
"joined_at" => Time.parse("2000-04-28 23:01"),
|
204
|
+
"is_cool" => true
|
205
|
+
}
|
206
|
+
}
|
207
|
+
|
208
|
+
Crack::XML.parse(xml).should == hash
|
209
|
+
end
|
210
|
+
|
211
|
+
should "should properly handle nil values (ActiveSupport Compatible)" do
|
212
|
+
topic_xml = <<-EOT
|
213
|
+
<topic>
|
214
|
+
<title></title>
|
215
|
+
<id type="integer"></id>
|
216
|
+
<approved type="boolean"></approved>
|
217
|
+
<written-on type="date"></written-on>
|
218
|
+
<viewed-at type="datetime"></viewed-at>
|
219
|
+
<content type="yaml"></content>
|
220
|
+
<parent-id></parent-id>
|
221
|
+
</topic>
|
222
|
+
EOT
|
223
|
+
|
224
|
+
expected_topic_hash = {
|
225
|
+
'title' => nil,
|
226
|
+
'id' => nil,
|
227
|
+
'approved' => nil,
|
228
|
+
'written_on' => nil,
|
229
|
+
'viewed_at' => nil,
|
230
|
+
'content' => nil,
|
231
|
+
'parent_id' => nil
|
232
|
+
}
|
233
|
+
Crack::XML.parse(topic_xml)["topic"].should == expected_topic_hash
|
234
|
+
end
|
235
|
+
|
236
|
+
should "should handle a single record from xml (ActiveSupport Compatible)" do
|
237
|
+
topic_xml = <<-EOT
|
238
|
+
<topic>
|
239
|
+
<title>The First Topic</title>
|
240
|
+
<author-name>David</author-name>
|
241
|
+
<id type="integer">1</id>
|
242
|
+
<approved type="boolean"> true </approved>
|
243
|
+
<replies-count type="integer">0</replies-count>
|
244
|
+
<replies-close-in type="integer">2592000000</replies-close-in>
|
245
|
+
<written-on type="date">2003-07-16</written-on>
|
246
|
+
<viewed-at type="datetime">2003-07-16T09:28:00+0000</viewed-at>
|
247
|
+
<content type="yaml">--- \n1: should be an integer\n:message: Have a nice day\narray: \n- should-have-dashes: true\n should_have_underscores: true\n</content>
|
248
|
+
<author-email-address>david@loudthinking.com</author-email-address>
|
249
|
+
<parent-id></parent-id>
|
250
|
+
<ad-revenue type="decimal">1.5</ad-revenue>
|
251
|
+
<optimum-viewing-angle type="float">135</optimum-viewing-angle>
|
252
|
+
<resident type="symbol">yes</resident>
|
253
|
+
</topic>
|
254
|
+
EOT
|
255
|
+
|
256
|
+
expected_topic_hash = {
|
257
|
+
'title' => "The First Topic",
|
258
|
+
'author_name' => "David",
|
259
|
+
'id' => 1,
|
260
|
+
'approved' => true,
|
261
|
+
'replies_count' => 0,
|
262
|
+
'replies_close_in' => 2592000000,
|
263
|
+
'written_on' => Date.new(2003, 7, 16),
|
264
|
+
'viewed_at' => Time.utc(2003, 7, 16, 9, 28),
|
265
|
+
# Changed this line where the key is :message. The yaml specifies this as a symbol, and who am I to change what you specify
|
266
|
+
# The line in ActiveSupport is
|
267
|
+
# 'content' => { 'message' => "Have a nice day", 1 => "should be an integer", "array" => [{ "should-have-dashes" => true, "should_have_underscores" => true }] },
|
268
|
+
'content' => { :message => "Have a nice day", 1 => "should be an integer", "array" => [{ "should-have-dashes" => true, "should_have_underscores" => true }] },
|
269
|
+
'author_email_address' => "david@loudthinking.com",
|
270
|
+
'parent_id' => nil,
|
271
|
+
'ad_revenue' => BigDecimal("1.50"),
|
272
|
+
'optimum_viewing_angle' => 135.0,
|
273
|
+
'resident' => :yes
|
274
|
+
}
|
275
|
+
|
276
|
+
Crack::XML.parse(topic_xml)["topic"].each do |k,v|
|
277
|
+
v.should == expected_topic_hash[k]
|
278
|
+
end
|
279
|
+
end
|
280
|
+
|
281
|
+
should "should handle multiple records (ActiveSupport Compatible)" do
|
282
|
+
topics_xml = <<-EOT
|
283
|
+
<topics type="array">
|
284
|
+
<topic>
|
285
|
+
<title>The First Topic</title>
|
286
|
+
<author-name>David</author-name>
|
287
|
+
<id type="integer">1</id>
|
288
|
+
<approved type="boolean">false</approved>
|
289
|
+
<replies-count type="integer">0</replies-count>
|
290
|
+
<replies-close-in type="integer">2592000000</replies-close-in>
|
291
|
+
<written-on type="date">2003-07-16</written-on>
|
292
|
+
<viewed-at type="datetime">2003-07-16T09:28:00+0000</viewed-at>
|
293
|
+
<content>Have a nice day</content>
|
294
|
+
<author-email-address>david@loudthinking.com</author-email-address>
|
295
|
+
<parent-id nil="true"></parent-id>
|
296
|
+
</topic>
|
297
|
+
<topic>
|
298
|
+
<title>The Second Topic</title>
|
299
|
+
<author-name>Jason</author-name>
|
300
|
+
<id type="integer">1</id>
|
301
|
+
<approved type="boolean">false</approved>
|
302
|
+
<replies-count type="integer">0</replies-count>
|
303
|
+
<replies-close-in type="integer">2592000000</replies-close-in>
|
304
|
+
<written-on type="date">2003-07-16</written-on>
|
305
|
+
<viewed-at type="datetime">2003-07-16T09:28:00+0000</viewed-at>
|
306
|
+
<content>Have a nice day</content>
|
307
|
+
<author-email-address>david@loudthinking.com</author-email-address>
|
308
|
+
<parent-id></parent-id>
|
309
|
+
</topic>
|
310
|
+
</topics>
|
311
|
+
EOT
|
312
|
+
|
313
|
+
expected_topic_hash = {
|
314
|
+
'title' => "The First Topic",
|
315
|
+
'author_name' => "David",
|
316
|
+
'id' => 1,
|
317
|
+
'approved' => false,
|
318
|
+
'replies_count' => 0,
|
319
|
+
'replies_close_in' => 2592000000,
|
320
|
+
'written_on' => Date.new(2003, 7, 16),
|
321
|
+
'viewed_at' => Time.utc(2003, 7, 16, 9, 28),
|
322
|
+
'content' => "Have a nice day",
|
323
|
+
'author_email_address' => "david@loudthinking.com",
|
324
|
+
'parent_id' => nil
|
325
|
+
}
|
326
|
+
# puts Crack::XML.parse(topics_xml)['topics'].first.inspect
|
327
|
+
Crack::XML.parse(topics_xml)["topics"].first.each do |k,v|
|
328
|
+
v.should == expected_topic_hash[k]
|
329
|
+
end
|
330
|
+
end
|
331
|
+
|
332
|
+
should "should handle a single record from_xml with attributes other than type (ActiveSupport Compatible)" do
|
333
|
+
topic_xml = <<-EOT
|
334
|
+
<rsp stat="ok">
|
335
|
+
<photos page="1" pages="1" perpage="100" total="16">
|
336
|
+
<photo id="175756086" owner="55569174@N00" secret="0279bf37a1" server="76" title="Colored Pencil PhotoBooth Fun" ispublic="1" isfriend="0" isfamily="0"/>
|
337
|
+
</photos>
|
338
|
+
</rsp>
|
339
|
+
EOT
|
340
|
+
|
341
|
+
expected_topic_hash = {
|
342
|
+
'id' => "175756086",
|
343
|
+
'owner' => "55569174@N00",
|
344
|
+
'secret' => "0279bf37a1",
|
345
|
+
'server' => "76",
|
346
|
+
'title' => "Colored Pencil PhotoBooth Fun",
|
347
|
+
'ispublic' => "1",
|
348
|
+
'isfriend' => "0",
|
349
|
+
'isfamily' => "0",
|
350
|
+
}
|
351
|
+
Crack::XML.parse(topic_xml)["rsp"]["photos"]["photo"].each do |k,v|
|
352
|
+
v.should == expected_topic_hash[k]
|
353
|
+
end
|
354
|
+
end
|
355
|
+
|
356
|
+
should "should handle an emtpy array (ActiveSupport Compatible)" do
|
357
|
+
blog_xml = <<-XML
|
358
|
+
<blog>
|
359
|
+
<posts type="array"></posts>
|
360
|
+
</blog>
|
361
|
+
XML
|
362
|
+
expected_blog_hash = {"blog" => {"posts" => []}}
|
363
|
+
Crack::XML.parse(blog_xml).should == expected_blog_hash
|
364
|
+
end
|
365
|
+
|
366
|
+
should "should handle empty array with whitespace from xml (ActiveSupport Compatible)" do
|
367
|
+
blog_xml = <<-XML
|
368
|
+
<blog>
|
369
|
+
<posts type="array">
|
370
|
+
</posts>
|
371
|
+
</blog>
|
372
|
+
XML
|
373
|
+
expected_blog_hash = {"blog" => {"posts" => []}}
|
374
|
+
Crack::XML.parse(blog_xml).should == expected_blog_hash
|
375
|
+
end
|
376
|
+
|
377
|
+
should "should handle array with one entry from_xml (ActiveSupport Compatible)" do
|
378
|
+
blog_xml = <<-XML
|
379
|
+
<blog>
|
380
|
+
<posts type="array">
|
381
|
+
<post>a post</post>
|
382
|
+
</posts>
|
383
|
+
</blog>
|
384
|
+
XML
|
385
|
+
expected_blog_hash = {"blog" => {"posts" => ["a post"]}}
|
386
|
+
Crack::XML.parse(blog_xml).should == expected_blog_hash
|
387
|
+
end
|
388
|
+
|
389
|
+
should "should handle array with multiple entries from xml (ActiveSupport Compatible)" do
|
390
|
+
blog_xml = <<-XML
|
391
|
+
<blog>
|
392
|
+
<posts type="array">
|
393
|
+
<post>a post</post>
|
394
|
+
<post>another post</post>
|
395
|
+
</posts>
|
396
|
+
</blog>
|
397
|
+
XML
|
398
|
+
expected_blog_hash = {"blog" => {"posts" => ["a post", "another post"]}}
|
399
|
+
Crack::XML.parse(blog_xml).should == expected_blog_hash
|
400
|
+
end
|
401
|
+
|
402
|
+
should "should handle file types (ActiveSupport Compatible)" do
|
403
|
+
blog_xml = <<-XML
|
404
|
+
<blog>
|
405
|
+
<logo type="file" name="logo.png" content_type="image/png">
|
406
|
+
</logo>
|
407
|
+
</blog>
|
408
|
+
XML
|
409
|
+
hash = Crack::XML.parse(blog_xml)
|
410
|
+
hash.keys.should include('blog')
|
411
|
+
hash['blog'].keys.should include('logo')
|
412
|
+
|
413
|
+
file = hash['blog']['logo']
|
414
|
+
file.original_filename.should == 'logo.png'
|
415
|
+
file.content_type.should == 'image/png'
|
416
|
+
end
|
417
|
+
|
418
|
+
should "should handle file from xml with defaults (ActiveSupport Compatible)" do
|
419
|
+
blog_xml = <<-XML
|
420
|
+
<blog>
|
421
|
+
<logo type="file">
|
422
|
+
</logo>
|
423
|
+
</blog>
|
424
|
+
XML
|
425
|
+
file = Crack::XML.parse(blog_xml)['blog']['logo']
|
426
|
+
file.original_filename.should == 'untitled'
|
427
|
+
file.content_type.should == 'application/octet-stream'
|
428
|
+
end
|
429
|
+
|
430
|
+
should "should handle xsd like types from xml (ActiveSupport Compatible)" do
|
431
|
+
bacon_xml = <<-EOT
|
432
|
+
<bacon>
|
433
|
+
<weight type="double">0.5</weight>
|
434
|
+
<price type="decimal">12.50</price>
|
435
|
+
<chunky type="boolean"> 1 </chunky>
|
436
|
+
<expires-at type="dateTime">2007-12-25T12:34:56+0000</expires-at>
|
437
|
+
<notes type="string"></notes>
|
438
|
+
<illustration type="base64Binary">YmFiZS5wbmc=</illustration>
|
439
|
+
</bacon>
|
440
|
+
EOT
|
441
|
+
|
442
|
+
expected_bacon_hash = {
|
443
|
+
'weight' => 0.5,
|
444
|
+
'chunky' => true,
|
445
|
+
'price' => BigDecimal("12.50"),
|
446
|
+
'expires_at' => Time.utc(2007,12,25,12,34,56),
|
447
|
+
'notes' => "",
|
448
|
+
'illustration' => "babe.png"
|
449
|
+
}
|
450
|
+
|
451
|
+
Crack::XML.parse(bacon_xml)["bacon"].should == expected_bacon_hash
|
452
|
+
end
|
453
|
+
|
454
|
+
should "should let type trickle through when unknown (ActiveSupport Compatible)" do
|
455
|
+
product_xml = <<-EOT
|
456
|
+
<product>
|
457
|
+
<weight type="double">0.5</weight>
|
458
|
+
<image type="ProductImage"><filename>image.gif</filename></image>
|
459
|
+
|
460
|
+
</product>
|
461
|
+
EOT
|
462
|
+
|
463
|
+
expected_product_hash = {
|
464
|
+
'weight' => 0.5,
|
465
|
+
'image' => {'type' => 'ProductImage', 'filename' => 'image.gif' },
|
466
|
+
}
|
467
|
+
|
468
|
+
Crack::XML.parse(product_xml)["product"].should == expected_product_hash
|
469
|
+
end
|
470
|
+
|
471
|
+
should "should handle unescaping from xml (ActiveResource Compatible)" do
|
472
|
+
xml_string = '<person><bare-string>First & Last Name</bare-string><pre-escaped-string>First &amp; Last Name</pre-escaped-string></person>'
|
473
|
+
expected_hash = {
|
474
|
+
'bare_string' => 'First & Last Name',
|
475
|
+
'pre_escaped_string' => 'First & Last Name'
|
476
|
+
}
|
477
|
+
|
478
|
+
Crack::XML.parse(xml_string)['person'].should == expected_hash
|
479
|
+
end
|
480
|
+
|
481
|
+
should "handle an empty xml string" do
|
482
|
+
Crack::XML.parse('').should == {}
|
483
|
+
end
|
484
|
+
|
485
|
+
# As returned in the response body by the unfuddle XML API when creating objects
|
486
|
+
should "handle an xml string containing a single space" do
|
487
|
+
Crack::XML.parse(' ').should == {}
|
488
|
+
end
|
489
|
+
end
|