mercadopago-custom-checkout 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +23 -0
- data/.gs/bin/rake +23 -0
- data/.gs/cache/faraday-0.9.2.gem +0 -0
- data/.gs/cache/minitest-5.9.0.gem +0 -0
- data/.gs/cache/multi_json-1.12.1.gem +0 -0
- data/.gs/cache/multipart-post-2.0.0.gem +0 -0
- data/.gs/cache/rake-10.5.0.gem +0 -0
- data/.gs/gems/faraday-0.9.2/LICENSE.md +20 -0
- data/.gs/gems/faraday-0.9.2/README.md +245 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday.rb +268 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/adapter.rb +46 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/adapter/em_http.rb +237 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/adapter/em_http_ssl_patch.rb +56 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/adapter/em_synchrony.rb +100 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/adapter/em_synchrony/parallel_manager.rb +66 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/adapter/excon.rb +81 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/adapter/httpclient.rb +117 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb +130 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/adapter/net_http_persistent.rb +49 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/adapter/patron.rb +78 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/adapter/rack.rb +58 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/adapter/test.rb +162 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/adapter/typhoeus.rb +123 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/autoload.rb +84 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/connection.rb +437 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/error.rb +53 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/middleware.rb +37 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/options.rb +359 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/parameters.rb +197 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/rack_builder.rb +213 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/request.rb +92 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/request/authorization.rb +42 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/request/basic_authentication.rb +13 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/request/instrumentation.rb +36 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/request/multipart.rb +63 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/request/retry.rb +154 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/request/token_authentication.rb +15 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/request/url_encoded.rb +36 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/response.rb +93 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/response/logger.rb +59 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/response/raise_error.rb +21 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/upload_io.rb +67 -0
- data/.gs/gems/faraday-0.9.2/lib/faraday/utils.rb +309 -0
- data/.gs/gems/minitest-5.9.0/.autotest +34 -0
- data/.gs/gems/minitest-5.9.0/History.rdoc +1176 -0
- data/.gs/gems/minitest-5.9.0/Manifest.txt +26 -0
- data/.gs/gems/minitest-5.9.0/README.rdoc +656 -0
- data/.gs/gems/minitest-5.9.0/Rakefile +72 -0
- data/.gs/gems/minitest-5.9.0/design_rationale.rb +52 -0
- data/.gs/gems/minitest-5.9.0/lib/hoe/minitest.rb +26 -0
- data/.gs/gems/minitest-5.9.0/lib/minitest.rb +815 -0
- data/.gs/gems/minitest-5.9.0/lib/minitest/assertions.rb +674 -0
- data/.gs/gems/minitest-5.9.0/lib/minitest/autorun.rb +13 -0
- data/.gs/gems/minitest-5.9.0/lib/minitest/benchmark.rb +424 -0
- data/.gs/gems/minitest-5.9.0/lib/minitest/expectations.rb +284 -0
- data/.gs/gems/minitest-5.9.0/lib/minitest/hell.rb +17 -0
- data/.gs/gems/minitest-5.9.0/lib/minitest/mock.rb +232 -0
- data/.gs/gems/minitest-5.9.0/lib/minitest/parallel.rb +69 -0
- data/.gs/gems/minitest-5.9.0/lib/minitest/pride.rb +4 -0
- data/.gs/gems/minitest-5.9.0/lib/minitest/pride_plugin.rb +142 -0
- data/.gs/gems/minitest-5.9.0/lib/minitest/spec.rb +331 -0
- data/.gs/gems/minitest-5.9.0/lib/minitest/test.rb +284 -0
- data/.gs/gems/minitest-5.9.0/lib/minitest/unit.rb +45 -0
- data/.gs/gems/minitest-5.9.0/test/minitest/metametameta.rb +90 -0
- data/.gs/gems/minitest-5.9.0/test/minitest/test_minitest_benchmark.rb +137 -0
- data/.gs/gems/minitest-5.9.0/test/minitest/test_minitest_mock.rb +512 -0
- data/.gs/gems/minitest-5.9.0/test/minitest/test_minitest_reporter.rb +281 -0
- data/.gs/gems/minitest-5.9.0/test/minitest/test_minitest_spec.rb +967 -0
- data/.gs/gems/minitest-5.9.0/test/minitest/test_minitest_test.rb +1983 -0
- data/.gs/gems/multi_json-1.12.1/CHANGELOG.md +245 -0
- data/.gs/gems/multi_json-1.12.1/CONTRIBUTING.md +46 -0
- data/.gs/gems/multi_json-1.12.1/LICENSE.md +20 -0
- data/.gs/gems/multi_json-1.12.1/README.md +121 -0
- data/.gs/gems/multi_json-1.12.1/lib/multi_json.rb +161 -0
- data/.gs/gems/multi_json-1.12.1/lib/multi_json/adapter.rb +49 -0
- data/.gs/gems/multi_json-1.12.1/lib/multi_json/adapter_error.rb +15 -0
- data/.gs/gems/multi_json-1.12.1/lib/multi_json/adapters/gson.rb +20 -0
- data/.gs/gems/multi_json-1.12.1/lib/multi_json/adapters/jr_jackson.rb +25 -0
- data/.gs/gems/multi_json-1.12.1/lib/multi_json/adapters/json_common.rb +23 -0
- data/.gs/gems/multi_json-1.12.1/lib/multi_json/adapters/json_gem.rb +11 -0
- data/.gs/gems/multi_json-1.12.1/lib/multi_json/adapters/json_pure.rb +11 -0
- data/.gs/gems/multi_json-1.12.1/lib/multi_json/adapters/nsjsonserialization.rb +32 -0
- data/.gs/gems/multi_json-1.12.1/lib/multi_json/adapters/oj.rb +25 -0
- data/.gs/gems/multi_json-1.12.1/lib/multi_json/adapters/ok_json.rb +23 -0
- data/.gs/gems/multi_json-1.12.1/lib/multi_json/adapters/yajl.rb +19 -0
- data/.gs/gems/multi_json-1.12.1/lib/multi_json/convertible_hash_keys.rb +43 -0
- data/.gs/gems/multi_json-1.12.1/lib/multi_json/options.rb +39 -0
- data/.gs/gems/multi_json-1.12.1/lib/multi_json/options_cache.rb +29 -0
- data/.gs/gems/multi_json-1.12.1/lib/multi_json/parse_error.rb +17 -0
- data/.gs/gems/multi_json-1.12.1/lib/multi_json/vendor/okjson.rb +606 -0
- data/.gs/gems/multi_json-1.12.1/lib/multi_json/version.rb +17 -0
- data/.gs/gems/multi_json-1.12.1/multi_json.gemspec +20 -0
- data/.gs/gems/multipart-post-2.0.0/.gitignore +6 -0
- data/.gs/gems/multipart-post-2.0.0/.travis.yml +7 -0
- data/.gs/gems/multipart-post-2.0.0/Gemfile +14 -0
- data/.gs/gems/multipart-post-2.0.0/History.txt +60 -0
- data/.gs/gems/multipart-post-2.0.0/Manifest.txt +9 -0
- data/.gs/gems/multipart-post-2.0.0/README.md +77 -0
- data/.gs/gems/multipart-post-2.0.0/Rakefile +9 -0
- data/.gs/gems/multipart-post-2.0.0/lib/composite_io.rb +108 -0
- data/.gs/gems/multipart-post-2.0.0/lib/multipart_post.rb +9 -0
- data/.gs/gems/multipart-post-2.0.0/lib/multipartable.rb +29 -0
- data/.gs/gems/multipart-post-2.0.0/lib/net/http/post/multipart.rb +27 -0
- data/.gs/gems/multipart-post-2.0.0/lib/parts.rb +96 -0
- data/.gs/gems/multipart-post-2.0.0/multipart-post.gemspec +22 -0
- data/.gs/gems/multipart-post-2.0.0/test/multibyte.txt +1 -0
- data/.gs/gems/multipart-post-2.0.0/test/net/http/post/test_multipart.rb +110 -0
- data/.gs/gems/multipart-post-2.0.0/test/test_composite_io.rb +115 -0
- data/.gs/gems/multipart-post-2.0.0/test/test_parts.rb +86 -0
- data/.gs/gems/rake-10.5.0/.autotest +7 -0
- data/.gs/gems/rake-10.5.0/.rubocop.yml +27 -0
- data/.gs/gems/rake-10.5.0/.togglerc +7 -0
- data/.gs/gems/rake-10.5.0/CONTRIBUTING.rdoc +38 -0
- data/.gs/gems/rake-10.5.0/History.rdoc +659 -0
- data/.gs/gems/rake-10.5.0/MIT-LICENSE +21 -0
- data/.gs/gems/rake-10.5.0/Manifest.txt +166 -0
- data/.gs/gems/rake-10.5.0/README.rdoc +139 -0
- data/.gs/gems/rake-10.5.0/Rakefile +81 -0
- data/.gs/gems/rake-10.5.0/bin/rake +33 -0
- data/.gs/gems/rake-10.5.0/doc/command_line_usage.rdoc +158 -0
- data/.gs/gems/rake-10.5.0/doc/example/Rakefile1 +38 -0
- data/.gs/gems/rake-10.5.0/doc/example/Rakefile2 +35 -0
- data/.gs/gems/rake-10.5.0/doc/example/a.c +6 -0
- data/.gs/gems/rake-10.5.0/doc/example/b.c +6 -0
- data/.gs/gems/rake-10.5.0/doc/example/main.c +11 -0
- data/.gs/gems/rake-10.5.0/doc/glossary.rdoc +42 -0
- data/.gs/gems/rake-10.5.0/doc/jamis.rb +591 -0
- data/.gs/gems/rake-10.5.0/doc/proto_rake.rdoc +127 -0
- data/.gs/gems/rake-10.5.0/doc/rake.1 +141 -0
- data/.gs/gems/rake-10.5.0/doc/rakefile.rdoc +624 -0
- data/.gs/gems/rake-10.5.0/doc/rational.rdoc +151 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.4.14.rdoc +23 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.4.15.rdoc +35 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.5.0.rdoc +53 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.5.3.rdoc +78 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.5.4.rdoc +46 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.6.0.rdoc +141 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.7.0.rdoc +119 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.7.1.rdoc +59 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.7.2.rdoc +121 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.7.3.rdoc +47 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.8.0.rdoc +114 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.8.2.rdoc +165 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.8.3.rdoc +112 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.8.4.rdoc +147 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.8.5.rdoc +53 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.8.6.rdoc +37 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.8.7.rdoc +55 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.9.0.rdoc +112 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.9.1.rdoc +52 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.rdoc +49 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.9.3.rdoc +102 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.9.4.rdoc +60 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.9.5.rdoc +55 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-0.9.6.rdoc +64 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-10.0.0.rdoc +178 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-10.0.1.rdoc +58 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-10.0.2.rdoc +53 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-10.0.3.rdoc +191 -0
- data/.gs/gems/rake-10.5.0/doc/release_notes/rake-10.1.0.rdoc +61 -0
- data/.gs/gems/rake-10.5.0/lib/rake.rb +79 -0
- data/.gs/gems/rake-10.5.0/lib/rake/alt_system.rb +110 -0
- data/.gs/gems/rake-10.5.0/lib/rake/application.rb +790 -0
- data/.gs/gems/rake-10.5.0/lib/rake/backtrace.rb +23 -0
- data/.gs/gems/rake-10.5.0/lib/rake/clean.rb +76 -0
- data/.gs/gems/rake-10.5.0/lib/rake/cloneable.rb +16 -0
- data/.gs/gems/rake-10.5.0/lib/rake/contrib/.document +1 -0
- data/.gs/gems/rake-10.5.0/lib/rake/contrib/compositepublisher.rb +21 -0
- data/.gs/gems/rake-10.5.0/lib/rake/contrib/ftptools.rb +137 -0
- data/.gs/gems/rake-10.5.0/lib/rake/contrib/publisher.rb +81 -0
- data/.gs/gems/rake-10.5.0/lib/rake/contrib/rubyforgepublisher.rb +18 -0
- data/.gs/gems/rake-10.5.0/lib/rake/contrib/sshpublisher.rb +61 -0
- data/.gs/gems/rake-10.5.0/lib/rake/contrib/sys.rb +4 -0
- data/.gs/gems/rake-10.5.0/lib/rake/cpu_counter.rb +125 -0
- data/.gs/gems/rake-10.5.0/lib/rake/default_loader.rb +14 -0
- data/.gs/gems/rake-10.5.0/lib/rake/dsl_definition.rb +201 -0
- data/.gs/gems/rake-10.5.0/lib/rake/early_time.rb +21 -0
- data/.gs/gems/rake-10.5.0/lib/rake/ext/core.rb +25 -0
- data/.gs/gems/rake-10.5.0/lib/rake/ext/module.rb +2 -0
- data/.gs/gems/rake-10.5.0/lib/rake/ext/pathname.rb +25 -0
- data/.gs/gems/rake-10.5.0/lib/rake/ext/string.rb +175 -0
- data/.gs/gems/rake-10.5.0/lib/rake/ext/time.rb +18 -0
- data/.gs/gems/rake-10.5.0/lib/rake/file_creation_task.rb +24 -0
- data/.gs/gems/rake-10.5.0/lib/rake/file_list.rb +428 -0
- data/.gs/gems/rake-10.5.0/lib/rake/file_task.rb +46 -0
- data/.gs/gems/rake-10.5.0/lib/rake/file_utils.rb +128 -0
- data/.gs/gems/rake-10.5.0/lib/rake/file_utils_ext.rb +144 -0
- data/.gs/gems/rake-10.5.0/lib/rake/gempackagetask.rb +4 -0
- data/.gs/gems/rake-10.5.0/lib/rake/invocation_chain.rb +56 -0
- data/.gs/gems/rake-10.5.0/lib/rake/invocation_exception_mixin.rb +16 -0
- data/.gs/gems/rake-10.5.0/lib/rake/late_time.rb +17 -0
- data/.gs/gems/rake-10.5.0/lib/rake/linked_list.rb +103 -0
- data/.gs/gems/rake-10.5.0/lib/rake/loaders/makefile.rb +53 -0
- data/.gs/gems/rake-10.5.0/lib/rake/multi_task.rb +13 -0
- data/.gs/gems/rake-10.5.0/lib/rake/name_space.rb +38 -0
- data/.gs/gems/rake-10.5.0/lib/rake/packagetask.rb +199 -0
- data/.gs/gems/rake-10.5.0/lib/rake/pathmap.rb +3 -0
- data/.gs/gems/rake-10.5.0/lib/rake/phony.rb +15 -0
- data/.gs/gems/rake-10.5.0/lib/rake/private_reader.rb +20 -0
- data/.gs/gems/rake-10.5.0/lib/rake/promise.rb +99 -0
- data/.gs/gems/rake-10.5.0/lib/rake/pseudo_status.rb +29 -0
- data/.gs/gems/rake-10.5.0/lib/rake/rake_module.rb +38 -0
- data/.gs/gems/rake-10.5.0/lib/rake/rake_test_loader.rb +22 -0
- data/.gs/gems/rake-10.5.0/lib/rake/rdoctask.rb +4 -0
- data/.gs/gems/rake-10.5.0/lib/rake/ruby182_test_unit_fix.rb +29 -0
- data/.gs/gems/rake-10.5.0/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/.gs/gems/rake-10.5.0/lib/rake/runtest.rb +27 -0
- data/.gs/gems/rake-10.5.0/lib/rake/scope.rb +42 -0
- data/.gs/gems/rake-10.5.0/lib/rake/task.rb +383 -0
- data/.gs/gems/rake-10.5.0/lib/rake/task_argument_error.rb +7 -0
- data/.gs/gems/rake-10.5.0/lib/rake/task_arguments.rb +98 -0
- data/.gs/gems/rake-10.5.0/lib/rake/task_manager.rb +307 -0
- data/.gs/gems/rake-10.5.0/lib/rake/tasklib.rb +24 -0
- data/.gs/gems/rake-10.5.0/lib/rake/testtask.rb +213 -0
- data/.gs/gems/rake-10.5.0/lib/rake/thread_history_display.rb +48 -0
- data/.gs/gems/rake-10.5.0/lib/rake/thread_pool.rb +164 -0
- data/.gs/gems/rake-10.5.0/lib/rake/trace_output.rb +22 -0
- data/.gs/gems/rake-10.5.0/lib/rake/version.rb +7 -0
- data/.gs/gems/rake-10.5.0/lib/rake/win32.rb +56 -0
- data/.gs/gems/rake-10.5.0/rakelib/publish.rake +20 -0
- data/.gs/gems/rake-10.5.0/rakelib/test_times.rake +25 -0
- data/.gs/gems/rake-10.5.0/test/file_creation.rb +34 -0
- data/.gs/gems/rake-10.5.0/test/helper.rb +129 -0
- data/.gs/gems/rake-10.5.0/test/support/rakefile_definitions.rb +478 -0
- data/.gs/gems/rake-10.5.0/test/support/ruby_runner.rb +34 -0
- data/.gs/gems/rake-10.5.0/test/test_private_reader.rb +42 -0
- data/.gs/gems/rake-10.5.0/test/test_rake.rb +40 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_application.rb +643 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_application_options.rb +468 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_backtrace.rb +119 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_clean.rb +61 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_cpu_counter.rb +68 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_definitions.rb +84 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_directory_task.rb +76 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_dsl.rb +40 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_early_time.rb +31 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_extension.rb +59 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_file_creation_task.rb +56 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_file_list.rb +670 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_file_list_path_map.rb +8 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_file_task.rb +197 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_file_utils.rb +314 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_ftp_file.rb +74 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_functional.rb +482 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_invocation_chain.rb +64 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_late_time.rb +18 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_linked_list.rb +84 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_makefile_loader.rb +46 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_multi_task.rb +64 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_name_space.rb +57 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_package_task.rb +79 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_path_map.rb +168 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_path_map_explode.rb +34 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_path_map_partial.rb +18 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_pathname_extensions.rb +15 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_pseudo_status.rb +21 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_rake_test_loader.rb +20 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_reduce_compat.rb +26 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_require.rb +40 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_rules.rb +388 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_scope.rb +44 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_task.rb +393 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_task_argument_parsing.rb +119 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_task_arguments.rb +127 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_task_lib.rb +9 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_task_manager.rb +178 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_task_manager_argument_resolution.rb +19 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_task_with_arguments.rb +172 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_test_task.rb +146 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_thread_pool.rb +145 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_top_level_functions.rb +71 -0
- data/.gs/gems/rake-10.5.0/test/test_rake_win32.rb +72 -0
- data/.gs/gems/rake-10.5.0/test/test_thread_history_display.rb +101 -0
- data/.gs/gems/rake-10.5.0/test/test_trace_output.rb +52 -0
- data/.gs/specifications/faraday-0.9.2.gemspec +31 -0
- data/.gs/specifications/minitest-5.9.0.gemspec +39 -0
- data/.gs/specifications/multi_json-1.12.1.gemspec +33 -0
- data/.gs/specifications/multipart-post-2.0.0.gemspec +22 -0
- data/.gs/specifications/rake-10.5.0.gemspec +43 -0
- data/.rubocop.yml +36 -0
- data/.ruby-version +1 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +10 -0
- data/LICENSE.txt +21 -0
- data/README.md +35 -0
- data/Rakefile +38 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/mercadopago/core/client.rb +70 -0
- data/lib/mercadopago/core/endpoints.rb +134 -0
- data/lib/mercadopago/core/errors.rb +6 -0
- data/lib/mercadopago/core/gateway.rb +84 -0
- data/lib/mercadopago/custom_checkout.rb +29 -0
- data/lib/mercadopago/custom_checkout/account.rb +162 -0
- data/lib/mercadopago/custom_checkout/card_issuer.rb +20 -0
- data/lib/mercadopago/custom_checkout/card_token.rb +57 -0
- data/lib/mercadopago/custom_checkout/customer.rb +84 -0
- data/lib/mercadopago/custom_checkout/errors.rb +6 -0
- data/lib/mercadopago/custom_checkout/identification_type.rb +19 -0
- data/lib/mercadopago/custom_checkout/payment_method.rb +42 -0
- data/lib/mercadopago/custom_checkout/payments.rb +24 -0
- data/lib/mercadopago/custom_checkout/resource.rb +14 -0
- data/lib/mercadopago/custom_checkout/version.rb +5 -0
- data/mercadopago-custom-checkout.gemspec +30 -0
- metadata +455 -0
@@ -0,0 +1,98 @@
|
|
1
|
+
module Rake
|
2
|
+
|
3
|
+
##
|
4
|
+
# TaskArguments manage the arguments passed to a task.
|
5
|
+
#
|
6
|
+
class TaskArguments
|
7
|
+
include Enumerable
|
8
|
+
|
9
|
+
# Argument names
|
10
|
+
attr_reader :names
|
11
|
+
|
12
|
+
# Create a TaskArgument object with a list of argument +names+ and a set
|
13
|
+
# of associated +values+. +parent+ is the parent argument object.
|
14
|
+
def initialize(names, values, parent=nil)
|
15
|
+
@names = names
|
16
|
+
@parent = parent
|
17
|
+
@hash = {}
|
18
|
+
@values = values
|
19
|
+
names.each_with_index { |name, i|
|
20
|
+
@hash[name.to_sym] = values[i] unless values[i].nil?
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
# Retrieve the complete array of sequential values
|
25
|
+
def to_a
|
26
|
+
@values.dup
|
27
|
+
end
|
28
|
+
|
29
|
+
# Retrieve the list of values not associated with named arguments
|
30
|
+
def extras
|
31
|
+
@values[@names.length..-1] || []
|
32
|
+
end
|
33
|
+
|
34
|
+
# Create a new argument scope using the prerequisite argument
|
35
|
+
# names.
|
36
|
+
def new_scope(names)
|
37
|
+
values = names.map { |n| self[n] }
|
38
|
+
self.class.new(names, values + extras, self)
|
39
|
+
end
|
40
|
+
|
41
|
+
# Find an argument value by name or index.
|
42
|
+
def [](index)
|
43
|
+
lookup(index.to_sym)
|
44
|
+
end
|
45
|
+
|
46
|
+
# Specify a hash of default values for task arguments. Use the
|
47
|
+
# defaults only if there is no specific value for the given
|
48
|
+
# argument.
|
49
|
+
def with_defaults(defaults)
|
50
|
+
@hash = defaults.merge(@hash)
|
51
|
+
end
|
52
|
+
|
53
|
+
# Enumerates the arguments and their values
|
54
|
+
def each(&block)
|
55
|
+
@hash.each(&block)
|
56
|
+
end
|
57
|
+
|
58
|
+
# Extracts the argument values at +keys+
|
59
|
+
def values_at(*keys)
|
60
|
+
keys.map { |k| lookup(k) }
|
61
|
+
end
|
62
|
+
|
63
|
+
# Returns the value of the given argument via method_missing
|
64
|
+
def method_missing(sym, *args)
|
65
|
+
lookup(sym.to_sym)
|
66
|
+
end
|
67
|
+
|
68
|
+
# Returns a Hash of arguments and their values
|
69
|
+
def to_hash
|
70
|
+
@hash
|
71
|
+
end
|
72
|
+
|
73
|
+
def to_s # :nodoc:
|
74
|
+
@hash.inspect
|
75
|
+
end
|
76
|
+
|
77
|
+
def inspect # :nodoc:
|
78
|
+
to_s
|
79
|
+
end
|
80
|
+
|
81
|
+
# Returns true if +key+ is one of the arguments
|
82
|
+
def has_key?(key)
|
83
|
+
@hash.has_key?(key)
|
84
|
+
end
|
85
|
+
|
86
|
+
protected
|
87
|
+
|
88
|
+
def lookup(name) # :nodoc:
|
89
|
+
if @hash.has_key?(name)
|
90
|
+
@hash[name]
|
91
|
+
elsif @parent
|
92
|
+
@parent.lookup(name)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
EMPTY_TASK_ARGS = TaskArguments.new([], []) # :nodoc:
|
98
|
+
end
|
@@ -0,0 +1,307 @@
|
|
1
|
+
module Rake
|
2
|
+
|
3
|
+
# The TaskManager module is a mixin for managing tasks.
|
4
|
+
module TaskManager
|
5
|
+
# Track the last comment made in the Rakefile.
|
6
|
+
attr_accessor :last_description
|
7
|
+
|
8
|
+
# TODO: Remove in Rake 11
|
9
|
+
|
10
|
+
alias :last_comment :last_description # :nodoc: Backwards compatibility
|
11
|
+
|
12
|
+
def initialize # :nodoc:
|
13
|
+
super
|
14
|
+
@tasks = Hash.new
|
15
|
+
@rules = Array.new
|
16
|
+
@scope = Scope.make
|
17
|
+
@last_description = nil
|
18
|
+
end
|
19
|
+
|
20
|
+
def create_rule(*args, &block) # :nodoc:
|
21
|
+
pattern, args, deps = resolve_args(args)
|
22
|
+
pattern = Regexp.new(Regexp.quote(pattern) + '$') if String === pattern
|
23
|
+
@rules << [pattern, args, deps, block]
|
24
|
+
end
|
25
|
+
|
26
|
+
def define_task(task_class, *args, &block) # :nodoc:
|
27
|
+
task_name, arg_names, deps = resolve_args(args)
|
28
|
+
|
29
|
+
original_scope = @scope
|
30
|
+
if String === task_name and
|
31
|
+
not task_class.ancestors.include? Rake::FileTask then
|
32
|
+
task_name, *definition_scope = *(task_name.split(":").reverse)
|
33
|
+
@scope = Scope.make(*(definition_scope + @scope.to_a))
|
34
|
+
end
|
35
|
+
|
36
|
+
task_name = task_class.scope_name(@scope, task_name)
|
37
|
+
deps = [deps] unless deps.respond_to?(:to_ary)
|
38
|
+
deps = deps.map { |d| Rake.from_pathname(d).to_s }
|
39
|
+
task = intern(task_class, task_name)
|
40
|
+
task.set_arg_names(arg_names) unless arg_names.empty?
|
41
|
+
if Rake::TaskManager.record_task_metadata
|
42
|
+
add_location(task)
|
43
|
+
task.add_description(get_description(task))
|
44
|
+
end
|
45
|
+
task.enhance(deps, &block)
|
46
|
+
ensure
|
47
|
+
@scope = original_scope
|
48
|
+
end
|
49
|
+
|
50
|
+
# Lookup a task. Return an existing task if found, otherwise
|
51
|
+
# create a task of the current type.
|
52
|
+
def intern(task_class, task_name)
|
53
|
+
@tasks[task_name.to_s] ||= task_class.new(task_name, self)
|
54
|
+
end
|
55
|
+
|
56
|
+
# Find a matching task for +task_name+.
|
57
|
+
def [](task_name, scopes=nil)
|
58
|
+
task_name = task_name.to_s
|
59
|
+
self.lookup(task_name, scopes) or
|
60
|
+
enhance_with_matching_rule(task_name) or
|
61
|
+
synthesize_file_task(task_name) or
|
62
|
+
fail "Don't know how to build task '#{task_name}' (see --tasks)"
|
63
|
+
end
|
64
|
+
|
65
|
+
def synthesize_file_task(task_name) # :nodoc:
|
66
|
+
return nil unless File.exist?(task_name)
|
67
|
+
define_task(Rake::FileTask, task_name)
|
68
|
+
end
|
69
|
+
|
70
|
+
# Resolve the arguments for a task/rule. Returns a triplet of
|
71
|
+
# [task_name, arg_name_list, prerequisites].
|
72
|
+
def resolve_args(args)
|
73
|
+
if args.last.is_a?(Hash)
|
74
|
+
deps = args.pop
|
75
|
+
resolve_args_with_dependencies(args, deps)
|
76
|
+
else
|
77
|
+
resolve_args_without_dependencies(args)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# Resolve task arguments for a task or rule when there are no
|
82
|
+
# dependencies declared.
|
83
|
+
#
|
84
|
+
# The patterns recognized by this argument resolving function are:
|
85
|
+
#
|
86
|
+
# task :t
|
87
|
+
# task :t, [:a]
|
88
|
+
#
|
89
|
+
def resolve_args_without_dependencies(args)
|
90
|
+
task_name = args.shift
|
91
|
+
if args.size == 1 && args.first.respond_to?(:to_ary)
|
92
|
+
arg_names = args.first.to_ary
|
93
|
+
else
|
94
|
+
arg_names = args
|
95
|
+
end
|
96
|
+
[task_name, arg_names, []]
|
97
|
+
end
|
98
|
+
private :resolve_args_without_dependencies
|
99
|
+
|
100
|
+
# Resolve task arguments for a task or rule when there are
|
101
|
+
# dependencies declared.
|
102
|
+
#
|
103
|
+
# The patterns recognized by this argument resolving function are:
|
104
|
+
#
|
105
|
+
# task :t => [:d]
|
106
|
+
# task :t, [a] => [:d]
|
107
|
+
#
|
108
|
+
def resolve_args_with_dependencies(args, hash) # :nodoc:
|
109
|
+
fail "Task Argument Error" if hash.size != 1
|
110
|
+
key, value = hash.map { |k, v| [k, v] }.first
|
111
|
+
if args.empty?
|
112
|
+
task_name = key
|
113
|
+
arg_names = []
|
114
|
+
deps = value || []
|
115
|
+
else
|
116
|
+
task_name = args.shift
|
117
|
+
arg_names = key
|
118
|
+
deps = value
|
119
|
+
end
|
120
|
+
deps = [deps] unless deps.respond_to?(:to_ary)
|
121
|
+
[task_name, arg_names, deps]
|
122
|
+
end
|
123
|
+
private :resolve_args_with_dependencies
|
124
|
+
|
125
|
+
# If a rule can be found that matches the task name, enhance the
|
126
|
+
# task with the prerequisites and actions from the rule. Set the
|
127
|
+
# source attribute of the task appropriately for the rule. Return
|
128
|
+
# the enhanced task or nil of no rule was found.
|
129
|
+
def enhance_with_matching_rule(task_name, level=0)
|
130
|
+
fail Rake::RuleRecursionOverflowError,
|
131
|
+
"Rule Recursion Too Deep" if level >= 16
|
132
|
+
@rules.each do |pattern, args, extensions, block|
|
133
|
+
if pattern.match(task_name)
|
134
|
+
task = attempt_rule(task_name, args, extensions, block, level)
|
135
|
+
return task if task
|
136
|
+
end
|
137
|
+
end
|
138
|
+
nil
|
139
|
+
rescue Rake::RuleRecursionOverflowError => ex
|
140
|
+
ex.add_target(task_name)
|
141
|
+
fail ex
|
142
|
+
end
|
143
|
+
|
144
|
+
# List of all defined tasks in this application.
|
145
|
+
def tasks
|
146
|
+
@tasks.values.sort_by { |t| t.name }
|
147
|
+
end
|
148
|
+
|
149
|
+
# List of all the tasks defined in the given scope (and its
|
150
|
+
# sub-scopes).
|
151
|
+
def tasks_in_scope(scope)
|
152
|
+
prefix = scope.path
|
153
|
+
tasks.select { |t|
|
154
|
+
/^#{prefix}:/ =~ t.name
|
155
|
+
}
|
156
|
+
end
|
157
|
+
|
158
|
+
# Clear all tasks in this application.
|
159
|
+
def clear
|
160
|
+
@tasks.clear
|
161
|
+
@rules.clear
|
162
|
+
end
|
163
|
+
|
164
|
+
# Lookup a task, using scope and the scope hints in the task name.
|
165
|
+
# This method performs straight lookups without trying to
|
166
|
+
# synthesize file tasks or rules. Special scope names (e.g. '^')
|
167
|
+
# are recognized. If no scope argument is supplied, use the
|
168
|
+
# current scope. Return nil if the task cannot be found.
|
169
|
+
def lookup(task_name, initial_scope=nil)
|
170
|
+
initial_scope ||= @scope
|
171
|
+
task_name = task_name.to_s
|
172
|
+
if task_name =~ /^rake:/
|
173
|
+
scopes = Scope.make
|
174
|
+
task_name = task_name.sub(/^rake:/, '')
|
175
|
+
elsif task_name =~ /^(\^+)/
|
176
|
+
scopes = initial_scope.trim($1.size)
|
177
|
+
task_name = task_name.sub(/^(\^+)/, '')
|
178
|
+
else
|
179
|
+
scopes = initial_scope
|
180
|
+
end
|
181
|
+
lookup_in_scope(task_name, scopes)
|
182
|
+
end
|
183
|
+
|
184
|
+
# Lookup the task name
|
185
|
+
def lookup_in_scope(name, scope)
|
186
|
+
loop do
|
187
|
+
tn = scope.path_with_task_name(name)
|
188
|
+
task = @tasks[tn]
|
189
|
+
return task if task
|
190
|
+
break if scope.empty?
|
191
|
+
scope = scope.tail
|
192
|
+
end
|
193
|
+
nil
|
194
|
+
end
|
195
|
+
private :lookup_in_scope
|
196
|
+
|
197
|
+
# Return the list of scope names currently active in the task
|
198
|
+
# manager.
|
199
|
+
def current_scope
|
200
|
+
@scope
|
201
|
+
end
|
202
|
+
|
203
|
+
# Evaluate the block in a nested namespace named +name+. Create
|
204
|
+
# an anonymous namespace if +name+ is nil.
|
205
|
+
def in_namespace(name)
|
206
|
+
name ||= generate_name
|
207
|
+
@scope = Scope.new(name, @scope)
|
208
|
+
ns = NameSpace.new(self, @scope)
|
209
|
+
yield(ns)
|
210
|
+
ns
|
211
|
+
ensure
|
212
|
+
@scope = @scope.tail
|
213
|
+
end
|
214
|
+
|
215
|
+
private
|
216
|
+
|
217
|
+
# Add a location to the locations field of the given task.
|
218
|
+
def add_location(task)
|
219
|
+
loc = find_location
|
220
|
+
task.locations << loc if loc
|
221
|
+
task
|
222
|
+
end
|
223
|
+
|
224
|
+
# Find the location that called into the dsl layer.
|
225
|
+
def find_location
|
226
|
+
locations = caller
|
227
|
+
i = 0
|
228
|
+
while locations[i]
|
229
|
+
return locations[i + 1] if locations[i] =~ /rake\/dsl_definition.rb/
|
230
|
+
i += 1
|
231
|
+
end
|
232
|
+
nil
|
233
|
+
end
|
234
|
+
|
235
|
+
# Generate an anonymous namespace name.
|
236
|
+
def generate_name
|
237
|
+
@seed ||= 0
|
238
|
+
@seed += 1
|
239
|
+
"_anon_#{@seed}"
|
240
|
+
end
|
241
|
+
|
242
|
+
def trace_rule(level, message) # :nodoc:
|
243
|
+
options.trace_output.puts "#{" " * level}#{message}" if
|
244
|
+
Rake.application.options.trace_rules
|
245
|
+
end
|
246
|
+
|
247
|
+
# Attempt to create a rule given the list of prerequisites.
|
248
|
+
def attempt_rule(task_name, args, extensions, block, level)
|
249
|
+
sources = make_sources(task_name, extensions)
|
250
|
+
prereqs = sources.map { |source|
|
251
|
+
trace_rule level, "Attempting Rule #{task_name} => #{source}"
|
252
|
+
if File.exist?(source) || Rake::Task.task_defined?(source)
|
253
|
+
trace_rule level, "(#{task_name} => #{source} ... EXIST)"
|
254
|
+
source
|
255
|
+
elsif parent = enhance_with_matching_rule(source, level + 1)
|
256
|
+
trace_rule level, "(#{task_name} => #{source} ... ENHANCE)"
|
257
|
+
parent.name
|
258
|
+
else
|
259
|
+
trace_rule level, "(#{task_name} => #{source} ... FAIL)"
|
260
|
+
return nil
|
261
|
+
end
|
262
|
+
}
|
263
|
+
task = FileTask.define_task(task_name, {args => prereqs}, &block)
|
264
|
+
task.sources = prereqs
|
265
|
+
task
|
266
|
+
end
|
267
|
+
|
268
|
+
# Make a list of sources from the list of file name extensions /
|
269
|
+
# translation procs.
|
270
|
+
def make_sources(task_name, extensions)
|
271
|
+
result = extensions.map { |ext|
|
272
|
+
case ext
|
273
|
+
when /%/
|
274
|
+
task_name.pathmap(ext)
|
275
|
+
when %r{/}
|
276
|
+
ext
|
277
|
+
when /^\./
|
278
|
+
task_name.ext(ext)
|
279
|
+
when String
|
280
|
+
ext
|
281
|
+
when Proc, Method
|
282
|
+
if ext.arity == 1
|
283
|
+
ext.call(task_name)
|
284
|
+
else
|
285
|
+
ext.call
|
286
|
+
end
|
287
|
+
else
|
288
|
+
fail "Don't know how to handle rule dependent: #{ext.inspect}"
|
289
|
+
end
|
290
|
+
}
|
291
|
+
result.flatten
|
292
|
+
end
|
293
|
+
|
294
|
+
# Return the current description, clearing it in the process.
|
295
|
+
def get_description(task)
|
296
|
+
desc = @last_description
|
297
|
+
@last_description = nil
|
298
|
+
desc
|
299
|
+
end
|
300
|
+
|
301
|
+
class << self
|
302
|
+
attr_accessor :record_task_metadata # :nodoc:
|
303
|
+
TaskManager.record_task_metadata = false
|
304
|
+
end
|
305
|
+
end
|
306
|
+
|
307
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'rake'
|
2
|
+
|
3
|
+
module Rake
|
4
|
+
|
5
|
+
# Base class for Task Libraries.
|
6
|
+
class TaskLib
|
7
|
+
include Cloneable
|
8
|
+
include Rake::DSL
|
9
|
+
|
10
|
+
# Make a symbol by pasting two strings together.
|
11
|
+
#
|
12
|
+
# NOTE: DEPRECATED! This method is kinda stupid. I don't know why
|
13
|
+
# I didn't just use string interpolation. But now other task
|
14
|
+
# libraries depend on this so I can't remove it without breaking
|
15
|
+
# other people's code. So for now it stays for backwards
|
16
|
+
# compatibility. BUT DON'T USE IT.
|
17
|
+
#--
|
18
|
+
# TODO: Remove in Rake 11
|
19
|
+
def paste(a, b) # :nodoc:
|
20
|
+
(a.to_s + b.to_s).intern
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
@@ -0,0 +1,213 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/tasklib'
|
3
|
+
|
4
|
+
module Rake
|
5
|
+
|
6
|
+
# Create a task that runs a set of tests.
|
7
|
+
#
|
8
|
+
# Example:
|
9
|
+
# require "rake/testtask"
|
10
|
+
#
|
11
|
+
# Rake::TestTask.new do |t|
|
12
|
+
# t.libs << "test"
|
13
|
+
# t.test_files = FileList['test/test*.rb']
|
14
|
+
# t.verbose = true
|
15
|
+
# end
|
16
|
+
#
|
17
|
+
# If rake is invoked with a "TEST=filename" command line option,
|
18
|
+
# then the list of test files will be overridden to include only the
|
19
|
+
# filename specified on the command line. This provides an easy way
|
20
|
+
# to run just one test.
|
21
|
+
#
|
22
|
+
# If rake is invoked with a "TESTOPTS=options" command line option,
|
23
|
+
# then the given options are passed to the test process after a
|
24
|
+
# '--'. This allows Test::Unit options to be passed to the test
|
25
|
+
# suite.
|
26
|
+
#
|
27
|
+
# Examples:
|
28
|
+
#
|
29
|
+
# rake test # run tests normally
|
30
|
+
# rake test TEST=just_one_file.rb # run just one test file.
|
31
|
+
# rake test TESTOPTS="-v" # run in verbose mode
|
32
|
+
# rake test TESTOPTS="--runner=fox" # use the fox test runner
|
33
|
+
#
|
34
|
+
class TestTask < TaskLib
|
35
|
+
|
36
|
+
# Name of test task. (default is :test)
|
37
|
+
attr_accessor :name
|
38
|
+
|
39
|
+
# List of directories added to $LOAD_PATH before running the
|
40
|
+
# tests. (default is 'lib')
|
41
|
+
attr_accessor :libs
|
42
|
+
|
43
|
+
# True if verbose test output desired. (default is false)
|
44
|
+
attr_accessor :verbose
|
45
|
+
|
46
|
+
# Test options passed to the test suite. An explicit
|
47
|
+
# TESTOPTS=opts on the command line will override this. (default
|
48
|
+
# is NONE)
|
49
|
+
attr_accessor :options
|
50
|
+
|
51
|
+
# Request that the tests be run with the warning flag set.
|
52
|
+
# E.g. warning=true implies "ruby -w" used to run the tests.
|
53
|
+
attr_accessor :warning
|
54
|
+
|
55
|
+
# Glob pattern to match test files. (default is 'test/test*.rb')
|
56
|
+
attr_accessor :pattern
|
57
|
+
|
58
|
+
# Style of test loader to use. Options are:
|
59
|
+
#
|
60
|
+
# * :rake -- Rake provided test loading script (default).
|
61
|
+
# * :testrb -- Ruby provided test loading script.
|
62
|
+
# * :direct -- Load tests using command line loader.
|
63
|
+
#
|
64
|
+
attr_accessor :loader
|
65
|
+
|
66
|
+
# Array of command line options to pass to ruby when running test loader.
|
67
|
+
attr_accessor :ruby_opts
|
68
|
+
|
69
|
+
# Description of the test task. (default is 'Run tests')
|
70
|
+
attr_accessor :description
|
71
|
+
|
72
|
+
# Explicitly define the list of test files to be included in a
|
73
|
+
# test. +list+ is expected to be an array of file names (a
|
74
|
+
# FileList is acceptable). If both +pattern+ and +test_files+ are
|
75
|
+
# used, then the list of test files is the union of the two.
|
76
|
+
def test_files=(list)
|
77
|
+
@test_files = list
|
78
|
+
end
|
79
|
+
|
80
|
+
# Create a testing task.
|
81
|
+
def initialize(name=:test)
|
82
|
+
@name = name
|
83
|
+
@libs = ["lib"]
|
84
|
+
@pattern = nil
|
85
|
+
@options = nil
|
86
|
+
@test_files = nil
|
87
|
+
@verbose = false
|
88
|
+
@warning = false
|
89
|
+
@loader = :rake
|
90
|
+
@ruby_opts = []
|
91
|
+
@description = "Run tests" + (@name == :test ? "" : " for #{@name}")
|
92
|
+
yield self if block_given?
|
93
|
+
@pattern = 'test/test*.rb' if @pattern.nil? && @test_files.nil?
|
94
|
+
define
|
95
|
+
end
|
96
|
+
|
97
|
+
# Create the tasks defined by this task lib.
|
98
|
+
def define
|
99
|
+
desc @description
|
100
|
+
task @name do
|
101
|
+
FileUtilsExt.verbose(@verbose) do
|
102
|
+
args =
|
103
|
+
"#{ruby_opts_string} #{run_code} " +
|
104
|
+
"#{file_list_string} #{option_list}"
|
105
|
+
ruby args do |ok, status|
|
106
|
+
if !ok && status.respond_to?(:signaled?) && status.signaled?
|
107
|
+
raise SignalException.new(status.termsig)
|
108
|
+
elsif !ok
|
109
|
+
fail "Command failed with status (#{status.exitstatus}): " +
|
110
|
+
"[ruby #{args}]"
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
self
|
116
|
+
end
|
117
|
+
|
118
|
+
def option_list # :nodoc:
|
119
|
+
(ENV['TESTOPTS'] ||
|
120
|
+
ENV['TESTOPT'] ||
|
121
|
+
ENV['TEST_OPTS'] ||
|
122
|
+
ENV['TEST_OPT'] ||
|
123
|
+
@options ||
|
124
|
+
"")
|
125
|
+
end
|
126
|
+
|
127
|
+
def ruby_opts_string # :nodoc:
|
128
|
+
opts = @ruby_opts.dup
|
129
|
+
opts.unshift("-I\"#{lib_path}\"") unless @libs.empty?
|
130
|
+
opts.unshift("-w") if @warning
|
131
|
+
opts.join(" ")
|
132
|
+
end
|
133
|
+
|
134
|
+
def lib_path # :nodoc:
|
135
|
+
@libs.join(File::PATH_SEPARATOR)
|
136
|
+
end
|
137
|
+
|
138
|
+
def file_list_string # :nodoc:
|
139
|
+
file_list.map { |fn| "\"#{fn}\"" }.join(' ')
|
140
|
+
end
|
141
|
+
|
142
|
+
def file_list # :nodoc:
|
143
|
+
if ENV['TEST']
|
144
|
+
FileList[ENV['TEST']]
|
145
|
+
else
|
146
|
+
result = []
|
147
|
+
result += @test_files.to_a if @test_files
|
148
|
+
result << @pattern if @pattern
|
149
|
+
result
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
def fix # :nodoc:
|
154
|
+
case ruby_version
|
155
|
+
when '1.8.2'
|
156
|
+
"\"#{find_file 'rake/ruby182_test_unit_fix'}\""
|
157
|
+
else
|
158
|
+
nil
|
159
|
+
end || ''
|
160
|
+
end
|
161
|
+
|
162
|
+
def ruby_version # :nodoc:
|
163
|
+
RUBY_VERSION
|
164
|
+
end
|
165
|
+
|
166
|
+
def run_code # :nodoc:
|
167
|
+
case @loader
|
168
|
+
when :direct
|
169
|
+
"-e \"ARGV.each{|f| require f}\""
|
170
|
+
when :testrb
|
171
|
+
"-S testrb #{fix}"
|
172
|
+
when :rake
|
173
|
+
"#{rake_include_arg} \"#{rake_loader}\""
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
def rake_loader # :nodoc:
|
178
|
+
find_file('rake/rake_test_loader') or
|
179
|
+
fail "unable to find rake test loader"
|
180
|
+
end
|
181
|
+
|
182
|
+
def find_file(fn) # :nodoc:
|
183
|
+
$LOAD_PATH.each do |path|
|
184
|
+
file_path = File.join(path, "#{fn}.rb")
|
185
|
+
return file_path if File.exist? file_path
|
186
|
+
end
|
187
|
+
nil
|
188
|
+
end
|
189
|
+
|
190
|
+
def rake_include_arg # :nodoc:
|
191
|
+
spec = Gem.loaded_specs['rake']
|
192
|
+
if spec.respond_to?(:default_gem?) && spec.default_gem?
|
193
|
+
""
|
194
|
+
else
|
195
|
+
"-I\"#{rake_lib_dir}\""
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
def rake_lib_dir # :nodoc:
|
200
|
+
find_dir('rake') or
|
201
|
+
fail "unable to find rake lib"
|
202
|
+
end
|
203
|
+
|
204
|
+
def find_dir(fn) # :nodoc:
|
205
|
+
$LOAD_PATH.each do |path|
|
206
|
+
file_path = File.join(path, "#{fn}.rb")
|
207
|
+
return path if File.exist? file_path
|
208
|
+
end
|
209
|
+
nil
|
210
|
+
end
|
211
|
+
|
212
|
+
end
|
213
|
+
end
|