logstash-output-scalyr 0.1.8 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -0
- data/Gemfile +5 -0
- data/README.md +3 -2
- data/lib/logstash/outputs/scalyr.rb +226 -138
- data/lib/scalyr/common/client.rb +76 -50
- data/lib/scalyr/common/util.rb +7 -0
- data/lib/scalyr/constants.rb +2 -0
- data/logstash-output-scalyr.gemspec +1 -1
- data/spec/logstash/outputs/scalyr_integration_spec.rb +148 -8
- data/spec/logstash/outputs/scalyr_spec.rb +12 -6
- data/vendor/bundle/jruby/2.5.0/bin/htmldiff +1 -1
- data/vendor/bundle/jruby/2.5.0/bin/ldiff +1 -1
- data/vendor/bundle/jruby/2.5.0/cache/addressable-2.7.0.gem +0 -0
- data/vendor/bundle/jruby/2.5.0/cache/crack-0.4.5.gem +0 -0
- data/vendor/bundle/jruby/2.5.0/cache/hashdiff-1.0.1.gem +0 -0
- data/vendor/bundle/jruby/2.5.0/cache/public_suffix-4.0.6.gem +0 -0
- data/vendor/bundle/jruby/2.5.0/cache/rexml-3.2.5.gem +0 -0
- data/vendor/bundle/jruby/2.5.0/cache/webmock-3.13.0.gem +0 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/CHANGELOG.md +235 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/Gemfile +32 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/LICENSE.txt +202 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/README.md +121 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/Rakefile +34 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/data/unicode.data +0 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable.rb +4 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/idna.rb +27 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/idna/native.rb +61 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/idna/pure.rb +676 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/template.rb +1045 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/uri.rb +2529 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/version.rb +32 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/idna_spec.rb +300 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/net_http_compat_spec.rb +30 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/rack_mount_compat_spec.rb +106 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/security_spec.rb +59 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/template_spec.rb +1451 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/uri_spec.rb +6603 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/spec_helper.rb +24 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/clobber.rake +4 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/gem.rake +93 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/git.rake +47 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/metrics.rake +24 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/rspec.rake +23 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/yard.rake +29 -0
- data/vendor/bundle/jruby/2.5.0/gems/crack-0.4.5/lib/crack.rb +7 -0
- data/vendor/bundle/jruby/2.5.0/gems/crack-0.4.5/lib/crack/json.rb +98 -0
- data/vendor/bundle/jruby/2.5.0/gems/crack-0.4.5/lib/crack/util.rb +17 -0
- data/vendor/bundle/jruby/2.5.0/gems/crack-0.4.5/lib/crack/version.rb +3 -0
- data/vendor/bundle/jruby/2.5.0/gems/crack-0.4.5/lib/crack/xml.rb +238 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/Gemfile +8 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/LICENSE +19 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/README.md +276 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/Rakefile +18 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/changelog.md +100 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/hashdiff.gemspec +39 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff.rb +10 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/compare_hashes.rb +69 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/diff.rb +177 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/lcs.rb +66 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/lcs_compare_arrays.rb +32 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/linear_compare_array.rb +159 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/patch.rb +88 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/util.rb +155 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/version.rb +5 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/best_diff_spec.rb +75 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/diff_array_spec.rb +60 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/diff_spec.rb +360 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/lcs_spec.rb +76 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/linear_compare_array_spec.rb +50 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/patch_spec.rb +185 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/readme_spec.rb +15 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/util_spec.rb +116 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/spec_helper.rb +15 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/2.0-Upgrade.md +52 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/CHANGELOG.md +406 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/Gemfile +15 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/LICENSE.txt +22 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/README.md +207 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/Rakefile +51 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/SECURITY.md +104 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/bin/console +15 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/codecov.yml +12 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/data/list.txt +13380 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix.rb +179 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix/domain.rb +235 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix/errors.rb +41 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix/list.rb +247 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix/rule.rb +350 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix/version.rb +13 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/public_suffix.gemspec +29 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/acceptance_test.rb +131 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_find.rb +66 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_find_all.rb +102 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_names.rb +91 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_select.rb +26 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_select_incremental.rb +25 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_valid.rb +101 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/domain_profiler.rb +12 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/find_profiler.rb +12 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/find_profiler_jp.rb +12 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/initialization_profiler.rb +11 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/list_profsize.rb +11 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/object_binsize.rb +57 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/psl_test.rb +52 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/test_helper.rb +18 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/tests.txt +98 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/unit/domain_test.rb +106 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/unit/errors_test.rb +25 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/unit/list_test.rb +241 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/unit/public_suffix_test.rb +188 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/unit/rule_test.rb +222 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/LICENSE.txt +22 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/NEWS.md +178 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/README.md +48 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/context.rdoc +143 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/rdoc/child.rdoc +87 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/rdoc/document.rdoc +276 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/rdoc/element.rdoc +602 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/rdoc/node.rdoc +97 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/rdoc/parent.rdoc +267 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/child_toc.rdoc +12 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/document_toc.rdoc +30 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/element_toc.rdoc +55 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/master_toc.rdoc +135 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/node_toc.rdoc +16 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/parent_toc.rdoc +25 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml.rb +3 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/attlistdecl.rb +63 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/attribute.rb +205 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/cdata.rb +68 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/child.rb +97 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/comment.rb +80 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/doctype.rb +311 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/document.rb +451 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/dtd/attlistdecl.rb +11 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/dtd/dtd.rb +47 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/dtd/elementdecl.rb +18 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/dtd/entitydecl.rb +57 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/dtd/notationdecl.rb +40 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/element.rb +2599 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/encoding.rb +51 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/entity.rb +171 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/formatters/default.rb +116 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/formatters/pretty.rb +142 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/formatters/transitive.rb +58 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/functions.rb +447 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/instruction.rb +79 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/light/node.rb +188 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/namespace.rb +59 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/node.rb +76 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/output.rb +30 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parent.rb +166 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parseexception.rb +52 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +694 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/lightparser.rb +59 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/pullparser.rb +197 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/sax2parser.rb +273 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/streamparser.rb +61 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/treeparser.rb +101 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/ultralightparser.rb +57 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/xpathparser.rb +689 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/quickpath.rb +266 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/rexml.rb +37 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/sax2listener.rb +98 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/security.rb +28 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/source.rb +298 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/streamlistener.rb +93 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/text.rb +424 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/undefinednamespaceexception.rb +9 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/validation/relaxng.rb +539 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/validation/validation.rb +144 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/validation/validationexception.rb +10 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/xmldecl.rb +130 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/xmltokens.rb +85 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/xpath.rb +81 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/xpath_parser.rb +974 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/CHANGELOG.md +1894 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/Gemfile +9 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/LICENSE +20 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/README.md +1176 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/Rakefile +38 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock.rb +59 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/api.rb +109 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/assertion_failure.rb +11 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/callback_registry.rb +35 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/config.rb +18 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/cucumber.rb +10 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/deprecation.rb +9 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/errors.rb +17 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/async_http_client_adapter.rb +216 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/curb_adapter.rb +351 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/em_http_request_adapter.rb +231 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/excon_adapter.rb +165 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_lib_adapter.rb +7 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb +19 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb/client.rb +17 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb/request.rb +16 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb/response.rb +64 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb/streamer.rb +29 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb/webmock.rb +68 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb_adapter.rb +37 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/httpclient_adapter.rb +259 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/manticore_adapter.rb +145 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/net_http.rb +385 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/net_http_response.rb +34 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/patron_adapter.rb +130 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb +174 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/any_arg_matcher.rb +13 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_argument_matcher.rb +21 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_excluding_matcher.rb +15 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_including_matcher.rb +17 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/minitest.rb +41 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/rack_response.rb +69 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_body_diff.rb +64 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_execution_verifier.rb +77 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_pattern.rb +405 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_registry.rb +35 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_signature.rb +54 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_signature_snippet.rb +61 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_stub.rb +100 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/response.rb +159 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/responses_sequence.rb +40 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/rspec.rb +42 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/rspec/matchers.rb +27 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/rspec/matchers/request_pattern_matcher.rb +78 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/rspec/matchers/webmock_matcher.rb +67 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/stub_registry.rb +82 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/stub_request_snippet.rb +38 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/test_unit.rb +20 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/hash_counter.rb +39 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/hash_keys_stringifier.rb +25 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/hash_validator.rb +17 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/headers.rb +64 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/json.rb +67 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/query_mapper.rb +281 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/uri.rb +111 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/values_stringifier.rb +20 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/version_checker.rb +111 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/version.rb +3 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/webmock.rb +163 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/minitest/test_helper.rb +34 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/minitest/test_webmock.rb +9 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/minitest/webmock_spec.rb +60 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/async_http_client/async_http_client_spec.rb +375 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/async_http_client/async_http_client_spec_helper.rb +73 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/curb/curb_spec.rb +499 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/curb/curb_spec_helper.rb +147 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/em_http_request/em_http_request_spec.rb +462 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/em_http_request/em_http_request_spec_helper.rb +77 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/excon/excon_spec.rb +77 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/excon/excon_spec_helper.rb +52 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/http_rb/http_rb_spec.rb +93 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/http_rb/http_rb_spec_helper.rb +54 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/httpclient/httpclient_spec.rb +217 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/httpclient/httpclient_spec_helper.rb +57 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/manticore/manticore_spec.rb +107 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/manticore/manticore_spec_helper.rb +35 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/net_http/net_http_shared.rb +153 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/net_http/net_http_spec.rb +369 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/net_http/net_http_spec_helper.rb +64 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/net_http/real_net_http_spec.rb +20 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/patron/patron_spec.rb +125 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/patron/patron_spec_helper.rb +54 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/allowing_and_disabling_net_connect.rb +313 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/callbacks.rb +148 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/complex_cross_concern_behaviors.rb +36 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/enabling_and_disabling_webmock.rb +95 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/precedence_of_stubs.rb +15 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/request_expectations.rb +930 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/returning_declared_responses.rb +409 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/stubbing_requests.rb +678 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/typhoeus/typhoeus_hydra_spec.rb +135 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/typhoeus/typhoeus_hydra_spec_helper.rb +60 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/webmock_shared.rb +41 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/fixtures/test.txt +1 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/quality_spec.rb +84 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/spec_helper.rb +48 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/support/example_curl_output.txt +22 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/support/failures.rb +9 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/support/my_rack_app.rb +53 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/support/network_connection.rb +19 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/support/webmock_server.rb +70 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/api_spec.rb +175 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/errors_spec.rb +129 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/http_lib_adapters/http_lib_adapter_registry_spec.rb +17 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/http_lib_adapters/http_lib_adapter_spec.rb +12 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/matchers/hash_excluding_matcher_spec.rb +61 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/matchers/hash_including_matcher_spec.rb +87 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/rack_response_spec.rb +112 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_body_diff_spec.rb +90 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_execution_verifier_spec.rb +208 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_pattern_spec.rb +736 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_registry_spec.rb +95 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_signature_snippet_spec.rb +89 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_signature_spec.rb +155 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_stub_spec.rb +199 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/response_spec.rb +286 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/stub_registry_spec.rb +103 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/stub_request_snippet_spec.rb +115 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/hash_counter_spec.rb +39 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/hash_keys_stringifier_spec.rb +27 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/headers_spec.rb +28 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/json_spec.rb +33 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/query_mapper_spec.rb +157 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/uri_spec.rb +371 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/version_checker_spec.rb +65 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/webmock_spec.rb +60 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/test/http_request.rb +24 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/test/shared_test.rb +108 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/test/test_helper.rb +23 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/test/test_webmock.rb +12 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/webmock.gemspec +54 -0
- data/vendor/bundle/jruby/2.5.0/specifications/addressable-2.7.0.gemspec +39 -0
- data/vendor/bundle/jruby/2.5.0/specifications/crack-0.4.5.gemspec +32 -0
- data/vendor/bundle/jruby/2.5.0/specifications/hashdiff-1.0.1.gemspec +46 -0
- data/vendor/bundle/jruby/2.5.0/specifications/public_suffix-4.0.6.gemspec +24 -0
- data/vendor/bundle/jruby/2.5.0/specifications/rexml-3.2.5.gemspec +42 -0
- data/vendor/bundle/jruby/2.5.0/specifications/webmock-3.13.0.gemspec +85 -0
- metadata +309 -2
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'rspec/its'
|
5
|
+
|
6
|
+
begin
|
7
|
+
require 'coveralls'
|
8
|
+
Coveralls.wear! do
|
9
|
+
add_filter "spec/"
|
10
|
+
add_filter "vendor/"
|
11
|
+
end
|
12
|
+
rescue LoadError
|
13
|
+
warn "warning: coveralls gem not found; skipping Coveralls"
|
14
|
+
require 'simplecov'
|
15
|
+
SimpleCov.start do
|
16
|
+
add_filter "spec/"
|
17
|
+
add_filter "vendor/"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
RSpec.configure do |config|
|
22
|
+
config.warnings = true
|
23
|
+
config.filter_run_when_matching :focus
|
24
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rubygems/package_task"
|
4
|
+
|
5
|
+
namespace :gem do
|
6
|
+
GEM_SPEC = Gem::Specification.new do |s|
|
7
|
+
s.name = PKG_NAME
|
8
|
+
s.version = PKG_VERSION
|
9
|
+
s.summary = PKG_SUMMARY
|
10
|
+
s.description = PKG_DESCRIPTION
|
11
|
+
|
12
|
+
s.files = PKG_FILES.to_a
|
13
|
+
|
14
|
+
s.has_rdoc = true
|
15
|
+
s.extra_rdoc_files = %w( README.md )
|
16
|
+
s.rdoc_options.concat ["--main", "README.md"]
|
17
|
+
|
18
|
+
if !s.respond_to?(:add_development_dependency)
|
19
|
+
puts "Cannot build Gem with this version of RubyGems."
|
20
|
+
exit(1)
|
21
|
+
end
|
22
|
+
|
23
|
+
s.required_ruby_version = ">= 2.0"
|
24
|
+
|
25
|
+
s.add_runtime_dependency "public_suffix", ">= 2.0.2", "< 5.0"
|
26
|
+
s.add_development_dependency "bundler", ">= 1.0", "< 3.0"
|
27
|
+
|
28
|
+
s.require_path = "lib"
|
29
|
+
|
30
|
+
s.author = "Bob Aman"
|
31
|
+
s.email = "bob@sporkmonger.com"
|
32
|
+
s.homepage = "https://github.com/sporkmonger/addressable"
|
33
|
+
s.license = "Apache-2.0"
|
34
|
+
end
|
35
|
+
|
36
|
+
Gem::PackageTask.new(GEM_SPEC) do |p|
|
37
|
+
p.gem_spec = GEM_SPEC
|
38
|
+
p.need_tar = true
|
39
|
+
p.need_zip = true
|
40
|
+
end
|
41
|
+
|
42
|
+
desc "Generates .gemspec file"
|
43
|
+
task :gemspec do
|
44
|
+
spec_string = GEM_SPEC.to_ruby
|
45
|
+
File.open("#{GEM_SPEC.name}.gemspec", "w") do |file|
|
46
|
+
file.write spec_string
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
desc "Show information about the gem"
|
51
|
+
task :debug do
|
52
|
+
puts GEM_SPEC.to_ruby
|
53
|
+
end
|
54
|
+
|
55
|
+
desc "Install the gem"
|
56
|
+
task :install => ["clobber", "gem:package"] do
|
57
|
+
sh "#{SUDO} gem install --local pkg/#{GEM_SPEC.full_name}"
|
58
|
+
end
|
59
|
+
|
60
|
+
desc "Uninstall the gem"
|
61
|
+
task :uninstall do
|
62
|
+
installed_list = Gem.source_index.find_name(PKG_NAME)
|
63
|
+
if installed_list &&
|
64
|
+
(installed_list.collect { |s| s.version.to_s}.include?(PKG_VERSION))
|
65
|
+
sh(
|
66
|
+
"#{SUDO} gem uninstall --version '#{PKG_VERSION}' " +
|
67
|
+
"--ignore-dependencies --executables #{PKG_NAME}"
|
68
|
+
)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
desc "Reinstall the gem"
|
73
|
+
task :reinstall => [:uninstall, :install]
|
74
|
+
|
75
|
+
desc "Package for release"
|
76
|
+
task :release => ["gem:package", "gem:gemspec"] do |t|
|
77
|
+
v = ENV["VERSION"] or abort "Must supply VERSION=x.y.z"
|
78
|
+
abort "Versions don't match #{v} vs #{PROJ.version}" if v != PKG_VERSION
|
79
|
+
pkg = "pkg/#{GEM_SPEC.full_name}"
|
80
|
+
|
81
|
+
changelog = File.open("CHANGELOG.md") { |file| file.read }
|
82
|
+
|
83
|
+
puts "Releasing #{PKG_NAME} v. #{PKG_VERSION}"
|
84
|
+
Rake::Task["git:tag:create"].invoke
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
desc "Alias to gem:package"
|
89
|
+
task "gem" => "gem:package"
|
90
|
+
|
91
|
+
task "gem:release" => "gem:gemspec"
|
92
|
+
|
93
|
+
task "clobber" => ["gem:clobber_package"]
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
namespace :git do
|
4
|
+
namespace :tag do
|
5
|
+
desc "List tags from the Git repository"
|
6
|
+
task :list do
|
7
|
+
tags = `git tag -l`
|
8
|
+
tags.gsub!("\r", "")
|
9
|
+
tags = tags.split("\n").sort {|a, b| b <=> a }
|
10
|
+
puts tags.join("\n")
|
11
|
+
end
|
12
|
+
|
13
|
+
desc "Create a new tag in the Git repository"
|
14
|
+
task :create do
|
15
|
+
changelog = File.open("CHANGELOG.md", "r") { |file| file.read }
|
16
|
+
puts "-" * 80
|
17
|
+
puts changelog
|
18
|
+
puts "-" * 80
|
19
|
+
puts
|
20
|
+
|
21
|
+
v = ENV["VERSION"] or abort "Must supply VERSION=x.y.z"
|
22
|
+
abort "Versions don't match #{v} vs #{PKG_VERSION}" if v != PKG_VERSION
|
23
|
+
|
24
|
+
git_status = `git status`
|
25
|
+
if git_status !~ /^nothing to commit/
|
26
|
+
abort "Working directory isn't clean."
|
27
|
+
end
|
28
|
+
|
29
|
+
tag = "#{PKG_NAME}-#{PKG_VERSION}"
|
30
|
+
msg = "Release #{PKG_NAME}-#{PKG_VERSION}"
|
31
|
+
|
32
|
+
existing_tags = `git tag -l #{PKG_NAME}-*`.split('\n')
|
33
|
+
if existing_tags.include?(tag)
|
34
|
+
warn("Tag already exists, deleting...")
|
35
|
+
unless system "git tag -d #{tag}"
|
36
|
+
abort "Tag deletion failed."
|
37
|
+
end
|
38
|
+
end
|
39
|
+
puts "Creating git tag '#{tag}'..."
|
40
|
+
unless system "git tag -a -m \"#{msg}\" #{tag}"
|
41
|
+
abort "Tag creation failed."
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
task "gem:release" => "git:tag:create"
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
namespace :metrics do
|
4
|
+
task :lines do
|
5
|
+
lines, codelines, total_lines, total_codelines = 0, 0, 0, 0
|
6
|
+
for file_name in FileList["lib/**/*.rb"]
|
7
|
+
f = File.open(file_name)
|
8
|
+
while line = f.gets
|
9
|
+
lines += 1
|
10
|
+
next if line =~ /^\s*$/
|
11
|
+
next if line =~ /^\s*#/
|
12
|
+
codelines += 1
|
13
|
+
end
|
14
|
+
puts "L: #{sprintf("%4d", lines)}, " +
|
15
|
+
"LOC #{sprintf("%4d", codelines)} | #{file_name}"
|
16
|
+
total_lines += lines
|
17
|
+
total_codelines += codelines
|
18
|
+
|
19
|
+
lines, codelines = 0, 0
|
20
|
+
end
|
21
|
+
|
22
|
+
puts "Total: Lines #{total_lines}, LOC #{total_codelines}"
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rspec/core/rake_task"
|
4
|
+
|
5
|
+
namespace :spec do
|
6
|
+
RSpec::Core::RakeTask.new(:simplecov) do |t|
|
7
|
+
t.pattern = FileList['spec/**/*_spec.rb']
|
8
|
+
t.rspec_opts = ['--color', '--format', 'documentation']
|
9
|
+
end
|
10
|
+
|
11
|
+
namespace :simplecov do
|
12
|
+
desc "Browse the code coverage report."
|
13
|
+
task :browse => "spec:simplecov" do
|
14
|
+
require "launchy"
|
15
|
+
Launchy.open("coverage/index.html")
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
desc "Alias to spec:simplecov"
|
21
|
+
task "spec" => "spec:simplecov"
|
22
|
+
|
23
|
+
task "clobber" => ["spec:clobber_simplecov"]
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rake"
|
4
|
+
|
5
|
+
begin
|
6
|
+
require "yard"
|
7
|
+
require "yard/rake/yardoc_task"
|
8
|
+
|
9
|
+
namespace :doc do
|
10
|
+
desc "Generate Yardoc documentation"
|
11
|
+
YARD::Rake::YardocTask.new do |yardoc|
|
12
|
+
yardoc.name = "yard"
|
13
|
+
yardoc.options = ["--verbose", "--markup", "markdown"]
|
14
|
+
yardoc.files = FileList[
|
15
|
+
"lib/**/*.rb", "ext/**/*.c",
|
16
|
+
"README.md", "CHANGELOG.md", "LICENSE.txt"
|
17
|
+
].exclude(/idna/)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
task "clobber" => ["doc:clobber_yard"]
|
22
|
+
|
23
|
+
desc "Alias to doc:yard"
|
24
|
+
task "doc" => "doc:yard"
|
25
|
+
rescue LoadError
|
26
|
+
# If yard isn't available, it's not the end of the world
|
27
|
+
desc "Alias to doc:rdoc"
|
28
|
+
task "doc" => "doc:rdoc"
|
29
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# Copyright (c) 2004-2008 David Heinemeier Hansson
|
2
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
3
|
+
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
4
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
5
|
+
|
6
|
+
require 'strscan'
|
7
|
+
|
8
|
+
module Crack
|
9
|
+
class JSON
|
10
|
+
def self.parser_exceptions
|
11
|
+
@parser_exceptions ||= [ArgumentError, Psych::SyntaxError]
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.parse(json)
|
15
|
+
yaml = unescape(convert_json_to_yaml(json))
|
16
|
+
YAML.safe_load(yaml, [Regexp, Date, Time])
|
17
|
+
rescue *parser_exceptions
|
18
|
+
raise ParseError, "Invalid JSON string"
|
19
|
+
rescue Psych::DisallowedClass
|
20
|
+
yaml
|
21
|
+
end
|
22
|
+
|
23
|
+
protected
|
24
|
+
def self.unescape(str)
|
25
|
+
# Force the encoding to be UTF-8 so we can perform regular expressions
|
26
|
+
# on 1.9.2 without blowing up.
|
27
|
+
# see http://stackoverflow.com/questions/1224204/ruby-mechanize-getting-force-encoding-exception for a similar issue
|
28
|
+
str.force_encoding('UTF-8') if defined?(Encoding) && str.respond_to?(:force_encoding)
|
29
|
+
str.gsub(/\\u0000/, "").gsub(/\\[u|U]([0-9a-fA-F]{4})/) { [$1.hex].pack("U") }
|
30
|
+
end
|
31
|
+
|
32
|
+
# matches YAML-formatted dates
|
33
|
+
DATE_REGEX = /^\d{4}-\d{2}-\d{2}$|^\d{4}-\d{1,2}-\d{1,2}[T \t]+\d{1,2}:\d{2}:\d{2}(\.[0-9]*)?(([ \t]*)Z|[-+]\d{2}?(:\d{2})?)$/
|
34
|
+
|
35
|
+
# Ensure that ":" and "," are always followed by a space
|
36
|
+
def self.convert_json_to_yaml(json) #:nodoc:
|
37
|
+
json = String.new(json) #can't modify a frozen string
|
38
|
+
scanner, quoting, marks, pos, date_starts, date_ends = StringScanner.new(json), false, [], nil, [], []
|
39
|
+
while scanner.scan_until(/(\\['"]|['":,\/\\]|\\.)/)
|
40
|
+
case char = scanner[1]
|
41
|
+
when '"', "'"
|
42
|
+
if !quoting
|
43
|
+
quoting = char
|
44
|
+
pos = scanner.pos
|
45
|
+
elsif quoting == char
|
46
|
+
if json[pos..scanner.pos-2] =~ DATE_REGEX
|
47
|
+
# found a date, track the exact positions of the quotes so we can remove them later.
|
48
|
+
# oh, and increment them for each current mark, each one is an extra padded space that bumps
|
49
|
+
# the position in the final YAML output
|
50
|
+
total_marks = marks.size
|
51
|
+
date_starts << pos+total_marks
|
52
|
+
date_ends << scanner.pos+total_marks
|
53
|
+
end
|
54
|
+
quoting = false
|
55
|
+
end
|
56
|
+
when "/"
|
57
|
+
if !quoting
|
58
|
+
json[scanner.pos - 1] = "!ruby/regexp /"
|
59
|
+
scanner.pos += 13
|
60
|
+
scanner.scan_until(/\/[mix]*/)
|
61
|
+
end
|
62
|
+
when ":",","
|
63
|
+
marks << scanner.pos - 1 unless quoting
|
64
|
+
when "\\"
|
65
|
+
scanner.skip(/\\/)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
if marks.empty?
|
70
|
+
json.gsub(/\\\//, '/')
|
71
|
+
else
|
72
|
+
left_pos = marks.clone.unshift(-1)
|
73
|
+
right_pos = marks << json.length
|
74
|
+
output = []
|
75
|
+
left_pos.each_with_index do |left, i|
|
76
|
+
output << json[left.succ..right_pos[i]]
|
77
|
+
end
|
78
|
+
output = output * " "
|
79
|
+
|
80
|
+
format_dates(output, date_starts, date_ends)
|
81
|
+
output.gsub!(/\\\//, '/')
|
82
|
+
output
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
def self.format_dates(output, date_starts, date_ends)
|
87
|
+
if YAML.constants.include?('Syck')
|
88
|
+
(date_starts + date_ends).each { |i| output[i-1] = ' ' }
|
89
|
+
else
|
90
|
+
extra_chars_to_be_added = 0
|
91
|
+
date_starts.each do |i|
|
92
|
+
output[i-2+extra_chars_to_be_added] = '!!timestamp '
|
93
|
+
extra_chars_to_be_added += 10
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Crack
|
2
|
+
module Util
|
3
|
+
def snake_case(str)
|
4
|
+
return str.downcase if str =~ /^[A-Z]+$/
|
5
|
+
str.gsub(/([A-Z]+)(?=[A-Z][a-z]?)|\B[A-Z]/, '_\&') =~ /_*(.*)/
|
6
|
+
return $+.downcase
|
7
|
+
end
|
8
|
+
|
9
|
+
def to_xml_attributes(hash)
|
10
|
+
hash.map do |k,v|
|
11
|
+
%{#{Crack::Util.snake_case(k.to_s).sub(/^(.{1,1})/) { |m| m.downcase }}="#{v.to_s.gsub('"', '"')}"}
|
12
|
+
end.join(' ')
|
13
|
+
end
|
14
|
+
|
15
|
+
extend self
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,238 @@
|
|
1
|
+
require 'rexml/parsers/streamparser'
|
2
|
+
require 'rexml/parsers/baseparser'
|
3
|
+
require 'rexml/light/node'
|
4
|
+
require 'rexml/text'
|
5
|
+
require "rexml/document"
|
6
|
+
require 'date'
|
7
|
+
require 'time'
|
8
|
+
require 'yaml'
|
9
|
+
require 'bigdecimal'
|
10
|
+
|
11
|
+
# The Reason behind redefining the String Class for this specific plugin is to
|
12
|
+
# avoid the dynamic insertion of stuff on it (see version previous to this commit).
|
13
|
+
# Doing that disables the possibility of efectuating a dump on the structure. This way it goes.
|
14
|
+
class REXMLUtiliyNodeString < String
|
15
|
+
attr_accessor :attributes
|
16
|
+
end
|
17
|
+
|
18
|
+
# This is a slighly modified version of the XMLUtilityNode from
|
19
|
+
# http://merb.devjavu.com/projects/merb/ticket/95 (has.sox@gmail.com)
|
20
|
+
# It's mainly just adding vowels, as I ht cd wth n vwls :)
|
21
|
+
# This represents the hard part of the work, all I did was change the
|
22
|
+
# underlying parser.
|
23
|
+
class REXMLUtilityNode #:nodoc:
|
24
|
+
attr_accessor :name, :attributes, :children, :type
|
25
|
+
|
26
|
+
def self.typecasts
|
27
|
+
@@typecasts
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.typecasts=(obj)
|
31
|
+
@@typecasts = obj
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.available_typecasts
|
35
|
+
@@available_typecasts
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.available_typecasts=(obj)
|
39
|
+
@@available_typecasts = obj
|
40
|
+
end
|
41
|
+
|
42
|
+
self.typecasts = {}
|
43
|
+
self.typecasts["integer"] = lambda{|v| v.nil? ? nil : v.to_i}
|
44
|
+
self.typecasts["boolean"] = lambda{|v| v.nil? ? nil : (v.strip != "false")}
|
45
|
+
self.typecasts["datetime"] = lambda{|v| v.nil? ? nil : Time.parse(v).utc}
|
46
|
+
self.typecasts["date"] = lambda{|v| v.nil? ? nil : Date.parse(v)}
|
47
|
+
self.typecasts["dateTime"] = lambda{|v| v.nil? ? nil : Time.parse(v).utc}
|
48
|
+
self.typecasts["decimal"] = lambda{|v| v.nil? ? nil : BigDecimal(v.to_s)}
|
49
|
+
self.typecasts["double"] = lambda{|v| v.nil? ? nil : v.to_f}
|
50
|
+
self.typecasts["float"] = lambda{|v| v.nil? ? nil : v.to_f}
|
51
|
+
self.typecasts["string"] = lambda{|v| v.to_s}
|
52
|
+
self.typecasts["base64Binary"] = lambda{|v| v.unpack('m').first }
|
53
|
+
|
54
|
+
self.available_typecasts = self.typecasts.keys
|
55
|
+
|
56
|
+
def initialize(name, normalized_attributes = {})
|
57
|
+
|
58
|
+
# unnormalize attribute values
|
59
|
+
attributes = Hash[* normalized_attributes.map { |key, value|
|
60
|
+
[ key, unnormalize_xml_entities(value) ]
|
61
|
+
}.flatten]
|
62
|
+
|
63
|
+
@name = name.tr("-", "_")
|
64
|
+
# leave the type alone if we don't know what it is
|
65
|
+
@type = self.class.available_typecasts.include?(attributes["type"]) ? attributes.delete("type") : attributes["type"]
|
66
|
+
|
67
|
+
@nil_element = attributes.delete("nil") == "true"
|
68
|
+
@attributes = undasherize_keys(attributes)
|
69
|
+
@children = []
|
70
|
+
@text = false
|
71
|
+
end
|
72
|
+
|
73
|
+
def add_node(node)
|
74
|
+
@text = true if node.is_a? String
|
75
|
+
@children << node
|
76
|
+
end
|
77
|
+
|
78
|
+
def to_hash
|
79
|
+
# ACG: Added a check here to prevent an exception a type == "file" tag has nodes within it
|
80
|
+
if @type == "file" and (@children.first.nil? or @children.first.is_a?(String))
|
81
|
+
f = StringIO.new((@children.first || '').unpack('m').first)
|
82
|
+
class << f
|
83
|
+
attr_accessor :original_filename, :content_type
|
84
|
+
end
|
85
|
+
f.original_filename = attributes['name'] || 'untitled'
|
86
|
+
f.content_type = attributes['content_type'] || 'application/octet-stream'
|
87
|
+
return {name => f}
|
88
|
+
end
|
89
|
+
|
90
|
+
if @text
|
91
|
+
t = typecast_value( unnormalize_xml_entities( inner_html ) )
|
92
|
+
if t.is_a?(String)
|
93
|
+
t = REXMLUtiliyNodeString.new(t)
|
94
|
+
t.attributes = attributes
|
95
|
+
end
|
96
|
+
return { name => t }
|
97
|
+
else
|
98
|
+
#change repeating groups into an array
|
99
|
+
groups = @children.inject({}) { |s,e| (s[e.name] ||= []) << e; s }
|
100
|
+
|
101
|
+
out = nil
|
102
|
+
if @type == "array"
|
103
|
+
out = []
|
104
|
+
groups.each do |k, v|
|
105
|
+
if v.size == 1
|
106
|
+
out << v.first.to_hash.entries.first.last
|
107
|
+
else
|
108
|
+
out << v.map{|e| e.to_hash[k]}
|
109
|
+
end
|
110
|
+
end
|
111
|
+
out = out.flatten
|
112
|
+
|
113
|
+
else # If Hash
|
114
|
+
out = {}
|
115
|
+
groups.each do |k,v|
|
116
|
+
if v.size == 1
|
117
|
+
out.merge!(v.first)
|
118
|
+
else
|
119
|
+
out.merge!( k => v.map{|e| e.to_hash[k]})
|
120
|
+
end
|
121
|
+
end
|
122
|
+
out.merge! attributes unless attributes.empty?
|
123
|
+
out = out.empty? ? nil : out
|
124
|
+
end
|
125
|
+
|
126
|
+
if @type && out.nil?
|
127
|
+
{ name => typecast_value(out) }
|
128
|
+
else
|
129
|
+
{ name => out }
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
# Typecasts a value based upon its type. For instance, if
|
135
|
+
# +node+ has #type == "integer",
|
136
|
+
# {{[node.typecast_value("12") #=> 12]}}
|
137
|
+
#
|
138
|
+
# @param value<String> The value that is being typecast.
|
139
|
+
#
|
140
|
+
# @details [:type options]
|
141
|
+
# "integer"::
|
142
|
+
# converts +value+ to an integer with #to_i
|
143
|
+
# "boolean"::
|
144
|
+
# checks whether +value+, after removing spaces, is the literal
|
145
|
+
# "true"
|
146
|
+
# "datetime"::
|
147
|
+
# Parses +value+ using Time.parse, and returns a UTC Time
|
148
|
+
# "date"::
|
149
|
+
# Parses +value+ using Date.parse
|
150
|
+
#
|
151
|
+
# @return <Integer, TrueClass, FalseClass, Time, Date, Object>
|
152
|
+
# The result of typecasting +value+.
|
153
|
+
#
|
154
|
+
# @note
|
155
|
+
# If +self+ does not have a "type" key, or if it's not one of the
|
156
|
+
# options specified above, the raw +value+ will be returned.
|
157
|
+
def typecast_value(value)
|
158
|
+
return value unless @type
|
159
|
+
proc = self.class.typecasts[@type]
|
160
|
+
proc.nil? ? value : proc.call(value)
|
161
|
+
end
|
162
|
+
|
163
|
+
# Take keys of the form foo-bar and convert them to foo_bar
|
164
|
+
def undasherize_keys(params)
|
165
|
+
params.keys.each do |key, value|
|
166
|
+
params[key.tr("-", "_")] = params.delete(key)
|
167
|
+
end
|
168
|
+
params
|
169
|
+
end
|
170
|
+
|
171
|
+
# Get the inner_html of the REXML node.
|
172
|
+
def inner_html
|
173
|
+
@children.join
|
174
|
+
end
|
175
|
+
|
176
|
+
# Converts the node into a readable HTML node.
|
177
|
+
#
|
178
|
+
# @return <String> The HTML node in text form.
|
179
|
+
def to_html
|
180
|
+
attributes.merge!(:type => @type ) if @type
|
181
|
+
"<#{name}#{Crack::Util.to_xml_attributes(attributes)}>#{@nil_element ? '' : inner_html}</#{name}>"
|
182
|
+
end
|
183
|
+
|
184
|
+
# @alias #to_html #to_s
|
185
|
+
def to_s
|
186
|
+
to_html
|
187
|
+
end
|
188
|
+
|
189
|
+
private
|
190
|
+
|
191
|
+
def unnormalize_xml_entities value
|
192
|
+
REXML::Text.unnormalize(value)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
module Crack
|
197
|
+
class REXMLParser
|
198
|
+
def self.parse(xml)
|
199
|
+
stack = []
|
200
|
+
parser = REXML::Parsers::BaseParser.new(xml)
|
201
|
+
|
202
|
+
while true
|
203
|
+
event = parser.pull
|
204
|
+
case event[0]
|
205
|
+
when :end_document
|
206
|
+
break
|
207
|
+
when :end_doctype, :start_doctype
|
208
|
+
# do nothing
|
209
|
+
when :start_element
|
210
|
+
stack.push REXMLUtilityNode.new(event[1], event[2])
|
211
|
+
when :end_element
|
212
|
+
if stack.size > 1
|
213
|
+
temp = stack.pop
|
214
|
+
stack.last.add_node(temp)
|
215
|
+
end
|
216
|
+
when :text, :cdata
|
217
|
+
stack.last.add_node(event[1]) unless event[1].strip.length == 0 || stack.empty?
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
stack.length > 0 ? stack.pop.to_hash : {}
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
class XML
|
226
|
+
def self.parser
|
227
|
+
@@parser ||= REXMLParser
|
228
|
+
end
|
229
|
+
|
230
|
+
def self.parser=(parser)
|
231
|
+
@@parser = parser
|
232
|
+
end
|
233
|
+
|
234
|
+
def self.parse(xml)
|
235
|
+
parser.parse(xml)
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|