allegro_api_client 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (296) hide show
  1. checksums.yaml +7 -0
  2. data/.bundle/config +3 -0
  3. data/Gemfile +3 -0
  4. data/Gemfile.lock +25 -0
  5. data/README.md +19 -0
  6. data/apiclient.gemspec +24 -0
  7. data/gems/ruby/2.1.0/bin/httparty +23 -0
  8. data/gems/ruby/2.1.0/bin/rake +23 -0
  9. data/gems/ruby/2.1.0/build_info/git_repository-0.0.11.info +1 -0
  10. data/gems/ruby/2.1.0/build_info/httparty-0.13.1.info +1 -0
  11. data/gems/ruby/2.1.0/build_info/multi_xml-0.5.5.info +1 -0
  12. data/gems/ruby/2.1.0/build_info/rake-10.3.2.info +1 -0
  13. data/gems/ruby/2.1.0/cache/git_repository-0.0.11.gem +0 -0
  14. data/gems/ruby/2.1.0/cache/httparty-0.13.1.gem +0 -0
  15. data/gems/ruby/2.1.0/cache/multi_xml-0.5.5.gem +0 -0
  16. data/gems/ruby/2.1.0/cache/rake-10.3.2.gem +0 -0
  17. data/gems/ruby/2.1.0/gems/git_repository-0.0.11/lib/git_repository.rb +62 -0
  18. data/gems/ruby/2.1.0/gems/httparty-0.13.1/.gitignore +10 -0
  19. data/gems/ruby/2.1.0/gems/httparty-0.13.1/.travis.yml +7 -0
  20. data/gems/ruby/2.1.0/gems/httparty-0.13.1/Gemfile +14 -0
  21. data/gems/ruby/2.1.0/gems/httparty-0.13.1/Guardfile +16 -0
  22. data/gems/ruby/2.1.0/gems/httparty-0.13.1/History +303 -0
  23. data/gems/ruby/2.1.0/gems/httparty-0.13.1/MIT-LICENSE +20 -0
  24. data/gems/ruby/2.1.0/gems/httparty-0.13.1/README.md +74 -0
  25. data/gems/ruby/2.1.0/gems/httparty-0.13.1/Rakefile +12 -0
  26. data/gems/ruby/2.1.0/gems/httparty-0.13.1/bin/httparty +117 -0
  27. data/gems/ruby/2.1.0/gems/httparty-0.13.1/cucumber.yml +1 -0
  28. data/gems/ruby/2.1.0/gems/httparty-0.13.1/examples/aaws.rb +32 -0
  29. data/gems/ruby/2.1.0/gems/httparty-0.13.1/examples/basic.rb +28 -0
  30. data/gems/ruby/2.1.0/gems/httparty-0.13.1/examples/crack.rb +19 -0
  31. data/gems/ruby/2.1.0/gems/httparty-0.13.1/examples/custom_parsers.rb +67 -0
  32. data/gems/ruby/2.1.0/gems/httparty-0.13.1/examples/delicious.rb +37 -0
  33. data/gems/ruby/2.1.0/gems/httparty-0.13.1/examples/google.rb +16 -0
  34. data/gems/ruby/2.1.0/gems/httparty-0.13.1/examples/headers_and_user_agents.rb +6 -0
  35. data/gems/ruby/2.1.0/gems/httparty-0.13.1/examples/nokogiri_html_parser.rb +22 -0
  36. data/gems/ruby/2.1.0/gems/httparty-0.13.1/examples/rubyurl.rb +14 -0
  37. data/gems/ruby/2.1.0/gems/httparty-0.13.1/examples/stackexchange.rb +24 -0
  38. data/gems/ruby/2.1.0/gems/httparty-0.13.1/examples/tripit_sign_in.rb +33 -0
  39. data/gems/ruby/2.1.0/gems/httparty-0.13.1/examples/twitter.rb +31 -0
  40. data/gems/ruby/2.1.0/gems/httparty-0.13.1/examples/whoismyrep.rb +10 -0
  41. data/gems/ruby/2.1.0/gems/httparty-0.13.1/features/basic_authentication.feature +20 -0
  42. data/gems/ruby/2.1.0/gems/httparty-0.13.1/features/command_line.feature +7 -0
  43. data/gems/ruby/2.1.0/gems/httparty-0.13.1/features/deals_with_http_error_codes.feature +26 -0
  44. data/gems/ruby/2.1.0/gems/httparty-0.13.1/features/digest_authentication.feature +20 -0
  45. data/gems/ruby/2.1.0/gems/httparty-0.13.1/features/handles_compressed_responses.feature +27 -0
  46. data/gems/ruby/2.1.0/gems/httparty-0.13.1/features/handles_multiple_formats.feature +57 -0
  47. data/gems/ruby/2.1.0/gems/httparty-0.13.1/features/steps/env.rb +22 -0
  48. data/gems/ruby/2.1.0/gems/httparty-0.13.1/features/steps/httparty_response_steps.rb +52 -0
  49. data/gems/ruby/2.1.0/gems/httparty-0.13.1/features/steps/httparty_steps.rb +43 -0
  50. data/gems/ruby/2.1.0/gems/httparty-0.13.1/features/steps/mongrel_helper.rb +94 -0
  51. data/gems/ruby/2.1.0/gems/httparty-0.13.1/features/steps/remote_service_steps.rb +74 -0
  52. data/gems/ruby/2.1.0/gems/httparty-0.13.1/features/supports_read_timeout_option.feature +13 -0
  53. data/gems/ruby/2.1.0/gems/httparty-0.13.1/features/supports_redirection.feature +22 -0
  54. data/gems/ruby/2.1.0/gems/httparty-0.13.1/features/supports_timeout_option.feature +13 -0
  55. data/gems/ruby/2.1.0/gems/httparty-0.13.1/httparty.gemspec +26 -0
  56. data/gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty.rb +600 -0
  57. data/gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/connection_adapter.rb +187 -0
  58. data/gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/cookie_hash.rb +22 -0
  59. data/gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/core_extensions.rb +32 -0
  60. data/gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/exceptions.rb +29 -0
  61. data/gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/hash_conversions.rb +51 -0
  62. data/gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/logger/apache_logger.rb +22 -0
  63. data/gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/logger/curl_logger.rb +48 -0
  64. data/gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/logger/logger.rb +18 -0
  65. data/gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/module_inheritable_attributes.rb +56 -0
  66. data/gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/net_digest_auth.rb +84 -0
  67. data/gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/parser.rb +141 -0
  68. data/gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/request.rb +331 -0
  69. data/gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/response.rb +72 -0
  70. data/gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/response/headers.rb +31 -0
  71. data/gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/version.rb +3 -0
  72. data/gems/ruby/2.1.0/gems/httparty-0.13.1/script/release +42 -0
  73. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/fixtures/delicious.xml +23 -0
  74. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/fixtures/empty.xml +0 -0
  75. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/fixtures/google.html +3 -0
  76. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/fixtures/ssl/generate.sh +29 -0
  77. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/fixtures/ssl/generated/1fe462c2.0 +16 -0
  78. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/fixtures/ssl/generated/bogushost.crt +13 -0
  79. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/fixtures/ssl/generated/ca.crt +16 -0
  80. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/fixtures/ssl/generated/ca.key +15 -0
  81. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/fixtures/ssl/generated/selfsigned.crt +14 -0
  82. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/fixtures/ssl/generated/server.crt +13 -0
  83. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/fixtures/ssl/generated/server.key +15 -0
  84. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/fixtures/ssl/openssl-exts.cnf +9 -0
  85. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/fixtures/twitter.csv +2 -0
  86. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/fixtures/twitter.json +1 -0
  87. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/fixtures/twitter.xml +403 -0
  88. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/fixtures/undefined_method_add_node_for_nil.xml +2 -0
  89. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty/connection_adapter_spec.rb +354 -0
  90. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty/cookie_hash_spec.rb +83 -0
  91. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty/exception_spec.rb +23 -0
  92. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty/logger/apache_logger_spec.rb +26 -0
  93. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty/logger/curl_logger_spec.rb +18 -0
  94. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty/logger/logger_spec.rb +22 -0
  95. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty/net_digest_auth_spec.rb +152 -0
  96. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty/parser_spec.rb +165 -0
  97. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty/request_spec.rb +638 -0
  98. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty/response_spec.rb +221 -0
  99. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty/ssl_spec.rb +74 -0
  100. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/httparty_spec.rb +764 -0
  101. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/spec.opts +2 -0
  102. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/spec_helper.rb +37 -0
  103. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/support/ssl_test_helper.rb +47 -0
  104. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/support/ssl_test_server.rb +80 -0
  105. data/gems/ruby/2.1.0/gems/httparty-0.13.1/spec/support/stub_response.rb +43 -0
  106. data/gems/ruby/2.1.0/gems/httparty-0.13.1/website/css/common.css +47 -0
  107. data/gems/ruby/2.1.0/gems/httparty-0.13.1/website/index.html +73 -0
  108. data/gems/ruby/2.1.0/gems/multi_xml-0.5.5/.yardopts +8 -0
  109. data/gems/ruby/2.1.0/gems/multi_xml-0.5.5/CHANGELOG.md +93 -0
  110. data/gems/ruby/2.1.0/gems/multi_xml-0.5.5/CONTRIBUTING.md +49 -0
  111. data/gems/ruby/2.1.0/gems/multi_xml-0.5.5/LICENSE.md +20 -0
  112. data/gems/ruby/2.1.0/gems/multi_xml-0.5.5/README.md +97 -0
  113. data/gems/ruby/2.1.0/gems/multi_xml-0.5.5/Rakefile +21 -0
  114. data/gems/ruby/2.1.0/gems/multi_xml-0.5.5/lib/multi_xml.rb +296 -0
  115. data/gems/ruby/2.1.0/gems/multi_xml-0.5.5/lib/multi_xml/parsers/libxml.rb +30 -0
  116. data/gems/ruby/2.1.0/gems/multi_xml-0.5.5/lib/multi_xml/parsers/libxml2_parser.rb +74 -0
  117. data/gems/ruby/2.1.0/gems/multi_xml-0.5.5/lib/multi_xml/parsers/nokogiri.rb +32 -0
  118. data/gems/ruby/2.1.0/gems/multi_xml-0.5.5/lib/multi_xml/parsers/ox.rb +97 -0
  119. data/gems/ruby/2.1.0/gems/multi_xml-0.5.5/lib/multi_xml/parsers/rexml.rb +113 -0
  120. data/gems/ruby/2.1.0/gems/multi_xml-0.5.5/lib/multi_xml/version.rb +3 -0
  121. data/gems/ruby/2.1.0/gems/multi_xml-0.5.5/multi_xml.gemspec +24 -0
  122. data/gems/ruby/2.1.0/gems/multi_xml-0.5.5/spec/helper.rb +17 -0
  123. data/gems/ruby/2.1.0/gems/multi_xml-0.5.5/spec/multi_xml_spec.rb +43 -0
  124. data/gems/ruby/2.1.0/gems/multi_xml-0.5.5/spec/parser_shared_example.rb +694 -0
  125. data/gems/ruby/2.1.0/gems/multi_xml-0.5.5/spec/speed.rb +63 -0
  126. data/gems/ruby/2.1.0/gems/rake-10.3.2/.autotest +7 -0
  127. data/gems/ruby/2.1.0/gems/rake-10.3.2/.gemtest +0 -0
  128. data/gems/ruby/2.1.0/gems/rake-10.3.2/.rubocop.yml +27 -0
  129. data/gems/ruby/2.1.0/gems/rake-10.3.2/.togglerc +7 -0
  130. data/gems/ruby/2.1.0/gems/rake-10.3.2/CONTRIBUTING.rdoc +34 -0
  131. data/gems/ruby/2.1.0/gems/rake-10.3.2/History.rdoc +609 -0
  132. data/gems/ruby/2.1.0/gems/rake-10.3.2/MIT-LICENSE +21 -0
  133. data/gems/ruby/2.1.0/gems/rake-10.3.2/Manifest.txt +162 -0
  134. data/gems/ruby/2.1.0/gems/rake-10.3.2/README.rdoc +137 -0
  135. data/gems/ruby/2.1.0/gems/rake-10.3.2/Rakefile +81 -0
  136. data/gems/ruby/2.1.0/gems/rake-10.3.2/bin/rake +33 -0
  137. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/command_line_usage.rdoc +158 -0
  138. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/example/Rakefile1 +38 -0
  139. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/example/Rakefile2 +35 -0
  140. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/example/a.c +6 -0
  141. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/example/b.c +6 -0
  142. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/example/main.c +11 -0
  143. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/glossary.rdoc +43 -0
  144. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/jamis.rb +591 -0
  145. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/proto_rake.rdoc +127 -0
  146. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/rake.1.gz +0 -0
  147. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/rakefile.rdoc +653 -0
  148. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/rational.rdoc +151 -0
  149. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.4.14.rdoc +23 -0
  150. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.4.15.rdoc +35 -0
  151. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.5.0.rdoc +53 -0
  152. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.5.3.rdoc +78 -0
  153. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.5.4.rdoc +46 -0
  154. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.6.0.rdoc +141 -0
  155. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.7.0.rdoc +119 -0
  156. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.7.1.rdoc +59 -0
  157. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.7.2.rdoc +121 -0
  158. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.7.3.rdoc +47 -0
  159. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.8.0.rdoc +114 -0
  160. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.8.2.rdoc +165 -0
  161. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.8.3.rdoc +112 -0
  162. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.8.4.rdoc +147 -0
  163. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.8.5.rdoc +53 -0
  164. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.8.6.rdoc +37 -0
  165. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.8.7.rdoc +55 -0
  166. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.9.0.rdoc +112 -0
  167. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.9.1.rdoc +52 -0
  168. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
  169. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.9.2.rdoc +49 -0
  170. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.9.3.rdoc +102 -0
  171. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.9.4.rdoc +60 -0
  172. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.9.5.rdoc +55 -0
  173. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-0.9.6.rdoc +64 -0
  174. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-10.0.0.rdoc +178 -0
  175. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-10.0.1.rdoc +58 -0
  176. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-10.0.2.rdoc +53 -0
  177. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-10.0.3.rdoc +191 -0
  178. data/gems/ruby/2.1.0/gems/rake-10.3.2/doc/release_notes/rake-10.1.0.rdoc +61 -0
  179. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake.rb +78 -0
  180. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/alt_system.rb +110 -0
  181. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb +783 -0
  182. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/backtrace.rb +23 -0
  183. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/clean.rb +76 -0
  184. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/cloneable.rb +16 -0
  185. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/contrib/.document +0 -0
  186. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/contrib/compositepublisher.rb +21 -0
  187. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/contrib/ftptools.rb +137 -0
  188. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/contrib/publisher.rb +81 -0
  189. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/contrib/rubyforgepublisher.rb +18 -0
  190. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/contrib/sshpublisher.rb +61 -0
  191. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/contrib/sys.rb +4 -0
  192. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/cpu_counter.rb +109 -0
  193. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/default_loader.rb +14 -0
  194. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/dsl_definition.rb +198 -0
  195. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/early_time.rb +21 -0
  196. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/ext/core.rb +25 -0
  197. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/ext/module.rb +1 -0
  198. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/ext/string.rb +173 -0
  199. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/ext/time.rb +15 -0
  200. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/file_creation_task.rb +24 -0
  201. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/file_list.rb +414 -0
  202. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/file_task.rb +46 -0
  203. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/file_utils.rb +116 -0
  204. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/file_utils_ext.rb +144 -0
  205. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/gempackagetask.rb +4 -0
  206. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/invocation_chain.rb +56 -0
  207. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/invocation_exception_mixin.rb +16 -0
  208. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/linked_list.rb +103 -0
  209. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/loaders/makefile.rb +40 -0
  210. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/multi_task.rb +13 -0
  211. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/name_space.rb +38 -0
  212. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/packagetask.rb +202 -0
  213. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/pathmap.rb +3 -0
  214. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/phony.rb +15 -0
  215. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/private_reader.rb +20 -0
  216. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/promise.rb +99 -0
  217. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/pseudo_status.rb +29 -0
  218. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/rake_module.rb +38 -0
  219. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/rake_test_loader.rb +22 -0
  220. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/rdoctask.rb +4 -0
  221. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/ruby182_test_unit_fix.rb +29 -0
  222. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/rule_recursion_overflow_error.rb +20 -0
  223. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/runtest.rb +27 -0
  224. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/scope.rb +42 -0
  225. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb +383 -0
  226. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task_argument_error.rb +7 -0
  227. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task_arguments.rb +98 -0
  228. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task_manager.rb +310 -0
  229. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/tasklib.rb +24 -0
  230. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/testtask.rb +212 -0
  231. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/thread_history_display.rb +48 -0
  232. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/thread_pool.rb +164 -0
  233. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/trace_output.rb +22 -0
  234. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/version.rb +7 -0
  235. data/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/win32.rb +56 -0
  236. data/gems/ruby/2.1.0/gems/rake-10.3.2/rakelib/publish.rake +20 -0
  237. data/gems/ruby/2.1.0/gems/rake-10.3.2/rakelib/test_times.rake +25 -0
  238. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/file_creation.rb +34 -0
  239. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/helper.rb +127 -0
  240. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/support/rakefile_definitions.rb +478 -0
  241. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/support/ruby_runner.rb +33 -0
  242. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_private_reader.rb +42 -0
  243. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake.rb +40 -0
  244. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_application.rb +641 -0
  245. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_application_options.rb +466 -0
  246. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_backtrace.rb +119 -0
  247. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_clean.rb +55 -0
  248. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_cpu_counter.rb +50 -0
  249. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_definitions.rb +79 -0
  250. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_directory_task.rb +63 -0
  251. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_dsl.rb +40 -0
  252. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_early_time.rb +31 -0
  253. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_extension.rb +59 -0
  254. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_file_creation_task.rb +56 -0
  255. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_file_list.rb +627 -0
  256. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_file_list_path_map.rb +8 -0
  257. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_file_task.rb +186 -0
  258. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_file_utils.rb +309 -0
  259. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_ftp_file.rb +74 -0
  260. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_functional.rb +482 -0
  261. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_invocation_chain.rb +64 -0
  262. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_linked_list.rb +84 -0
  263. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_makefile_loader.rb +46 -0
  264. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_multi_task.rb +58 -0
  265. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_name_space.rb +57 -0
  266. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_package_task.rb +79 -0
  267. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_path_map.rb +168 -0
  268. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_path_map_explode.rb +34 -0
  269. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_path_map_partial.rb +18 -0
  270. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_pseudo_status.rb +21 -0
  271. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_rake_test_loader.rb +20 -0
  272. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_reduce_compat.rb +26 -0
  273. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_require.rb +40 -0
  274. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_rules.rb +388 -0
  275. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_scope.rb +44 -0
  276. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_task.rb +392 -0
  277. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_task_argument_parsing.rb +109 -0
  278. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_task_arguments.rb +127 -0
  279. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_task_lib.rb +9 -0
  280. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_task_manager.rb +178 -0
  281. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_task_manager_argument_resolution.rb +19 -0
  282. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_task_with_arguments.rb +171 -0
  283. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_test_task.rb +141 -0
  284. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_thread_pool.rb +142 -0
  285. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_top_level_functions.rb +71 -0
  286. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_rake_win32.rb +72 -0
  287. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_thread_history_display.rb +101 -0
  288. data/gems/ruby/2.1.0/gems/rake-10.3.2/test/test_trace_output.rb +52 -0
  289. data/gems/ruby/2.1.0/specifications/git_repository-0.0.11.gemspec +16 -0
  290. data/gems/ruby/2.1.0/specifications/httparty-0.13.1.gemspec +36 -0
  291. data/gems/ruby/2.1.0/specifications/multi_xml-0.5.5.gemspec +31 -0
  292. data/gems/ruby/2.1.0/specifications/rake-10.3.2.gemspec +43 -0
  293. data/rakefile.rb +33 -0
  294. data/src/APIClient.rb +23 -0
  295. data/test/test_git_repository_commit.rb +19 -0
  296. metadata +395 -0
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Entities total="0" results="0" page="1" page-size="25" href="https://s3-sandbox.parature.com/api/v1/5578/5633/Account" />
@@ -0,0 +1,354 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
2
+
3
+ describe HTTParty::ConnectionAdapter do
4
+
5
+ describe "initialization" do
6
+ let(:uri) { URI 'http://www.google.com' }
7
+ it "takes a URI as input" do
8
+ HTTParty::ConnectionAdapter.new(uri)
9
+ end
10
+
11
+ it "raises an ArgumentError if the uri is nil" do
12
+ expect { HTTParty::ConnectionAdapter.new(nil) }.to raise_error ArgumentError
13
+ end
14
+
15
+ it "raises an ArgumentError if the uri is a String" do
16
+ expect { HTTParty::ConnectionAdapter.new('http://www.google.com') }.to raise_error ArgumentError
17
+ end
18
+
19
+ it "sets the uri" do
20
+ adapter = HTTParty::ConnectionAdapter.new(uri)
21
+ adapter.uri.should be uri
22
+ end
23
+
24
+ it "also accepts an optional options hash" do
25
+ HTTParty::ConnectionAdapter.new(uri, {})
26
+ end
27
+
28
+ it "sets the options" do
29
+ options = {:foo => :bar}
30
+ adapter = HTTParty::ConnectionAdapter.new(uri, options)
31
+ adapter.options.should be options
32
+ end
33
+ end
34
+
35
+ describe ".call" do
36
+ it "generates an HTTParty::ConnectionAdapter instance with the given uri and options" do
37
+ HTTParty::ConnectionAdapter.should_receive(:new).with(@uri, @options).and_return(stub(:connection => nil))
38
+ HTTParty::ConnectionAdapter.call(@uri, @options)
39
+ end
40
+
41
+ it "calls #connection on the connection adapter" do
42
+ adapter = mock('Adapter')
43
+ connection = mock('Connection')
44
+ adapter.should_receive(:connection).and_return(connection)
45
+ HTTParty::ConnectionAdapter.stub(:new => adapter)
46
+ HTTParty::ConnectionAdapter.call(@uri, @options).should be connection
47
+ end
48
+ end
49
+
50
+ describe '#connection' do
51
+ let(:uri) { URI 'http://www.google.com' }
52
+ let(:options) { Hash.new }
53
+ let(:adapter) { HTTParty::ConnectionAdapter.new(uri, options) }
54
+
55
+ describe "the resulting connection" do
56
+ subject { adapter.connection }
57
+ it { should be_an_instance_of Net::HTTP }
58
+
59
+ context "using port 80" do
60
+ let(:uri) { URI 'http://foobar.com' }
61
+ it { should_not use_ssl }
62
+ end
63
+
64
+ context "when dealing with ssl" do
65
+ let(:uri) { URI 'https://foobar.com' }
66
+
67
+ context "uses the system cert_store, by default" do
68
+ let(:system_cert_store) do
69
+ system_cert_store = mock('default_cert_store')
70
+ system_cert_store.should_receive(:set_default_paths)
71
+ OpenSSL::X509::Store.should_receive(:new).and_return(system_cert_store)
72
+ system_cert_store
73
+ end
74
+ it { should use_cert_store(system_cert_store) }
75
+ end
76
+
77
+ context "should use the specified cert store, when one is given" do
78
+ let(:custom_cert_store) { mock('custom_cert_store') }
79
+ let(:options) { {:cert_store => custom_cert_store} }
80
+ it { should use_cert_store(custom_cert_store) }
81
+ end
82
+
83
+ context "using port 443 for ssl" do
84
+ let(:uri) { URI 'https://api.foo.com/v1:443' }
85
+ it { should use_ssl }
86
+ end
87
+
88
+ context "https scheme with default port" do
89
+ it { should use_ssl }
90
+ end
91
+
92
+ context "https scheme with non-standard port" do
93
+ let(:uri) { URI 'https://foobar.com:123456' }
94
+ it { should use_ssl }
95
+ end
96
+
97
+
98
+ context "when ssl version is set" do
99
+ let(:options) { {:ssl_version => :TLSv1} }
100
+
101
+ it "sets ssl version" do
102
+ subject.ssl_version.should == :TLSv1
103
+ end
104
+ end if RUBY_VERSION > '1.9'
105
+ end
106
+
107
+ context "when dealing with IPv6" do
108
+ let(:uri) { URI 'http://[fd00::1]' }
109
+
110
+ it "strips brackets from the address" do
111
+ subject.address.should == 'fd00::1'
112
+ end
113
+ end
114
+
115
+ context "specifying ciphers" do
116
+ let(:options) { {:ciphers => 'RC4-SHA' } }
117
+
118
+ it "should set the ciphers on the connection" do
119
+ subject.ciphers.should == 'RC4-SHA'
120
+ end
121
+ end if RUBY_VERSION > '1.9'
122
+
123
+ context "when timeout is not set" do
124
+ it "doesn't set the timeout" do
125
+ http = mock("http", :null_object => true)
126
+ http.should_not_receive(:open_timeout=)
127
+ http.should_not_receive(:read_timeout=)
128
+ Net::HTTP.stub(:new => http)
129
+
130
+ adapter.connection
131
+ end
132
+ end
133
+
134
+ context "when setting timeout" do
135
+ context "to 5 seconds" do
136
+ let(:options) { {:timeout => 5} }
137
+
138
+ its(:open_timeout) { should == 5 }
139
+ its(:read_timeout) { should == 5 }
140
+ end
141
+
142
+ context "and timeout is a string" do
143
+ let(:options) { {:timeout => "five seconds"} }
144
+
145
+ it "doesn't set the timeout" do
146
+ http = mock("http", :null_object => true)
147
+ http.should_not_receive(:open_timeout=)
148
+ http.should_not_receive(:read_timeout=)
149
+ Net::HTTP.stub(:new => http)
150
+
151
+ adapter.connection
152
+ end
153
+ end
154
+ end
155
+
156
+ context "when timeout is not set and read_timeout is set to 6 seconds" do
157
+ let(:options) { {:read_timeout => 6} }
158
+
159
+ its(:read_timeout) { should == 6 }
160
+
161
+ it "should not set the open_timeout" do
162
+ http = mock("http", :null_object => true)
163
+ http.should_not_receive(:open_timeout=)
164
+ Net::HTTP.stub(:new => http)
165
+ adapter.connection
166
+ end
167
+ end
168
+
169
+ context "when timeout is set and read_timeout is set to 6 seconds" do
170
+ let(:options) { {:timeout => 5, :read_timeout => 6} }
171
+
172
+ its(:open_timeout) { should == 5 }
173
+ its(:read_timeout) { should == 6 }
174
+
175
+ it "should override the timeout option" do
176
+ http = mock("http", :null_object => true)
177
+ http.should_receive(:open_timeout=)
178
+ http.should_receive(:read_timeout=).twice
179
+ Net::HTTP.stub(:new => http)
180
+ adapter.connection
181
+ end
182
+ end
183
+
184
+ context "when timeout is not set and open_timeout is set to 7 seconds" do
185
+ let(:options) { {:open_timeout => 7} }
186
+
187
+ its(:open_timeout) { should == 7 }
188
+
189
+ it "should not set the read_timeout" do
190
+ http = mock("http", :null_object => true)
191
+ http.should_not_receive(:read_timeout=)
192
+ Net::HTTP.stub(:new => http)
193
+ adapter.connection
194
+ end
195
+ end
196
+
197
+ context "when timeout is set and open_timeout is set to 7 seconds" do
198
+ let(:options) { {:timeout => 5, :open_timeout => 7} }
199
+
200
+ its(:open_timeout) { should == 7 }
201
+ its(:read_timeout) { should == 5 }
202
+
203
+ it "should override the timeout option" do
204
+ http = mock("http", :null_object => true)
205
+ http.should_receive(:open_timeout=).twice
206
+ http.should_receive(:read_timeout=)
207
+ Net::HTTP.stub(:new => http)
208
+ adapter.connection
209
+ end
210
+ end
211
+
212
+ context "when debug_output" do
213
+ let(:http) { Net::HTTP.new(uri) }
214
+ before do
215
+ Net::HTTP.stub(:new => http)
216
+ end
217
+
218
+ context "is set to $stderr" do
219
+ let(:options) { {:debug_output => $stderr} }
220
+ it "has debug output set" do
221
+ http.should_receive(:set_debug_output).with($stderr)
222
+ adapter.connection
223
+ end
224
+ end
225
+
226
+ context "is not provided" do
227
+ it "does not set_debug_output" do
228
+ http.should_not_receive(:set_debug_output)
229
+ adapter.connection
230
+ end
231
+ end
232
+ end
233
+
234
+ context 'when providing proxy address and port' do
235
+ let(:options) { {:http_proxyaddr => '1.2.3.4', :http_proxyport => 8080} }
236
+
237
+ it { should be_a_proxy }
238
+ its(:proxy_address) { should == '1.2.3.4' }
239
+ its(:proxy_port) { should == 8080 }
240
+
241
+ context 'as well as proxy user and password' do
242
+ let(:options) do
243
+ {:http_proxyaddr => '1.2.3.4', :http_proxyport => 8080,
244
+ :http_proxyuser => 'user', :http_proxypass => 'pass'}
245
+ end
246
+ its(:proxy_user) { should == 'user' }
247
+ its(:proxy_pass) { should == 'pass' }
248
+ end
249
+ end
250
+
251
+ context 'when not providing a proxy address' do
252
+ let(:uri) { URI 'http://proxytest.com' }
253
+
254
+ it "does not pass any proxy parameters to the connection" do
255
+ http = Net::HTTP.new("proxytest.com")
256
+ Net::HTTP.should_receive(:new).once.with("proxytest.com", 80).and_return(http)
257
+ adapter.connection
258
+ end
259
+ end
260
+
261
+ context 'when providing a local bind address and port' do
262
+ let(:options) { {:local_host => "127.0.0.1", :local_port => 12345 } }
263
+
264
+ its(:local_host) { should == '127.0.0.1' }
265
+ its(:local_port) { should == 12345 }
266
+ end if RUBY_VERSION >= '2.0'
267
+
268
+ context "when providing PEM certificates" do
269
+ let(:pem) { :pem_contents }
270
+ let(:options) { {:pem => pem, :pem_password => "password"} }
271
+
272
+ context "when scheme is https" do
273
+ let(:uri) { URI 'https://google.com' }
274
+ let(:cert) { mock("OpenSSL::X509::Certificate") }
275
+ let(:key) { mock("OpenSSL::PKey::RSA") }
276
+
277
+ before do
278
+ OpenSSL::X509::Certificate.should_receive(:new).with(pem).and_return(cert)
279
+ OpenSSL::PKey::RSA.should_receive(:new).with(pem, "password").and_return(key)
280
+ end
281
+
282
+ it "uses the provided PEM certificate " do
283
+ subject.cert.should == cert
284
+ subject.key.should == key
285
+ end
286
+
287
+ it "will verify the certificate" do
288
+ subject.verify_mode.should == OpenSSL::SSL::VERIFY_PEER
289
+ end
290
+ end
291
+
292
+ context "when scheme is not https" do
293
+ let(:uri) { URI 'http://google.com' }
294
+ let(:http) { Net::HTTP.new(uri) }
295
+
296
+ before do
297
+ Net::HTTP.stub(:new => http)
298
+ OpenSSL::X509::Certificate.should_not_receive(:new).with(pem)
299
+ OpenSSL::PKey::RSA.should_not_receive(:new).with(pem, "password")
300
+ http.should_not_receive(:cert=)
301
+ http.should_not_receive(:key=)
302
+ end
303
+
304
+ it "has no PEM certificate " do
305
+ subject.cert.should be_nil
306
+ subject.key.should be_nil
307
+ end
308
+ end
309
+ end
310
+
311
+ context "when providing PKCS12 certificates" do
312
+ let(:p12) { :p12_contents }
313
+ let(:options) { {:p12 => p12, :p12_password => "password"} }
314
+
315
+ context "when scheme is https" do
316
+ let(:uri) { URI 'https://google.com' }
317
+ let(:pkcs12) { mock("OpenSSL::PKCS12", :certificate => cert, :key => key) }
318
+ let(:cert) { mock("OpenSSL::X509::Certificate") }
319
+ let(:key) { mock("OpenSSL::PKey::RSA") }
320
+
321
+ before do
322
+ OpenSSL::PKCS12.should_receive(:new).with(p12, "password").and_return(pkcs12)
323
+ end
324
+
325
+ it "uses the provided P12 certificate " do
326
+ subject.cert.should == cert
327
+ subject.key.should == key
328
+ end
329
+
330
+ it "will verify the certificate" do
331
+ subject.verify_mode.should == OpenSSL::SSL::VERIFY_PEER
332
+ end
333
+ end
334
+
335
+ context "when scheme is not https" do
336
+ let(:uri) { URI 'http://google.com' }
337
+ let(:http) { Net::HTTP.new(uri) }
338
+
339
+ before do
340
+ Net::HTTP.stub(:new => http)
341
+ OpenSSL::PKCS12.new.should_not_receive(:new).with(p12, "password")
342
+ http.should_not_receive(:cert=)
343
+ http.should_not_receive(:key=)
344
+ end
345
+
346
+ it "has no PKCS12 certificate " do
347
+ subject.cert.should be_nil
348
+ subject.key.should be_nil
349
+ end
350
+ end
351
+ end
352
+ end
353
+ end
354
+ end
@@ -0,0 +1,83 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), '../spec_helper'))
2
+
3
+ describe HTTParty::CookieHash do
4
+ before(:each) do
5
+ @cookie_hash = HTTParty::CookieHash.new
6
+ end
7
+
8
+ describe "#add_cookies" do
9
+ describe "with a hash" do
10
+ it "should add new key/value pairs to the hash" do
11
+ @cookie_hash.add_cookies(:foo => "bar")
12
+ @cookie_hash.add_cookies(:rofl => "copter")
13
+ @cookie_hash.length.should eql(2)
14
+ end
15
+
16
+ it "should overwrite any existing key" do
17
+ @cookie_hash.add_cookies(:foo => "bar")
18
+ @cookie_hash.add_cookies(:foo => "copter")
19
+ @cookie_hash.length.should eql(1)
20
+ @cookie_hash[:foo].should eql("copter")
21
+ end
22
+ end
23
+
24
+ describe "with a string" do
25
+ it "should add new key/value pairs to the hash" do
26
+ @cookie_hash.add_cookies("first=one; second=two; third")
27
+ @cookie_hash[:first].should == 'one'
28
+ @cookie_hash[:second].should == 'two'
29
+ @cookie_hash[:third].should == nil
30
+ end
31
+
32
+ it "should overwrite any existing key" do
33
+ @cookie_hash[:foo] = 'bar'
34
+ @cookie_hash.add_cookies("foo=tar")
35
+ @cookie_hash.length.should eql(1)
36
+ @cookie_hash[:foo].should eql("tar")
37
+ end
38
+
39
+ it "should handle '=' within cookie value" do
40
+ @cookie_hash.add_cookies("first=one=1; second=two=2==")
41
+ @cookie_hash.keys.should include(:first, :second)
42
+ @cookie_hash[:first].should == 'one=1'
43
+ @cookie_hash[:second].should == 'two=2=='
44
+ end
45
+ end
46
+
47
+ describe 'with other class' do
48
+ it "should error" do
49
+ lambda {
50
+ @cookie_hash.add_cookies(Array.new)
51
+ }.should raise_error
52
+ end
53
+ end
54
+ end
55
+
56
+ # The regexen are required because Hashes aren't ordered, so a test against
57
+ # a hardcoded string was randomly failing.
58
+ describe "#to_cookie_string" do
59
+ before(:each) do
60
+ @cookie_hash.add_cookies(:foo => "bar")
61
+ @cookie_hash.add_cookies(:rofl => "copter")
62
+ @s = @cookie_hash.to_cookie_string
63
+ end
64
+
65
+ it "should format the key/value pairs, delimited by semi-colons" do
66
+ @s.should match(/foo=bar/)
67
+ @s.should match(/rofl=copter/)
68
+ @s.should match(/^\w+=\w+; \w+=\w+$/)
69
+ end
70
+
71
+ it "should not include client side only cookies" do
72
+ @cookie_hash.add_cookies(:path => "/")
73
+ @s = @cookie_hash.to_cookie_string
74
+ @s.should_not match(/path=\//)
75
+ end
76
+
77
+ it "should not include client side only cookies even when attributes use camal case" do
78
+ @cookie_hash.add_cookies(:Path => "/")
79
+ @s = @cookie_hash.to_cookie_string
80
+ @s.should_not match(/Path=\//)
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,23 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
2
+
3
+ describe HTTParty::Error do
4
+ subject { described_class }
5
+
6
+ its(:ancestors) { should include(StandardError) }
7
+
8
+ describe HTTParty::UnsupportedFormat do
9
+ its(:ancestors) { should include(HTTParty::Error) }
10
+ end
11
+
12
+ describe HTTParty::UnsupportedURIScheme do
13
+ its(:ancestors) { should include(HTTParty::Error) }
14
+ end
15
+
16
+ describe HTTParty::ResponseError do
17
+ its(:ancestors) { should include(HTTParty::Error) }
18
+ end
19
+
20
+ describe HTTParty::RedirectionTooDeep do
21
+ its(:ancestors) { should include(HTTParty::ResponseError) }
22
+ end
23
+ end