wallee-ruby-sdk 3.0.5 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1214) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile.lock +35 -0
  3. data/LICENSE +1 -1
  4. data/README.md +0 -2
  5. data/lib/wallee-ruby-sdk/api/analytics_query_service_api.rb +381 -0
  6. data/lib/wallee-ruby-sdk/api/charge_flow_service_api.rb +126 -0
  7. data/lib/wallee-ruby-sdk/api/invoice_reconciliation_record_invoice_link_service_api.rb +351 -0
  8. data/lib/wallee-ruby-sdk/api/invoice_reconciliation_record_service_api.rb +399 -0
  9. data/lib/wallee-ruby-sdk/api/invoice_reimbursement_service_api.rb +348 -0
  10. data/lib/wallee-ruby-sdk/api/payment_terminal_service_api.rb +253 -0
  11. data/lib/wallee-ruby-sdk/api/payment_terminal_till_service_api.rb +2 -2
  12. data/lib/wallee-ruby-sdk/api/payment_terminal_transaction_summary_service_api.rb +275 -0
  13. data/lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb +587 -0
  14. data/lib/wallee-ruby-sdk/api/transaction_line_item_version_service_api.rb +275 -0
  15. data/lib/wallee-ruby-sdk/api/transaction_service_api.rb +2 -64
  16. data/lib/wallee-ruby-sdk/models/abstract_transaction_pending.rb +11 -11
  17. data/lib/wallee-ruby-sdk/models/analytics_query.rb +272 -0
  18. data/lib/wallee-ruby-sdk/models/analytics_query_execution.rb +293 -0
  19. data/lib/wallee-ruby-sdk/models/analytics_query_execution_state.rb +37 -0
  20. data/lib/wallee-ruby-sdk/models/analytics_query_result_batch.rb +225 -0
  21. data/lib/wallee-ruby-sdk/models/analytics_schema_column.rb +263 -0
  22. data/lib/wallee-ruby-sdk/models/analytics_schema_table.rb +215 -0
  23. data/lib/wallee-ruby-sdk/models/charge_attempt.rb +11 -1
  24. data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record.rb +571 -0
  25. data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record_invoice_link.rb +241 -0
  26. data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record_rejection_status.rb +36 -0
  27. data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record_state.rb +38 -0
  28. data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record_type.rb +215 -0
  29. data/lib/wallee-ruby-sdk/models/invoice_reimbursement.rb +391 -0
  30. data/lib/wallee-ruby-sdk/models/invoice_reimbursement_state.rb +38 -0
  31. data/lib/wallee-ruby-sdk/models/invoice_reimbursement_with_refund_reference.rb +401 -0
  32. data/lib/wallee-ruby-sdk/models/line_item_type.rb +1 -0
  33. data/lib/wallee-ruby-sdk/models/payment_app_charge_attempt_target_state.rb +35 -0
  34. data/lib/wallee-ruby-sdk/models/payment_app_charge_attempt_update_request.rb +261 -0
  35. data/lib/wallee-ruby-sdk/models/payment_app_completion_configuration.rb +231 -0
  36. data/lib/wallee-ruby-sdk/models/payment_app_completion_configuration_create.rb +231 -0
  37. data/lib/wallee-ruby-sdk/models/payment_app_completion_target_state.rb +35 -0
  38. data/lib/wallee-ruby-sdk/models/payment_app_completion_update_request.rb +236 -0
  39. data/lib/wallee-ruby-sdk/models/payment_app_connector.rb +351 -0
  40. data/lib/wallee-ruby-sdk/models/payment_app_connector_creation_request.rb +366 -0
  41. data/lib/wallee-ruby-sdk/models/payment_app_connector_state.rb +35 -0
  42. data/lib/wallee-ruby-sdk/models/payment_app_processor.rb +386 -0
  43. data/lib/wallee-ruby-sdk/models/payment_app_processor_creation_request.rb +317 -0
  44. data/lib/wallee-ruby-sdk/models/payment_app_processor_state.rb +35 -0
  45. data/lib/wallee-ruby-sdk/models/payment_app_refund_configuration.rb +211 -0
  46. data/lib/wallee-ruby-sdk/models/payment_app_refund_configuration_create.rb +211 -0
  47. data/lib/wallee-ruby-sdk/models/payment_app_refund_target_state.rb +35 -0
  48. data/lib/wallee-ruby-sdk/models/payment_app_refund_update_request.rb +236 -0
  49. data/lib/wallee-ruby-sdk/models/payment_app_void_target_state.rb +35 -0
  50. data/lib/wallee-ruby-sdk/models/payment_app_void_update_request.rb +236 -0
  51. data/lib/wallee-ruby-sdk/models/payment_initiation_advice_file.rb +251 -0
  52. data/lib/wallee-ruby-sdk/models/payment_initiation_advice_file_state.rb +35 -0
  53. data/lib/wallee-ruby-sdk/models/payment_processor_configuration.rb +11 -1
  54. data/lib/wallee-ruby-sdk/models/payment_terminal.rb +11 -1
  55. data/lib/wallee-ruby-sdk/models/payment_terminal_dcc_transaction_sum.rb +261 -0
  56. data/lib/wallee-ruby-sdk/models/payment_terminal_location.rb +8 -8
  57. data/lib/wallee-ruby-sdk/models/payment_terminal_location_version.rb +11 -1
  58. data/lib/wallee-ruby-sdk/models/payment_terminal_state.rb +1 -0
  59. data/lib/wallee-ruby-sdk/models/payment_terminal_transaction_sum.rb +291 -0
  60. data/lib/wallee-ruby-sdk/models/payment_terminal_transaction_summary.rb +285 -0
  61. data/lib/wallee-ruby-sdk/models/payment_terminal_transaction_summary_fetch_request.rb +221 -0
  62. data/lib/wallee-ruby-sdk/models/{transaction_line_item_update_request.rb → rendered_terminal_transaction_summary.rb} +17 -22
  63. data/lib/wallee-ruby-sdk/models/shopify_subscriber.rb +30 -0
  64. data/lib/wallee-ruby-sdk/models/shopify_subscriber_active.rb +30 -0
  65. data/lib/wallee-ruby-sdk/models/space_address.rb +51 -1
  66. data/lib/wallee-ruby-sdk/models/space_address_create.rb +51 -1
  67. data/lib/wallee-ruby-sdk/models/subscription_product_component.rb +1 -1
  68. data/lib/wallee-ruby-sdk/models/subscription_product_component_update.rb +1 -1
  69. data/lib/wallee-ruby-sdk/models/subscription_product_version_retirement.rb +1 -1
  70. data/lib/wallee-ruby-sdk/models/subscription_product_version_retirement_create.rb +1 -1
  71. data/lib/wallee-ruby-sdk/models/transaction.rb +26 -16
  72. data/lib/wallee-ruby-sdk/models/transaction_create.rb +12 -12
  73. data/lib/wallee-ruby-sdk/models/transaction_line_item_version.rb +93 -1
  74. data/lib/wallee-ruby-sdk/models/transaction_line_item_version_create.rb +228 -0
  75. data/lib/wallee-ruby-sdk/models/transaction_line_item_version_state.rb +38 -0
  76. data/lib/wallee-ruby-sdk/models/transaction_pending.rb +11 -11
  77. data/lib/wallee-ruby-sdk/version.rb +1 -1
  78. data/lib/wallee-ruby-sdk.rb +48 -1
  79. data/vendor/bundle/ruby/2.4.0/bin/rake +22 -0
  80. data/vendor/bundle/ruby/2.4.0/cache/addressable-2.8.0.gem +0 -0
  81. data/vendor/bundle/ruby/2.4.0/cache/ethon-0.15.0.gem +0 -0
  82. data/vendor/bundle/ruby/2.4.0/cache/ffi-1.15.5.gem +0 -0
  83. data/vendor/bundle/ruby/2.4.0/cache/json-2.6.2.gem +0 -0
  84. data/vendor/bundle/ruby/2.4.0/cache/power_assert-2.0.1.gem +0 -0
  85. data/vendor/bundle/ruby/2.4.0/cache/public_suffix-4.0.7.gem +0 -0
  86. data/vendor/bundle/ruby/2.4.0/cache/rake-12.3.3.gem +0 -0
  87. data/vendor/bundle/ruby/2.4.0/cache/test-unit-3.2.9.gem +0 -0
  88. data/vendor/bundle/ruby/2.4.0/cache/typhoeus-1.4.0.gem +0 -0
  89. data/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/ffi-1.15.5/ffi_c.so +0 -0
  90. data/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/ffi-1.15.5/gem.build_complete +0 -0
  91. data/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/ffi-1.15.5/gem_make.out +370 -0
  92. data/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/ffi-1.15.5/mkmf.log +405 -0
  93. data/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/json-2.6.2/gem.build_complete +0 -0
  94. data/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/json-2.6.2/gem_make.out +13 -0
  95. data/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/json-2.6.2/json/ext/generator.so +0 -0
  96. data/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/json-2.6.2/json/ext/parser.so +0 -0
  97. data/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/json-2.6.2/mkmf.log +203 -0
  98. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/CHANGELOG.md +246 -0
  99. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/Gemfile +28 -0
  100. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/LICENSE.txt +202 -0
  101. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/README.md +121 -0
  102. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/Rakefile +34 -0
  103. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/addressable.gemspec +37 -0
  104. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/data/unicode.data +0 -0
  105. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/lib/addressable/idna/native.rb +61 -0
  106. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/lib/addressable/idna/pure.rb +678 -0
  107. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/lib/addressable/idna.rb +27 -0
  108. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/lib/addressable/template.rb +1031 -0
  109. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/lib/addressable/uri.rb +2556 -0
  110. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/lib/addressable/version.rb +32 -0
  111. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/lib/addressable.rb +4 -0
  112. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/spec/addressable/idna_spec.rb +302 -0
  113. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/spec/addressable/net_http_compat_spec.rb +30 -0
  114. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/spec/addressable/security_spec.rb +59 -0
  115. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/spec/addressable/template_spec.rb +1460 -0
  116. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/spec/addressable/uri_spec.rb +6665 -0
  117. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/spec/spec_helper.rb +33 -0
  118. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/tasks/clobber.rake +4 -0
  119. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/tasks/gem.rake +92 -0
  120. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/tasks/git.rake +47 -0
  121. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/tasks/metrics.rake +24 -0
  122. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/tasks/profile.rake +72 -0
  123. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/tasks/rspec.rake +23 -0
  124. data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/tasks/yard.rake +29 -0
  125. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/.github/workflows/ruby.yml +41 -0
  126. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/.gitignore +8 -0
  127. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/.rspec +3 -0
  128. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/CHANGELOG.md +372 -0
  129. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/Gemfile +43 -0
  130. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/Guardfile +10 -0
  131. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/LICENSE +20 -0
  132. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/README.md +95 -0
  133. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/Rakefile +40 -0
  134. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/ethon.gemspec +26 -0
  135. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/curl.rb +90 -0
  136. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/curls/classes.rb +55 -0
  137. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/curls/codes.rb +122 -0
  138. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/curls/constants.rb +80 -0
  139. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/curls/form_options.rb +37 -0
  140. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/curls/functions.rb +58 -0
  141. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/curls/infos.rb +151 -0
  142. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/curls/messages.rb +19 -0
  143. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/curls/options.rb +502 -0
  144. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/curls/settings.rb +12 -0
  145. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/callbacks.rb +148 -0
  146. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/debug_info.rb +47 -0
  147. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/features.rb +31 -0
  148. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/form.rb +107 -0
  149. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/header.rb +61 -0
  150. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/http/actionable.rb +157 -0
  151. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/http/custom.rb +29 -0
  152. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/http/delete.rb +25 -0
  153. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/http/get.rb +24 -0
  154. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/http/head.rb +24 -0
  155. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/http/options.rb +24 -0
  156. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/http/patch.rb +24 -0
  157. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/http/post.rb +26 -0
  158. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/http/postable.rb +32 -0
  159. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/http/put.rb +27 -0
  160. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/http/putable.rb +25 -0
  161. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/http.rb +68 -0
  162. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/informations.rb +113 -0
  163. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/mirror.rb +36 -0
  164. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/operations.rb +64 -0
  165. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/options.rb +50 -0
  166. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/params.rb +29 -0
  167. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/queryable.rb +154 -0
  168. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/response_callbacks.rb +131 -0
  169. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy/util.rb +28 -0
  170. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/easy.rb +315 -0
  171. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/errors/ethon_error.rb +9 -0
  172. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/errors/global_init.rb +13 -0
  173. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/errors/invalid_option.rb +13 -0
  174. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/errors/invalid_value.rb +13 -0
  175. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/errors/multi_add.rb +12 -0
  176. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/errors/multi_fdset.rb +12 -0
  177. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/errors/multi_remove.rb +12 -0
  178. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/errors/multi_timeout.rb +13 -0
  179. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/errors/select.rb +13 -0
  180. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/errors.rb +17 -0
  181. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/libc.rb +21 -0
  182. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/loggable.rb +59 -0
  183. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/multi/operations.rb +228 -0
  184. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/multi/options.rb +117 -0
  185. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/multi/stack.rb +49 -0
  186. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/multi.rb +126 -0
  187. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon/version.rb +6 -0
  188. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/lib/ethon.rb +36 -0
  189. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/profile/benchmarks.rb +104 -0
  190. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/profile/memory_leaks.rb +114 -0
  191. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/profile/perf_spec_helper.rb +37 -0
  192. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/profile/support/memory_test_helpers.rb +76 -0
  193. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/profile/support/os_memory_leak_tracker.rb +48 -0
  194. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/profile/support/ruby_object_leak_tracker.rb +49 -0
  195. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/curl_spec.rb +38 -0
  196. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/callbacks_spec.rb +59 -0
  197. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/debug_info_spec.rb +54 -0
  198. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/features_spec.rb +24 -0
  199. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/form_spec.rb +104 -0
  200. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/header_spec.rb +79 -0
  201. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/http/custom_spec.rb +177 -0
  202. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/http/delete_spec.rb +21 -0
  203. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/http/get_spec.rb +126 -0
  204. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/http/head_spec.rb +80 -0
  205. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/http/options_spec.rb +51 -0
  206. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/http/patch_spec.rb +51 -0
  207. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/http/post_spec.rb +317 -0
  208. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/http/put_spec.rb +168 -0
  209. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/http_spec.rb +64 -0
  210. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/informations_spec.rb +120 -0
  211. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/mirror_spec.rb +47 -0
  212. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/operations_spec.rb +268 -0
  213. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/options_spec.rb +193 -0
  214. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/queryable_spec.rb +235 -0
  215. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/response_callbacks_spec.rb +152 -0
  216. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy/util_spec.rb +28 -0
  217. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/easy_spec.rb +203 -0
  218. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/libc_spec.rb +14 -0
  219. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/loggable_spec.rb +22 -0
  220. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/multi/operations_spec.rb +298 -0
  221. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/multi/options_spec.rb +182 -0
  222. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/multi/stack_spec.rb +80 -0
  223. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/ethon/multi_spec.rb +152 -0
  224. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/spec_helper.rb +28 -0
  225. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/support/localhost_server.rb +95 -0
  226. data/vendor/bundle/ruby/2.4.0/gems/ethon-0.15.0/spec/support/server.rb +115 -0
  227. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/CHANGELOG.md +338 -0
  228. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/COPYING +49 -0
  229. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/Gemfile +14 -0
  230. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/LICENSE +24 -0
  231. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/LICENSE.SPECS +22 -0
  232. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/README.md +136 -0
  233. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/Rakefile +191 -0
  234. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/.sitearchdir.time +0 -0
  235. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/AbstractMemory.c +1104 -0
  236. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/AbstractMemory.h +175 -0
  237. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/AbstractMemory.o +0 -0
  238. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/ArrayType.c +162 -0
  239. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/ArrayType.h +59 -0
  240. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/ArrayType.o +0 -0
  241. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Buffer.c +360 -0
  242. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Buffer.o +0 -0
  243. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Call.c +487 -0
  244. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Call.h +107 -0
  245. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Call.o +0 -0
  246. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/ClosurePool.c +333 -0
  247. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/ClosurePool.h +59 -0
  248. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/ClosurePool.o +0 -0
  249. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/DynamicLibrary.c +334 -0
  250. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/DynamicLibrary.h +98 -0
  251. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/DynamicLibrary.o +0 -0
  252. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Function.c +917 -0
  253. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Function.h +83 -0
  254. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Function.o +0 -0
  255. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/FunctionInfo.c +266 -0
  256. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/FunctionInfo.o +0 -0
  257. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/LastError.c +225 -0
  258. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/LastError.h +47 -0
  259. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/LastError.o +0 -0
  260. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/LongDouble.c +65 -0
  261. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/LongDouble.h +47 -0
  262. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/LongDouble.o +0 -0
  263. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Makefile +263 -0
  264. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/MappedType.c +168 -0
  265. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/MappedType.h +59 -0
  266. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/MappedType.o +0 -0
  267. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/MemoryPointer.c +192 -0
  268. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/MemoryPointer.h +49 -0
  269. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/MemoryPointer.o +0 -0
  270. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/MethodHandle.c +348 -0
  271. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/MethodHandle.h +56 -0
  272. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/MethodHandle.o +0 -0
  273. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Platform.c +78 -0
  274. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Platform.h +45 -0
  275. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Platform.o +0 -0
  276. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Pointer.c +507 -0
  277. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Pointer.h +59 -0
  278. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Pointer.o +0 -0
  279. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Struct.c +822 -0
  280. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Struct.h +112 -0
  281. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Struct.o +0 -0
  282. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/StructByValue.c +145 -0
  283. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/StructByValue.h +55 -0
  284. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/StructByValue.o +0 -0
  285. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/StructLayout.c +700 -0
  286. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/StructLayout.o +0 -0
  287. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Thread.c +129 -0
  288. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Thread.h +76 -0
  289. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Thread.o +0 -0
  290. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Type.c +379 -0
  291. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Type.h +61 -0
  292. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Type.o +0 -0
  293. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Types.c +138 -0
  294. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Types.h +88 -0
  295. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Types.o +0 -0
  296. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Variadic.c +303 -0
  297. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Variadic.o +0 -0
  298. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/compat.h +82 -0
  299. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/extconf.h +8 -0
  300. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/extconf.rb +98 -0
  301. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/ffi.c +93 -0
  302. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/ffi.o +0 -0
  303. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/ffi_c.so +0 -0
  304. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/.appveyor.yml +66 -0
  305. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/.gitattributes +4 -0
  306. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/.github/issue_template.md +10 -0
  307. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/.gitignore +38 -0
  308. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/.travis/ar-lib +270 -0
  309. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/.travis/bfin-sim.exp +58 -0
  310. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/.travis/build-cross-in-container.sh +14 -0
  311. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/.travis/build-in-container.sh +12 -0
  312. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/.travis/build.sh +142 -0
  313. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/.travis/compile +351 -0
  314. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/.travis/install.sh +71 -0
  315. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/.travis/m32r-sim.exp +58 -0
  316. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/.travis/moxie-sim.exp +60 -0
  317. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/.travis/or1k-sim.exp +58 -0
  318. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/.travis/powerpc-eabisim.exp +58 -0
  319. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/.travis/site.exp +27 -0
  320. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/.travis/wine-sim.exp +55 -0
  321. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/.travis.yml +83 -0
  322. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/ChangeLog.old +7407 -0
  323. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/LICENSE +21 -0
  324. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/LICENSE-BUILDTOOLS +353 -0
  325. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/Makefile.am +150 -0
  326. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/Makefile.in +2060 -0
  327. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/README.md +486 -0
  328. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/acinclude.m4 +479 -0
  329. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/autogen.sh +2 -0
  330. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/config.guess +1687 -0
  331. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/config.sub +1851 -0
  332. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/configure +22050 -0
  333. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/configure.ac +415 -0
  334. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/configure.host +318 -0
  335. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/doc/Makefile.am +3 -0
  336. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/doc/Makefile.in +815 -0
  337. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/doc/libffi.texi +997 -0
  338. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/doc/version.texi +4 -0
  339. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/fficonfig.h.in +223 -0
  340. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +201 -0
  341. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/include/Makefile.am +9 -0
  342. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/include/Makefile.in +608 -0
  343. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/include/ffi.h.in +523 -0
  344. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/include/ffi_cfi.h +55 -0
  345. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/include/ffi_common.h +153 -0
  346. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/install-sh +518 -0
  347. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/libffi.map.in +76 -0
  348. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/libffi.pc.in +11 -0
  349. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/libffi.xcodeproj/project.pbxproj +997 -0
  350. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/libtool-ldflags +106 -0
  351. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/libtool-version +29 -0
  352. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/ltmain.sh +11251 -0
  353. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/m4/asmcfi.m4 +13 -0
  354. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/m4/ax_append_flag.m4 +50 -0
  355. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/m4/ax_cc_maxopt.m4 +194 -0
  356. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/m4/ax_cflags_warn_all.m4 +122 -0
  357. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/m4/ax_check_compile_flag.m4 +53 -0
  358. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/m4/ax_compiler_vendor.m4 +88 -0
  359. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/m4/ax_configure_args.m4 +49 -0
  360. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/m4/ax_enable_builddir.m4 +302 -0
  361. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/m4/ax_gcc_archflag.m4 +267 -0
  362. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/m4/ax_gcc_x86_cpuid.m4 +89 -0
  363. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/m4/ax_require_defined.m4 +37 -0
  364. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/make_sunver.pl +333 -0
  365. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/man/Makefile.am +8 -0
  366. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/man/Makefile.in +562 -0
  367. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/man/ffi.3 +41 -0
  368. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/man/ffi_call.3 +103 -0
  369. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/man/ffi_prep_cif.3 +68 -0
  370. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/man/ffi_prep_cif_var.3 +73 -0
  371. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/missing +215 -0
  372. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.sln +33 -0
  373. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj +130 -0
  374. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj.filters +57 -0
  375. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj.user +4 -0
  376. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/msvc_build/aarch64/aarch64_include/ffi.h +511 -0
  377. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/msvc_build/aarch64/aarch64_include/fficonfig.h +219 -0
  378. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/msvcc.sh +353 -0
  379. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/aarch64/ffi.c +1025 -0
  380. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/aarch64/ffitarget.h +97 -0
  381. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/aarch64/internal.h +68 -0
  382. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/aarch64/sysv.S +451 -0
  383. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/aarch64/win64_armasm.S +506 -0
  384. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/alpha/ffi.c +521 -0
  385. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/alpha/ffitarget.h +57 -0
  386. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/alpha/internal.h +23 -0
  387. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/alpha/osf.S +282 -0
  388. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/arc/arcompact.S +135 -0
  389. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/arc/ffi.c +266 -0
  390. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/arc/ffitarget.h +53 -0
  391. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/arm/ffi.c +876 -0
  392. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/arm/ffitarget.h +89 -0
  393. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/arm/internal.h +7 -0
  394. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/arm/sysv.S +385 -0
  395. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/arm/sysv_msvc_arm32.S +311 -0
  396. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/avr32/ffi.c +423 -0
  397. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/avr32/ffitarget.h +55 -0
  398. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/avr32/sysv.S +208 -0
  399. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/bfin/ffi.c +196 -0
  400. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/bfin/ffitarget.h +43 -0
  401. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/bfin/sysv.S +179 -0
  402. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/closures.c +1021 -0
  403. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/cris/ffi.c +386 -0
  404. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/cris/ffitarget.h +56 -0
  405. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/cris/sysv.S +215 -0
  406. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/csky/ffi.c +395 -0
  407. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/csky/ffitarget.h +63 -0
  408. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/csky/sysv.S +371 -0
  409. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/debug.c +64 -0
  410. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/dlmalloc.c +5166 -0
  411. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/frv/eabi.S +128 -0
  412. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/frv/ffi.c +292 -0
  413. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/frv/ffitarget.h +62 -0
  414. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/ia64/ffi.c +604 -0
  415. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/ia64/ffitarget.h +56 -0
  416. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/ia64/ia64_flags.h +40 -0
  417. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/ia64/unix.S +567 -0
  418. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/java_raw_api.c +374 -0
  419. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/kvx/asm.h +5 -0
  420. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/kvx/ffi.c +273 -0
  421. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/kvx/ffitarget.h +75 -0
  422. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/kvx/sysv.S +127 -0
  423. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/m32r/ffi.c +232 -0
  424. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/m32r/ffitarget.h +53 -0
  425. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/m32r/sysv.S +121 -0
  426. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/m68k/ffi.c +362 -0
  427. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/m68k/ffitarget.h +54 -0
  428. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/m68k/sysv.S +357 -0
  429. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/m88k/ffi.c +400 -0
  430. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/m88k/ffitarget.h +49 -0
  431. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/m88k/obsd.S +209 -0
  432. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/metag/ffi.c +330 -0
  433. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/metag/ffitarget.h +53 -0
  434. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/metag/sysv.S +311 -0
  435. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/microblaze/ffi.c +321 -0
  436. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/microblaze/ffitarget.h +53 -0
  437. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/microblaze/sysv.S +302 -0
  438. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/mips/ffi.c +1134 -0
  439. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/mips/ffitarget.h +244 -0
  440. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/mips/n32.S +663 -0
  441. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/mips/o32.S +504 -0
  442. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/moxie/eabi.S +101 -0
  443. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/moxie/ffi.c +285 -0
  444. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/moxie/ffitarget.h +52 -0
  445. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/nios2/ffi.c +304 -0
  446. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/nios2/ffitarget.h +52 -0
  447. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/nios2/sysv.S +136 -0
  448. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/or1k/ffi.c +328 -0
  449. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/or1k/ffitarget.h +58 -0
  450. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/or1k/sysv.S +107 -0
  451. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/pa/ffi.c +674 -0
  452. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/pa/ffitarget.h +80 -0
  453. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/pa/hpux32.S +370 -0
  454. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/pa/linux.S +380 -0
  455. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/powerpc/aix.S +566 -0
  456. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/powerpc/aix_closure.S +694 -0
  457. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/powerpc/asm.h +125 -0
  458. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/powerpc/darwin.S +378 -0
  459. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/powerpc/darwin_closure.S +571 -0
  460. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/powerpc/ffi.c +175 -0
  461. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +1452 -0
  462. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +1153 -0
  463. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/powerpc/ffi_powerpc.h +105 -0
  464. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/powerpc/ffi_sysv.c +923 -0
  465. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/powerpc/ffitarget.h +204 -0
  466. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/powerpc/linux64.S +291 -0
  467. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +564 -0
  468. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/powerpc/ppc_closure.S +397 -0
  469. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/powerpc/sysv.S +173 -0
  470. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/prep_cif.c +263 -0
  471. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/raw_api.c +267 -0
  472. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/riscv/ffi.c +481 -0
  473. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/riscv/ffitarget.h +69 -0
  474. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/riscv/sysv.S +293 -0
  475. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/s390/ffi.c +756 -0
  476. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/s390/ffitarget.h +70 -0
  477. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/s390/internal.h +11 -0
  478. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/s390/sysv.S +325 -0
  479. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/sh/ffi.c +717 -0
  480. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/sh/ffitarget.h +54 -0
  481. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/sh/sysv.S +850 -0
  482. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/sh64/ffi.c +469 -0
  483. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/sh64/ffitarget.h +58 -0
  484. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/sh64/sysv.S +539 -0
  485. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/sparc/ffi.c +468 -0
  486. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/sparc/ffi64.c +608 -0
  487. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/sparc/ffitarget.h +81 -0
  488. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/sparc/internal.h +26 -0
  489. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/sparc/v8.S +443 -0
  490. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/sparc/v9.S +440 -0
  491. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/tile/ffi.c +355 -0
  492. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/tile/ffitarget.h +65 -0
  493. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/tile/tile.S +360 -0
  494. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/types.c +108 -0
  495. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/vax/elfbsd.S +195 -0
  496. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/vax/ffi.c +276 -0
  497. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/vax/ffitarget.h +49 -0
  498. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/x86/asmnames.h +30 -0
  499. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/x86/ffi.c +770 -0
  500. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/x86/ffi64.c +895 -0
  501. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/x86/ffitarget.h +160 -0
  502. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/x86/ffiw64.c +318 -0
  503. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/x86/internal.h +29 -0
  504. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/x86/internal64.h +22 -0
  505. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/x86/sysv.S +1138 -0
  506. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/x86/sysv_intel.S +995 -0
  507. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/x86/unix64.S +621 -0
  508. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/x86/win64.S +241 -0
  509. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/x86/win64_intel.S +238 -0
  510. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/xtensa/ffi.c +298 -0
  511. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/xtensa/ffitarget.h +53 -0
  512. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/src/xtensa/sysv.S +258 -0
  513. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/stamp-h.in +1 -0
  514. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/Makefile.am +122 -0
  515. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/Makefile.in +648 -0
  516. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/config/default.exp +1 -0
  517. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/lib/libffi.exp +660 -0
  518. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/lib/target-libpath.exp +283 -0
  519. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/lib/wrapper.exp +45 -0
  520. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.bhaible/Makefile +28 -0
  521. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.bhaible/README +78 -0
  522. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.bhaible/alignof.h +50 -0
  523. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.bhaible/bhaible.exp +63 -0
  524. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-call.c +1745 -0
  525. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-callback.c +2885 -0
  526. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.bhaible/testcases.c +743 -0
  527. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/align_mixed.c +46 -0
  528. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/align_stdcall.c +46 -0
  529. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +54 -0
  530. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/err_bad_typedef.c +26 -0
  531. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +138 -0
  532. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/float.c +59 -0
  533. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/float1.c +60 -0
  534. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/float2.c +61 -0
  535. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/float3.c +74 -0
  536. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/float4.c +62 -0
  537. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/float_va.c +107 -0
  538. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/many.c +59 -0
  539. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/many2.c +57 -0
  540. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/many_double.c +70 -0
  541. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/many_mixed.c +78 -0
  542. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/negint.c +52 -0
  543. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/offsets.c +46 -0
  544. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/pr1172638.c +127 -0
  545. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/promotion.c +59 -0
  546. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/pyobjc-tc.c +114 -0
  547. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl.c +36 -0
  548. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl1.c +43 -0
  549. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl2.c +42 -0
  550. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/return_fl.c +35 -0
  551. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/return_fl1.c +36 -0
  552. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/return_fl2.c +49 -0
  553. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/return_fl3.c +42 -0
  554. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/return_ldl.c +34 -0
  555. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c +41 -0
  556. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/return_ll1.c +43 -0
  557. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/return_sc.c +36 -0
  558. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/return_sl.c +38 -0
  559. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/return_uc.c +38 -0
  560. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/return_ul.c +38 -0
  561. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/strlen.c +44 -0
  562. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/strlen2.c +49 -0
  563. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/strlen3.c +49 -0
  564. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/strlen4.c +55 -0
  565. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/struct1.c +67 -0
  566. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/struct10.c +57 -0
  567. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/struct2.c +67 -0
  568. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/struct3.c +60 -0
  569. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/struct4.c +64 -0
  570. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/struct5.c +66 -0
  571. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/struct6.c +64 -0
  572. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/struct7.c +74 -0
  573. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/struct8.c +81 -0
  574. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/struct9.c +68 -0
  575. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/uninitialized.c +61 -0
  576. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/va_1.c +196 -0
  577. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/va_struct1.c +121 -0
  578. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/va_struct2.c +123 -0
  579. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.call/va_struct3.c +125 -0
  580. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/closure.exp +67 -0
  581. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn0.c +89 -0
  582. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn1.c +81 -0
  583. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn2.c +81 -0
  584. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn3.c +82 -0
  585. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn4.c +89 -0
  586. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn5.c +92 -0
  587. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn6.c +90 -0
  588. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/closure_loc_fn0.c +95 -0
  589. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/closure_simple.c +55 -0
  590. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_12byte.c +94 -0
  591. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_16byte.c +95 -0
  592. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_18byte.c +96 -0
  593. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_19byte.c +102 -0
  594. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_1_1byte.c +89 -0
  595. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_20byte.c +91 -0
  596. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_20byte1.c +93 -0
  597. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_24byte.c +113 -0
  598. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_2byte.c +90 -0
  599. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3_1byte.c +95 -0
  600. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3byte1.c +90 -0
  601. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3byte2.c +90 -0
  602. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3float.c +95 -0
  603. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_4_1byte.c +98 -0
  604. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_4byte.c +90 -0
  605. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_5_1_byte.c +109 -0
  606. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_5byte.c +98 -0
  607. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_64byte.c +124 -0
  608. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_6_1_byte.c +113 -0
  609. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_6byte.c +99 -0
  610. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_7_1_byte.c +117 -0
  611. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_7byte.c +97 -0
  612. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_8byte.c +88 -0
  613. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_9byte1.c +90 -0
  614. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_9byte2.c +91 -0
  615. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_double.c +93 -0
  616. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_float.c +91 -0
  617. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_longdouble.c +92 -0
  618. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_longdouble_split.c +132 -0
  619. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_longdouble_split2.c +115 -0
  620. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_pointer.c +95 -0
  621. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_sint16.c +91 -0
  622. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_sint32.c +91 -0
  623. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_sint64.c +92 -0
  624. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_uint16.c +91 -0
  625. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_uint32.c +91 -0
  626. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_uint64.c +93 -0
  627. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_dbls_struct.c +66 -0
  628. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_double.c +43 -0
  629. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_double_va.c +61 -0
  630. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_float.c +42 -0
  631. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_longdouble.c +105 -0
  632. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_longdouble_va.c +61 -0
  633. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_many_mixed_args.c +70 -0
  634. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_many_mixed_float_double.c +55 -0
  635. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_schar.c +74 -0
  636. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_sshort.c +74 -0
  637. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_sshortchar.c +86 -0
  638. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_uchar.c +91 -0
  639. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_ushort.c +74 -0
  640. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_ushortchar.c +86 -0
  641. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_pointer.c +74 -0
  642. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_pointer_stack.c +142 -0
  643. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_schar.c +44 -0
  644. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_sint.c +42 -0
  645. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_sshort.c +42 -0
  646. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_struct_va1.c +114 -0
  647. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uchar.c +42 -0
  648. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uchar_va.c +44 -0
  649. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uint.c +43 -0
  650. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uint_va.c +45 -0
  651. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ulong_va.c +45 -0
  652. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ulonglong.c +47 -0
  653. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ushort.c +43 -0
  654. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ushort_va.c +44 -0
  655. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/err_bad_abi.c +36 -0
  656. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/ffitest.h +138 -0
  657. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/huge_struct.c +343 -0
  658. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct.c +152 -0
  659. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct1.c +161 -0
  660. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct10.c +134 -0
  661. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct11.c +121 -0
  662. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct2.c +110 -0
  663. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct3.c +111 -0
  664. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct4.c +111 -0
  665. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct5.c +112 -0
  666. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct6.c +131 -0
  667. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct7.c +111 -0
  668. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct8.c +131 -0
  669. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct9.c +131 -0
  670. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/problem1.c +90 -0
  671. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/stret_large.c +145 -0
  672. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/stret_large2.c +148 -0
  673. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/stret_medium.c +124 -0
  674. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/stret_medium2.c +125 -0
  675. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/testclosure.c +70 -0
  676. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/unwindtest.cc +117 -0
  677. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.closures/unwindtest_ffi_call.cc +54 -0
  678. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex.inc +91 -0
  679. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_double.c +10 -0
  680. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_float.c +10 -0
  681. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_longdouble.c +10 -0
  682. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex.inc +42 -0
  683. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_double.c +10 -0
  684. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_float.c +10 -0
  685. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_longdouble.c +10 -0
  686. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct.inc +71 -0
  687. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_double.c +10 -0
  688. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_float.c +10 -0
  689. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_longdouble.c +10 -0
  690. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va.inc +80 -0
  691. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_double.c +10 -0
  692. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_float.c +16 -0
  693. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_longdouble.c +10 -0
  694. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/complex.exp +36 -0
  695. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/complex.inc +51 -0
  696. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_double.inc +7 -0
  697. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_float.inc +7 -0
  698. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_longdouble.inc +7 -0
  699. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/complex_double.c +10 -0
  700. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/complex_float.c +10 -0
  701. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/complex_int.c +86 -0
  702. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/complex_longdouble.c +10 -0
  703. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/ffitest.h +1 -0
  704. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex.inc +78 -0
  705. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_double.c +10 -0
  706. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_float.c +10 -0
  707. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_longdouble.c +10 -0
  708. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex.inc +37 -0
  709. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1.inc +41 -0
  710. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_double.c +10 -0
  711. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_float.c +10 -0
  712. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_longdouble.c +10 -0
  713. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2.inc +44 -0
  714. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_double.c +10 -0
  715. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_float.c +10 -0
  716. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_longdouble.c +10 -0
  717. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_double.c +10 -0
  718. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_float.c +10 -0
  719. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_longdouble.c +10 -0
  720. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.go/aa-direct.c +34 -0
  721. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c +28 -0
  722. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.go/ffitest.h +1 -0
  723. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.go/go.exp +36 -0
  724. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi/testsuite/libffi.go/static-chain.h +19 -0
  725. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi.bsd.mk +40 -0
  726. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi.darwin.mk +105 -0
  727. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi.gnu.mk +32 -0
  728. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi.mk +18 -0
  729. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi.vc.mk +26 -0
  730. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/libffi.vc64.mk +26 -0
  731. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/rbffi.h +55 -0
  732. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/rbffi_endian.h +59 -0
  733. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ffi.gemspec +42 -0
  734. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/abstract_memory.rb +44 -0
  735. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/autopointer.rb +203 -0
  736. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/buffer.rb +4 -0
  737. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/callback.rb +4 -0
  738. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/data_converter.rb +67 -0
  739. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/enum.rb +296 -0
  740. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/errno.rb +43 -0
  741. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/ffi.rb +47 -0
  742. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/io.rb +62 -0
  743. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/library.rb +592 -0
  744. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/managedstruct.rb +84 -0
  745. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/memorypointer.rb +1 -0
  746. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/aarch64-darwin/types.conf +130 -0
  747. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/aarch64-freebsd/types.conf +128 -0
  748. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/aarch64-freebsd12/types.conf +181 -0
  749. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/aarch64-linux/types.conf +104 -0
  750. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/aarch64-openbsd/types.conf +134 -0
  751. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/arm-freebsd/types.conf +152 -0
  752. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/arm-freebsd12/types.conf +152 -0
  753. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/arm-linux/types.conf +132 -0
  754. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/i386-cygwin/types.conf +3 -0
  755. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/i386-darwin/types.conf +100 -0
  756. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/i386-freebsd/types.conf +152 -0
  757. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/i386-freebsd12/types.conf +152 -0
  758. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/i386-gnu/types.conf +107 -0
  759. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/i386-linux/types.conf +103 -0
  760. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/i386-netbsd/types.conf +126 -0
  761. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/i386-openbsd/types.conf +128 -0
  762. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/i386-solaris/types.conf +122 -0
  763. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/i386-windows/types.conf +52 -0
  764. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/ia64-linux/types.conf +104 -0
  765. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/mips-linux/types.conf +102 -0
  766. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/mips64-linux/types.conf +104 -0
  767. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/mips64el-linux/types.conf +104 -0
  768. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/mipsel-linux/types.conf +102 -0
  769. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/mipsisa32r6-linux/types.conf +102 -0
  770. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/mipsisa32r6el-linux/types.conf +102 -0
  771. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/mipsisa64r6-linux/types.conf +104 -0
  772. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/mipsisa64r6el-linux/types.conf +104 -0
  773. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/powerpc-aix/types.conf +180 -0
  774. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/powerpc-darwin/types.conf +100 -0
  775. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/powerpc-linux/types.conf +130 -0
  776. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/powerpc-openbsd/types.conf +156 -0
  777. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/powerpc64-linux/types.conf +104 -0
  778. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/powerpc64le-linux/types.conf +100 -0
  779. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/riscv64-linux/types.conf +104 -0
  780. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/s390-linux/types.conf +102 -0
  781. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/s390x-linux/types.conf +102 -0
  782. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/sparc-linux/types.conf +102 -0
  783. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/sparc-solaris/types.conf +128 -0
  784. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/sparc64-linux/types.conf +102 -0
  785. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/sparcv9-openbsd/types.conf +156 -0
  786. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/sparcv9-solaris/types.conf +128 -0
  787. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/x86_64-cygwin/types.conf +3 -0
  788. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/x86_64-darwin/types.conf +130 -0
  789. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/x86_64-dragonflybsd/types.conf +130 -0
  790. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/x86_64-freebsd/types.conf +128 -0
  791. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/x86_64-freebsd12/types.conf +158 -0
  792. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/x86_64-haiku/types.conf +117 -0
  793. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/x86_64-linux/types.conf +132 -0
  794. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/x86_64-msys/types.conf +119 -0
  795. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/x86_64-netbsd/types.conf +128 -0
  796. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/x86_64-openbsd/types.conf +134 -0
  797. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/x86_64-solaris/types.conf +122 -0
  798. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform/x86_64-windows/types.conf +52 -0
  799. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/platform.rb +185 -0
  800. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/pointer.rb +167 -0
  801. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/struct.rb +316 -0
  802. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/struct_by_reference.rb +72 -0
  803. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/struct_layout.rb +96 -0
  804. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/struct_layout_builder.rb +227 -0
  805. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/tools/const_generator.rb +232 -0
  806. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/tools/generator.rb +105 -0
  807. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/tools/generator_task.rb +32 -0
  808. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/tools/struct_generator.rb +195 -0
  809. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/tools/types_generator.rb +137 -0
  810. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/types.rb +194 -0
  811. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/union.rb +43 -0
  812. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/variadic.rb +69 -0
  813. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi/version.rb +3 -0
  814. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi.rb +27 -0
  815. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/lib/ffi_c.so +0 -0
  816. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/rakelib/ffi_gem_helper.rb +65 -0
  817. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/samples/getlogin.rb +8 -0
  818. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/samples/getpid.rb +8 -0
  819. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/samples/gettimeofday.rb +18 -0
  820. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/samples/hello.rb +8 -0
  821. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/samples/inotify.rb +60 -0
  822. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/samples/pty.rb +75 -0
  823. data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/samples/qsort.rb +20 -0
  824. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/CHANGES.md +457 -0
  825. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/LICENSE +56 -0
  826. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/README.md +425 -0
  827. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/VERSION +1 -0
  828. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/Makefile +199 -0
  829. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/ext/fbuffer/fbuffer.h +187 -0
  830. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/ext/generator/.sitearchdir.-.json.-.ext.time +0 -0
  831. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/ext/generator/Makefile +264 -0
  832. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/ext/generator/depend +1 -0
  833. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/ext/generator/extconf.rb +4 -0
  834. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/ext/generator/generator.c +1608 -0
  835. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/ext/generator/generator.h +174 -0
  836. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/ext/generator/generator.o +0 -0
  837. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/ext/generator/generator.so +0 -0
  838. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/ext/parser/.sitearchdir.-.json.-.ext.time +0 -0
  839. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/ext/parser/Makefile +264 -0
  840. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/ext/parser/depend +1 -0
  841. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/ext/parser/extconf.rb +32 -0
  842. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/ext/parser/parser.c +3347 -0
  843. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/ext/parser/parser.h +96 -0
  844. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/ext/parser/parser.o +0 -0
  845. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/ext/parser/parser.rl +986 -0
  846. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/ext/parser/parser.so +0 -0
  847. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/extconf.rb +3 -0
  848. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/json.gemspec +67 -0
  849. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/add/bigdecimal.rb +29 -0
  850. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/add/complex.rb +28 -0
  851. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/add/core.rb +12 -0
  852. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/add/date.rb +34 -0
  853. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/add/date_time.rb +50 -0
  854. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/add/exception.rb +31 -0
  855. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/add/ostruct.rb +31 -0
  856. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/add/range.rb +29 -0
  857. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/add/rational.rb +27 -0
  858. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/add/regexp.rb +30 -0
  859. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/add/set.rb +29 -0
  860. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/add/struct.rb +30 -0
  861. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/add/symbol.rb +25 -0
  862. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/add/time.rb +38 -0
  863. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/common.rb +703 -0
  864. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/ext/generator.so +0 -0
  865. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/ext/parser.so +0 -0
  866. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/ext.rb +15 -0
  867. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/generic_object.rb +71 -0
  868. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/pure/generator.rb +479 -0
  869. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/pure/parser.rb +337 -0
  870. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/pure.rb +15 -0
  871. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json/version.rb +9 -0
  872. data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/lib/json.rb +583 -0
  873. data/vendor/bundle/ruby/2.4.0/gems/power_assert-2.0.1/.github/workflows/ci.yml +32 -0
  874. data/vendor/bundle/ruby/2.4.0/gems/power_assert-2.0.1/.gitignore +9 -0
  875. data/vendor/bundle/ruby/2.4.0/gems/power_assert-2.0.1/BSDL +22 -0
  876. data/vendor/bundle/ruby/2.4.0/gems/power_assert-2.0.1/COPYING +57 -0
  877. data/vendor/bundle/ruby/2.4.0/gems/power_assert-2.0.1/Gemfile +9 -0
  878. data/vendor/bundle/ruby/2.4.0/gems/power_assert-2.0.1/LEGAL +4 -0
  879. data/vendor/bundle/ruby/2.4.0/gems/power_assert-2.0.1/README.md +98 -0
  880. data/vendor/bundle/ruby/2.4.0/gems/power_assert-2.0.1/Rakefile +59 -0
  881. data/vendor/bundle/ruby/2.4.0/gems/power_assert-2.0.1/lib/power_assert/colorize.rb +7 -0
  882. data/vendor/bundle/ruby/2.4.0/gems/power_assert-2.0.1/lib/power_assert/configuration.rb +46 -0
  883. data/vendor/bundle/ruby/2.4.0/gems/power_assert-2.0.1/lib/power_assert/context.rb +233 -0
  884. data/vendor/bundle/ruby/2.4.0/gems/power_assert-2.0.1/lib/power_assert/enable_tracepoint_events.rb +58 -0
  885. data/vendor/bundle/ruby/2.4.0/gems/power_assert-2.0.1/lib/power_assert/inspector.rb +62 -0
  886. data/vendor/bundle/ruby/2.4.0/gems/power_assert-2.0.1/lib/power_assert/parser.rb +251 -0
  887. data/vendor/bundle/ruby/2.4.0/gems/power_assert-2.0.1/lib/power_assert/version.rb +3 -0
  888. data/vendor/bundle/ruby/2.4.0/gems/power_assert-2.0.1/lib/power_assert.rb +91 -0
  889. data/vendor/bundle/ruby/2.4.0/gems/power_assert-2.0.1/power_assert.gemspec +31 -0
  890. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/.github/FUNDING.yml +12 -0
  891. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/.github/dependabot.yml +8 -0
  892. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/.github/workflows/release.yml +16 -0
  893. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/.github/workflows/tests.yml +28 -0
  894. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/.gitignore +8 -0
  895. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/.rubocop.yml +36 -0
  896. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/.rubocop_opinionated.yml +163 -0
  897. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/.yardopts +1 -0
  898. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/2.0-Upgrade.md +52 -0
  899. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/CHANGELOG.md +417 -0
  900. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/Gemfile +14 -0
  901. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/LICENSE.txt +22 -0
  902. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/README.md +217 -0
  903. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/Rakefile +52 -0
  904. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/SECURITY.md +104 -0
  905. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/bin/console +15 -0
  906. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/data/list.txt +14035 -0
  907. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/lib/public_suffix/domain.rb +235 -0
  908. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/lib/public_suffix/errors.rb +41 -0
  909. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/lib/public_suffix/list.rb +247 -0
  910. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/lib/public_suffix/rule.rb +350 -0
  911. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/lib/public_suffix/version.rb +15 -0
  912. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/lib/public_suffix.rb +177 -0
  913. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/public_suffix.gemspec +29 -0
  914. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/.empty +2 -0
  915. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/acceptance_test.rb +131 -0
  916. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/benchmarks/bm_find.rb +66 -0
  917. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/benchmarks/bm_find_all.rb +102 -0
  918. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/benchmarks/bm_names.rb +91 -0
  919. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/benchmarks/bm_select.rb +26 -0
  920. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/benchmarks/bm_select_incremental.rb +25 -0
  921. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/benchmarks/bm_valid.rb +101 -0
  922. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/profilers/domain_profiler.rb +12 -0
  923. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/profilers/find_profiler.rb +12 -0
  924. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/profilers/find_profiler_jp.rb +12 -0
  925. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/profilers/initialization_profiler.rb +11 -0
  926. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/profilers/list_profsize.rb +11 -0
  927. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/profilers/object_binsize.rb +57 -0
  928. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/psl_test.rb +52 -0
  929. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/test_helper.rb +10 -0
  930. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/tests.txt +98 -0
  931. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/unit/domain_test.rb +106 -0
  932. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/unit/errors_test.rb +25 -0
  933. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/unit/list_test.rb +241 -0
  934. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/unit/public_suffix_test.rb +188 -0
  935. data/vendor/bundle/ruby/2.4.0/gems/public_suffix-4.0.7/test/unit/rule_test.rb +222 -0
  936. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/CONTRIBUTING.rdoc +43 -0
  937. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/Gemfile +3 -0
  938. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/History.rdoc +2344 -0
  939. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/MIT-LICENSE +21 -0
  940. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/README.rdoc +156 -0
  941. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/Rakefile +41 -0
  942. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/azure-pipelines.yml +11 -0
  943. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/bin/bundle +105 -0
  944. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/bin/console +7 -0
  945. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/bin/rake +29 -0
  946. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/bin/rdoc +29 -0
  947. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/bin/rubocop +29 -0
  948. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/bin/setup +6 -0
  949. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/doc/command_line_usage.rdoc +158 -0
  950. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/doc/example/Rakefile1 +38 -0
  951. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/doc/example/Rakefile2 +35 -0
  952. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/doc/example/a.c +6 -0
  953. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/doc/example/b.c +6 -0
  954. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/doc/example/main.c +11 -0
  955. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/doc/glossary.rdoc +42 -0
  956. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/doc/jamis.rb +592 -0
  957. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/doc/proto_rake.rdoc +127 -0
  958. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/doc/rake.1 +156 -0
  959. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/doc/rakefile.rdoc +622 -0
  960. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/doc/rational.rdoc +151 -0
  961. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/exe/rake +27 -0
  962. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/application.rb +824 -0
  963. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/backtrace.rb +24 -0
  964. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/clean.rb +78 -0
  965. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/cloneable.rb +17 -0
  966. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/cpu_counter.rb +107 -0
  967. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/default_loader.rb +15 -0
  968. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/dsl_definition.rb +195 -0
  969. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/early_time.rb +22 -0
  970. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/ext/core.rb +26 -0
  971. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/ext/string.rb +176 -0
  972. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/file_creation_task.rb +25 -0
  973. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/file_list.rb +435 -0
  974. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/file_task.rb +54 -0
  975. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/file_utils.rb +137 -0
  976. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/file_utils_ext.rb +145 -0
  977. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/invocation_chain.rb +57 -0
  978. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/invocation_exception_mixin.rb +17 -0
  979. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/late_time.rb +18 -0
  980. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/linked_list.rb +112 -0
  981. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/loaders/makefile.rb +54 -0
  982. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/multi_task.rb +14 -0
  983. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/name_space.rb +38 -0
  984. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/packagetask.rb +207 -0
  985. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/phony.rb +16 -0
  986. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/private_reader.rb +21 -0
  987. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/promise.rb +100 -0
  988. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/pseudo_status.rb +30 -0
  989. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/rake_module.rb +67 -0
  990. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/rake_test_loader.rb +27 -0
  991. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/rule_recursion_overflow_error.rb +20 -0
  992. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/scope.rb +43 -0
  993. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/task.rb +413 -0
  994. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/task_argument_error.rb +8 -0
  995. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/task_arguments.rb +109 -0
  996. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/task_manager.rb +324 -0
  997. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/tasklib.rb +12 -0
  998. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/testtask.rb +224 -0
  999. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/thread_history_display.rb +49 -0
  1000. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/thread_pool.rb +163 -0
  1001. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/trace_output.rb +23 -0
  1002. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/version.rb +10 -0
  1003. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake/win32.rb +51 -0
  1004. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/lib/rake.rb +71 -0
  1005. data/vendor/bundle/ruby/2.4.0/gems/rake-12.3.3/rake.gemspec +42 -0
  1006. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/COPYING +67 -0
  1007. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/GPL +339 -0
  1008. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/LGPL +502 -0
  1009. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/PSFL +271 -0
  1010. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/README.md +101 -0
  1011. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/Rakefile +80 -0
  1012. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/doc/text/getting-started.md +246 -0
  1013. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/doc/text/how-to.md +90 -0
  1014. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/doc/text/news.md +1374 -0
  1015. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/assertion-failed-error.rb +25 -0
  1016. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/assertions.rb +2249 -0
  1017. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/attribute-matcher.rb +26 -0
  1018. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/attribute.rb +226 -0
  1019. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/auto-runner-loader.rb +17 -0
  1020. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/autorunner.rb +533 -0
  1021. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/code-snippet-fetcher.rb +58 -0
  1022. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/collector/descendant.rb +19 -0
  1023. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/collector/dir.rb +108 -0
  1024. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/collector/load.rb +199 -0
  1025. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/collector/objectspace.rb +34 -0
  1026. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/collector/xml.rb +249 -0
  1027. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/collector.rb +73 -0
  1028. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/color-scheme.rb +198 -0
  1029. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/color.rb +134 -0
  1030. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/data-sets.rb +116 -0
  1031. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/data.rb +371 -0
  1032. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/diff.rb +746 -0
  1033. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/error.rb +158 -0
  1034. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/exception-handler.rb +82 -0
  1035. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/failure.rb +169 -0
  1036. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/fault-location-detector.rb +100 -0
  1037. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/fixture.rb +298 -0
  1038. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/notification.rb +136 -0
  1039. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/omission.rb +195 -0
  1040. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/pending.rb +154 -0
  1041. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/priority.rb +192 -0
  1042. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/runner/console.rb +84 -0
  1043. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/runner/emacs.rb +8 -0
  1044. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/runner/xml.rb +15 -0
  1045. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/test-suite-creator.rb +103 -0
  1046. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/testcase.rb +862 -0
  1047. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/testresult.rb +132 -0
  1048. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/testsuite.rb +175 -0
  1049. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/ui/console/outputlevel.rb +15 -0
  1050. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/ui/console/testrunner.rb +750 -0
  1051. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/ui/emacs/testrunner.rb +49 -0
  1052. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/ui/testrunner.rb +53 -0
  1053. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/ui/testrunnermediator.rb +114 -0
  1054. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/ui/testrunnerutilities.rb +41 -0
  1055. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/ui/xml/testrunner.rb +224 -0
  1056. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/util/backtracefilter.rb +59 -0
  1057. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/util/method-owner-finder.rb +28 -0
  1058. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/util/observable.rb +90 -0
  1059. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/util/output.rb +31 -0
  1060. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/util/procwrapper.rb +48 -0
  1061. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit/version.rb +5 -0
  1062. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test/unit.rb +505 -0
  1063. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/lib/test-unit.rb +34 -0
  1064. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/sample/adder.rb +13 -0
  1065. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/sample/subtracter.rb +12 -0
  1066. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/sample/test_adder.rb +20 -0
  1067. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/sample/test_subtracter.rb +20 -0
  1068. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/sample/test_user.rb +23 -0
  1069. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/collector/test-descendant.rb +182 -0
  1070. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/collector/test-load.rb +442 -0
  1071. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/collector/test_dir.rb +407 -0
  1072. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/collector/test_objectspace.rb +102 -0
  1073. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/fixtures/header-label.csv +3 -0
  1074. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/fixtures/header-label.tsv +3 -0
  1075. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/fixtures/header.csv +3 -0
  1076. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/fixtures/header.tsv +3 -0
  1077. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/fixtures/no-header.csv +2 -0
  1078. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/fixtures/no-header.tsv +2 -0
  1079. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/fixtures/plus.csv +3 -0
  1080. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/run-test.rb +22 -0
  1081. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-assertions.rb +2180 -0
  1082. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-attribute-matcher.rb +38 -0
  1083. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-attribute.rb +123 -0
  1084. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-code-snippet.rb +37 -0
  1085. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-color-scheme.rb +82 -0
  1086. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-color.rb +47 -0
  1087. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-data.rb +419 -0
  1088. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-diff.rb +518 -0
  1089. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-emacs-runner.rb +60 -0
  1090. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-error.rb +26 -0
  1091. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-failure.rb +33 -0
  1092. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-fault-location-detector.rb +163 -0
  1093. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-fixture.rb +713 -0
  1094. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-notification.rb +33 -0
  1095. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-omission.rb +81 -0
  1096. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-pending.rb +70 -0
  1097. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-priority.rb +173 -0
  1098. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-test-case.rb +1279 -0
  1099. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-test-result.rb +113 -0
  1100. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-test-suite-creator.rb +97 -0
  1101. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/test-test-suite.rb +151 -0
  1102. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/testunit-test-util.rb +31 -0
  1103. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/ui/test_testrunmediator.rb +20 -0
  1104. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/util/test-method-owner-finder.rb +38 -0
  1105. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/util/test-output.rb +11 -0
  1106. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/util/test_backtracefilter.rb +52 -0
  1107. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/util/test_observable.rb +102 -0
  1108. data/vendor/bundle/ruby/2.4.0/gems/test-unit-3.2.9/test/util/test_procwrapper.rb +36 -0
  1109. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/.gitignore +8 -0
  1110. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/.rspec +4 -0
  1111. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/.travis.yml +26 -0
  1112. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/CHANGELOG.md +406 -0
  1113. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/CONTRIBUTING.md +20 -0
  1114. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/Gemfile +32 -0
  1115. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/Guardfile +9 -0
  1116. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/LICENSE +22 -0
  1117. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/README.md +584 -0
  1118. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/Rakefile +38 -0
  1119. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/UPGRADE.md +55 -0
  1120. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/rack/typhoeus/middleware/params_decoder/helper.rb +76 -0
  1121. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/rack/typhoeus/middleware/params_decoder.rb +57 -0
  1122. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/rack/typhoeus.rb +1 -0
  1123. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/adapters/faraday.rb +180 -0
  1124. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/cache/dalli.rb +28 -0
  1125. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/cache/rails.rb +28 -0
  1126. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/cache/redis.rb +35 -0
  1127. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/config.rb +69 -0
  1128. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/easy_factory.rb +180 -0
  1129. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/errors/no_stub.rb +12 -0
  1130. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/errors/typhoeus_error.rb +8 -0
  1131. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/errors.rb +9 -0
  1132. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/expectation.rb +217 -0
  1133. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra/addable.rb +23 -0
  1134. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra/before.rb +31 -0
  1135. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra/block_connection.rb +35 -0
  1136. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra/cacheable.rb +15 -0
  1137. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra/memoizable.rb +56 -0
  1138. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra/queueable.rb +83 -0
  1139. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra/runnable.rb +19 -0
  1140. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra/stubbable.rb +28 -0
  1141. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra.rb +95 -0
  1142. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/pool.rb +70 -0
  1143. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/railtie.rb +12 -0
  1144. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/request/actions.rb +125 -0
  1145. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/request/before.rb +30 -0
  1146. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/request/block_connection.rb +52 -0
  1147. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/request/cacheable.rb +38 -0
  1148. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/request/callbacks.rb +151 -0
  1149. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/request/marshal.rb +22 -0
  1150. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/request/memoizable.rb +38 -0
  1151. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/request/operations.rb +40 -0
  1152. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/request/responseable.rb +29 -0
  1153. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/request/streamable.rb +34 -0
  1154. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/request/stubbable.rb +30 -0
  1155. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/request.rb +221 -0
  1156. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/response/cacheable.rb +14 -0
  1157. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/response/header.rb +105 -0
  1158. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/response/informations.rb +248 -0
  1159. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/response/status.rb +106 -0
  1160. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/response.rb +68 -0
  1161. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/version.rb +5 -0
  1162. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus.rb +143 -0
  1163. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/perf/profile.rb +14 -0
  1164. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/perf/vs_nethttp.rb +64 -0
  1165. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/rack/typhoeus/middleware/params_decoder/helper_spec.rb +156 -0
  1166. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/rack/typhoeus/middleware/params_decoder_spec.rb +31 -0
  1167. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/spec_helper.rb +29 -0
  1168. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/support/localhost_server.rb +94 -0
  1169. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/support/memory_cache.rb +15 -0
  1170. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/support/server.rb +116 -0
  1171. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/adapters/faraday_spec.rb +339 -0
  1172. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/cache/dalli_spec.rb +41 -0
  1173. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/cache/redis_spec.rb +41 -0
  1174. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/config_spec.rb +15 -0
  1175. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/easy_factory_spec.rb +143 -0
  1176. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/errors/no_stub_spec.rb +13 -0
  1177. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/expectation_spec.rb +280 -0
  1178. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb +22 -0
  1179. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/before_spec.rb +98 -0
  1180. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/block_connection_spec.rb +18 -0
  1181. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/cacheable_spec.rb +88 -0
  1182. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/memoizable_spec.rb +53 -0
  1183. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/queueable_spec.rb +98 -0
  1184. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/runnable_spec.rb +137 -0
  1185. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/stubbable_spec.rb +48 -0
  1186. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra_spec.rb +22 -0
  1187. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/pool_spec.rb +137 -0
  1188. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/request/actions_spec.rb +19 -0
  1189. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/request/before_spec.rb +93 -0
  1190. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/request/block_connection_spec.rb +75 -0
  1191. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/request/cacheable_spec.rb +94 -0
  1192. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/request/callbacks_spec.rb +91 -0
  1193. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/request/marshal_spec.rb +60 -0
  1194. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/request/memoizable_spec.rb +34 -0
  1195. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/request/operations_spec.rb +101 -0
  1196. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/request/responseable_spec.rb +13 -0
  1197. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/request/stubbable_spec.rb +45 -0
  1198. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/request_spec.rb +232 -0
  1199. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/response/header_spec.rb +147 -0
  1200. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/response/informations_spec.rb +283 -0
  1201. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/response/status_spec.rb +256 -0
  1202. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus/response_spec.rb +100 -0
  1203. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/spec/typhoeus_spec.rb +105 -0
  1204. data/vendor/bundle/ruby/2.4.0/gems/typhoeus-1.4.0/typhoeus.gemspec +25 -0
  1205. data/vendor/bundle/ruby/2.4.0/specifications/addressable-2.8.0.gemspec +39 -0
  1206. data/vendor/bundle/ruby/2.4.0/specifications/ethon-0.15.0.gemspec +32 -0
  1207. data/vendor/bundle/ruby/2.4.0/specifications/ffi-1.15.5.gemspec +47 -0
  1208. data/vendor/bundle/ruby/2.4.0/specifications/json-2.6.2.gemspec +0 -0
  1209. data/vendor/bundle/ruby/2.4.0/specifications/power_assert-2.0.1.gemspec +54 -0
  1210. data/vendor/bundle/ruby/2.4.0/specifications/public_suffix-4.0.7.gemspec +24 -0
  1211. data/vendor/bundle/ruby/2.4.0/specifications/rake-12.3.3.gemspec +49 -0
  1212. data/vendor/bundle/ruby/2.4.0/specifications/test-unit-3.2.9.gemspec +48 -0
  1213. data/vendor/bundle/ruby/2.4.0/specifications/typhoeus-1.4.0.gemspec +32 -0
  1214. metadata +1200 -16
@@ -0,0 +1,2556 @@
1
+ # frozen_string_literal: true
2
+
3
+ # encoding:utf-8
4
+ #--
5
+ # Copyright (C) Bob Aman
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+ #++
19
+
20
+
21
+ require "addressable/version"
22
+ require "addressable/idna"
23
+ require "public_suffix"
24
+
25
+ ##
26
+ # Addressable is a library for processing links and URIs.
27
+ module Addressable
28
+ ##
29
+ # This is an implementation of a URI parser based on
30
+ # <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>,
31
+ # <a href="http://www.ietf.org/rfc/rfc3987.txt">RFC 3987</a>.
32
+ class URI
33
+ ##
34
+ # Raised if something other than a uri is supplied.
35
+ class InvalidURIError < StandardError
36
+ end
37
+
38
+ ##
39
+ # Container for the character classes specified in
40
+ # <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>.
41
+ module CharacterClasses
42
+ ALPHA = "a-zA-Z"
43
+ DIGIT = "0-9"
44
+ GEN_DELIMS = "\\:\\/\\?\\#\\[\\]\\@"
45
+ SUB_DELIMS = "\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\="
46
+ RESERVED = GEN_DELIMS + SUB_DELIMS
47
+ UNRESERVED = ALPHA + DIGIT + "\\-\\.\\_\\~"
48
+ PCHAR = UNRESERVED + SUB_DELIMS + "\\:\\@"
49
+ SCHEME = ALPHA + DIGIT + "\\-\\+\\."
50
+ HOST = UNRESERVED + SUB_DELIMS + "\\[\\:\\]"
51
+ AUTHORITY = PCHAR + "\\[\\:\\]"
52
+ PATH = PCHAR + "\\/"
53
+ QUERY = PCHAR + "\\/\\?"
54
+ FRAGMENT = PCHAR + "\\/\\?"
55
+ end
56
+
57
+ module NormalizeCharacterClasses
58
+ HOST = /[^#{CharacterClasses::HOST}]/
59
+ UNRESERVED = /[^#{CharacterClasses::UNRESERVED}]/
60
+ PCHAR = /[^#{CharacterClasses::PCHAR}]/
61
+ SCHEME = /[^#{CharacterClasses::SCHEME}]/
62
+ FRAGMENT = /[^#{CharacterClasses::FRAGMENT}]/
63
+ QUERY = %r{[^a-zA-Z0-9\-\.\_\~\!\$\'\(\)\*\+\,\=\:\@\/\?%]|%(?!2B|2b)}
64
+ end
65
+
66
+ SLASH = '/'
67
+ EMPTY_STR = ''
68
+
69
+ URIREGEX = /^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/
70
+
71
+ PORT_MAPPING = {
72
+ "http" => 80,
73
+ "https" => 443,
74
+ "ftp" => 21,
75
+ "tftp" => 69,
76
+ "sftp" => 22,
77
+ "ssh" => 22,
78
+ "svn+ssh" => 22,
79
+ "telnet" => 23,
80
+ "nntp" => 119,
81
+ "gopher" => 70,
82
+ "wais" => 210,
83
+ "ldap" => 389,
84
+ "prospero" => 1525
85
+ }.freeze
86
+
87
+ ##
88
+ # Returns a URI object based on the parsed string.
89
+ #
90
+ # @param [String, Addressable::URI, #to_str] uri
91
+ # The URI string to parse.
92
+ # No parsing is performed if the object is already an
93
+ # <code>Addressable::URI</code>.
94
+ #
95
+ # @return [Addressable::URI] The parsed URI.
96
+ def self.parse(uri)
97
+ # If we were given nil, return nil.
98
+ return nil unless uri
99
+ # If a URI object is passed, just return itself.
100
+ return uri.dup if uri.kind_of?(self)
101
+
102
+ # If a URI object of the Ruby standard library variety is passed,
103
+ # convert it to a string, then parse the string.
104
+ # We do the check this way because we don't want to accidentally
105
+ # cause a missing constant exception to be thrown.
106
+ if uri.class.name =~ /^URI\b/
107
+ uri = uri.to_s
108
+ end
109
+
110
+ # Otherwise, convert to a String
111
+ begin
112
+ uri = uri.to_str
113
+ rescue TypeError, NoMethodError
114
+ raise TypeError, "Can't convert #{uri.class} into String."
115
+ end if not uri.is_a? String
116
+
117
+ # This Regexp supplied as an example in RFC 3986, and it works great.
118
+ scan = uri.scan(URIREGEX)
119
+ fragments = scan[0]
120
+ scheme = fragments[1]
121
+ authority = fragments[3]
122
+ path = fragments[4]
123
+ query = fragments[6]
124
+ fragment = fragments[8]
125
+ user = nil
126
+ password = nil
127
+ host = nil
128
+ port = nil
129
+ if authority != nil
130
+ # The Regexp above doesn't split apart the authority.
131
+ userinfo = authority[/^([^\[\]]*)@/, 1]
132
+ if userinfo != nil
133
+ user = userinfo.strip[/^([^:]*):?/, 1]
134
+ password = userinfo.strip[/:(.*)$/, 1]
135
+ end
136
+ host = authority.sub(
137
+ /^([^\[\]]*)@/, EMPTY_STR
138
+ ).sub(
139
+ /:([^:@\[\]]*?)$/, EMPTY_STR
140
+ )
141
+ port = authority[/:([^:@\[\]]*?)$/, 1]
142
+ end
143
+ if port == EMPTY_STR
144
+ port = nil
145
+ end
146
+
147
+ return new(
148
+ :scheme => scheme,
149
+ :user => user,
150
+ :password => password,
151
+ :host => host,
152
+ :port => port,
153
+ :path => path,
154
+ :query => query,
155
+ :fragment => fragment
156
+ )
157
+ end
158
+
159
+ ##
160
+ # Converts an input to a URI. The input does not have to be a valid
161
+ # URI — the method will use heuristics to guess what URI was intended.
162
+ # This is not standards-compliant, merely user-friendly.
163
+ #
164
+ # @param [String, Addressable::URI, #to_str] uri
165
+ # The URI string to parse.
166
+ # No parsing is performed if the object is already an
167
+ # <code>Addressable::URI</code>.
168
+ # @param [Hash] hints
169
+ # A <code>Hash</code> of hints to the heuristic parser.
170
+ # Defaults to <code>{:scheme => "http"}</code>.
171
+ #
172
+ # @return [Addressable::URI] The parsed URI.
173
+ def self.heuristic_parse(uri, hints={})
174
+ # If we were given nil, return nil.
175
+ return nil unless uri
176
+ # If a URI object is passed, just return itself.
177
+ return uri.dup if uri.kind_of?(self)
178
+
179
+ # If a URI object of the Ruby standard library variety is passed,
180
+ # convert it to a string, then parse the string.
181
+ # We do the check this way because we don't want to accidentally
182
+ # cause a missing constant exception to be thrown.
183
+ if uri.class.name =~ /^URI\b/
184
+ uri = uri.to_s
185
+ end
186
+
187
+ if !uri.respond_to?(:to_str)
188
+ raise TypeError, "Can't convert #{uri.class} into String."
189
+ end
190
+ # Otherwise, convert to a String
191
+ uri = uri.to_str.dup.strip
192
+ hints = {
193
+ :scheme => "http"
194
+ }.merge(hints)
195
+ case uri
196
+ when /^http:\//i
197
+ uri.sub!(/^http:\/+/i, "http://")
198
+ when /^https:\//i
199
+ uri.sub!(/^https:\/+/i, "https://")
200
+ when /^feed:\/+http:\//i
201
+ uri.sub!(/^feed:\/+http:\/+/i, "feed:http://")
202
+ when /^feed:\//i
203
+ uri.sub!(/^feed:\/+/i, "feed://")
204
+ when %r[^file:/{4}]i
205
+ uri.sub!(%r[^file:/+]i, "file:////")
206
+ when %r[^file://localhost/]i
207
+ uri.sub!(%r[^file://localhost/+]i, "file:///")
208
+ when %r[^file:/+]i
209
+ uri.sub!(%r[^file:/+]i, "file:///")
210
+ when /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/
211
+ uri.sub!(/^/, hints[:scheme] + "://")
212
+ when /\A\d+\..*:\d+\z/
213
+ uri = "#{hints[:scheme]}://#{uri}"
214
+ end
215
+ match = uri.match(URIREGEX)
216
+ fragments = match.captures
217
+ authority = fragments[3]
218
+ if authority && authority.length > 0
219
+ new_authority = authority.tr("\\", "/").gsub(" ", "%20")
220
+ # NOTE: We want offset 4, not 3!
221
+ offset = match.offset(4)
222
+ uri = uri.dup
223
+ uri[offset[0]...offset[1]] = new_authority
224
+ end
225
+ parsed = self.parse(uri)
226
+ if parsed.scheme =~ /^[^\/?#\.]+\.[^\/?#]+$/
227
+ parsed = self.parse(hints[:scheme] + "://" + uri)
228
+ end
229
+ if parsed.path.include?(".")
230
+ if parsed.path[/\b@\b/]
231
+ parsed.scheme = "mailto" unless parsed.scheme
232
+ elsif new_host = parsed.path[/^([^\/]+\.[^\/]*)/, 1]
233
+ parsed.defer_validation do
234
+ new_path = parsed.path.sub(
235
+ Regexp.new("^" + Regexp.escape(new_host)), EMPTY_STR)
236
+ parsed.host = new_host
237
+ parsed.path = new_path
238
+ parsed.scheme = hints[:scheme] unless parsed.scheme
239
+ end
240
+ end
241
+ end
242
+ return parsed
243
+ end
244
+
245
+ ##
246
+ # Converts a path to a file scheme URI. If the path supplied is
247
+ # relative, it will be returned as a relative URI. If the path supplied
248
+ # is actually a non-file URI, it will parse the URI as if it had been
249
+ # parsed with <code>Addressable::URI.parse</code>. Handles all of the
250
+ # various Microsoft-specific formats for specifying paths.
251
+ #
252
+ # @param [String, Addressable::URI, #to_str] path
253
+ # Typically a <code>String</code> path to a file or directory, but
254
+ # will return a sensible return value if an absolute URI is supplied
255
+ # instead.
256
+ #
257
+ # @return [Addressable::URI]
258
+ # The parsed file scheme URI or the original URI if some other URI
259
+ # scheme was provided.
260
+ #
261
+ # @example
262
+ # base = Addressable::URI.convert_path("/absolute/path/")
263
+ # uri = Addressable::URI.convert_path("relative/path")
264
+ # (base + uri).to_s
265
+ # #=> "file:///absolute/path/relative/path"
266
+ #
267
+ # Addressable::URI.convert_path(
268
+ # "c:\\windows\\My Documents 100%20\\foo.txt"
269
+ # ).to_s
270
+ # #=> "file:///c:/windows/My%20Documents%20100%20/foo.txt"
271
+ #
272
+ # Addressable::URI.convert_path("http://example.com/").to_s
273
+ # #=> "http://example.com/"
274
+ def self.convert_path(path)
275
+ # If we were given nil, return nil.
276
+ return nil unless path
277
+ # If a URI object is passed, just return itself.
278
+ return path if path.kind_of?(self)
279
+ if !path.respond_to?(:to_str)
280
+ raise TypeError, "Can't convert #{path.class} into String."
281
+ end
282
+ # Otherwise, convert to a String
283
+ path = path.to_str.strip
284
+
285
+ path.sub!(/^file:\/?\/?/, EMPTY_STR) if path =~ /^file:\/?\/?/
286
+ path = SLASH + path if path =~ /^([a-zA-Z])[\|:]/
287
+ uri = self.parse(path)
288
+
289
+ if uri.scheme == nil
290
+ # Adjust windows-style uris
291
+ uri.path.sub!(/^\/?([a-zA-Z])[\|:][\\\/]/) do
292
+ "/#{$1.downcase}:/"
293
+ end
294
+ uri.path.tr!("\\", SLASH)
295
+ if File.exist?(uri.path) &&
296
+ File.stat(uri.path).directory?
297
+ uri.path.chomp!(SLASH)
298
+ uri.path = uri.path + '/'
299
+ end
300
+
301
+ # If the path is absolute, set the scheme and host.
302
+ if uri.path.start_with?(SLASH)
303
+ uri.scheme = "file"
304
+ uri.host = EMPTY_STR
305
+ end
306
+ uri.normalize!
307
+ end
308
+
309
+ return uri
310
+ end
311
+
312
+ ##
313
+ # Joins several URIs together.
314
+ #
315
+ # @param [String, Addressable::URI, #to_str] *uris
316
+ # The URIs to join.
317
+ #
318
+ # @return [Addressable::URI] The joined URI.
319
+ #
320
+ # @example
321
+ # base = "http://example.com/"
322
+ # uri = Addressable::URI.parse("relative/path")
323
+ # Addressable::URI.join(base, uri)
324
+ # #=> #<Addressable::URI:0xcab390 URI:http://example.com/relative/path>
325
+ def self.join(*uris)
326
+ uri_objects = uris.collect do |uri|
327
+ if !uri.respond_to?(:to_str)
328
+ raise TypeError, "Can't convert #{uri.class} into String."
329
+ end
330
+ uri.kind_of?(self) ? uri : self.parse(uri.to_str)
331
+ end
332
+ result = uri_objects.shift.dup
333
+ for uri in uri_objects
334
+ result.join!(uri)
335
+ end
336
+ return result
337
+ end
338
+
339
+ ##
340
+ # Tables used to optimize encoding operations in `self.encode_component`
341
+ # and `self.normalize_component`
342
+ SEQUENCE_ENCODING_TABLE = Hash.new do |hash, sequence|
343
+ hash[sequence] = sequence.unpack("C*").map do |c|
344
+ format("%02x", c)
345
+ end.join
346
+ end
347
+
348
+ SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE = Hash.new do |hash, sequence|
349
+ hash[sequence] = sequence.unpack("C*").map do |c|
350
+ format("%%%02X", c)
351
+ end.join
352
+ end
353
+
354
+ ##
355
+ # Percent encodes a URI component.
356
+ #
357
+ # @param [String, #to_str] component The URI component to encode.
358
+ #
359
+ # @param [String, Regexp] character_class
360
+ # The characters which are not percent encoded. If a <code>String</code>
361
+ # is passed, the <code>String</code> must be formatted as a regular
362
+ # expression character class. (Do not include the surrounding square
363
+ # brackets.) For example, <code>"b-zB-Z0-9"</code> would cause
364
+ # everything but the letters 'b' through 'z' and the numbers '0' through
365
+ # '9' to be percent encoded. If a <code>Regexp</code> is passed, the
366
+ # value <code>/[^b-zB-Z0-9]/</code> would have the same effect. A set of
367
+ # useful <code>String</code> values may be found in the
368
+ # <code>Addressable::URI::CharacterClasses</code> module. The default
369
+ # value is the reserved plus unreserved character classes specified in
370
+ # <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>.
371
+ #
372
+ # @param [Regexp] upcase_encoded
373
+ # A string of characters that may already be percent encoded, and whose
374
+ # encodings should be upcased. This allows normalization of percent
375
+ # encodings for characters not included in the
376
+ # <code>character_class</code>.
377
+ #
378
+ # @return [String] The encoded component.
379
+ #
380
+ # @example
381
+ # Addressable::URI.encode_component("simple/example", "b-zB-Z0-9")
382
+ # => "simple%2Fex%61mple"
383
+ # Addressable::URI.encode_component("simple/example", /[^b-zB-Z0-9]/)
384
+ # => "simple%2Fex%61mple"
385
+ # Addressable::URI.encode_component(
386
+ # "simple/example", Addressable::URI::CharacterClasses::UNRESERVED
387
+ # )
388
+ # => "simple%2Fexample"
389
+ def self.encode_component(component, character_class=
390
+ CharacterClasses::RESERVED + CharacterClasses::UNRESERVED,
391
+ upcase_encoded='')
392
+ return nil if component.nil?
393
+
394
+ begin
395
+ if component.kind_of?(Symbol) ||
396
+ component.kind_of?(Numeric) ||
397
+ component.kind_of?(TrueClass) ||
398
+ component.kind_of?(FalseClass)
399
+ component = component.to_s
400
+ else
401
+ component = component.to_str
402
+ end
403
+ rescue TypeError, NoMethodError
404
+ raise TypeError, "Can't convert #{component.class} into String."
405
+ end if !component.is_a? String
406
+
407
+ if ![String, Regexp].include?(character_class.class)
408
+ raise TypeError,
409
+ "Expected String or Regexp, got #{character_class.inspect}"
410
+ end
411
+ if character_class.kind_of?(String)
412
+ character_class = /[^#{character_class}]/
413
+ end
414
+ # We can't perform regexps on invalid UTF sequences, but
415
+ # here we need to, so switch to ASCII.
416
+ component = component.dup
417
+ component.force_encoding(Encoding::ASCII_8BIT)
418
+ # Avoiding gsub! because there are edge cases with frozen strings
419
+ component = component.gsub(character_class) do |sequence|
420
+ SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE[sequence]
421
+ end
422
+ if upcase_encoded.length > 0
423
+ upcase_encoded_chars = upcase_encoded.chars.map do |char|
424
+ SEQUENCE_ENCODING_TABLE[char]
425
+ end
426
+ component = component.gsub(/%(#{upcase_encoded_chars.join('|')})/,
427
+ &:upcase)
428
+ end
429
+ return component
430
+ end
431
+
432
+ class << self
433
+ alias_method :escape_component, :encode_component
434
+ end
435
+
436
+ ##
437
+ # Unencodes any percent encoded characters within a URI component.
438
+ # This method may be used for unencoding either components or full URIs,
439
+ # however, it is recommended to use the <code>unencode_component</code>
440
+ # alias when unencoding components.
441
+ #
442
+ # @param [String, Addressable::URI, #to_str] uri
443
+ # The URI or component to unencode.
444
+ #
445
+ # @param [Class] return_type
446
+ # The type of object to return.
447
+ # This value may only be set to <code>String</code> or
448
+ # <code>Addressable::URI</code>. All other values are invalid. Defaults
449
+ # to <code>String</code>.
450
+ #
451
+ # @param [String] leave_encoded
452
+ # A string of characters to leave encoded. If a percent encoded character
453
+ # in this list is encountered then it will remain percent encoded.
454
+ #
455
+ # @return [String, Addressable::URI]
456
+ # The unencoded component or URI.
457
+ # The return type is determined by the <code>return_type</code>
458
+ # parameter.
459
+ def self.unencode(uri, return_type=String, leave_encoded='')
460
+ return nil if uri.nil?
461
+
462
+ begin
463
+ uri = uri.to_str
464
+ rescue NoMethodError, TypeError
465
+ raise TypeError, "Can't convert #{uri.class} into String."
466
+ end if !uri.is_a? String
467
+ if ![String, ::Addressable::URI].include?(return_type)
468
+ raise TypeError,
469
+ "Expected Class (String or Addressable::URI), " +
470
+ "got #{return_type.inspect}"
471
+ end
472
+ uri = uri.dup
473
+ # Seriously, only use UTF-8. I'm really not kidding!
474
+ uri.force_encoding("utf-8")
475
+
476
+ unless leave_encoded.empty?
477
+ leave_encoded = leave_encoded.dup.force_encoding("utf-8")
478
+ end
479
+
480
+ result = uri.gsub(/%[0-9a-f]{2}/iu) do |sequence|
481
+ c = sequence[1..3].to_i(16).chr
482
+ c.force_encoding("utf-8")
483
+ leave_encoded.include?(c) ? sequence : c
484
+ end
485
+ result.force_encoding("utf-8")
486
+ if return_type == String
487
+ return result
488
+ elsif return_type == ::Addressable::URI
489
+ return ::Addressable::URI.parse(result)
490
+ end
491
+ end
492
+
493
+ class << self
494
+ alias_method :unescape, :unencode
495
+ alias_method :unencode_component, :unencode
496
+ alias_method :unescape_component, :unencode
497
+ end
498
+
499
+
500
+ ##
501
+ # Normalizes the encoding of a URI component.
502
+ #
503
+ # @param [String, #to_str] component The URI component to encode.
504
+ #
505
+ # @param [String, Regexp] character_class
506
+ # The characters which are not percent encoded. If a <code>String</code>
507
+ # is passed, the <code>String</code> must be formatted as a regular
508
+ # expression character class. (Do not include the surrounding square
509
+ # brackets.) For example, <code>"b-zB-Z0-9"</code> would cause
510
+ # everything but the letters 'b' through 'z' and the numbers '0'
511
+ # through '9' to be percent encoded. If a <code>Regexp</code> is passed,
512
+ # the value <code>/[^b-zB-Z0-9]/</code> would have the same effect. A
513
+ # set of useful <code>String</code> values may be found in the
514
+ # <code>Addressable::URI::CharacterClasses</code> module. The default
515
+ # value is the reserved plus unreserved character classes specified in
516
+ # <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>.
517
+ #
518
+ # @param [String] leave_encoded
519
+ # When <code>character_class</code> is a <code>String</code> then
520
+ # <code>leave_encoded</code> is a string of characters that should remain
521
+ # percent encoded while normalizing the component; if they appear percent
522
+ # encoded in the original component, then they will be upcased ("%2f"
523
+ # normalized to "%2F") but otherwise left alone.
524
+ #
525
+ # @return [String] The normalized component.
526
+ #
527
+ # @example
528
+ # Addressable::URI.normalize_component("simpl%65/%65xampl%65", "b-zB-Z")
529
+ # => "simple%2Fex%61mple"
530
+ # Addressable::URI.normalize_component(
531
+ # "simpl%65/%65xampl%65", /[^b-zB-Z]/
532
+ # )
533
+ # => "simple%2Fex%61mple"
534
+ # Addressable::URI.normalize_component(
535
+ # "simpl%65/%65xampl%65",
536
+ # Addressable::URI::CharacterClasses::UNRESERVED
537
+ # )
538
+ # => "simple%2Fexample"
539
+ # Addressable::URI.normalize_component(
540
+ # "one%20two%2fthree%26four",
541
+ # "0-9a-zA-Z &/",
542
+ # "/"
543
+ # )
544
+ # => "one two%2Fthree&four"
545
+ def self.normalize_component(component, character_class=
546
+ CharacterClasses::RESERVED + CharacterClasses::UNRESERVED,
547
+ leave_encoded='')
548
+ return nil if component.nil?
549
+
550
+ begin
551
+ component = component.to_str
552
+ rescue NoMethodError, TypeError
553
+ raise TypeError, "Can't convert #{component.class} into String."
554
+ end if !component.is_a? String
555
+
556
+ if ![String, Regexp].include?(character_class.class)
557
+ raise TypeError,
558
+ "Expected String or Regexp, got #{character_class.inspect}"
559
+ end
560
+ if character_class.kind_of?(String)
561
+ leave_re = if leave_encoded.length > 0
562
+ character_class = "#{character_class}%" unless character_class.include?('%')
563
+
564
+ "|%(?!#{leave_encoded.chars.map do |char|
565
+ seq = SEQUENCE_ENCODING_TABLE[char]
566
+ [seq.upcase, seq.downcase]
567
+ end.flatten.join('|')})"
568
+ end
569
+
570
+ character_class = if leave_re
571
+ /[^#{character_class}]#{leave_re}/
572
+ else
573
+ /[^#{character_class}]/
574
+ end
575
+ end
576
+ # We can't perform regexps on invalid UTF sequences, but
577
+ # here we need to, so switch to ASCII.
578
+ component = component.dup
579
+ component.force_encoding(Encoding::ASCII_8BIT)
580
+ unencoded = self.unencode_component(component, String, leave_encoded)
581
+ begin
582
+ encoded = self.encode_component(
583
+ Addressable::IDNA.unicode_normalize_kc(unencoded),
584
+ character_class,
585
+ leave_encoded
586
+ )
587
+ rescue ArgumentError
588
+ encoded = self.encode_component(unencoded)
589
+ end
590
+ encoded.force_encoding(Encoding::UTF_8)
591
+ return encoded
592
+ end
593
+
594
+ ##
595
+ # Percent encodes any special characters in the URI.
596
+ #
597
+ # @param [String, Addressable::URI, #to_str] uri
598
+ # The URI to encode.
599
+ #
600
+ # @param [Class] return_type
601
+ # The type of object to return.
602
+ # This value may only be set to <code>String</code> or
603
+ # <code>Addressable::URI</code>. All other values are invalid. Defaults
604
+ # to <code>String</code>.
605
+ #
606
+ # @return [String, Addressable::URI]
607
+ # The encoded URI.
608
+ # The return type is determined by the <code>return_type</code>
609
+ # parameter.
610
+ def self.encode(uri, return_type=String)
611
+ return nil if uri.nil?
612
+
613
+ begin
614
+ uri = uri.to_str
615
+ rescue NoMethodError, TypeError
616
+ raise TypeError, "Can't convert #{uri.class} into String."
617
+ end if !uri.is_a? String
618
+
619
+ if ![String, ::Addressable::URI].include?(return_type)
620
+ raise TypeError,
621
+ "Expected Class (String or Addressable::URI), " +
622
+ "got #{return_type.inspect}"
623
+ end
624
+ uri_object = uri.kind_of?(self) ? uri : self.parse(uri)
625
+ encoded_uri = Addressable::URI.new(
626
+ :scheme => self.encode_component(uri_object.scheme,
627
+ Addressable::URI::CharacterClasses::SCHEME),
628
+ :authority => self.encode_component(uri_object.authority,
629
+ Addressable::URI::CharacterClasses::AUTHORITY),
630
+ :path => self.encode_component(uri_object.path,
631
+ Addressable::URI::CharacterClasses::PATH),
632
+ :query => self.encode_component(uri_object.query,
633
+ Addressable::URI::CharacterClasses::QUERY),
634
+ :fragment => self.encode_component(uri_object.fragment,
635
+ Addressable::URI::CharacterClasses::FRAGMENT)
636
+ )
637
+ if return_type == String
638
+ return encoded_uri.to_s
639
+ elsif return_type == ::Addressable::URI
640
+ return encoded_uri
641
+ end
642
+ end
643
+
644
+ class << self
645
+ alias_method :escape, :encode
646
+ end
647
+
648
+ ##
649
+ # Normalizes the encoding of a URI. Characters within a hostname are
650
+ # not percent encoded to allow for internationalized domain names.
651
+ #
652
+ # @param [String, Addressable::URI, #to_str] uri
653
+ # The URI to encode.
654
+ #
655
+ # @param [Class] return_type
656
+ # The type of object to return.
657
+ # This value may only be set to <code>String</code> or
658
+ # <code>Addressable::URI</code>. All other values are invalid. Defaults
659
+ # to <code>String</code>.
660
+ #
661
+ # @return [String, Addressable::URI]
662
+ # The encoded URI.
663
+ # The return type is determined by the <code>return_type</code>
664
+ # parameter.
665
+ def self.normalized_encode(uri, return_type=String)
666
+ begin
667
+ uri = uri.to_str
668
+ rescue NoMethodError, TypeError
669
+ raise TypeError, "Can't convert #{uri.class} into String."
670
+ end if !uri.is_a? String
671
+
672
+ if ![String, ::Addressable::URI].include?(return_type)
673
+ raise TypeError,
674
+ "Expected Class (String or Addressable::URI), " +
675
+ "got #{return_type.inspect}"
676
+ end
677
+ uri_object = uri.kind_of?(self) ? uri : self.parse(uri)
678
+ components = {
679
+ :scheme => self.unencode_component(uri_object.scheme),
680
+ :user => self.unencode_component(uri_object.user),
681
+ :password => self.unencode_component(uri_object.password),
682
+ :host => self.unencode_component(uri_object.host),
683
+ :port => (uri_object.port.nil? ? nil : uri_object.port.to_s),
684
+ :path => self.unencode_component(uri_object.path),
685
+ :query => self.unencode_component(uri_object.query),
686
+ :fragment => self.unencode_component(uri_object.fragment)
687
+ }
688
+ components.each do |key, value|
689
+ if value != nil
690
+ begin
691
+ components[key] =
692
+ Addressable::IDNA.unicode_normalize_kc(value.to_str)
693
+ rescue ArgumentError
694
+ # Likely a malformed UTF-8 character, skip unicode normalization
695
+ components[key] = value.to_str
696
+ end
697
+ end
698
+ end
699
+ encoded_uri = Addressable::URI.new(
700
+ :scheme => self.encode_component(components[:scheme],
701
+ Addressable::URI::CharacterClasses::SCHEME),
702
+ :user => self.encode_component(components[:user],
703
+ Addressable::URI::CharacterClasses::UNRESERVED),
704
+ :password => self.encode_component(components[:password],
705
+ Addressable::URI::CharacterClasses::UNRESERVED),
706
+ :host => components[:host],
707
+ :port => components[:port],
708
+ :path => self.encode_component(components[:path],
709
+ Addressable::URI::CharacterClasses::PATH),
710
+ :query => self.encode_component(components[:query],
711
+ Addressable::URI::CharacterClasses::QUERY),
712
+ :fragment => self.encode_component(components[:fragment],
713
+ Addressable::URI::CharacterClasses::FRAGMENT)
714
+ )
715
+ if return_type == String
716
+ return encoded_uri.to_s
717
+ elsif return_type == ::Addressable::URI
718
+ return encoded_uri
719
+ end
720
+ end
721
+
722
+ ##
723
+ # Encodes a set of key/value pairs according to the rules for the
724
+ # <code>application/x-www-form-urlencoded</code> MIME type.
725
+ #
726
+ # @param [#to_hash, #to_ary] form_values
727
+ # The form values to encode.
728
+ #
729
+ # @param [TrueClass, FalseClass] sort
730
+ # Sort the key/value pairs prior to encoding.
731
+ # Defaults to <code>false</code>.
732
+ #
733
+ # @return [String]
734
+ # The encoded value.
735
+ def self.form_encode(form_values, sort=false)
736
+ if form_values.respond_to?(:to_hash)
737
+ form_values = form_values.to_hash.to_a
738
+ elsif form_values.respond_to?(:to_ary)
739
+ form_values = form_values.to_ary
740
+ else
741
+ raise TypeError, "Can't convert #{form_values.class} into Array."
742
+ end
743
+
744
+ form_values = form_values.inject([]) do |accu, (key, value)|
745
+ if value.kind_of?(Array)
746
+ value.each do |v|
747
+ accu << [key.to_s, v.to_s]
748
+ end
749
+ else
750
+ accu << [key.to_s, value.to_s]
751
+ end
752
+ accu
753
+ end
754
+
755
+ if sort
756
+ # Useful for OAuth and optimizing caching systems
757
+ form_values = form_values.sort
758
+ end
759
+ escaped_form_values = form_values.map do |(key, value)|
760
+ # Line breaks are CRLF pairs
761
+ [
762
+ self.encode_component(
763
+ key.gsub(/(\r\n|\n|\r)/, "\r\n"),
764
+ CharacterClasses::UNRESERVED
765
+ ).gsub("%20", "+"),
766
+ self.encode_component(
767
+ value.gsub(/(\r\n|\n|\r)/, "\r\n"),
768
+ CharacterClasses::UNRESERVED
769
+ ).gsub("%20", "+")
770
+ ]
771
+ end
772
+ return escaped_form_values.map do |(key, value)|
773
+ "#{key}=#{value}"
774
+ end.join("&")
775
+ end
776
+
777
+ ##
778
+ # Decodes a <code>String</code> according to the rules for the
779
+ # <code>application/x-www-form-urlencoded</code> MIME type.
780
+ #
781
+ # @param [String, #to_str] encoded_value
782
+ # The form values to decode.
783
+ #
784
+ # @return [Array]
785
+ # The decoded values.
786
+ # This is not a <code>Hash</code> because of the possibility for
787
+ # duplicate keys.
788
+ def self.form_unencode(encoded_value)
789
+ if !encoded_value.respond_to?(:to_str)
790
+ raise TypeError, "Can't convert #{encoded_value.class} into String."
791
+ end
792
+ encoded_value = encoded_value.to_str
793
+ split_values = encoded_value.split("&").map do |pair|
794
+ pair.split("=", 2)
795
+ end
796
+ return split_values.map do |(key, value)|
797
+ [
798
+ key ? self.unencode_component(
799
+ key.gsub("+", "%20")).gsub(/(\r\n|\n|\r)/, "\n") : nil,
800
+ value ? (self.unencode_component(
801
+ value.gsub("+", "%20")).gsub(/(\r\n|\n|\r)/, "\n")) : nil
802
+ ]
803
+ end
804
+ end
805
+
806
+ ##
807
+ # Creates a new uri object from component parts.
808
+ #
809
+ # @option [String, #to_str] scheme The scheme component.
810
+ # @option [String, #to_str] user The user component.
811
+ # @option [String, #to_str] password The password component.
812
+ # @option [String, #to_str] userinfo
813
+ # The userinfo component. If this is supplied, the user and password
814
+ # components must be omitted.
815
+ # @option [String, #to_str] host The host component.
816
+ # @option [String, #to_str] port The port component.
817
+ # @option [String, #to_str] authority
818
+ # The authority component. If this is supplied, the user, password,
819
+ # userinfo, host, and port components must be omitted.
820
+ # @option [String, #to_str] path The path component.
821
+ # @option [String, #to_str] query The query component.
822
+ # @option [String, #to_str] fragment The fragment component.
823
+ #
824
+ # @return [Addressable::URI] The constructed URI object.
825
+ def initialize(options={})
826
+ if options.has_key?(:authority)
827
+ if (options.keys & [:userinfo, :user, :password, :host, :port]).any?
828
+ raise ArgumentError,
829
+ "Cannot specify both an authority and any of the components " +
830
+ "within the authority."
831
+ end
832
+ end
833
+ if options.has_key?(:userinfo)
834
+ if (options.keys & [:user, :password]).any?
835
+ raise ArgumentError,
836
+ "Cannot specify both a userinfo and either the user or password."
837
+ end
838
+ end
839
+
840
+ self.defer_validation do
841
+ # Bunch of crazy logic required because of the composite components
842
+ # like userinfo and authority.
843
+ self.scheme = options[:scheme] if options[:scheme]
844
+ self.user = options[:user] if options[:user]
845
+ self.password = options[:password] if options[:password]
846
+ self.userinfo = options[:userinfo] if options[:userinfo]
847
+ self.host = options[:host] if options[:host]
848
+ self.port = options[:port] if options[:port]
849
+ self.authority = options[:authority] if options[:authority]
850
+ self.path = options[:path] if options[:path]
851
+ self.query = options[:query] if options[:query]
852
+ self.query_values = options[:query_values] if options[:query_values]
853
+ self.fragment = options[:fragment] if options[:fragment]
854
+ end
855
+ self.to_s
856
+ end
857
+
858
+ ##
859
+ # Freeze URI, initializing instance variables.
860
+ #
861
+ # @return [Addressable::URI] The frozen URI object.
862
+ def freeze
863
+ self.normalized_scheme
864
+ self.normalized_user
865
+ self.normalized_password
866
+ self.normalized_userinfo
867
+ self.normalized_host
868
+ self.normalized_port
869
+ self.normalized_authority
870
+ self.normalized_site
871
+ self.normalized_path
872
+ self.normalized_query
873
+ self.normalized_fragment
874
+ self.hash
875
+ super
876
+ end
877
+
878
+ ##
879
+ # The scheme component for this URI.
880
+ #
881
+ # @return [String] The scheme component.
882
+ def scheme
883
+ return defined?(@scheme) ? @scheme : nil
884
+ end
885
+
886
+ ##
887
+ # The scheme component for this URI, normalized.
888
+ #
889
+ # @return [String] The scheme component, normalized.
890
+ def normalized_scheme
891
+ return nil unless self.scheme
892
+ @normalized_scheme ||= begin
893
+ if self.scheme =~ /^\s*ssh\+svn\s*$/i
894
+ "svn+ssh".dup
895
+ else
896
+ Addressable::URI.normalize_component(
897
+ self.scheme.strip.downcase,
898
+ Addressable::URI::NormalizeCharacterClasses::SCHEME
899
+ )
900
+ end
901
+ end
902
+ # All normalized values should be UTF-8
903
+ @normalized_scheme.force_encoding(Encoding::UTF_8) if @normalized_scheme
904
+ @normalized_scheme
905
+ end
906
+
907
+ ##
908
+ # Sets the scheme component for this URI.
909
+ #
910
+ # @param [String, #to_str] new_scheme The new scheme component.
911
+ def scheme=(new_scheme)
912
+ if new_scheme && !new_scheme.respond_to?(:to_str)
913
+ raise TypeError, "Can't convert #{new_scheme.class} into String."
914
+ elsif new_scheme
915
+ new_scheme = new_scheme.to_str
916
+ end
917
+ if new_scheme && new_scheme !~ /\A[a-z][a-z0-9\.\+\-]*\z/i
918
+ raise InvalidURIError, "Invalid scheme format: '#{new_scheme}'"
919
+ end
920
+ @scheme = new_scheme
921
+ @scheme = nil if @scheme.to_s.strip.empty?
922
+
923
+ # Reset dependent values
924
+ remove_instance_variable(:@normalized_scheme) if defined?(@normalized_scheme)
925
+ remove_composite_values
926
+
927
+ # Ensure we haven't created an invalid URI
928
+ validate()
929
+ end
930
+
931
+ ##
932
+ # The user component for this URI.
933
+ #
934
+ # @return [String] The user component.
935
+ def user
936
+ return defined?(@user) ? @user : nil
937
+ end
938
+
939
+ ##
940
+ # The user component for this URI, normalized.
941
+ #
942
+ # @return [String] The user component, normalized.
943
+ def normalized_user
944
+ return nil unless self.user
945
+ return @normalized_user if defined?(@normalized_user)
946
+ @normalized_user ||= begin
947
+ if normalized_scheme =~ /https?/ && self.user.strip.empty? &&
948
+ (!self.password || self.password.strip.empty?)
949
+ nil
950
+ else
951
+ Addressable::URI.normalize_component(
952
+ self.user.strip,
953
+ Addressable::URI::NormalizeCharacterClasses::UNRESERVED
954
+ )
955
+ end
956
+ end
957
+ # All normalized values should be UTF-8
958
+ @normalized_user.force_encoding(Encoding::UTF_8) if @normalized_user
959
+ @normalized_user
960
+ end
961
+
962
+ ##
963
+ # Sets the user component for this URI.
964
+ #
965
+ # @param [String, #to_str] new_user The new user component.
966
+ def user=(new_user)
967
+ if new_user && !new_user.respond_to?(:to_str)
968
+ raise TypeError, "Can't convert #{new_user.class} into String."
969
+ end
970
+ @user = new_user ? new_user.to_str : nil
971
+
972
+ # You can't have a nil user with a non-nil password
973
+ if password != nil
974
+ @user = EMPTY_STR if @user.nil?
975
+ end
976
+
977
+ # Reset dependent values
978
+ remove_instance_variable(:@userinfo) if defined?(@userinfo)
979
+ remove_instance_variable(:@normalized_userinfo) if defined?(@normalized_userinfo)
980
+ remove_instance_variable(:@authority) if defined?(@authority)
981
+ remove_instance_variable(:@normalized_user) if defined?(@normalized_user)
982
+ remove_composite_values
983
+
984
+ # Ensure we haven't created an invalid URI
985
+ validate()
986
+ end
987
+
988
+ ##
989
+ # The password component for this URI.
990
+ #
991
+ # @return [String] The password component.
992
+ def password
993
+ return defined?(@password) ? @password : nil
994
+ end
995
+
996
+ ##
997
+ # The password component for this URI, normalized.
998
+ #
999
+ # @return [String] The password component, normalized.
1000
+ def normalized_password
1001
+ return nil unless self.password
1002
+ return @normalized_password if defined?(@normalized_password)
1003
+ @normalized_password ||= begin
1004
+ if self.normalized_scheme =~ /https?/ && self.password.strip.empty? &&
1005
+ (!self.user || self.user.strip.empty?)
1006
+ nil
1007
+ else
1008
+ Addressable::URI.normalize_component(
1009
+ self.password.strip,
1010
+ Addressable::URI::NormalizeCharacterClasses::UNRESERVED
1011
+ )
1012
+ end
1013
+ end
1014
+ # All normalized values should be UTF-8
1015
+ if @normalized_password
1016
+ @normalized_password.force_encoding(Encoding::UTF_8)
1017
+ end
1018
+ @normalized_password
1019
+ end
1020
+
1021
+ ##
1022
+ # Sets the password component for this URI.
1023
+ #
1024
+ # @param [String, #to_str] new_password The new password component.
1025
+ def password=(new_password)
1026
+ if new_password && !new_password.respond_to?(:to_str)
1027
+ raise TypeError, "Can't convert #{new_password.class} into String."
1028
+ end
1029
+ @password = new_password ? new_password.to_str : nil
1030
+
1031
+ # You can't have a nil user with a non-nil password
1032
+ @password ||= nil
1033
+ @user ||= nil
1034
+ if @password != nil
1035
+ @user = EMPTY_STR if @user.nil?
1036
+ end
1037
+
1038
+ # Reset dependent values
1039
+ remove_instance_variable(:@userinfo) if defined?(@userinfo)
1040
+ remove_instance_variable(:@normalized_userinfo) if defined?(@normalized_userinfo)
1041
+ remove_instance_variable(:@authority) if defined?(@authority)
1042
+ remove_instance_variable(:@normalized_password) if defined?(@normalized_password)
1043
+ remove_composite_values
1044
+
1045
+ # Ensure we haven't created an invalid URI
1046
+ validate()
1047
+ end
1048
+
1049
+ ##
1050
+ # The userinfo component for this URI.
1051
+ # Combines the user and password components.
1052
+ #
1053
+ # @return [String] The userinfo component.
1054
+ def userinfo
1055
+ current_user = self.user
1056
+ current_password = self.password
1057
+ (current_user || current_password) && @userinfo ||= begin
1058
+ if current_user && current_password
1059
+ "#{current_user}:#{current_password}"
1060
+ elsif current_user && !current_password
1061
+ "#{current_user}"
1062
+ end
1063
+ end
1064
+ end
1065
+
1066
+ ##
1067
+ # The userinfo component for this URI, normalized.
1068
+ #
1069
+ # @return [String] The userinfo component, normalized.
1070
+ def normalized_userinfo
1071
+ return nil unless self.userinfo
1072
+ return @normalized_userinfo if defined?(@normalized_userinfo)
1073
+ @normalized_userinfo ||= begin
1074
+ current_user = self.normalized_user
1075
+ current_password = self.normalized_password
1076
+ if !current_user && !current_password
1077
+ nil
1078
+ elsif current_user && current_password
1079
+ "#{current_user}:#{current_password}".dup
1080
+ elsif current_user && !current_password
1081
+ "#{current_user}".dup
1082
+ end
1083
+ end
1084
+ # All normalized values should be UTF-8
1085
+ if @normalized_userinfo
1086
+ @normalized_userinfo.force_encoding(Encoding::UTF_8)
1087
+ end
1088
+ @normalized_userinfo
1089
+ end
1090
+
1091
+ ##
1092
+ # Sets the userinfo component for this URI.
1093
+ #
1094
+ # @param [String, #to_str] new_userinfo The new userinfo component.
1095
+ def userinfo=(new_userinfo)
1096
+ if new_userinfo && !new_userinfo.respond_to?(:to_str)
1097
+ raise TypeError, "Can't convert #{new_userinfo.class} into String."
1098
+ end
1099
+ new_user, new_password = if new_userinfo
1100
+ [
1101
+ new_userinfo.to_str.strip[/^(.*):/, 1],
1102
+ new_userinfo.to_str.strip[/:(.*)$/, 1]
1103
+ ]
1104
+ else
1105
+ [nil, nil]
1106
+ end
1107
+
1108
+ # Password assigned first to ensure validity in case of nil
1109
+ self.password = new_password
1110
+ self.user = new_user
1111
+
1112
+ # Reset dependent values
1113
+ remove_instance_variable(:@authority) if defined?(@authority)
1114
+ remove_composite_values
1115
+
1116
+ # Ensure we haven't created an invalid URI
1117
+ validate()
1118
+ end
1119
+
1120
+ ##
1121
+ # The host component for this URI.
1122
+ #
1123
+ # @return [String] The host component.
1124
+ def host
1125
+ return defined?(@host) ? @host : nil
1126
+ end
1127
+
1128
+ ##
1129
+ # The host component for this URI, normalized.
1130
+ #
1131
+ # @return [String] The host component, normalized.
1132
+ def normalized_host
1133
+ return nil unless self.host
1134
+
1135
+ @normalized_host ||= begin
1136
+ if !self.host.strip.empty?
1137
+ result = ::Addressable::IDNA.to_ascii(
1138
+ URI.unencode_component(self.host.strip.downcase)
1139
+ )
1140
+ if result =~ /[^\.]\.$/
1141
+ # Single trailing dots are unnecessary.
1142
+ result = result[0...-1]
1143
+ end
1144
+ result = Addressable::URI.normalize_component(
1145
+ result,
1146
+ NormalizeCharacterClasses::HOST
1147
+ )
1148
+ result
1149
+ else
1150
+ EMPTY_STR.dup
1151
+ end
1152
+ end
1153
+ # All normalized values should be UTF-8
1154
+ if @normalized_host && !@normalized_host.empty?
1155
+ @normalized_host.force_encoding(Encoding::UTF_8)
1156
+ end
1157
+ @normalized_host
1158
+ end
1159
+
1160
+ ##
1161
+ # Sets the host component for this URI.
1162
+ #
1163
+ # @param [String, #to_str] new_host The new host component.
1164
+ def host=(new_host)
1165
+ if new_host && !new_host.respond_to?(:to_str)
1166
+ raise TypeError, "Can't convert #{new_host.class} into String."
1167
+ end
1168
+ @host = new_host ? new_host.to_str : nil
1169
+
1170
+ # Reset dependent values
1171
+ remove_instance_variable(:@authority) if defined?(@authority)
1172
+ remove_instance_variable(:@normalized_host) if defined?(@normalized_host)
1173
+ remove_composite_values
1174
+
1175
+ # Ensure we haven't created an invalid URI
1176
+ validate()
1177
+ end
1178
+
1179
+ ##
1180
+ # This method is same as URI::Generic#host except
1181
+ # brackets for IPv6 (and 'IPvFuture') addresses are removed.
1182
+ #
1183
+ # @see Addressable::URI#host
1184
+ #
1185
+ # @return [String] The hostname for this URI.
1186
+ def hostname
1187
+ v = self.host
1188
+ /\A\[(.*)\]\z/ =~ v ? $1 : v
1189
+ end
1190
+
1191
+ ##
1192
+ # This method is same as URI::Generic#host= except
1193
+ # the argument can be a bare IPv6 address (or 'IPvFuture').
1194
+ #
1195
+ # @see Addressable::URI#host=
1196
+ #
1197
+ # @param [String, #to_str] new_hostname The new hostname for this URI.
1198
+ def hostname=(new_hostname)
1199
+ if new_hostname &&
1200
+ (new_hostname.respond_to?(:ipv4?) || new_hostname.respond_to?(:ipv6?))
1201
+ new_hostname = new_hostname.to_s
1202
+ elsif new_hostname && !new_hostname.respond_to?(:to_str)
1203
+ raise TypeError, "Can't convert #{new_hostname.class} into String."
1204
+ end
1205
+ v = new_hostname ? new_hostname.to_str : nil
1206
+ v = "[#{v}]" if /\A\[.*\]\z/ !~ v && /:/ =~ v
1207
+ self.host = v
1208
+ end
1209
+
1210
+ ##
1211
+ # Returns the top-level domain for this host.
1212
+ #
1213
+ # @example
1214
+ # Addressable::URI.parse("http://www.example.co.uk").tld # => "co.uk"
1215
+ def tld
1216
+ PublicSuffix.parse(self.host, ignore_private: true).tld
1217
+ end
1218
+
1219
+ ##
1220
+ # Sets the top-level domain for this URI.
1221
+ #
1222
+ # @param [String, #to_str] new_tld The new top-level domain.
1223
+ def tld=(new_tld)
1224
+ replaced_tld = host.sub(/#{tld}\z/, new_tld)
1225
+ self.host = PublicSuffix::Domain.new(replaced_tld).to_s
1226
+ end
1227
+
1228
+ ##
1229
+ # Returns the public suffix domain for this host.
1230
+ #
1231
+ # @example
1232
+ # Addressable::URI.parse("http://www.example.co.uk").domain # => "example.co.uk"
1233
+ def domain
1234
+ PublicSuffix.domain(self.host, ignore_private: true)
1235
+ end
1236
+
1237
+ ##
1238
+ # The authority component for this URI.
1239
+ # Combines the user, password, host, and port components.
1240
+ #
1241
+ # @return [String] The authority component.
1242
+ def authority
1243
+ self.host && @authority ||= begin
1244
+ authority = String.new
1245
+ if self.userinfo != nil
1246
+ authority << "#{self.userinfo}@"
1247
+ end
1248
+ authority << self.host
1249
+ if self.port != nil
1250
+ authority << ":#{self.port}"
1251
+ end
1252
+ authority
1253
+ end
1254
+ end
1255
+
1256
+ ##
1257
+ # The authority component for this URI, normalized.
1258
+ #
1259
+ # @return [String] The authority component, normalized.
1260
+ def normalized_authority
1261
+ return nil unless self.authority
1262
+ @normalized_authority ||= begin
1263
+ authority = String.new
1264
+ if self.normalized_userinfo != nil
1265
+ authority << "#{self.normalized_userinfo}@"
1266
+ end
1267
+ authority << self.normalized_host
1268
+ if self.normalized_port != nil
1269
+ authority << ":#{self.normalized_port}"
1270
+ end
1271
+ authority
1272
+ end
1273
+ # All normalized values should be UTF-8
1274
+ if @normalized_authority
1275
+ @normalized_authority.force_encoding(Encoding::UTF_8)
1276
+ end
1277
+ @normalized_authority
1278
+ end
1279
+
1280
+ ##
1281
+ # Sets the authority component for this URI.
1282
+ #
1283
+ # @param [String, #to_str] new_authority The new authority component.
1284
+ def authority=(new_authority)
1285
+ if new_authority
1286
+ if !new_authority.respond_to?(:to_str)
1287
+ raise TypeError, "Can't convert #{new_authority.class} into String."
1288
+ end
1289
+ new_authority = new_authority.to_str
1290
+ new_userinfo = new_authority[/^([^\[\]]*)@/, 1]
1291
+ if new_userinfo
1292
+ new_user = new_userinfo.strip[/^([^:]*):?/, 1]
1293
+ new_password = new_userinfo.strip[/:(.*)$/, 1]
1294
+ end
1295
+ new_host = new_authority.sub(
1296
+ /^([^\[\]]*)@/, EMPTY_STR
1297
+ ).sub(
1298
+ /:([^:@\[\]]*?)$/, EMPTY_STR
1299
+ )
1300
+ new_port =
1301
+ new_authority[/:([^:@\[\]]*?)$/, 1]
1302
+ end
1303
+
1304
+ # Password assigned first to ensure validity in case of nil
1305
+ self.password = defined?(new_password) ? new_password : nil
1306
+ self.user = defined?(new_user) ? new_user : nil
1307
+ self.host = defined?(new_host) ? new_host : nil
1308
+ self.port = defined?(new_port) ? new_port : nil
1309
+
1310
+ # Reset dependent values
1311
+ remove_instance_variable(:@userinfo) if defined?(@userinfo)
1312
+ remove_instance_variable(:@normalized_userinfo) if defined?(@normalized_userinfo)
1313
+ remove_composite_values
1314
+
1315
+ # Ensure we haven't created an invalid URI
1316
+ validate()
1317
+ end
1318
+
1319
+ ##
1320
+ # The origin for this URI, serialized to ASCII, as per
1321
+ # RFC 6454, section 6.2.
1322
+ #
1323
+ # @return [String] The serialized origin.
1324
+ def origin
1325
+ if self.scheme && self.authority
1326
+ if self.normalized_port
1327
+ "#{self.normalized_scheme}://#{self.normalized_host}" +
1328
+ ":#{self.normalized_port}"
1329
+ else
1330
+ "#{self.normalized_scheme}://#{self.normalized_host}"
1331
+ end
1332
+ else
1333
+ "null"
1334
+ end
1335
+ end
1336
+
1337
+ ##
1338
+ # Sets the origin for this URI, serialized to ASCII, as per
1339
+ # RFC 6454, section 6.2. This assignment will reset the `userinfo`
1340
+ # component.
1341
+ #
1342
+ # @param [String, #to_str] new_origin The new origin component.
1343
+ def origin=(new_origin)
1344
+ if new_origin
1345
+ if !new_origin.respond_to?(:to_str)
1346
+ raise TypeError, "Can't convert #{new_origin.class} into String."
1347
+ end
1348
+ new_origin = new_origin.to_str
1349
+ new_scheme = new_origin[/^([^:\/?#]+):\/\//, 1]
1350
+ unless new_scheme
1351
+ raise InvalidURIError, 'An origin cannot omit the scheme.'
1352
+ end
1353
+ new_host = new_origin[/:\/\/([^\/?#:]+)/, 1]
1354
+ unless new_host
1355
+ raise InvalidURIError, 'An origin cannot omit the host.'
1356
+ end
1357
+ new_port = new_origin[/:([^:@\[\]\/]*?)$/, 1]
1358
+ end
1359
+
1360
+ self.scheme = defined?(new_scheme) ? new_scheme : nil
1361
+ self.host = defined?(new_host) ? new_host : nil
1362
+ self.port = defined?(new_port) ? new_port : nil
1363
+ self.userinfo = nil
1364
+
1365
+ # Reset dependent values
1366
+ remove_instance_variable(:@userinfo) if defined?(@userinfo)
1367
+ remove_instance_variable(:@normalized_userinfo) if defined?(@normalized_userinfo)
1368
+ remove_instance_variable(:@authority) if defined?(@authority)
1369
+ remove_instance_variable(:@normalized_authority) if defined?(@normalized_authority)
1370
+ remove_composite_values
1371
+
1372
+ # Ensure we haven't created an invalid URI
1373
+ validate()
1374
+ end
1375
+
1376
+ # Returns an array of known ip-based schemes. These schemes typically
1377
+ # use a similar URI form:
1378
+ # <code>//<user>:<password>@<host>:<port>/<url-path></code>
1379
+ def self.ip_based_schemes
1380
+ return self.port_mapping.keys
1381
+ end
1382
+
1383
+ # Returns a hash of common IP-based schemes and their default port
1384
+ # numbers. Adding new schemes to this hash, as necessary, will allow
1385
+ # for better URI normalization.
1386
+ def self.port_mapping
1387
+ PORT_MAPPING
1388
+ end
1389
+
1390
+ ##
1391
+ # The port component for this URI.
1392
+ # This is the port number actually given in the URI. This does not
1393
+ # infer port numbers from default values.
1394
+ #
1395
+ # @return [Integer] The port component.
1396
+ def port
1397
+ return defined?(@port) ? @port : nil
1398
+ end
1399
+
1400
+ ##
1401
+ # The port component for this URI, normalized.
1402
+ #
1403
+ # @return [Integer] The port component, normalized.
1404
+ def normalized_port
1405
+ return nil unless self.port
1406
+ return @normalized_port if defined?(@normalized_port)
1407
+ @normalized_port ||= begin
1408
+ if URI.port_mapping[self.normalized_scheme] == self.port
1409
+ nil
1410
+ else
1411
+ self.port
1412
+ end
1413
+ end
1414
+ end
1415
+
1416
+ ##
1417
+ # Sets the port component for this URI.
1418
+ #
1419
+ # @param [String, Integer, #to_s] new_port The new port component.
1420
+ def port=(new_port)
1421
+ if new_port != nil && new_port.respond_to?(:to_str)
1422
+ new_port = Addressable::URI.unencode_component(new_port.to_str)
1423
+ end
1424
+
1425
+ if new_port.respond_to?(:valid_encoding?) && !new_port.valid_encoding?
1426
+ raise InvalidURIError, "Invalid encoding in port"
1427
+ end
1428
+
1429
+ if new_port != nil && !(new_port.to_s =~ /^\d+$/)
1430
+ raise InvalidURIError,
1431
+ "Invalid port number: #{new_port.inspect}"
1432
+ end
1433
+
1434
+ @port = new_port.to_s.to_i
1435
+ @port = nil if @port == 0
1436
+
1437
+ # Reset dependent values
1438
+ remove_instance_variable(:@authority) if defined?(@authority)
1439
+ remove_instance_variable(:@normalized_port) if defined?(@normalized_port)
1440
+ remove_composite_values
1441
+
1442
+ # Ensure we haven't created an invalid URI
1443
+ validate()
1444
+ end
1445
+
1446
+ ##
1447
+ # The inferred port component for this URI.
1448
+ # This method will normalize to the default port for the URI's scheme if
1449
+ # the port isn't explicitly specified in the URI.
1450
+ #
1451
+ # @return [Integer] The inferred port component.
1452
+ def inferred_port
1453
+ if self.port.to_i == 0
1454
+ self.default_port
1455
+ else
1456
+ self.port.to_i
1457
+ end
1458
+ end
1459
+
1460
+ ##
1461
+ # The default port for this URI's scheme.
1462
+ # This method will always returns the default port for the URI's scheme
1463
+ # regardless of the presence of an explicit port in the URI.
1464
+ #
1465
+ # @return [Integer] The default port.
1466
+ def default_port
1467
+ URI.port_mapping[self.scheme.strip.downcase] if self.scheme
1468
+ end
1469
+
1470
+ ##
1471
+ # The combination of components that represent a site.
1472
+ # Combines the scheme, user, password, host, and port components.
1473
+ # Primarily useful for HTTP and HTTPS.
1474
+ #
1475
+ # For example, <code>"http://example.com/path?query"</code> would have a
1476
+ # <code>site</code> value of <code>"http://example.com"</code>.
1477
+ #
1478
+ # @return [String] The components that identify a site.
1479
+ def site
1480
+ (self.scheme || self.authority) && @site ||= begin
1481
+ site_string = "".dup
1482
+ site_string << "#{self.scheme}:" if self.scheme != nil
1483
+ site_string << "//#{self.authority}" if self.authority != nil
1484
+ site_string
1485
+ end
1486
+ end
1487
+
1488
+ ##
1489
+ # The normalized combination of components that represent a site.
1490
+ # Combines the scheme, user, password, host, and port components.
1491
+ # Primarily useful for HTTP and HTTPS.
1492
+ #
1493
+ # For example, <code>"http://example.com/path?query"</code> would have a
1494
+ # <code>site</code> value of <code>"http://example.com"</code>.
1495
+ #
1496
+ # @return [String] The normalized components that identify a site.
1497
+ def normalized_site
1498
+ return nil unless self.site
1499
+ @normalized_site ||= begin
1500
+ site_string = "".dup
1501
+ if self.normalized_scheme != nil
1502
+ site_string << "#{self.normalized_scheme}:"
1503
+ end
1504
+ if self.normalized_authority != nil
1505
+ site_string << "//#{self.normalized_authority}"
1506
+ end
1507
+ site_string
1508
+ end
1509
+ # All normalized values should be UTF-8
1510
+ @normalized_site.force_encoding(Encoding::UTF_8) if @normalized_site
1511
+ @normalized_site
1512
+ end
1513
+
1514
+ ##
1515
+ # Sets the site value for this URI.
1516
+ #
1517
+ # @param [String, #to_str] new_site The new site value.
1518
+ def site=(new_site)
1519
+ if new_site
1520
+ if !new_site.respond_to?(:to_str)
1521
+ raise TypeError, "Can't convert #{new_site.class} into String."
1522
+ end
1523
+ new_site = new_site.to_str
1524
+ # These two regular expressions derived from the primary parsing
1525
+ # expression
1526
+ self.scheme = new_site[/^(?:([^:\/?#]+):)?(?:\/\/(?:[^\/?#]*))?$/, 1]
1527
+ self.authority = new_site[
1528
+ /^(?:(?:[^:\/?#]+):)?(?:\/\/([^\/?#]*))?$/, 1
1529
+ ]
1530
+ else
1531
+ self.scheme = nil
1532
+ self.authority = nil
1533
+ end
1534
+ end
1535
+
1536
+ ##
1537
+ # The path component for this URI.
1538
+ #
1539
+ # @return [String] The path component.
1540
+ def path
1541
+ return defined?(@path) ? @path : EMPTY_STR
1542
+ end
1543
+
1544
+ NORMPATH = /^(?!\/)[^\/:]*:.*$/
1545
+ ##
1546
+ # The path component for this URI, normalized.
1547
+ #
1548
+ # @return [String] The path component, normalized.
1549
+ def normalized_path
1550
+ @normalized_path ||= begin
1551
+ path = self.path.to_s
1552
+ if self.scheme == nil && path =~ NORMPATH
1553
+ # Relative paths with colons in the first segment are ambiguous.
1554
+ path = path.sub(":", "%2F")
1555
+ end
1556
+ # String#split(delimeter, -1) uses the more strict splitting behavior
1557
+ # found by default in Python.
1558
+ result = path.strip.split(SLASH, -1).map do |segment|
1559
+ Addressable::URI.normalize_component(
1560
+ segment,
1561
+ Addressable::URI::NormalizeCharacterClasses::PCHAR
1562
+ )
1563
+ end.join(SLASH)
1564
+
1565
+ result = URI.normalize_path(result)
1566
+ if result.empty? &&
1567
+ ["http", "https", "ftp", "tftp"].include?(self.normalized_scheme)
1568
+ result = SLASH.dup
1569
+ end
1570
+ result
1571
+ end
1572
+ # All normalized values should be UTF-8
1573
+ @normalized_path.force_encoding(Encoding::UTF_8) if @normalized_path
1574
+ @normalized_path
1575
+ end
1576
+
1577
+ ##
1578
+ # Sets the path component for this URI.
1579
+ #
1580
+ # @param [String, #to_str] new_path The new path component.
1581
+ def path=(new_path)
1582
+ if new_path && !new_path.respond_to?(:to_str)
1583
+ raise TypeError, "Can't convert #{new_path.class} into String."
1584
+ end
1585
+ @path = (new_path || EMPTY_STR).to_str
1586
+ if !@path.empty? && @path[0..0] != SLASH && host != nil
1587
+ @path = "/#{@path}"
1588
+ end
1589
+
1590
+ # Reset dependent values
1591
+ remove_instance_variable(:@normalized_path) if defined?(@normalized_path)
1592
+ remove_composite_values
1593
+
1594
+ # Ensure we haven't created an invalid URI
1595
+ validate()
1596
+ end
1597
+
1598
+ ##
1599
+ # The basename, if any, of the file in the path component.
1600
+ #
1601
+ # @return [String] The path's basename.
1602
+ def basename
1603
+ # Path cannot be nil
1604
+ return File.basename(self.path).sub(/;[^\/]*$/, EMPTY_STR)
1605
+ end
1606
+
1607
+ ##
1608
+ # The extname, if any, of the file in the path component.
1609
+ # Empty string if there is no extension.
1610
+ #
1611
+ # @return [String] The path's extname.
1612
+ def extname
1613
+ return nil unless self.path
1614
+ return File.extname(self.basename)
1615
+ end
1616
+
1617
+ ##
1618
+ # The query component for this URI.
1619
+ #
1620
+ # @return [String] The query component.
1621
+ def query
1622
+ return defined?(@query) ? @query : nil
1623
+ end
1624
+
1625
+ ##
1626
+ # The query component for this URI, normalized.
1627
+ #
1628
+ # @return [String] The query component, normalized.
1629
+ def normalized_query(*flags)
1630
+ return nil unless self.query
1631
+ return @normalized_query if defined?(@normalized_query)
1632
+ @normalized_query ||= begin
1633
+ modified_query_class = Addressable::URI::CharacterClasses::QUERY.dup
1634
+ # Make sure possible key-value pair delimiters are escaped.
1635
+ modified_query_class.sub!("\\&", "").sub!("\\;", "")
1636
+ pairs = (query || "").split("&", -1)
1637
+ pairs.delete_if(&:empty?).uniq! if flags.include?(:compacted)
1638
+ pairs.sort! if flags.include?(:sorted)
1639
+ component = pairs.map do |pair|
1640
+ Addressable::URI.normalize_component(
1641
+ pair,
1642
+ Addressable::URI::NormalizeCharacterClasses::QUERY,
1643
+ "+"
1644
+ )
1645
+ end.join("&")
1646
+ component == "" ? nil : component
1647
+ end
1648
+ # All normalized values should be UTF-8
1649
+ @normalized_query.force_encoding(Encoding::UTF_8) if @normalized_query
1650
+ @normalized_query
1651
+ end
1652
+
1653
+ ##
1654
+ # Sets the query component for this URI.
1655
+ #
1656
+ # @param [String, #to_str] new_query The new query component.
1657
+ def query=(new_query)
1658
+ if new_query && !new_query.respond_to?(:to_str)
1659
+ raise TypeError, "Can't convert #{new_query.class} into String."
1660
+ end
1661
+ @query = new_query ? new_query.to_str : nil
1662
+
1663
+ # Reset dependent values
1664
+ remove_instance_variable(:@normalized_query) if defined?(@normalized_query)
1665
+ remove_composite_values
1666
+ end
1667
+
1668
+ ##
1669
+ # Converts the query component to a Hash value.
1670
+ #
1671
+ # @param [Class] return_type The return type desired. Value must be either
1672
+ # `Hash` or `Array`.
1673
+ #
1674
+ # @return [Hash, Array, nil] The query string parsed as a Hash or Array
1675
+ # or nil if the query string is blank.
1676
+ #
1677
+ # @example
1678
+ # Addressable::URI.parse("?one=1&two=2&three=3").query_values
1679
+ # #=> {"one" => "1", "two" => "2", "three" => "3"}
1680
+ # Addressable::URI.parse("?one=two&one=three").query_values(Array)
1681
+ # #=> [["one", "two"], ["one", "three"]]
1682
+ # Addressable::URI.parse("?one=two&one=three").query_values(Hash)
1683
+ # #=> {"one" => "three"}
1684
+ # Addressable::URI.parse("?").query_values
1685
+ # #=> {}
1686
+ # Addressable::URI.parse("").query_values
1687
+ # #=> nil
1688
+ def query_values(return_type=Hash)
1689
+ empty_accumulator = Array == return_type ? [] : {}
1690
+ if return_type != Hash && return_type != Array
1691
+ raise ArgumentError, "Invalid return type. Must be Hash or Array."
1692
+ end
1693
+ return nil if self.query == nil
1694
+ split_query = self.query.split("&").map do |pair|
1695
+ pair.split("=", 2) if pair && !pair.empty?
1696
+ end.compact
1697
+ return split_query.inject(empty_accumulator.dup) do |accu, pair|
1698
+ # I'd rather use key/value identifiers instead of array lookups,
1699
+ # but in this case I really want to maintain the exact pair structure,
1700
+ # so it's best to make all changes in-place.
1701
+ pair[0] = URI.unencode_component(pair[0])
1702
+ if pair[1].respond_to?(:to_str)
1703
+ value = pair[1].to_str
1704
+ # I loathe the fact that I have to do this. Stupid HTML 4.01.
1705
+ # Treating '+' as a space was just an unbelievably bad idea.
1706
+ # There was nothing wrong with '%20'!
1707
+ # If it ain't broke, don't fix it!
1708
+ value = value.tr("+", " ") if ["http", "https", nil].include?(scheme)
1709
+ pair[1] = URI.unencode_component(value)
1710
+ end
1711
+ if return_type == Hash
1712
+ accu[pair[0]] = pair[1]
1713
+ else
1714
+ accu << pair
1715
+ end
1716
+ accu
1717
+ end
1718
+ end
1719
+
1720
+ ##
1721
+ # Sets the query component for this URI from a Hash object.
1722
+ # An empty Hash or Array will result in an empty query string.
1723
+ #
1724
+ # @param [Hash, #to_hash, Array] new_query_values The new query values.
1725
+ #
1726
+ # @example
1727
+ # uri.query_values = {:a => "a", :b => ["c", "d", "e"]}
1728
+ # uri.query
1729
+ # # => "a=a&b=c&b=d&b=e"
1730
+ # uri.query_values = [['a', 'a'], ['b', 'c'], ['b', 'd'], ['b', 'e']]
1731
+ # uri.query
1732
+ # # => "a=a&b=c&b=d&b=e"
1733
+ # uri.query_values = [['a', 'a'], ['b', ['c', 'd', 'e']]]
1734
+ # uri.query
1735
+ # # => "a=a&b=c&b=d&b=e"
1736
+ # uri.query_values = [['flag'], ['key', 'value']]
1737
+ # uri.query
1738
+ # # => "flag&key=value"
1739
+ def query_values=(new_query_values)
1740
+ if new_query_values == nil
1741
+ self.query = nil
1742
+ return nil
1743
+ end
1744
+
1745
+ if !new_query_values.is_a?(Array)
1746
+ if !new_query_values.respond_to?(:to_hash)
1747
+ raise TypeError,
1748
+ "Can't convert #{new_query_values.class} into Hash."
1749
+ end
1750
+ new_query_values = new_query_values.to_hash
1751
+ new_query_values = new_query_values.map do |key, value|
1752
+ key = key.to_s if key.kind_of?(Symbol)
1753
+ [key, value]
1754
+ end
1755
+ # Useful default for OAuth and caching.
1756
+ # Only to be used for non-Array inputs. Arrays should preserve order.
1757
+ new_query_values.sort!
1758
+ end
1759
+
1760
+ # new_query_values have form [['key1', 'value1'], ['key2', 'value2']]
1761
+ buffer = "".dup
1762
+ new_query_values.each do |key, value|
1763
+ encoded_key = URI.encode_component(
1764
+ key, CharacterClasses::UNRESERVED
1765
+ )
1766
+ if value == nil
1767
+ buffer << "#{encoded_key}&"
1768
+ elsif value.kind_of?(Array)
1769
+ value.each do |sub_value|
1770
+ encoded_value = URI.encode_component(
1771
+ sub_value, CharacterClasses::UNRESERVED
1772
+ )
1773
+ buffer << "#{encoded_key}=#{encoded_value}&"
1774
+ end
1775
+ else
1776
+ encoded_value = URI.encode_component(
1777
+ value, CharacterClasses::UNRESERVED
1778
+ )
1779
+ buffer << "#{encoded_key}=#{encoded_value}&"
1780
+ end
1781
+ end
1782
+ self.query = buffer.chop
1783
+ end
1784
+
1785
+ ##
1786
+ # The HTTP request URI for this URI. This is the path and the
1787
+ # query string.
1788
+ #
1789
+ # @return [String] The request URI required for an HTTP request.
1790
+ def request_uri
1791
+ return nil if self.absolute? && self.scheme !~ /^https?$/i
1792
+ return (
1793
+ (!self.path.empty? ? self.path : SLASH) +
1794
+ (self.query ? "?#{self.query}" : EMPTY_STR)
1795
+ )
1796
+ end
1797
+
1798
+ ##
1799
+ # Sets the HTTP request URI for this URI.
1800
+ #
1801
+ # @param [String, #to_str] new_request_uri The new HTTP request URI.
1802
+ def request_uri=(new_request_uri)
1803
+ if !new_request_uri.respond_to?(:to_str)
1804
+ raise TypeError, "Can't convert #{new_request_uri.class} into String."
1805
+ end
1806
+ if self.absolute? && self.scheme !~ /^https?$/i
1807
+ raise InvalidURIError,
1808
+ "Cannot set an HTTP request URI for a non-HTTP URI."
1809
+ end
1810
+ new_request_uri = new_request_uri.to_str
1811
+ path_component = new_request_uri[/^([^\?]*)\??(?:.*)$/, 1]
1812
+ query_component = new_request_uri[/^(?:[^\?]*)\?(.*)$/, 1]
1813
+ path_component = path_component.to_s
1814
+ path_component = (!path_component.empty? ? path_component : SLASH)
1815
+ self.path = path_component
1816
+ self.query = query_component
1817
+
1818
+ # Reset dependent values
1819
+ remove_composite_values
1820
+ end
1821
+
1822
+ ##
1823
+ # The fragment component for this URI.
1824
+ #
1825
+ # @return [String] The fragment component.
1826
+ def fragment
1827
+ return defined?(@fragment) ? @fragment : nil
1828
+ end
1829
+
1830
+ ##
1831
+ # The fragment component for this URI, normalized.
1832
+ #
1833
+ # @return [String] The fragment component, normalized.
1834
+ def normalized_fragment
1835
+ return nil unless self.fragment
1836
+ return @normalized_fragment if defined?(@normalized_fragment)
1837
+ @normalized_fragment ||= begin
1838
+ component = Addressable::URI.normalize_component(
1839
+ self.fragment,
1840
+ Addressable::URI::NormalizeCharacterClasses::FRAGMENT
1841
+ )
1842
+ component == "" ? nil : component
1843
+ end
1844
+ # All normalized values should be UTF-8
1845
+ if @normalized_fragment
1846
+ @normalized_fragment.force_encoding(Encoding::UTF_8)
1847
+ end
1848
+ @normalized_fragment
1849
+ end
1850
+
1851
+ ##
1852
+ # Sets the fragment component for this URI.
1853
+ #
1854
+ # @param [String, #to_str] new_fragment The new fragment component.
1855
+ def fragment=(new_fragment)
1856
+ if new_fragment && !new_fragment.respond_to?(:to_str)
1857
+ raise TypeError, "Can't convert #{new_fragment.class} into String."
1858
+ end
1859
+ @fragment = new_fragment ? new_fragment.to_str : nil
1860
+
1861
+ # Reset dependent values
1862
+ remove_instance_variable(:@normalized_fragment) if defined?(@normalized_fragment)
1863
+ remove_composite_values
1864
+
1865
+ # Ensure we haven't created an invalid URI
1866
+ validate()
1867
+ end
1868
+
1869
+ ##
1870
+ # Determines if the scheme indicates an IP-based protocol.
1871
+ #
1872
+ # @return [TrueClass, FalseClass]
1873
+ # <code>true</code> if the scheme indicates an IP-based protocol.
1874
+ # <code>false</code> otherwise.
1875
+ def ip_based?
1876
+ if self.scheme
1877
+ return URI.ip_based_schemes.include?(
1878
+ self.scheme.strip.downcase)
1879
+ end
1880
+ return false
1881
+ end
1882
+
1883
+ ##
1884
+ # Determines if the URI is relative.
1885
+ #
1886
+ # @return [TrueClass, FalseClass]
1887
+ # <code>true</code> if the URI is relative. <code>false</code>
1888
+ # otherwise.
1889
+ def relative?
1890
+ return self.scheme.nil?
1891
+ end
1892
+
1893
+ ##
1894
+ # Determines if the URI is absolute.
1895
+ #
1896
+ # @return [TrueClass, FalseClass]
1897
+ # <code>true</code> if the URI is absolute. <code>false</code>
1898
+ # otherwise.
1899
+ def absolute?
1900
+ return !relative?
1901
+ end
1902
+
1903
+ ##
1904
+ # Joins two URIs together.
1905
+ #
1906
+ # @param [String, Addressable::URI, #to_str] The URI to join with.
1907
+ #
1908
+ # @return [Addressable::URI] The joined URI.
1909
+ def join(uri)
1910
+ if !uri.respond_to?(:to_str)
1911
+ raise TypeError, "Can't convert #{uri.class} into String."
1912
+ end
1913
+ if !uri.kind_of?(URI)
1914
+ # Otherwise, convert to a String, then parse.
1915
+ uri = URI.parse(uri.to_str)
1916
+ end
1917
+ if uri.to_s.empty?
1918
+ return self.dup
1919
+ end
1920
+
1921
+ joined_scheme = nil
1922
+ joined_user = nil
1923
+ joined_password = nil
1924
+ joined_host = nil
1925
+ joined_port = nil
1926
+ joined_path = nil
1927
+ joined_query = nil
1928
+ joined_fragment = nil
1929
+
1930
+ # Section 5.2.2 of RFC 3986
1931
+ if uri.scheme != nil
1932
+ joined_scheme = uri.scheme
1933
+ joined_user = uri.user
1934
+ joined_password = uri.password
1935
+ joined_host = uri.host
1936
+ joined_port = uri.port
1937
+ joined_path = URI.normalize_path(uri.path)
1938
+ joined_query = uri.query
1939
+ else
1940
+ if uri.authority != nil
1941
+ joined_user = uri.user
1942
+ joined_password = uri.password
1943
+ joined_host = uri.host
1944
+ joined_port = uri.port
1945
+ joined_path = URI.normalize_path(uri.path)
1946
+ joined_query = uri.query
1947
+ else
1948
+ if uri.path == nil || uri.path.empty?
1949
+ joined_path = self.path
1950
+ if uri.query != nil
1951
+ joined_query = uri.query
1952
+ else
1953
+ joined_query = self.query
1954
+ end
1955
+ else
1956
+ if uri.path[0..0] == SLASH
1957
+ joined_path = URI.normalize_path(uri.path)
1958
+ else
1959
+ base_path = self.path.dup
1960
+ base_path = EMPTY_STR if base_path == nil
1961
+ base_path = URI.normalize_path(base_path)
1962
+
1963
+ # Section 5.2.3 of RFC 3986
1964
+ #
1965
+ # Removes the right-most path segment from the base path.
1966
+ if base_path.include?(SLASH)
1967
+ base_path.sub!(/\/[^\/]+$/, SLASH)
1968
+ else
1969
+ base_path = EMPTY_STR
1970
+ end
1971
+
1972
+ # If the base path is empty and an authority segment has been
1973
+ # defined, use a base path of SLASH
1974
+ if base_path.empty? && self.authority != nil
1975
+ base_path = SLASH
1976
+ end
1977
+
1978
+ joined_path = URI.normalize_path(base_path + uri.path)
1979
+ end
1980
+ joined_query = uri.query
1981
+ end
1982
+ joined_user = self.user
1983
+ joined_password = self.password
1984
+ joined_host = self.host
1985
+ joined_port = self.port
1986
+ end
1987
+ joined_scheme = self.scheme
1988
+ end
1989
+ joined_fragment = uri.fragment
1990
+
1991
+ return self.class.new(
1992
+ :scheme => joined_scheme,
1993
+ :user => joined_user,
1994
+ :password => joined_password,
1995
+ :host => joined_host,
1996
+ :port => joined_port,
1997
+ :path => joined_path,
1998
+ :query => joined_query,
1999
+ :fragment => joined_fragment
2000
+ )
2001
+ end
2002
+ alias_method :+, :join
2003
+
2004
+ ##
2005
+ # Destructive form of <code>join</code>.
2006
+ #
2007
+ # @param [String, Addressable::URI, #to_str] The URI to join with.
2008
+ #
2009
+ # @return [Addressable::URI] The joined URI.
2010
+ #
2011
+ # @see Addressable::URI#join
2012
+ def join!(uri)
2013
+ replace_self(self.join(uri))
2014
+ end
2015
+
2016
+ ##
2017
+ # Merges a URI with a <code>Hash</code> of components.
2018
+ # This method has different behavior from <code>join</code>. Any
2019
+ # components present in the <code>hash</code> parameter will override the
2020
+ # original components. The path component is not treated specially.
2021
+ #
2022
+ # @param [Hash, Addressable::URI, #to_hash] The components to merge with.
2023
+ #
2024
+ # @return [Addressable::URI] The merged URI.
2025
+ #
2026
+ # @see Hash#merge
2027
+ def merge(hash)
2028
+ if !hash.respond_to?(:to_hash)
2029
+ raise TypeError, "Can't convert #{hash.class} into Hash."
2030
+ end
2031
+ hash = hash.to_hash
2032
+
2033
+ if hash.has_key?(:authority)
2034
+ if (hash.keys & [:userinfo, :user, :password, :host, :port]).any?
2035
+ raise ArgumentError,
2036
+ "Cannot specify both an authority and any of the components " +
2037
+ "within the authority."
2038
+ end
2039
+ end
2040
+ if hash.has_key?(:userinfo)
2041
+ if (hash.keys & [:user, :password]).any?
2042
+ raise ArgumentError,
2043
+ "Cannot specify both a userinfo and either the user or password."
2044
+ end
2045
+ end
2046
+
2047
+ uri = self.class.new
2048
+ uri.defer_validation do
2049
+ # Bunch of crazy logic required because of the composite components
2050
+ # like userinfo and authority.
2051
+ uri.scheme =
2052
+ hash.has_key?(:scheme) ? hash[:scheme] : self.scheme
2053
+ if hash.has_key?(:authority)
2054
+ uri.authority =
2055
+ hash.has_key?(:authority) ? hash[:authority] : self.authority
2056
+ end
2057
+ if hash.has_key?(:userinfo)
2058
+ uri.userinfo =
2059
+ hash.has_key?(:userinfo) ? hash[:userinfo] : self.userinfo
2060
+ end
2061
+ if !hash.has_key?(:userinfo) && !hash.has_key?(:authority)
2062
+ uri.user =
2063
+ hash.has_key?(:user) ? hash[:user] : self.user
2064
+ uri.password =
2065
+ hash.has_key?(:password) ? hash[:password] : self.password
2066
+ end
2067
+ if !hash.has_key?(:authority)
2068
+ uri.host =
2069
+ hash.has_key?(:host) ? hash[:host] : self.host
2070
+ uri.port =
2071
+ hash.has_key?(:port) ? hash[:port] : self.port
2072
+ end
2073
+ uri.path =
2074
+ hash.has_key?(:path) ? hash[:path] : self.path
2075
+ uri.query =
2076
+ hash.has_key?(:query) ? hash[:query] : self.query
2077
+ uri.fragment =
2078
+ hash.has_key?(:fragment) ? hash[:fragment] : self.fragment
2079
+ end
2080
+
2081
+ return uri
2082
+ end
2083
+
2084
+ ##
2085
+ # Destructive form of <code>merge</code>.
2086
+ #
2087
+ # @param [Hash, Addressable::URI, #to_hash] The components to merge with.
2088
+ #
2089
+ # @return [Addressable::URI] The merged URI.
2090
+ #
2091
+ # @see Addressable::URI#merge
2092
+ def merge!(uri)
2093
+ replace_self(self.merge(uri))
2094
+ end
2095
+
2096
+ ##
2097
+ # Returns the shortest normalized relative form of this URI that uses the
2098
+ # supplied URI as a base for resolution. Returns an absolute URI if
2099
+ # necessary. This is effectively the opposite of <code>route_to</code>.
2100
+ #
2101
+ # @param [String, Addressable::URI, #to_str] uri The URI to route from.
2102
+ #
2103
+ # @return [Addressable::URI]
2104
+ # The normalized relative URI that is equivalent to the original URI.
2105
+ def route_from(uri)
2106
+ uri = URI.parse(uri).normalize
2107
+ normalized_self = self.normalize
2108
+ if normalized_self.relative?
2109
+ raise ArgumentError, "Expected absolute URI, got: #{self.to_s}"
2110
+ end
2111
+ if uri.relative?
2112
+ raise ArgumentError, "Expected absolute URI, got: #{uri.to_s}"
2113
+ end
2114
+ if normalized_self == uri
2115
+ return Addressable::URI.parse("##{normalized_self.fragment}")
2116
+ end
2117
+ components = normalized_self.to_hash
2118
+ if normalized_self.scheme == uri.scheme
2119
+ components[:scheme] = nil
2120
+ if normalized_self.authority == uri.authority
2121
+ components[:user] = nil
2122
+ components[:password] = nil
2123
+ components[:host] = nil
2124
+ components[:port] = nil
2125
+ if normalized_self.path == uri.path
2126
+ components[:path] = nil
2127
+ if normalized_self.query == uri.query
2128
+ components[:query] = nil
2129
+ end
2130
+ else
2131
+ if uri.path != SLASH and components[:path]
2132
+ self_splitted_path = split_path(components[:path])
2133
+ uri_splitted_path = split_path(uri.path)
2134
+ self_dir = self_splitted_path.shift
2135
+ uri_dir = uri_splitted_path.shift
2136
+ while !self_splitted_path.empty? && !uri_splitted_path.empty? and self_dir == uri_dir
2137
+ self_dir = self_splitted_path.shift
2138
+ uri_dir = uri_splitted_path.shift
2139
+ end
2140
+ components[:path] = (uri_splitted_path.fill('..') + [self_dir] + self_splitted_path).join(SLASH)
2141
+ end
2142
+ end
2143
+ end
2144
+ end
2145
+ # Avoid network-path references.
2146
+ if components[:host] != nil
2147
+ components[:scheme] = normalized_self.scheme
2148
+ end
2149
+ return Addressable::URI.new(
2150
+ :scheme => components[:scheme],
2151
+ :user => components[:user],
2152
+ :password => components[:password],
2153
+ :host => components[:host],
2154
+ :port => components[:port],
2155
+ :path => components[:path],
2156
+ :query => components[:query],
2157
+ :fragment => components[:fragment]
2158
+ )
2159
+ end
2160
+
2161
+ ##
2162
+ # Returns the shortest normalized relative form of the supplied URI that
2163
+ # uses this URI as a base for resolution. Returns an absolute URI if
2164
+ # necessary. This is effectively the opposite of <code>route_from</code>.
2165
+ #
2166
+ # @param [String, Addressable::URI, #to_str] uri The URI to route to.
2167
+ #
2168
+ # @return [Addressable::URI]
2169
+ # The normalized relative URI that is equivalent to the supplied URI.
2170
+ def route_to(uri)
2171
+ return URI.parse(uri).route_from(self)
2172
+ end
2173
+
2174
+ ##
2175
+ # Returns a normalized URI object.
2176
+ #
2177
+ # NOTE: This method does not attempt to fully conform to specifications.
2178
+ # It exists largely to correct other people's failures to read the
2179
+ # specifications, and also to deal with caching issues since several
2180
+ # different URIs may represent the same resource and should not be
2181
+ # cached multiple times.
2182
+ #
2183
+ # @return [Addressable::URI] The normalized URI.
2184
+ def normalize
2185
+ # This is a special exception for the frequently misused feed
2186
+ # URI scheme.
2187
+ if normalized_scheme == "feed"
2188
+ if self.to_s =~ /^feed:\/*http:\/*/
2189
+ return URI.parse(
2190
+ self.to_s[/^feed:\/*(http:\/*.*)/, 1]
2191
+ ).normalize
2192
+ end
2193
+ end
2194
+
2195
+ return self.class.new(
2196
+ :scheme => normalized_scheme,
2197
+ :authority => normalized_authority,
2198
+ :path => normalized_path,
2199
+ :query => normalized_query,
2200
+ :fragment => normalized_fragment
2201
+ )
2202
+ end
2203
+
2204
+ ##
2205
+ # Destructively normalizes this URI object.
2206
+ #
2207
+ # @return [Addressable::URI] The normalized URI.
2208
+ #
2209
+ # @see Addressable::URI#normalize
2210
+ def normalize!
2211
+ replace_self(self.normalize)
2212
+ end
2213
+
2214
+ ##
2215
+ # Creates a URI suitable for display to users. If semantic attacks are
2216
+ # likely, the application should try to detect these and warn the user.
2217
+ # See <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>,
2218
+ # section 7.6 for more information.
2219
+ #
2220
+ # @return [Addressable::URI] A URI suitable for display purposes.
2221
+ def display_uri
2222
+ display_uri = self.normalize
2223
+ display_uri.host = ::Addressable::IDNA.to_unicode(display_uri.host)
2224
+ return display_uri
2225
+ end
2226
+
2227
+ ##
2228
+ # Returns <code>true</code> if the URI objects are equal. This method
2229
+ # normalizes both URIs before doing the comparison, and allows comparison
2230
+ # against <code>Strings</code>.
2231
+ #
2232
+ # @param [Object] uri The URI to compare.
2233
+ #
2234
+ # @return [TrueClass, FalseClass]
2235
+ # <code>true</code> if the URIs are equivalent, <code>false</code>
2236
+ # otherwise.
2237
+ def ===(uri)
2238
+ if uri.respond_to?(:normalize)
2239
+ uri_string = uri.normalize.to_s
2240
+ else
2241
+ begin
2242
+ uri_string = ::Addressable::URI.parse(uri).normalize.to_s
2243
+ rescue InvalidURIError, TypeError
2244
+ return false
2245
+ end
2246
+ end
2247
+ return self.normalize.to_s == uri_string
2248
+ end
2249
+
2250
+ ##
2251
+ # Returns <code>true</code> if the URI objects are equal. This method
2252
+ # normalizes both URIs before doing the comparison.
2253
+ #
2254
+ # @param [Object] uri The URI to compare.
2255
+ #
2256
+ # @return [TrueClass, FalseClass]
2257
+ # <code>true</code> if the URIs are equivalent, <code>false</code>
2258
+ # otherwise.
2259
+ def ==(uri)
2260
+ return false unless uri.kind_of?(URI)
2261
+ return self.normalize.to_s == uri.normalize.to_s
2262
+ end
2263
+
2264
+ ##
2265
+ # Returns <code>true</code> if the URI objects are equal. This method
2266
+ # does NOT normalize either URI before doing the comparison.
2267
+ #
2268
+ # @param [Object] uri The URI to compare.
2269
+ #
2270
+ # @return [TrueClass, FalseClass]
2271
+ # <code>true</code> if the URIs are equivalent, <code>false</code>
2272
+ # otherwise.
2273
+ def eql?(uri)
2274
+ return false unless uri.kind_of?(URI)
2275
+ return self.to_s == uri.to_s
2276
+ end
2277
+
2278
+ ##
2279
+ # A hash value that will make a URI equivalent to its normalized
2280
+ # form.
2281
+ #
2282
+ # @return [Integer] A hash of the URI.
2283
+ def hash
2284
+ @hash ||= self.to_s.hash * -1
2285
+ end
2286
+
2287
+ ##
2288
+ # Clones the URI object.
2289
+ #
2290
+ # @return [Addressable::URI] The cloned URI.
2291
+ def dup
2292
+ duplicated_uri = self.class.new(
2293
+ :scheme => self.scheme ? self.scheme.dup : nil,
2294
+ :user => self.user ? self.user.dup : nil,
2295
+ :password => self.password ? self.password.dup : nil,
2296
+ :host => self.host ? self.host.dup : nil,
2297
+ :port => self.port,
2298
+ :path => self.path ? self.path.dup : nil,
2299
+ :query => self.query ? self.query.dup : nil,
2300
+ :fragment => self.fragment ? self.fragment.dup : nil
2301
+ )
2302
+ return duplicated_uri
2303
+ end
2304
+
2305
+ ##
2306
+ # Omits components from a URI.
2307
+ #
2308
+ # @param [Symbol] *components The components to be omitted.
2309
+ #
2310
+ # @return [Addressable::URI] The URI with components omitted.
2311
+ #
2312
+ # @example
2313
+ # uri = Addressable::URI.parse("http://example.com/path?query")
2314
+ # #=> #<Addressable::URI:0xcc5e7a URI:http://example.com/path?query>
2315
+ # uri.omit(:scheme, :authority)
2316
+ # #=> #<Addressable::URI:0xcc4d86 URI:/path?query>
2317
+ def omit(*components)
2318
+ invalid_components = components - [
2319
+ :scheme, :user, :password, :userinfo, :host, :port, :authority,
2320
+ :path, :query, :fragment
2321
+ ]
2322
+ unless invalid_components.empty?
2323
+ raise ArgumentError,
2324
+ "Invalid component names: #{invalid_components.inspect}."
2325
+ end
2326
+ duplicated_uri = self.dup
2327
+ duplicated_uri.defer_validation do
2328
+ components.each do |component|
2329
+ duplicated_uri.send((component.to_s + "=").to_sym, nil)
2330
+ end
2331
+ duplicated_uri.user = duplicated_uri.normalized_user
2332
+ end
2333
+ duplicated_uri
2334
+ end
2335
+
2336
+ ##
2337
+ # Destructive form of omit.
2338
+ #
2339
+ # @param [Symbol] *components The components to be omitted.
2340
+ #
2341
+ # @return [Addressable::URI] The URI with components omitted.
2342
+ #
2343
+ # @see Addressable::URI#omit
2344
+ def omit!(*components)
2345
+ replace_self(self.omit(*components))
2346
+ end
2347
+
2348
+ ##
2349
+ # Determines if the URI is an empty string.
2350
+ #
2351
+ # @return [TrueClass, FalseClass]
2352
+ # Returns <code>true</code> if empty, <code>false</code> otherwise.
2353
+ def empty?
2354
+ return self.to_s.empty?
2355
+ end
2356
+
2357
+ ##
2358
+ # Converts the URI to a <code>String</code>.
2359
+ #
2360
+ # @return [String] The URI's <code>String</code> representation.
2361
+ def to_s
2362
+ if self.scheme == nil && self.path != nil && !self.path.empty? &&
2363
+ self.path =~ NORMPATH
2364
+ raise InvalidURIError,
2365
+ "Cannot assemble URI string with ambiguous path: '#{self.path}'"
2366
+ end
2367
+ @uri_string ||= begin
2368
+ uri_string = String.new
2369
+ uri_string << "#{self.scheme}:" if self.scheme != nil
2370
+ uri_string << "//#{self.authority}" if self.authority != nil
2371
+ uri_string << self.path.to_s
2372
+ uri_string << "?#{self.query}" if self.query != nil
2373
+ uri_string << "##{self.fragment}" if self.fragment != nil
2374
+ uri_string.force_encoding(Encoding::UTF_8)
2375
+ uri_string
2376
+ end
2377
+ end
2378
+
2379
+ ##
2380
+ # URI's are glorified <code>Strings</code>. Allow implicit conversion.
2381
+ alias_method :to_str, :to_s
2382
+
2383
+ ##
2384
+ # Returns a Hash of the URI components.
2385
+ #
2386
+ # @return [Hash] The URI as a <code>Hash</code> of components.
2387
+ def to_hash
2388
+ return {
2389
+ :scheme => self.scheme,
2390
+ :user => self.user,
2391
+ :password => self.password,
2392
+ :host => self.host,
2393
+ :port => self.port,
2394
+ :path => self.path,
2395
+ :query => self.query,
2396
+ :fragment => self.fragment
2397
+ }
2398
+ end
2399
+
2400
+ ##
2401
+ # Returns a <code>String</code> representation of the URI object's state.
2402
+ #
2403
+ # @return [String] The URI object's state, as a <code>String</code>.
2404
+ def inspect
2405
+ sprintf("#<%s:%#0x URI:%s>", URI.to_s, self.object_id, self.to_s)
2406
+ end
2407
+
2408
+ ##
2409
+ # This method allows you to make several changes to a URI simultaneously,
2410
+ # which separately would cause validation errors, but in conjunction,
2411
+ # are valid. The URI will be revalidated as soon as the entire block has
2412
+ # been executed.
2413
+ #
2414
+ # @param [Proc] block
2415
+ # A set of operations to perform on a given URI.
2416
+ def defer_validation
2417
+ raise LocalJumpError, "No block given." unless block_given?
2418
+ @validation_deferred = true
2419
+ yield
2420
+ @validation_deferred = false
2421
+ validate
2422
+ return nil
2423
+ end
2424
+
2425
+ protected
2426
+ SELF_REF = '.'
2427
+ PARENT = '..'
2428
+
2429
+ RULE_2A = /\/\.\/|\/\.$/
2430
+ RULE_2B_2C = /\/([^\/]*)\/\.\.\/|\/([^\/]*)\/\.\.$/
2431
+ RULE_2D = /^\.\.?\/?/
2432
+ RULE_PREFIXED_PARENT = /^\/\.\.?\/|^(\/\.\.?)+\/?$/
2433
+
2434
+ ##
2435
+ # Resolves paths to their simplest form.
2436
+ #
2437
+ # @param [String] path The path to normalize.
2438
+ #
2439
+ # @return [String] The normalized path.
2440
+ def self.normalize_path(path)
2441
+ # Section 5.2.4 of RFC 3986
2442
+
2443
+ return nil if path.nil?
2444
+ normalized_path = path.dup
2445
+ begin
2446
+ mod = nil
2447
+ mod ||= normalized_path.gsub!(RULE_2A, SLASH)
2448
+
2449
+ pair = normalized_path.match(RULE_2B_2C)
2450
+ parent, current = pair[1], pair[2] if pair
2451
+ if pair && ((parent != SELF_REF && parent != PARENT) ||
2452
+ (current != SELF_REF && current != PARENT))
2453
+ mod ||= normalized_path.gsub!(
2454
+ Regexp.new(
2455
+ "/#{Regexp.escape(parent.to_s)}/\\.\\./|" +
2456
+ "(/#{Regexp.escape(current.to_s)}/\\.\\.$)"
2457
+ ), SLASH
2458
+ )
2459
+ end
2460
+
2461
+ mod ||= normalized_path.gsub!(RULE_2D, EMPTY_STR)
2462
+ # Non-standard, removes prefixed dotted segments from path.
2463
+ mod ||= normalized_path.gsub!(RULE_PREFIXED_PARENT, SLASH)
2464
+ end until mod.nil?
2465
+
2466
+ return normalized_path
2467
+ end
2468
+
2469
+ ##
2470
+ # Ensures that the URI is valid.
2471
+ def validate
2472
+ return if !!@validation_deferred
2473
+ if self.scheme != nil && self.ip_based? &&
2474
+ (self.host == nil || self.host.empty?) &&
2475
+ (self.path == nil || self.path.empty?)
2476
+ raise InvalidURIError,
2477
+ "Absolute URI missing hierarchical segment: '#{self.to_s}'"
2478
+ end
2479
+ if self.host == nil
2480
+ if self.port != nil ||
2481
+ self.user != nil ||
2482
+ self.password != nil
2483
+ raise InvalidURIError, "Hostname not supplied: '#{self.to_s}'"
2484
+ end
2485
+ end
2486
+ if self.path != nil && !self.path.empty? && self.path[0..0] != SLASH &&
2487
+ self.authority != nil
2488
+ raise InvalidURIError,
2489
+ "Cannot have a relative path with an authority set: '#{self.to_s}'"
2490
+ end
2491
+ if self.path != nil && !self.path.empty? &&
2492
+ self.path[0..1] == SLASH + SLASH && self.authority == nil
2493
+ raise InvalidURIError,
2494
+ "Cannot have a path with two leading slashes " +
2495
+ "without an authority set: '#{self.to_s}'"
2496
+ end
2497
+ unreserved = CharacterClasses::UNRESERVED
2498
+ sub_delims = CharacterClasses::SUB_DELIMS
2499
+ if !self.host.nil? && (self.host =~ /[<>{}\/\\\?\#\@"[[:space:]]]/ ||
2500
+ (self.host[/^\[(.*)\]$/, 1] != nil && self.host[/^\[(.*)\]$/, 1] !~
2501
+ Regexp.new("^[#{unreserved}#{sub_delims}:]*$")))
2502
+ raise InvalidURIError, "Invalid character in host: '#{self.host.to_s}'"
2503
+ end
2504
+ return nil
2505
+ end
2506
+
2507
+ ##
2508
+ # Replaces the internal state of self with the specified URI's state.
2509
+ # Used in destructive operations to avoid massive code repetition.
2510
+ #
2511
+ # @param [Addressable::URI] uri The URI to replace <code>self</code> with.
2512
+ #
2513
+ # @return [Addressable::URI] <code>self</code>.
2514
+ def replace_self(uri)
2515
+ # Reset dependent values
2516
+ instance_variables.each do |var|
2517
+ if instance_variable_defined?(var) && var != :@validation_deferred
2518
+ remove_instance_variable(var)
2519
+ end
2520
+ end
2521
+
2522
+ @scheme = uri.scheme
2523
+ @user = uri.user
2524
+ @password = uri.password
2525
+ @host = uri.host
2526
+ @port = uri.port
2527
+ @path = uri.path
2528
+ @query = uri.query
2529
+ @fragment = uri.fragment
2530
+ return self
2531
+ end
2532
+
2533
+ ##
2534
+ # Splits path string with "/" (slash).
2535
+ # It is considered that there is empty string after last slash when
2536
+ # path ends with slash.
2537
+ #
2538
+ # @param [String] path The path to split.
2539
+ #
2540
+ # @return [Array<String>] An array of parts of path.
2541
+ def split_path(path)
2542
+ splitted = path.split(SLASH)
2543
+ splitted << EMPTY_STR if path.end_with? SLASH
2544
+ splitted
2545
+ end
2546
+
2547
+ ##
2548
+ # Resets composite values for the entire URI
2549
+ #
2550
+ # @api private
2551
+ def remove_composite_values
2552
+ remove_instance_variable(:@uri_string) if defined?(@uri_string)
2553
+ remove_instance_variable(:@hash) if defined?(@hash)
2554
+ end
2555
+ end
2556
+ end