coingecko_client 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +13 -0
- data/.rspec +3 -0
- data/.travis.yml +6 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +38 -0
- data/LICENSE.txt +21 -0
- data/README.md +44 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/coingecko_client.gemspec +34 -0
- data/lib/coingecko_client.rb +61 -0
- data/lib/coingecko_client/version.rb +3 -0
- data/vendor/bundle/ruby/2.7.0/bin/htmldiff +27 -0
- data/vendor/bundle/ruby/2.7.0/bin/ldiff +27 -0
- data/vendor/bundle/ruby/2.7.0/bin/rake +27 -0
- data/vendor/bundle/ruby/2.7.0/bin/rspec +27 -0
- data/vendor/bundle/ruby/2.7.0/bin/ruby_executable_hooks +25 -0
- data/vendor/bundle/ruby/2.7.0/cache/diff-lcs-1.4.3.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/cache/excon-0.75.0.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/cache/rake-12.3.3.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/cache/rspec-3.9.0.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/cache/rspec-core-3.9.2.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/cache/rspec-expectations-3.9.2.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/cache/rspec-mocks-3.9.1.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/cache/rspec-support-3.9.3.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/.rspec +1 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/Code-of-Conduct.md +74 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/Contributing.md +84 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/History.md +278 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/License.md +39 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/Manifest.txt +45 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/README.rdoc +84 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/Rakefile +57 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/autotest/discover.rb +3 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/bin/htmldiff +35 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/bin/ldiff +9 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/docs/COPYING.txt +339 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/docs/artistic.txt +127 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/lib/diff-lcs.rb +3 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/lib/diff/lcs.rb +732 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/lib/diff/lcs/array.rb +7 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/lib/diff/lcs/backports.rb +9 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/lib/diff/lcs/block.rb +37 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/lib/diff/lcs/callbacks.rb +325 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/lib/diff/lcs/change.rb +174 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/lib/diff/lcs/htmldiff.rb +150 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/lib/diff/lcs/hunk.rb +291 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/lib/diff/lcs/internals.rb +304 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/lib/diff/lcs/ldiff.rb +175 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/lib/diff/lcs/string.rb +5 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/spec/change_spec.rb +89 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/spec/diff_spec.rb +51 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/spec/fixtures/aX +1 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/spec/fixtures/bXaX +1 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/spec/fixtures/ds1.csv +50 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/spec/fixtures/ds2.csv +51 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/spec/fixtures/ldiff/output.diff +4 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/spec/fixtures/ldiff/output.diff-c +7 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/spec/fixtures/ldiff/output.diff-e +3 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/spec/fixtures/ldiff/output.diff-f +3 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/spec/fixtures/ldiff/output.diff-u +5 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/spec/hunk_spec.rb +72 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/spec/issues_spec.rb +98 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/spec/lcs_spec.rb +56 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/spec/ldiff_spec.rb +86 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/spec/patch_spec.rb +416 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/spec/sdiff_spec.rb +214 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/spec/spec_helper.rb +375 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/spec/traverse_balanced_spec.rb +310 -0
- data/vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.3/spec/traverse_sequences_spec.rb +139 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/CONTRIBUTING.md +23 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/CONTRIBUTORS.md +140 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/LICENSE.md +20 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/README.md +492 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/data/cacert.pem +3466 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/excon.gemspec +43 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon.rb +255 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/connection.rb +594 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/constants.rb +169 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/error.rb +229 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/extensions/uri.rb +34 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/headers.rb +84 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/instrumentors/logging_instrumentor.rb +48 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/instrumentors/standard_instrumentor.rb +21 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/middlewares/base.rb +31 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/middlewares/capture_cookies.rb +32 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/middlewares/decompress.rb +37 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/middlewares/escape_path.rb +12 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/middlewares/expects.rb +25 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/middlewares/idempotent.rb +57 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/middlewares/instrumentor.rb +49 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/middlewares/mock.rb +61 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/middlewares/redirect_follower.rb +87 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/middlewares/response_parser.rb +16 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/pretty_printer.rb +39 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/response.rb +231 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/socket.rb +306 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/ssl_socket.rb +184 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/test/plugin/server/exec.rb +23 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/test/plugin/server/puma.rb +20 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/test/plugin/server/unicorn.rb +35 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/test/plugin/server/webrick.rb +23 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/test/server.rb +106 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/unix_socket.rb +41 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/utils.rb +125 -0
- data/vendor/bundle/ruby/2.7.0/gems/excon-0.75.0/lib/excon/version.rb +4 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/CONTRIBUTING.rdoc +43 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/Gemfile +3 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/History.rdoc +2344 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/README.rdoc +156 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/Rakefile +41 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/azure-pipelines.yml +11 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/bin/bundle +105 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/bin/console +7 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/bin/rake +29 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/bin/rdoc +29 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/bin/rubocop +29 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/bin/setup +6 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/doc/command_line_usage.rdoc +158 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/doc/example/Rakefile1 +38 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/doc/example/Rakefile2 +35 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/doc/example/a.c +6 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/doc/example/b.c +6 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/doc/example/main.c +11 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/doc/glossary.rdoc +42 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/doc/jamis.rb +592 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/doc/proto_rake.rdoc +127 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/doc/rake.1 +156 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/doc/rakefile.rdoc +622 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/doc/rational.rdoc +151 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/exe/rake +27 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake.rb +71 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/application.rb +824 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/backtrace.rb +24 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/clean.rb +78 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/cloneable.rb +17 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/cpu_counter.rb +107 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/default_loader.rb +15 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/dsl_definition.rb +195 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/early_time.rb +22 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/ext/core.rb +26 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/ext/string.rb +176 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/file_creation_task.rb +25 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/file_list.rb +435 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/file_task.rb +54 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/file_utils.rb +137 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/file_utils_ext.rb +145 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/invocation_chain.rb +57 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/invocation_exception_mixin.rb +17 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/late_time.rb +18 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/linked_list.rb +112 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/loaders/makefile.rb +54 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/multi_task.rb +14 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/name_space.rb +38 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/packagetask.rb +207 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/phony.rb +16 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/private_reader.rb +21 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/promise.rb +100 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/pseudo_status.rb +30 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/rake_module.rb +67 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/rake_test_loader.rb +27 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/scope.rb +43 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/task.rb +413 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/task_argument_error.rb +8 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/task_arguments.rb +109 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/task_manager.rb +324 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/tasklib.rb +12 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/testtask.rb +224 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/thread_history_display.rb +49 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/thread_pool.rb +163 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/trace_output.rb +23 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/version.rb +10 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/win32.rb +51 -0
- data/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/rake.gemspec +42 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-3.9.0/LICENSE.md +27 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-3.9.0/README.md +43 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-3.9.0/lib/rspec.rb +3 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-3.9.0/lib/rspec/version.rb +5 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/.document +5 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/.yardopts +8 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/Changelog.md +2291 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/LICENSE.md +26 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/README.md +384 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/exe/rspec +4 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/autorun.rb +3 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core.rb +186 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/backtrace_formatter.rb +65 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/coordinator.rb +62 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/example_minimizer.rb +173 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/fork_runner.rb +135 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/server.rb +61 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/shell_command.rb +126 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/shell_runner.rb +73 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/utilities.rb +58 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/configuration.rb +2363 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/configuration_options.rb +233 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/did_you_mean.rb +46 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/drb.rb +113 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/dsl.rb +98 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/example.rb +656 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/example_group.rb +900 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/example_status_persister.rb +235 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/filter_manager.rb +231 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/flat_map.rb +20 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters.rb +273 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/base_bisect_formatter.rb +45 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/base_formatter.rb +70 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/base_text_formatter.rb +75 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/bisect_drb_formatter.rb +29 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/bisect_progress_formatter.rb +157 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/console_codes.rb +68 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/deprecation_formatter.rb +223 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/documentation_formatter.rb +102 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/exception_presenter.rb +511 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/failure_list_formatter.rb +23 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/helpers.rb +110 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/html_formatter.rb +153 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/html_printer.rb +414 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/html_snippet_extractor.rb +120 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/json_formatter.rb +102 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/profile_formatter.rb +68 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/progress_formatter.rb +29 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/protocol.rb +182 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/snippet_extractor.rb +134 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/syntax_highlighter.rb +91 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/hooks.rb +641 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/invocations.rb +87 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/memoized_helpers.rb +554 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/metadata.rb +498 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/metadata_filter.rb +255 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/minitest_assertions_adapter.rb +31 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/mocking_adapters/null.rb +14 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/mocking_adapters/rr.rb +31 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/notifications.rb +521 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/option_parser.rb +316 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/ordering.rb +158 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/output_wrapper.rb +29 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/pending.rb +165 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/profiler.rb +34 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/project_initializer.rb +48 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/project_initializer/.rspec +1 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/project_initializer/spec/spec_helper.rb +100 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/rake_task.rb +188 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/reporter.rb +265 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/ruby_project.rb +53 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/runner.rb +204 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/sandbox.rb +37 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/set.rb +54 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/shared_context.rb +55 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/shared_example_group.rb +271 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/shell_escape.rb +49 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/version.rb +9 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/warnings.rb +40 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/world.rb +276 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/.document +5 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/.yardopts +6 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/Changelog.md +1191 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/LICENSE.md +25 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/README.md +320 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations.rb +82 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/block_snippet_extractor.rb +253 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/configuration.rb +215 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/expectation_target.rb +127 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/fail_with.rb +39 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/failure_aggregator.rb +194 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/handler.rb +170 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/minitest_integration.rb +58 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/syntax.rb +132 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/version.rb +8 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers.rb +1038 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/aliased_matcher.rb +116 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in.rb +52 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/all.rb +86 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/base_matcher.rb +193 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/be.rb +288 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/be_between.rb +77 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/be_instance_of.rb +26 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/be_kind_of.rb +20 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/be_within.rb +72 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/change.rb +428 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/compound.rb +276 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/contain_exactly.rb +302 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/cover.rb +24 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/eq.rb +40 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/eql.rb +34 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/equal.rb +81 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/exist.rb +90 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/has.rb +103 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/include.rb +149 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/match.rb +106 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/operators.rb +128 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/output.rb +200 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/raise_error.rb +230 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/respond_to.rb +199 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/satisfy.rb +60 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/throw_symbol.rb +132 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/yield.rb +441 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/composable.rb +171 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/dsl.rb +540 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/english_phrasing.rb +58 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +82 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/fail_matchers.rb +42 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/generated_descriptions.rb +41 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/matcher_delegator.rb +35 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/matcher_protocol.rb +99 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/.document +5 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/.yardopts +6 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/Changelog.md +1133 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/LICENSE.md +25 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/README.md +463 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks.rb +130 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance.rb +11 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/chain.rb +111 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/expect_chain_chain.rb +31 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/expectation_chain.rb +50 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/proxy.rb +116 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/recorder.rb +294 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/stub_chain.rb +51 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/argument_list_matcher.rb +100 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/argument_matchers.rb +322 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/configuration.rb +212 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/error_generator.rb +369 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/example_methods.rb +434 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/instance_method_stasher.rb +146 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/marshal_extension.rb +41 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/matchers/have_received.rb +134 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/matchers/receive.rb +132 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/matchers/receive_message_chain.rb +82 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/matchers/receive_messages.rb +77 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/message_chain.rb +87 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/message_expectation.rb +751 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/method_double.rb +287 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/method_reference.rb +202 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/minitest_integration.rb +68 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/mutate_const.rb +339 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/object_reference.rb +149 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/order_group.rb +81 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/proxy.rb +503 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/space.rb +238 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/standalone.rb +3 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/syntax.rb +325 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/targets.rb +124 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/test_double.rb +171 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/verifying_double.rb +129 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/verifying_message_expectation.rb +54 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/verifying_proxy.rb +220 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/version.rb +9 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/Changelog.md +302 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/LICENSE.md +23 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/README.md +40 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support.rb +149 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/caller_filter.rb +83 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/comparable_version.rb +46 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/differ.rb +215 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/directory_maker.rb +63 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/encoded_string.rb +161 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/fuzzy_matcher.rb +48 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/hunk_generator.rb +47 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/matcher_definition.rb +42 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/method_signature_verifier.rb +438 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/mutex.rb +73 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/object_formatter.rb +275 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/recursive_const_methods.rb +76 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/reentrant_mutex.rb +61 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/ruby_features.rb +190 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/source.rb +75 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/source/location.rb +21 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/source/node.rb +110 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/source/token.rb +87 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/spec.rb +81 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/deprecation_helpers.rb +64 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/formatting_support.rb +9 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/in_sub_process.rb +69 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/library_wide_checks.rb +150 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/shell_out.rb +89 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/stderr_splitter.rb +75 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/string_matcher.rb +46 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/with_isolated_directory.rb +13 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/version.rb +7 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/warnings.rb +39 -0
- data/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/with_keywords_when_needed.rb +33 -0
- data/vendor/bundle/ruby/2.7.0/specifications/diff-lcs-1.4.3.gemspec +50 -0
- data/vendor/bundle/ruby/2.7.0/specifications/excon-0.75.0.gemspec +56 -0
- data/vendor/bundle/ruby/2.7.0/specifications/rake-12.3.3.gemspec +43 -0
- data/vendor/bundle/ruby/2.7.0/specifications/rspec-3.9.0.gemspec +39 -0
- data/vendor/bundle/ruby/2.7.0/specifications/rspec-core-3.9.2.gemspec +53 -0
- data/vendor/bundle/ruby/2.7.0/specifications/rspec-expectations-3.9.2.gemspec +44 -0
- data/vendor/bundle/ruby/2.7.0/specifications/rspec-mocks-3.9.1.gemspec +44 -0
- data/vendor/bundle/ruby/2.7.0/specifications/rspec-support-3.9.3.gemspec +36 -0
- metadata +480 -0
@@ -0,0 +1,43 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'lib', 'excon', 'version')
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = 'excon'
|
5
|
+
s.version = Excon::VERSION
|
6
|
+
s.summary = "speed, persistence, http(s)"
|
7
|
+
s.description = "EXtended http(s) CONnections"
|
8
|
+
s.authors = ["dpiddy (Dan Peterson)", "geemus (Wesley Beary)", "nextmat (Matt Sanders)"]
|
9
|
+
s.email = 'geemus@gmail.com'
|
10
|
+
s.homepage = 'https://github.com/excon/excon'
|
11
|
+
s.license = 'MIT'
|
12
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
13
|
+
s.extra_rdoc_files = %w[README.md CONTRIBUTORS.md CONTRIBUTING.md]
|
14
|
+
s.files = `git ls-files -- {data,lib}/*`.split("\n") + [
|
15
|
+
"CONTRIBUTING.md",
|
16
|
+
"CONTRIBUTORS.md",
|
17
|
+
"LICENSE.md",
|
18
|
+
"README.md",
|
19
|
+
"excon.gemspec"
|
20
|
+
]
|
21
|
+
|
22
|
+
s.add_development_dependency('rspec', '>= 3.5.0')
|
23
|
+
s.add_development_dependency('activesupport')
|
24
|
+
s.add_development_dependency('delorean')
|
25
|
+
s.add_development_dependency('eventmachine', '>= 1.0.4')
|
26
|
+
s.add_development_dependency('open4')
|
27
|
+
s.add_development_dependency('rake')
|
28
|
+
s.add_development_dependency('rdoc')
|
29
|
+
s.add_development_dependency('shindo')
|
30
|
+
s.add_development_dependency('sinatra')
|
31
|
+
s.add_development_dependency('sinatra-contrib')
|
32
|
+
s.add_development_dependency('json', '>= 1.8.5')
|
33
|
+
s.add_development_dependency('puma')
|
34
|
+
|
35
|
+
s.metadata = {
|
36
|
+
'homepage_uri' => 'https://github.com/excon/excon',
|
37
|
+
'bug_tracker_uri' => 'https://github.com/excon/excon/issues',
|
38
|
+
'changelog_uri' => 'https://github.com/excon/excon/blob/master/changelog.txt',
|
39
|
+
'documentation_uri' => 'https://github.com/excon/excon/blob/master/README.md',
|
40
|
+
'source_code_uri' => 'https://github.com/excon/excon',
|
41
|
+
'wiki_uri' => 'https://github.com/excon/excon/wiki'
|
42
|
+
}
|
43
|
+
end
|
@@ -0,0 +1,255 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
$:.unshift(File.dirname(__FILE__)) unless
|
3
|
+
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
4
|
+
|
5
|
+
require 'cgi'
|
6
|
+
require 'forwardable'
|
7
|
+
require 'openssl'
|
8
|
+
require 'rbconfig'
|
9
|
+
require 'socket'
|
10
|
+
require 'timeout'
|
11
|
+
require 'uri'
|
12
|
+
require 'zlib'
|
13
|
+
require 'stringio'
|
14
|
+
|
15
|
+
require 'excon/version'
|
16
|
+
|
17
|
+
require 'excon/extensions/uri'
|
18
|
+
|
19
|
+
require 'excon/middlewares/base'
|
20
|
+
require 'excon/middlewares/expects'
|
21
|
+
require 'excon/middlewares/idempotent'
|
22
|
+
require 'excon/middlewares/instrumentor'
|
23
|
+
require 'excon/middlewares/mock'
|
24
|
+
require 'excon/middlewares/response_parser'
|
25
|
+
|
26
|
+
require 'excon/error'
|
27
|
+
require 'excon/constants'
|
28
|
+
require 'excon/utils'
|
29
|
+
|
30
|
+
require 'excon/connection'
|
31
|
+
require 'excon/headers'
|
32
|
+
require 'excon/response'
|
33
|
+
require 'excon/middlewares/decompress'
|
34
|
+
require 'excon/middlewares/escape_path'
|
35
|
+
require 'excon/middlewares/redirect_follower'
|
36
|
+
require 'excon/middlewares/capture_cookies'
|
37
|
+
require 'excon/pretty_printer'
|
38
|
+
require 'excon/socket'
|
39
|
+
require 'excon/ssl_socket'
|
40
|
+
require 'excon/instrumentors/standard_instrumentor'
|
41
|
+
require 'excon/instrumentors/logging_instrumentor'
|
42
|
+
require 'excon/unix_socket'
|
43
|
+
|
44
|
+
# Define defaults first so they will be available to other files
|
45
|
+
module Excon
|
46
|
+
class << self
|
47
|
+
|
48
|
+
# @return [Hash] defaults for Excon connections
|
49
|
+
def defaults
|
50
|
+
@defaults ||= DEFAULTS
|
51
|
+
end
|
52
|
+
|
53
|
+
# Change defaults for Excon connections
|
54
|
+
# @return [Hash] defaults for Excon connections
|
55
|
+
def defaults=(new_defaults)
|
56
|
+
@defaults = new_defaults
|
57
|
+
end
|
58
|
+
|
59
|
+
def display_warning(warning)
|
60
|
+
# Show warning if $VERBOSE or ENV['EXCON_DEBUG'] is set
|
61
|
+
if $VERBOSE || ENV['EXCON_DEBUG']
|
62
|
+
$stderr.puts "[excon][WARNING] #{warning}\n#{ caller.join("\n") }"
|
63
|
+
end
|
64
|
+
|
65
|
+
if @raise_on_warnings
|
66
|
+
raise Error::Warning.new(warning)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def set_raise_on_warnings!(should_raise)
|
71
|
+
@raise_on_warnings = should_raise
|
72
|
+
end
|
73
|
+
|
74
|
+
# Status of mocking
|
75
|
+
def mock
|
76
|
+
display_warning('Excon#mock is deprecated, use Excon.defaults[:mock] instead.')
|
77
|
+
self.defaults[:mock]
|
78
|
+
end
|
79
|
+
|
80
|
+
# Change the status of mocking
|
81
|
+
# false is the default and works as expected
|
82
|
+
# true returns a value from stubs or raises
|
83
|
+
def mock=(new_mock)
|
84
|
+
display_warning('Excon#mock is deprecated, use Excon.defaults[:mock]= instead.')
|
85
|
+
self.defaults[:mock] = new_mock
|
86
|
+
end
|
87
|
+
|
88
|
+
# @return [String] The filesystem path to the SSL Certificate Authority
|
89
|
+
def ssl_ca_path
|
90
|
+
display_warning('Excon#ssl_ca_path is deprecated, use Excon.defaults[:ssl_ca_path] instead.')
|
91
|
+
self.defaults[:ssl_ca_path]
|
92
|
+
end
|
93
|
+
|
94
|
+
# Change path to the SSL Certificate Authority
|
95
|
+
# @return [String] The filesystem path to the SSL Certificate Authority
|
96
|
+
def ssl_ca_path=(new_ssl_ca_path)
|
97
|
+
display_warning('Excon#ssl_ca_path= is deprecated, use Excon.defaults[:ssl_ca_path]= instead.')
|
98
|
+
self.defaults[:ssl_ca_path] = new_ssl_ca_path
|
99
|
+
end
|
100
|
+
|
101
|
+
# @return [true, false] Whether or not to verify the peer's SSL certificate / chain
|
102
|
+
def ssl_verify_peer
|
103
|
+
display_warning('Excon#ssl_verify_peer is deprecated, use Excon.defaults[:ssl_verify_peer] instead.')
|
104
|
+
self.defaults[:ssl_verify_peer]
|
105
|
+
end
|
106
|
+
|
107
|
+
# Change the status of ssl peer verification
|
108
|
+
# @see Excon#ssl_verify_peer (attr_reader)
|
109
|
+
def ssl_verify_peer=(new_ssl_verify_peer)
|
110
|
+
display_warning('Excon#ssl_verify_peer= is deprecated, use Excon.defaults[:ssl_verify_peer]= instead.')
|
111
|
+
self.defaults[:ssl_verify_peer] = new_ssl_verify_peer
|
112
|
+
end
|
113
|
+
|
114
|
+
# @see Connection#initialize
|
115
|
+
# Initializes a new keep-alive session for a given remote host
|
116
|
+
# @param [String] url The destination URL
|
117
|
+
# @param [Hash<Symbol, >] params One or more option params to set on the Connection instance
|
118
|
+
# @return [Connection] A new Excon::Connection instance
|
119
|
+
def new(url, params = {})
|
120
|
+
uri_parser = params[:uri_parser] || defaults[:uri_parser]
|
121
|
+
uri = uri_parser.parse(url)
|
122
|
+
if params[:path]
|
123
|
+
uri_parser.parse(params[:path])
|
124
|
+
end
|
125
|
+
unless uri.scheme
|
126
|
+
raise ArgumentError.new("Invalid URI: #{uri}")
|
127
|
+
end
|
128
|
+
params = {
|
129
|
+
:host => uri.host,
|
130
|
+
:hostname => uri.hostname,
|
131
|
+
:path => uri.path,
|
132
|
+
:port => uri.port,
|
133
|
+
:query => uri.query,
|
134
|
+
:scheme => uri.scheme
|
135
|
+
}.merge(params)
|
136
|
+
if uri.password
|
137
|
+
params[:password] = Utils.unescape_uri(uri.password)
|
138
|
+
end
|
139
|
+
if uri.user
|
140
|
+
params[:user] = Utils.unescape_uri(uri.user)
|
141
|
+
end
|
142
|
+
Excon::Connection.new(params)
|
143
|
+
end
|
144
|
+
|
145
|
+
# push an additional stub onto the list to check for mock requests
|
146
|
+
# @param request_params [Hash<Symbol, >] request params to match against, omitted params match all
|
147
|
+
# @param response_params [Hash<Symbol, >] response params to return from matched request or block to call with params
|
148
|
+
def stub(request_params = {}, response_params = nil, &block)
|
149
|
+
if method = request_params.delete(:method)
|
150
|
+
request_params[:method] = method.to_s.downcase.to_sym
|
151
|
+
end
|
152
|
+
if url = request_params.delete(:url)
|
153
|
+
uri = URI.parse(url)
|
154
|
+
request_params = {
|
155
|
+
:host => uri.host,
|
156
|
+
:path => uri.path,
|
157
|
+
:port => uri.port,
|
158
|
+
:query => uri.query,
|
159
|
+
:scheme => uri.scheme
|
160
|
+
}.merge!(request_params)
|
161
|
+
if uri.user || uri.password
|
162
|
+
request_params[:headers] ||= {}
|
163
|
+
user, pass = Utils.unescape_form(uri.user.to_s), Utils.unescape_form(uri.password.to_s)
|
164
|
+
request_params[:headers]['Authorization'] ||= 'Basic ' + ["#{user}:#{pass}"].pack('m').delete(Excon::CR_NL)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
if request_params.has_key?(:headers)
|
168
|
+
headers = Excon::Headers.new
|
169
|
+
request_params[:headers].each do |key, value|
|
170
|
+
headers[key] = value
|
171
|
+
end
|
172
|
+
request_params[:headers] = headers
|
173
|
+
end
|
174
|
+
if block_given?
|
175
|
+
if response_params
|
176
|
+
raise(ArgumentError.new("stub requires either response_params OR a block"))
|
177
|
+
else
|
178
|
+
stub = [request_params, block]
|
179
|
+
end
|
180
|
+
elsif response_params
|
181
|
+
stub = [request_params, response_params]
|
182
|
+
else
|
183
|
+
raise(ArgumentError.new("stub requires either response_params OR a block"))
|
184
|
+
end
|
185
|
+
stubs.unshift(stub)
|
186
|
+
stub
|
187
|
+
end
|
188
|
+
|
189
|
+
# get a stub matching params or nil
|
190
|
+
# @param request_params [Hash<Symbol, >] request params to match against, omitted params match all
|
191
|
+
# @return [Hash<Symbol, >] response params to return from matched request or block to call with params
|
192
|
+
def stub_for(request_params={})
|
193
|
+
if method = request_params.delete(:method)
|
194
|
+
request_params[:method] = method.to_s.downcase.to_sym
|
195
|
+
end
|
196
|
+
Excon.stubs.each do |stub, response_params|
|
197
|
+
captures = { :headers => {} }
|
198
|
+
headers_match = !stub.has_key?(:headers) || stub[:headers].keys.all? do |key|
|
199
|
+
case value = stub[:headers][key]
|
200
|
+
when Regexp
|
201
|
+
if match = value.match(request_params[:headers][key])
|
202
|
+
captures[:headers][key] = match.captures
|
203
|
+
end
|
204
|
+
match
|
205
|
+
else
|
206
|
+
value == request_params[:headers][key]
|
207
|
+
end
|
208
|
+
end
|
209
|
+
non_headers_match = (stub.keys - [:headers]).all? do |key|
|
210
|
+
case value = stub[key]
|
211
|
+
when Regexp
|
212
|
+
if match = value.match(request_params[key])
|
213
|
+
captures[key] = match.captures
|
214
|
+
end
|
215
|
+
match
|
216
|
+
else
|
217
|
+
value == request_params[key]
|
218
|
+
end
|
219
|
+
end
|
220
|
+
if headers_match && non_headers_match
|
221
|
+
request_params[:captures] = captures
|
222
|
+
return [stub, response_params]
|
223
|
+
end
|
224
|
+
end
|
225
|
+
nil
|
226
|
+
end
|
227
|
+
|
228
|
+
# get a list of defined stubs
|
229
|
+
def stubs
|
230
|
+
case Excon.defaults[:stubs]
|
231
|
+
when :global
|
232
|
+
@stubs ||= []
|
233
|
+
when :local
|
234
|
+
Thread.current[:_excon_stubs] ||= []
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
# remove first/oldest stub matching request_params
|
239
|
+
# @param request_params [Hash<Symbol, >] request params to match against, omitted params match all
|
240
|
+
# @return [Hash<Symbol, >] response params from deleted stub
|
241
|
+
def unstub(request_params = {})
|
242
|
+
stub = stub_for(request_params)
|
243
|
+
Excon.stubs.delete_at(Excon.stubs.index(stub))
|
244
|
+
end
|
245
|
+
|
246
|
+
# Generic non-persistent HTTP methods
|
247
|
+
HTTP_VERBS.each do |method|
|
248
|
+
module_eval <<-DEF, __FILE__, __LINE__ + 1
|
249
|
+
def #{method}(url, params = {}, &block)
|
250
|
+
new(url, params).request(:method => :#{method}, &block)
|
251
|
+
end
|
252
|
+
DEF
|
253
|
+
end
|
254
|
+
end
|
255
|
+
end
|
@@ -0,0 +1,594 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'ipaddr'
|
3
|
+
|
4
|
+
module Excon
|
5
|
+
class Connection
|
6
|
+
include Utils
|
7
|
+
|
8
|
+
attr_reader :data
|
9
|
+
|
10
|
+
def connection
|
11
|
+
Excon.display_warning('Excon::Connection#connection is deprecated use Excon::Connection#data instead.')
|
12
|
+
@data
|
13
|
+
end
|
14
|
+
def connection=(new_params)
|
15
|
+
Excon.display_warning('Excon::Connection#connection= is deprecated. Use of this method may cause unexpected results.')
|
16
|
+
@data = new_params
|
17
|
+
end
|
18
|
+
|
19
|
+
def params
|
20
|
+
Excon.display_warning('Excon::Connection#params is deprecated use Excon::Connection#data instead.')
|
21
|
+
@data
|
22
|
+
end
|
23
|
+
def params=(new_params)
|
24
|
+
Excon.display_warning('Excon::Connection#params= is deprecated. Use of this method may cause unexpected results.')
|
25
|
+
@data = new_params
|
26
|
+
end
|
27
|
+
|
28
|
+
def proxy
|
29
|
+
Excon.display_warning('Excon::Connection#proxy is deprecated use Excon::Connection#data[:proxy] instead.')
|
30
|
+
@data[:proxy]
|
31
|
+
end
|
32
|
+
def proxy=(new_proxy)
|
33
|
+
Excon.display_warning('Excon::Connection#proxy= is deprecated. Use of this method may cause unexpected results.')
|
34
|
+
@data[:proxy] = new_proxy
|
35
|
+
end
|
36
|
+
|
37
|
+
def logger
|
38
|
+
if @data[:instrumentor] && @data[:instrumentor].respond_to?(:logger)
|
39
|
+
@data[:instrumentor].logger
|
40
|
+
end
|
41
|
+
end
|
42
|
+
def logger=(logger)
|
43
|
+
@data[:instrumentor] = Excon::LoggingInstrumentor
|
44
|
+
@data[:logger] = logger
|
45
|
+
end
|
46
|
+
|
47
|
+
# Initializes a new Connection instance
|
48
|
+
# @param [Hash<Symbol, >] params One or more optional params
|
49
|
+
# @option params [String] :body Default text to be sent over a socket. Only used if :body absent in Connection#request params
|
50
|
+
# @option params [Hash<Symbol, String>] :headers The default headers to supply in a request. Only used if params[:headers] is not supplied to Connection#request
|
51
|
+
# @option params [String] :host The destination host's reachable DNS name or IP, in the form of a String. IPv6 addresses must be wrapped (e.g. [::1]). See URI#host.
|
52
|
+
# @option params [String] :hostname Same as host, but usable for socket connections. IPv6 addresses must not be wrapped (e.g. ::1). See URI#hostname.
|
53
|
+
# @option params [String] :path Default path; appears after 'scheme://host:port/'. Only used if params[:path] is not supplied to Connection#request
|
54
|
+
# @option params [Fixnum] :port The port on which to connect, to the destination host
|
55
|
+
# @option params [Hash] :query Default query; appended to the 'scheme://host:port/path/' in the form of '?key=value'. Will only be used if params[:query] is not supplied to Connection#request
|
56
|
+
# @option params [String] :scheme The protocol; 'https' causes OpenSSL to be used
|
57
|
+
# @option params [String] :socket The path to the unix socket (required for 'unix://' connections)
|
58
|
+
# @option params [String] :ciphers Only use the specified SSL/TLS cipher suites; use OpenSSL cipher spec format e.g. 'HIGH:!aNULL:!3DES' or 'AES256-SHA:DES-CBC3-SHA'
|
59
|
+
# @option params [String] :proxy Proxy server; e.g. 'http://myproxy.com:8888'
|
60
|
+
# @option params [Fixnum] :retry_limit Set how many times we'll retry a failed request. (Default 4)
|
61
|
+
# @option params [Fixnum] :retry_interval Set how long to wait between retries. (Default 0)
|
62
|
+
# @option params [Class] :instrumentor Responds to #instrument as in ActiveSupport::Notifications
|
63
|
+
# @option params [String] :instrumentor_name Name prefix for #instrument events. Defaults to 'excon'
|
64
|
+
def initialize(params = {})
|
65
|
+
@data = Excon.defaults.dup
|
66
|
+
# merge does not deep-dup, so make sure headers is not the original
|
67
|
+
@data[:headers] = @data[:headers].dup
|
68
|
+
|
69
|
+
# the same goes for :middlewares
|
70
|
+
@data[:middlewares] = @data[:middlewares].dup
|
71
|
+
|
72
|
+
@data.merge!(params)
|
73
|
+
validate_params(:connection, @data, @data[:middlewares])
|
74
|
+
|
75
|
+
if @data.key?(:host) && !@data.key?(:hostname)
|
76
|
+
Excon.display_warning('hostname is missing! For IPv6 support, provide both host and hostname: Excon::Connection#new(:host => uri.host, :hostname => uri.hostname, ...).')
|
77
|
+
@data[:hostname] = @data[:host]
|
78
|
+
end
|
79
|
+
|
80
|
+
setup_proxy
|
81
|
+
|
82
|
+
if ENV.has_key?('EXCON_STANDARD_INSTRUMENTOR')
|
83
|
+
@data[:instrumentor] = Excon::StandardInstrumentor
|
84
|
+
end
|
85
|
+
|
86
|
+
if @data[:debug] || ENV.has_key?('EXCON_DEBUG')
|
87
|
+
@data[:debug_request] = @data[:debug_response] = true
|
88
|
+
@data[:instrumentor] = Excon::StandardInstrumentor
|
89
|
+
end
|
90
|
+
|
91
|
+
if @data[:scheme] == UNIX
|
92
|
+
if @data[:host]
|
93
|
+
raise ArgumentError, "The `:host` parameter should not be set for `unix://` connections.\n" +
|
94
|
+
"When supplying a `unix://` URI, it should start with `unix:/` or `unix:///`."
|
95
|
+
elsif !@data[:socket]
|
96
|
+
raise ArgumentError, 'You must provide a `:socket` for `unix://` connections'
|
97
|
+
else
|
98
|
+
@socket_key = "#{@data[:scheme]}://#{@data[:socket]}"
|
99
|
+
end
|
100
|
+
else
|
101
|
+
@socket_key = "#{@data[:scheme]}://#{@data[:host]}#{port_string(@data)}"
|
102
|
+
end
|
103
|
+
reset
|
104
|
+
end
|
105
|
+
|
106
|
+
def error_call(datum)
|
107
|
+
if datum[:error]
|
108
|
+
raise(datum[:error])
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
def request_call(datum)
|
113
|
+
begin
|
114
|
+
if datum.has_key?(:response)
|
115
|
+
# we already have data from a middleware, so bail
|
116
|
+
return datum
|
117
|
+
else
|
118
|
+
socket.data = datum
|
119
|
+
# start with "METHOD /path"
|
120
|
+
request = datum[:method].to_s.upcase + ' '
|
121
|
+
if datum[:proxy] && datum[:scheme] != HTTPS
|
122
|
+
request << datum[:scheme] << '://' << datum[:host] << port_string(datum)
|
123
|
+
end
|
124
|
+
request << datum[:path]
|
125
|
+
|
126
|
+
# add query to path, if there is one
|
127
|
+
request << query_string(datum)
|
128
|
+
|
129
|
+
# finish first line with "HTTP/1.1\r\n"
|
130
|
+
request << HTTP_1_1
|
131
|
+
|
132
|
+
if datum.has_key?(:request_block)
|
133
|
+
datum[:headers]['Transfer-Encoding'] = 'chunked'
|
134
|
+
else
|
135
|
+
body = datum[:body].is_a?(String) ? StringIO.new(datum[:body]) : datum[:body]
|
136
|
+
|
137
|
+
# The HTTP spec isn't clear on it, but specifically, GET requests don't usually send bodies;
|
138
|
+
# if they don't, sending Content-Length:0 can cause issues.
|
139
|
+
unless datum[:method].to_s.casecmp('GET') == 0 && body.nil?
|
140
|
+
unless datum[:headers].has_key?('Content-Length')
|
141
|
+
datum[:headers]['Content-Length'] = detect_content_length(body)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
# add headers to request
|
147
|
+
datum[:headers].each do |key, values|
|
148
|
+
if key.to_s.match(/[\r\n]/)
|
149
|
+
raise Excon::Errors::InvalidHeaderKey.new(key.to_s.inspect + ' contains forbidden "\r" or "\n"')
|
150
|
+
end
|
151
|
+
[values].flatten.each do |value|
|
152
|
+
if value.to_s.match(/[\r\n]/)
|
153
|
+
raise Excon::Errors::InvalidHeaderValue.new(value.to_s.inspect + ' contains forbidden "\r" or "\n"')
|
154
|
+
end
|
155
|
+
request << key.to_s << ': ' << value.to_s << CR_NL
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
# add additional "\r\n" to indicate end of headers
|
160
|
+
request << CR_NL
|
161
|
+
|
162
|
+
if datum.has_key?(:request_block)
|
163
|
+
socket.write(request) # write out request + headers
|
164
|
+
while true # write out body with chunked encoding
|
165
|
+
chunk = datum[:request_block].call
|
166
|
+
chunk = binary_encode(chunk)
|
167
|
+
if chunk.length > 0
|
168
|
+
socket.write(chunk.length.to_s(16) << CR_NL << chunk << CR_NL)
|
169
|
+
else
|
170
|
+
socket.write(String.new("0#{CR_NL}#{CR_NL}"))
|
171
|
+
break
|
172
|
+
end
|
173
|
+
end
|
174
|
+
elsif body.nil?
|
175
|
+
socket.write(request) # write out request + headers
|
176
|
+
else # write out body
|
177
|
+
if body.respond_to?(:binmode) && !body.is_a?(StringIO)
|
178
|
+
body.binmode
|
179
|
+
end
|
180
|
+
if body.respond_to?(:rewind)
|
181
|
+
body.rewind rescue nil
|
182
|
+
end
|
183
|
+
|
184
|
+
# if request + headers is less than chunk size, fill with body
|
185
|
+
request = binary_encode(request)
|
186
|
+
chunk = body.read([datum[:chunk_size] - request.length, 0].max)
|
187
|
+
if chunk
|
188
|
+
chunk = binary_encode(chunk)
|
189
|
+
socket.write(request << chunk)
|
190
|
+
else
|
191
|
+
socket.write(request) # write out request + headers
|
192
|
+
end
|
193
|
+
|
194
|
+
while chunk = body.read(datum[:chunk_size])
|
195
|
+
socket.write(chunk)
|
196
|
+
end
|
197
|
+
end
|
198
|
+
end
|
199
|
+
rescue => error
|
200
|
+
case error
|
201
|
+
when Excon::Errors::InvalidHeaderKey, Excon::Errors::InvalidHeaderValue, Excon::Errors::StubNotFound, Excon::Errors::Timeout
|
202
|
+
raise(error)
|
203
|
+
else
|
204
|
+
raise_socket_error(error)
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
datum
|
209
|
+
end
|
210
|
+
|
211
|
+
def response_call(datum)
|
212
|
+
# ensure response_block is yielded to and body is empty from middlewares
|
213
|
+
if datum.has_key?(:response_block) && !(datum[:response][:body].nil? || datum[:response][:body].empty?)
|
214
|
+
response_body = datum[:response][:body].dup
|
215
|
+
datum[:response][:body] = ''
|
216
|
+
content_length = remaining = response_body.bytesize
|
217
|
+
while remaining > 0
|
218
|
+
datum[:response_block].call(response_body.slice!(0, [datum[:chunk_size], remaining].min), [remaining - datum[:chunk_size], 0].max, content_length)
|
219
|
+
remaining -= datum[:chunk_size]
|
220
|
+
end
|
221
|
+
end
|
222
|
+
datum
|
223
|
+
end
|
224
|
+
|
225
|
+
# Sends the supplied request to the destination host.
|
226
|
+
# @yield [chunk] @see Response#self.parse
|
227
|
+
# @param [Hash<Symbol, >] params One or more optional params, override defaults set in Connection.new
|
228
|
+
# @option params [String] :body text to be sent over a socket
|
229
|
+
# @option params [Hash<Symbol, String>] :headers The default headers to supply in a request
|
230
|
+
# @option params [String] :path appears after 'scheme://host:port/'
|
231
|
+
# @option params [Hash] :query appended to the 'scheme://host:port/path/' in the form of '?key=value'
|
232
|
+
def request(params={}, &block)
|
233
|
+
# @data has defaults, merge in new params to override
|
234
|
+
datum = @data.merge(params)
|
235
|
+
datum[:headers] = @data[:headers].merge(datum[:headers] || {})
|
236
|
+
|
237
|
+
validate_params(:request, params, datum[:middlewares])
|
238
|
+
# If the user passed in new middleware, we want to validate that the original connection parameters
|
239
|
+
# are still valid with the provided middleware.
|
240
|
+
if params[:middlewares]
|
241
|
+
validate_params(:connection, @data, datum[:middlewares])
|
242
|
+
end
|
243
|
+
|
244
|
+
if datum[:user] || datum[:password]
|
245
|
+
user, pass = Utils.unescape_uri(datum[:user].to_s), Utils.unescape_uri(datum[:password].to_s)
|
246
|
+
datum[:headers]['Authorization'] ||= 'Basic ' + ["#{user}:#{pass}"].pack('m').delete(Excon::CR_NL)
|
247
|
+
end
|
248
|
+
|
249
|
+
if datum[:scheme] == UNIX
|
250
|
+
datum[:headers]['Host'] ||= ''
|
251
|
+
else
|
252
|
+
datum[:headers]['Host'] ||= datum[:host] + port_string(datum)
|
253
|
+
end
|
254
|
+
|
255
|
+
# if path is empty or doesn't start with '/', insert one
|
256
|
+
unless datum[:path][0, 1] == '/'
|
257
|
+
datum[:path] = datum[:path].dup.insert(0, '/')
|
258
|
+
end
|
259
|
+
|
260
|
+
if block_given?
|
261
|
+
Excon.display_warning('Excon requests with a block are deprecated, pass :response_block instead.')
|
262
|
+
datum[:response_block] = block
|
263
|
+
end
|
264
|
+
|
265
|
+
datum[:connection] = self
|
266
|
+
|
267
|
+
# cleanup data left behind on persistent connection after interrupt
|
268
|
+
if datum[:persistent] && !@persistent_socket_reusable
|
269
|
+
reset
|
270
|
+
end
|
271
|
+
|
272
|
+
datum[:stack] = datum[:middlewares].map do |middleware|
|
273
|
+
lambda {|stack| middleware.new(stack)}
|
274
|
+
end.reverse.inject(self) do |middlewares, middleware|
|
275
|
+
middleware.call(middlewares)
|
276
|
+
end
|
277
|
+
datum = datum[:stack].request_call(datum)
|
278
|
+
|
279
|
+
unless datum[:pipeline]
|
280
|
+
@persistent_socket_reusable = false
|
281
|
+
datum = response(datum)
|
282
|
+
@persistent_socket_reusable = true
|
283
|
+
|
284
|
+
if datum[:persistent]
|
285
|
+
if key = datum[:response][:headers].keys.detect {|k| k.casecmp('Connection') == 0 }
|
286
|
+
if datum[:response][:headers][key].casecmp('close') == 0
|
287
|
+
reset
|
288
|
+
end
|
289
|
+
end
|
290
|
+
else
|
291
|
+
reset
|
292
|
+
end
|
293
|
+
|
294
|
+
Excon::Response.new(datum[:response])
|
295
|
+
else
|
296
|
+
datum
|
297
|
+
end
|
298
|
+
rescue => error
|
299
|
+
reset
|
300
|
+
|
301
|
+
# If we didn't get far enough to initialize datum and the middleware stack, just raise
|
302
|
+
raise error if !datum
|
303
|
+
|
304
|
+
datum[:error] = error
|
305
|
+
if datum[:stack]
|
306
|
+
datum[:stack].error_call(datum)
|
307
|
+
else
|
308
|
+
raise error
|
309
|
+
end
|
310
|
+
end
|
311
|
+
|
312
|
+
# Sends the supplied requests to the destination host using pipelining.
|
313
|
+
# @param pipeline_params [Array<Hash>] An array of one or more optional params, override defaults set in Connection.new, see #request for details
|
314
|
+
def requests(pipeline_params)
|
315
|
+
pipeline_params.each {|params| params.merge!(:pipeline => true, :persistent => true) }
|
316
|
+
pipeline_params.last.merge!(:persistent => @data[:persistent])
|
317
|
+
|
318
|
+
responses = pipeline_params.map do |params|
|
319
|
+
request(params)
|
320
|
+
end.map do |datum|
|
321
|
+
Excon::Response.new(response(datum)[:response])
|
322
|
+
end
|
323
|
+
|
324
|
+
if @data[:persistent]
|
325
|
+
if key = responses.last[:headers].keys.detect {|k| k.casecmp('Connection') == 0 }
|
326
|
+
if responses.last[:headers][key].casecmp('close') == 0
|
327
|
+
reset
|
328
|
+
end
|
329
|
+
end
|
330
|
+
else
|
331
|
+
reset
|
332
|
+
end
|
333
|
+
|
334
|
+
responses
|
335
|
+
end
|
336
|
+
|
337
|
+
# Sends the supplied requests to the destination host using pipelining in
|
338
|
+
# batches of @limit [Numeric] requests. This is your soft file descriptor
|
339
|
+
# limit by default, typically 256.
|
340
|
+
# @param pipeline_params [Array<Hash>] An array of one or more optional params, override defaults set in Connection.new, see #request for details
|
341
|
+
def batch_requests(pipeline_params, limit = nil)
|
342
|
+
limit ||= Process.respond_to?(:getrlimit) ? Process.getrlimit(:NOFILE).first : 256
|
343
|
+
responses = []
|
344
|
+
|
345
|
+
pipeline_params.each_slice(limit) do |params|
|
346
|
+
responses.concat(requests(params))
|
347
|
+
end
|
348
|
+
|
349
|
+
responses
|
350
|
+
end
|
351
|
+
|
352
|
+
def reset
|
353
|
+
if old_socket = sockets.delete(@socket_key)
|
354
|
+
old_socket.close rescue nil
|
355
|
+
end
|
356
|
+
@persistent_socket_reusable = true
|
357
|
+
end
|
358
|
+
|
359
|
+
# Generate HTTP request verb methods
|
360
|
+
Excon::HTTP_VERBS.each do |method|
|
361
|
+
class_eval <<-DEF, __FILE__, __LINE__ + 1
|
362
|
+
def #{method}(params={}, &block)
|
363
|
+
request(params.merge!(:method => :#{method}), &block)
|
364
|
+
end
|
365
|
+
DEF
|
366
|
+
end
|
367
|
+
|
368
|
+
def retry_limit=(new_retry_limit)
|
369
|
+
Excon.display_warning('Excon::Connection#retry_limit= is deprecated, pass :retry_limit to the initializer.')
|
370
|
+
@data[:retry_limit] = new_retry_limit
|
371
|
+
end
|
372
|
+
|
373
|
+
def retry_limit
|
374
|
+
Excon.display_warning('Excon::Connection#retry_limit is deprecated, use Excon::Connection#data[:retry_limit].')
|
375
|
+
@data[:retry_limit] ||= DEFAULT_RETRY_LIMIT
|
376
|
+
end
|
377
|
+
|
378
|
+
def inspect
|
379
|
+
vars = instance_variables.inject({}) do |accum, var|
|
380
|
+
accum.merge!(var.to_sym => instance_variable_get(var))
|
381
|
+
end
|
382
|
+
vars[:'@data'] = Utils.redact(vars[:'@data'])
|
383
|
+
inspection = '#<Excon::Connection:'
|
384
|
+
inspection += (object_id << 1).to_s(16)
|
385
|
+
vars.each do |key, value|
|
386
|
+
inspection += " #{key}=#{value.inspect}"
|
387
|
+
end
|
388
|
+
inspection += '>'
|
389
|
+
inspection
|
390
|
+
end
|
391
|
+
|
392
|
+
def valid_request_keys(middlewares)
|
393
|
+
valid_middleware_keys(middlewares) + Excon::VALID_REQUEST_KEYS
|
394
|
+
end
|
395
|
+
|
396
|
+
private
|
397
|
+
|
398
|
+
def detect_content_length(body)
|
399
|
+
if body.respond_to?(:size)
|
400
|
+
# IO object: File, Tempfile, StringIO, etc.
|
401
|
+
body.size
|
402
|
+
elsif body.respond_to?(:stat)
|
403
|
+
# for 1.8.7 where file does not have size
|
404
|
+
body.stat.size
|
405
|
+
else
|
406
|
+
0
|
407
|
+
end
|
408
|
+
end
|
409
|
+
|
410
|
+
def valid_middleware_keys(middlewares)
|
411
|
+
middlewares.flat_map do |middleware|
|
412
|
+
if middleware.respond_to?(:valid_parameter_keys)
|
413
|
+
middleware.valid_parameter_keys
|
414
|
+
else
|
415
|
+
Excon.display_warning(
|
416
|
+
"Excon middleware #{middleware} does not define #valid_parameter_keys"
|
417
|
+
)
|
418
|
+
[]
|
419
|
+
end
|
420
|
+
end
|
421
|
+
end
|
422
|
+
|
423
|
+
def validate_params(validation, params, middlewares)
|
424
|
+
valid_keys = case validation
|
425
|
+
when :connection
|
426
|
+
valid_middleware_keys(middlewares) + Excon::VALID_CONNECTION_KEYS
|
427
|
+
when :request
|
428
|
+
valid_request_keys(middlewares)
|
429
|
+
else
|
430
|
+
raise ArgumentError.new("Invalid validation type '#{validation}'")
|
431
|
+
end
|
432
|
+
|
433
|
+
invalid_keys = params.keys - valid_keys
|
434
|
+
unless invalid_keys.empty?
|
435
|
+
Excon.display_warning("Invalid Excon #{validation} keys: #{invalid_keys.map(&:inspect).join(', ')}")
|
436
|
+
|
437
|
+
if validation == :request
|
438
|
+
deprecated_keys = invalid_keys & Excon::DEPRECATED_VALID_REQUEST_KEYS.keys
|
439
|
+
mw_msg = deprecated_keys.map do |k|
|
440
|
+
"#{k}: #{Excon::DEPRECATED_VALID_REQUEST_KEYS[k]}"
|
441
|
+
end.join(', ')
|
442
|
+
Excon.display_warning(
|
443
|
+
"The following request keys are only valid with the associated middleware: #{mw_msg}"
|
444
|
+
)
|
445
|
+
end
|
446
|
+
end
|
447
|
+
end
|
448
|
+
|
449
|
+
def response(datum={})
|
450
|
+
datum[:stack].response_call(datum)
|
451
|
+
rescue => error
|
452
|
+
case error
|
453
|
+
when Excon::Errors::HTTPStatusError, Excon::Errors::Timeout, Excon::Errors::TooManyRedirects
|
454
|
+
raise(error)
|
455
|
+
else
|
456
|
+
raise_socket_error(error)
|
457
|
+
end
|
458
|
+
end
|
459
|
+
|
460
|
+
def socket
|
461
|
+
unix_proxy = @data[:proxy] ? @data[:proxy][:scheme] == UNIX : false
|
462
|
+
sockets[@socket_key] ||= if @data[:scheme] == UNIX || unix_proxy
|
463
|
+
Excon::UnixSocket.new(@data)
|
464
|
+
elsif @data[:ssl_uri_schemes].include?(@data[:scheme])
|
465
|
+
Excon::SSLSocket.new(@data)
|
466
|
+
else
|
467
|
+
Excon::Socket.new(@data)
|
468
|
+
end
|
469
|
+
end
|
470
|
+
|
471
|
+
def sockets
|
472
|
+
@_excon_sockets ||= {}
|
473
|
+
|
474
|
+
if @data[:thread_safe_sockets]
|
475
|
+
# In a multi-threaded world, if the same connection is used by multiple
|
476
|
+
# threads at the same time to connect to the same destination, they may
|
477
|
+
# stomp on each other's sockets. This ensures every thread gets their
|
478
|
+
# own socket cache, within the context of a single connection.
|
479
|
+
@_excon_sockets[Thread.current.object_id] ||= {}
|
480
|
+
else
|
481
|
+
@_excon_sockets
|
482
|
+
end
|
483
|
+
end
|
484
|
+
|
485
|
+
def raise_socket_error(error)
|
486
|
+
if error.message =~ /certificate verify failed/
|
487
|
+
raise(Excon::Errors::CertificateError.new(error))
|
488
|
+
else
|
489
|
+
raise(Excon::Errors::SocketError.new(error))
|
490
|
+
end
|
491
|
+
end
|
492
|
+
|
493
|
+
def proxy_match_host_port(host, port)
|
494
|
+
host_match = if host.is_a? IPAddr
|
495
|
+
begin
|
496
|
+
host.include? @data[:host]
|
497
|
+
rescue IPAddr::Error
|
498
|
+
false
|
499
|
+
end
|
500
|
+
else
|
501
|
+
/(^|\.)#{host}$/.match(@data[:host])
|
502
|
+
end
|
503
|
+
host_match && (port.nil? || port.to_i == @data[:port])
|
504
|
+
end
|
505
|
+
|
506
|
+
def proxy_from_env
|
507
|
+
if (no_proxy_env = ENV['no_proxy'] || ENV['NO_PROXY'])
|
508
|
+
no_proxy_list = no_proxy_env.scan(/\s*(?:\[([\dA-Fa-f:\/]+)\]|\*?\.?([^\s,:]+))(?::(\d+))?\s*/i).map { |e|
|
509
|
+
if e[0]
|
510
|
+
begin
|
511
|
+
[IPAddr.new(e[0]), e[2]]
|
512
|
+
rescue IPAddr::Error
|
513
|
+
nil
|
514
|
+
end
|
515
|
+
else
|
516
|
+
begin
|
517
|
+
[IPAddr.new(e[1]), e[2]]
|
518
|
+
rescue IPAddr::Error
|
519
|
+
[e[1], e[2]]
|
520
|
+
end
|
521
|
+
end
|
522
|
+
}.reject { |e| e.nil? || e[0].nil? }
|
523
|
+
end
|
524
|
+
|
525
|
+
unless no_proxy_env && no_proxy_list.index { |h| proxy_match_host_port(h[0], h[1]) }
|
526
|
+
if @data[:scheme] == HTTPS && (ENV.has_key?('https_proxy') || ENV.has_key?('HTTPS_PROXY'))
|
527
|
+
@data[:proxy] = ENV['https_proxy'] || ENV['HTTPS_PROXY']
|
528
|
+
elsif (ENV.has_key?('http_proxy') || ENV.has_key?('HTTP_PROXY'))
|
529
|
+
@data[:proxy] = ENV['http_proxy'] || ENV['HTTP_PROXY']
|
530
|
+
end
|
531
|
+
end
|
532
|
+
end
|
533
|
+
|
534
|
+
def setup_proxy
|
535
|
+
if @data[:disable_proxy]
|
536
|
+
if @data[:proxy]
|
537
|
+
raise ArgumentError, "`:disable_proxy` parameter and `:proxy` parameter cannot both be set at the same time."
|
538
|
+
end
|
539
|
+
return
|
540
|
+
end
|
541
|
+
|
542
|
+
return if @data[:scheme] == UNIX
|
543
|
+
|
544
|
+
proxy_from_env
|
545
|
+
|
546
|
+
case @data[:proxy]
|
547
|
+
when nil
|
548
|
+
@data.delete(:proxy)
|
549
|
+
when ''
|
550
|
+
@data.delete(:proxy)
|
551
|
+
when Hash
|
552
|
+
# no processing needed
|
553
|
+
when String, URI
|
554
|
+
uri = @data[:proxy].is_a?(String) ? URI.parse(@data[:proxy]) : @data[:proxy]
|
555
|
+
@data[:proxy] = {
|
556
|
+
:host => uri.host,
|
557
|
+
:hostname => uri.hostname,
|
558
|
+
# path is only sensible for a Unix socket proxy
|
559
|
+
:path => uri.scheme == UNIX ? uri.path : nil,
|
560
|
+
:port => uri.port,
|
561
|
+
:scheme => uri.scheme,
|
562
|
+
}
|
563
|
+
if uri.password
|
564
|
+
@data[:proxy][:password] = uri.password
|
565
|
+
end
|
566
|
+
if uri.user
|
567
|
+
@data[:proxy][:user] = uri.user
|
568
|
+
end
|
569
|
+
if @data[:proxy][:scheme] == UNIX
|
570
|
+
if @data[:proxy][:host]
|
571
|
+
raise ArgumentError, "The `:host` parameter should not be set for `unix://` proxies.\n" +
|
572
|
+
"When supplying a `unix://` URI, it should start with `unix:/` or `unix:///`."
|
573
|
+
end
|
574
|
+
else
|
575
|
+
unless uri.host && uri.port && uri.scheme
|
576
|
+
raise Excon::Errors::ProxyParse, "Proxy is invalid"
|
577
|
+
end
|
578
|
+
end
|
579
|
+
else
|
580
|
+
raise Excon::Errors::ProxyParse, "Proxy is invalid"
|
581
|
+
end
|
582
|
+
|
583
|
+
if @data.has_key?(:proxy) && @data[:scheme] == 'http'
|
584
|
+
@data[:headers]['Proxy-Connection'] ||= 'Keep-Alive'
|
585
|
+
# https credentials happen in handshake
|
586
|
+
if @data[:proxy].has_key?(:user) || @data[:proxy].has_key?(:password)
|
587
|
+
user, pass = Utils.unescape_form(@data[:proxy][:user].to_s), Utils.unescape_form(@data[:proxy][:password].to_s)
|
588
|
+
auth = ["#{user}:#{pass}"].pack('m').delete(Excon::CR_NL)
|
589
|
+
@data[:headers]['Proxy-Authorization'] = 'Basic ' + auth
|
590
|
+
end
|
591
|
+
end
|
592
|
+
end
|
593
|
+
end
|
594
|
+
end
|