diff --git a/.gems/cache/addressable-2.3.6.gem b/.gems/cache/addressable-2.3.6.gem deleted file mode 100644 index 254dec8..0000000 Binary files a/.gems/cache/addressable-2.3.6.gem and /dev/null differ diff --git a/.gems/cache/buftok-0.2.0.gem b/.gems/cache/buftok-0.2.0.gem deleted file mode 100644 index 2c3d94b..0000000 Binary files a/.gems/cache/buftok-0.2.0.gem and /dev/null differ diff --git a/.gems/cache/equalizer-0.0.9.gem b/.gems/cache/equalizer-0.0.9.gem deleted file mode 100644 index 2072c17..0000000 Binary files a/.gems/cache/equalizer-0.0.9.gem and /dev/null differ diff --git a/.gems/cache/faraday-0.9.0.gem b/.gems/cache/faraday-0.9.0.gem deleted file mode 100644 index 0b00e52..0000000 Binary files a/.gems/cache/faraday-0.9.0.gem and /dev/null differ diff --git a/.gems/cache/http-0.6.2.gem b/.gems/cache/http-0.6.2.gem deleted file mode 100644 index 00fc84b..0000000 Binary files a/.gems/cache/http-0.6.2.gem and /dev/null differ diff --git a/.gems/cache/http_parser.rb-0.6.0.gem b/.gems/cache/http_parser.rb-0.6.0.gem deleted file mode 100644 index 3d3d508..0000000 Binary files a/.gems/cache/http_parser.rb-0.6.0.gem and /dev/null differ diff --git a/.gems/cache/json-1.8.1.gem b/.gems/cache/json-1.8.1.gem deleted file mode 100644 index d903086..0000000 Binary files a/.gems/cache/json-1.8.1.gem and /dev/null differ diff --git a/.gems/cache/memoizable-0.4.2.gem b/.gems/cache/memoizable-0.4.2.gem deleted file mode 100644 index 41d1f5b..0000000 Binary files a/.gems/cache/memoizable-0.4.2.gem and /dev/null differ diff --git a/.gems/cache/multipart-post-2.0.0.gem b/.gems/cache/multipart-post-2.0.0.gem deleted file mode 100644 index abfff3d..0000000 Binary files a/.gems/cache/multipart-post-2.0.0.gem and /dev/null differ diff --git a/.gems/cache/naught-1.0.0.gem b/.gems/cache/naught-1.0.0.gem deleted file mode 100644 index f59502d..0000000 Binary files a/.gems/cache/naught-1.0.0.gem and /dev/null differ diff --git a/.gems/cache/simple_oauth-0.2.0.gem b/.gems/cache/simple_oauth-0.2.0.gem deleted file mode 100644 index 5901361..0000000 Binary files a/.gems/cache/simple_oauth-0.2.0.gem and /dev/null differ diff --git a/.gems/cache/thread_safe-0.3.4.gem b/.gems/cache/thread_safe-0.3.4.gem deleted file mode 100644 index 5bf4376..0000000 Binary files a/.gems/cache/thread_safe-0.3.4.gem and /dev/null differ diff --git a/.gems/cache/twitter-5.11.0.gem b/.gems/cache/twitter-5.11.0.gem deleted file mode 100644 index 4e2be46..0000000 Binary files a/.gems/cache/twitter-5.11.0.gem and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/PunycodeBadInput/cdesc-PunycodeBadInput.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/PunycodeBadInput/cdesc-PunycodeBadInput.ri deleted file mode 100644 index dee133c..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/PunycodeBadInput/cdesc-PunycodeBadInput.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/PunycodeBigOutput/cdesc-PunycodeBigOutput.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/PunycodeBigOutput/cdesc-PunycodeBigOutput.ri deleted file mode 100644 index 82d722b..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/PunycodeBigOutput/cdesc-PunycodeBigOutput.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/PunycodeOverflow/cdesc-PunycodeOverflow.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/PunycodeOverflow/cdesc-PunycodeOverflow.ri deleted file mode 100644 index 3f18a58..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/PunycodeOverflow/cdesc-PunycodeOverflow.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/cdesc-IDNA.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/cdesc-IDNA.ri deleted file mode 100644 index 2102b4a..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/cdesc-IDNA.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/lookup_unicode_combining_class-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/lookup_unicode_combining_class-c.ri deleted file mode 100644 index 927c702..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/lookup_unicode_combining_class-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/lookup_unicode_compatibility-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/lookup_unicode_compatibility-c.ri deleted file mode 100644 index a4808fd..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/lookup_unicode_compatibility-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/lookup_unicode_composition-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/lookup_unicode_composition-c.ri deleted file mode 100644 index 8dad303..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/lookup_unicode_composition-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/lookup_unicode_lowercase-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/lookup_unicode_lowercase-c.ri deleted file mode 100644 index f9b3d13..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/lookup_unicode_lowercase-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_adapt-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_adapt-c.ri deleted file mode 100644 index 50e1610..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_adapt-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_basic%3f-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_basic%3f-c.ri deleted file mode 100644 index 0df5fca..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_basic%3f-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_decode-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_decode-c.ri deleted file mode 100644 index 28379a1..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_decode-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_decode_digit-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_decode_digit-c.ri deleted file mode 100644 index c452569..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_decode_digit-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_delimiter%3f-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_delimiter%3f-c.ri deleted file mode 100644 index 6011851..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_delimiter%3f-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_encode-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_encode-c.ri deleted file mode 100644 index b596bb4..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_encode-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_encode_digit-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_encode_digit-c.ri deleted file mode 100644 index 41d6b8e..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/punycode_encode_digit-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/to_ascii-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/to_ascii-c.ri deleted file mode 100644 index f268c8d..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/to_ascii-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/to_unicode-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/to_unicode-c.ri deleted file mode 100644 index f523f1e..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/to_unicode-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_compose-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_compose-c.ri deleted file mode 100644 index f8f99e7..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_compose-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_compose_pair-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_compose_pair-c.ri deleted file mode 100644 index f58ea7b..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_compose_pair-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_decompose-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_decompose-c.ri deleted file mode 100644 index 1f8caca..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_decompose-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_decompose_hangul-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_decompose_hangul-c.ri deleted file mode 100644 index bc8de90..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_decompose_hangul-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_downcase-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_downcase-c.ri deleted file mode 100644 index 9e8d0d8..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_downcase-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_normalize_kc-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_normalize_kc-c.ri deleted file mode 100644 index ef9a4d5..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_normalize_kc-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_sort_canonical-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_sort_canonical-c.ri deleted file mode 100644 index 92f7823..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/IDNA/unicode_sort_canonical-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/%3d%3d-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/%3d%3d-i.ri deleted file mode 100644 index f6901e8..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/%3d%3d-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/InvalidTemplateOperatorError/cdesc-InvalidTemplateOperatorError.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/InvalidTemplateOperatorError/cdesc-InvalidTemplateOperatorError.ri deleted file mode 100644 index f69f181..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/InvalidTemplateOperatorError/cdesc-InvalidTemplateOperatorError.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/InvalidTemplateValueError/cdesc-InvalidTemplateValueError.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/InvalidTemplateValueError/cdesc-InvalidTemplateValueError.ri deleted file mode 100644 index a01b4ff..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/InvalidTemplateValueError/cdesc-InvalidTemplateValueError.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/%5b%5d-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/%5b%5d-i.ri deleted file mode 100644 index 19bafd7..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/%5b%5d-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/captures-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/captures-i.ri deleted file mode 100644 index c5cac22..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/captures-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/cdesc-MatchData.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/cdesc-MatchData.ri deleted file mode 100644 index 27bd0c0..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/cdesc-MatchData.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/inspect-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/inspect-i.ri deleted file mode 100644 index 02a4b07..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/inspect-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/keys-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/keys-i.ri deleted file mode 100644 index 58ed844..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/keys-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/mapping-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/mapping-i.ri deleted file mode 100644 index 59ae8e9..0000000 --- a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/mapping-i.ri +++ /dev/null @@ -1,5 +0,0 @@ -U:RDoc::Attr[iI" mapping:ETI"-Addressable::Template::MatchData#mapping;FI"R;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@return [Hash];To:RDoc::Markup::Verbatim; [ I"/The mapping that resulted from the match. -;TI"@Note that this mapping does not include keys or values for -;TI"@variables that appear in the Template, but are not present -;TI"in the URI.;T: @format0: -@fileI" lib/addressable/template.rb;T:0@omit_headings_from_table_of_contents_below0F@I"%Addressable::Template::MatchData;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/names-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/names-i.ri deleted file mode 100644 index 9cbdceb..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/names-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/new-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/new-c.ri deleted file mode 100644 index b7eb12e..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/new-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/post_match-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/post_match-i.ri deleted file mode 100644 index 6068a70..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/post_match-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/pre_match-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/pre_match-i.ri deleted file mode 100644 index 300d305..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/pre_match-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/string-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/string-i.ri deleted file mode 100644 index 448aed0..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/string-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/template-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/template-i.ri deleted file mode 100644 index d59941e..0000000 --- a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/template-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI" template:ETI".Addressable::Template::MatchData#template;FI"R;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$@return [Addressable::Template];To:RDoc::Markup::Verbatim; [I"%The Template used for the match.;T: @format0: -@fileI" lib/addressable/template.rb;T:0@omit_headings_from_table_of_contents_below0F@I"%Addressable::Template::MatchData;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/to_a-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/to_a-i.ri deleted file mode 100644 index f933571..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/to_a-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/to_s-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/to_s-i.ri deleted file mode 100644 index a447681..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/to_s-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/uri-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/uri-i.ri deleted file mode 100644 index 876e82e..0000000 --- a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/uri-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI"uri:ETI")Addressable::Template::MatchData#uri;FI"R;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@return [Addressable::URI];To:RDoc::Markup::Verbatim; [I"3The URI that the Template was matched against.;T: @format0: -@fileI" lib/addressable/template.rb;T:0@omit_headings_from_table_of_contents_below0F@I"%Addressable::Template::MatchData;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/values-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/values-i.ri deleted file mode 100644 index 2303ee9..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/values-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/values_at-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/values_at-i.ri deleted file mode 100644 index b1613bf..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/values_at-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/variables-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/variables-i.ri deleted file mode 100644 index d401b80..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/MatchData/variables-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/TemplateOperatorAbortedError/cdesc-TemplateOperatorAbortedError.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/TemplateOperatorAbortedError/cdesc-TemplateOperatorAbortedError.ri deleted file mode 100644 index b493c35..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/TemplateOperatorAbortedError/cdesc-TemplateOperatorAbortedError.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/cdesc-Template.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/cdesc-Template.ri deleted file mode 100644 index 42653fb..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/cdesc-Template.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/eql%3f-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/eql%3f-i.ri deleted file mode 100644 index 3d58f0c..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/eql%3f-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/expand-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/expand-i.ri deleted file mode 100644 index 18b9cd9..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/expand-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/extract-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/extract-i.ri deleted file mode 100644 index 93a14b8..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/extract-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/inspect-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/inspect-i.ri deleted file mode 100644 index 2841bd2..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/inspect-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/join_values-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/join_values-i.ri deleted file mode 100644 index 7f3ab62..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/join_values-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/keys-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/keys-i.ri deleted file mode 100644 index 326a234..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/keys-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/match-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/match-i.ri deleted file mode 100644 index 229b4ee..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/match-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/new-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/new-c.ri deleted file mode 100644 index fd45eb8..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/new-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/normalize_keys-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/normalize_keys-i.ri deleted file mode 100644 index f40a56a..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/normalize_keys-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/normalize_value-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/normalize_value-i.ri deleted file mode 100644 index d6984cf..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/normalize_value-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/ordered_variable_defaults-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/ordered_variable_defaults-i.ri deleted file mode 100644 index 82f0d8e..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/ordered_variable_defaults-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/parse_template_pattern-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/parse_template_pattern-i.ri deleted file mode 100644 index 951406f..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/parse_template_pattern-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/partial_expand-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/partial_expand-i.ri deleted file mode 100644 index a39f377..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/partial_expand-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/pattern-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/pattern-i.ri deleted file mode 100644 index 7f529be..0000000 --- a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/pattern-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI" pattern:ETI""Addressable::Template#pattern;FI"R;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4@return [String] The Template object's pattern.;T: -@fileI" lib/addressable/template.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Addressable::Template;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/transform_capture-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/transform_capture-i.ri deleted file mode 100644 index 263607f..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/transform_capture-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/transform_partial_capture-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/transform_partial_capture-i.ri deleted file mode 100644 index 7e01533..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/transform_partial_capture-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/variable_defaults-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/variable_defaults-i.ri deleted file mode 100644 index d3288fe..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/variable_defaults-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/variables-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/Template/variables-i.ri deleted file mode 100644 index 1feb7ac..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/Template/variables-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/%2b-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/%2b-i.ri deleted file mode 100644 index 8515363..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/%2b-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/%3d%3d%3d-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/%3d%3d%3d-i.ri deleted file mode 100644 index f496cda..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/%3d%3d%3d-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/%3d%3d-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/%3d%3d-i.ri deleted file mode 100644 index dcfd8b0..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/%3d%3d-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/CharacterClasses/cdesc-CharacterClasses.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/CharacterClasses/cdesc-CharacterClasses.ri deleted file mode 100644 index de32c46..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/CharacterClasses/cdesc-CharacterClasses.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/InvalidURIError/cdesc-InvalidURIError.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/InvalidURIError/cdesc-InvalidURIError.ri deleted file mode 100644 index baeb79f..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/InvalidURIError/cdesc-InvalidURIError.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/absolute%3f-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/absolute%3f-i.ri deleted file mode 100644 index 712754c..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/absolute%3f-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/authority%3d-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/authority%3d-i.ri deleted file mode 100644 index 64e717f..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/authority%3d-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/authority-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/authority-i.ri deleted file mode 100644 index bc18f42..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/authority-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/basename-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/basename-i.ri deleted file mode 100644 index e9e5a90..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/basename-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/cdesc-URI.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/cdesc-URI.ri deleted file mode 100644 index b2cffa3..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/cdesc-URI.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/convert_path-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/convert_path-c.ri deleted file mode 100644 index 3ec47bb..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/convert_path-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/default_port-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/default_port-i.ri deleted file mode 100644 index 83873ac..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/default_port-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/defer_validation-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/defer_validation-i.ri deleted file mode 100644 index 55b4b77..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/defer_validation-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/display_uri-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/display_uri-i.ri deleted file mode 100644 index b42c0fd..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/display_uri-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/dup-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/dup-i.ri deleted file mode 100644 index 5c39326..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/dup-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/empty%3f-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/empty%3f-i.ri deleted file mode 100644 index 2fe9721..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/empty%3f-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/encode-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/encode-c.ri deleted file mode 100644 index 21a41e6..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/encode-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/encode_component-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/encode_component-c.ri deleted file mode 100644 index 13d93ea..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/encode_component-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/eql%3f-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/eql%3f-i.ri deleted file mode 100644 index 5b258dc..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/eql%3f-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/escape-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/escape-c.ri deleted file mode 100644 index 18b0eb2..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/escape-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/extname-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/extname-i.ri deleted file mode 100644 index ceb403e..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/extname-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/form_encode-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/form_encode-c.ri deleted file mode 100644 index 1e39ac7..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/form_encode-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/form_unencode-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/form_unencode-c.ri deleted file mode 100644 index c08a409..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/form_unencode-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/fragment%3d-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/fragment%3d-i.ri deleted file mode 100644 index 8548a03..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/fragment%3d-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/fragment-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/fragment-i.ri deleted file mode 100644 index 31c685c..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/fragment-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/freeze-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/freeze-i.ri deleted file mode 100644 index 2ea9762..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/freeze-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/hash-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/hash-i.ri deleted file mode 100644 index 6072bce..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/hash-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/heuristic_parse-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/heuristic_parse-c.ri deleted file mode 100644 index 39dfc28..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/heuristic_parse-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/host%3d-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/host%3d-i.ri deleted file mode 100644 index adb8181..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/host%3d-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/host-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/host-i.ri deleted file mode 100644 index acb1bb7..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/host-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/hostname%3d-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/hostname%3d-i.ri deleted file mode 100644 index 30c153e..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/hostname%3d-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/hostname-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/hostname-i.ri deleted file mode 100644 index 6cc3c10..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/hostname-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/inferred_port-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/inferred_port-i.ri deleted file mode 100644 index b67d6c3..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/inferred_port-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/inspect-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/inspect-i.ri deleted file mode 100644 index 6f30faf..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/inspect-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/ip_based%3f-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/ip_based%3f-i.ri deleted file mode 100644 index e0b8571..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/ip_based%3f-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/ip_based_schemes-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/ip_based_schemes-c.ri deleted file mode 100644 index 28d22bb..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/ip_based_schemes-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/join%21-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/join%21-i.ri deleted file mode 100644 index 53b83e4..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/join%21-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/join-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/join-c.ri deleted file mode 100644 index f344b72..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/join-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/join-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/join-i.ri deleted file mode 100644 index 186a5b7..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/join-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/merge%21-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/merge%21-i.ri deleted file mode 100644 index 3c1be3b..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/merge%21-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/merge-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/merge-i.ri deleted file mode 100644 index 7bac382..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/merge-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/new-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/new-c.ri deleted file mode 100644 index 4d4b935..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/new-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalize%21-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalize%21-i.ri deleted file mode 100644 index 373750e..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalize%21-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalize-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalize-i.ri deleted file mode 100644 index 5aea3c7..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalize-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalize_component-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalize_component-c.ri deleted file mode 100644 index 456c69b..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalize_component-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalize_path-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalize_path-c.ri deleted file mode 100644 index af3f998..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalize_path-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_authority-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_authority-i.ri deleted file mode 100644 index cf42d8d..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_authority-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_encode-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_encode-c.ri deleted file mode 100644 index 262d11b..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_encode-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_fragment-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_fragment-i.ri deleted file mode 100644 index efda11e..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_fragment-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_host-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_host-i.ri deleted file mode 100644 index 0992c09..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_host-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_password-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_password-i.ri deleted file mode 100644 index 908a640..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_password-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_path-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_path-i.ri deleted file mode 100644 index d57320a..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_path-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_port-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_port-i.ri deleted file mode 100644 index 97b2f61..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_port-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_query-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_query-i.ri deleted file mode 100644 index c879a7f..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_query-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_scheme-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_scheme-i.ri deleted file mode 100644 index 2a98d72..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_scheme-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_site-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_site-i.ri deleted file mode 100644 index b3fd004..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_site-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_user-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_user-i.ri deleted file mode 100644 index ab7900f..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_user-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_userinfo-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_userinfo-i.ri deleted file mode 100644 index 683204e..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/normalized_userinfo-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/omit%21-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/omit%21-i.ri deleted file mode 100644 index 06c0140..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/omit%21-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/omit-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/omit-i.ri deleted file mode 100644 index 3a2e5f0..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/omit-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/origin-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/origin-i.ri deleted file mode 100644 index b57be0c..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/origin-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/parse-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/parse-c.ri deleted file mode 100644 index 77bbef8..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/parse-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/password%3d-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/password%3d-i.ri deleted file mode 100644 index ac4fea2..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/password%3d-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/password-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/password-i.ri deleted file mode 100644 index f1ed73b..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/password-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/path%3d-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/path%3d-i.ri deleted file mode 100644 index e362625..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/path%3d-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/path-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/path-i.ri deleted file mode 100644 index 07ffcc3..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/path-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/port%3d-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/port%3d-i.ri deleted file mode 100644 index 23ced03..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/port%3d-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/port-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/port-i.ri deleted file mode 100644 index 9b7455e..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/port-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/port_mapping-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/port_mapping-c.ri deleted file mode 100644 index 3110575..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/port_mapping-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/query%3d-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/query%3d-i.ri deleted file mode 100644 index b843a29..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/query%3d-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/query-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/query-i.ri deleted file mode 100644 index a5c5cd9..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/query-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/query_values%3d-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/query_values%3d-i.ri deleted file mode 100644 index f596b54..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/query_values%3d-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/query_values-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/query_values-i.ri deleted file mode 100644 index b4d86fb..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/query_values-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/relative%3f-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/relative%3f-i.ri deleted file mode 100644 index 362bb38..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/relative%3f-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/replace_self-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/replace_self-i.ri deleted file mode 100644 index f4e1d8c..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/replace_self-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/request_uri%3d-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/request_uri%3d-i.ri deleted file mode 100644 index cce22b3..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/request_uri%3d-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/request_uri-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/request_uri-i.ri deleted file mode 100644 index 53a8fba..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/request_uri-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/route_from-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/route_from-i.ri deleted file mode 100644 index b7a8be9..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/route_from-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/route_to-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/route_to-i.ri deleted file mode 100644 index 9935b81..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/route_to-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/scheme%3d-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/scheme%3d-i.ri deleted file mode 100644 index ac510dd..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/scheme%3d-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/scheme-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/scheme-i.ri deleted file mode 100644 index c5ceabc..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/scheme-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/site%3d-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/site%3d-i.ri deleted file mode 100644 index cad8bef..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/site%3d-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/site-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/site-i.ri deleted file mode 100644 index dbe0de0..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/site-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/split_path-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/split_path-i.ri deleted file mode 100644 index df967e9..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/split_path-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/to_hash-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/to_hash-i.ri deleted file mode 100644 index c35afab..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/to_hash-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/to_s-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/to_s-i.ri deleted file mode 100644 index d1601eb..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/to_s-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/to_str-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/to_str-i.ri deleted file mode 100644 index a615890..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/to_str-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/unencode-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/unencode-c.ri deleted file mode 100644 index 8a4594a..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/unencode-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/unencode_component-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/unencode_component-c.ri deleted file mode 100644 index 03dab1e..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/unencode_component-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/unescape-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/unescape-c.ri deleted file mode 100644 index 3305f8d..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/unescape-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/unescape_component-c.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/unescape_component-c.ri deleted file mode 100644 index ed20fc7..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/unescape_component-c.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/user%3d-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/user%3d-i.ri deleted file mode 100644 index cd7a0f5..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/user%3d-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/user-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/user-i.ri deleted file mode 100644 index 68331d1..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/user-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/userinfo%3d-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/userinfo%3d-i.ri deleted file mode 100644 index 6d7318e..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/userinfo%3d-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/userinfo-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/userinfo-i.ri deleted file mode 100644 index d114082..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/userinfo-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/validate-i.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/URI/validate-i.ri deleted file mode 100644 index 14b772f..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/URI/validate-i.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/VERSION/cdesc-VERSION.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/VERSION/cdesc-VERSION.ri deleted file mode 100644 index ca46ea3..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/VERSION/cdesc-VERSION.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/Addressable/cdesc-Addressable.ri b/.gems/doc/addressable-2.3.6/ri/Addressable/cdesc-Addressable.ri deleted file mode 100644 index 12e25ad..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/Addressable/cdesc-Addressable.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/cache.ri b/.gems/doc/addressable-2.3.6/ri/cache.ri deleted file mode 100644 index 6e2de72..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/cache.ri and /dev/null differ diff --git a/.gems/doc/addressable-2.3.6/ri/page-README_md.ri b/.gems/doc/addressable-2.3.6/ri/page-README_md.ri deleted file mode 100644 index ea840eb..0000000 Binary files a/.gems/doc/addressable-2.3.6/ri/page-README_md.ri and /dev/null differ diff --git a/.gems/doc/buftok-0.2.0/ri/BufferedTokenizer/cdesc-BufferedTokenizer.ri b/.gems/doc/buftok-0.2.0/ri/BufferedTokenizer/cdesc-BufferedTokenizer.ri deleted file mode 100644 index cba49a3..0000000 Binary files a/.gems/doc/buftok-0.2.0/ri/BufferedTokenizer/cdesc-BufferedTokenizer.ri and /dev/null differ diff --git a/.gems/doc/buftok-0.2.0/ri/BufferedTokenizer/extract-i.ri b/.gems/doc/buftok-0.2.0/ri/BufferedTokenizer/extract-i.ri deleted file mode 100644 index 47ac9d3..0000000 Binary files a/.gems/doc/buftok-0.2.0/ri/BufferedTokenizer/extract-i.ri and /dev/null differ diff --git a/.gems/doc/buftok-0.2.0/ri/BufferedTokenizer/flush-i.ri b/.gems/doc/buftok-0.2.0/ri/BufferedTokenizer/flush-i.ri deleted file mode 100644 index 595d373..0000000 Binary files a/.gems/doc/buftok-0.2.0/ri/BufferedTokenizer/flush-i.ri and /dev/null differ diff --git a/.gems/doc/buftok-0.2.0/ri/BufferedTokenizer/new-c.ri b/.gems/doc/buftok-0.2.0/ri/BufferedTokenizer/new-c.ri deleted file mode 100644 index 9bc4ec8..0000000 Binary files a/.gems/doc/buftok-0.2.0/ri/BufferedTokenizer/new-c.ri and /dev/null differ diff --git a/.gems/doc/buftok-0.2.0/ri/cache.ri b/.gems/doc/buftok-0.2.0/ri/cache.ri deleted file mode 100644 index ee107e3..0000000 Binary files a/.gems/doc/buftok-0.2.0/ri/cache.ri and /dev/null differ diff --git a/.gems/doc/equalizer-0.0.9/ri/Equalizer/Methods/%3d%3d-i.ri b/.gems/doc/equalizer-0.0.9/ri/Equalizer/Methods/%3d%3d-i.ri deleted file mode 100644 index 33327fa..0000000 Binary files a/.gems/doc/equalizer-0.0.9/ri/Equalizer/Methods/%3d%3d-i.ri and /dev/null differ diff --git a/.gems/doc/equalizer-0.0.9/ri/Equalizer/Methods/cdesc-Methods.ri b/.gems/doc/equalizer-0.0.9/ri/Equalizer/Methods/cdesc-Methods.ri deleted file mode 100644 index 373e4f2..0000000 Binary files a/.gems/doc/equalizer-0.0.9/ri/Equalizer/Methods/cdesc-Methods.ri and /dev/null differ diff --git a/.gems/doc/equalizer-0.0.9/ri/Equalizer/Methods/eql%3f-i.ri b/.gems/doc/equalizer-0.0.9/ri/Equalizer/Methods/eql%3f-i.ri deleted file mode 100644 index 9526048..0000000 Binary files a/.gems/doc/equalizer-0.0.9/ri/Equalizer/Methods/eql%3f-i.ri and /dev/null differ diff --git a/.gems/doc/equalizer-0.0.9/ri/Equalizer/cdesc-Equalizer.ri b/.gems/doc/equalizer-0.0.9/ri/Equalizer/cdesc-Equalizer.ri deleted file mode 100644 index eebb130..0000000 Binary files a/.gems/doc/equalizer-0.0.9/ri/Equalizer/cdesc-Equalizer.ri and /dev/null differ diff --git a/.gems/doc/equalizer-0.0.9/ri/Equalizer/define_cmp_method-i.ri b/.gems/doc/equalizer-0.0.9/ri/Equalizer/define_cmp_method-i.ri deleted file mode 100644 index eeb6df8..0000000 Binary files a/.gems/doc/equalizer-0.0.9/ri/Equalizer/define_cmp_method-i.ri and /dev/null differ diff --git a/.gems/doc/equalizer-0.0.9/ri/Equalizer/define_hash_method-i.ri b/.gems/doc/equalizer-0.0.9/ri/Equalizer/define_hash_method-i.ri deleted file mode 100644 index b6ec3c6..0000000 Binary files a/.gems/doc/equalizer-0.0.9/ri/Equalizer/define_hash_method-i.ri and /dev/null differ diff --git a/.gems/doc/equalizer-0.0.9/ri/Equalizer/define_inspect_method-i.ri b/.gems/doc/equalizer-0.0.9/ri/Equalizer/define_inspect_method-i.ri deleted file mode 100644 index b0d4032..0000000 Binary files a/.gems/doc/equalizer-0.0.9/ri/Equalizer/define_inspect_method-i.ri and /dev/null differ diff --git a/.gems/doc/equalizer-0.0.9/ri/Equalizer/define_methods-i.ri b/.gems/doc/equalizer-0.0.9/ri/Equalizer/define_methods-i.ri deleted file mode 100644 index 02ad398..0000000 Binary files a/.gems/doc/equalizer-0.0.9/ri/Equalizer/define_methods-i.ri and /dev/null differ diff --git a/.gems/doc/equalizer-0.0.9/ri/Equalizer/included-i.ri b/.gems/doc/equalizer-0.0.9/ri/Equalizer/included-i.ri deleted file mode 100644 index 614d482..0000000 Binary files a/.gems/doc/equalizer-0.0.9/ri/Equalizer/included-i.ri and /dev/null differ diff --git a/.gems/doc/equalizer-0.0.9/ri/Equalizer/new-c.ri b/.gems/doc/equalizer-0.0.9/ri/Equalizer/new-c.ri deleted file mode 100644 index fb378fa..0000000 Binary files a/.gems/doc/equalizer-0.0.9/ri/Equalizer/new-c.ri and /dev/null differ diff --git a/.gems/doc/equalizer-0.0.9/ri/cache.ri b/.gems/doc/equalizer-0.0.9/ri/cache.ri deleted file mode 100644 index ce6290c..0000000 Binary files a/.gems/doc/equalizer-0.0.9/ri/cache.ri and /dev/null differ diff --git a/.gems/doc/equalizer-0.0.9/ri/page-CONTRIBUTING_md.ri b/.gems/doc/equalizer-0.0.9/ri/page-CONTRIBUTING_md.ri deleted file mode 100644 index e8109e3..0000000 Binary files a/.gems/doc/equalizer-0.0.9/ri/page-CONTRIBUTING_md.ri and /dev/null differ diff --git a/.gems/doc/equalizer-0.0.9/ri/page-LICENSE.ri b/.gems/doc/equalizer-0.0.9/ri/page-LICENSE.ri deleted file mode 100644 index d2bd28d..0000000 Binary files a/.gems/doc/equalizer-0.0.9/ri/page-LICENSE.ri and /dev/null differ diff --git a/.gems/doc/equalizer-0.0.9/ri/page-README_md.ri b/.gems/doc/equalizer-0.0.9/ri/page-README_md.ri deleted file mode 100644 index 43ad3cf..0000000 Binary files a/.gems/doc/equalizer-0.0.9/ri/page-README_md.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/EmHttpSslPatch/cdesc-EmHttpSslPatch.ri b/.gems/doc/faraday-0.9.0/ri/EmHttpSslPatch/cdesc-EmHttpSslPatch.ri deleted file mode 100644 index 8c415d8..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/EmHttpSslPatch/cdesc-EmHttpSslPatch.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/EmHttpSslPatch/certificate_store-i.ri b/.gems/doc/faraday-0.9.0/ri/EmHttpSslPatch/certificate_store-i.ri deleted file mode 100644 index fd6d7f4..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/EmHttpSslPatch/certificate_store-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/EmHttpSslPatch/host-i.ri b/.gems/doc/faraday-0.9.0/ri/EmHttpSslPatch/host-i.ri deleted file mode 100644 index 5ae0a8e..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/EmHttpSslPatch/host-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/EmHttpSslPatch/ssl_handshake_completed-i.ri b/.gems/doc/faraday-0.9.0/ri/EmHttpSslPatch/ssl_handshake_completed-i.ri deleted file mode 100644 index dba5a70..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/EmHttpSslPatch/ssl_handshake_completed-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/EmHttpSslPatch/ssl_verify_peer-i.ri b/.gems/doc/faraday-0.9.0/ri/EmHttpSslPatch/ssl_verify_peer-i.ri deleted file mode 100644 index f63e43f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/EmHttpSslPatch/ssl_verify_peer-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/EmHttpSslPatch/verify_peer%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/EmHttpSslPatch/verify_peer%3f-i.ri deleted file mode 100644 index 2fd8d73..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/EmHttpSslPatch/verify_peer%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/EventMachine/cdesc-EventMachine.ri b/.gems/doc/faraday-0.9.0/ri/EventMachine/cdesc-EventMachine.ri deleted file mode 100644 index 7332911..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/EventMachine/cdesc-EventMachine.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/add-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/add-i.ri deleted file mode 100644 index 64d8567..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/add-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/cdesc-Manager.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/cdesc-Manager.ri deleted file mode 100644 index 86fb211..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/cdesc-Manager.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/check_finished-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/check_finished-i.ri deleted file mode 100644 index 537a2da..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/check_finished-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/new-c.ri deleted file mode 100644 index 07ae3cc..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/perform_request-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/perform_request-i.ri deleted file mode 100644 index 276bfb5..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/perform_request-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/reset-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/reset-i.ri deleted file mode 100644 index d67ba02..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/reset-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/run-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/run-i.ri deleted file mode 100644 index bf09257..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/run-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/running%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/running%3f-i.ri deleted file mode 100644 index c8a0274..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Manager/running%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/cdesc-Options.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/cdesc-Options.ri deleted file mode 100644 index d93455f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/cdesc-Options.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/configure_compression-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/configure_compression-i.ri deleted file mode 100644 index 5bc562e..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/configure_compression-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/configure_proxy-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/configure_proxy-i.ri deleted file mode 100644 index 2079536..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/configure_proxy-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/configure_socket-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/configure_socket-i.ri deleted file mode 100644 index a147bae..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/configure_socket-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/configure_ssl-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/configure_ssl-i.ri deleted file mode 100644 index c780840..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/configure_ssl-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/configure_timeout-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/configure_timeout-i.ri deleted file mode 100644 index aeeab94..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/configure_timeout-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/connection_config-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/connection_config-i.ri deleted file mode 100644 index e25cf17..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/connection_config-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/read_body-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/read_body-i.ri deleted file mode 100644 index 5f3088a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/read_body-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/request_config-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/request_config-i.ri deleted file mode 100644 index e28d64a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/request_config-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/request_options-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/request_options-i.ri deleted file mode 100644 index a738e16..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/Options/request_options-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/call-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/call-i.ri deleted file mode 100644 index 5dfab40..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/call-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/cdesc-EMHttp.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/cdesc-EMHttp.ri deleted file mode 100644 index a5c41b3..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/cdesc-EMHttp.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/error_message-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/error_message-i.ri deleted file mode 100644 index a55b376..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/error_message-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/parallel%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/parallel%3f-i.ri deleted file mode 100644 index 15cd9d1..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/parallel%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/perform_request-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/perform_request-i.ri deleted file mode 100644 index cb3e18a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/perform_request-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/perform_single_request-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/perform_single_request-i.ri deleted file mode 100644 index fd4f986..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/perform_single_request-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/raise_error-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/raise_error-i.ri deleted file mode 100644 index 4814dcd..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/raise_error-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/setup_parallel_manager-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/setup_parallel_manager-c.ri deleted file mode 100644 index 4101c59..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMHttp/setup_parallel_manager-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/ParallelManager/add-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/ParallelManager/add-i.ri deleted file mode 100644 index 68d51ba..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/ParallelManager/add-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/ParallelManager/cdesc-ParallelManager.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/ParallelManager/cdesc-ParallelManager.ri deleted file mode 100644 index 65f8ac4..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/ParallelManager/cdesc-ParallelManager.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/ParallelManager/perform-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/ParallelManager/perform-i.ri deleted file mode 100644 index 47aeb23..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/ParallelManager/perform-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/ParallelManager/queue-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/ParallelManager/queue-i.ri deleted file mode 100644 index eebc23e..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/ParallelManager/queue-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/ParallelManager/run-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/ParallelManager/run-i.ri deleted file mode 100644 index 66d1715..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/ParallelManager/run-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/call-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/call-i.ri deleted file mode 100644 index 2018fc6..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/call-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/cdesc-EMSynchrony.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/cdesc-EMSynchrony.ri deleted file mode 100644 index 8ebbf02..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/cdesc-EMSynchrony.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/setup_parallel_manager-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/setup_parallel_manager-c.ri deleted file mode 100644 index 8c54a49..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/EMSynchrony/setup_parallel_manager-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Excon/call-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Excon/call-i.ri deleted file mode 100644 index f43f47f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Excon/call-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Excon/cdesc-Excon.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Excon/cdesc-Excon.ri deleted file mode 100644 index 9e8e26a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Excon/cdesc-Excon.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Excon/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Excon/new-c.ri deleted file mode 100644 index cf37f05..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Excon/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Excon/read_body-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Excon/read_body-i.ri deleted file mode 100644 index 5cb55ea..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Excon/read_body-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/call-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/call-i.ri deleted file mode 100644 index a6c2819..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/call-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/cdesc-HTTPClient.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/cdesc-HTTPClient.ri deleted file mode 100644 index ef5a4d2..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/cdesc-HTTPClient.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/client-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/client-i.ri deleted file mode 100644 index a88427e..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/client-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/configure_proxy-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/configure_proxy-i.ri deleted file mode 100644 index ce15ae7..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/configure_proxy-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/configure_socket-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/configure_socket-i.ri deleted file mode 100644 index 17b2c08..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/configure_socket-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/configure_ssl-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/configure_ssl-i.ri deleted file mode 100644 index bdad4d4..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/configure_ssl-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/configure_timeouts-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/configure_timeouts-i.ri deleted file mode 100644 index 3e5daff..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/configure_timeouts-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/ssl_verify_mode-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/ssl_verify_mode-i.ri deleted file mode 100644 index 9c9d8a0..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/HTTPClient/ssl_verify_mode-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/OpenSSL/SSL/cdesc-SSL.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/OpenSSL/SSL/cdesc-SSL.ri deleted file mode 100644 index 2d44fa8..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/OpenSSL/SSL/cdesc-SSL.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/OpenSSL/cdesc-OpenSSL.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/OpenSSL/cdesc-OpenSSL.ri deleted file mode 100644 index 12a4890..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/OpenSSL/cdesc-OpenSSL.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/call-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/call-i.ri deleted file mode 100644 index a58b80f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/call-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/cdesc-NetHttp.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/cdesc-NetHttp.ri deleted file mode 100644 index 4207400..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/cdesc-NetHttp.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/configure_ssl-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/configure_ssl-i.ri deleted file mode 100644 index c89cb71..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/configure_ssl-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/create_request-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/create_request-i.ri deleted file mode 100644 index 3faf730..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/create_request-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/net_http_connection-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/net_http_connection-i.ri deleted file mode 100644 index 374a7dc..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/net_http_connection-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/perform_request-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/perform_request-i.ri deleted file mode 100644 index a764361..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/perform_request-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/ssl_cert_store-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/ssl_cert_store-i.ri deleted file mode 100644 index 1ba08df..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/ssl_cert_store-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/ssl_verify_mode-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/ssl_verify_mode-i.ri deleted file mode 100644 index 71bd93b..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttp/ssl_verify_mode-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttpPersistent/cdesc-NetHttpPersistent.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttpPersistent/cdesc-NetHttpPersistent.ri deleted file mode 100644 index 4d9087c..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttpPersistent/cdesc-NetHttpPersistent.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttpPersistent/configure_ssl-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttpPersistent/configure_ssl-i.ri deleted file mode 100644 index b4b3063..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttpPersistent/configure_ssl-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttpPersistent/net_http_connection-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttpPersistent/net_http_connection-i.ri deleted file mode 100644 index 116e22c..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttpPersistent/net_http_connection-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttpPersistent/perform_request-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttpPersistent/perform_request-i.ri deleted file mode 100644 index d0a991f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttpPersistent/perform_request-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttpPersistent/proxy_uri;/cdesc-proxy_uri;.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttpPersistent/proxy_uri;/cdesc-proxy_uri;.ri deleted file mode 100644 index eb44621..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/NetHttpPersistent/proxy_uri;/cdesc-proxy_uri;.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Parallelism/cdesc-Parallelism.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Parallelism/cdesc-Parallelism.ri deleted file mode 100644 index 777db80..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Parallelism/cdesc-Parallelism.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Parallelism/inherited-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Parallelism/inherited-i.ri deleted file mode 100644 index e08ced6..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Parallelism/inherited-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Parallelism/supports_parallel%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Parallelism/supports_parallel%3f-i.ri deleted file mode 100644 index 4646326..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Parallelism/supports_parallel%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Parallelism/supports_parallel-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Parallelism/supports_parallel-i.ri deleted file mode 100644 index 3570933..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Parallelism/supports_parallel-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Patron/Request/cdesc-Request.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Patron/Request/cdesc-Request.ri deleted file mode 100644 index 2705c5a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Patron/Request/cdesc-Request.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Patron/call-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Patron/call-i.ri deleted file mode 100644 index dd2256f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Patron/call-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Patron/cdesc-Patron.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Patron/cdesc-Patron.ri deleted file mode 100644 index b75ddbf..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Patron/cdesc-Patron.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Patron/create_session-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Patron/create_session-i.ri deleted file mode 100644 index cb7dafd..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Patron/create_session-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Patron/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Patron/new-c.ri deleted file mode 100644 index 18a486b..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Patron/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Rack/call-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Rack/call-i.ri deleted file mode 100644 index 8383d29..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Rack/call-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Rack/cdesc-Rack.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Rack/cdesc-Rack.ri deleted file mode 100644 index d992581..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Rack/cdesc-Rack.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Rack/execute_request-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Rack/execute_request-i.ri deleted file mode 100644 index f7e77ce..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Rack/execute_request-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Rack/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Rack/new-c.ri deleted file mode 100644 index 41b548a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Rack/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stub/cdesc-Stub.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stub/cdesc-Stub.ri deleted file mode 100644 index ab9968b..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stub/cdesc-Stub.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stub/headers_match%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stub/headers_match%3f-i.ri deleted file mode 100644 index 02e8ab4..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stub/headers_match%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stub/matches%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stub/matches%3f-i.ri deleted file mode 100644 index d445d9f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stub/matches%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stub/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stub/new-c.ri deleted file mode 100644 index 4a5c223..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stub/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stub/params_match%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stub/params_match%3f-i.ri deleted file mode 100644 index 1dac572..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stub/params_match%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stub/to_s-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stub/to_s-i.ri deleted file mode 100644 index a01ae92..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stub/to_s-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/NotFound/cdesc-NotFound.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/NotFound/cdesc-NotFound.ri deleted file mode 100644 index 5a571d2..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/NotFound/cdesc-NotFound.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/cdesc-Stubs.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/cdesc-Stubs.ri deleted file mode 100644 index fbd7f63..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/cdesc-Stubs.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/delete-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/delete-i.ri deleted file mode 100644 index 5e770a4..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/delete-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/empty%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/empty%3f-i.ri deleted file mode 100644 index 73b2e76..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/empty%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/get-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/get-i.ri deleted file mode 100644 index e0a6a1a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/get-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/head-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/head-i.ri deleted file mode 100644 index c290890..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/head-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/match-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/match-i.ri deleted file mode 100644 index 9914055..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/match-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/matches%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/matches%3f-i.ri deleted file mode 100644 index 82de4bb..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/matches%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/new-c.ri deleted file mode 100644 index 50e5a42..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/new_stub-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/new_stub-i.ri deleted file mode 100644 index 43b1f4d..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/new_stub-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/options-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/options-i.ri deleted file mode 100644 index 479d5e8..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/options-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/patch-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/patch-i.ri deleted file mode 100644 index 49386e5..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/patch-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/post-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/post-i.ri deleted file mode 100644 index bcf7701..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/post-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/put-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/put-i.ri deleted file mode 100644 index 3ba0539..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/put-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/verify_stubbed_calls-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/verify_stubbed_calls-i.ri deleted file mode 100644 index 891c71f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/Stubs/verify_stubbed_calls-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/call-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/call-i.ri deleted file mode 100644 index d7cc10e..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/call-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/cdesc-Test.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/cdesc-Test.ri deleted file mode 100644 index f201ce0..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/cdesc-Test.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/configure-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/configure-i.ri deleted file mode 100644 index 30af018..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/configure-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/new-c.ri deleted file mode 100644 index d466713..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/stubs-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/stubs-i.ri deleted file mode 100644 index 9989230..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Test/stubs-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/call-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/call-i.ri deleted file mode 100644 index 2c9d2c3..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/call-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/cdesc-Typhoeus.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/cdesc-Typhoeus.ri deleted file mode 100644 index efef68b..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/cdesc-Typhoeus.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/configure_proxy-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/configure_proxy-i.ri deleted file mode 100644 index 8277172..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/configure_proxy-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/configure_socket-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/configure_socket-i.ri deleted file mode 100644 index 7645571..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/configure_socket-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/configure_ssl-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/configure_ssl-i.ri deleted file mode 100644 index 5d56c3c..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/configure_ssl-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/configure_timeout-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/configure_timeout-i.ri deleted file mode 100644 index 1964196..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/configure_timeout-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/parallel%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/parallel%3f-i.ri deleted file mode 100644 index 038f9b7..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/parallel%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/perform_request-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/perform_request-i.ri deleted file mode 100644 index ae60883..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/perform_request-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/read_body-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/read_body-i.ri deleted file mode 100644 index 1f2017a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/read_body-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/request-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/request-i.ri deleted file mode 100644 index b9b30e9..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/request-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/request_options-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/request_options-i.ri deleted file mode 100644 index fce6542..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/request_options-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/setup_parallel_manager-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/setup_parallel_manager-c.ri deleted file mode 100644 index c65a2bc..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/Typhoeus/setup_parallel_manager-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/call-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/call-i.ri deleted file mode 100644 index 7d3ccd9..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/call-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/cdesc-Adapter.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/cdesc-Adapter.ri deleted file mode 100644 index 405ba77..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/cdesc-Adapter.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/save_response-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/save_response-i.ri deleted file mode 100644 index 2a381b8..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Adapter/save_response-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/AutoloadHelper/all_loaded_constants-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/AutoloadHelper/all_loaded_constants-i.ri deleted file mode 100644 index 4b5ae51..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/AutoloadHelper/all_loaded_constants-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/AutoloadHelper/autoload_all-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/AutoloadHelper/autoload_all-i.ri deleted file mode 100644 index 36a6f2f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/AutoloadHelper/autoload_all-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/AutoloadHelper/cdesc-AutoloadHelper.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/AutoloadHelper/cdesc-AutoloadHelper.ri deleted file mode 100644 index 17e5040..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/AutoloadHelper/cdesc-AutoloadHelper.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/AutoloadHelper/load_autoloaded_constants-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/AutoloadHelper/load_autoloaded_constants-i.ri deleted file mode 100644 index 833524c..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/AutoloadHelper/load_autoloaded_constants-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/ClientError/backtrace-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/ClientError/backtrace-i.ri deleted file mode 100644 index 58ec4ab..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/ClientError/backtrace-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/ClientError/cdesc-ClientError.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/ClientError/cdesc-ClientError.ri deleted file mode 100644 index e4cff87..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/ClientError/cdesc-ClientError.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/ClientError/inspect-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/ClientError/inspect-i.ri deleted file mode 100644 index 59ced11..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/ClientError/inspect-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/ClientError/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/ClientError/new-c.ri deleted file mode 100644 index da56ca9..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/ClientError/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/ClientError/response-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/ClientError/response-i.ri deleted file mode 100644 index 5a33073..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/ClientError/response-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/advance_io-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/advance_io-i.ri deleted file mode 100644 index d9b061b..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/advance_io-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/cdesc-CompositeReadIO.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/cdesc-CompositeReadIO.ri deleted file mode 100644 index 6d66aa0..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/cdesc-CompositeReadIO.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/close-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/close-i.ri deleted file mode 100644 index b5997f4..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/close-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/current_io-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/current_io-i.ri deleted file mode 100644 index a7eaa85..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/current_io-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/ensure_open_and_readable-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/ensure_open_and_readable-i.ri deleted file mode 100644 index e6d956d..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/ensure_open_and_readable-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/length-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/length-i.ri deleted file mode 100644 index 518c9fe..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/length-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/new-c.ri deleted file mode 100644 index cd735da..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/read-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/read-i.ri deleted file mode 100644 index 201dd0f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/read-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/rewind-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/rewind-i.ri deleted file mode 100644 index f09ef4d..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/CompositeReadIO/rewind-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/authorization-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/authorization-i.ri deleted file mode 100644 index 7294bbf..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/authorization-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/basic_auth-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/basic_auth-i.ri deleted file mode 100644 index 06ecd0f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/basic_auth-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/build_exclusive_url-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/build_exclusive_url-i.ri deleted file mode 100644 index 11d4f0f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/build_exclusive_url-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/build_request-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/build_request-i.ri deleted file mode 100644 index 9b67faf..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/build_request-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/build_url-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/build_url-i.ri deleted file mode 100644 index 2f2644f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/build_url-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/builder-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/builder-i.ri deleted file mode 100644 index 62a2405..0000000 --- a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/builder-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI" builder:ETI" Faraday::Connection#builder;FI"R;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Public: Returns the Faraday::Builder for this Connection.;T: -@fileI"lib/faraday/connection.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Faraday::Connection;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/cdesc-Connection.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/cdesc-Connection.ri deleted file mode 100644 index 171a407..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/cdesc-Connection.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/default_parallel_manager-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/default_parallel_manager-i.ri deleted file mode 100644 index 092e198..0000000 --- a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/default_parallel_manager-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI"default_parallel_manager:ETI"1Faraday::Connection#default_parallel_manager;FI"W;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CPublic: Sets the default parallel manager for this connection.;T: -@fileI"lib/faraday/connection.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Faraday::Connection;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/dup-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/dup-i.ri deleted file mode 100644 index 0ef42d6..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/dup-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/headers%3d-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/headers%3d-i.ri deleted file mode 100644 index ddbf423..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/headers%3d-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/headers-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/headers-i.ri deleted file mode 100644 index 854baeb..0000000 --- a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/headers-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI" headers:ETI" Faraday::Connection#headers;FI"R;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EPublic: Returns a Hash of unencoded HTTP header key/value pairs.;T: -@fileI"lib/faraday/connection.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Faraday::Connection;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/in_parallel%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/in_parallel%3f-i.ri deleted file mode 100644 index dcad915..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/in_parallel%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/in_parallel-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/in_parallel-i.ri deleted file mode 100644 index 1f87162..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/in_parallel-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/new-c.ri deleted file mode 100644 index d2f0cdf..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/options-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/options-i.ri deleted file mode 100644 index 88f9fc4..0000000 --- a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/options-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI" options:ETI" Faraday::Connection#options;FI"R;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Public: Returns a Hash of the request options.;T: -@fileI"lib/faraday/connection.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Faraday::Connection;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/parallel_manager-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/parallel_manager-i.ri deleted file mode 100644 index 6398498..0000000 --- a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/parallel_manager-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI"parallel_manager:ETI")Faraday::Connection#parallel_manager;FI"R;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Public: Returns the parallel manager for this Connection.;T: -@fileI"lib/faraday/connection.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Faraday::Connection;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/params%3d-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/params%3d-i.ri deleted file mode 100644 index 2067ea0..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/params%3d-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/params-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/params-i.ri deleted file mode 100644 index f125fed..0000000 --- a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/params-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI" params:ETI"Faraday::Connection#params;FI"R;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CPublic: Returns a Hash of URI query unencoded key/value pairs.;T: -@fileI"lib/faraday/connection.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Faraday::Connection;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/path_prefix%3d-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/path_prefix%3d-i.ri deleted file mode 100644 index cada069..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/path_prefix%3d-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/proxy-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/proxy-i.ri deleted file mode 100644 index 3c13ee1..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/proxy-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/run_request-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/run_request-i.ri deleted file mode 100644 index 896c818..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/run_request-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/set_authorization_header-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/set_authorization_header-i.ri deleted file mode 100644 index 7e5a695..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/set_authorization_header-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/ssl-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/ssl-i.ri deleted file mode 100644 index 57b3c56..0000000 --- a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/ssl-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI"ssl:ETI"Faraday::Connection#ssl;FI"R;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Public: Returns a Hash of the SSL options.;T: -@fileI"lib/faraday/connection.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Faraday::Connection;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/token_auth-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/token_auth-i.ri deleted file mode 100644 index 7d0d72e..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/token_auth-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/url_prefix%3d-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/url_prefix%3d-i.ri deleted file mode 100644 index 9a67aa8..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/url_prefix%3d-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/url_prefix-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/url_prefix-i.ri deleted file mode 100644 index 0a6823f..0000000 --- a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/url_prefix-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI"url_prefix:ETI"#Faraday::Connection#url_prefix;FI"R;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KPublic: Returns a URI with the prefix used for all requests from this ;TI"LConnection. This includes a default host name, scheme, port, and path.;T: -@fileI"lib/faraday/connection.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Faraday::Connection;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/with_uri_credentials-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/with_uri_credentials-i.ri deleted file mode 100644 index d9cb527..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Connection/with_uri_credentials-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/ConnectionFailed/cdesc-ConnectionFailed.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/ConnectionFailed/cdesc-ConnectionFailed.ri deleted file mode 100644 index ad50f2e..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/ConnectionFailed/cdesc-ConnectionFailed.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/ConnectionOptions/cdesc-ConnectionOptions.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/ConnectionOptions/cdesc-ConnectionOptions.ri deleted file mode 100644 index 51e6d02..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/ConnectionOptions/cdesc-ConnectionOptions.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/ConnectionOptions/new_builder-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/ConnectionOptions/new_builder-i.ri deleted file mode 100644 index f9c6b91..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/ConnectionOptions/new_builder-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/%5b%5d%3d-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Env/%5b%5d%3d-i.ri deleted file mode 100644 index 00f4815..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/%5b%5d%3d-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/%5b%5d-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Env/%5b%5d-i.ri deleted file mode 100644 index d44fbbf..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/%5b%5d-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/Utils/cdesc-Utils.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Env/Utils/cdesc-Utils.ri deleted file mode 100644 index 54f28bb..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/Utils/cdesc-Utils.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/cdesc-Env.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Env/cdesc-Env.ri deleted file mode 100644 index 34dcd94..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/cdesc-Env.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/clear_body-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Env/clear_body-i.ri deleted file mode 100644 index 538843e..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/clear_body-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/custom_members-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Env/custom_members-i.ri deleted file mode 100644 index b08291c..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/custom_members-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/in_member_set%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Env/in_member_set%3f-i.ri deleted file mode 100644 index 34e1674..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/in_member_set%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/inspect-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Env/inspect-i.ri deleted file mode 100644 index d3a6a87..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/inspect-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/member_set-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Env/member_set-c.ri deleted file mode 100644 index 2da5f1c..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/member_set-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/needs_body%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Env/needs_body%3f-i.ri deleted file mode 100644 index 790b19d..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/needs_body%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/parallel%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Env/parallel%3f-i.ri deleted file mode 100644 index d4b3d28..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/parallel%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/parse_body%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Env/parse_body%3f-i.ri deleted file mode 100644 index 0145627..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/parse_body%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/success%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Env/success%3f-i.ri deleted file mode 100644 index 323ada8..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Env/success%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Error/cdesc-Error.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Error/cdesc-Error.ri deleted file mode 100644 index 1308628..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Error/cdesc-Error.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/FlatParamsEncoder/cdesc-FlatParamsEncoder.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/FlatParamsEncoder/cdesc-FlatParamsEncoder.ri deleted file mode 100644 index e8818c1..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/FlatParamsEncoder/cdesc-FlatParamsEncoder.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/FlatParamsEncoder/decode-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/FlatParamsEncoder/decode-c.ri deleted file mode 100644 index 5824466..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/FlatParamsEncoder/decode-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/FlatParamsEncoder/encode-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/FlatParamsEncoder/encode-c.ri deleted file mode 100644 index fd364bc..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/FlatParamsEncoder/encode-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/FlatParamsEncoder/escape-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/FlatParamsEncoder/escape-c.ri deleted file mode 100644 index 9d08279..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/FlatParamsEncoder/escape-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/FlatParamsEncoder/unescape-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/FlatParamsEncoder/unescape-c.ri deleted file mode 100644 index 978e6de..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/FlatParamsEncoder/unescape-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Middleware/cdesc-Middleware.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Middleware/cdesc-Middleware.ri deleted file mode 100644 index e18f421..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Middleware/cdesc-Middleware.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Middleware/dependency-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Middleware/dependency-c.ri deleted file mode 100644 index 5b3312a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Middleware/dependency-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Middleware/inherited-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Middleware/inherited-c.ri deleted file mode 100644 index 67474b5..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Middleware/inherited-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Middleware/load_error-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Middleware/load_error-c.ri deleted file mode 100644 index ddaa373..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Middleware/load_error-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Middleware/loaded%3f-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Middleware/loaded%3f-c.ri deleted file mode 100644 index 9925119..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Middleware/loaded%3f-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Middleware/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Middleware/new-c.ri deleted file mode 100644 index e63cf4c..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Middleware/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/MiddlewareRegistry/cdesc-MiddlewareRegistry.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/MiddlewareRegistry/cdesc-MiddlewareRegistry.ri deleted file mode 100644 index f5ba1a0..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/MiddlewareRegistry/cdesc-MiddlewareRegistry.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/MiddlewareRegistry/fetch_middleware-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/MiddlewareRegistry/fetch_middleware-i.ri deleted file mode 100644 index 7816bd0..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/MiddlewareRegistry/fetch_middleware-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/MiddlewareRegistry/load_middleware-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/MiddlewareRegistry/load_middleware-i.ri deleted file mode 100644 index 5079d3a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/MiddlewareRegistry/load_middleware-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/MiddlewareRegistry/lookup_middleware-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/MiddlewareRegistry/lookup_middleware-i.ri deleted file mode 100644 index f9bb6cb..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/MiddlewareRegistry/lookup_middleware-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/MiddlewareRegistry/middleware_mutex-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/MiddlewareRegistry/middleware_mutex-i.ri deleted file mode 100644 index 7120014..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/MiddlewareRegistry/middleware_mutex-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/MiddlewareRegistry/register_middleware-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/MiddlewareRegistry/register_middleware-i.ri deleted file mode 100644 index fb84ed2..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/MiddlewareRegistry/register_middleware-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/MissingDependency/cdesc-MissingDependency.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/MissingDependency/cdesc-MissingDependency.ri deleted file mode 100644 index 475e9a0..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/MissingDependency/cdesc-MissingDependency.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/NestedParamsEncoder/cdesc-NestedParamsEncoder.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/NestedParamsEncoder/cdesc-NestedParamsEncoder.ri deleted file mode 100644 index 628aa03..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/NestedParamsEncoder/cdesc-NestedParamsEncoder.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/NestedParamsEncoder/decode-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/NestedParamsEncoder/decode-c.ri deleted file mode 100644 index 8484c88..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/NestedParamsEncoder/decode-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/NestedParamsEncoder/encode-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/NestedParamsEncoder/encode-c.ri deleted file mode 100644 index e4a3758..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/NestedParamsEncoder/encode-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/NestedParamsEncoder/escape-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/NestedParamsEncoder/escape-c.ri deleted file mode 100644 index f18bee7..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/NestedParamsEncoder/escape-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/NestedParamsEncoder/unescape-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/NestedParamsEncoder/unescape-c.ri deleted file mode 100644 index 1e3f928..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/NestedParamsEncoder/unescape-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/%5b%5d-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/%5b%5d-i.ri deleted file mode 100644 index fb98343..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/%5b%5d-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/attribute_options-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/attribute_options-c.ri deleted file mode 100644 index e68021b..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/attribute_options-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/cdesc-Options.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/cdesc-Options.ri deleted file mode 100644 index 58ae3cf..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/cdesc-Options.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/clear-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/clear-i.ri deleted file mode 100644 index 9f1b879..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/clear-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/delete-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/delete-i.ri deleted file mode 100644 index d507a66..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/delete-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/each-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/each-i.ri deleted file mode 100644 index 6737041..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/each-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/each_key-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/each_key-i.ri deleted file mode 100644 index e7aa075..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/each_key-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/each_value-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/each_value-i.ri deleted file mode 100644 index f39ed0b..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/each_value-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/empty%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/empty%3f-i.ri deleted file mode 100644 index 5665894..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/empty%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/fetch-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/fetch-i.ri deleted file mode 100644 index 946729f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/fetch-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/fetch_error_class-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/fetch_error_class-c.ri deleted file mode 100644 index 1003833..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/fetch_error_class-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/from-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/from-c.ri deleted file mode 100644 index 4c6da41..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/from-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/has_key%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/has_key%3f-i.ri deleted file mode 100644 index c158a31..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/has_key%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/has_value%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/has_value%3f-i.ri deleted file mode 100644 index 2450766..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/has_value%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/inherited-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/inherited-c.ri deleted file mode 100644 index 70072df..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/inherited-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/inspect-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/inspect-i.ri deleted file mode 100644 index 2e26a5a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/inspect-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/key%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/key%3f-i.ri deleted file mode 100644 index 934ac95..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/key%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/keys-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/keys-i.ri deleted file mode 100644 index 579df8a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/keys-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/memoized-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/memoized-c.ri deleted file mode 100644 index 87e8f75..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/memoized-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/memoized_attributes-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/memoized_attributes-c.ri deleted file mode 100644 index f1cd43c..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/memoized_attributes-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/merge%21-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/merge%21-i.ri deleted file mode 100644 index aa2b920..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/merge%21-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/merge-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/merge-i.ri deleted file mode 100644 index 1fed74a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/merge-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/options-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/options-c.ri deleted file mode 100644 index 52a4637..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/options-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/options_for-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/options_for-c.ri deleted file mode 100644 index ffe7290..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/options_for-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/symbolized_key_set-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/symbolized_key_set-i.ri deleted file mode 100644 index 38fbf75..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/symbolized_key_set-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/to_hash-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/to_hash-i.ri deleted file mode 100644 index 0ea4e38..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/to_hash-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/update-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/update-i.ri deleted file mode 100644 index 3f56841..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/update-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/value%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/value%3f-i.ri deleted file mode 100644 index 58f5f6f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/value%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/values_at-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Options/values_at-i.ri deleted file mode 100644 index e55bf71..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Options/values_at-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/ParsingError/cdesc-ParsingError.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/ParsingError/cdesc-ParsingError.ri deleted file mode 100644 index a820abc..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/ParsingError/cdesc-ParsingError.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/ProxyOptions/cdesc-ProxyOptions.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/ProxyOptions/cdesc-ProxyOptions.ri deleted file mode 100644 index 22d3a9b..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/ProxyOptions/cdesc-ProxyOptions.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/ProxyOptions/from-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/ProxyOptions/from-c.ri deleted file mode 100644 index 13d8644..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/ProxyOptions/from-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/%3d%3d-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/%3d%3d-i.ri deleted file mode 100644 index 5528cd4..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/%3d%3d-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/%5b%5d-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/%5b%5d-i.ri deleted file mode 100644 index 96c9681..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/%5b%5d-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/%3d%3d-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/%3d%3d-i.ri deleted file mode 100644 index fa39ab0..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/%3d%3d-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/build-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/build-i.ri deleted file mode 100644 index 6835edf..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/build-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/cdesc-Handler.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/cdesc-Handler.ri deleted file mode 100644 index c8f175c..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/cdesc-Handler.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/inspect-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/inspect-i.ri deleted file mode 100644 index 8deb6a0..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/inspect-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/klass-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/klass-i.ri deleted file mode 100644 index dc05d6f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/klass-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/name-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/name-i.ri deleted file mode 100644 index fac10d3..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/name-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/new-c.ri deleted file mode 100644 index cc96c38..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/Handler/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/StackLocked/cdesc-StackLocked.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/StackLocked/cdesc-StackLocked.ri deleted file mode 100644 index 4c0d921..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/StackLocked/cdesc-StackLocked.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/adapter-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/adapter-i.ri deleted file mode 100644 index f8439c6..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/adapter-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/app-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/app-i.ri deleted file mode 100644 index eefcdfc..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/app-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/assert_index-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/assert_index-i.ri deleted file mode 100644 index e8001b9..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/assert_index-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/build-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/build-i.ri deleted file mode 100644 index 7f6160d..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/build-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/build_env-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/build_env-i.ri deleted file mode 100644 index a5eb6c4..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/build_env-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/build_response-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/build_response-i.ri deleted file mode 100644 index d07221e..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/build_response-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/cdesc-RackBuilder.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/cdesc-RackBuilder.ri deleted file mode 100644 index 2f0dc02..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/cdesc-RackBuilder.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/delete-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/delete-i.ri deleted file mode 100644 index 90563eb..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/delete-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/dup-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/dup-i.ri deleted file mode 100644 index a794d85..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/dup-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/handlers-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/handlers-i.ri deleted file mode 100644 index 08aa557..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/handlers-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/insert-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/insert-i.ri deleted file mode 100644 index 3c2dc97..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/insert-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/insert_after-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/insert_after-i.ri deleted file mode 100644 index 2fa01c7..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/insert_after-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/insert_before-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/insert_before-i.ri deleted file mode 100644 index 1f33a97..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/insert_before-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/lock%21-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/lock%21-i.ri deleted file mode 100644 index ed1a759..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/lock%21-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/locked%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/locked%3f-i.ri deleted file mode 100644 index 6de6c42..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/locked%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/new-c.ri deleted file mode 100644 index 55d9b78..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/raise_if_locked-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/raise_if_locked-i.ri deleted file mode 100644 index 4d7ddb1..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/raise_if_locked-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/request-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/request-i.ri deleted file mode 100644 index 1eb68d3..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/request-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/response-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/response-i.ri deleted file mode 100644 index 8faa188..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/response-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/swap-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/swap-i.ri deleted file mode 100644 index 719b7af..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/swap-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/to_app-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/to_app-i.ri deleted file mode 100644 index 1b3f4fb..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/to_app-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/use-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/use-i.ri deleted file mode 100644 index feea659..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/use-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/use_symbol-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/use_symbol-i.ri deleted file mode 100644 index 4ff0f21..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RackBuilder/use_symbol-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/%5b%5d%3d-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/%5b%5d%3d-i.ri deleted file mode 100644 index 842d65f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/%5b%5d%3d-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/%5b%5d-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/%5b%5d-i.ri deleted file mode 100644 index 6a329c1..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/%5b%5d-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Authorization/build_hash-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Authorization/build_hash-c.ri deleted file mode 100644 index 8c469e7..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Authorization/build_hash-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Authorization/call-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Authorization/call-i.ri deleted file mode 100644 index a70eb0f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Authorization/call-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Authorization/cdesc-Authorization.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Authorization/cdesc-Authorization.ri deleted file mode 100644 index 04a9b8c..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Authorization/cdesc-Authorization.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Authorization/header-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Authorization/header-c.ri deleted file mode 100644 index fdb23cd..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Authorization/header-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Authorization/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Authorization/new-c.ri deleted file mode 100644 index 8d906d5..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Authorization/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/BasicAuthentication/cdesc-BasicAuthentication.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/BasicAuthentication/cdesc-BasicAuthentication.ri deleted file mode 100644 index 5685c5d..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/BasicAuthentication/cdesc-BasicAuthentication.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/BasicAuthentication/header-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/BasicAuthentication/header-c.ri deleted file mode 100644 index 55bb6ca..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/BasicAuthentication/header-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Instrumentation/Options/cdesc-Options.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Instrumentation/Options/cdesc-Options.ri deleted file mode 100644 index 482b37d..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Instrumentation/Options/cdesc-Options.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Instrumentation/Options/instrumenter-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Instrumentation/Options/instrumenter-i.ri deleted file mode 100644 index fdf231f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Instrumentation/Options/instrumenter-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Instrumentation/Options/name-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Instrumentation/Options/name-i.ri deleted file mode 100644 index 1657d73..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Instrumentation/Options/name-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Instrumentation/call-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Instrumentation/call-i.ri deleted file mode 100644 index 7f81aae..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Instrumentation/call-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Instrumentation/cdesc-Instrumentation.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Instrumentation/cdesc-Instrumentation.ri deleted file mode 100644 index 9d4796a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Instrumentation/cdesc-Instrumentation.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Instrumentation/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Instrumentation/new-c.ri deleted file mode 100644 index a2b5b9a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Instrumentation/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Multipart/call-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Multipart/call-i.ri deleted file mode 100644 index a1d0bd2..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Multipart/call-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Multipart/cdesc-Multipart.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Multipart/cdesc-Multipart.ri deleted file mode 100644 index 61d487a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Multipart/cdesc-Multipart.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Multipart/create_multipart-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Multipart/create_multipart-i.ri deleted file mode 100644 index 5081047..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Multipart/create_multipart-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Multipart/has_multipart%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Multipart/has_multipart%3f-i.ri deleted file mode 100644 index 1fa80df..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Multipart/has_multipart%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Multipart/process_params-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Multipart/process_params-i.ri deleted file mode 100644 index 8efbc56..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Multipart/process_params-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Multipart/process_request%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Multipart/process_request%3f-i.ri deleted file mode 100644 index 195957f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Multipart/process_request%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/backoff_factor-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/backoff_factor-i.ri deleted file mode 100644 index 36c9838..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/backoff_factor-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/cdesc-Options.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/cdesc-Options.ri deleted file mode 100644 index e336209..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/cdesc-Options.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/exceptions-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/exceptions-i.ri deleted file mode 100644 index 8603480..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/exceptions-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/from-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/from-c.ri deleted file mode 100644 index c2d87fe..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/from-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/interval-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/interval-i.ri deleted file mode 100644 index af78be0..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/interval-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/interval_randomness-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/interval_randomness-i.ri deleted file mode 100644 index d298dd5..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/interval_randomness-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/max-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/max-i.ri deleted file mode 100644 index 14a3571..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/Options/max-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/build_exception_matcher-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/build_exception_matcher-i.ri deleted file mode 100644 index 02476dd..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/build_exception_matcher-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/call-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/call-i.ri deleted file mode 100644 index b7be1a2..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/call-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/cdesc-Retry.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/cdesc-Retry.ri deleted file mode 100644 index 723ecdf..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/cdesc-Retry.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/matcher;/cdesc-matcher;.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/matcher;/cdesc-matcher;.ri deleted file mode 100644 index 9e847b0..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/matcher;/cdesc-matcher;.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/new-c.ri deleted file mode 100644 index 85c0e02..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/sleep_amount-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/sleep_amount-i.ri deleted file mode 100644 index c2124c0..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/Retry/sleep_amount-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/TokenAuthentication/cdesc-TokenAuthentication.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/TokenAuthentication/cdesc-TokenAuthentication.ri deleted file mode 100644 index cef314f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/TokenAuthentication/cdesc-TokenAuthentication.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/TokenAuthentication/header-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/TokenAuthentication/header-c.ri deleted file mode 100644 index 9829d3c..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/TokenAuthentication/header-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/TokenAuthentication/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/TokenAuthentication/new-c.ri deleted file mode 100644 index dde0a5c..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/TokenAuthentication/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/UrlEncoded/call-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/UrlEncoded/call-i.ri deleted file mode 100644 index 01e16da..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/UrlEncoded/call-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/UrlEncoded/cdesc-UrlEncoded.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/UrlEncoded/cdesc-UrlEncoded.ri deleted file mode 100644 index 5024e95..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/UrlEncoded/cdesc-UrlEncoded.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/UrlEncoded/match_content_type-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/UrlEncoded/match_content_type-i.ri deleted file mode 100644 index 564ab84..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/UrlEncoded/match_content_type-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/UrlEncoded/mime_type-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/UrlEncoded/mime_type-c.ri deleted file mode 100644 index 9803c97..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/UrlEncoded/mime_type-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/UrlEncoded/process_request%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/UrlEncoded/process_request%3f-i.ri deleted file mode 100644 index 17b028b..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/UrlEncoded/process_request%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/UrlEncoded/request_type-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/UrlEncoded/request_type-i.ri deleted file mode 100644 index 74eba93..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/UrlEncoded/request_type-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/cdesc-Request.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/cdesc-Request.ri deleted file mode 100644 index 02bb8d6..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/cdesc-Request.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/create-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/create-c.ri deleted file mode 100644 index 3e98419..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/create-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/headers%3d-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/headers%3d-i.ri deleted file mode 100644 index b043483..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/headers%3d-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/params%3d-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/params%3d-i.ri deleted file mode 100644 index 6c518de..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/params%3d-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/to_env-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/to_env-i.ri deleted file mode 100644 index ead007c..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/to_env-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/url-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Request/url-i.ri deleted file mode 100644 index 376ac5c..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Request/url-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RequestOptions/%5b%5d%3d-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RequestOptions/%5b%5d%3d-i.ri deleted file mode 100644 index d305f5f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RequestOptions/%5b%5d%3d-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/RequestOptions/cdesc-RequestOptions.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/RequestOptions/cdesc-RequestOptions.ri deleted file mode 100644 index c0434a3..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/RequestOptions/cdesc-RequestOptions.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/ResourceNotFound/cdesc-ResourceNotFound.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/ResourceNotFound/cdesc-ResourceNotFound.ri deleted file mode 100644 index c41fe56..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/ResourceNotFound/cdesc-ResourceNotFound.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Logger/call-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Logger/call-i.ri deleted file mode 100644 index 60f8701..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Logger/call-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Logger/cdesc-Logger.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Logger/cdesc-Logger.ri deleted file mode 100644 index facfc36..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Logger/cdesc-Logger.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Logger/dump_headers-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Logger/dump_headers-i.ri deleted file mode 100644 index 9374d84..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Logger/dump_headers-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Logger/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Logger/new-c.ri deleted file mode 100644 index 0c54345..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Logger/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Logger/on_complete-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Logger/on_complete-i.ri deleted file mode 100644 index e888d03..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Logger/on_complete-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Middleware/call-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Middleware/call-i.ri deleted file mode 100644 index b07614c..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Middleware/call-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Middleware/cdesc-Middleware.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Middleware/cdesc-Middleware.ri deleted file mode 100644 index 97b4782..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Middleware/cdesc-Middleware.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Middleware/on_complete-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Middleware/on_complete-i.ri deleted file mode 100644 index 402522e..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/Middleware/on_complete-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/RaiseError/cdesc-RaiseError.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/RaiseError/cdesc-RaiseError.ri deleted file mode 100644 index 0e59471..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/RaiseError/cdesc-RaiseError.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/RaiseError/on_complete-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/RaiseError/on_complete-i.ri deleted file mode 100644 index d0a7839..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/RaiseError/on_complete-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/RaiseError/response_values-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/RaiseError/response_values-i.ri deleted file mode 100644 index 1389b49..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/RaiseError/response_values-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/apply_request-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/apply_request-i.ri deleted file mode 100644 index df04492..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/apply_request-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/body-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/body-i.ri deleted file mode 100644 index 99ad14d..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/body-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/cdesc-Response.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/cdesc-Response.ri deleted file mode 100644 index 327b53b..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/cdesc-Response.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/env-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/env-i.ri deleted file mode 100644 index c91268c..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/env-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/finish-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/finish-i.ri deleted file mode 100644 index c722c4f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/finish-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/finished%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/finished%3f-i.ri deleted file mode 100644 index 6e5c684..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/finished%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/headers-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/headers-i.ri deleted file mode 100644 index 5e081a9..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/headers-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/marshal_dump-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/marshal_dump-i.ri deleted file mode 100644 index 2a4e89b..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/marshal_dump-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/marshal_load-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/marshal_load-i.ri deleted file mode 100644 index f396484..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/marshal_load-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/new-c.ri deleted file mode 100644 index 03335a3..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/on_complete-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/on_complete-i.ri deleted file mode 100644 index 7dcbe62..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/on_complete-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/status-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/status-i.ri deleted file mode 100644 index 477867d..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/status-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/success%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Response/success%3f-i.ri deleted file mode 100644 index 839311f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Response/success%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/SSLError/cdesc-SSLError.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/SSLError/cdesc-SSLError.ri deleted file mode 100644 index 013a849..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/SSLError/cdesc-SSLError.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/SSLOptions/cdesc-SSLOptions.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/SSLOptions/cdesc-SSLOptions.ri deleted file mode 100644 index b1a334f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/SSLOptions/cdesc-SSLOptions.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/SSLOptions/disable%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/SSLOptions/disable%3f-i.ri deleted file mode 100644 index 1325104..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/SSLOptions/disable%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/SSLOptions/verify%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/SSLOptions/verify%3f-i.ri deleted file mode 100644 index 6e000a2..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/SSLOptions/verify%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/TimeoutError/cdesc-TimeoutError.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/TimeoutError/cdesc-TimeoutError.ri deleted file mode 100644 index 9240f8f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/TimeoutError/cdesc-TimeoutError.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/TimeoutError/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/TimeoutError/new-c.ri deleted file mode 100644 index b94a1ee..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/TimeoutError/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/%5b%5d%3d-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/%5b%5d%3d-i.ri deleted file mode 100644 index 9142c92..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/%5b%5d%3d-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/%5b%5d-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/%5b%5d-i.ri deleted file mode 100644 index b2b4514..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/%5b%5d-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/cdesc-Headers.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/cdesc-Headers.ri deleted file mode 100644 index f6a3e42..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/cdesc-Headers.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/delete-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/delete-i.ri deleted file mode 100644 index fd79592..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/delete-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/fetch-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/fetch-i.ri deleted file mode 100644 index 1e08fca..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/fetch-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/from-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/from-c.ri deleted file mode 100644 index 8d92079..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/from-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/has_key%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/has_key%3f-i.ri deleted file mode 100644 index f51f57f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/has_key%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/include%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/include%3f-i.ri deleted file mode 100644 index 312512a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/include%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/key%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/key%3f-i.ri deleted file mode 100644 index 55f42ae..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/key%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/member%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/member%3f-i.ri deleted file mode 100644 index 9ea9419..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/member%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/merge%21-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/merge%21-i.ri deleted file mode 100644 index 3ee3bef..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/merge%21-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/merge-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/merge-i.ri deleted file mode 100644 index 79d3946..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/merge-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/new-c.ri deleted file mode 100644 index fb3f32d..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/parse-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/parse-i.ri deleted file mode 100644 index 8cb9b7a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/parse-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/replace-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/replace-i.ri deleted file mode 100644 index 2ecd61a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/replace-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/to_hash-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/to_hash-i.ri deleted file mode 100644 index 5c4e8cd..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/to_hash-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/update-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/update-i.ri deleted file mode 100644 index e31c77f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/Headers/update-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/%5b%5d%3d-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/%5b%5d%3d-i.ri deleted file mode 100644 index 12d5732..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/%5b%5d%3d-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/%5b%5d-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/%5b%5d-i.ri deleted file mode 100644 index 167a88b..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/%5b%5d-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/cdesc-ParamsHash.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/cdesc-ParamsHash.ri deleted file mode 100644 index e170d42..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/cdesc-ParamsHash.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/convert_key-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/convert_key-i.ri deleted file mode 100644 index 149be3c..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/convert_key-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/delete-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/delete-i.ri deleted file mode 100644 index 12ca127..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/delete-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/has_key%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/has_key%3f-i.ri deleted file mode 100644 index ab836d9..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/has_key%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/include%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/include%3f-i.ri deleted file mode 100644 index 6e3d4e1..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/include%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/key%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/key%3f-i.ri deleted file mode 100644 index 24c19bb..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/key%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/member%3f-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/member%3f-i.ri deleted file mode 100644 index 679e8be..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/member%3f-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/merge%21-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/merge%21-i.ri deleted file mode 100644 index 4a689cd..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/merge%21-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/merge-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/merge-i.ri deleted file mode 100644 index 93e2249..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/merge-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/merge_query-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/merge_query-i.ri deleted file mode 100644 index bf9b8c2..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/merge_query-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/replace-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/replace-i.ri deleted file mode 100644 index c8b4fe5..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/replace-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/to_query-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/to_query-i.ri deleted file mode 100644 index 7b45c21..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/to_query-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/update-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/update-i.ri deleted file mode 100644 index ea5b2d2..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/ParamsHash/update-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/URI-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/URI-i.ri deleted file mode 100644 index aaa8a16..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/URI-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/build_nested_query-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/build_nested_query-i.ri deleted file mode 100644 index c3d190a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/build_nested_query-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/build_query-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/build_query-i.ri deleted file mode 100644 index 70b1c4f..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/build_query-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/cdesc-Utils.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/cdesc-Utils.ri deleted file mode 100644 index 33f8dc8..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/cdesc-Utils.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/deep_merge%21-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/deep_merge%21-i.ri deleted file mode 100644 index 243101c..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/deep_merge%21-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/deep_merge-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/deep_merge-i.ri deleted file mode 100644 index 3de66d5..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/deep_merge-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/default_params_encoder-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/default_params_encoder-c.ri deleted file mode 100644 index 0d19346..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/default_params_encoder-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/default_params_encoder-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/default_params_encoder-i.ri deleted file mode 100644 index 122392b..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/default_params_encoder-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/default_uri_parser%3d-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/default_uri_parser%3d-i.ri deleted file mode 100644 index 7259e5a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/default_uri_parser%3d-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/default_uri_parser-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/default_uri_parser-i.ri deleted file mode 100644 index 2c70a9a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/default_uri_parser-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/escape-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/escape-i.ri deleted file mode 100644 index 9e2e23a..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/escape-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/normalize_params-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/normalize_params-i.ri deleted file mode 100644 index 86c0676..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/normalize_params-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/normalize_path-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/normalize_path-i.ri deleted file mode 100644 index 46d58b0..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/normalize_path-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/parse_nested_query-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/parse_nested_query-i.ri deleted file mode 100644 index 46bd100..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/parse_nested_query-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/parse_query-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/parse_query-i.ri deleted file mode 100644 index 9202a82..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/parse_query-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/sort_query_params-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/sort_query_params-i.ri deleted file mode 100644 index 307e0b9..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/sort_query_params-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/unescape-i.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/unescape-i.ri deleted file mode 100644 index fc9ca97..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/Utils/unescape-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/cdesc-Faraday.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/cdesc-Faraday.ri deleted file mode 100644 index a93723e..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/cdesc-Faraday.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/const_missing-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/const_missing-c.ri deleted file mode 100644 index c2c2e06..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/const_missing-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/default_adapter%3d-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/default_adapter%3d-c.ri deleted file mode 100644 index 313bb69..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/default_adapter%3d-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/default_adapter-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/default_adapter-c.ri deleted file mode 100644 index d853fdc..0000000 --- a/.gems/doc/faraday-0.9.0/ri/Faraday/default_adapter-c.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI"default_adapter:ETI"Faraday::default_adapter;FI"R;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NPublic: Gets or sets the Symbol key identifying a default Adapter to use ;TI")for the default Faraday::Connection.;T: -@fileI"lib/faraday.rb;T:0@omit_headings_from_table_of_contents_below0T@I" Faraday;FcRDoc::NormalModule0 \ No newline at end of file diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/default_connection-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/default_connection-c.ri deleted file mode 100644 index 40a8b7d..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/default_connection-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/default_connection_options-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/default_connection_options-c.ri deleted file mode 100644 index c23b771..0000000 --- a/.gems/doc/faraday-0.9.0/ri/Faraday/default_connection_options-c.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI"default_connection_options:ETI"(Faraday::default_connection_options;FI"W;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DPublic: Sets the default options used when calling Faraday#new.;T: -@fileI"lib/faraday.rb;T:0@omit_headings_from_table_of_contents_below0T@I" Faraday;FcRDoc::NormalModule0 \ No newline at end of file diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/lib_path-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/lib_path-c.ri deleted file mode 100644 index 1ffedb5..0000000 --- a/.gems/doc/faraday-0.9.0/ri/Faraday/lib_path-c.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI" lib_path:ETI"Faraday::lib_path;FI"RW;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IPublic: Gets or sets the path that the Faraday libs are loaded from.;T: -@fileI"lib/faraday.rb;T:0@omit_headings_from_table_of_contents_below0T@I" Faraday;FcRDoc::NormalModule0 \ No newline at end of file diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/method_missing-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/method_missing-c.ri deleted file mode 100644 index e9af071..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/method_missing-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/new-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/new-c.ri deleted file mode 100644 index c8b40a0..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/new-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/require_lib-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/require_lib-c.ri deleted file mode 100644 index 029d823..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/require_lib-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/require_libs-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/require_libs-c.ri deleted file mode 100644 index 945836e..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Faraday/require_libs-c.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Faraday/root_path-c.ri b/.gems/doc/faraday-0.9.0/ri/Faraday/root_path-c.ri deleted file mode 100644 index 6938e11..0000000 --- a/.gems/doc/faraday-0.9.0/ri/Faraday/root_path-c.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI"root_path:ETI"Faraday::root_path;FI"RW;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KPublic: Gets or sets the root path that Faraday is being loaded from. ;TI"DThis is the root from where the libraries are auto-loaded from.;T: -@fileI"lib/faraday.rb;T:0@omit_headings_from_table_of_contents_below0T@I" Faraday;FcRDoc::NormalModule0 \ No newline at end of file diff --git a/.gems/doc/faraday-0.9.0/ri/Object/cdesc-Object.ri b/.gems/doc/faraday-0.9.0/ri/Object/cdesc-Object.ri deleted file mode 100644 index 1c6d137..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Object/cdesc-Object.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/Object/tap-i.ri b/.gems/doc/faraday-0.9.0/ri/Object/tap-i.ri deleted file mode 100644 index 32f1706..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/Object/tap-i.ri and /dev/null differ diff --git a/.gems/doc/faraday-0.9.0/ri/cache.ri b/.gems/doc/faraday-0.9.0/ri/cache.ri deleted file mode 100644 index c5c85c7..0000000 Binary files a/.gems/doc/faraday-0.9.0/ri/cache.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/Base64/cdesc-Base64.ri b/.gems/doc/http-0.6.2/ri/Base64/cdesc-Base64.ri deleted file mode 100644 index bb0f8db..0000000 Binary files a/.gems/doc/http-0.6.2/ri/Base64/cdesc-Base64.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/BasicAuth/cdesc-BasicAuth.ri b/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/BasicAuth/cdesc-BasicAuth.ri deleted file mode 100644 index f39e285..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/BasicAuth/cdesc-BasicAuth.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/BasicAuth/new-c.ri b/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/BasicAuth/new-c.ri deleted file mode 100644 index 59f5648..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/BasicAuth/new-c.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/BearerToken/cdesc-BearerToken.ri b/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/BearerToken/cdesc-BearerToken.ri deleted file mode 100644 index c97a82f..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/BearerToken/cdesc-BearerToken.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/BearerToken/new-c.ri b/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/BearerToken/new-c.ri deleted file mode 100644 index 4072fb9..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/BearerToken/new-c.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/build-c.ri b/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/build-c.ri deleted file mode 100644 index c2cf910..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/build-c.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/cdesc-AuthorizationHeader.ri b/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/cdesc-AuthorizationHeader.ri deleted file mode 100644 index 06dbdfd..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/cdesc-AuthorizationHeader.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/register-c.ri b/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/register-c.ri deleted file mode 100644 index 1cf65da..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/AuthorizationHeader/register-c.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/accept-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/accept-i.ri deleted file mode 100644 index 2546b20..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/accept-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/auth-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/auth-i.ri deleted file mode 100644 index 6ae6e5f..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/auth-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/branch-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/branch-i.ri deleted file mode 100644 index 7d7e8f5..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/branch-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/cdesc-Chainable.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/cdesc-Chainable.ri deleted file mode 100644 index cee866a..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/cdesc-Chainable.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/connect-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/connect-i.ri deleted file mode 100644 index 251677a..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/connect-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/default_callbacks%3d-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/default_callbacks%3d-i.ri deleted file mode 100644 index c7c6de7..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/default_callbacks%3d-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/default_callbacks-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/default_callbacks-i.ri deleted file mode 100644 index bababd3..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/default_callbacks-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/default_headers%3d-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/default_headers%3d-i.ri deleted file mode 100644 index 6c26ed1..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/default_headers%3d-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/default_headers-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/default_headers-i.ri deleted file mode 100644 index fd20b64..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/default_headers-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/default_options%3d-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/default_options%3d-i.ri deleted file mode 100644 index 8a2f025..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/default_options%3d-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/default_options-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/default_options-i.ri deleted file mode 100644 index 0baee6f..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/default_options-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/delete-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/delete-i.ri deleted file mode 100644 index d94899a..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/delete-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/follow-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/follow-i.ri deleted file mode 100644 index 67ee078..0000000 --- a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/follow-i.ri +++ /dev/null @@ -1,3 +0,0 @@ -U:RDoc::AnyMethod[iI" follow:EFI"HTTP::Chainable#follow;FF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Make client follow redirects. ;TI"-@param opts (see Redirector#initialize) ;TI"@return [HTTP::Client];T: -@fileI"lib/http/chainable.rb;T:0@omit_headings_from_table_of_contents_below000[[I"with_follow;To;; [o; -; [I"(see #follow) ;TI"@deprecated;T; @; 0I"(opts = true);T@FI"Chainable;FcRDoc::NormalModule0 \ No newline at end of file diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/get-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/get-i.ri deleted file mode 100644 index 3bef440..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/get-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/head-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/head-i.ri deleted file mode 100644 index a230c1a..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/head-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/options-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/options-i.ri deleted file mode 100644 index c85bd33..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/options-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/patch-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/patch-i.ri deleted file mode 100644 index bc53397..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/patch-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/post-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/post-i.ri deleted file mode 100644 index f88f9e0..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/post-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/put-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/put-i.ri deleted file mode 100644 index b2e24f7..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/put-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/request-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/request-i.ri deleted file mode 100644 index 1f0912f..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/request-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/stream-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/stream-i.ri deleted file mode 100644 index d1bab5d..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/stream-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/through-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/through-i.ri deleted file mode 100644 index 6ba65b7..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/through-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/trace-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/trace-i.ri deleted file mode 100644 index a32f3c6..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/trace-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/via-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/via-i.ri deleted file mode 100644 index 1e98e90..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/via-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/with-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/with-i.ri deleted file mode 100644 index 3d77a39..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/with-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/with_follow-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/with_follow-i.ri deleted file mode 100644 index 28edbae..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/with_follow-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/with_headers-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Chainable/with_headers-i.ri deleted file mode 100644 index 2e14459..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Chainable/with_headers-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Client/cdesc-Client.ri b/.gems/doc/http-0.6.2/ri/HTTP/Client/cdesc-Client.ri deleted file mode 100644 index 9f6457b..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Client/cdesc-Client.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Client/default_options-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Client/default_options-i.ri deleted file mode 100644 index d439087..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Client/default_options-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Client/finish_response-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Client/finish_response-i.ri deleted file mode 100644 index a921f20..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Client/finish_response-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Client/make_request_body-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Client/make_request_body-i.ri deleted file mode 100644 index 253c216..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Client/make_request_body-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Client/make_request_uri-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Client/make_request_uri-i.ri deleted file mode 100644 index 03f74ac..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Client/make_request_uri-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Client/new-c.ri b/.gems/doc/http-0.6.2/ri/HTTP/Client/new-c.ri deleted file mode 100644 index dab7093..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Client/new-c.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Client/perform-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Client/perform-i.ri deleted file mode 100644 index 1f4ba92..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Client/perform-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Client/read_more-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Client/read_more-i.ri deleted file mode 100644 index 4626461..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Client/read_more-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Client/readpartial-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Client/readpartial-i.ri deleted file mode 100644 index 47b6a95..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Client/readpartial-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Client/request-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Client/request-i.ri deleted file mode 100644 index a885d84..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Client/request-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Client/start_tls-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Client/start_tls-i.ri deleted file mode 100644 index 563dbaf..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Client/start_tls-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Error/cdesc-Error.ri b/.gems/doc/http-0.6.2/ri/HTTP/Error/cdesc-Error.ri deleted file mode 100644 index e207813..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Error/cdesc-Error.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Headers/Mixin/cdesc-Mixin.ri b/.gems/doc/http-0.6.2/ri/HTTP/Headers/Mixin/cdesc-Mixin.ri deleted file mode 100644 index 21b7ffe..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Headers/Mixin/cdesc-Mixin.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Headers/Mixin/headers-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Headers/Mixin/headers-i.ri deleted file mode 100644 index fee04f4..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Headers/Mixin/headers-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Headers/cdesc-Headers.ri b/.gems/doc/http-0.6.2/ri/HTTP/Headers/cdesc-Headers.ri deleted file mode 100644 index 1ab4cc1..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Headers/cdesc-Headers.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/MimeType/%5b%5d-c.ri b/.gems/doc/http-0.6.2/ri/HTTP/MimeType/%5b%5d-c.ri deleted file mode 100644 index 84f09e1..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/MimeType/%5b%5d-c.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/MimeType/Adapter/cdesc-Adapter.ri b/.gems/doc/http-0.6.2/ri/HTTP/MimeType/Adapter/cdesc-Adapter.ri deleted file mode 100644 index 0faa896..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/MimeType/Adapter/cdesc-Adapter.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/MimeType/JSON/cdesc-JSON.ri b/.gems/doc/http-0.6.2/ri/HTTP/MimeType/JSON/cdesc-JSON.ri deleted file mode 100644 index 7c86a2b..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/MimeType/JSON/cdesc-JSON.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/MimeType/JSON/decode-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/MimeType/JSON/decode-i.ri deleted file mode 100644 index 62424b4..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/MimeType/JSON/decode-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/MimeType/JSON/encode-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/MimeType/JSON/encode-i.ri deleted file mode 100644 index 879a4e6..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/MimeType/JSON/encode-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/MimeType/cdesc-MimeType.ri b/.gems/doc/http-0.6.2/ri/HTTP/MimeType/cdesc-MimeType.ri deleted file mode 100644 index 78e27ac..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/MimeType/cdesc-MimeType.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/MimeType/normalize-c.ri b/.gems/doc/http-0.6.2/ri/HTTP/MimeType/normalize-c.ri deleted file mode 100644 index 2b64f77..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/MimeType/normalize-c.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/MimeType/register_adapter-c.ri b/.gems/doc/http-0.6.2/ri/HTTP/MimeType/register_adapter-c.ri deleted file mode 100644 index 0bf6b94..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/MimeType/register_adapter-c.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/MimeType/register_alias-c.ri b/.gems/doc/http-0.6.2/ri/HTTP/MimeType/register_alias-c.ri deleted file mode 100644 index 12d4faf..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/MimeType/register_alias-c.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/%5b%5d-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/%5b%5d-i.ri deleted file mode 100644 index 9023997..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Options/%5b%5d-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/OpenSSL/SSL/cdesc-SSL.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/OpenSSL/SSL/cdesc-SSL.ri deleted file mode 100644 index 7750077..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Options/OpenSSL/SSL/cdesc-SSL.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/OpenSSL/cdesc-OpenSSL.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/OpenSSL/cdesc-OpenSSL.ri deleted file mode 100644 index cca1b03..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Options/OpenSSL/cdesc-OpenSSL.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/argument_error%21-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/argument_error%21-i.ri deleted file mode 100644 index aed73ad..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Options/argument_error%21-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/body-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/body-i.ri deleted file mode 100644 index acc0ac4..0000000 --- a/.gems/doc/http-0.6.2/ri/HTTP/Options/body-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI" body:ETI"HTTP::Options#body;FI"RW;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Explicit request body of the request;T: -@fileI"lib/http/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"HTTP::Options;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/cdesc-Options.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/cdesc-Options.ri deleted file mode 100644 index 12f2060..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Options/cdesc-Options.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/default_socket_class-c.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/default_socket_class-c.ri deleted file mode 100644 index 98555c8..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Options/default_socket_class-c.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/default_ssl_socket_class-c.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/default_ssl_socket_class-c.ri deleted file mode 100644 index 41554b1..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Options/default_ssl_socket_class-c.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/dup-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/dup-i.ri deleted file mode 100644 index a4bc89b..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Options/dup-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/follow-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/follow-i.ri deleted file mode 100644 index faae1dd..0000000 --- a/.gems/doc/http-0.6.2/ri/HTTP/Options/follow-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI" follow:ETI"HTTP::Options#follow;FI"RW;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Follow redirects;T: -@fileI"lib/http/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"HTTP::Options;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/form-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/form-i.ri deleted file mode 100644 index 4d6984d..0000000 --- a/.gems/doc/http-0.6.2/ri/HTTP/Options/form-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI" form:ETI"HTTP::Options#form;FI"RW;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Form data to embed in the request;T: -@fileI"lib/http/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"HTTP::Options;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/headers-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/headers-i.ri deleted file mode 100644 index 8275147..0000000 --- a/.gems/doc/http-0.6.2/ri/HTTP/Options/headers-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI" headers:ETI"HTTP::Options#headers;FI"RW;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+HTTP headers to include in the request;T: -@fileI"lib/http/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"HTTP::Options;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/json-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/json-i.ri deleted file mode 100644 index acf4713..0000000 --- a/.gems/doc/http-0.6.2/ri/HTTP/Options/json-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI" json:ETI"HTTP::Options#json;FI"RW;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&JSON data to embed in the request;T: -@fileI"lib/http/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"HTTP::Options;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/merge-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/merge-i.ri deleted file mode 100644 index d9a8cb7..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Options/merge-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/new-c.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/new-c.ri deleted file mode 100644 index 07a5907..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Options/new-c.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/params-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/params-i.ri deleted file mode 100644 index 22211be..0000000 --- a/.gems/doc/http-0.6.2/ri/HTTP/Options/params-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI" params:ETI"HTTP::Options#params;FI"RW;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Query string params to add to the url;T: -@fileI"lib/http/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"HTTP::Options;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/proxy-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/proxy-i.ri deleted file mode 100644 index 533e8ee..0000000 --- a/.gems/doc/http-0.6.2/ri/HTTP/Options/proxy-i.ri +++ /dev/null @@ -1,3 +0,0 @@ -U:RDoc::Attr[iI" -proxy:ETI"HTTP::Options#proxy;FI"RW;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" HTTP proxy to route request;T: -@fileI"lib/http/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"HTTP::Options;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/response-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/response-i.ri deleted file mode 100644 index 93ef028..0000000 --- a/.gems/doc/http-0.6.2/ri/HTTP/Options/response-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI" response:ETI"HTTP::Options#response;FI"RW;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=How to format the response [:object, :body, :parse_body];T: -@fileI"lib/http/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"HTTP::Options;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/socket_class-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/socket_class-i.ri deleted file mode 100644 index 503db19..0000000 --- a/.gems/doc/http-0.6.2/ri/HTTP/Options/socket_class-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI"socket_class:ETI"HTTP::Options#socket_class;FI"RW;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Socket classes;T: -@fileI"lib/http/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"HTTP::Options;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/ssl_context-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/ssl_context-i.ri deleted file mode 100644 index 78914a9..0000000 --- a/.gems/doc/http-0.6.2/ri/HTTP/Options/ssl_context-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI"ssl_context:ETI"HTTP::Options#ssl_context;FI"RW;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SSL context;T: -@fileI"lib/http/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"HTTP::Options;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/ssl_socket_class-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/ssl_socket_class-i.ri deleted file mode 100644 index 2f7c97e..0000000 --- a/.gems/doc/http-0.6.2/ri/HTTP/Options/ssl_socket_class-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI"ssl_socket_class:ETI"#HTTP::Options#ssl_socket_class;FI"RW;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Socket classes;T: -@fileI"lib/http/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"HTTP::Options;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/to_hash-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/to_hash-i.ri deleted file mode 100644 index 685c2b3..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Options/to_hash-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Options/with_headers-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Options/with_headers-i.ri deleted file mode 100644 index 53ad8a2..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Options/with_headers-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Redirector/EndlessRedirectError/cdesc-EndlessRedirectError.ri b/.gems/doc/http-0.6.2/ri/HTTP/Redirector/EndlessRedirectError/cdesc-EndlessRedirectError.ri deleted file mode 100644 index 9de5a6f..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Redirector/EndlessRedirectError/cdesc-EndlessRedirectError.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Redirector/TooManyRedirectsError/cdesc-TooManyRedirectsError.ri b/.gems/doc/http-0.6.2/ri/HTTP/Redirector/TooManyRedirectsError/cdesc-TooManyRedirectsError.ri deleted file mode 100644 index b7abf9f..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Redirector/TooManyRedirectsError/cdesc-TooManyRedirectsError.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Redirector/cdesc-Redirector.ri b/.gems/doc/http-0.6.2/ri/HTTP/Redirector/cdesc-Redirector.ri deleted file mode 100644 index 7af917e..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Redirector/cdesc-Redirector.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Request/UnsupportedMethodError/cdesc-UnsupportedMethodError.ri b/.gems/doc/http-0.6.2/ri/HTTP/Request/UnsupportedMethodError/cdesc-UnsupportedMethodError.ri deleted file mode 100644 index fd59b6e..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Request/UnsupportedMethodError/cdesc-UnsupportedMethodError.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Request/UnsupportedSchemeError/cdesc-UnsupportedSchemeError.ri b/.gems/doc/http-0.6.2/ri/HTTP/Request/UnsupportedSchemeError/cdesc-UnsupportedSchemeError.ri deleted file mode 100644 index f5115bb..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Request/UnsupportedSchemeError/cdesc-UnsupportedSchemeError.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/add_body_type_headers-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/add_body_type_headers-i.ri deleted file mode 100644 index de94afa..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/add_body_type_headers-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/add_headers-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/add_headers-i.ri deleted file mode 100644 index dad6f1d..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/add_headers-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/cdesc-Writer.ri b/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/cdesc-Writer.ri deleted file mode 100644 index 76637f1..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/cdesc-Writer.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/join_headers-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/join_headers-i.ri deleted file mode 100644 index a1f5362..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/join_headers-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/new-c.ri b/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/new-c.ri deleted file mode 100644 index 29002aa..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/new-c.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/send_request_body-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/send_request_body-i.ri deleted file mode 100644 index 57174dd..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/send_request_body-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/send_request_header-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/send_request_header-i.ri deleted file mode 100644 index 8e3a1e4..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/send_request_header-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/stream-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/stream-i.ri deleted file mode 100644 index 21d187e..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/stream-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/validate_body_type%21-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/validate_body_type%21-i.ri deleted file mode 100644 index b50c424..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Request/Writer/validate_body_type%21-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Request/__method__-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Request/__method__-i.ri deleted file mode 100644 index 0a91833..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Request/__method__-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Request/body-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Request/body-i.ri deleted file mode 100644 index 2b3ee7f..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Request/body-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Request/cdesc-Request.ri b/.gems/doc/http-0.6.2/ri/HTTP/Request/cdesc-Request.ri deleted file mode 100644 index fd74ecd..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Request/cdesc-Request.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Request/method-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Request/method-i.ri deleted file mode 100644 index a271a48..0000000 --- a/.gems/doc/http-0.6.2/ri/HTTP/Request/method-i.ri +++ /dev/null @@ -1,3 +0,0 @@ -U:RDoc::AnyMethod[iI" method:EFI"HTTP::Request#method;FF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NThe following method may be removed in two minor versions (0.7.0) or one ;TI"major version (1.0.0);T: -@fileI"lib/http/request.rb;T:0@omit_headings_from_table_of_contents_below000[[I"__method__;To;; [o; -; [I"OThe following alias may be removed in three minor versions (0.8.0) or one ;TI"major version (1.0.0);T; @; 0I"(*);T@FI" Request;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Request/proxy-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Request/proxy-i.ri deleted file mode 100644 index 376af3d..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Request/proxy-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Request/scheme-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Request/scheme-i.ri deleted file mode 100644 index 3e58dac..0000000 --- a/.gems/doc/http-0.6.2/ri/HTTP/Request/scheme-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI" scheme:ETI"HTTP::Request#scheme;FI"R;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EScheme is normalized to be a lowercase symbol e.g. :http, :https;T: -@fileI"lib/http/request.rb;T:0@omit_headings_from_table_of_contents_below0F@I"HTTP::Request;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Request/uri-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Request/uri-i.ri deleted file mode 100644 index 568c4d3..0000000 --- a/.gems/doc/http-0.6.2/ri/HTTP/Request/uri-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI"uri:ETI"HTTP::Request#uri;FI"R;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#"Request URI" as per RFC 2616 ;TI":http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html;T: -@fileI"lib/http/request.rb;T:0@omit_headings_from_table_of_contents_below0F@I"HTTP::Request;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Request/verb-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Request/verb-i.ri deleted file mode 100644 index 19f2489..0000000 --- a/.gems/doc/http-0.6.2/ri/HTTP/Request/verb-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[iI" verb:ETI"HTTP::Request#verb;FI"R;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Method is given as a lowercase symbol e.g. :get, :post;T: -@fileI"lib/http/request.rb;T:0@omit_headings_from_table_of_contents_below0F@I"HTTP::Request;FcRDoc::NormalClass0 \ No newline at end of file diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Request/version-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Request/version-i.ri deleted file mode 100644 index b07c249..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Request/version-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/RequestError/cdesc-RequestError.ri b/.gems/doc/http-0.6.2/ri/HTTP/RequestError/cdesc-RequestError.ri deleted file mode 100644 index e90d8c5..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/RequestError/cdesc-RequestError.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/Body/cdesc-Body.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/Body/cdesc-Body.ri deleted file mode 100644 index 68cadd2..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/Body/cdesc-Body.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/Body/each-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/Body/each-i.ri deleted file mode 100644 index 243a862..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/Body/each-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/Body/new-c.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/Body/new-c.ri deleted file mode 100644 index 137cd20..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/Body/new-c.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/Body/readpartial-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/Body/readpartial-i.ri deleted file mode 100644 index 71d9f23..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/Body/readpartial-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/%3c%3c-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/%3c%3c-i.ri deleted file mode 100644 index fe55d98..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/%3c%3c-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/add-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/add-i.ri deleted file mode 100644 index 3cbb28d..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/add-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/cdesc-Parser.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/cdesc-Parser.ri deleted file mode 100644 index 4177349..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/cdesc-Parser.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/chunk-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/chunk-i.ri deleted file mode 100644 index df76fb8..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/chunk-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/finished%3f-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/finished%3f-i.ri deleted file mode 100644 index 4fbb089..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/finished%3f-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/headers%3f-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/headers%3f-i.ri deleted file mode 100644 index 035ca5c..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/headers%3f-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/headers-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/headers-i.ri deleted file mode 100644 index b812755..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/headers-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/http_version-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/http_version-i.ri deleted file mode 100644 index e5f7cf1..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/http_version-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/new-c.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/new-c.ri deleted file mode 100644 index 177c2e7..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/new-c.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/on_body-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/on_body-i.ri deleted file mode 100644 index cb6208e..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/on_body-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/on_headers_complete-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/on_headers_complete-i.ri deleted file mode 100644 index fce782c..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/on_headers_complete-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/on_message_complete-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/on_message_complete-i.ri deleted file mode 100644 index d19fa00..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/on_message_complete-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/reset-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/reset-i.ri deleted file mode 100644 index 7e9b52f..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/reset-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/status_code-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/status_code-i.ri deleted file mode 100644 index f98a53e..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/Parser/status_code-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/body-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/body-i.ri deleted file mode 100644 index d06e00d..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/body-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/cdesc-Response.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/cdesc-Response.ri deleted file mode 100644 index 71decab..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/cdesc-Response.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/charset-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/charset-i.ri deleted file mode 100644 index f737ba2..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/charset-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/code-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/code-i.ri deleted file mode 100644 index 205d134..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/code-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/content_type-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/content_type-i.ri deleted file mode 100644 index 474f14a..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/content_type-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/flush-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/flush-i.ri deleted file mode 100644 index a729461..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/flush-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/inspect-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/inspect-i.ri deleted file mode 100644 index 47a9785..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/inspect-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/mime_type-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/mime_type-i.ri deleted file mode 100644 index 55bd268..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/mime_type-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/new-c.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/new-c.ri deleted file mode 100644 index 9e1b57b..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/new-c.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/parse-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/parse-i.ri deleted file mode 100644 index db1df9d..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/parse-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/reason-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/reason-i.ri deleted file mode 100644 index d9ad98a..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/reason-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/status-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/status-i.ri deleted file mode 100644 index f961d37..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/status-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/status_code-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/status_code-i.ri deleted file mode 100644 index eb5f4ec..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/status_code-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/stream%21-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/stream%21-i.ri deleted file mode 100644 index eee73ac..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/stream%21-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/to_a-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/to_a-i.ri deleted file mode 100644 index bf594be..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/to_a-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/to_s-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/to_s-i.ri deleted file mode 100644 index 69de7ef..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/to_s-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/to_str-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/to_str-i.ri deleted file mode 100644 index d74b551..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/to_str-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/Response/uri-i.ri b/.gems/doc/http-0.6.2/ri/HTTP/Response/uri-i.ri deleted file mode 100644 index cf3894c..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/Response/uri-i.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/ResponseError/cdesc-ResponseError.ri b/.gems/doc/http-0.6.2/ri/HTTP/ResponseError/cdesc-ResponseError.ri deleted file mode 100644 index 6d9cdac..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/ResponseError/cdesc-ResponseError.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/StateError/cdesc-StateError.ri b/.gems/doc/http-0.6.2/ri/HTTP/StateError/cdesc-StateError.ri deleted file mode 100644 index e0b81f0..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/StateError/cdesc-StateError.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/HTTP/cdesc-HTTP.ri b/.gems/doc/http-0.6.2/ri/HTTP/cdesc-HTTP.ri deleted file mode 100644 index 0e9f222..0000000 Binary files a/.gems/doc/http-0.6.2/ri/HTTP/cdesc-HTTP.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/Object/cdesc-Object.ri b/.gems/doc/http-0.6.2/ri/Object/cdesc-Object.ri deleted file mode 100644 index 0cfd326..0000000 Binary files a/.gems/doc/http-0.6.2/ri/Object/cdesc-Object.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/URI/cdesc-URI.ri b/.gems/doc/http-0.6.2/ri/URI/cdesc-URI.ri deleted file mode 100644 index 7e905c7..0000000 Binary files a/.gems/doc/http-0.6.2/ri/URI/cdesc-URI.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/URI/decode_www_form-c.ri b/.gems/doc/http-0.6.2/ri/URI/decode_www_form-c.ri deleted file mode 100644 index 20fb41c..0000000 Binary files a/.gems/doc/http-0.6.2/ri/URI/decode_www_form-c.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/URI/decode_www_form_component-c.ri b/.gems/doc/http-0.6.2/ri/URI/decode_www_form_component-c.ri deleted file mode 100644 index 6b51056..0000000 Binary files a/.gems/doc/http-0.6.2/ri/URI/decode_www_form_component-c.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/URI/encode_www_form-c.ri b/.gems/doc/http-0.6.2/ri/URI/encode_www_form-c.ri deleted file mode 100644 index 3f3bb51..0000000 Binary files a/.gems/doc/http-0.6.2/ri/URI/encode_www_form-c.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/URI/encode_www_form_component-c.ri b/.gems/doc/http-0.6.2/ri/URI/encode_www_form_component-c.ri deleted file mode 100644 index af1f095..0000000 Binary files a/.gems/doc/http-0.6.2/ri/URI/encode_www_form_component-c.ri and /dev/null differ diff --git a/.gems/doc/http-0.6.2/ri/cache.ri b/.gems/doc/http-0.6.2/ri/cache.ri deleted file mode 100644 index 1c3438c..0000000 Binary files a/.gems/doc/http-0.6.2/ri/cache.ri and /dev/null differ diff --git a/.gems/doc/http_parser.rb-0.6.0/ri/HTTP/Parser/cdesc-Parser.ri b/.gems/doc/http_parser.rb-0.6.0/ri/HTTP/Parser/cdesc-Parser.ri deleted file mode 100644 index bab5ea5..0000000 Binary files a/.gems/doc/http_parser.rb-0.6.0/ri/HTTP/Parser/cdesc-Parser.ri and /dev/null differ diff --git a/.gems/doc/http_parser.rb-0.6.0/ri/HTTP/Parser/default_header_value_type%3d-c.ri b/.gems/doc/http_parser.rb-0.6.0/ri/HTTP/Parser/default_header_value_type%3d-c.ri deleted file mode 100644 index 23ed78b..0000000 Binary files a/.gems/doc/http_parser.rb-0.6.0/ri/HTTP/Parser/default_header_value_type%3d-c.ri and /dev/null differ diff --git a/.gems/doc/http_parser.rb-0.6.0/ri/HTTP/Parser/default_header_value_type-c.ri b/.gems/doc/http_parser.rb-0.6.0/ri/HTTP/Parser/default_header_value_type-c.ri deleted file mode 100644 index 88b0b1d..0000000 Binary files a/.gems/doc/http_parser.rb-0.6.0/ri/HTTP/Parser/default_header_value_type-c.ri and /dev/null differ diff --git a/.gems/doc/http_parser.rb-0.6.0/ri/HTTP/cdesc-HTTP.ri b/.gems/doc/http_parser.rb-0.6.0/ri/HTTP/cdesc-HTTP.ri deleted file mode 100644 index 2450fd3..0000000 Binary files a/.gems/doc/http_parser.rb-0.6.0/ri/HTTP/cdesc-HTTP.ri and /dev/null differ diff --git a/.gems/doc/http_parser.rb-0.6.0/ri/Object/cdesc-Object.ri b/.gems/doc/http_parser.rb-0.6.0/ri/Object/cdesc-Object.ri deleted file mode 100644 index 0f9d4d0..0000000 Binary files a/.gems/doc/http_parser.rb-0.6.0/ri/Object/cdesc-Object.ri and /dev/null differ diff --git a/.gems/doc/http_parser.rb-0.6.0/ri/cache.ri b/.gems/doc/http_parser.rb-0.6.0/ri/cache.ri deleted file mode 100644 index 63e19db..0000000 Binary files a/.gems/doc/http_parser.rb-0.6.0/ri/cache.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/BigDecimal.html b/.gems/doc/json-1.8.1/rdoc/BigDecimal.html deleted file mode 100644 index 8bd7122..0000000 --- a/.gems/doc/json-1.8.1/rdoc/BigDecimal.html +++ /dev/null @@ -1,345 +0,0 @@ - - - - - - - Class: BigDecimal - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

BigDecimal

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- json_create(object) - click to toggle source -
- - -
- -

Import a JSON Marshalled object.

- -

method used for JSON marshalling support.

- - - -
-
-# File lib/json/add/bigdecimal.rb, line 10
-def self.json_create(object)
-  BigDecimal._load object['b']
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- as_json(*) - click to toggle source -
- - -
- -

Marshal the object to JSON.

- -

method used for JSON marshalling support.

- - - -
-
-# File lib/json/add/bigdecimal.rb, line 17
-def as_json(*)
-  {
-    JSON.create_id => self.class.name,
-    'b'            => _dump,
-  }
-end
-
- -
- - - - -
- - -
- - - -
- to_json(*) - click to toggle source -
- - -
- -

return the JSON value

- - - -
-
-# File lib/json/add/bigdecimal.rb, line 25
-def to_json(*)
-  as_json.to_json
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/Class.html b/.gems/doc/json-1.8.1/rdoc/Class.html deleted file mode 100644 index 5905e7e..0000000 --- a/.gems/doc/json-1.8.1/rdoc/Class.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - - Class: Class - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

Class

- -
- -

Extends any Class to include -json_creatable? method.

- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- json_creatable?() - click to toggle source -
- - -
- -

Returns true if this class can be used to create an instance from a -serialised JSON string. The class has to implement -a class method json_create that expects a hash as first parameter. -The hash should include the required data.

- - - -
-
-# File lib/json/common.rb, line 481
-def json_creatable?
-  respond_to?(:json_create)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/Complex.html b/.gems/doc/json-1.8.1/rdoc/Complex.html deleted file mode 100644 index 08f9e42..0000000 --- a/.gems/doc/json-1.8.1/rdoc/Complex.html +++ /dev/null @@ -1,342 +0,0 @@ - - - - - - - Class: Complex - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

Complex

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- json_create(object) - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/add/complex.rb, line 7
-def self.json_create(object)
-  Complex(object['r'], object['i'])
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- as_json(*) - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/add/complex.rb, line 11
-def as_json(*)
-  {
-    JSON.create_id => self.class.name,
-    'r'            => real,
-    'i'            => imag,
-  }
-end
-
- -
- - - - -
- - -
- - - -
- to_json(*) - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/add/complex.rb, line 19
-def to_json(*)
-  as_json.to_json
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/Date.html b/.gems/doc/json-1.8.1/rdoc/Date.html deleted file mode 100644 index 0918f7a..0000000 --- a/.gems/doc/json-1.8.1/rdoc/Date.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - Class: Date - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

Date

- -
- -

Date serialization/deserialization

- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- json_create(object) - click to toggle source -
- - -
- -

Deserializes JSON string by converting Julian year -y, month m, day d and Day of Calendar Reform -sg to Date.

- - - -
-
-# File lib/json/add/date.rb, line 11
-def self.json_create(object)
-  civil(*object.values_at('y', 'm', 'd', 'sg'))
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- as_json(*) - click to toggle source -
- - -
- -

Returns a hash, that will be turned into a JSON -object and represent this object.

- - - -
-
-# File lib/json/add/date.rb, line 19
-def as_json(*)
-  {
-    JSON.create_id => self.class.name,
-    'y' => year,
-    'm' => month,
-    'd' => day,
-    'sg' => start,
-  }
-end
-
- -
- - - - -
- - -
- - - -
- to_json(*args) - click to toggle source -
- - -
- -

Stores class name (Date) with Julian year -y, month m, day d and Day of Calendar Reform -sg as JSON string

- - - -
-
-# File lib/json/add/date.rb, line 31
-def to_json(*args)
-  as_json.to_json(*args)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/DateTime.html b/.gems/doc/json-1.8.1/rdoc/DateTime.html deleted file mode 100644 index 817027c..0000000 --- a/.gems/doc/json-1.8.1/rdoc/DateTime.html +++ /dev/null @@ -1,365 +0,0 @@ - - - - - - - Class: DateTime - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

DateTime

- -
- -

DateTime serialization/deserialization

- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- json_create(object) - click to toggle source -
- - -
- -

Deserializes JSON string by converting year -y, month m, day d, hour H, minute -M, second S, offset of and Day of Calendar -Reform sg to DateTime.

- - - -
-
-# File lib/json/add/date_time.rb, line 12
-def self.json_create(object)
-  args = object.values_at('y', 'm', 'd', 'H', 'M', 'S')
-  of_a, of_b = object['of'].split('/')
-  if of_b and of_b != '0'
-    args << Rational(of_a.to_i, of_b.to_i)
-  else
-    args << of_a
-  end
-  args << object['sg']
-  civil(*args)
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- as_json(*) - click to toggle source -
- - -
- -

Returns a hash, that will be turned into a JSON -object and represent this object.

- - - -
-
-# File lib/json/add/date_time.rb, line 28
-def as_json(*)
-  {
-    JSON.create_id => self.class.name,
-    'y' => year,
-    'm' => month,
-    'd' => day,
-    'H' => hour,
-    'M' => min,
-    'S' => sec,
-    'of' => offset.to_s,
-    'sg' => start,
-  }
-end
-
- -
- - - - -
- - -
- - - -
- to_json(*args) - click to toggle source -
- - -
- -

Stores class name (DateTime) with Julian year -y, month m, day d, hour H, minute -M, second S, offset of and Day of Calendar -Reform sg as JSON string

- - - -
-
-# File lib/json/add/date_time.rb, line 45
-def to_json(*args)
-  as_json.to_json(*args)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/Exception.html b/.gems/doc/json-1.8.1/rdoc/Exception.html deleted file mode 100644 index dd1a6a1..0000000 --- a/.gems/doc/json-1.8.1/rdoc/Exception.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - Class: Exception - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

Exception

- -
- -

Exception serialization/deserialization

- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- json_create(object) - click to toggle source -
- - -
- -

Deserializes JSON string by constructing new Exception object with message m and -backtrace b serialized with to_json

- - - -
-
-# File lib/json/add/exception.rb, line 10
-def self.json_create(object)
-  result = new(object['m'])
-  result.set_backtrace object['b']
-  result
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- as_json(*) - click to toggle source -
- - -
- -

Returns a hash, that will be turned into a JSON -object and represent this object.

- - - -
-
-# File lib/json/add/exception.rb, line 18
-def as_json(*)
-  {
-    JSON.create_id => self.class.name,
-    'm'            => message,
-    'b'            => backtrace,
-  }
-end
-
- -
- - - - -
- - -
- - - -
- to_json(*args) - click to toggle source -
- - -
- -

Stores class name (Exception) with message -m and backtrace array b as JSON -string

- - - -
-
-# File lib/json/add/exception.rb, line 28
-def to_json(*args)
-  as_json.to_json(*args)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON.html b/.gems/doc/json-1.8.1/rdoc/JSON.html deleted file mode 100644 index 998c3b2..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON.html +++ /dev/null @@ -1,1180 +0,0 @@ - - - - - - - Module: JSON - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
- - - -
- -
- - - - - - -
-

Namespace

- -
- - - - - - - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON

- -
- -

JavaScript Object Notation (JSON)

- -

JSON is a lightweight data-interchange format. It -is easy for us humans to read and write. Plus, equally simple for machines -to generate or parse. JSON is completely language -agnostic, making it the ideal interchange format.

- -

Built on two universally available structures:

- -
1. A collection of name/value pairs. Often referred to as an _object_, hash table, record, struct, keyed list, or associative array.
-2. An ordered list of values. More commonly called an _array_, vector, sequence or list.
- -

To read more about JSON visit: json.org

- -

Parsing JSON

- -

To parse a JSON string received by another -application or generated within your existing application:

- -
require 'json'
-
-my_hash = JSON.parse('{"hello": "goodbye"}')
-puts my_hash["hello"] => "goodbye"
- -

Notice the extra quotes '' around the hash notation. Ruby expects -the argument to be a string and can’t convert objects like a hash or array.

- -

Ruby converts your string into a hash

- -

Generating JSON

- -

Creating a JSON string for communication or -serialization is just as simple.

- -
require 'json'
-
-my_hash = {:hello => "goodbye"}
-puts JSON.generate(my_hash) => "{\"hello\":\"goodbye\"}"
- -

Or an alternative way:

- -
require 'json'
-puts {:hello => "goodbye"}.to_json => "{\"hello\":\"goodbye\"}"
- -

JSON.generate only allows objects or arrays to be converted to JSON syntax. to_json, however, accepts many -Ruby classes even though it acts only as a method for serialization:

- -
require 'json'
-
-1.to_json => "1"
- -
- - - - -
- - - - - - -
-

Constants

-
- -
Infinity
- -
- - -
JSON_LOADED
- -
- - -
MinusInfinity
- -
- - -
NaN
- -
- - -
UnparserError
- -

For backwards compatibility

- - -
VERSION
- -

JSON version

- - -
-
- - - - -
-

Attributes

- - -
- - - - -
- create_id[RW] -
- -
- -

This is create identifier, which is used to decide if the -json_create hook of a class should be called. It defaults to -‘json_class’.

- -
-
- -
- - - - -
- dump_default_options[RW] -
- -
- -

The global default options for the JSON.dump method:

- -
:max_nesting: false
-:allow_nan: true
-:quirks_mode: true
- -
-
- -
- - -
- generator[R] -
- -
- -

Returns the JSON generator module that is used by -JSON. This is either JSON::Ext::Generator or JSON::Pure::Generator.

- -
-
- -
- - - - -
- load_default_options[RW] -
- -
- -

The global default options for the JSON.load method:

- -
:max_nesting: false
-:allow_nan: true
-:quirks_mode: true
- -
-
- -
- - -
- parser[R] -
- -
- -

Returns the JSON parser class that is used by JSON. This is either JSON::Ext::Parser or JSON::Pure::Parser.

- -
-
- -
- - - - -
- state[RW] -
- -
- -

Returns the JSON generator state class that is used -by JSON. This is either JSON::Ext::Generator::State -or JSON::Pure::Generator::State.

- -
-
- -
- - - - -
-

Public Class Methods

- - -
- - - -
- [](object, opts = {}) - click to toggle source -
- - -
- -

If object is string-like, parse the string and return the parsed -result as a Ruby data structure. Otherwise generate a JSON text from the Ruby data structure object and -return it.

- -

The opts argument is passed through to generate/parse -respectively. See generate and parse for their documentation.

- - - -
-
-# File lib/json/common.rb, line 12
-def [](object, opts = {})
-  if object.respond_to? :to_str
-    JSON.parse(object.to_str, opts)
-  else
-    JSON.generate(object, opts)
-  end
-end
-
- -
- - - - -
- - -
- - - -
- const_defined_in?(modul, constant) - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/common.rb, line 429
-def self.const_defined_in?(modul, constant)
-  modul.const_defined?(constant)
-end
-
- -
- - - - -
- - -
- - - -
- iconv(to, from, string) - click to toggle source -
- - -
- -

Encodes string using Ruby’s String.encode

- - - -
-
-# File lib/json/common.rb, line 417
-def self.iconv(to, from, string)
-  string.encode(to, from)
-end
-
- -
- - - - -
- - -
- - - -
- restore(source, proc = nil, options = {}) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: load -
- -
- - -
- - - -
- valid_utf8?(string) - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/pure/generator.rb, line 74
-def valid_utf8?(string)
-  encoding = string.encoding
-  (encoding == Encoding::UTF_8 || encoding == Encoding::ASCII) &&
-    string.valid_encoding?
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- dump(obj, anIO = nil, limit = nil) - click to toggle source -
- - -
- -

Dumps obj as a JSON string, i.e. calls -generate on the object and returns the result.

- -

If anIO (an IO-like object or an object that responds to the write method) -was given, the resulting JSON is written to it.

- -

If the number of nested arrays or objects exceeds limit, an -ArgumentError exception is raised. This argument is similar (but not -exactly the same!) to the limit argument in Marshal.dump.

- -

The default options for the generator can be changed via the dump_default_options -method.

- -

This method is part of the implementation of the load/dump interface of -Marshal and YAML.

- - - -
-
-# File lib/json/common.rb, line 384
-def dump(obj, anIO = nil, limit = nil)
-  if anIO and limit.nil?
-    anIO = anIO.to_io if anIO.respond_to?(:to_io)
-    unless anIO.respond_to?(:write)
-      limit = anIO
-      anIO = nil
-    end
-  end
-  opts = JSON.dump_default_options
-  limit and opts.update(:max_nesting => limit)
-  result = generate(obj, opts)
-  if anIO
-    anIO.write result
-    anIO
-  else
-    result
-  end
-rescue JSON::NestingError
-  raise ArgumentError, "exceed depth limit"
-end
-
- -
- - - - -
- - -
- - - -
- fast_generate(obj, opts = nil) - click to toggle source -
- - -
- -

Generate a JSON document from the Ruby data -structure obj and return it. This method disables the checks for -circles in Ruby objects.

- -

WARNING: Be careful not to pass any Ruby data structures with -circles as obj argument because this will cause JSON to go into an infinite loop.

- - - -
-
-# File lib/json/common.rb, line 238
-def fast_generate(obj, opts = nil)
-  if State === opts
-    state, opts = opts, nil
-  else
-    state = FAST_STATE_PROTOTYPE.dup
-  end
-  if opts
-    if opts.respond_to? :to_hash
-      opts = opts.to_hash
-    elsif opts.respond_to? :to_h
-      opts = opts.to_h
-    else
-      raise TypeError, "can't convert #{opts.class} into Hash"
-    end
-    state.configure(opts)
-  end
-  state.generate(obj)
-end
-
- -
- - - - -
- - -
- - - -
- generate(obj, opts = nil) - click to toggle source -
- - -
- -

Generate a JSON document from the Ruby data -structure obj and return it. state is * a JSON::State -object,

-
  • -

    or a Hash like object (responding to to_hash),

    -
  • -

    an object convertible into a hash by a to_h method,

    -
- -

that is used as or to configure a State object.

- -

It defaults to a state object, that creates the shortest possible JSON text in one line, checks for circular data -structures and doesn’t allow NaN, Infinity, and -Infinity.

- -

A state hash can have the following keys:

-
  • -

    indent: a string used to indent levels (default: "),

    -
  • -

    space: a string that is put after, a : or , delimiter (default: "),

    -
  • -

    space_before: a string that is put before a : pair delimiter -(default: "),

    -
  • -

    object_nl: a string that is put at the end of a JSON object (default: "),

    -
  • -

    array_nl: a string that is put at the end of a JSON array (default: "),

    -
  • -

    allow_nan: true if NaN, Infinity, and -Infinity should be generated, otherwise an -exception is thrown if these values are encountered. This options defaults -to false.

    -
  • -

    max_nesting: The maximum depth of nesting allowed in the data -structures from which JSON is to be generated. -Disable depth checking with :max_nesting => false, it defaults to 100.

    -
- -

See also the fast_generate -for the fastest creation method with the least amount of sanity checks, and -the pretty_generate method -for some defaults for pretty output.

- - - -
-
-# File lib/json/common.rb, line 207
-def generate(obj, opts = nil)
-  if State === opts
-    state, opts = opts, nil
-  else
-    state = SAFE_STATE_PROTOTYPE.dup
-  end
-  if opts
-    if opts.respond_to? :to_hash
-      opts = opts.to_hash
-    elsif opts.respond_to? :to_h
-      opts = opts.to_h
-    else
-      raise TypeError, "can't convert #{opts.class} into Hash"
-    end
-    state = state.configure(opts)
-  end
-  state.generate(obj)
-end
-
- -
- - - - -
- - -
- - - -
- load(source, proc = nil, options = {}) - click to toggle source -
- - -
- -

Load a ruby data structure from a JSON -source and return it. A source can either be a string-like object, -an IO-like object, or an object responding to the read method. If -proc was given, it will be called with any nested Ruby object as -an argument recursively in depth first order. To modify the default options -pass in the optional options argument as well.

- -

BEWARE: This method is meant to serialise data from trusted user input, -like from your own database server or clients under your control, it could -be dangerous to allow untrusted users to pass JSON -sources into it. The default options for the parser can be changed via the -load_default_options -method.

- -

This method is part of the implementation of the load/dump interface of -Marshal and YAML.

- - - -
-
-# File lib/json/common.rb, line 322
-def load(source, proc = nil, options = {})
-  opts = load_default_options.merge options
-  if source.respond_to? :to_str
-    source = source.to_str
-  elsif source.respond_to? :to_io
-    source = source.to_io.read
-  elsif source.respond_to?(:read)
-    source = source.read
-  end
-  if opts[:quirks_mode] && (source.nil? || source.empty?)
-    source = 'null'
-  end
-  result = parse(source, opts)
-  recurse_proc(result, &proc) if proc
-  result
-end
-
- -
- - -
- Also aliased as: restore -
- - - -
- - -
- - - -
- parse(source, opts = {}) - click to toggle source -
- - -
- -

Parse the JSON document source into a Ruby -data structure and return it.

- -

opts can have the following keys:

-
  • -

    max_nesting: The maximum depth of nesting allowed in the parsed data -structures. Disable depth checking with :max_nesting => false. It -defaults to 100.

    -
  • -

    allow_nan: If set to true, allow NaN, Infinity and -Infinity in defiance of RFC 4627 to be parsed -by the Parser. This option defaults to false.

    -
  • -

    symbolize_names: If set to true, returns symbols for the names -(keys) in a JSON object. Otherwise strings are -returned. Strings are the default.

    -
  • -

    create_additions: If set to false, the Parser doesn't create -additions even if a matching class and create_id was found. This option -defaults to true.

    -
  • -

    object_class: Defaults to Hash

    -
  • -

    array_class: Defaults to Array

    -
- - - -
-
-# File lib/json/common.rb, line 154
-def parse(source, opts = {})
-  Parser.new(source, opts).parse
-end
-
- -
- - - - -
- - -
- - - -
- parse!(source, opts = {}) - click to toggle source -
- - -
- -

Parse the JSON document source into a Ruby -data structure and return it. The bang version of the parse method defaults -to the more dangerous values for the opts hash, so be sure only to -parse trusted source documents.

- -

opts can have the following keys:

-
  • -

    max_nesting: The maximum depth of nesting allowed in the parsed data -structures. Enable depth checking with :max_nesting => anInteger. The -parse! methods defaults to not doing max depth checking: This can be -dangerous if someone wants to fill up your stack.

    -
  • -

    allow_nan: If set to true, allow NaN, Infinity, and -Infinity in defiance of RFC 4627 to be parsed -by the Parser. This option defaults to true.

    -
  • -

    create_additions: If set to false, the Parser doesn't create -additions even if a matching class and create_id was found. This option -defaults to true.

    -
- - - -
-
-# File lib/json/common.rb, line 173
-def parse!(source, opts = {})
-  opts = {
-    :max_nesting  => false,
-    :allow_nan    => true
-  }.update(opts)
-  Parser.new(source, opts).parse
-end
-
- -
- - - - -
- - -
- - - -
- pretty_generate(obj, opts = nil) - click to toggle source -
- - -
- -

Generate a JSON document from the Ruby data -structure obj and return it. The returned document is a prettier -form of the document returned by unparse.

- -

The opts argument can be used to configure the generator. See the -generate method for a more detailed explanation.

- - - -
-
-# File lib/json/common.rb, line 269
-def pretty_generate(obj, opts = nil)
-  if State === opts
-    state, opts = opts, nil
-  else
-    state = PRETTY_STATE_PROTOTYPE.dup
-  end
-  if opts
-    if opts.respond_to? :to_hash
-      opts = opts.to_hash
-    elsif opts.respond_to? :to_h
-      opts = opts.to_h
-    else
-      raise TypeError, "can't convert #{opts.class} into Hash"
-    end
-    state.configure(opts)
-  end
-  state.generate(obj)
-end
-
- -
- - - - -
- - -
- - - -
- recurse_proc(result, &proc) - click to toggle source -
- - -
- -

Recursively calls passed Proc if the parsed data structure is an -Array or Hash

- - - -
-
-# File lib/json/common.rb, line 340
-def recurse_proc(result, &proc)
-  case result
-  when Array
-    result.each { |x| recurse_proc x, &proc }
-    proc.call result
-  when Hash
-    result.each { |x, y| recurse_proc x, &proc; recurse_proc y, &proc }
-    proc.call result
-  else
-    proc.call result
-  end
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/CircularDatastructure.html b/.gems/doc/json-1.8.1/rdoc/JSON/CircularDatastructure.html deleted file mode 100644 index db848a4..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/CircularDatastructure.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - Class: JSON::CircularDatastructure - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::CircularDatastructure

- -
- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/Ext.html b/.gems/doc/json-1.8.1/rdoc/JSON/Ext.html deleted file mode 100644 index ff46537..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/Ext.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - Module: JSON::Ext - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - - - - - - - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::Ext

- -
- -

This module holds all the modules/classes that implement JSON’s -functionality as C extensions.

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/GeneratorError.html b/.gems/doc/json-1.8.1/rdoc/JSON/GeneratorError.html deleted file mode 100644 index 06e1a8d..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/GeneratorError.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - - Class: JSON::UnparserError - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::UnparserError

- -
- -

This exception is raised if a generator or unparser error occurs.

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/GenericObject.html b/.gems/doc/json-1.8.1/rdoc/JSON/GenericObject.html deleted file mode 100644 index 6ee4717..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/GenericObject.html +++ /dev/null @@ -1,656 +0,0 @@ - - - - - - - Class: JSON::GenericObject - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::GenericObject

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - - - -
- json_creatable[W] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- - - -
- dump(obj, *args) - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/generic_object.rb, line 40
-def dump(obj, *args)
-  ::JSON.dump(obj, *args)
-end
-
- -
- - - - -
- - -
- - - -
- from_hash(object) - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/generic_object.rb, line 20
-def from_hash(object)
-  case
-  when object.respond_to?(:to_hash)
-    result = new
-    object.to_hash.each do |key, value|
-      result[key] = from_hash(value)
-    end
-    result
-  when object.respond_to?(:to_ary)
-    object.to_ary.map { |a| from_hash(a) }
-  else
-    object
-  end
-end
-
- -
- - - - -
- - -
- - - -
- json_creatable?() - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/generic_object.rb, line 8
-def json_creatable?
-  @json_creatable
-end
-
- -
- - - - -
- - -
- - - -
- json_create(data) - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/generic_object.rb, line 14
-def json_create(data)
-  data = data.dup
-  data.delete JSON.create_id
-  self[data]
-end
-
- -
- - - - -
- - -
- - - -
- load(source, proc = nil, opts = {}) - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/generic_object.rb, line 35
-def load(source, proc = nil, opts = {})
-  result = ::JSON.load(source, proc, opts.merge(:object_class => self))
-  result.nil? ? new : result
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- [](name) - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/generic_object.rb, line 50
-def [](name)
-  table[name.to_sym]
-end
-
- -
- - - - -
- - -
- - - -
- []=(name, value) - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/generic_object.rb, line 54
-def []=(name, value)
-  __send__ "#{name}=", value
-end
-
- -
- - - - -
- - -
- - - -
- as_json(*) - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/generic_object.rb, line 62
-def as_json(*)
-  { JSON.create_id => self.class.name }.merge to_hash
-end
-
- -
- - - - -
- - -
- - - -
- to_hash() - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/generic_object.rb, line 46
-def to_hash
-  table
-end
-
- -
- - - - -
- - -
- - - -
- to_json(*a) - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/generic_object.rb, line 66
-def to_json(*a)
-  as_json.to_json(*a)
-end
-
- -
- - - - -
- - -
- - - -
- |(other) - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/generic_object.rb, line 58
-def |(other)
-  self.class[other.to_hash.merge(to_hash)]
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/JSONError.html b/.gems/doc/json-1.8.1/rdoc/JSON/JSONError.html deleted file mode 100644 index 3f5b4dc..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/JSONError.html +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - - Class: JSON::JSONError - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::JSONError

- -
- -

The base exception for JSON errors.

- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- wrap(exception) - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/common.rb, line 107
-def self.wrap(exception)
-  obj = new("Wrapped(#{exception.class}): #{exception.message.inspect}")
-  obj.set_backtrace exception.backtrace
-  obj
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/MissingUnicodeSupport.html b/.gems/doc/json-1.8.1/rdoc/JSON/MissingUnicodeSupport.html deleted file mode 100644 index 6a384a7..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/MissingUnicodeSupport.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - Class: JSON::MissingUnicodeSupport - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::MissingUnicodeSupport

- -
- -

This exception is raised if the required unicode support is missing on the -system. Usually this means that the iconv library is not installed.

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/NestingError.html b/.gems/doc/json-1.8.1/rdoc/JSON/NestingError.html deleted file mode 100644 index 8c5937a..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/NestingError.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - Class: JSON::NestingError - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::NestingError

- -
- -

This exception is raised if the nesting of parsed data structures is too -deep.

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/ParserError.html b/.gems/doc/json-1.8.1/rdoc/JSON/ParserError.html deleted file mode 100644 index f408993..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/ParserError.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - - Class: JSON::ParserError - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::ParserError

- -
- -

This exception is raised if a parser error occurs.

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/Pure.html b/.gems/doc/json-1.8.1/rdoc/JSON/Pure.html deleted file mode 100644 index d451d5a..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/Pure.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - Module: JSON::Pure - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
- - - -
- -
- - - - - - -
-

Namespace

- -
- - - - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::Pure

- -
- -

This module holds all the modules/classes that implement JSON’s -functionality in pure ruby.

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator.html b/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator.html deleted file mode 100644 index 1a08618..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - Module: JSON::Pure::Generator - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - - - - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::Pure::Generator

- -
- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods.html b/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods.html deleted file mode 100644 index 3c80bd1..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - Module: JSON::Pure::Generator::GeneratorMethods - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - - - - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::Pure::Generator::GeneratorMethods

- -
- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/Array.html b/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/Array.html deleted file mode 100644 index 37a379d..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/Array.html +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - Module: JSON::Pure::Generator::GeneratorMethods::Array - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::Pure::Generator::GeneratorMethods::Array

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- to_json(state = nil, *) - click to toggle source -
- - -
- -

Returns a JSON string containing a JSON array, that is unparsed from this Array instance. state is a JSON::State -object, that can also be used to configure the produced JSON string output further.

- - - -
-
-# File lib/json/pure/generator.rb, line 382
-def to_json(state = nil, *)
-  state = State.from_state(state)
-  state.check_max_nesting
-  json_transform(state)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/FalseClass.html b/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/FalseClass.html deleted file mode 100644 index cb8106d..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/FalseClass.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - - Module: JSON::Pure::Generator::GeneratorMethods::FalseClass - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::Pure::Generator::GeneratorMethods::FalseClass

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- to_json(*) - click to toggle source -
- - -
- -

Returns a JSON string for false: -‘false’.

- - - -
-
-# File lib/json/pure/generator.rb, line 512
-def to_json(*) 'false' end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/Float.html b/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/Float.html deleted file mode 100644 index b6e591f..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/Float.html +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - - Module: JSON::Pure::Generator::GeneratorMethods::Float - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::Pure::Generator::GeneratorMethods::Float

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- to_json(state = nil, *) - click to toggle source -
- - -
- -

Returns a JSON string representation -for this Float number.

- - - -
-
-# File lib/json/pure/generator.rb, line 418
-def to_json(state = nil, *)
-  state = State.from_state(state)
-  case
-  when infinite?
-    if state.allow_nan?
-      to_s
-    else
-      raise GeneratorError, "#{self} not allowed in JSON"
-    end
-  when nan?
-    if state.allow_nan?
-      to_s
-    else
-      raise GeneratorError, "#{self} not allowed in JSON"
-    end
-  else
-    to_s
-  end
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/Hash.html b/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/Hash.html deleted file mode 100644 index c39f97a..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/Hash.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - - Module: JSON::Pure::Generator::GeneratorMethods::Hash - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::Pure::Generator::GeneratorMethods::Hash

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- to_json(state = nil, *) - click to toggle source -
- - -
- -

Returns a JSON string containing a JSON object, that is unparsed from this Hash instance. state is a JSON::State object, -that can also be used to configure the produced JSON string output further. depth -is used to find out nesting depth, to indent accordingly.

- - - -
-
-# File lib/json/pure/generator.rb, line 338
-def to_json(state = nil, *)
-  state = State.from_state(state)
-  state.check_max_nesting
-  json_transform(state)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/Integer.html b/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/Integer.html deleted file mode 100644 index 1a4a12a..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/Integer.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - - Module: JSON::Pure::Generator::GeneratorMethods::Integer - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::Pure::Generator::GeneratorMethods::Integer

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- to_json(*) - click to toggle source -
- - -
- -

Returns a JSON string representation -for this Integer number.

- - - -
-
-# File lib/json/pure/generator.rb, line 413
-def to_json(*) to_s end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/NilClass.html b/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/NilClass.html deleted file mode 100644 index 50b5426..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/NilClass.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - Module: JSON::Pure::Generator::GeneratorMethods::NilClass - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::Pure::Generator::GeneratorMethods::NilClass

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- to_json(*) - click to toggle source -
- - -
- -

Returns a JSON string for nil: ‘null’.

- - - -
-
-# File lib/json/pure/generator.rb, line 517
-def to_json(*) 'null' end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/Object.html b/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/Object.html deleted file mode 100644 index 1c318b3..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/Object.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - - Module: JSON::Pure::Generator::GeneratorMethods::Object - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::Pure::Generator::GeneratorMethods::Object

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- to_json(*) - click to toggle source -
- - -
- -

Converts this object to a string (calling to_s), converts it to a JSON string, and returns the result. This -is a fallback, if no special method to_json was defined for some -object.

- - - -
-
-# File lib/json/pure/generator.rb, line 329
-def to_json(*) to_s.to_json end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/String.html b/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/String.html deleted file mode 100644 index 79ca5e4..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/String.html +++ /dev/null @@ -1,398 +0,0 @@ - - - - - - - Module: JSON::Pure::Generator::GeneratorMethods::String - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::Pure::Generator::GeneratorMethods::String

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- included(modul) - click to toggle source -
- - -
- -

Extends modul with the String::Extend module.

- - - -
-
-# File lib/json/pure/generator.rb, line 483
-def self.included(modul)
-  modul.extend Extend
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- to_json(state = nil, *args) - click to toggle source -
- - -
- -

This string should be encoded with UTF-8 A call to this method returns a JSON string encoded with UTF16 big endian -characters as u????.

- - - -
-
-# File lib/json/pure/generator.rb, line 444
-def to_json(state = nil, *args)
-  state = State.from_state(state)
-  if encoding == ::Encoding::UTF_8
-    string = self
-  else
-    string = encode(::Encoding::UTF_8)
-  end
-  if state.ascii_only?
-    '"' << JSON.utf8_to_json_ascii(string) << '"'
-  else
-    '"' << JSON.utf8_to_json(string) << '"'
-  end
-end
-
- -
- - - - -
- - -
- - - -
- to_json_raw(*args) - click to toggle source -
- - -
- -

This method creates a JSON text from -the result of a call to to_json_raw_object of -this String.

- - - -
-
-# File lib/json/pure/generator.rb, line 500
-def to_json_raw(*args)
-  to_json_raw_object.to_json(*args)
-end
-
- -
- - - - -
- - -
- - - -
- to_json_raw_object() - click to toggle source -
- - -
- -

This method creates a raw object hash, that can be nested into other data -structures and will be unparsed as a raw string. This method should be -used, if you want to convert raw strings to JSON instead of UTF-8 strings, e. g. -binary data.

- - - -
-
-# File lib/json/pure/generator.rb, line 491
-def to_json_raw_object
-  {
-    JSON.create_id  => self.class.name,
-    'raw'           => self.unpack('C*'),
-  }
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/String/Extend.html b/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/String/Extend.html deleted file mode 100644 index 0935eb8..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/String/Extend.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - - - - Module: JSON::Pure::Generator::GeneratorMethods::String::Extend - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::Pure::Generator::GeneratorMethods::String::Extend

- -
- -

Module that holds the extinding methods if, the String module is included.

- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- json_create(o) - click to toggle source -
- - -
- -

Raw Strings are JSON Objects (the -raw bytes are stored in an array for the key “raw”). The Ruby String can be created by this module method.

- - - -
-
-# File lib/json/pure/generator.rb, line 477
-def json_create(o)
-  o['raw'].pack('C*')
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/TrueClass.html b/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/TrueClass.html deleted file mode 100644 index 39a696a..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/GeneratorMethods/TrueClass.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - Module: JSON::Pure::Generator::GeneratorMethods::TrueClass - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::Pure::Generator::GeneratorMethods::TrueClass

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- to_json(*) - click to toggle source -
- - -
- -

Returns a JSON string for true: ‘true’.

- - - -
-
-# File lib/json/pure/generator.rb, line 507
-def to_json(*) 'true' end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/State.html b/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/State.html deleted file mode 100644 index 892805c..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Generator/State.html +++ /dev/null @@ -1,963 +0,0 @@ - - - - - - - Class: JSON::Pure::Generator::State - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::Pure::Generator::State

- -
- -

This class is used to create State instances, that -are use to hold data while generating a JSON text from a Ruby data structure.

- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - - - -
- array_nl[RW] -
- -
- -

This string is put at the end of a line that holds a JSON array.

- -
-
- -
- - - - -
- depth[RW] -
- -
- -

This integer returns the current depth data structure nesting in the -generated JSON.

- -
-
- -
- - - - -
- indent[RW] -
- -
- -

This string is used to indent levels in the JSON text.

- -
-
- -
- - - - -
- max_nesting[RW] -
- -
- -

This integer returns the maximum level of data structure nesting in the -generated JSON, max_nesting = 0 if no maximum -is checked.

- -
-
- -
- - - - -
- object_nl[RW] -
- -
- -

This string is put at the end of a line that holds a JSON object (or Hash).

- -
-
- -
- - - - -
- quirks_mode[RW] -
- -
- -

If this attribute is set to true, quirks mode is enabled, otherwise it’s -disabled.

- -
-
- -
- - - - -
- space[RW] -
- -
- -

This string is used to insert a space between the tokens in a JSON string.

- -
-
- -
- - - - -
- space_before[RW] -
- -
- -

This string is used to insert a space before the ‘:’ in JSON objects.

- -
-
- -
- - - - -
-

Public Class Methods

- - -
- - - -
- from_state(opts) - click to toggle source -
- - -
- -

Creates a State object from opts, which -ought to be Hash to create a new State instance -configured by opts, something else to create an unconfigured -instance. If opts is a State object, it -is just returned.

- - - -
-
-# File lib/json/pure/generator.rb, line 129
-def self.from_state(opts)
-  case
-  when self === opts
-    opts
-  when opts.respond_to?(:to_hash)
-    new(opts.to_hash)
-  when opts.respond_to?(:to_h)
-    new(opts.to_h)
-  else
-    SAFE_STATE_PROTOTYPE.dup
-  end
-end
-
- -
- - - - -
- - -
- - - -
- new(opts = {}) - click to toggle source -
- - -
- -

Instantiates a new State object, configured by -opts.

- -

opts can have the following keys:

-
  • -

    indent: a string used to indent levels (default: "),

    -
  • -

    space: a string that is put after, a : or , delimiter (default: "),

    -
  • -

    space_before: a -string that is put before a : pair delimiter (default: "),

    -
  • -

    object_nl: a string -that is put at the end of a JSON object -(default: "),

    -
  • -

    array_nl: a string -that is put at the end of a JSON array -(default: "),

    -
  • -

    check_circular: is deprecated now, use the :max_nesting option instead,

    -
  • -

    max_nesting: sets -the maximum level of data structure nesting in the generated JSON, max_nesting = 0 if no maximum -should be checked.

    -
  • -

    allow_nan: true if NaN, Infinity, and -Infinity should be generated, -otherwise an exception is thrown, if these values are encountered. This -options defaults to false.

    -
  • -

    quirks_mode: -Enables quirks_mode for -parser, that is for example generating single JSON values instead of documents is possible.

    -
- - - -
-
-# File lib/json/pure/generator.rb, line 159
-def initialize(opts = {})
-  @indent                = ''
-  @space                 = ''
-  @space_before          = ''
-  @object_nl             = ''
-  @array_nl              = ''
-  @allow_nan             = false
-  @ascii_only            = false
-  @quirks_mode           = false
-  @buffer_initial_length = 1024
-  configure opts
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- [](name) - click to toggle source -
- - -
- -

Return the value returned by method name.

- - - -
-
-# File lib/json/pure/generator.rb, line 307
-def [](name)
-  if respond_to?(name)
-    __send__(name)
-  else
-    instance_variable_get("@#{name}")
-  end
-end
-
- -
- - - - -
- - -
- - - -
- []=(name, value) - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/pure/generator.rb, line 315
-def []=(name, value)
-  if respond_to?(name_writer = "#{name}=")
-    __send__ name_writer, value
-  else
-    instance_variable_set "@#{name}", value
-  end
-end
-
- -
- - - - -
- - -
- - - -
- allow_nan?() - click to toggle source -
- - -
- -

Returns true if NaN, Infinity, and -Infinity should be considered as valid -JSON and output.

- - - -
-
-# File lib/json/pure/generator.rb, line 226
-def allow_nan?
-  @allow_nan
-end
-
- -
- - - - -
- - -
- - - -
- ascii_only?() - click to toggle source -
- - -
- -

Returns true, if only ASCII characters should be generated. Otherwise -returns false.

- - - -
-
-# File lib/json/pure/generator.rb, line 232
-def ascii_only?
-  @ascii_only
-end
-
- -
- - - - -
- - -
- - - -
- check_circular?() - click to toggle source -
- - -
- -

Returns true, if circular data structures are checked, otherwise returns -false.

- - - -
-
-# File lib/json/pure/generator.rb, line 220
-def check_circular?
-  !@max_nesting.zero?
-end
-
- -
- - - - -
- - -
- - - -
- configure(opts) - click to toggle source -
- - -
- -

Configure this State instance with the Hash -opts, and return itself.

- - - -
-
-# File lib/json/pure/generator.rb, line 243
-def configure(opts)
-  if opts.respond_to?(:to_hash)
-    opts = opts.to_hash
-  elsif opts.respond_to?(:to_h)
-    opts = opts.to_h
-  else
-    raise TypeError, "can't convert #{opts.class} into Hash"
-  end
-  for key, value in opts
-    instance_variable_set "@#{key}", value
-  end
-  @indent                = opts[:indent] if opts.key?(:indent)
-  @space                 = opts[:space] if opts.key?(:space)
-  @space_before          = opts[:space_before] if opts.key?(:space_before)
-  @object_nl             = opts[:object_nl] if opts.key?(:object_nl)
-  @array_nl              = opts[:array_nl] if opts.key?(:array_nl)
-  @allow_nan             = !!opts[:allow_nan] if opts.key?(:allow_nan)
-  @ascii_only            = opts[:ascii_only] if opts.key?(:ascii_only)
-  @depth                 = opts[:depth] || 0
-  @quirks_mode           = opts[:quirks_mode] if opts.key?(:quirks_mode)
-  @buffer_initial_length ||= opts[:buffer_initial_length]
-
-  if !opts.key?(:max_nesting) # defaults to 100
-    @max_nesting = 100
-  elsif opts[:max_nesting]
-    @max_nesting = opts[:max_nesting]
-  else
-    @max_nesting = 0
-  end
-  self
-end
-
- -
- - -
- Also aliased as: merge -
- - - -
- - -
- - - -
- generate(obj) - click to toggle source -
- - -
- -

Generates a valid JSON document from -object obj and returns the result. If no valid JSON document can be created this method -raises a GeneratorError exception.

- - - -
-
-# File lib/json/pure/generator.rb, line 292
-def generate(obj)
-  result = obj.to_json(self)
-  JSON.valid_utf8?(result) or raise GeneratorError,
-    "source sequence #{result.inspect} is illegal/malformed utf-8"
-  unless @quirks_mode
-    unless result =~ /\A\s*\[/ && result =~ /\]\s*\Z/ ||
-      result =~ /\A\s*\{/ && result =~ /\}\s*\Z/
-    then
-      raise GeneratorError, "only generation of JSON objects or arrays allowed"
-    end
-  end
-  result
-end
-
- -
- - - - -
- - -
- - - -
- merge(opts) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: configure -
- -
- - -
- - - -
- quirks_mode?() - click to toggle source -
- - -
- -

Returns true, if quirks mode is enabled. Otherwise returns false.

- - - -
-
-# File lib/json/pure/generator.rb, line 237
-def quirks_mode?
-  @quirks_mode
-end
-
- -
- - - - -
- - -
- - - -
- to_h() - click to toggle source -
- - -
- -

Returns the configuration instance variables as a hash, that can be passed -to the configure method.

- - - -
-
-# File lib/json/pure/generator.rb, line 278
-def to_h
-  result = {}
-  for iv in instance_variables
-    iv = iv.to_s[1..-1]
-    result[iv.to_sym] = self[iv]
-  end
-  result
-end
-
- -
- - -
- Also aliased as: to_hash -
- - - -
- - -
- - - -
- to_hash() - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: to_h -
- -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Parser.html b/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Parser.html deleted file mode 100644 index 6c128a3..0000000 --- a/.gems/doc/json-1.8.1/rdoc/JSON/Pure/Parser.html +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - - Class: JSON::Pure::Parser - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

JSON::Pure::Parser

- -
- -

This class implements the JSON parser that is -used to parse a JSON string into a Ruby data -structure.

- -
- - - - -
- - - - - - -
-

Constants

-
- -
ARRAY_CLOSE
- -
- - -
ARRAY_OPEN
- -
- - -
COLLECTION_DELIMITER
- -
- - -
EMPTY_8BIT_STRING
- -
- - -
FALSE
- -
- - -
FLOAT
- -
- - -
IGNORE
- -
- - -
INFINITY
- -
- - -
INTEGER
- -
- - -
MINUS_INFINITY
- -
- - -
NAN
- -
- - -
NULL
- -
- - -
OBJECT_CLOSE
- -
- - -
OBJECT_OPEN
- -
- - -
PAIR_DELIMITER
- -
- - -
STRING
- -
- - -
TRUE
- -
- - -
UNESCAPE_MAP
- -

Unescape characters in strings.

- - -
UNPARSED
- -
- - -
-
- - - - - - -
-

Public Class Methods

- - -
- - - -
- new(source, opts = {}) - click to toggle source -
- - -
- -

Creates a new JSON::Pure::Parser instance for the -string source.

- -

It will be configured by the opts hash. opts can have the -following keys:

-
  • -

    max_nesting: The maximum depth of nesting allowed in the parsed data -structures. Disable depth checking with :max_nesting => false|nil|0, it -defaults to 100.

    -
  • -

    allow_nan: If set to true, allow NaN, Infinity and -Infinity in -defiance of RFC 4627 to be parsed by the Parser. -This option defaults to false.

    -
  • -

    symbolize_names: If set to true, returns symbols for the names -(keys) in a JSON object. Otherwise strings -are returned, which is also the default.

    -
  • -

    create_additions: If set to true, the Parser creates additions when if a matching class -and create_id was found. This option defaults to false.

    -
  • -

    object_class: Defaults to Hash

    -
  • -

    array_class: Defaults to Array

    -
  • -

    quirks_mode: Enables quirks_mode for parser, that is for example -parsing single JSON values instead of -documents is possible.

    -
- - - -
-
-# File lib/json/pure/parser.rb, line 73
-def initialize(source, opts = {})
-  opts ||= {}
-  unless @quirks_mode = opts[:quirks_mode]
-    source = convert_encoding source
-  end
-  super source
-  if !opts.key?(:max_nesting) # defaults to 100
-    @max_nesting = 100
-  elsif opts[:max_nesting]
-    @max_nesting = opts[:max_nesting]
-  else
-    @max_nesting = 0
-  end
-  @allow_nan = !!opts[:allow_nan]
-  @symbolize_names = !!opts[:symbolize_names]
-  if opts.key?(:create_additions)
-    @create_additions = !!opts[:create_additions]
-  else
-    @create_additions = false
-  end
-  @create_id = @create_additions ? JSON.create_id : nil
-  @object_class = opts[:object_class] || Hash
-  @array_class  = opts[:array_class] || Array
-  @match_string = opts[:match_string]
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- parse() - click to toggle source -
- - -
- -

Parses the current JSON string -source and returns the complete data structure as a result.

- - - -
-
-# File lib/json/pure/parser.rb, line 112
-def parse
-  reset
-  obj = nil
-  if @quirks_mode
-    while !eos? && skip(IGNORE)
-    end
-    if eos?
-      raise ParserError, "source did not contain any JSON!"
-    else
-      obj = parse_value
-      obj == UNPARSED and raise ParserError, "source did not contain any JSON!"
-    end
-  else
-    until eos?
-      case
-      when scan(OBJECT_OPEN)
-        obj and raise ParserError, "source '#{peek(20)}' not in JSON!"
-        @current_nesting = 1
-        obj = parse_object
-      when scan(ARRAY_OPEN)
-        obj and raise ParserError, "source '#{peek(20)}' not in JSON!"
-        @current_nesting = 1
-        obj = parse_array
-      when skip(IGNORE)
-        ;
-      else
-        raise ParserError, "source '#{peek(20)}' not in JSON!"
-      end
-    end
-    obj or raise ParserError, "source did not contain any JSON!"
-  end
-  obj
-end
-
- -
- - - - -
- - -
- - - -
- quirks_mode?() - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/pure/parser.rb, line 101
-def quirks_mode?
-  !!@quirks_mode
-end
-
- -
- - - - -
- - -
- - - -
- reset() - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/pure/parser.rb, line 105
-def reset
-  super
-  @current_nesting = 0
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/Kernel.html b/.gems/doc/json-1.8.1/rdoc/Kernel.html deleted file mode 100644 index 633e2bb..0000000 --- a/.gems/doc/json-1.8.1/rdoc/Kernel.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - Module: Kernel - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - - - - - - - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

Kernel

- -
- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/OpenStruct.html b/.gems/doc/json-1.8.1/rdoc/OpenStruct.html deleted file mode 100644 index b905447..0000000 --- a/.gems/doc/json-1.8.1/rdoc/OpenStruct.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - Class: OpenStruct - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

OpenStruct

- -
- -

OpenStruct serialization/deserialization

- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- json_create(object) - click to toggle source -
- - -
- -

Deserializes JSON string by constructing new Struct object with values v serialized by -to_json.

- - - -
-
-# File lib/json/add/ostruct.rb, line 11
-def self.json_create(object)
-  new(object['t'] || object[:t])
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- as_json(*) - click to toggle source -
- - -
- -

Returns a hash, that will be turned into a JSON -object and represent this object.

- - - -
-
-# File lib/json/add/ostruct.rb, line 17
-def as_json(*)
-  klass = self.class.name
-  klass.to_s.empty? and raise JSON::JSONError, "Only named structs are supported!"
-  {
-    JSON.create_id => klass,
-    't'            => table,
-  }
-end
-
- -
- - - - -
- - -
- - - -
- to_json(*args) - click to toggle source -
- - -
- -

Stores class name (OpenStruct) with this -struct’s values v as a JSON string.

- - - -
-
-# File lib/json/add/ostruct.rb, line 28
-def to_json(*args)
-  as_json.to_json(*args)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/README_rdoc.html b/.gems/doc/json-1.8.1/rdoc/README_rdoc.html deleted file mode 100644 index 98430c7..0000000 --- a/.gems/doc/json-1.8.1/rdoc/README_rdoc.html +++ /dev/null @@ -1,554 +0,0 @@ - - - - - - - - File: README.rdoc [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
- - -
-

Files

- -
- - - - - -
-
- -
- -

JSON implementation for Ruby

- -

Description

- -

This is a implementation of the JSON specification -according to RFC 4627 www.ietf.org/rfc/rfc4627.txt -. Starting from version 1.0.0 on there will be two variants available:

- - -

Both variants of the JSON generator generate UTF-8 -character sequences by default. If an :ascii_only option with a true value -is given, they escape all non-ASCII and control characters with uXXXX -escape sequences, and support UTF-16 surrogate pairs in order to be able to -generate the whole range of unicode code points.

- -

All strings, that are to be encoded as JSON -strings, should be UTF-8 byte sequences on the Ruby side. To encode raw -binary strings, that aren’t UTF-8 encoded, please use the -to_json_raw_object method of String (which produces an object, that -contains a byte array) and decode the result on the receiving endpoint.

- -

The JSON parsers can parse UTF-8, UTF-16BE, -UTF-16LE, UTF-32BE, and UTF-32LE JSON documents -under Ruby 1.8. Under Ruby 1.9 they take advantage of Ruby’s M17n features -and can parse all documents which have the correct String#encoding set. If -a document string has ASCII-8BIT as an encoding the parser attempts to -figure out which of the UTF encodings from above it is and trys to parse -it.

- -

Installation

- -

It’s recommended to use the extension variant of JSON, because it’s faster than the pure ruby variant. -If you cannot build it on your system, you can settle for the latter.

- -

Just type into the command line as root:

- -
# rake install
- -

The above command will build the extensions and install them on your -system.

- -
# rake install_pure
- -

or

- -
# ruby install.rb
- -

will just install the pure ruby implementation of JSON.

- -

If you use Rubygems you can type

- -
# gem install json
- -

instead, to install the newest JSON version.

- -

There is also a pure ruby json only variant of the gem, that can be -installed with:

- -
# gem install json_pure
- -

Compiling the extensions yourself

- -

If you want to build the extensions yourself you need rake:

- -
You can get it from rubyforge:
-  http://rubyforge.org/projects/rake
-
-or just type
-
-# gem install rake
-
-for the installation via rubygems.
- -

If you want to create the parser.c file from its parser.rl file or draw -nice graphviz images of the state machines, you need ragel from: www.cs.queensu.ca/~thurston/ragel

- -

Usage

- -

To use JSON you can

- -
require 'json'
- -

to load the installed variant (either the extension ‘json’ or the pure -variant ‘json_pure’). If you have installed the extension variant, you can -pick either the extension variant or the pure variant by typing

- -
require 'json/ext'
- -

or

- -
require 'json/pure'
- -

Now you can parse a JSON document into a ruby data -structure by calling

- -
JSON.parse(document)
- -

If you want to generate a JSON document from a ruby -data structure call

- -
JSON.generate(data)
- -

You can also use the pretty_generate method (which formats the output more -verbosely and nicely) or fast_generate (which doesn’t do any of the -security checks generate performs, e. g. nesting deepness checks).

- -

To create a valid JSON document you have to make -sure, that the output is embedded in either a JSON -array [] or a JSON object {}. The easiest way to do -this, is by putting your values in a Ruby Array or Hash instance.

- -

There are also the JSON and JSON[] methods which -use parse on a String or generate a JSON document -from an array or hash:

- -
document = JSON 'test'  => 23 # => "{\"test\":23}"
-document = JSON['test'] => 23 # => "{\"test\":23}"
- -

and

- -
data = JSON '{"test":23}'  # => {"test"=>23}
-data = JSON['{"test":23}'] # => {"test"=>23}
- -

You can choose to load a set of common additions to ruby core’s objects if -you

- -
require 'json/add/core'
- -

After requiring this you can, e. g., serialise/deserialise Ruby ranges:

- -
JSON JSON(1..10) # => 1..10
- -

To find out how to add JSON support to other or -your own classes, read the section “More Examples” below.

- -

To get the best compatibility to rails’ JSON -implementation, you can

- -
require 'json/add/rails'
- -

Both of the additions attempt to require ‘json’ (like above) first, if it -has not been required yet.

- -

More Examples

- -

To create a JSON document from a ruby data -structure, you can call JSON.generate like that:

- -
json = JSON.generate [1, 2, {"a"=>3.141}, false, true, nil, 4..10]
-# => "[1,2,{\"a\":3.141},false,true,null,\"4..10\"]"
- -

To get back a ruby data structure from a JSON -document, you have to call JSON.parse on it:

- -
JSON.parse json
-# => [1, 2, {"a"=>3.141}, false, true, nil, "4..10"]
- -

Note, that the range from the original data structure is a simple string -now. The reason for this is, that JSON doesn’t -support ranges or arbitrary classes. In this case the json library falls -back to call Object#to_json, which is the same as to_s.to_json.

- -

It’s possible to add JSON support serialization to -arbitrary classes by simply implementing a more specialized version of the -to_json method, that should return a JSON object (a -hash converted to JSON with to_json) like this -(don’t forget the *a for all the arguments):

- -
class Range
-  def to_json(*a)
-    {
-      'json_class'   => self.class.name, # = 'Range'
-      'data'         => [ first, last, exclude_end? ]
-    }.to_json(*a)
-  end
-end
- -

The hash key ‘json_class’ is the class, that will be asked to deserialise -the JSON representation later. In this case it’s -‘Range’, but any namespace of the form ‘A::B’ or ‘::A::B’ will do. All -other keys are arbitrary and can be used to store the necessary data to -configure the object to be deserialised.

- -

If a the key ‘json_class’ is found in a JSON -object, the JSON parser checks if the given class -responds to the json_create class method. If so, it is called with the JSON object converted to a Ruby hash. So a range can -be deserialised by implementing Range.json_create like this:

- -
class Range
-  def self.json_create(o)
-    new(*o['data'])
-  end
-end
- -

Now it possible to serialise/deserialise ranges as well:

- -
json = JSON.generate [1, 2, {"a"=>3.141}, false, true, nil, 4..10]
-# => "[1,2,{\"a\":3.141},false,true,null,{\"json_class\":\"Range\",\"data\":[4,10,false]}]"
-JSON.parse json
-# => [1, 2, {"a"=>3.141}, false, true, nil, 4..10]
- -

JSON.generate always creates the -shortest possible string representation of a ruby data structure in one -line. This is good for data storage or network protocols, but not so good -for humans to read. Fortunately there's also JSON.pretty_generate (or JSON.pretty_generate) that -creates a more readable output:

- -
puts JSON.pretty_generate([1, 2, {"a"=>3.141}, false, true, nil, 4..10])
-[
-  1,
-  2,
-  {
-    "a": 3.141
-  },
-  false,
-  true,
-  null,
-  {
-    "json_class": "Range",
-    "data": [
-      4,
-      10,
-      false
-    ]
-  }
-]
- -

There are also the methods Kernel#j for generate, and Kernel#jj for -pretty_generate output to the console, that work analogous to Core Ruby’s p -and the pp library’s pp methods.

- -

The script tools/server.rb contains a small example if you want to test, -how receiving a JSON object from a webrick server -in your browser with the javasript prototype library www.prototypejs.org works.

- -

Speed Comparisons

- -

I have created some benchmark results (see the benchmarks/data-p4-3Ghz -subdir of the package) for the JSON-parser to estimate the speed up in the -C extension:

- -
Comparing times (call_time_mean):
- 1 ParserBenchmarkExt#parser   900 repeats:
-       553.922304770 (  real) ->   21.500x 
-         0.001805307
- 2 ParserBenchmarkYAML#parser  1000 repeats:
-       224.513358139 (  real) ->    8.714x 
-         0.004454078
- 3 ParserBenchmarkPure#parser  1000 repeats:
-        26.755020642 (  real) ->    1.038x 
-         0.037376163
- 4 ParserBenchmarkRails#parser 1000 repeats:
-        25.763381731 (  real) ->    1.000x 
-         0.038814780
-           calls/sec (  time) ->    speed  covers
-           secs/call
- -

In the table above 1 is JSON::Ext::Parser, 2 is YAML.load with YAML -compatbile JSON document, 3 is is JSON::Pure::Parser, and 4 is -ActiveSupport::JSON.decode. The ActiveSupport JSON-decoder converts the -input first to YAML and then uses the YAML-parser, the conversion seems to -slow it down so much that it is only as fast as the JSON::Pure::Parser!

- -

If you look at the benchmark data you can see that this is mostly caused by -the frequent high outliers - the median of the Rails-parser runs is still -overall smaller than the median of the JSON::Pure::Parser runs:

- -
Comparing times (call_time_median):
- 1 ParserBenchmarkExt#parser   900 repeats:
-       800.592479481 (  real) ->   26.936x 
-         0.001249075
- 2 ParserBenchmarkYAML#parser  1000 repeats:
-       271.002390644 (  real) ->    9.118x 
-         0.003690004
- 3 ParserBenchmarkRails#parser 1000 repeats:
-        30.227910865 (  real) ->    1.017x 
-         0.033082008
- 4 ParserBenchmarkPure#parser  1000 repeats:
-        29.722384421 (  real) ->    1.000x 
-         0.033644676
-           calls/sec (  time) ->    speed  covers
-           secs/call
- -

I have benchmarked the JSON-Generator as well. This generated a few more -values, because there are different modes that also influence the achieved -speed:

- -
Comparing times (call_time_mean):
- 1 GeneratorBenchmarkExt#generator_fast    1000 repeats:
-       547.354332608 (  real) ->   15.090x 
-         0.001826970
- 2 GeneratorBenchmarkExt#generator_safe    1000 repeats:
-       443.968212317 (  real) ->   12.240x 
-         0.002252414
- 3 GeneratorBenchmarkExt#generator_pretty  900 repeats:
-       375.104545883 (  real) ->   10.341x 
-         0.002665923
- 4 GeneratorBenchmarkPure#generator_fast   1000 repeats:
-        49.978706968 (  real) ->    1.378x 
-         0.020008521
- 5 GeneratorBenchmarkRails#generator       1000 repeats:
-        38.531868759 (  real) ->    1.062x 
-         0.025952543
- 6 GeneratorBenchmarkPure#generator_safe   1000 repeats:
-        36.927649925 (  real) ->    1.018x 7 (>=3859)
-         0.027079979
- 7 GeneratorBenchmarkPure#generator_pretty 1000 repeats:
-        36.272134441 (  real) ->    1.000x 6 (>=3859)
-         0.027569373
-           calls/sec (  time) ->    speed  covers
-           secs/call
- -

In the table above 1-3 are JSON::Ext::Generator methods. 4, 6, and 7 are JSON::Pure::Generator methods and 5 is -the Rails JSON generator. It is now a bit faster -than the generator_safe and generator_pretty methods of the pure variant -but slower than the others.

- -

To achieve the fastest JSON document output, you -can use the fast_generate method. Beware, that this will disable the -checking for circular Ruby data structures, which may cause JSON to go into an infinite loop.

- -

Here are the median comparisons for completeness’ sake:

- -
Comparing times (call_time_median):
- 1 GeneratorBenchmarkExt#generator_fast    1000 repeats:
-       708.258020939 (  real) ->   16.547x 
-         0.001411915
- 2 GeneratorBenchmarkExt#generator_safe    1000 repeats:
-       569.105020353 (  real) ->   13.296x 
-         0.001757145
- 3 GeneratorBenchmarkExt#generator_pretty  900 repeats:
-       482.825371244 (  real) ->   11.280x 
-         0.002071142
- 4 GeneratorBenchmarkPure#generator_fast   1000 repeats:
-        62.717626652 (  real) ->    1.465x 
-         0.015944481
- 5 GeneratorBenchmarkRails#generator       1000 repeats:
-        43.965681162 (  real) ->    1.027x 
-         0.022745013
- 6 GeneratorBenchmarkPure#generator_safe   1000 repeats:
-        43.929073409 (  real) ->    1.026x 7 (>=3859)
-         0.022763968
- 7 GeneratorBenchmarkPure#generator_pretty 1000 repeats:
-        42.802514491 (  real) ->    1.000x 6 (>=3859)
-         0.023363113
-           calls/sec (  time) ->    speed  covers
-           secs/call
- -

Author

- -

Florian Frank <flori@ping.de>

- -

License

- -

Ruby License, see the COPYING file included in the source distribution. The -Ruby License includes the GNU General Public License (GPL), Version 2, so -see the file GPL as well.

- -

Download

- -

The latest version of this library can be downloaded at

- - -

Online Documentation should be located at

- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/Range.html b/.gems/doc/json-1.8.1/rdoc/Range.html deleted file mode 100644 index f40cb12..0000000 --- a/.gems/doc/json-1.8.1/rdoc/Range.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - Class: Range - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

Range

- -
- -

Range serialization/deserialization

- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- json_create(object) - click to toggle source -
- - -
- -

Deserializes JSON string by constructing new Range object with arguments a serialized by -to_json.

- - - -
-
-# File lib/json/add/range.rb, line 10
-def self.json_create(object)
-  new(*object['a'])
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- as_json(*) - click to toggle source -
- - -
- -

Returns a hash, that will be turned into a JSON -object and represent this object.

- - - -
-
-# File lib/json/add/range.rb, line 16
-def as_json(*)
-  {
-    JSON.create_id  => self.class.name,
-    'a'             => [ first, last, exclude_end? ]
-  }
-end
-
- -
- - - - -
- - -
- - - -
- to_json(*args) - click to toggle source -
- - -
- -

Stores class name (Range) with JSON array of arguments a which include -first (integer), last (integer), and -exclude_end? (boolean) as JSON string.

- - - -
-
-# File lib/json/add/range.rb, line 26
-def to_json(*args)
-  as_json.to_json(*args)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/Rational.html b/.gems/doc/json-1.8.1/rdoc/Rational.html deleted file mode 100644 index 9b71378..0000000 --- a/.gems/doc/json-1.8.1/rdoc/Rational.html +++ /dev/null @@ -1,342 +0,0 @@ - - - - - - - Class: Rational - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

Rational

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- json_create(object) - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/add/rational.rb, line 7
-def self.json_create(object)
-  Rational(object['n'], object['d'])
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- as_json(*) - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/add/rational.rb, line 11
-def as_json(*)
-  {
-    JSON.create_id => self.class.name,
-    'n'            => numerator,
-    'd'            => denominator,
-  }
-end
-
- -
- - - - -
- - -
- - - -
- to_json(*) - click to toggle source -
- - -
- - - - - -
-
-# File lib/json/add/rational.rb, line 19
-def to_json(*)
-  as_json.to_json
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/Regexp.html b/.gems/doc/json-1.8.1/rdoc/Regexp.html deleted file mode 100644 index 70da129..0000000 --- a/.gems/doc/json-1.8.1/rdoc/Regexp.html +++ /dev/null @@ -1,350 +0,0 @@ - - - - - - - Class: Regexp - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

Regexp

- -
- -

Regexp serialization/deserialization

- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- json_create(object) - click to toggle source -
- - -
- -

Deserializes JSON string by constructing new Regexp object with source s (Regexp or String) and options o serialized -by to_json

- - - -
-
-# File lib/json/add/regexp.rb, line 11
-def self.json_create(object)
-  new(object['s'], object['o'])
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- as_json(*) - click to toggle source -
- - -
- -

Returns a hash, that will be turned into a JSON -object and represent this object.

- - - -
-
-# File lib/json/add/regexp.rb, line 17
-def as_json(*)
-  {
-    JSON.create_id => self.class.name,
-    'o'            => options,
-    's'            => source,
-  }
-end
-
- -
- - - - -
- - -
- - - -
- to_json(*) - click to toggle source -
- - -
- -

Stores class name (Regexp) with options -o and source s (Regexp or -String) as JSON string

- - - -
-
-# File lib/json/add/regexp.rb, line 27
-def to_json(*)
-  as_json.to_json
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/Struct.html b/.gems/doc/json-1.8.1/rdoc/Struct.html deleted file mode 100644 index 2e827cc..0000000 --- a/.gems/doc/json-1.8.1/rdoc/Struct.html +++ /dev/null @@ -1,350 +0,0 @@ - - - - - - - Class: Struct - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

Struct

- -
- -

Struct serialization/deserialization

- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- json_create(object) - click to toggle source -
- - -
- -

Deserializes JSON string by constructing new Struct object with values v serialized by -to_json.

- - - -
-
-# File lib/json/add/struct.rb, line 10
-def self.json_create(object)
-  new(*object['v'])
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- as_json(*) - click to toggle source -
- - -
- -

Returns a hash, that will be turned into a JSON -object and represent this object.

- - - -
-
-# File lib/json/add/struct.rb, line 16
-def as_json(*)
-  klass = self.class.name
-  klass.to_s.empty? and raise JSON::JSONError, "Only named structs are supported!"
-  {
-    JSON.create_id => klass,
-    'v'            => values,
-  }
-end
-
- -
- - - - -
- - -
- - - -
- to_json(*args) - click to toggle source -
- - -
- -

Stores class name (Struct) with Struct values v as a JSON string. Only named structs are supported.

- - - -
-
-# File lib/json/add/struct.rb, line 27
-def to_json(*args)
-  as_json.to_json(*args)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/Symbol.html b/.gems/doc/json-1.8.1/rdoc/Symbol.html deleted file mode 100644 index 6817097..0000000 --- a/.gems/doc/json-1.8.1/rdoc/Symbol.html +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - - Class: Symbol - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

Symbol

- -
- -

Symbol serialization/deserialization

- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- json_create(o) - click to toggle source -
- - -
- -

Deserializes JSON string by converting the -string value stored in the object to a Symbol

- - - -
-
-# File lib/json/add/symbol.rb, line 22
-def self.json_create(o)
-  o['s'].to_sym
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- as_json(*) - click to toggle source -
- - -
- -

Returns a hash, that will be turned into a JSON -object and represent this object.

- - - -
-
-# File lib/json/add/symbol.rb, line 9
-def as_json(*)
-  {
-    JSON.create_id => self.class.name,
-    's'            => to_s,
-  }
-end
-
- -
- - - - -
- - -
- - - -
- to_json(*a) - click to toggle source -
- - -
- -

Stores class name (Symbol) with String -representation of Symbol as a JSON string.

- - - -
-
-# File lib/json/add/symbol.rb, line 17
-def to_json(*a)
-  as_json.to_json(*a)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/Time.html b/.gems/doc/json-1.8.1/rdoc/Time.html deleted file mode 100644 index 21ff475..0000000 --- a/.gems/doc/json-1.8.1/rdoc/Time.html +++ /dev/null @@ -1,358 +0,0 @@ - - - - - - - Class: Time - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - -
-

Files

- -
- - - - - -
-
- -
-

Time

- -
- -

Time serialization/deserialization

- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- json_create(object) - click to toggle source -
- - -
- -

Deserializes JSON string by converting time since -epoch to Time

- - - -
-
-# File lib/json/add/time.rb, line 9
-def self.json_create(object)
-  if usec = object.delete('u') # used to be tv_usec -> tv_nsec
-    object['n'] = usec * 1000
-  end
-  if instance_methods.include?(:tv_nsec)
-    at(object['s'], Rational(object['n'], 1000))
-  else
-    at(object['s'], object['n'] / 1000)
-  end
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- as_json(*) - click to toggle source -
- - -
- -

Returns a hash, that will be turned into a JSON -object and represent this object.

- - - -
-
-# File lib/json/add/time.rb, line 22
-def as_json(*)
-  nanoseconds = [ tv_usec * 1000 ]
-  respond_to?(:tv_nsec) and nanoseconds << tv_nsec
-  nanoseconds = nanoseconds.max
-  {
-    JSON.create_id => self.class.name,
-    's'            => tv_sec,
-    'n'            => nanoseconds,
-  }
-end
-
- -
- - - - -
- - -
- - - -
- to_json(*args) - click to toggle source -
- - -
- -

Stores class name (Time) with number of seconds -since epoch and number of microseconds for Time as -JSON string

- - - -
-
-# File lib/json/add/time.rb, line 35
-def to_json(*args)
-  as_json.to_json(*args)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/json-1.8.1/rdoc/created.rid b/.gems/doc/json-1.8.1/rdoc/created.rid deleted file mode 100644 index c9e706c..0000000 --- a/.gems/doc/json-1.8.1/rdoc/created.rid +++ /dev/null @@ -1,23 +0,0 @@ -Wed, 03 Sep 2014 10:26:43 +0200 -lib/json.rb Wed, 03 Sep 2014 10:26:40 +0200 -lib/json/common.rb Wed, 03 Sep 2014 10:26:40 +0200 -lib/json/ext.rb Wed, 03 Sep 2014 10:26:40 +0200 -lib/json/pure.rb Wed, 03 Sep 2014 10:26:40 +0200 -lib/json/version.rb Wed, 03 Sep 2014 10:26:40 +0200 -lib/json/generic_object.rb Wed, 03 Sep 2014 10:26:40 +0200 -lib/json/add/symbol.rb Wed, 03 Sep 2014 10:26:40 +0200 -lib/json/add/date.rb Wed, 03 Sep 2014 10:26:40 +0200 -lib/json/add/exception.rb Wed, 03 Sep 2014 10:26:40 +0200 -lib/json/add/ostruct.rb Wed, 03 Sep 2014 10:26:40 +0200 -lib/json/add/date_time.rb Wed, 03 Sep 2014 10:26:40 +0200 -lib/json/add/range.rb Wed, 03 Sep 2014 10:26:40 +0200 -lib/json/add/core.rb Wed, 03 Sep 2014 10:26:40 +0200 -lib/json/add/struct.rb Wed, 03 Sep 2014 10:26:40 +0200 -lib/json/add/complex.rb Wed, 03 Sep 2014 10:26:40 +0200 -lib/json/add/rational.rb Wed, 03 Sep 2014 10:26:40 +0200 -lib/json/add/time.rb Wed, 03 Sep 2014 10:26:40 +0200 -lib/json/add/bigdecimal.rb Wed, 03 Sep 2014 10:26:40 +0200 -lib/json/add/regexp.rb Wed, 03 Sep 2014 10:26:40 +0200 -lib/json/pure/generator.rb Wed, 03 Sep 2014 10:26:40 +0200 -lib/json/pure/parser.rb Wed, 03 Sep 2014 10:26:40 +0200 -README.rdoc Wed, 03 Sep 2014 10:26:40 +0200 diff --git a/.gems/doc/json-1.8.1/rdoc/images/brick.png b/.gems/doc/json-1.8.1/rdoc/images/brick.png deleted file mode 100644 index 7851cf3..0000000 Binary files a/.gems/doc/json-1.8.1/rdoc/images/brick.png and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/images/brick_link.png b/.gems/doc/json-1.8.1/rdoc/images/brick_link.png deleted file mode 100644 index 9ebf013..0000000 Binary files a/.gems/doc/json-1.8.1/rdoc/images/brick_link.png and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/images/bug.png b/.gems/doc/json-1.8.1/rdoc/images/bug.png deleted file mode 100644 index 2d5fb90..0000000 Binary files a/.gems/doc/json-1.8.1/rdoc/images/bug.png and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/images/bullet_black.png b/.gems/doc/json-1.8.1/rdoc/images/bullet_black.png deleted file mode 100644 index 5761970..0000000 Binary files a/.gems/doc/json-1.8.1/rdoc/images/bullet_black.png and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/images/bullet_toggle_minus.png b/.gems/doc/json-1.8.1/rdoc/images/bullet_toggle_minus.png deleted file mode 100644 index b47ce55..0000000 Binary files a/.gems/doc/json-1.8.1/rdoc/images/bullet_toggle_minus.png and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/images/bullet_toggle_plus.png b/.gems/doc/json-1.8.1/rdoc/images/bullet_toggle_plus.png deleted file mode 100644 index 9ab4a89..0000000 Binary files a/.gems/doc/json-1.8.1/rdoc/images/bullet_toggle_plus.png and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/images/date.png b/.gems/doc/json-1.8.1/rdoc/images/date.png deleted file mode 100644 index 783c833..0000000 Binary files a/.gems/doc/json-1.8.1/rdoc/images/date.png and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/images/find.png b/.gems/doc/json-1.8.1/rdoc/images/find.png deleted file mode 100644 index 1547479..0000000 Binary files a/.gems/doc/json-1.8.1/rdoc/images/find.png and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/images/loadingAnimation.gif b/.gems/doc/json-1.8.1/rdoc/images/loadingAnimation.gif deleted file mode 100644 index 82290f4..0000000 Binary files a/.gems/doc/json-1.8.1/rdoc/images/loadingAnimation.gif and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/images/macFFBgHack.png b/.gems/doc/json-1.8.1/rdoc/images/macFFBgHack.png deleted file mode 100644 index c6473b3..0000000 Binary files a/.gems/doc/json-1.8.1/rdoc/images/macFFBgHack.png and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/images/package.png b/.gems/doc/json-1.8.1/rdoc/images/package.png deleted file mode 100644 index da3c2a2..0000000 Binary files a/.gems/doc/json-1.8.1/rdoc/images/package.png and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/images/page_green.png b/.gems/doc/json-1.8.1/rdoc/images/page_green.png deleted file mode 100644 index de8e003..0000000 Binary files a/.gems/doc/json-1.8.1/rdoc/images/page_green.png and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/images/page_white_text.png b/.gems/doc/json-1.8.1/rdoc/images/page_white_text.png deleted file mode 100644 index 813f712..0000000 Binary files a/.gems/doc/json-1.8.1/rdoc/images/page_white_text.png and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/images/page_white_width.png b/.gems/doc/json-1.8.1/rdoc/images/page_white_width.png deleted file mode 100644 index 1eb8809..0000000 Binary files a/.gems/doc/json-1.8.1/rdoc/images/page_white_width.png and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/images/plugin.png b/.gems/doc/json-1.8.1/rdoc/images/plugin.png deleted file mode 100644 index 6187b15..0000000 Binary files a/.gems/doc/json-1.8.1/rdoc/images/plugin.png and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/images/ruby.png b/.gems/doc/json-1.8.1/rdoc/images/ruby.png deleted file mode 100644 index f763a16..0000000 Binary files a/.gems/doc/json-1.8.1/rdoc/images/ruby.png and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/images/tag_green.png b/.gems/doc/json-1.8.1/rdoc/images/tag_green.png deleted file mode 100644 index 83ec984..0000000 Binary files a/.gems/doc/json-1.8.1/rdoc/images/tag_green.png and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/images/wrench.png b/.gems/doc/json-1.8.1/rdoc/images/wrench.png deleted file mode 100644 index 5c8213f..0000000 Binary files a/.gems/doc/json-1.8.1/rdoc/images/wrench.png and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/images/wrench_orange.png b/.gems/doc/json-1.8.1/rdoc/images/wrench_orange.png deleted file mode 100644 index 565a933..0000000 Binary files a/.gems/doc/json-1.8.1/rdoc/images/wrench_orange.png and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/images/zoom.png b/.gems/doc/json-1.8.1/rdoc/images/zoom.png deleted file mode 100644 index 908612e..0000000 Binary files a/.gems/doc/json-1.8.1/rdoc/images/zoom.png and /dev/null differ diff --git a/.gems/doc/json-1.8.1/rdoc/index.html b/.gems/doc/json-1.8.1/rdoc/index.html deleted file mode 100644 index 02985ac..0000000 --- a/.gems/doc/json-1.8.1/rdoc/index.html +++ /dev/null @@ -1,711 +0,0 @@ - - - - - - - - json-1.8.1 Documentation - - - - - - - - - - - - -

json-1.8.1 Documentation

- - -
- - -

Description

- -

This is a implementation of the JSON specification -according to RFC 4627 www.ietf.org/rfc/rfc4627.txt -. Starting from version 1.0.0 on there will be two variants available:

- - -

Both variants of the JSON generator generate UTF-8 -character sequences by default. If an :ascii_only option with a true value -is given, they escape all non-ASCII and control characters with uXXXX -escape sequences, and support UTF-16 surrogate pairs in order to be able to -generate the whole range of unicode code points.

- -

All strings, that are to be encoded as JSON -strings, should be UTF-8 byte sequences on the Ruby side. To encode raw -binary strings, that aren’t UTF-8 encoded, please use the -to_json_raw_object method of String (which produces an object, that -contains a byte array) and decode the result on the receiving endpoint.

- -

The JSON parsers can parse UTF-8, UTF-16BE, -UTF-16LE, UTF-32BE, and UTF-32LE JSON documents -under Ruby 1.8. Under Ruby 1.9 they take advantage of Ruby’s M17n features -and can parse all documents which have the correct String#encoding set. If -a document string has ASCII-8BIT as an encoding the parser attempts to -figure out which of the UTF encodings from above it is and trys to parse -it.

- -

Installation

- -

It’s recommended to use the extension variant of JSON, because it’s faster than the pure ruby variant. -If you cannot build it on your system, you can settle for the latter.

- -

Just type into the command line as root:

- -
# rake install
- -

The above command will build the extensions and install them on your -system.

- -
# rake install_pure
- -

or

- -
# ruby install.rb
- -

will just install the pure ruby implementation of JSON.

- -

If you use Rubygems you can type

- -
# gem install json
- -

instead, to install the newest JSON version.

- -

There is also a pure ruby json only variant of the gem, that can be -installed with:

- -
# gem install json_pure
- -

Compiling the extensions yourself

- -

If you want to build the extensions yourself you need rake:

- -
You can get it from rubyforge:
-  http://rubyforge.org/projects/rake
-
-or just type
-
-# gem install rake
-
-for the installation via rubygems.
- -

If you want to create the parser.c file from its parser.rl file or draw -nice graphviz images of the state machines, you need ragel from: www.cs.queensu.ca/~thurston/ragel

- -

Usage

- -

To use JSON you can

- -
require 'json'
- -

to load the installed variant (either the extension ‘json’ or the pure -variant ‘json_pure’). If you have installed the extension variant, you can -pick either the extension variant or the pure variant by typing

- -
require 'json/ext'
- -

or

- -
require 'json/pure'
- -

Now you can parse a JSON document into a ruby data -structure by calling

- -
JSON.parse(document)
- -

If you want to generate a JSON document from a ruby -data structure call

- -
JSON.generate(data)
- -

You can also use the pretty_generate method (which formats the output more -verbosely and nicely) or fast_generate (which doesn’t do any of the -security checks generate performs, e. g. nesting deepness checks).

- -

To create a valid JSON document you have to make -sure, that the output is embedded in either a JSON -array [] or a JSON object {}. The easiest way to do -this, is by putting your values in a Ruby Array or Hash instance.

- -

There are also the JSON and JSON[] methods which -use parse on a String or generate a JSON document -from an array or hash:

- -
document = JSON 'test'  => 23 # => "{\"test\":23}"
-document = JSON['test'] => 23 # => "{\"test\":23}"
- -

and

- -
data = JSON '{"test":23}'  # => {"test"=>23}
-data = JSON['{"test":23}'] # => {"test"=>23}
- -

You can choose to load a set of common additions to ruby core’s objects if -you

- -
require 'json/add/core'
- -

After requiring this you can, e. g., serialise/deserialise Ruby ranges:

- -
JSON JSON(1..10) # => 1..10
- -

To find out how to add JSON support to other or -your own classes, read the section “More Examples” below.

- -

To get the best compatibility to rails’ JSON -implementation, you can

- -
require 'json/add/rails'
- -

Both of the additions attempt to require ‘json’ (like above) first, if it -has not been required yet.

- -

More Examples

- -

To create a JSON document from a ruby data -structure, you can call JSON.generate like that:

- -
json = JSON.generate [1, 2, {"a"=>3.141}, false, true, nil, 4..10]
-# => "[1,2,{\"a\":3.141},false,true,null,\"4..10\"]"
- -

To get back a ruby data structure from a JSON -document, you have to call JSON.parse on it:

- -
JSON.parse json
-# => [1, 2, {"a"=>3.141}, false, true, nil, "4..10"]
- -

Note, that the range from the original data structure is a simple string -now. The reason for this is, that JSON doesn’t -support ranges or arbitrary classes. In this case the json library falls -back to call Object#to_json, which is the same as to_s.to_json.

- -

It’s possible to add JSON support serialization to -arbitrary classes by simply implementing a more specialized version of the -to_json method, that should return a JSON object (a -hash converted to JSON with to_json) like this -(don’t forget the *a for all the arguments):

- -
class Range
-  def to_json(*a)
-    {
-      'json_class'   => self.class.name, # = 'Range'
-      'data'         => [ first, last, exclude_end? ]
-    }.to_json(*a)
-  end
-end
- -

The hash key ‘json_class’ is the class, that will be asked to deserialise -the JSON representation later. In this case it’s -‘Range’, but any namespace of the form ‘A::B’ or ‘::A::B’ will do. All -other keys are arbitrary and can be used to store the necessary data to -configure the object to be deserialised.

- -

If a the key ‘json_class’ is found in a JSON -object, the JSON parser checks if the given class -responds to the json_create class method. If so, it is called with the JSON object converted to a Ruby hash. So a range can -be deserialised by implementing Range.json_create like this:

- -
class Range
-  def self.json_create(o)
-    new(*o['data'])
-  end
-end
- -

Now it possible to serialise/deserialise ranges as well:

- -
json = JSON.generate [1, 2, {"a"=>3.141}, false, true, nil, 4..10]
-# => "[1,2,{\"a\":3.141},false,true,null,{\"json_class\":\"Range\",\"data\":[4,10,false]}]"
-JSON.parse json
-# => [1, 2, {"a"=>3.141}, false, true, nil, 4..10]
- -

JSON.generate always creates the -shortest possible string representation of a ruby data structure in one -line. This is good for data storage or network protocols, but not so good -for humans to read. Fortunately there's also JSON.pretty_generate (or JSON.pretty_generate) that -creates a more readable output:

- -
puts JSON.pretty_generate([1, 2, {"a"=>3.141}, false, true, nil, 4..10])
-[
-  1,
-  2,
-  {
-    "a": 3.141
-  },
-  false,
-  true,
-  null,
-  {
-    "json_class": "Range",
-    "data": [
-      4,
-      10,
-      false
-    ]
-  }
-]
- -

There are also the methods Kernel#j for generate, and Kernel#jj for -pretty_generate output to the console, that work analogous to Core Ruby’s p -and the pp library’s pp methods.

- -

The script tools/server.rb contains a small example if you want to test, -how receiving a JSON object from a webrick server -in your browser with the javasript prototype library www.prototypejs.org works.

- -

Speed Comparisons

- -

I have created some benchmark results (see the benchmarks/data-p4-3Ghz -subdir of the package) for the JSON-parser to estimate the speed up in the -C extension:

- -
Comparing times (call_time_mean):
- 1 ParserBenchmarkExt#parser   900 repeats:
-       553.922304770 (  real) ->   21.500x 
-         0.001805307
- 2 ParserBenchmarkYAML#parser  1000 repeats:
-       224.513358139 (  real) ->    8.714x 
-         0.004454078
- 3 ParserBenchmarkPure#parser  1000 repeats:
-        26.755020642 (  real) ->    1.038x 
-         0.037376163
- 4 ParserBenchmarkRails#parser 1000 repeats:
-        25.763381731 (  real) ->    1.000x 
-         0.038814780
-           calls/sec (  time) ->    speed  covers
-           secs/call
- -

In the table above 1 is JSON::Ext::Parser, 2 is YAML.load with YAML -compatbile JSON document, 3 is is JSON::Pure::Parser, and 4 is -ActiveSupport::JSON.decode. The ActiveSupport JSON-decoder converts the -input first to YAML and then uses the YAML-parser, the conversion seems to -slow it down so much that it is only as fast as the JSON::Pure::Parser!

- -

If you look at the benchmark data you can see that this is mostly caused by -the frequent high outliers - the median of the Rails-parser runs is still -overall smaller than the median of the JSON::Pure::Parser runs:

- -
Comparing times (call_time_median):
- 1 ParserBenchmarkExt#parser   900 repeats:
-       800.592479481 (  real) ->   26.936x 
-         0.001249075
- 2 ParserBenchmarkYAML#parser  1000 repeats:
-       271.002390644 (  real) ->    9.118x 
-         0.003690004
- 3 ParserBenchmarkRails#parser 1000 repeats:
-        30.227910865 (  real) ->    1.017x 
-         0.033082008
- 4 ParserBenchmarkPure#parser  1000 repeats:
-        29.722384421 (  real) ->    1.000x 
-         0.033644676
-           calls/sec (  time) ->    speed  covers
-           secs/call
- -

I have benchmarked the JSON-Generator as well. This generated a few more -values, because there are different modes that also influence the achieved -speed:

- -
Comparing times (call_time_mean):
- 1 GeneratorBenchmarkExt#generator_fast    1000 repeats:
-       547.354332608 (  real) ->   15.090x 
-         0.001826970
- 2 GeneratorBenchmarkExt#generator_safe    1000 repeats:
-       443.968212317 (  real) ->   12.240x 
-         0.002252414
- 3 GeneratorBenchmarkExt#generator_pretty  900 repeats:
-       375.104545883 (  real) ->   10.341x 
-         0.002665923
- 4 GeneratorBenchmarkPure#generator_fast   1000 repeats:
-        49.978706968 (  real) ->    1.378x 
-         0.020008521
- 5 GeneratorBenchmarkRails#generator       1000 repeats:
-        38.531868759 (  real) ->    1.062x 
-         0.025952543
- 6 GeneratorBenchmarkPure#generator_safe   1000 repeats:
-        36.927649925 (  real) ->    1.018x 7 (>=3859)
-         0.027079979
- 7 GeneratorBenchmarkPure#generator_pretty 1000 repeats:
-        36.272134441 (  real) ->    1.000x 6 (>=3859)
-         0.027569373
-           calls/sec (  time) ->    speed  covers
-           secs/call
- -

In the table above 1-3 are JSON::Ext::Generator methods. 4, 6, and 7 are JSON::Pure::Generator methods and 5 is -the Rails JSON generator. It is now a bit faster -than the generator_safe and generator_pretty methods of the pure variant -but slower than the others.

- -

To achieve the fastest JSON document output, you -can use the fast_generate method. Beware, that this will disable the -checking for circular Ruby data structures, which may cause JSON to go into an infinite loop.

- -

Here are the median comparisons for completeness’ sake:

- -
Comparing times (call_time_median):
- 1 GeneratorBenchmarkExt#generator_fast    1000 repeats:
-       708.258020939 (  real) ->   16.547x 
-         0.001411915
- 2 GeneratorBenchmarkExt#generator_safe    1000 repeats:
-       569.105020353 (  real) ->   13.296x 
-         0.001757145
- 3 GeneratorBenchmarkExt#generator_pretty  900 repeats:
-       482.825371244 (  real) ->   11.280x 
-         0.002071142
- 4 GeneratorBenchmarkPure#generator_fast   1000 repeats:
-        62.717626652 (  real) ->    1.465x 
-         0.015944481
- 5 GeneratorBenchmarkRails#generator       1000 repeats:
-        43.965681162 (  real) ->    1.027x 
-         0.022745013
- 6 GeneratorBenchmarkPure#generator_safe   1000 repeats:
-        43.929073409 (  real) ->    1.026x 7 (>=3859)
-         0.022763968
- 7 GeneratorBenchmarkPure#generator_pretty 1000 repeats:
-        42.802514491 (  real) ->    1.000x 6 (>=3859)
-         0.023363113
-           calls/sec (  time) ->    speed  covers
-           secs/call
- -

Author

- -

Florian Frank <flori@ping.de>

- -

License

- -

Ruby License, see the COPYING file included in the source distribution. The -Ruby License includes the GNU General Public License (GPL), Version 2, so -see the file GPL as well.

- -

Download

- -

The latest version of this library can be downloaded at

- - -

Online Documentation should be located at

- - -
- - - - -

Files

- - - -

Classes/Modules

- - -

Methods

- - -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - diff --git a/.gems/doc/json-1.8.1/rdoc/js/darkfish.js b/.gems/doc/json-1.8.1/rdoc/js/darkfish.js deleted file mode 100644 index 7a2f44c..0000000 --- a/.gems/doc/json-1.8.1/rdoc/js/darkfish.js +++ /dev/null @@ -1,118 +0,0 @@ -/** - * - * Darkfish Page Functions - * $Id: darkfish.js 53 2009-01-07 02:52:03Z deveiant $ - * - * Author: Michael Granger - * - */ - -/* Provide console simulation for firebug-less environments */ -if (!("console" in window) || !("firebug" in console)) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", - "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; - - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -}; - - -/** - * Unwrap the first element that matches the given @expr@ from the targets and return them. - */ -$.fn.unwrap = function( expr ) { - return this.each( function() { - $(this).parents( expr ).eq( 0 ).after( this ).remove(); - }); -}; - - -function showSource( e ) { - var target = e.target; - var codeSections = $(target). - parents('.method-detail'). - find('.method-source-code'); - - $(target). - parents('.method-detail'). - find('.method-source-code'). - slideToggle(); -}; - -function hookSourceViews() { - $('.method-description,.method-heading').click( showSource ); -}; - -function toggleDebuggingSection() { - $('.debugging-section').slideToggle(); -}; - -function hookDebuggingToggle() { - $('#debugging-toggle img').click( toggleDebuggingSection ); -}; - -function hookQuickSearch() { - $('.quicksearch-field').each( function() { - var searchElems = $(this).parents('.section').find( 'li' ); - var toggle = $(this).parents('.section').find('h3 .search-toggle'); - // console.debug( "Toggle is: %o", toggle ); - var qsbox = $(this).parents('form').get( 0 ); - - $(this).quicksearch( this, searchElems, { - noSearchResultsIndicator: 'no-class-search-results', - focusOnLoad: false - }); - $(toggle).click( function() { - // console.debug( "Toggling qsbox: %o", qsbox ); - $(qsbox).toggle(); - }); - }); -}; - -function highlightTarget( anchor ) { - console.debug( "Highlighting target '%s'.", anchor ); - - $("a[name]").each( function() { - if ( $(this).attr("name") == anchor ) { - if ( !$(this).parent().parent().hasClass('target-section') ) { - console.debug( "Wrapping the target-section" ); - $('div.method-detail').unwrap( 'div.target-section' ); - $(this).parent().wrap( '
' ); - } else { - console.debug( "Already wrapped." ); - } - } - }); -}; - -function highlightLocationTarget() { - console.debug( "Location hash: %s", window.location.hash ); - if ( ! window.location.hash || window.location.hash.length == 0 ) return; - - var anchor = window.location.hash.substring(1); - console.debug( "Found anchor: %s; matching %s", anchor, "a[name=" + anchor + "]" ); - - highlightTarget( anchor ); -}; - -function highlightClickTarget( event ) { - console.debug( "Highlighting click target for event %o", event.target ); - try { - var anchor = $(event.target).attr( 'href' ).substring(1); - console.debug( "Found target anchor: %s", anchor ); - highlightTarget( anchor ); - } catch ( err ) { - console.error( "Exception while highlighting: %o", err ); - }; -}; - - -$(document).ready( function() { - hookSourceViews(); - hookDebuggingToggle(); - hookQuickSearch(); - highlightLocationTarget(); - - $('ul.link-list a').bind( "click", highlightClickTarget ); -}); diff --git a/.gems/doc/json-1.8.1/rdoc/js/jquery.js b/.gems/doc/json-1.8.1/rdoc/js/jquery.js deleted file mode 100644 index afe9e74..0000000 --- a/.gems/doc/json-1.8.1/rdoc/js/jquery.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * jQuery 1.2.6 - New Wave Javascript - * - * Copyright (c) 2008 John Resig (jquery.com) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * $Date: 2008-09-25 09:50:52 -0700 (Thu, 25 Sep 2008) $ - * $Rev: 38 $ - */ -(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else -return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else -return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else -selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else -this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else -return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else -jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else -jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("",""]||!tags.indexOf("",""]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!tags.indexOf("",""]||(!tags.indexOf("",""]||!tags.indexOf("",""]||jQuery.browser.msie&&[1,"div
","
"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf(""&&tags.indexOf("=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else -ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&¬xml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&¬xml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&¬xml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else -while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return im[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else -for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("
").append(res.responseText.replace(//g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)xhr.open(type,s.url,s.async,s.username,s.password);else -xhr.open(type,s.url,s.async);try{if(s.data)xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else -jQuery.handleError(s,xhr,status);complete();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xhr,s]);}function complete(){if(s.complete)s.complete(xhr,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(filter)data=filter(data,type);if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else -for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else -s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return opt.complete.call(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else -e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;ithis.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done)this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})(); \ No newline at end of file diff --git a/.gems/doc/json-1.8.1/rdoc/js/quicksearch.js b/.gems/doc/json-1.8.1/rdoc/js/quicksearch.js deleted file mode 100644 index 70dbd33..0000000 --- a/.gems/doc/json-1.8.1/rdoc/js/quicksearch.js +++ /dev/null @@ -1,114 +0,0 @@ -/** - * - * JQuery QuickSearch - Hook up a form field to hide non-matching elements. - * $Id: quicksearch.js 53 2009-01-07 02:52:03Z deveiant $ - * - * Author: Michael Granger - * - */ -jQuery.fn.quicksearch = function( target, searchElems, options ) { - // console.debug( "Quicksearch fn" ); - - var settings = { - delay: 250, - clearButton: false, - highlightMatches: false, - focusOnLoad: false, - noSearchResultsIndicator: null - }; - if ( options ) $.extend( settings, options ); - - return jQuery(this).each( function() { - // console.debug( "Creating a new quicksearch on %o for %o", this, searchElems ); - new jQuery.quicksearch( this, searchElems, settings ); - }); -}; - - -jQuery.quicksearch = function( searchBox, searchElems, settings ) { - var timeout; - var boxdiv = $(searchBox).parents('div').eq(0); - - function init() { - setupKeyEventHandlers(); - focusOnLoad(); - }; - - function setupKeyEventHandlers() { - // console.debug( "Hooking up the 'keypress' event to %o", searchBox ); - $(searchBox). - unbind( 'keyup' ). - keyup( function(e) { return onSearchKey( e.keyCode ); }); - $(searchBox). - unbind( 'keypress' ). - keypress( function(e) { - switch( e.which ) { - // Execute the search on Enter, Tab, or Newline - case 9: - case 13: - case 10: - clearTimeout( timeout ); - e.preventDefault(); - doQuickSearch(); - break; - - // Allow backspace - case 8: - return true; - break; - - // Only allow valid search characters - default: - return validQSChar( e.charCode ); - } - }); - }; - - function focusOnLoad() { - if ( !settings.focusOnLoad ) return false; - $(searchBox).focus(); - }; - - function onSearchKey ( code ) { - clearTimeout( timeout ); - // console.debug( "...scheduling search." ); - timeout = setTimeout( doQuickSearch, settings.delay ); - }; - - function validQSChar( code ) { - var c = String.fromCharCode( code ); - return ( - (c == ':') || - (c >= 'a' && c <= 'z') || - (c >= 'A' && c <= 'Z') - ); - }; - - function doQuickSearch() { - var searchText = searchBox.value; - var pat = new RegExp( searchText, "im" ); - var shownCount = 0; - - if ( settings.noSearchResultsIndicator ) { - $('#' + settings.noSearchResultsIndicator).hide(); - } - - // All elements start out hidden - $(searchElems).each( function(index) { - var str = $(this).text(); - - if ( pat.test(str) ) { - shownCount += 1; - $(this).fadeIn(); - } else { - $(this).hide(); - } - }); - - if ( shownCount == 0 && settings.noSearchResultsIndicator ) { - $('#' + settings.noSearchResultsIndicator).slideDown(); - } - }; - - init(); -}; diff --git a/.gems/doc/json-1.8.1/rdoc/js/thickbox-compressed.js b/.gems/doc/json-1.8.1/rdoc/js/thickbox-compressed.js deleted file mode 100644 index 3a3fdae..0000000 --- a/.gems/doc/json-1.8.1/rdoc/js/thickbox-compressed.js +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Thickbox 3 - One Box To Rule Them All. - * By Cody Lindley (http://www.codylindley.com) - * Copyright (c) 2007 cody lindley - * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php -*/ - -var tb_pathToImage = "../images/loadingAnimation.gif"; - -eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$(o).2S(9(){1u(\'a.18, 3n.18, 3i.18\');1w=1p 1t();1w.L=2H});9 1u(b){$(b).s(9(){6 t=X.Q||X.1v||M;6 a=X.u||X.23;6 g=X.1N||P;19(t,a,g);X.2E();H P})}9 19(d,f,g){3m{3(2t o.v.J.2i==="2g"){$("v","11").r({A:"28%",z:"28%"});$("11").r("22","2Z");3(o.1Y("1F")===M){$("v").q("<4 5=\'B\'><4 5=\'8\'>");$("#B").s(G)}}n{3(o.1Y("B")===M){$("v").q("<4 5=\'B\'><4 5=\'8\'>");$("#B").s(G)}}3(1K()){$("#B").1J("2B")}n{$("#B").1J("2z")}3(d===M){d=""}$("v").q("<4 5=\'K\'><1I L=\'"+1w.L+"\' />");$(\'#K\').2y();6 h;3(f.O("?")!==-1){h=f.3l(0,f.O("?"))}n{h=f}6 i=/\\.2s$|\\.2q$|\\.2m$|\\.2l$|\\.2k$/;6 j=h.1C().2h(i);3(j==\'.2s\'||j==\'.2q\'||j==\'.2m\'||j==\'.2l\'||j==\'.2k\'){1D="";1G="";14="";1z="";1x="";R="";1n="";1r=P;3(g){E=$("a[@1N="+g+"]").36();25(D=0;((D&1d;&1d;2T &2R;"}n{1D=E[D].Q;1G=E[D].u;14="<1e 5=\'1U\'>&1d;&1d;&2O; 2N"}}n{1r=1b;1n="1t "+(D+1)+" 2L "+(E.1c)}}}S=1p 1t();S.1g=9(){S.1g=M;6 a=2x();6 x=a[0]-1M;6 y=a[1]-1M;6 b=S.z;6 c=S.A;3(b>x){c=c*(x/b);b=x;3(c>y){b=b*(y/c);c=y}}n 3(c>y){b=b*(y/c);c=y;3(b>x){c=c*(x/b);b=x}}13=b+30;1a=c+2G;$("#8").q("<1I 5=\'2F\' L=\'"+f+"\' z=\'"+b+"\' A=\'"+c+"\' 23=\'"+d+"\'/>"+"<4 5=\'2D\'>"+d+"<4 5=\'2C\'>"+1n+14+R+"<4 5=\'2A\'>1l 1k 1j 1s");$("#Z").s(G);3(!(14==="")){9 12(){3($(o).N("s",12)){$(o).N("s",12)}$("#8").C();$("v").q("<4 5=\'8\'>");19(1D,1G,g);H P}$("#1U").s(12)}3(!(R==="")){9 1i(){$("#8").C();$("v").q("<4 5=\'8\'>");19(1z,1x,g);H P}$("#1X").s(1i)}o.1h=9(e){3(e==M){I=2w.2v}n{I=e.2u}3(I==27){G()}n 3(I==3k){3(!(R=="")){o.1h="";1i()}}n 3(I==3j){3(!(14=="")){o.1h="";12()}}};16();$("#K").C();$("#1L").s(G);$("#8").r({Y:"T"})};S.L=f}n{6 l=f.2r(/^[^\\?]+\\??/,\'\');6 m=2p(l);13=(m[\'z\']*1)+30||3h;1a=(m[\'A\']*1)+3g||3f;W=13-30;V=1a-3e;3(f.O(\'2j\')!=-1){1E=f.1B(\'3d\');$("#15").C();3(m[\'1A\']!="1b"){$("#8").q("<4 5=\'2f\'><4 5=\'1H\'>"+d+"<4 5=\'2e\'>1l 1k 1j 1s ")}n{$("#B").N();$("#8").q(" ")}}n{3($("#8").r("Y")!="T"){3(m[\'1A\']!="1b"){$("#8").q("<4 5=\'2f\'><4 5=\'1H\'>"+d+"<4 5=\'2e\'>1l 1k 1j 1s<4 5=\'F\' J=\'z:"+W+"p;A:"+V+"p\'>")}n{$("#B").N();$("#8").q("<4 5=\'F\' 3c=\'3b\' J=\'z:"+W+"p;A:"+V+"p;\'>")}}n{$("#F")[0].J.z=W+"p";$("#F")[0].J.A=V+"p";$("#F")[0].3a=0;$("#1H").11(d)}}$("#Z").s(G);3(f.O(\'37\')!=-1){$("#F").q($(\'#\'+m[\'26\']).1T());$("#8").24(9(){$(\'#\'+m[\'26\']).q($("#F").1T())});16();$("#K").C();$("#8").r({Y:"T"})}n 3(f.O(\'2j\')!=-1){16();3($.1q.35){$("#K").C();$("#8").r({Y:"T"})}}n{$("#F").34(f+="&1y="+(1p 33().32()),9(){16();$("#K").C();1u("#F a.18");$("#8").r({Y:"T"})})}}3(!m[\'1A\']){o.21=9(e){3(e==M){I=2w.2v}n{I=e.2u}3(I==27){G()}}}}31(e){}}9 1m(){$("#K").C();$("#8").r({Y:"T"})}9 G(){$("#2Y").N("s");$("#Z").N("s");$("#8").2X("2W",9(){$(\'#8,#B,#1F\').2V("24").N().C()});$("#K").C();3(2t o.v.J.2i=="2g"){$("v","11").r({A:"1Z",z:"1Z"});$("11").r("22","")}o.1h="";o.21="";H P}9 16(){$("#8").r({2U:\'-\'+20((13/2),10)+\'p\',z:13+\'p\'});3(!(1V.1q.2Q&&1V.1q.2P<7)){$("#8").r({38:\'-\'+20((1a/2),10)+\'p\'})}}9 2p(a){6 b={};3(!a){H b}6 c=a.1B(/[;&]/);25(6 i=0;i - - - - - - - File: bigdecimal.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
  • json
  • - -
  • bigdecimal
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/lib/json/add/complex_rb.html b/.gems/doc/json-1.8.1/rdoc/lib/json/add/complex_rb.html deleted file mode 100644 index 8ee60f1..0000000 --- a/.gems/doc/json-1.8.1/rdoc/lib/json/add/complex_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: complex.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
  • json
  • - -
  • complex
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/lib/json/add/core_rb.html b/.gems/doc/json-1.8.1/rdoc/lib/json/add/core_rb.html deleted file mode 100644 index 03cb0df..0000000 --- a/.gems/doc/json-1.8.1/rdoc/lib/json/add/core_rb.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - File: core.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
  • json/add/date
  • - -
  • json/add/date_time
  • - -
  • json/add/exception
  • - -
  • json/add/range
  • - -
  • json/add/regexp
  • - -
  • json/add/struct
  • - -
  • json/add/symbol
  • - -
  • json/add/time
  • - -
-
- - - -
-
- -
- -
-

Description

- -

This file requires the implementations of ruby core’s custom objects for -serialisation/deserialisation.

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/lib/json/add/date_rb.html b/.gems/doc/json-1.8.1/rdoc/lib/json/add/date_rb.html deleted file mode 100644 index 79ac08f..0000000 --- a/.gems/doc/json-1.8.1/rdoc/lib/json/add/date_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: date.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
  • json
  • - -
  • date
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/lib/json/add/date_time_rb.html b/.gems/doc/json-1.8.1/rdoc/lib/json/add/date_time_rb.html deleted file mode 100644 index 73141bb..0000000 --- a/.gems/doc/json-1.8.1/rdoc/lib/json/add/date_time_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: date_time.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
  • json
  • - -
  • date
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/lib/json/add/exception_rb.html b/.gems/doc/json-1.8.1/rdoc/lib/json/add/exception_rb.html deleted file mode 100644 index 57a3159..0000000 --- a/.gems/doc/json-1.8.1/rdoc/lib/json/add/exception_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: exception.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
  • json
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/lib/json/add/ostruct_rb.html b/.gems/doc/json-1.8.1/rdoc/lib/json/add/ostruct_rb.html deleted file mode 100644 index 24274b6..0000000 --- a/.gems/doc/json-1.8.1/rdoc/lib/json/add/ostruct_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: ostruct.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
  • json
  • - -
  • ostruct
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/lib/json/add/range_rb.html b/.gems/doc/json-1.8.1/rdoc/lib/json/add/range_rb.html deleted file mode 100644 index 2e0d7d0..0000000 --- a/.gems/doc/json-1.8.1/rdoc/lib/json/add/range_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: range.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
  • json
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/lib/json/add/rational_rb.html b/.gems/doc/json-1.8.1/rdoc/lib/json/add/rational_rb.html deleted file mode 100644 index 8bafcdf..0000000 --- a/.gems/doc/json-1.8.1/rdoc/lib/json/add/rational_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: rational.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
  • json
  • - -
  • rational
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/lib/json/add/regexp_rb.html b/.gems/doc/json-1.8.1/rdoc/lib/json/add/regexp_rb.html deleted file mode 100644 index b62711c..0000000 --- a/.gems/doc/json-1.8.1/rdoc/lib/json/add/regexp_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: regexp.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
  • json
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/lib/json/add/struct_rb.html b/.gems/doc/json-1.8.1/rdoc/lib/json/add/struct_rb.html deleted file mode 100644 index a31843e..0000000 --- a/.gems/doc/json-1.8.1/rdoc/lib/json/add/struct_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: struct.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
  • json
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/lib/json/add/symbol_rb.html b/.gems/doc/json-1.8.1/rdoc/lib/json/add/symbol_rb.html deleted file mode 100644 index 8c39fe6..0000000 --- a/.gems/doc/json-1.8.1/rdoc/lib/json/add/symbol_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: symbol.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
  • json
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/lib/json/add/time_rb.html b/.gems/doc/json-1.8.1/rdoc/lib/json/add/time_rb.html deleted file mode 100644 index 5397697..0000000 --- a/.gems/doc/json-1.8.1/rdoc/lib/json/add/time_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: time.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
  • json
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/lib/json/common_rb.html b/.gems/doc/json-1.8.1/rdoc/lib/json/common_rb.html deleted file mode 100644 index 047c004..0000000 --- a/.gems/doc/json-1.8.1/rdoc/lib/json/common_rb.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - File: common.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
  • json/version
  • - -
  • json/generic_object
  • - -
  • iconv
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/lib/json/ext_rb.html b/.gems/doc/json-1.8.1/rdoc/lib/json/ext_rb.html deleted file mode 100644 index f1e52cb..0000000 --- a/.gems/doc/json-1.8.1/rdoc/lib/json/ext_rb.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - File: ext.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
  • simplecov
  • - -
  • json/common
  • - -
  • json/ext/parser
  • - -
  • json/ext/generator
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/lib/json/generic_object_rb.html b/.gems/doc/json-1.8.1/rdoc/lib/json/generic_object_rb.html deleted file mode 100644 index d80ddac..0000000 --- a/.gems/doc/json-1.8.1/rdoc/lib/json/generic_object_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: generic_object.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
  • ostruct
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/lib/json/pure/generator_rb.html b/.gems/doc/json-1.8.1/rdoc/lib/json/pure/generator_rb.html deleted file mode 100644 index 0ddc091..0000000 --- a/.gems/doc/json-1.8.1/rdoc/lib/json/pure/generator_rb.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - File: generator.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/lib/json/pure/parser_rb.html b/.gems/doc/json-1.8.1/rdoc/lib/json/pure/parser_rb.html deleted file mode 100644 index 6789c5e..0000000 --- a/.gems/doc/json-1.8.1/rdoc/lib/json/pure/parser_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: parser.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
  • strscan
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/lib/json/pure_rb.html b/.gems/doc/json-1.8.1/rdoc/lib/json/pure_rb.html deleted file mode 100644 index 697c454..0000000 --- a/.gems/doc/json-1.8.1/rdoc/lib/json/pure_rb.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - File: pure.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
  • simplecov
  • - -
  • json/common
  • - -
  • json/pure/parser
  • - -
  • json/pure/generator
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/lib/json/version_rb.html b/.gems/doc/json-1.8.1/rdoc/lib/json/version_rb.html deleted file mode 100644 index 3562b71..0000000 --- a/.gems/doc/json-1.8.1/rdoc/lib/json/version_rb.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - File: version.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/lib/json_rb.html b/.gems/doc/json-1.8.1/rdoc/lib/json_rb.html deleted file mode 100644 index 1b9d813..0000000 --- a/.gems/doc/json-1.8.1/rdoc/lib/json_rb.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - File: json.rb [json-1.8.1 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:26:40 +0200
- - -
Requires
-
-
    - -
  • json/common
  • - -
  • json/version
  • - -
  • json/ext
  • - -
  • json/pure
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/json-1.8.1/rdoc/rdoc.css b/.gems/doc/json-1.8.1/rdoc/rdoc.css deleted file mode 100644 index ea91421..0000000 --- a/.gems/doc/json-1.8.1/rdoc/rdoc.css +++ /dev/null @@ -1,763 +0,0 @@ -/* - * "Darkfish" Rdoc CSS - * $Id: rdoc.css 54 2009-01-27 01:09:48Z deveiant $ - * - * Author: Michael Granger - * - */ - -/* Base Green is: #6C8C22 */ - -*{ padding: 0; margin: 0; } - -body { - background: #efefef; - font: 14px "Helvetica Neue", Helvetica, Tahoma, sans-serif; -} -body.class, body.module, body.file { - margin-left: 40px; -} -body.file-popup { - font-size: 90%; - margin-left: 0; -} - -h1 { - font-size: 300%; - text-shadow: rgba(135,145,135,0.65) 2px 2px 3px; - color: #6C8C22; -} -h2,h3,h4 { margin-top: 1.5em; } - -:link, -:visited { - color: #6C8C22; - text-decoration: none; -} -:link:hover, -:visited:hover { - border-bottom: 1px dotted #6C8C22; -} - -pre { - background: #ddd; - padding: 0.5em 0; -} - - -/* @group Generic Classes */ - -.initially-hidden { - display: none; -} - -.quicksearch-field { - width: 98%; - background: #ddd; - border: 1px solid #aaa; - height: 1.5em; - -webkit-border-radius: 4px; -} -.quicksearch-field:focus { - background: #f1edba; -} - -.missing-docs { - font-size: 120%; - background: white url(images/wrench_orange.png) no-repeat 4px center; - color: #ccc; - line-height: 2em; - border: 1px solid #d00; - opacity: 1; - padding-left: 20px; - text-indent: 24px; - letter-spacing: 3px; - font-weight: bold; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; -} - -.target-section { - border: 2px solid #dcce90; - border-left-width: 8px; - padding: 0 1em; - background: #fff3c2; -} - -/* @end */ - - -/* @group Index Page, Standalone file pages */ -body.indexpage { - margin: 1em 3em; -} -body.indexpage p, -body.indexpage div, -body.file p { - margin: 1em 0; -} - -.indexpage .rdoc-list p, .file .rdoc-list p { - margin: 0em 0; -} - -.indexpage ol, -.file #documentation ol { - line-height: 160%; -} - -.indexpage ul, -.file #documentation ul { - line-height: 160%; - list-style: none; -} -.indexpage ul :link, -.indexpage ul :visited { - font-size: 16px; -} - -.indexpage li, -.file #documentation li { - padding-left: 20px; -} - -.indexpage ol, -.file #documentation ol { - margin-left: 20px; -} - -.indexpage ol > li, -.file #documentation ol > li { - padding-left: 0; -} - -.indexpage ul > li, -.file #documentation ul > li { - background: url(images/bullet_black.png) no-repeat left 4px; -} -.indexpage li.module { - background: url(images/package.png) no-repeat left 4px; -} -.indexpage li.class { - background: url(images/ruby.png) no-repeat left 4px; -} -.indexpage li.file { - background: url(images/page_white_text.png) no-repeat left 4px; -} -.file li p, -.indexpage li p { - margin: 0 0; -} - -/* @end */ - -/* @group Top-Level Structure */ - -.class #metadata, -.file #metadata, -.module #metadata { - float: left; - width: 260px; -} - -.class #documentation, -.file #documentation, -.module #documentation { - margin: 2em 1em 5em 300px; - min-width: 340px; -} - -.file #metadata { - margin: 0.8em; -} - -#validator-badges { - clear: both; - margin: 1em 1em 2em; -} - -/* @end */ - -/* @group Metadata Section */ -#metadata .section { - background-color: #dedede; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border: 1px solid #aaa; - margin: 0 8px 16px; - font-size: 90%; - overflow: hidden; -} -#metadata h3.section-header { - margin: 0; - padding: 2px 8px; - background: #ccc; - color: #666; - -moz-border-radius-topleft: 4px; - -moz-border-radius-topright: 4px; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - border-bottom: 1px solid #aaa; -} -#metadata #home-section h3.section-header { - border-bottom: 0; -} - -#metadata ul, -#metadata dl, -#metadata p { - padding: 8px; - list-style: none; -} - -#file-metadata ul { - padding-left: 28px; - list-style-image: url(images/page_green.png); -} - -dl.svninfo { - color: #666; - margin: 0; -} -dl.svninfo dt { - font-weight: bold; -} - -ul.link-list li { - white-space: nowrap; -} -ul.link-list .type { - font-size: 8px; - text-transform: uppercase; - color: white; - background: #969696; - padding: 2px 4px; - -webkit-border-radius: 5px; -} - -/* @end */ - - -/* @group Project Metadata Section */ -#project-metadata { - margin-top: 3em; -} - -.file #project-metadata { - margin-top: 0em; -} - -#project-metadata .section { - border: 1px solid #aaa; -} -#project-metadata h3.section-header { - border-bottom: 1px solid #aaa; - position: relative; -} -#project-metadata h3.section-header .search-toggle { - position: absolute; - right: 5px; -} - - -#project-metadata form { - color: #777; - background: #ccc; - padding: 8px 8px 16px; - border-bottom: 1px solid #bbb; -} -#project-metadata fieldset { - border: 0; -} - -#no-class-search-results { - margin: 0 auto 1em; - text-align: center; - font-size: 14px; - font-weight: bold; - color: #aaa; -} - -/* @end */ - - -/* @group Documentation Section */ -.description { - font-size: 100%; - color: #333; -} - -.description p { - margin: 1em 0.4em; -} - -.description li p { - margin: 0; -} - -.description ul { - margin-left: 1.5em; -} -.description ul li { - line-height: 1.4em; -} - -.description dl, -#documentation dl { - margin: 8px 1.5em; - border: 1px solid #ccc; -} -.description dl { - font-size: 14px; -} - -.description dt, -#documentation dt { - padding: 2px 4px; - font-weight: bold; - background: #ddd; -} -.description dd, -#documentation dd { - padding: 2px 12px; -} -.description dd + dt, -#documentation dd + dt { - margin-top: 0.7em; -} - -#documentation .section { - font-size: 90%; -} - -#documentation h2.section-header { - margin-top: 2em; - padding: 0.75em 0.5em; - background: #ccc; - color: #333; - font-size: 175%; - border: 1px solid #bbb; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; -} - -#documentation h3.section-header { - margin-top: 2em; - padding: 0.25em 0.5em; - background-color: #dedede; - color: #333; - font-size: 150%; - border: 1px solid #bbb; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; -} - -#constants-list > dl, -#attributes-list > dl { - margin: 1em 0 2em; - border: 0; -} -#constants-list > dl dt, -#attributes-list > dl dt { - padding-left: 0; - font-weight: bold; - font-family: Monaco, "Andale Mono"; - background: inherit; -} -#constants-list > dl dt a, -#attributes-list > dl dt a { - color: inherit; -} -#constants-list > dl dd, -#attributes-list > dl dd { - margin: 0 0 1em 0; - padding: 0; - color: #666; -} - -.documentation-section h2 { - position: relative; -} - -.documentation-section h2 a { - position: absolute; - top: 8px; - right: 10px; - font-size: 12px; - color: #9b9877; - visibility: hidden; -} - -.documentation-section h2:hover a { - visibility: visible; -} - -/* @group Method Details */ - -#documentation .method-source-code { - display: none; -} - -#documentation .method-detail { - margin: 0.5em 0; - padding: 0.5em 0; - cursor: pointer; -} -#documentation .method-detail:hover { - background-color: #f1edba; -} -#documentation .method-heading { - position: relative; - padding: 2px 4px 0 20px; - font-size: 125%; - font-weight: bold; - color: #333; - background: url(images/brick.png) no-repeat left bottom; -} -#documentation .method-heading :link, -#documentation .method-heading :visited { - color: inherit; -} -#documentation .method-click-advice { - position: absolute; - top: 2px; - right: 5px; - font-size: 10px; - color: #9b9877; - visibility: hidden; - padding-right: 20px; - line-height: 20px; - background: url(images/zoom.png) no-repeat right top; -} -#documentation .method-detail:hover .method-click-advice { - visibility: visible; -} - -#documentation .method-alias .method-heading { - color: #666; - background: url(images/brick_link.png) no-repeat left bottom; -} - -#documentation .method-description, -#documentation .aliases { - margin: 0 20px; - color: #666; -} - -#documentation .method-description p, -#documentation .aliases p { - line-height: 1.2em; -} - -#documentation .aliases { - padding-top: 4px; - font-style: italic; - cursor: default; -} -#documentation .method-description p { - padding: 0; -} -#documentation .method-description p + p { - margin-bottom: 0.5em; -} -#documentation .method-description ul { - margin-left: 1.5em; -} - -#documentation .attribute-method-heading { - background: url(images/tag_green.png) no-repeat left bottom; -} -#documentation #attribute-method-details .method-detail:hover { - background-color: transparent; - cursor: default; -} -#documentation .attribute-access-type { - font-size: 60%; - text-transform: uppercase; - vertical-align: super; - padding: 0 2px; -} -/* @end */ - -/* @end */ - - - -/* @group Source Code */ - -div.method-source-code { - background: #262626; - color: #efefef; - margin: 1em; - padding: 0.5em; - border: 1px dashed #999; - overflow: hidden; -} - -div.method-source-code pre { - background: inherit; - padding: 0; - color: white; - overflow: auto; -} - -/* @group Ruby keyword styles */ - -.ruby-constant { color: #7fffd4; background: transparent; } -.ruby-keyword { color: #00ffff; background: transparent; } -.ruby-ivar { color: #eedd82; background: transparent; } -.ruby-operator { color: #00ffee; background: transparent; } -.ruby-identifier { color: #ffdead; background: transparent; } -.ruby-node { color: #ffa07a; background: transparent; } -.ruby-comment { color: #b22222; font-weight: bold; background: transparent; } -.ruby-regexp { color: #ffa07a; background: transparent; } -.ruby-value { color: #7fffd4; background: transparent; } - -/* @end */ -/* @end */ - - -/* @group File Popup Contents */ - -.file #metadata, -.file-popup #metadata { -} - -.file-popup dl { - font-size: 80%; - padding: 0.75em; - background-color: #dedede; - color: #333; - border: 1px solid #bbb; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; -} -.file dt { - font-weight: bold; - padding-left: 22px; - line-height: 20px; - background: url(images/page_white_width.png) no-repeat left top; -} -.file dt.modified-date { - background: url(images/date.png) no-repeat left top; -} -.file dt.requires { - background: url(images/plugin.png) no-repeat left top; -} -.file dt.scs-url { - background: url(images/wrench.png) no-repeat left top; -} - -.file dl dd { - margin: 0 0 1em 0; -} -.file #metadata dl dd ul { - list-style: circle; - margin-left: 20px; - padding-top: 0; -} -.file #metadata dl dd ul li { -} - - -.file h2 { - margin-top: 2em; - padding: 0.75em 0.5em; - background-color: #dedede; - color: #333; - font-size: 120%; - border: 1px solid #bbb; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; -} - -/* @end */ - - - - -/* @group ThickBox Styles */ -#TB_window { - font: 12px Arial, Helvetica, sans-serif; - color: #333333; -} - -#TB_secondLine { - font: 10px Arial, Helvetica, sans-serif; - color:#666666; -} - -#TB_window :link, -#TB_window :visited { color: #666666; } -#TB_window :link:hover, -#TB_window :visited:hover { color: #000; } -#TB_window :link:active, -#TB_window :visited:active { color: #666666; } -#TB_window :link:focus, -#TB_window :visited:focus { color: #666666; } - -#TB_overlay { - position: fixed; - z-index:100; - top: 0px; - left: 0px; - height:100%; - width:100%; -} - -.TB_overlayMacFFBGHack {background: url(images/macFFBgHack.png) repeat;} -.TB_overlayBG { - background-color:#000; - filter:alpha(opacity=75); - -moz-opacity: 0.75; - opacity: 0.75; -} - -* html #TB_overlay { /* ie6 hack */ - position: absolute; - height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); -} - -#TB_window { - position: fixed; - background: #ffffff; - z-index: 102; - color:#000000; - display:none; - border: 4px solid #525252; - text-align:left; - top:50%; - left:50%; -} - -* html #TB_window { /* ie6 hack */ - position: absolute; - margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); -} - -#TB_window img#TB_Image { - display:block; - margin: 15px 0 0 15px; - border-right: 1px solid #ccc; - border-bottom: 1px solid #ccc; - border-top: 1px solid #666; - border-left: 1px solid #666; -} - -#TB_caption{ - height:25px; - padding:7px 30px 10px 25px; - float:left; -} - -#TB_closeWindow{ - height:25px; - padding:11px 25px 10px 0; - float:right; -} - -#TB_closeAjaxWindow{ - padding:7px 10px 5px 0; - margin-bottom:1px; - text-align:right; - float:right; -} - -#TB_ajaxWindowTitle{ - float:left; - padding:7px 0 5px 10px; - margin-bottom:1px; - font-size: 22px; -} - -#TB_title{ - background-color: #6C8C22; - color: #dedede; - height:40px; -} -#TB_title :link, -#TB_title :visited { - color: white !important; - border-bottom: 1px dotted #dedede; -} - -#TB_ajaxContent{ - clear:both; - padding:2px 15px 15px 15px; - overflow:auto; - text-align:left; - line-height:1.4em; -} - -#TB_ajaxContent.TB_modal{ - padding:15px; -} - -#TB_ajaxContent p{ - padding:5px 0px 5px 0px; -} - -#TB_load{ - position: fixed; - display:none; - height:13px; - width:208px; - z-index:103; - top: 50%; - left: 50%; - margin: -6px 0 0 -104px; /* -height/2 0 0 -width/2 */ -} - -* html #TB_load { /* ie6 hack */ - position: absolute; - margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); -} - -#TB_HideSelect{ - z-index:99; - position:fixed; - top: 0; - left: 0; - background-color:#fff; - border:none; - filter:alpha(opacity=0); - -moz-opacity: 0; - opacity: 0; - height:100%; - width:100%; -} - -* html #TB_HideSelect { /* ie6 hack */ - position: absolute; - height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); -} - -#TB_iframeContent{ - clear:both; - border:none; - margin-bottom:-1px; - margin-top:1px; - _margin-bottom:1px; -} - -/* @end */ - -/* @group Debugging Section */ - -#debugging-toggle { - text-align: center; -} -#debugging-toggle img { - cursor: pointer; -} - -#rdoc-debugging-section-dump { - display: none; - margin: 0 2em 2em; - background: #ccc; - border: 1px solid #999; -} - - - -/* @end */ diff --git a/.gems/doc/json-1.8.1/ri/BigDecimal/as_json-i.ri b/.gems/doc/json-1.8.1/ri/BigDecimal/as_json-i.ri deleted file mode 100644 index 21e3ee1..0000000 Binary files a/.gems/doc/json-1.8.1/ri/BigDecimal/as_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/BigDecimal/cdesc-BigDecimal.ri b/.gems/doc/json-1.8.1/ri/BigDecimal/cdesc-BigDecimal.ri deleted file mode 100644 index dffcdeb..0000000 Binary files a/.gems/doc/json-1.8.1/ri/BigDecimal/cdesc-BigDecimal.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/BigDecimal/json_create-c.ri b/.gems/doc/json-1.8.1/ri/BigDecimal/json_create-c.ri deleted file mode 100644 index 204dbf4..0000000 Binary files a/.gems/doc/json-1.8.1/ri/BigDecimal/json_create-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/BigDecimal/to_json-i.ri b/.gems/doc/json-1.8.1/ri/BigDecimal/to_json-i.ri deleted file mode 100644 index 7f04615..0000000 Binary files a/.gems/doc/json-1.8.1/ri/BigDecimal/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Class/cdesc-Class.ri b/.gems/doc/json-1.8.1/ri/Class/cdesc-Class.ri deleted file mode 100644 index 089f98b..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Class/cdesc-Class.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Class/json_creatable%3f-i.ri b/.gems/doc/json-1.8.1/ri/Class/json_creatable%3f-i.ri deleted file mode 100644 index 71197c7..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Class/json_creatable%3f-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Complex/as_json-i.ri b/.gems/doc/json-1.8.1/ri/Complex/as_json-i.ri deleted file mode 100644 index 97eedea..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Complex/as_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Complex/cdesc-Complex.ri b/.gems/doc/json-1.8.1/ri/Complex/cdesc-Complex.ri deleted file mode 100644 index eeba635..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Complex/cdesc-Complex.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Complex/json_create-c.ri b/.gems/doc/json-1.8.1/ri/Complex/json_create-c.ri deleted file mode 100644 index aeae186..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Complex/json_create-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Complex/to_json-i.ri b/.gems/doc/json-1.8.1/ri/Complex/to_json-i.ri deleted file mode 100644 index 082ac0d..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Complex/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Date/as_json-i.ri b/.gems/doc/json-1.8.1/ri/Date/as_json-i.ri deleted file mode 100644 index 3811209..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Date/as_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Date/cdesc-Date.ri b/.gems/doc/json-1.8.1/ri/Date/cdesc-Date.ri deleted file mode 100644 index 9e54d1a..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Date/cdesc-Date.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Date/json_create-c.ri b/.gems/doc/json-1.8.1/ri/Date/json_create-c.ri deleted file mode 100644 index 9b9c7aa..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Date/json_create-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Date/to_json-i.ri b/.gems/doc/json-1.8.1/ri/Date/to_json-i.ri deleted file mode 100644 index 5d352e8..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Date/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/DateTime/as_json-i.ri b/.gems/doc/json-1.8.1/ri/DateTime/as_json-i.ri deleted file mode 100644 index a7eff28..0000000 Binary files a/.gems/doc/json-1.8.1/ri/DateTime/as_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/DateTime/cdesc-DateTime.ri b/.gems/doc/json-1.8.1/ri/DateTime/cdesc-DateTime.ri deleted file mode 100644 index ff16dfa..0000000 Binary files a/.gems/doc/json-1.8.1/ri/DateTime/cdesc-DateTime.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/DateTime/json_create-c.ri b/.gems/doc/json-1.8.1/ri/DateTime/json_create-c.ri deleted file mode 100644 index b9c34be..0000000 Binary files a/.gems/doc/json-1.8.1/ri/DateTime/json_create-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/DateTime/to_json-i.ri b/.gems/doc/json-1.8.1/ri/DateTime/to_json-i.ri deleted file mode 100644 index 1d2743a..0000000 Binary files a/.gems/doc/json-1.8.1/ri/DateTime/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Exception/as_json-i.ri b/.gems/doc/json-1.8.1/ri/Exception/as_json-i.ri deleted file mode 100644 index eaa211b..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Exception/as_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Exception/cdesc-Exception.ri b/.gems/doc/json-1.8.1/ri/Exception/cdesc-Exception.ri deleted file mode 100644 index f649ef0..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Exception/cdesc-Exception.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Exception/json_create-c.ri b/.gems/doc/json-1.8.1/ri/Exception/json_create-c.ri deleted file mode 100644 index 2498fec..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Exception/json_create-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Exception/to_json-i.ri b/.gems/doc/json-1.8.1/ri/Exception/to_json-i.ri deleted file mode 100644 index 7c2f24e..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Exception/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/%5b%5d-c.ri b/.gems/doc/json-1.8.1/ri/JSON/%5b%5d-c.ri deleted file mode 100644 index d5f9609..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/%5b%5d-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/CircularDatastructure/cdesc-CircularDatastructure.ri b/.gems/doc/json-1.8.1/ri/JSON/CircularDatastructure/cdesc-CircularDatastructure.ri deleted file mode 100644 index 0dca3d2..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/CircularDatastructure/cdesc-CircularDatastructure.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Ext/cdesc-Ext.ri b/.gems/doc/json-1.8.1/ri/JSON/Ext/cdesc-Ext.ri deleted file mode 100644 index f86ed4c..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Ext/cdesc-Ext.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/GeneratorError/cdesc-GeneratorError.ri b/.gems/doc/json-1.8.1/ri/JSON/GeneratorError/cdesc-GeneratorError.ri deleted file mode 100644 index 2ffd122..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/GeneratorError/cdesc-GeneratorError.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/%5b%5d%3d-i.ri b/.gems/doc/json-1.8.1/ri/JSON/GenericObject/%5b%5d%3d-i.ri deleted file mode 100644 index 0325fbc..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/%5b%5d%3d-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/%5b%5d-i.ri b/.gems/doc/json-1.8.1/ri/JSON/GenericObject/%5b%5d-i.ri deleted file mode 100644 index 787a71a..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/%5b%5d-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/%7c-i.ri b/.gems/doc/json-1.8.1/ri/JSON/GenericObject/%7c-i.ri deleted file mode 100644 index e3e7730..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/%7c-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/as_json-i.ri b/.gems/doc/json-1.8.1/ri/JSON/GenericObject/as_json-i.ri deleted file mode 100644 index 3274353..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/as_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/cdesc-GenericObject.ri b/.gems/doc/json-1.8.1/ri/JSON/GenericObject/cdesc-GenericObject.ri deleted file mode 100644 index 5af3fa7..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/cdesc-GenericObject.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/dump-c.ri b/.gems/doc/json-1.8.1/ri/JSON/GenericObject/dump-c.ri deleted file mode 100644 index 1e2f57b..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/dump-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/from_hash-c.ri b/.gems/doc/json-1.8.1/ri/JSON/GenericObject/from_hash-c.ri deleted file mode 100644 index e6056a3..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/from_hash-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/json_creatable%3f-c.ri b/.gems/doc/json-1.8.1/ri/JSON/GenericObject/json_creatable%3f-c.ri deleted file mode 100644 index feda920..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/json_creatable%3f-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/json_creatable-c.ri b/.gems/doc/json-1.8.1/ri/JSON/GenericObject/json_creatable-c.ri deleted file mode 100644 index 47934c0..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/json_creatable-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/json_create-c.ri b/.gems/doc/json-1.8.1/ri/JSON/GenericObject/json_create-c.ri deleted file mode 100644 index ebd4662..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/json_create-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/load-c.ri b/.gems/doc/json-1.8.1/ri/JSON/GenericObject/load-c.ri deleted file mode 100644 index b47e46d..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/load-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/to_hash-i.ri b/.gems/doc/json-1.8.1/ri/JSON/GenericObject/to_hash-i.ri deleted file mode 100644 index 840c332..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/to_hash-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/to_json-i.ri b/.gems/doc/json-1.8.1/ri/JSON/GenericObject/to_json-i.ri deleted file mode 100644 index 4e7265c..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/GenericObject/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/JSONError/cdesc-JSONError.ri b/.gems/doc/json-1.8.1/ri/JSON/JSONError/cdesc-JSONError.ri deleted file mode 100644 index 2541c9f..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/JSONError/cdesc-JSONError.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/JSONError/wrap-c.ri b/.gems/doc/json-1.8.1/ri/JSON/JSONError/wrap-c.ri deleted file mode 100644 index a0c42f3..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/JSONError/wrap-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/MissingUnicodeSupport/cdesc-MissingUnicodeSupport.ri b/.gems/doc/json-1.8.1/ri/JSON/MissingUnicodeSupport/cdesc-MissingUnicodeSupport.ri deleted file mode 100644 index 8120c48..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/MissingUnicodeSupport/cdesc-MissingUnicodeSupport.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/NestingError/cdesc-NestingError.ri b/.gems/doc/json-1.8.1/ri/JSON/NestingError/cdesc-NestingError.ri deleted file mode 100644 index 60ba051..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/NestingError/cdesc-NestingError.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/ParserError/cdesc-ParserError.ri b/.gems/doc/json-1.8.1/ri/JSON/ParserError/cdesc-ParserError.ri deleted file mode 100644 index e0e7d4f..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/ParserError/cdesc-ParserError.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Array/cdesc-Array.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Array/cdesc-Array.ri deleted file mode 100644 index 15f7f04..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Array/cdesc-Array.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Array/to_json-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Array/to_json-i.ri deleted file mode 100644 index 24437d1..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Array/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/FalseClass/cdesc-FalseClass.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/FalseClass/cdesc-FalseClass.ri deleted file mode 100644 index 55eec06..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/FalseClass/cdesc-FalseClass.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/FalseClass/to_json-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/FalseClass/to_json-i.ri deleted file mode 100644 index 6e558f7..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/FalseClass/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Float/cdesc-Float.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Float/cdesc-Float.ri deleted file mode 100644 index 3de33ad..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Float/cdesc-Float.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Float/to_json-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Float/to_json-i.ri deleted file mode 100644 index 7113b63..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Float/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Hash/cdesc-Hash.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Hash/cdesc-Hash.ri deleted file mode 100644 index ff9c0f5..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Hash/cdesc-Hash.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Hash/to_json-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Hash/to_json-i.ri deleted file mode 100644 index bc10f44..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Hash/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Integer/cdesc-Integer.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Integer/cdesc-Integer.ri deleted file mode 100644 index 4acb55a..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Integer/cdesc-Integer.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Integer/to_json-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Integer/to_json-i.ri deleted file mode 100644 index 0e70a6a..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Integer/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/NilClass/cdesc-NilClass.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/NilClass/cdesc-NilClass.ri deleted file mode 100644 index 66ac34e..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/NilClass/cdesc-NilClass.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/NilClass/to_json-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/NilClass/to_json-i.ri deleted file mode 100644 index 7fe8c52..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/NilClass/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Object/cdesc-Object.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Object/cdesc-Object.ri deleted file mode 100644 index 3347d33..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Object/cdesc-Object.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Object/to_json-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Object/to_json-i.ri deleted file mode 100644 index a4ef688..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/Object/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/Extend/cdesc-Extend.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/Extend/cdesc-Extend.ri deleted file mode 100644 index 779a603..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/Extend/cdesc-Extend.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/Extend/json_create-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/Extend/json_create-i.ri deleted file mode 100644 index f4753df..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/Extend/json_create-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/cdesc-String.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/cdesc-String.ri deleted file mode 100644 index ca671aa..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/cdesc-String.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/included-c.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/included-c.ri deleted file mode 100644 index 7e7da35..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/included-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/to_json-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/to_json-i.ri deleted file mode 100644 index 02b5418..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/to_json_raw-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/to_json_raw-i.ri deleted file mode 100644 index 948b560..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/to_json_raw-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/to_json_raw_object-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/to_json_raw_object-i.ri deleted file mode 100644 index 4926f5d..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/String/to_json_raw_object-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/TrueClass/cdesc-TrueClass.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/TrueClass/cdesc-TrueClass.ri deleted file mode 100644 index b808041..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/TrueClass/cdesc-TrueClass.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/TrueClass/to_json-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/TrueClass/to_json-i.ri deleted file mode 100644 index baa097d..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/TrueClass/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/cdesc-GeneratorMethods.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/cdesc-GeneratorMethods.ri deleted file mode 100644 index 523ec40..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/GeneratorMethods/cdesc-GeneratorMethods.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/%5b%5d%3d-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/%5b%5d%3d-i.ri deleted file mode 100644 index f08daa0..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/%5b%5d%3d-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/%5b%5d-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/%5b%5d-i.ri deleted file mode 100644 index cbe5046..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/%5b%5d-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/allow_nan%3f-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/allow_nan%3f-i.ri deleted file mode 100644 index ec04c5e..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/allow_nan%3f-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/array_nl-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/array_nl-i.ri deleted file mode 100644 index c3c46cf..0000000 --- a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/array_nl-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[ iI" array_nl:EFI"*JSON::Pure::Generator::State#array_nl;FI"RW;F: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EThis string is put at the end of a line that holds a JSON array.;T: -@file0FI"lib/json/pure/generator.rb;T \ No newline at end of file diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/ascii_only%3f-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/ascii_only%3f-i.ri deleted file mode 100644 index ddf9c0a..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/ascii_only%3f-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/cdesc-State.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/cdesc-State.ri deleted file mode 100644 index d151006..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/cdesc-State.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/check_circular%3f-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/check_circular%3f-i.ri deleted file mode 100644 index cdd447d..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/check_circular%3f-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/configure-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/configure-i.ri deleted file mode 100644 index 1436aa5..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/configure-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/depth-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/depth-i.ri deleted file mode 100644 index e013c03..0000000 --- a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/depth-i.ri +++ /dev/null @@ -1,3 +0,0 @@ -U:RDoc::Attr[ iI" -depth:EFI"'JSON::Pure::Generator::State#depth;FI"RW;F: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IThis integer returns the current depth data structure nesting in the;TI"generated JSON.;T: -@file0FI"lib/json/pure/generator.rb;T \ No newline at end of file diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/from_state-c.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/from_state-c.ri deleted file mode 100644 index feab4ae..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/from_state-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/generate-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/generate-i.ri deleted file mode 100644 index 4f15058..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/generate-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/indent-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/indent-i.ri deleted file mode 100644 index e92f9af..0000000 --- a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/indent-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[ iI" indent:EFI"(JSON::Pure::Generator::State#indent;FI"RW;F: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";This string is used to indent levels in the JSON text.;T: -@file0FI"lib/json/pure/generator.rb;T \ No newline at end of file diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/max_nesting-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/max_nesting-i.ri deleted file mode 100644 index cb590e2..0000000 --- a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/max_nesting-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[ iI"max_nesting:EFI"-JSON::Pure::Generator::State#max_nesting;FI"RW;F: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HThis integer returns the maximum level of data structure nesting in;TI"Bthe generated JSON, max_nesting = 0 if no maximum is checked.;T: -@file0FI"lib/json/pure/generator.rb;T \ No newline at end of file diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/merge-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/merge-i.ri deleted file mode 100644 index d8d06f3..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/merge-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/new-c.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/new-c.ri deleted file mode 100644 index 4298b3d..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/new-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/object_nl-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/object_nl-i.ri deleted file mode 100644 index 22fcbe1..0000000 --- a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/object_nl-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[ iI"object_nl:EFI"+JSON::Pure::Generator::State#object_nl;FI"RW;F: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IThis string is put at the end of a line that holds a JSON object (or;TI" Hash).;T: -@file0FI"lib/json/pure/generator.rb;T \ No newline at end of file diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/quirks_mode%3f-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/quirks_mode%3f-i.ri deleted file mode 100644 index f42db1d..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/quirks_mode%3f-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/quirks_mode-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/quirks_mode-i.ri deleted file mode 100644 index ecbfd66..0000000 --- a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/quirks_mode-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[ iI"quirks_mode:EFI"-JSON::Pure::Generator::State#quirks_mode;FI"RW;F: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HIf this attribute is set to true, quirks mode is enabled, otherwise;TI"it's disabled.;T: -@file0FI"lib/json/pure/generator.rb;T \ No newline at end of file diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/space-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/space-i.ri deleted file mode 100644 index 201e629..0000000 --- a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/space-i.ri +++ /dev/null @@ -1,3 +0,0 @@ -U:RDoc::Attr[ iI" -space:EFI"'JSON::Pure::Generator::State#space;FI"RW;F: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GThis string is used to insert a space between the tokens in a JSON;TI" string.;T: -@file0FI"lib/json/pure/generator.rb;T \ No newline at end of file diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/space_before-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/space_before-i.ri deleted file mode 100644 index 62324d9..0000000 --- a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/space_before-i.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[ iI"space_before:EFI".JSON::Pure::Generator::State#space_before;FI"RW;F: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JThis string is used to insert a space before the ':' in JSON objects.;T: -@file0FI"lib/json/pure/generator.rb;T \ No newline at end of file diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/to_h-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/to_h-i.ri deleted file mode 100644 index b5b68e6..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/to_h-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/to_hash-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/to_hash-i.ri deleted file mode 100644 index 511320b..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/State/to_hash-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/cdesc-Generator.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/cdesc-Generator.ri deleted file mode 100644 index 8cf7d90..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Generator/cdesc-Generator.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Parser/cdesc-Parser.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Parser/cdesc-Parser.ri deleted file mode 100644 index daa7749..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Parser/cdesc-Parser.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Parser/new-c.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Parser/new-c.ri deleted file mode 100644 index 5fcd649..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Parser/new-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Parser/parse-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Parser/parse-i.ri deleted file mode 100644 index a18d369..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Parser/parse-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Parser/quirks_mode%3f-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Parser/quirks_mode%3f-i.ri deleted file mode 100644 index 04eefab..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Parser/quirks_mode%3f-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/Parser/reset-i.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/Parser/reset-i.ri deleted file mode 100644 index 2e1ff30..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/Parser/reset-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/Pure/cdesc-Pure.ri b/.gems/doc/json-1.8.1/ri/JSON/Pure/cdesc-Pure.ri deleted file mode 100644 index a8b6b52..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/Pure/cdesc-Pure.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/UnparserError/cdesc-UnparserError.ri b/.gems/doc/json-1.8.1/ri/JSON/UnparserError/cdesc-UnparserError.ri deleted file mode 100644 index 54f21cc..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/UnparserError/cdesc-UnparserError.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/cdesc-JSON.ri b/.gems/doc/json-1.8.1/ri/JSON/cdesc-JSON.ri deleted file mode 100644 index 1090da1..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/cdesc-JSON.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/const_defined_in%3f-c.ri b/.gems/doc/json-1.8.1/ri/JSON/const_defined_in%3f-c.ri deleted file mode 100644 index 1126326..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/const_defined_in%3f-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/create_id-c.ri b/.gems/doc/json-1.8.1/ri/JSON/create_id-c.ri deleted file mode 100644 index 893f1ee..0000000 --- a/.gems/doc/json-1.8.1/ri/JSON/create_id-c.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[ iI"create_id:EFI"JSON::create_id;FI"RW;F: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LThis is create identifier, which is used to decide if the _json_create_;TI"Chook of a class should be called. It defaults to 'json_class'.;T: -@file0TI"lib/json/common.rb;T \ No newline at end of file diff --git a/.gems/doc/json-1.8.1/ri/JSON/dump-i.ri b/.gems/doc/json-1.8.1/ri/JSON/dump-i.ri deleted file mode 100644 index 1819de6..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/dump-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/dump_default_options-c.ri b/.gems/doc/json-1.8.1/ri/JSON/dump_default_options-c.ri deleted file mode 100644 index 995c699..0000000 --- a/.gems/doc/json-1.8.1/ri/JSON/dump_default_options-c.ri +++ /dev/null @@ -1,4 +0,0 @@ -U:RDoc::Attr[ iI"dump_default_options:EFI"JSON::dump_default_options;FI"RW;F: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9The global default options for the JSON.dump method:;To:RDoc::Markup::Verbatim; [I":max_nesting: false -;FI":allow_nan: true -;FI":quirks_mode: true;F: -@file0TI"lib/json/common.rb;T \ No newline at end of file diff --git a/.gems/doc/json-1.8.1/ri/JSON/fast_generate-i.ri b/.gems/doc/json-1.8.1/ri/JSON/fast_generate-i.ri deleted file mode 100644 index eb6101c..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/fast_generate-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/generate-i.ri b/.gems/doc/json-1.8.1/ri/JSON/generate-i.ri deleted file mode 100644 index 0d37eaf..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/generate-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/generator-c.ri b/.gems/doc/json-1.8.1/ri/JSON/generator-c.ri deleted file mode 100644 index e276188..0000000 --- a/.gems/doc/json-1.8.1/ri/JSON/generator-c.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[ iI"generator:EFI"JSON::generator;FI"R;F: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns the JSON generator module that is used by JSON. This is;TI":either JSON::Ext::Generator or JSON::Pure::Generator.;T: -@file0TI"lib/json/common.rb;T \ No newline at end of file diff --git a/.gems/doc/json-1.8.1/ri/JSON/iconv-c.ri b/.gems/doc/json-1.8.1/ri/JSON/iconv-c.ri deleted file mode 100644 index d6542fc..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/iconv-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/load-i.ri b/.gems/doc/json-1.8.1/ri/JSON/load-i.ri deleted file mode 100644 index 53de361..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/load-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/load_default_options-c.ri b/.gems/doc/json-1.8.1/ri/JSON/load_default_options-c.ri deleted file mode 100644 index d826776..0000000 --- a/.gems/doc/json-1.8.1/ri/JSON/load_default_options-c.ri +++ /dev/null @@ -1,4 +0,0 @@ -U:RDoc::Attr[ iI"load_default_options:EFI"JSON::load_default_options;FI"RW;F: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9The global default options for the JSON.load method:;To:RDoc::Markup::Verbatim; [I":max_nesting: false -;FI":allow_nan: true -;FI":quirks_mode: true;F: -@file0TI"lib/json/common.rb;T \ No newline at end of file diff --git a/.gems/doc/json-1.8.1/ri/JSON/parse%21-i.ri b/.gems/doc/json-1.8.1/ri/JSON/parse%21-i.ri deleted file mode 100644 index 92ea206..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/parse%21-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/parse-i.ri b/.gems/doc/json-1.8.1/ri/JSON/parse-i.ri deleted file mode 100644 index c4d712a..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/parse-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/parser-c.ri b/.gems/doc/json-1.8.1/ri/JSON/parser-c.ri deleted file mode 100644 index b51ef18..0000000 --- a/.gems/doc/json-1.8.1/ri/JSON/parser-c.ri +++ /dev/null @@ -1,2 +0,0 @@ -U:RDoc::Attr[ iI" parser:EFI"JSON::parser;FI"R;F: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns the JSON parser class that is used by JSON. This is either;TI"-JSON::Ext::Parser or JSON::Pure::Parser.;T: -@file0TI"lib/json/common.rb;T \ No newline at end of file diff --git a/.gems/doc/json-1.8.1/ri/JSON/pretty_generate-i.ri b/.gems/doc/json-1.8.1/ri/JSON/pretty_generate-i.ri deleted file mode 100644 index 0cf6129..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/pretty_generate-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/recurse_proc-i.ri b/.gems/doc/json-1.8.1/ri/JSON/recurse_proc-i.ri deleted file mode 100644 index a339e6d..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/recurse_proc-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/restore-c.ri b/.gems/doc/json-1.8.1/ri/JSON/restore-c.ri deleted file mode 100644 index fd7cf93..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/restore-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/JSON/state-c.ri b/.gems/doc/json-1.8.1/ri/JSON/state-c.ri deleted file mode 100644 index ce0103b..0000000 --- a/.gems/doc/json-1.8.1/ri/JSON/state-c.ri +++ /dev/null @@ -1,3 +0,0 @@ -U:RDoc::Attr[ iI" -state:EFI"JSON::state;FI"RW;F: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns the JSON generator state class that is used by JSON. This is;TI"Heither JSON::Ext::Generator::State or JSON::Pure::Generator::State.;T: -@file0TI"lib/json/common.rb;T \ No newline at end of file diff --git a/.gems/doc/json-1.8.1/ri/JSON/valid_utf8%3f-c.ri b/.gems/doc/json-1.8.1/ri/JSON/valid_utf8%3f-c.ri deleted file mode 100644 index c195fa9..0000000 Binary files a/.gems/doc/json-1.8.1/ri/JSON/valid_utf8%3f-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Kernel/cdesc-Kernel.ri b/.gems/doc/json-1.8.1/ri/Kernel/cdesc-Kernel.ri deleted file mode 100644 index bd2dd1f..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Kernel/cdesc-Kernel.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/OpenStruct/as_json-i.ri b/.gems/doc/json-1.8.1/ri/OpenStruct/as_json-i.ri deleted file mode 100644 index 60acd7f..0000000 Binary files a/.gems/doc/json-1.8.1/ri/OpenStruct/as_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/OpenStruct/cdesc-OpenStruct.ri b/.gems/doc/json-1.8.1/ri/OpenStruct/cdesc-OpenStruct.ri deleted file mode 100644 index b3a74a9..0000000 Binary files a/.gems/doc/json-1.8.1/ri/OpenStruct/cdesc-OpenStruct.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/OpenStruct/json_create-c.ri b/.gems/doc/json-1.8.1/ri/OpenStruct/json_create-c.ri deleted file mode 100644 index 8fea5b2..0000000 Binary files a/.gems/doc/json-1.8.1/ri/OpenStruct/json_create-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/OpenStruct/to_json-i.ri b/.gems/doc/json-1.8.1/ri/OpenStruct/to_json-i.ri deleted file mode 100644 index 3207260..0000000 Binary files a/.gems/doc/json-1.8.1/ri/OpenStruct/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Range/as_json-i.ri b/.gems/doc/json-1.8.1/ri/Range/as_json-i.ri deleted file mode 100644 index f4d4c8e..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Range/as_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Range/cdesc-Range.ri b/.gems/doc/json-1.8.1/ri/Range/cdesc-Range.ri deleted file mode 100644 index 6687dbf..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Range/cdesc-Range.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Range/json_create-c.ri b/.gems/doc/json-1.8.1/ri/Range/json_create-c.ri deleted file mode 100644 index cef9963..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Range/json_create-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Range/to_json-i.ri b/.gems/doc/json-1.8.1/ri/Range/to_json-i.ri deleted file mode 100644 index 7dcb50a..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Range/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Rational/as_json-i.ri b/.gems/doc/json-1.8.1/ri/Rational/as_json-i.ri deleted file mode 100644 index d6db73a..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Rational/as_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Rational/cdesc-Rational.ri b/.gems/doc/json-1.8.1/ri/Rational/cdesc-Rational.ri deleted file mode 100644 index 1b4ede5..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Rational/cdesc-Rational.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Rational/json_create-c.ri b/.gems/doc/json-1.8.1/ri/Rational/json_create-c.ri deleted file mode 100644 index 1f9c874..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Rational/json_create-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Rational/to_json-i.ri b/.gems/doc/json-1.8.1/ri/Rational/to_json-i.ri deleted file mode 100644 index bb8a283..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Rational/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Regexp/as_json-i.ri b/.gems/doc/json-1.8.1/ri/Regexp/as_json-i.ri deleted file mode 100644 index df81d44..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Regexp/as_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Regexp/cdesc-Regexp.ri b/.gems/doc/json-1.8.1/ri/Regexp/cdesc-Regexp.ri deleted file mode 100644 index e8f9bc7..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Regexp/cdesc-Regexp.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Regexp/json_create-c.ri b/.gems/doc/json-1.8.1/ri/Regexp/json_create-c.ri deleted file mode 100644 index 403af1c..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Regexp/json_create-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Regexp/to_json-i.ri b/.gems/doc/json-1.8.1/ri/Regexp/to_json-i.ri deleted file mode 100644 index 060d2c6..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Regexp/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Struct/as_json-i.ri b/.gems/doc/json-1.8.1/ri/Struct/as_json-i.ri deleted file mode 100644 index f3d20ca..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Struct/as_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Struct/cdesc-Struct.ri b/.gems/doc/json-1.8.1/ri/Struct/cdesc-Struct.ri deleted file mode 100644 index e388709..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Struct/cdesc-Struct.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Struct/json_create-c.ri b/.gems/doc/json-1.8.1/ri/Struct/json_create-c.ri deleted file mode 100644 index e3d3c13..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Struct/json_create-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Struct/to_json-i.ri b/.gems/doc/json-1.8.1/ri/Struct/to_json-i.ri deleted file mode 100644 index 212599c..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Struct/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Symbol/as_json-i.ri b/.gems/doc/json-1.8.1/ri/Symbol/as_json-i.ri deleted file mode 100644 index a183556..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Symbol/as_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Symbol/cdesc-Symbol.ri b/.gems/doc/json-1.8.1/ri/Symbol/cdesc-Symbol.ri deleted file mode 100644 index ab06d01..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Symbol/cdesc-Symbol.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Symbol/json_create-c.ri b/.gems/doc/json-1.8.1/ri/Symbol/json_create-c.ri deleted file mode 100644 index 663d8ca..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Symbol/json_create-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Symbol/to_json-i.ri b/.gems/doc/json-1.8.1/ri/Symbol/to_json-i.ri deleted file mode 100644 index b078505..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Symbol/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Time/as_json-i.ri b/.gems/doc/json-1.8.1/ri/Time/as_json-i.ri deleted file mode 100644 index 6f21068..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Time/as_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Time/cdesc-Time.ri b/.gems/doc/json-1.8.1/ri/Time/cdesc-Time.ri deleted file mode 100644 index 66e3e93..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Time/cdesc-Time.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Time/json_create-c.ri b/.gems/doc/json-1.8.1/ri/Time/json_create-c.ri deleted file mode 100644 index 5f20f3a..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Time/json_create-c.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/Time/to_json-i.ri b/.gems/doc/json-1.8.1/ri/Time/to_json-i.ri deleted file mode 100644 index a5af1c8..0000000 Binary files a/.gems/doc/json-1.8.1/ri/Time/to_json-i.ri and /dev/null differ diff --git a/.gems/doc/json-1.8.1/ri/cache.ri b/.gems/doc/json-1.8.1/ri/cache.ri deleted file mode 100644 index cb56aac..0000000 --- a/.gems/doc/json-1.8.1/ri/cache.ri +++ /dev/null @@ -1,17 +0,0 @@ -{ :ancestors{I"JSON::JSONError:EF[I"StandardError;FI"JSON::ParserError;F[I"JSON::JSONError;FI"JSON::NestingError;F[I"JSON::ParserError;FI" JSON::CircularDatastructure;F[I"JSON::NestingError;FI"JSON::GeneratorError;F[@ I"JSON::UnparserError;F[@ I" JSON::MissingUnicodeSupport;F[@ I" -Class;F[I" Object;FI"JSON::GenericObject;F[I"OpenStruct;FI" Symbol;F[I" Object;FI" Date;F[I" Object;FI"Exception;F[I" Object;FI"OpenStruct;F[I" Object;FI" DateTime;F[I" Object;FI" -Range;F[I" Object;FI" Struct;F[I" Object;FI" Complex;F[I" Object;FI" Rational;F[I" Object;FI" Time;F[I" Object;FI"BigDecimal;F[I" Object;FI" Regexp;F[I" Object;FI"!JSON::Pure::Generator::State;F[I" Object;FI"JSON::Pure::Parser;F[I"StringScanner;F:attributes{I"JSON::GenericObject;F[I"attr_writer json_creatable;F@C[ I"attr_accessor array_nl;FI"attr_accessor depth;FI"attr_accessor indent;FI"attr_accessor max_nesting;FI"attr_accessor object_nl;FI"attr_accessor quirks_mode;FI"attr_accessor space;FI"attr_accessor space_before;FI" JSON;F[ I"attr_accessor create_id;FI"'attr_accessor dump_default_options;FI"'attr_accessor load_default_options;FI"attr_accessor state;FI"attr_reader generator;FI"attr_reader parser;F:class_methods{I"JSON::JSONError;F[I" wrap;FI"JSON::GenericObject;F[ I" dump;FI"from_hash;FI"json_creatable;FI"json_creatable?;FI"json_create;FI" load;FI" Symbol;F[I"json_create;FI" Date;F[I"json_create;FI"Exception;F[I"json_create;FI"OpenStruct;F[I"json_create;FI" DateTime;F[I"json_create;FI" -Range;F[I"json_create;FI" Struct;F[I"json_create;FI" Complex;F[I"json_create;FI" Rational;F[I"json_create;FI" Time;F[I"json_create;FI"BigDecimal;F[I"json_create;FI" Regexp;F[I"json_create;F@C[I"from_state;FI"new;FI"JSON::Pure::Parser;F[I"new;FI" JSON;F[I"[];FI"const_defined_in?;FI"create_id;FI"dump_default_options;FI"generator;FI" -iconv;FI"load_default_options;FI" parser;FI" restore;FI" -state;FI"valid_utf8?;FI"4JSON::Pure::Generator::GeneratorMethods::String;F[I" included;F: encodingIu: Encoding -UTF-8;F:instance_methods{ I" -Class;F[I"json_creatable?;FI"JSON::GenericObject;F[ I"[];FI"[]=;FI" as_json;FI" to_hash;FI" to_json;FI"|;FI" Symbol;F[I" as_json;FI" to_json;FI" Date;F[I" as_json;FI" to_json;FI"Exception;F[I" as_json;FI" to_json;FI"OpenStruct;F[I" as_json;FI" to_json;FI" DateTime;F[I" as_json;FI" to_json;FI" -Range;F[I" as_json;FI" to_json;FI" Struct;F[I" as_json;FI" to_json;FI" Complex;F[I" as_json;FI" to_json;FI" Rational;F[I" as_json;FI" to_json;FI" Time;F[I" as_json;FI" to_json;FI"BigDecimal;F[I" as_json;FI" to_json;FI" Regexp;F[I" as_json;FI" to_json;F@C[I"[];FI"[]=;FI"allow_nan?;FI" array_nl;FI"ascii_only?;FI"check_circular?;FI"configure;FI" -depth;FI" generate;FI" indent;FI"max_nesting;FI" -merge;FI"object_nl;FI"quirks_mode;FI"quirks_mode?;FI" -space;FI"space_before;FI" to_h;FI" to_hash;FI"JSON::Pure::Parser;F[I" -parse;FI"quirks_mode?;FI" -reset;FI" JSON;F[ I" dump;FI"fast_generate;FI" generate;FI" load;FI" -parse;FI" parse!;FI"pretty_generate;FI"recurse_proc;FI"4JSON::Pure::Generator::GeneratorMethods::Object;F[I" to_json;FI"2JSON::Pure::Generator::GeneratorMethods::Hash;F[I" to_json;FI"3JSON::Pure::Generator::GeneratorMethods::Array;F[I" to_json;FI"5JSON::Pure::Generator::GeneratorMethods::Integer;F[I" to_json;FI"3JSON::Pure::Generator::GeneratorMethods::Float;F[I" to_json;F@[I" to_json;FI"to_json_raw;FI"to_json_raw_object;FI" - - - - - - Module: Twitter - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - - - - - -
-

Namespace

- -
- - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
NullObject
- -
- - -
Status
- -
- - -
-
- - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Arguments.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Arguments.html deleted file mode 100644 index e0af6be..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Arguments.html +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - Class: Twitter::Arguments - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Arguments

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- options[R] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- - - -
- new(args) - click to toggle source -
- - -
- -

Initializes a new Arguments object

- -

@return [Twitter::Arguments]

- - - -
-
-# File lib/twitter/arguments.rb, line 8
-def initialize(args)
-  @options = args.last.is_a?(::Hash) ? args.pop : {}
-  super(args.flatten)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Base.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Base.html deleted file mode 100644 index a805e60..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Base.html +++ /dev/null @@ -1,866 +0,0 @@ - - - - - - - Class: Twitter::Base - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - - - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Base

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- attrs[R] -
- -
- - - -
-
- -
- - -
- to_h[R] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- - - -
- attr_reader(*attrs) - click to toggle source -
- - -
- -

Define methods that retrieve the value from attributes

- -

@param attrs [Array, Symbol]

- - - -
-
-# File lib/twitter/base.rb, line 21
-def attr_reader(*attrs)
-  attrs.each do |attr|
-    define_attribute_method(attr)
-    define_predicate_method(attr)
-  end
-end
-
- -
- - - - -
- - -
- - - -
- define_attribute_method(key1, klass = nil, key2 = nil) - click to toggle source -
- - -
- -

Dynamically define a method for an attribute

- -

@param key1 [Symbol] @param klass [Symbol] @param key2 [Symbol]

- - - -
-
-# File lib/twitter/base.rb, line 85
-def define_attribute_method(key1, klass = nil, key2 = nil)
-  define_method(key1) do ||
-    if @attrs[key1].nil? || @attrs[key1].respond_to?(:empty?) && @attrs[key1].empty?
-      NullObject.new
-    else
-      if klass.nil?
-        @attrs[key1]
-      else
-        attrs = attrs_for_object(key1, key2)
-        Twitter.const_get(klass).new(attrs)
-      end
-    end
-  end
-  memoize(key1)
-end
-
- -
- - - - -
- - -
- - - -
- define_predicate_method(key1, key2 = key1) - click to toggle source -
- - -
- -

Dynamically define a predicate method for an attribute

- -

@param key1 [Symbol] @param key2 [Symbol]

- - - -
-
-# File lib/twitter/base.rb, line 116
-def define_predicate_method(key1, key2 = key1)
-  define_method(:"#{key1}?") do ||
-    !@attrs[key2].nil? && @attrs[key2] != false && !(@attrs[key2].respond_to?(:empty?) && @attrs[key2].empty?)
-  end
-  memoize(:"#{key1}?")
-end
-
- -
- - - - -
- - -
- - - -
- define_uri_method(key1, key2) - click to toggle source -
- - -
- -

Dynamically define a method for a URI

- -

@param key1 [Symbol] @param key2 [Symbol]

- - - -
-
-# File lib/twitter/base.rb, line 73
-def define_uri_method(key1, key2)
-  define_method(key1) do ||
-    Addressable::URI.parse(@attrs[key2]) unless @attrs[key2].nil?
-  end
-  memoize(key1)
-end
-
- -
- - - - -
- - -
- - - -
- deprecate_attribute_method(key) - click to toggle source -
- - -
- -

Dynamically define a method for an attribute

- -

@param key [Symbol]

- - - -
-
-# File lib/twitter/base.rb, line 104
-def deprecate_attribute_method(key)
-  define_method(key) do ||
-    warn "#{Kernel.caller.first}: [DEPRECATION] ##{key} is deprecated. Use ##{key}? instead."
-    @attrs[key]
-  end
-  memoize(key)
-end
-
- -
- - - - -
- - -
- - - -
- display_uri_attr_reader() - click to toggle source -
- - -
- -

Define display_uri attribute methods

- - - -
-
-# File lib/twitter/base.rb, line 62
-def display_uri_attr_reader
-  define_attribute_method(:display_url)
-  alias_method(:display_uri, :display_url)
-  define_predicate_method(:display_uri, :display_url)
-  alias_method(:display_url?, :display_uri?)
-end
-
- -
- - - - -
- - -
- - - -
- new(attrs = {}) - click to toggle source -
- - -
- -

Initializes a new object

- -

@param attrs [Hash] @return [Twitter::Base]

- - - -
-
-# File lib/twitter/base.rb, line 128
-def initialize(attrs = {})
-  @attrs = attrs || {}
-end
-
- -
- - - - -
- - -
- - - -
- object_attr_reader(klass, key1, key2 = nil) - click to toggle source -
- - -
- -

Define object methods from attributes

- -

@param klass [Symbol] @param key1 [Symbol] @param key2 [Symbol]

- - - -
-
-# File lib/twitter/base.rb, line 40
-def object_attr_reader(klass, key1, key2 = nil)
-  define_attribute_method(key1, klass, key2)
-  define_predicate_method(key1)
-end
-
- -
- - - - -
- - -
- - - -
- predicate_attr_reader(*attrs) - click to toggle source -
- - -
- - - - - -
-
-# File lib/twitter/base.rb, line 28
-def predicate_attr_reader(*attrs)
-  attrs.each do |attr|
-    define_predicate_method(attr)
-    deprecate_attribute_method(attr)
-  end
-end
-
- -
- - - - -
- - -
- - - -
- uri_attr_reader(*attrs) - click to toggle source -
- - -
- -

Define URI methods from attributes

- -

@param attrs [Array, Symbol]

- - - -
-
-# File lib/twitter/base.rb, line 48
-def uri_attr_reader(*attrs)
-  attrs.each do |uri_key|
-    array = uri_key.to_s.split('_')
-    index = array.index('uri')
-    array[index] = 'url'
-    url_key = array.join('_').to_sym
-    define_uri_method(uri_key, url_key)
-    alias_method(url_key, uri_key)
-    define_predicate_method(uri_key, url_key)
-    alias_method(:"#{url_key}?", :"#{uri_key}?")
-  end
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- [](method) - click to toggle source -
- - -
- -

Fetches an attribute of an object using hash notation

- -

@param method [String, Symbol] Message to send to the object

- - - -
-
-# File lib/twitter/base.rb, line 135
-def [](method)
-  warn "#{Kernel.caller.first}: [DEPRECATION] #[#{method.inspect}] is deprecated. Use ##{method} to fetch the value."
-  send(method.to_sym)
-rescue NoMethodError
-  nil
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/BasicUser.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/BasicUser.html deleted file mode 100644 index 57e4c59..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/BasicUser.html +++ /dev/null @@ -1,368 +0,0 @@ - - - - - - - Class: Twitter::BasicUser - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::BasicUser

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- screen_name[R] -
- -
- - - -
-
- -
- - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Client.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Client.html deleted file mode 100644 index a198e0e..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Client.html +++ /dev/null @@ -1,673 +0,0 @@ - - - - - - - Class: Twitter::Client - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Client

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - - - -
- access_token[RW] -
- -
- - - -
-
- -
- - - - -
- access_token_secret[RW] -
- -
- - - -
-
- -
- - - - -
- consumer_key[RW] -
- -
- - - -
-
- -
- - - - -
- consumer_secret[RW] -
- -
- - - -
-
- -
- - - - -
- proxy[RW] -
- -
- - - -
-
- -
- - - - -
- user_agent[W] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- - - -
- new(options = {}) - click to toggle source -
- - -
- -

Initializes a new Client object

- -

@param options [Hash] @return [Twitter::Client]

- - - -
-
-# File lib/twitter/client.rb, line 21
-def initialize(options = {})
-  options.each do |key, value|
-    send(:"#{key}=", value)
-  end
-  yield(self) if block_given?
-  validate_credential_type!
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- credentials() - click to toggle source -
- - -
- -

@return [Hash]

- - - -
-
-# File lib/twitter/client.rb, line 40
-def credentials
-  {
-    :consumer_key    => consumer_key,
-    :consumer_secret => consumer_secret,
-    :token           => access_token,
-    :token_secret    => access_token_secret,
-  }
-end
-
- -
- - - - -
- - -
- - - -
- credentials?() - click to toggle source -
- - -
- -

@return [Boolean]

- - - -
-
-# File lib/twitter/client.rb, line 50
-def credentials?
-  credentials.values.all?
-end
-
- -
- - - - -
- - -
- - - -
- user_agent() - click to toggle source -
- - -
- -

@return [String]

- - - -
-
-# File lib/twitter/client.rb, line 35
-def user_agent
-  @user_agent ||= "Twitter Ruby Gem #{Twitter::Version}"
-end
-
- -
- - - - -
- - -
- - - -
- user_token?() - click to toggle source -
- - -
- -

@return [Boolean]

- - - -
-
-# File lib/twitter/client.rb, line 30
-def user_token?
-  !!(access_token && access_token_secret)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Configuration.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Configuration.html deleted file mode 100644 index 050cfb5..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Configuration.html +++ /dev/null @@ -1,527 +0,0 @@ - - - - - - - Class: Twitter::Configuration - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Configuration

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- characters_reserved_per_media[R] -
- -
- - - -
-
- -
- - -
- max_media_per_upload[R] -
- -
- - - -
-
- -
- - -
- non_username_paths[R] -
- -
- - - -
-
- -
- - -
- photo_size_limit[R] -
- -
- - - -
-
- -
- - -
- short_uri_length[R] -
- -
- - - -
-
- -
- - -
- short_uri_length_https[R] -
- -
- - - -
-
- -
- - -
- short_url_length[R] -
- -
- - - -
-
- -
- - -
- short_url_length_https[R] -
- -
- - - -
-
- -
- - - - -
-

Public Instance Methods

- - -
- - - -
- photo_sizes() - click to toggle source -
- - -
- -

Returns an array of photo sizes

- -

@return [Array<Twitter::Size>]

- - - -
-
-# File lib/twitter/configuration.rb, line 14
-def photo_sizes
-  @attrs.fetch(:photo_sizes, []).inject({}) do |object, (key, value)|
-    object[key] = Size.new(value)
-    object
-  end
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Creatable.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Creatable.html deleted file mode 100644 index 69d2826..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Creatable.html +++ /dev/null @@ -1,436 +0,0 @@ - - - - - - - Module: Twitter::Creatable - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Creatable

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- created?() - click to toggle source -
- - -
- -

@return [Boolean]

- - - -
-
-# File lib/twitter/creatable.rb, line 17
-def created?
-  !!@attrs[:created_at]
-end
-
- -
- - - - -
- - -
- - - -
- created_at() - click to toggle source -
- - -
- -

Time when the object was created on Twitter

- -

@return [Time]

- - - -
-
-# File lib/twitter/creatable.rb, line 11
-def created_at
-  Time.parse(@attrs[:created_at]) unless @attrs[:created_at].nil?
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Cursor.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Cursor.html deleted file mode 100644 index c671401..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Cursor.html +++ /dev/null @@ -1,459 +0,0 @@ - - - - - - - Class: Twitter::Cursor - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Cursor

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- attrs[R] -
- -
- - - -
-
- -
- - -
- to_h[R] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- - - -
- new(attrs, key, klass, request) - click to toggle source -
- - -
- -

Initializes a new Cursor

- -

@param attrs [Hash] @param key [String, Symbol] The key to fetch the data -from the response @param klass [Class] The class to instantiate objects in -the response @param request [Twitter::Request] @return [Twitter::Cursor]

- - - -
-
-# File lib/twitter/cursor.rb, line 20
-def initialize(attrs, key, klass, request)
-  @key = key.to_sym
-  @klass = klass
-  @client = request.client
-  @request_method = request.verb
-  @path = request.path
-  @options = request.options
-  @collection = []
-  self.attrs = attrs
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/DirectMessage.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/DirectMessage.html deleted file mode 100644 index 30c9fad..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/DirectMessage.html +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - - Class: Twitter::DirectMessage - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::DirectMessage

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- full_text[R] -
- -
- - - -
-
- -
- - -
- text[R] -
- -
- - - -
-
- -
- - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Entities.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Entities.html deleted file mode 100644 index c7cc0f2..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Entities.html +++ /dev/null @@ -1,825 +0,0 @@ - - - - - - - Module: Twitter::Entities - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Entities

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- entities?() - click to toggle source -
- - -
- -

@return [Boolean]

- - - -
-
-# File lib/twitter/entities.rb, line 13
-def entities?
-  !@attrs[:entities].nil? && @attrs[:entities].any? { |_, array| array.any? }
-end
-
- -
- - - - -
- - -
- - - -
- hashtags() - click to toggle source -
- - -
- -

@note Must include entities in your request for this method to work @return -[Array<Twitter::Entity::Hashtag>]

- - - -
-
-# File lib/twitter/entities.rb, line 20
-def hashtags
-  entities(Entity::Hashtag, :hashtags)
-end
-
- -
- - - - -
- - -
- - - -
- hashtags?() - click to toggle source -
- - -
- -

@return [Boolean]

- - - -
-
-# File lib/twitter/entities.rb, line 26
-def hashtags?
-  hashtags.any?
-end
-
- -
- - - - -
- - -
- - - -
- media() - click to toggle source -
- - -
- -

@note Must include entities in your request for this method to work @return -[Array<Twitter::Media>]

- - - -
-
-# File lib/twitter/entities.rb, line 33
-def media
-  extended_entities = entities(MediaFactory, :media, :extended_entities)
-  extended_entities.empty? ? entities(MediaFactory, :media) : extended_entities
-end
-
- -
- - - - -
- - -
- - - -
- media?() - click to toggle source -
- - -
- -

@return [Boolean]

- - - -
-
-# File lib/twitter/entities.rb, line 40
-def media?
-  media.any?
-end
-
- -
- - - - -
- - -
- - - -
- symbols() - click to toggle source -
- - -
- -

@note Must include entities in your request for this method to work @return -[Array<Twitter::Entity::Symbol>]

- - - -
-
-# File lib/twitter/entities.rb, line 47
-def symbols
-  entities(Entity::Symbol, :symbols)
-end
-
- -
- - - - -
- - -
- - - -
- symbols?() - click to toggle source -
- - -
- -

@return [Boolean]

- - - -
-
-# File lib/twitter/entities.rb, line 53
-def symbols?
-  symbols.any?
-end
-
- -
- - - - -
- - -
- - - -
- uris() - click to toggle source -
- - -
- -

@note Must include entities in your request for this method to work @return -[Array<Twitter::Entity::URI>]

- - - -
-
-# File lib/twitter/entities.rb, line 60
-def uris
-  entities(Entity::URI, :urls)
-end
-
- -
- - -
- Also aliased as: urls -
- - - -
- - -
- - - -
- uris?() - click to toggle source -
- - -
- -

@return [Boolean]

- - - -
-
-# File lib/twitter/entities.rb, line 67
-def uris?
-  uris.any?
-end
-
- -
- - -
- Also aliased as: urls? -
- - - -
- - -
- - - -
- urls() - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: uris -
- -
- - -
- - - -
- urls?() - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: uris? -
- -
- - -
- - - -
- user_mentions() - click to toggle source -
- - -
- -

@note Must include entities in your request for this method to work @return -[Array<Twitter::Entity::UserMention>]

- - - -
-
-# File lib/twitter/entities.rb, line 74
-def user_mentions
-  entities(Entity::UserMention, :user_mentions)
-end
-
- -
- - - - -
- - -
- - - -
- user_mentions?() - click to toggle source -
- - -
- -

@return [Boolean]

- - - -
-
-# File lib/twitter/entities.rb, line 80
-def user_mentions?
-  user_mentions.any?
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Entity.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Entity.html deleted file mode 100644 index b59bfaa..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Entity.html +++ /dev/null @@ -1,421 +0,0 @@ - - - - - - - Class: Twitter::Entity - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- - - -
- - -
-

Parent

- - - -
- - - - - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Entity

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
URL
- -
- - -
Uri
- -
- - -
Url
- -
- - -
-
- - - - -
-

Attributes

- - -
- - -
- indices[R] -
- -
- - - -
-
- -
- - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Entity/Hashtag.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Entity/Hashtag.html deleted file mode 100644 index b8345df..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Entity/Hashtag.html +++ /dev/null @@ -1,368 +0,0 @@ - - - - - - - Class: Twitter::Entity::Hashtag - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Entity::Hashtag

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- text[R] -
- -
- - - -
-
- -
- - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Entity/Symbol.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Entity/Symbol.html deleted file mode 100644 index 853837a..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Entity/Symbol.html +++ /dev/null @@ -1,368 +0,0 @@ - - - - - - - Class: Twitter::Entity::Symbol - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Entity::Symbol

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- text[R] -
- -
- - - -
-
- -
- - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Entity/URI.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Entity/URI.html deleted file mode 100644 index 25f6209..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Entity/URI.html +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - - Class: Twitter::Entity::URL - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Entity::URL

- -
- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Entity/UserMention.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Entity/UserMention.html deleted file mode 100644 index e1ee83b..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Entity/UserMention.html +++ /dev/null @@ -1,398 +0,0 @@ - - - - - - - Class: Twitter::Entity::UserMention - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Entity::UserMention

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- id[R] -
- -
- - - -
-
- -
- - -
- name[R] -
- -
- - - -
-
- -
- - -
- screen_name[R] -
- -
- - - -
-
- -
- - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Enumerable.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Enumerable.html deleted file mode 100644 index 19e9b5e..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Enumerable.html +++ /dev/null @@ -1,408 +0,0 @@ - - - - - - - Module: Twitter::Enumerable - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Enumerable

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- each(start = 0) - click to toggle source -
- - -
- -

@return [Enumerator]

- - - -
-
-# File lib/twitter/enumerable.rb, line 6
-def each(start = 0)
-  return to_enum(:each, start) unless block_given?
-  Array(@collection[start..-1]).each do |element|
-    yield(element)
-  end
-  unless last?
-    start = [@collection.size, start].max
-    fetch_next_page
-    each(start, &Proc.new)
-  end
-  self
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error.html deleted file mode 100644 index deef306..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error.html +++ /dev/null @@ -1,643 +0,0 @@ - - - - - - - Class: Twitter::Error - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- - - -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error

- -
- -

Custom error class for rescuing from all Twitter errors

- -
- - - - -
- - - - - - -
-

Constants

-
- -
AlreadyPosted
- -
- - -
Codes
- -
- - -
EnhanceYourCalm
- -
- - -
RateLimited
- -
- - -
-
- - - - -
-

Attributes

- - -
- - -
- code[R] -
- -
- - - -
-
- -
- - -
- rate_limit[R] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- - - -
- errors() - click to toggle source -
- - -
- -

@return [Hash]

- - - -
-
-# File lib/twitter/error.rb, line 44
-def errors
-  @errors ||= {
-    400 => Twitter::Error::BadRequest,
-    401 => Twitter::Error::Unauthorized,
-    403 => Twitter::Error::Forbidden,
-    404 => Twitter::Error::NotFound,
-    406 => Twitter::Error::NotAcceptable,
-    408 => Twitter::Error::RequestTimeout,
-    420 => Twitter::Error::EnhanceYourCalm,
-    422 => Twitter::Error::UnprocessableEntity,
-    429 => Twitter::Error::TooManyRequests,
-    500 => Twitter::Error::InternalServerError,
-    502 => Twitter::Error::BadGateway,
-    503 => Twitter::Error::ServiceUnavailable,
-    504 => Twitter::Error::GatewayTimeout,
-  }
-end
-
- -
- - - - -
- - -
- - - -
- forbidden_messages() - click to toggle source -
- - -
- - - - - -
-
-# File lib/twitter/error.rb, line 62
-def forbidden_messages
-  @forbidden_messages ||= {
-    'Status is a duplicate.' => Twitter::Error::DuplicateStatus,
-    'You have already favorited this status.' => Twitter::Error::AlreadyFavorited,
-    'sharing is not permissible for this status (Share validations failed)' => Twitter::Error::AlreadyRetweeted,
-  }
-end
-
- -
- - - - -
- - -
- - - -
- from_response(response) - click to toggle source -
- - -
- -

Create a new error from an HTTP response

- -

@param response [Faraday::Response] @return [Twitter::Error]

- - - -
-
-# File lib/twitter/error.rb, line 38
-def from_response(response)
-  message, code = parse_error(response.body)
-  new(message, response.response_headers, code)
-end
-
- -
- - - - -
- - -
- - - -
- new(message = '', rate_limit = {}, code = nil) - click to toggle source -
- - -
- -

Initializes a new Error object

- -

@param message [Exception, String] @param rate_limit [Hash] @param code -[Integer] @return [Twitter::Error]

- - - -
-
-# File lib/twitter/error.rb, line 98
-def initialize(message = '', rate_limit = {}, code = nil)
-  super(message)
-  @rate_limit = Twitter::RateLimit.new(rate_limit)
-  @code = code
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/AlreadyFavorited.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/AlreadyFavorited.html deleted file mode 100644 index 936e781..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/AlreadyFavorited.html +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - - Class: Twitter::Error::AlreadyFavorited - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error::AlreadyFavorited

- -
- -

Raised when a Tweet has already been favorited

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/AlreadyRetweeted.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/AlreadyRetweeted.html deleted file mode 100644 index 1f73c50..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/AlreadyRetweeted.html +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - - Class: Twitter::Error::AlreadyRetweeted - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error::AlreadyRetweeted

- -
- -

Raised when a Tweet has already been retweeted

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/BadGateway.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/BadGateway.html deleted file mode 100644 index f1b1c60..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/BadGateway.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - Class: Twitter::Error::BadGateway - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error::BadGateway

- -
- -

Raised when Twitter returns the HTTP -status code 502

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/BadRequest.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/BadRequest.html deleted file mode 100644 index eead96d..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/BadRequest.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - Class: Twitter::Error::BadRequest - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error::BadRequest

- -
- -

Raised when Twitter returns the HTTP -status code 400

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/ClientError.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/ClientError.html deleted file mode 100644 index 8754197..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/ClientError.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - Class: Twitter::Error::ClientError - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error::ClientError

- -
- -

Raised when Twitter returns a 4xx HTTP -status code

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/Code.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/Code.html deleted file mode 100644 index 3a399ec..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/Code.html +++ /dev/null @@ -1,449 +0,0 @@ - - - - - - - Module: Twitter::Error::Code - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error::Code

- -
- -

If error code is missing see dev.twitter.com/docs/error-codes-responses

- -
- - - - -
- - - - - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/ConfigurationError.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/ConfigurationError.html deleted file mode 100644 index 7c3b127..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/ConfigurationError.html +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - - Class: Twitter::Error::ConfigurationError - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error::ConfigurationError

- -
- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/DuplicateStatus.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/DuplicateStatus.html deleted file mode 100644 index 10b610e..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/DuplicateStatus.html +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - - Class: Twitter::Error::DuplicateStatus - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error::DuplicateStatus

- -
- -

Raised when a Tweet has already been posted

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/Forbidden.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/Forbidden.html deleted file mode 100644 index 6ffe50f..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/Forbidden.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - Class: Twitter::Error::Forbidden - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error::Forbidden

- -
- -

Raised when Twitter returns the HTTP -status code 403

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/GatewayTimeout.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/GatewayTimeout.html deleted file mode 100644 index 8ab6edd..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/GatewayTimeout.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - Class: Twitter::Error::GatewayTimeout - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error::GatewayTimeout

- -
- -

Raised when Twitter returns the HTTP -status code 504

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/InternalServerError.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/InternalServerError.html deleted file mode 100644 index 6713f1e..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/InternalServerError.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - Class: Twitter::Error::InternalServerError - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error::InternalServerError

- -
- -

Raised when Twitter returns the HTTP -status code 500

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/NotAcceptable.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/NotAcceptable.html deleted file mode 100644 index 64eeda6..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/NotAcceptable.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - Class: Twitter::Error::NotAcceptable - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error::NotAcceptable

- -
- -

Raised when Twitter returns the HTTP -status code 406

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/NotFound.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/NotFound.html deleted file mode 100644 index fe36d5a..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/NotFound.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - Class: Twitter::Error::NotFound - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error::NotFound

- -
- -

Raised when Twitter returns the HTTP -status code 404

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/RequestTimeout.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/RequestTimeout.html deleted file mode 100644 index 8faef16..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/RequestTimeout.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - Class: Twitter::Error::RequestTimeout - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error::RequestTimeout

- -
- -

Raised when Twitter returns the HTTP -status code 408

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/ServerError.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/ServerError.html deleted file mode 100644 index 4136161..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/ServerError.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - Class: Twitter::Error::ServerError - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error::ServerError

- -
- -

Raised when Twitter returns a 5xx HTTP -status code

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/ServiceUnavailable.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/ServiceUnavailable.html deleted file mode 100644 index 539ad05..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/ServiceUnavailable.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - Class: Twitter::Error::ServiceUnavailable - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error::ServiceUnavailable

- -
- -

Raised when Twitter returns the HTTP -status code 503

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/TooManyRequests.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/TooManyRequests.html deleted file mode 100644 index 48c536d..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/TooManyRequests.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - Class: Twitter::Error::TooManyRequests - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error::TooManyRequests

- -
- -

Raised when Twitter returns the HTTP -status code 429

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/UnacceptableIO.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/UnacceptableIO.html deleted file mode 100644 index bf6e139..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/UnacceptableIO.html +++ /dev/null @@ -1,398 +0,0 @@ - - - - - - - Class: Twitter::Error::UnacceptableIO - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error::UnacceptableIO

- -
- -

Raised when a Tweet includes media that doesn’t -have a to_io method

- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- new() - click to toggle source -
- - -
- - - - - -
-
-# File lib/twitter/error.rb, line 108
-def initialize
-  super('The IO object for media must respond to to_io')
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/Unauthorized.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/Unauthorized.html deleted file mode 100644 index 172f309..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/Unauthorized.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - Class: Twitter::Error::Unauthorized - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error::Unauthorized

- -
- -

Raised when Twitter returns the HTTP -status code 401

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/UnprocessableEntity.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/UnprocessableEntity.html deleted file mode 100644 index 5473679..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Error/UnprocessableEntity.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - Class: Twitter::Error::UnprocessableEntity - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Error::UnprocessableEntity

- -
- -

Raised when Twitter returns the HTTP -status code 422

- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Factory.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Factory.html deleted file mode 100644 index 4b7201d..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Factory.html +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - - Class: Twitter::Factory - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Factory

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- new(method, klass, attrs = {}) - click to toggle source -
- - -
- -

Construct a new object

- -

@param method [Symbol] @param klass [Class] @param attrs [Hash] @raise -[IndexError] Error raised when supplied argument -is missing a key. @return [Twitter::Base]

- - - -
-
-# File lib/twitter/factory.rb, line 11
-def new(method, klass, attrs = {})
-  type = attrs.fetch(method.to_sym)
-  const_name = type.gsub(/\/(.?)/) { "::#{Regexp.last_match[1].upcase}" }.gsub(/(?:^|_)(.)/) { Regexp.last_match[1].upcase }
-  klass.const_get(const_name.to_sym).new(attrs)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Geo.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Geo.html deleted file mode 100644 index 91d1f58..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Geo.html +++ /dev/null @@ -1,413 +0,0 @@ - - - - - - - Class: Twitter::Geo - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
- - - -
- -
- - -
-

Parent

- - - -
- - - - - - -
-

Namespace

- -
- - - - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Geo

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- coordinates[R] -
- -
- - - -
-
- -
- - -
- coords[R] -
- -
- - - -
-
- -
- - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Geo/Point.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Geo/Point.html deleted file mode 100644 index f5e2688..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Geo/Point.html +++ /dev/null @@ -1,531 +0,0 @@ - - - - - - - Class: Twitter::Geo::Point - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Geo::Point

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- lat() - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: latitude -
- -
- - -
- - - -
- latitude() - click to toggle source -
- - -
- -

@return [Integer]

- - - -
-
-# File lib/twitter/geo/point.rb, line 7
-def latitude
-  coordinates[0]
-end
-
- -
- - -
- Also aliased as: lat -
- - - -
- - -
- - - -
- lng() - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: longitude -
- -
- - -
- - - -
- long() - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: longitude -
- -
- - -
- - - -
- longitude() - click to toggle source -
- - -
- -

@return [Integer]

- - - -
-
-# File lib/twitter/geo/point.rb, line 13
-def longitude
-  coordinates[1]
-end
-
- -
- - -
- Also aliased as: long, lng -
- - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Geo/Polygon.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Geo/Polygon.html deleted file mode 100644 index 7303106..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Geo/Polygon.html +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - - Class: Twitter::Geo::Polygon - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Geo::Polygon

- -
- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/GeoFactory.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/GeoFactory.html deleted file mode 100644 index 482469f..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/GeoFactory.html +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - - Class: Twitter::GeoFactory - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::GeoFactory

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- new(attrs = {}) - click to toggle source -
- - -
- -

Construct a new geo object

- -

@param attrs [Hash] @raise [IndexError] Error -raised when supplied argument is missing a :type key. @return -[Twitter::Geo]

- - - -
-
-# File lib/twitter/geo_factory.rb, line 13
-def new(attrs = {})
-  super(:type, Geo, attrs)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/GeoResults.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/GeoResults.html deleted file mode 100644 index 1efd235..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/GeoResults.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - Class: Twitter::GeoResults - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::GeoResults

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- attrs[R] -
- -
- - - -
-
- -
- - -
- to_h[R] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- - - -
- new(attrs = {}) - click to toggle source -
- - -
- -

Initializes a new GeoResults object

- -

@param attrs [Hash] @return [Twitter::GeoResults]

- - - -
-
-# File lib/twitter/geo_results.rb, line 17
-def initialize(attrs = {})
-  @attrs = attrs
-  @collection = @attrs[:result].fetch(:places, []).collect do |place|
-    Place.new(place)
-  end
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- token() - click to toggle source -
- - -
- -

@return [String]

- - - -
-
-# File lib/twitter/geo_results.rb, line 25
-def token
-  @attrs[:token]
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Identity.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Identity.html deleted file mode 100644 index d65b90e..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Identity.html +++ /dev/null @@ -1,434 +0,0 @@ - - - - - - - Class: Twitter::Identity - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Identity

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- id[R] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- - - -
- new(attrs = {}) - click to toggle source -
- - -
- -

Initializes a new object

- -

@param attrs [Hash] @raise [ArgumentError] Error -raised when supplied argument is missing an :id key. @return -[Twitter::Identity]

- - - -
-
-# File lib/twitter/identity.rb, line 14
-def initialize(attrs = {})
-  attrs.fetch(:id)
-  super
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Language.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Language.html deleted file mode 100644 index ab87070..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Language.html +++ /dev/null @@ -1,398 +0,0 @@ - - - - - - - Class: Twitter::Language - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Language

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- code[R] -
- -
- - - -
-
- -
- - -
- name[R] -
- -
- - - -
-
- -
- - -
- status[R] -
- -
- - - -
-
- -
- - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/List.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/List.html deleted file mode 100644 index 968e658..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/List.html +++ /dev/null @@ -1,694 +0,0 @@ - - - - - - - Class: Twitter::List - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::List

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- description[R] -
- -
- - - -
-
- -
- - -
- full_name[R] -
- -
- - - -
-
- -
- - -
- member_count[R] -
- -
- - - -
-
- -
- - -
- mode[R] -
- -
- - - -
-
- -
- - -
- name[R] -
- -
- - - -
-
- -
- - -
- slug[R] -
- -
- - - -
-
- -
- - -
- subscriber_count[R] -
- -
- - - -
-
- -
- - - - -
-

Public Instance Methods

- - -
- - - -
- members_uri() - click to toggle source -
- - -
- -

@return [Addressable::URI] The URI to the list members.

- - - -
-
-# File lib/twitter/list.rb, line 13
-def members_uri
-  Addressable::URI.parse("https://twitter.com/#{user.screen_name}/#{slug}/members")
-end
-
- -
- - -
- Also aliased as: members_url -
- - - -
- - -
- - - -
- members_url() - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: members_uri -
- -
- - -
- - - -
- subscribers_uri() - click to toggle source -
- - -
- -

@return [Addressable::URI] The URI to the list subscribers.

- - - -
-
-# File lib/twitter/list.rb, line 20
-def subscribers_uri
-  Addressable::URI.parse("https://twitter.com/#{user.screen_name}/#{slug}/subscribers")
-end
-
- -
- - -
- Also aliased as: subscribers_url -
- - - -
- - -
- - - -
- subscribers_url() - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: subscribers_uri -
- -
- - -
- - - -
- uri() - click to toggle source -
- - -
- -

@return [Addressable::URI] The URI to the list.

- - - -
-
-# File lib/twitter/list.rb, line 27
-def uri
-  Addressable::URI.parse("https://twitter.com/#{user.screen_name}/#{slug}")
-end
-
- -
- - -
- Also aliased as: url -
- - - -
- - -
- - - -
- url() - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: uri -
- -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Media.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Media.html deleted file mode 100644 index 4f44692..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Media.html +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - - Module: Twitter::Media - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - -
-

Namespace

- -
- - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Media

- -
- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Media/Photo.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Media/Photo.html deleted file mode 100644 index a607b6a..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Media/Photo.html +++ /dev/null @@ -1,422 +0,0 @@ - - - - - - - Class: Twitter::Media::Photo - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Media::Photo

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- indices[R] -
- -
- - - -
-
- -
- - - - -
-

Public Instance Methods

- - -
- - - -
- sizes() - click to toggle source -
- - -
- -

Returns an array of photo sizes

- -

@return [Array<Twitter::Size>]

- - - -
-
-# File lib/twitter/media/photo.rb, line 13
-def sizes
-  @attrs.fetch(:sizes, []).inject({}) do |object, (key, value)|
-    object[key] = Size.new(value)
-    object
-  end
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/MediaFactory.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/MediaFactory.html deleted file mode 100644 index 1c048c6..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/MediaFactory.html +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - - Class: Twitter::MediaFactory - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::MediaFactory

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- new(attrs = {}) - click to toggle source -
- - -
- -

Construct a new media object

- -

@param attrs [Hash] @raise [IndexError] Error -raised when supplied argument is missing a :type key. @return -[Twitter::Media]

- - - -
-
-# File lib/twitter/media_factory.rb, line 12
-def new(attrs = {})
-  super(:type, Media, attrs)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Metadata.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Metadata.html deleted file mode 100644 index 70cf034..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Metadata.html +++ /dev/null @@ -1,383 +0,0 @@ - - - - - - - Class: Twitter::Metadata - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Metadata

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- iso_language_code[R] -
- -
- - - -
-
- -
- - -
- result_type[R] -
- -
- - - -
-
- -
- - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/OEmbed.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/OEmbed.html deleted file mode 100644 index 145a754..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/OEmbed.html +++ /dev/null @@ -1,473 +0,0 @@ - - - - - - - Class: Twitter::OEmbed - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::OEmbed

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- author_name[R] -
- -
- - - -
-
- -
- - -
- cache_age[R] -
- -
- - - -
-
- -
- - -
- height[R] -
- -
- - - -
-
- -
- - -
- html[R] -
- -
- - - -
-
- -
- - -
- provider_name[R] -
- -
- - - -
-
- -
- - -
- type[R] -
- -
- - - -
-
- -
- - -
- version[R] -
- -
- - - -
-
- -
- - -
- width[R] -
- -
- - - -
-
- -
- - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Place.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Place.html deleted file mode 100644 index 73ca6bb..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Place.html +++ /dev/null @@ -1,578 +0,0 @@ - - - - - - - Class: Twitter::Place - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Place

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- attributes[R] -
- -
- - - -
-
- -
- - -
- country[R] -
- -
- - - -
-
- -
- - -
- full_name[R] -
- -
- - - -
-
- -
- - -
- name[R] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- - - -
- new(attrs = {}) - click to toggle source -
- - -
- -

Initializes a new place

- -

@param attrs [Hash] @raise [ArgumentError] Error -raised when supplied argument is missing a :woeid key. @return -[Twitter::Place]

- - - -
-
-# File lib/twitter/place.rb, line 19
-def initialize(attrs = {})
-  attrs[:id] ||= attrs.fetch(:woeid)
-  super
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- country_code() - click to toggle source -
- - -
- -

@return [String]

- - - -
-
-# File lib/twitter/place.rb, line 25
-def country_code
-  @attrs[:country_code] || @attrs[:countryCode] # rubocop:disable SymbolName
-end
-
- -
- - - - -
- - -
- - - -
- parent_id() - click to toggle source -
- - -
- -

@return [Integer]

- - - -
-
-# File lib/twitter/place.rb, line 31
-def parent_id
-  @attrs[:parentid]
-end
-
- -
- - - - -
- - -
- - - -
- place_type() - click to toggle source -
- - -
- -

@return [String]

- - - -
-
-# File lib/twitter/place.rb, line 37
-def place_type
-  @attrs[:place_type] || @attrs[:placeType] && @attrs[:placeType][:name] # rubocop:disable SymbolName
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Profile.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Profile.html deleted file mode 100644 index 9abd499..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Profile.html +++ /dev/null @@ -1,752 +0,0 @@ - - - - - - - Module: Twitter::Profile - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - - - - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Profile

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
PREDICATE_URI_METHOD_REGEX
- -
- - -
PROFILE_IMAGE_SUFFIX_REGEX
- -
- - -
-
- - - - - - -
-

Public Instance Methods

- - -
- - - -
- profile_banner_uri(size = :web) - click to toggle source -
- - -
- -

Return the URL to the user’s profile banner image

- -

@param size [String, Symbol] The size of the image. Must be one of: -‘mobile’, ‘mobile_retina’, ‘web’, ‘web_retina’, ‘ipad’, or ‘ipad_retina’ -@return [Addressable::URI]

- - - -
-
-# File lib/twitter/profile.rb, line 28
-def profile_banner_uri(size = :web)
-  parse_encoded_uri(insecure_uri([@attrs[:profile_banner_url], size].join('/'))) unless @attrs[:profile_banner_url].nil?
-end
-
- -
- - -
- Also aliased as: profile_banner_url -
- - - -
- - -
- - - -
- profile_banner_uri?() - click to toggle source -
- - -
- -

@return [Boolean]

- - - -
-
-# File lib/twitter/profile.rb, line 43
-def profile_banner_uri?
-  !!@attrs[:profile_banner_url]
-end
-
- -
- - - - -
- - -
- - - -
- profile_banner_uri_https(size = :web) - click to toggle source -
- - -
- -

Return the secure URL to the user’s profile banner image

- -

@param size [String, Symbol] The size of the image. Must be one of: -‘mobile’, ‘mobile_retina’, ‘web’, ‘web_retina’, ‘ipad’, or ‘ipad_retina’ -@return [Addressable::URI]

- - - -
-
-# File lib/twitter/profile.rb, line 37
-def profile_banner_uri_https(size = :web)
-  parse_encoded_uri([@attrs[:profile_banner_url], size].join('/')) unless @attrs[:profile_banner_url].nil?
-end
-
- -
- - -
- Also aliased as: profile_banner_url_https -
- - - -
- - -
- - - -
- profile_banner_url(size = :web) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: profile_banner_uri -
- -
- - -
- - - -
- profile_banner_url_https(size = :web) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: profile_banner_uri_https -
- -
- - -
- - - -
- profile_image_uri(size = :normal) - click to toggle source -
- - -
- -

Return the URL to the user’s profile image

- -

@param size [String, Symbol] The size of the image. Must be one of: ‘mini’, -‘normal’, ‘bigger’ or ‘original’ @return [Addressable::URI]

- - - -
-
-# File lib/twitter/profile.rb, line 53
-def profile_image_uri(size = :normal)
-  parse_encoded_uri(insecure_uri(profile_image_uri_https(size))) unless @attrs[:profile_image_url_https].nil?
-end
-
- -
- - -
- Also aliased as: profile_image_url -
- - - -
- - -
- - - -
- profile_image_uri?() - click to toggle source -
- - -
- -

@return [Boolean]

- - - -
-
-# File lib/twitter/profile.rb, line 74
-def profile_image_uri?
-  !!@attrs[:profile_image_url_https]
-end
-
- -
- - - - -
- - -
- - - -
- profile_image_uri_https(size = :normal) - click to toggle source -
- - -
- -

Return the secure URL to the user’s profile image

- -

@param size [String, Symbol] The size of the image. Must be one of: ‘mini’, -‘normal’, ‘bigger’ or ‘original’ @return [Addressable::URI]

- - - -
-
-# File lib/twitter/profile.rb, line 62
-def profile_image_uri_https(size = :normal)
-  # The profile image URL comes in looking like like this:
-  # https://a0.twimg.com/profile_images/1759857427/image1326743606_normal.png
-  # It can be converted to any of the following sizes:
-  # https://a0.twimg.com/profile_images/1759857427/image1326743606.png
-  # https://a0.twimg.com/profile_images/1759857427/image1326743606_mini.png
-  # https://a0.twimg.com/profile_images/1759857427/image1326743606_bigger.png
-  parse_encoded_uri(@attrs[:profile_image_url_https].sub(PROFILE_IMAGE_SUFFIX_REGEX, profile_image_suffix(size))) unless @attrs[:profile_image_url_https].nil?
-end
-
- -
- - -
- Also aliased as: profile_image_url_https -
- - - -
- - -
- - - -
- profile_image_url(size = :normal) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: profile_image_uri -
- -
- - -
- - - -
- profile_image_url_https(size = :normal) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: profile_image_uri_https -
- -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/ProfileBanner.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/ProfileBanner.html deleted file mode 100644 index 5b957b4..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/ProfileBanner.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - - Class: Twitter::ProfileBanner - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::ProfileBanner

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- sizes() - click to toggle source -
- - -
- -

Returns an array of photo sizes

- -

@return [Array<Twitter::Size>]

- - - -
-
-# File lib/twitter/profile_banner.rb, line 8
-def sizes
-  @attrs.fetch(:sizes, []).inject({}) do |object, (key, value)|
-    object[key] = Size.new(value)
-    object
-  end
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST.html deleted file mode 100644 index 5a2f21b..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST.html +++ /dev/null @@ -1,459 +0,0 @@ - - - - - - - Module: Twitter::REST - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- - - - - -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST

- -
- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/API.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/API.html deleted file mode 100644 index 3c114f8..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/API.html +++ /dev/null @@ -1,414 +0,0 @@ - - - - - - - Module: Twitter::REST::API - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- - - -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::API

- -
- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Client.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Client.html deleted file mode 100644 index 946156e..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Client.html +++ /dev/null @@ -1,741 +0,0 @@ - - - - - - - Class: Twitter::REST::Client - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - - - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::Client

- -
- -

Wrapper for the Twitter REST API

- -

@note All methods have been separated into modules and follow the same -grouping used in {dev.twitter.com/doc the Twitter API -Documentation}. @see dev.twitter.com/pages/every_developer

- -
- - - - -
- - - - - - -
-

Constants

-
- -
ENDPOINT
- -
- - -
URL_PREFIX
- -
- - -
-
- - - - -
-

Attributes

- - -
- - - - -
- bearer_token[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Instance Methods

- - -
- - - -
- bearer_token?() - click to toggle source -
- - -
- -

@return [Boolean]

- - - -
-
-# File lib/twitter/rest/client.rb, line 89
-def bearer_token?
-  !!bearer_token
-end
-
- -
- - - - -
- - -
- - - -
- connection_options() - click to toggle source -
- - -
- -

@return [Hash]

- - - -
-
-# File lib/twitter/rest/client.rb, line 33
-def connection_options
-  @connection_options ||= {
-    :builder => middleware,
-    :headers => {
-      :accept => 'application/json',
-      :user_agent => user_agent,
-    },
-    :request => {
-      :open_timeout => 10,
-      :timeout => 30,
-    },
-    :proxy => proxy
-  }
-end
-
- -
- - - - -
- - -
- - - -
- connection_options=(connection_options) - click to toggle source -
- - -
- -

@param connection_options -[Hash] @return [Hash]

- - - -
-
-# File lib/twitter/rest/client.rb, line 27
-def connection_options=(connection_options)
-  warn "#{Kernel.caller.first}: [DEPRECATION] Twitter::REST::Client#connection_options= is deprecated and will be removed in version 6.0.0."
-  @connection_options = connection_options
-end
-
- -
- - - - -
- - -
- - - -
- credentials?() - click to toggle source -
- - -
- -

@return [Boolean]

- - - -
-
-# File lib/twitter/rest/client.rb, line 94
-def credentials?
-  super || bearer_token?
-end
-
- -
- - - - -
- - -
- - - -
- get(path, params = {}) - click to toggle source -
- - -
- -

Perform an HTTP GET request

- - - -
-
-# File lib/twitter/rest/client.rb, line 77
-def get(path, params = {})
-  headers = request_headers(:get, URL_PREFIX + path, params)
-  request(:get, path, params, headers)
-end
-
- -
- - - - -
- - -
- - - -
- middleware() - click to toggle source -
- - -
- -

@note Faraday’s middleware stack implementation is comparable to that of -Rack middleware. The order of middleware is important: the first -middleware on the list wraps all others, while the last middleware is the -innermost one. @see github.com/technoweenie/faraday#advanced-middleware-usage -@see mislav.uniqpath.com/2011/07/faraday-advanced-http/ -@return [Faraday::RackBuilder]

- - - -
-
-# File lib/twitter/rest/client.rb, line 59
-def middleware
-  @middleware ||= Faraday::RackBuilder.new do |faraday|
-    # Convert file uploads to Faraday::UploadIO objects
-    faraday.request :multipart_with_file
-    # Checks for files in the payload, otherwise leaves everything untouched
-    faraday.request :multipart
-    # Encodes as "application/x-www-form-urlencoded" if not already encoded
-    faraday.request :url_encoded
-    # Handle error responses
-    faraday.response :raise_error
-    # Parse JSON response bodies
-    faraday.response :parse_json
-    # Set default HTTP adapter
-    faraday.adapter :net_http
-  end
-end
-
- -
- - - - -
- - -
- - - -
- middleware=(middleware) - click to toggle source -
- - -
- -

@params middleware [Faraday::RackBuilder] @return [Faraday::RackBuilder]

- - - -
-
-# File lib/twitter/rest/client.rb, line 50
-def middleware=(middleware)
-  warn "#{Kernel.caller.first}: [DEPRECATION] Twitter::REST::Client#middleware= is deprecated and will be removed in version 6.0.0."
-  @middleware = middleware
-end
-
- -
- - - - -
- - -
- - - -
- post(path, params = {}) - click to toggle source -
- - -
- -

Perform an HTTP POST request

- - - -
-
-# File lib/twitter/rest/client.rb, line 83
-def post(path, params = {})
-  headers = params.values.any? { |value| value.respond_to?(:to_io) } ? request_headers(:post, URL_PREFIX + path, params, {}) : request_headers(:post, URL_PREFIX + path, params)
-  request(:post, path, params, headers)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/DirectMessages.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/DirectMessages.html deleted file mode 100644 index 9ece3a3..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/DirectMessages.html +++ /dev/null @@ -1,791 +0,0 @@ - - - - - - - Module: Twitter::REST::DirectMessages - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - - - - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::DirectMessages

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- create_direct_message(user, text, options = {}) - click to toggle source -
- - -
- -

Sends a new direct message to the specified user from the authenticating -user

- -

@see dev.twitter.com/docs/api/1.1/post/direct_messages/new -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Twitter::DirectMessage] The sent message. @param user [Integer, String, -Twitter::User] A Twitter user ID, screen -name, URI, or object. @param text [String] The text of your direct message, -up to 140 characters. @param options [Hash] A customizable set of options.

- - - -
-
-# File lib/twitter/rest/direct_messages.rb, line 127
-def create_direct_message(user, text, options = {})
-  merge_user!(options, user)
-  options[:text] = text
-  perform_with_object(:post, '/1.1/direct_messages/new.json', options, Twitter::DirectMessage)
-end
-
- -
- - -
- Also aliased as: d, m, dm -
- - - -
- - -
- - - -
- d(user, text, options = {}) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: create_direct_message -
- -
- - -
- - - -
- destroy_direct_message(*args) - click to toggle source -
- - -
- -

Destroys direct messages

- -

@see dev.twitter.com/docs/api/1.1/post/direct_messages/destroy -@note This method requires an access token with RWD (read, write & -direct message) permissions. Consult The Application Permission Model for -more information. @rate_limited No @authentication Requires user context -@raise [Twitter::Error::Unauthorized] Error -raised when supplied user credentials are not valid. @return -[Array<Twitter::DirectMessage>] Deleted direct message. @overload destroy_direct_message(*ids)

- -
@param ids [Enumerable<Integer>] A collection of direct message IDs.
- -

@overload destroy_direct_message(*ids, -options)

- -
@param ids [Enumerable<Integer>] A collection of direct message IDs.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/direct_messages.rb, line 112
-def destroy_direct_message(*args)
-  parallel_objects_from_response(Twitter::DirectMessage, :post, '/1.1/direct_messages/destroy.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- direct_message(id, options = {}) - click to toggle source -
- - -
- -

Returns a direct message

- -

@see dev.twitter.com/docs/api/1.1/get/direct_messages/show -@note This method requires an access token with RWD (read, write & -direct message) permissions. Consult The Application Permission Model for -more information. @rate_limited Yes @authentication Requires user context -@raise [Twitter::Error::Unauthorized] Error -raised when supplied user credentials are not valid. @return -[Twitter::DirectMessage] The requested messages. @param id [Integer] A -direct message ID. @param options [Hash] A customizable set of options.

- - - -
-
-# File lib/twitter/rest/direct_messages.rb, line 58
-def direct_message(id, options = {})
-  options[:id] = id
-  perform_with_object(:get, '/1.1/direct_messages/show.json', options, Twitter::DirectMessage)
-end
-
- -
- - - - -
- - -
- - - -
- direct_messages(*args) - click to toggle source -
- - -
- -

@note This method requires an access token with RWD (read, write & -direct message) permissions. Consult The Application Permission Model for -more information. @rate_limited Yes @authentication Requires user context -@raise [Twitter::Error::Unauthorized] Error -raised when supplied user credentials are not valid. @return -[Array<Twitter::DirectMessage>] The requested messages. @overload direct_messages(options -= {})

- -
Returns the 20 most recent direct messages sent to the authenticating user
-
-@see https://dev.twitter.com/docs/api/1.1/get/direct_messages
-@param options [Hash] A customizable set of options.
-@option options [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID.
-@option options [Integer] :max_id Returns results with an ID less than (that is, older than) or equal to the specified ID.
-@option options [Integer] :count Specifies the number of records to retrieve. Must be less than or equal to 200.
-@option options [Integer] :page Specifies the page of results to retrieve.
- -

@overload direct_messages(*ids)

- -
Returns direct messages
-
-@see https://dev.twitter.com/docs/api/1.1/get/direct_messages/show
-@param ids [Enumerable<Integer>] A collection of direct message IDs.
- -

@overload direct_messages(*ids, -options)

- -
Returns direct messages
-
-@see https://dev.twitter.com/docs/api/1.1/get/direct_messages/show
-@param ids [Enumerable<Integer>] A collection of direct message IDs.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/direct_messages.rb, line 88
-def direct_messages(*args)
-  arguments = Twitter::Arguments.new(args)
-  if arguments.empty?
-    direct_messages_received(arguments.options)
-  else
-    pmap(arguments) do |id|
-      direct_message(id, arguments.options)
-    end
-  end
-end
-
- -
- - - - -
- - -
- - - -
- direct_messages_received(options = {}) - click to toggle source -
- - -
- -

Returns the 20 most recent direct messages sent to the authenticating user

- -

@see dev.twitter.com/docs/api/1.1/get/direct_messages -@note This method requires an access token with RWD (read, write & -direct message) permissions. Consult The Application Permission Model for -more information. @rate_limited Yes @authentication Requires user context -@raise [Twitter::Error::Unauthorized] Error -raised when supplied user credentials are not valid. @return -[Array<Twitter::DirectMessage>] Direct messages sent to the -authenticating user. @param options [Hash] A customizable set of options. -@option options [Integer] :since_id Returns results with an ID greater than -(that is, more recent than) the specified ID. @option options [Integer] -:max_id Returns results with an ID less than (that is, older than) or equal -to the specified ID. @option options [Integer] :count Specifies the number -of records to retrieve. Must be less than or equal to 200. @option options -[Integer] :page Specifies the page of results to retrieve.

- - - -
-
-# File lib/twitter/rest/direct_messages.rb, line 27
-def direct_messages_received(options = {})
-  perform_with_objects(:get, '/1.1/direct_messages.json', options, Twitter::DirectMessage)
-end
-
- -
- - - - -
- - -
- - - -
- direct_messages_sent(options = {}) - click to toggle source -
- - -
- -

Returns the 20 most recent direct messages sent by the authenticating user

- -

@see dev.twitter.com/docs/api/1.1/get/direct_messages/sent -@note This method requires an access token with RWD (read, write & -direct message) permissions. Consult The Application Permission Model for -more information. @rate_limited Yes @authentication Requires user context -@raise [Twitter::Error::Unauthorized] Error -raised when supplied user credentials are not valid. @return -[Array<Twitter::DirectMessage>] Direct messages sent by the -authenticating user. @param options [Hash] A customizable set of options. -@option options [Integer] :since_id Returns results with an ID greater than -(that is, more recent than) the specified ID. @option options [Integer] -:max_id Returns results with an ID less than (that is, older than) or equal -to the specified ID. @option options [Integer] :count Specifies the number -of records to retrieve. Must be less than or equal to 200. @option options -[Integer] :page Specifies the page of results to retrieve.

- - - -
-
-# File lib/twitter/rest/direct_messages.rb, line 44
-def direct_messages_sent(options = {})
-  perform_with_objects(:get, '/1.1/direct_messages/sent.json', options, Twitter::DirectMessage)
-end
-
- -
- - - - -
- - -
- - - -
- dm(user, text, options = {}) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: create_direct_message -
- -
- - -
- - - -
- m(user, text, options = {}) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: create_direct_message -
- -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Favorites.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Favorites.html deleted file mode 100644 index a4600a7..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Favorites.html +++ /dev/null @@ -1,790 +0,0 @@ - - - - - - - Module: Twitter::REST::Favorites - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::Favorites

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- create_favorite!(*args) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: favorite! -
- -
- - -
- - - -
- destroy_favorite(*args) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: unfavorite -
- -
- - -
- - - -
- fav(*args) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: favorite -
- -
- - -
- - - -
- fav!(*args) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: favorite! -
- -
- - -
- - - -
- fave(*args) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: favorite -
- -
- - -
- - - -
- fave!(*args) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: favorite! -
- -
- - -
- - - -
- favorite(*args) - click to toggle source -
- - -
- -

Favorites the specified Tweets as the authenticating user

- -

@see dev.twitter.com/docs/api/1.1/post/favorites/create -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::Tweet>] The favorited Tweets. @overload favorite(*tweets)

- -
@param tweets [Enumerable<Integer, String, URI, Twitter::Tweet>] A collection of Tweet IDs, URIs, or objects.
- -

@overload favorite(*tweets, options)

- -
@param tweets [Enumerable<Integer, String, URI, Twitter::Tweet>] A collection of Tweet IDs, URIs, or objects.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/favorites.rb, line 69
-def favorite(*args)
-  arguments = Twitter::Arguments.new(args)
-  pmap(arguments) do |tweet|
-    begin
-      perform_with_object(:post, '/1.1/favorites/create.json', arguments.options.merge(:id => extract_id(tweet)), Twitter::Tweet)
-    rescue Twitter::Error::AlreadyFavorited
-      next
-    end
-  end.compact
-end
-
- -
- - -
- Also aliased as: fav, fave -
- - - -
- - -
- - - -
- favorite!(*args) - click to toggle source -
- - -
- -

Favorites the specified Tweets as the authenticating user and raises an -error if one has already been favorited

- -

@see dev.twitter.com/docs/api/1.1/post/favorites/create -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::AlreadyFavorited] Error raised -when tweet has already been favorited. @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::Tweet>] The favorited Tweets. @overload favorite(*tweets)

- -
@param tweets [Enumerable<Integer, String, URI, Twitter::Tweet>] A collection of Tweet IDs, URIs, or objects.
- -

@overload favorite(*tweets, options)

- -
@param tweets [Enumerable<Integer, String, URI, Twitter::Tweet>] A collection of Tweet IDs, URIs, or objects.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/favorites.rb, line 96
-def favorite!(*args)
-  arguments = Twitter::Arguments.new(args)
-  pmap(arguments) do |tweet|
-    perform_with_object(:post, '/1.1/favorites/create.json', arguments.options.merge(:id => extract_id(tweet)), Twitter::Tweet)
-  end
-end
-
- -
- - -
- Also aliased as: create_favorite!, fav!, fave! -
- - - -
- - -
- - - -
- favorites(*args) - click to toggle source -
- - -
- -

@see dev.twitter.com/docs/api/1.1/get/favorites/list -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::Tweet>] favorite Tweets. -@overload favorites(options = {})

- -
Returns the 20 most recent favorite Tweets for the authenticating user
-
-@param options [Hash] A customizable set of options.
-@option options [Integer] :count Specifies the number of records to retrieve. Must be less than or equal to 100.
-@option options [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID.
- -

@overload favorites(user, options = {})

- -
Returns the 20 most recent favorite Tweets for the specified user
-
-@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param options [Hash] A customizable set of options.
-@option options [Integer] :count Specifies the number of records to retrieve. Must be less than or equal to 100.
-@option options [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID.
- - - -
-
-# File lib/twitter/rest/favorites.rb, line 33
-def favorites(*args)
-  arguments = Twitter::Arguments.new(args)
-  merge_user!(arguments.options, arguments.pop) if arguments.last
-  perform_with_objects(:get, '/1.1/favorites/list.json', arguments.options, Twitter::Tweet)
-end
-
- -
- - - - -
- - -
- - - -
- unfavorite(*args) - click to toggle source -
- - -
- -

Un-favorites the specified Tweets as the -authenticating user

- -

@see dev.twitter.com/docs/api/1.1/post/favorites/destroy -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::Tweet>] The un-favorited Tweets. @overload unfavorite(*tweets)

- -
@param tweets [Enumerable<Integer, String, URI, Twitter::Tweet>] A collection of Tweet IDs, URIs, or objects.
- -

@overload unfavorite(*tweets, options)

- -
@param tweets [Enumerable<Integer, String, URI, Twitter::Tweet>] A collection of Tweet IDs, URIs, or objects.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/favorites.rb, line 51
-def unfavorite(*args)
-  parallel_objects_from_response(Twitter::Tweet, :post, '/1.1/favorites/destroy.json', args)
-end
-
- -
- - -
- Also aliased as: destroy_favorite -
- - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/FriendsAndFollowers.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/FriendsAndFollowers.html deleted file mode 100644 index ddb4251..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/FriendsAndFollowers.html +++ /dev/null @@ -1,1323 +0,0 @@ - - - - - - - Module: Twitter::REST::FriendsAndFollowers - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- - - -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::FriendsAndFollowers

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- create_friendship(*args) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: follow -
- -
- - -
- - - -
- create_friendship!(*args) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: follow! -
- -
- - -
- - - -
- destroy_friendship(*args) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: unfollow -
- -
- - -
- - - -
- follow(*args) - click to toggle source -
- - -
- -

Allows the authenticating user to follow the specified users, unless they -are already followed

- -

@see dev.twitter.com/docs/api/1.1/post/friendships/create -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::User>] The followed users. @overload follow(*users)

- -
@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
- -

@overload follow(*users, options)

- -
@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
-@param options [Hash] A customizable set of options.
-@option options [Boolean] :follow (false) Enable notifications for the target user.
- - - -
-
-# File lib/twitter/rest/friends_and_followers.rb, line 106
-def follow(*args)
-  arguments = Twitter::Arguments.new(args)
-  existing_friends = Thread.new do
-    friend_ids.to_a
-  end
-  new_friends = Thread.new do
-    users(args).collect(&:id)
-  end
-  follow!(new_friends.value - existing_friends.value, arguments.options)
-end
-
- -
- - -
- Also aliased as: create_friendship -
- - - -
- - -
- - - -
- follow!(*args) - click to toggle source -
- - -
- -

Allows the authenticating user to follow the specified users

- -

@see dev.twitter.com/docs/api/1.1/post/friendships/create -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::User>] The followed users. @overload follow!(*users)

- -
@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
- -

@overload follow!(*users, options)

- -
@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
-@param options [Hash] A customizable set of options.
-@option options [Boolean] :follow (false) Enable notifications for the target user.
- - - -
-
-# File lib/twitter/rest/friends_and_followers.rb, line 132
-def follow!(*args)
-  arguments = Twitter::Arguments.new(args)
-  pmap(arguments) do |user|
-    perform_with_object(:post, '/1.1/friendships/create.json', merge_user(arguments.options, user), Twitter::User)
-  end.compact
-end
-
- -
- - -
- Also aliased as: create_friendship! -
- - - -
- - -
- - - -
- follower_ids(*args) - click to toggle source -
- - -
- -

@see dev.twitter.com/docs/api/1.1/get/followers/ids -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::Cursor] -@overload follower_ids(options -= {})

- -
Returns an array of numeric IDs for every user following the authenticated user
-
-@param options [Hash] A customizable set of options.
- -

@overload follower_ids(user, -options = {})

- -
Returns an array of numeric IDs for every user following the specified user
-
-@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/friends_and_followers.rb, line 47
-def follower_ids(*args)
-  cursor_from_response_with_user(:ids, nil, :get, '/1.1/followers/ids.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- followers(*args) - click to toggle source -
- - -
- -

Returns a cursored collection of user objects for users following the -specified user.

- -

@see dev.twitter.com/docs/api/1.1/get/followers/list -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::Cursor] -@overload followers(options = {})

- -
Returns a cursored collection of user objects for users following the authenticated user.
-
-@param options [Hash] A customizable set of options.
-@option options [Boolean, String, Integer] :skip_status Do not include contributee's Tweets when set to true, 't' or 1.
-@option options [Boolean, String, Integer] :include_user_entities The user entities node will be disincluded when set to false.
- -

@overload followers(user, options = {})

- -
Returns a cursored collection of user objects for users following the specified user.
-
-@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param options [Hash] A customizable set of options.
-@option options [Boolean, String, Integer] :skip_status Do not include contributee's Tweets when set to true, 't' or 1.
-@option options [Boolean, String, Integer] :include_user_entities The user entities node will be disincluded when set to false.
- - - -
-
-# File lib/twitter/rest/friends_and_followers.rb, line 229
-def followers(*args)
-  cursor_from_response_with_user(:users, Twitter::User, :get, '/1.1/followers/list.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- following(*args) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: friends -
- -
- - -
- - - -
- friend_ids(*args) - click to toggle source -
- - -
- -

@see dev.twitter.com/docs/api/1.1/get/friends/ids -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::Cursor] -@overload friend_ids(options -= {})

- -
Returns an array of numeric IDs for every user the authenticated user is following
-
-@param options [Hash] A customizable set of options.
- -

@overload friend_ids(user, -options = {})

- -
Returns an array of numeric IDs for every user the specified user is following
-
-@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/friends_and_followers.rb, line 29
-def friend_ids(*args)
-  cursor_from_response_with_user(:ids, nil, :get, '/1.1/friends/ids.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- friends(*args) - click to toggle source -
- - -
- -

Returns a cursored collection of user objects for every user the specified -user is following (otherwise known as their “friends”).

- -

@see dev.twitter.com/docs/api/1.1/get/friends/list -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::Cursor] -@overload friends(options = {})

- -
Returns a cursored collection of user objects for every user the authenticated user is following (otherwise known as their "friends").
-
-@param options [Hash] A customizable set of options.
-@option options [Boolean, String, Integer] :skip_status Do not include contributee's Tweets when set to true, 't' or 1.
-@option options [Boolean, String, Integer] :include_user_entities The user entities node will be disincluded when set to false.
- -

@overload friends(user, options = {})

- -
Returns a cursored collection of user objects for every user the specified user is following (otherwise known as their "friends").
-
-@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param options [Hash] A customizable set of options.
-@option options [Boolean, String, Integer] :skip_status Do not include contributee's Tweets when set to true, 't' or 1.
-@option options [Boolean, String, Integer] :include_user_entities The user entities node will be disincluded when set to false.
- - - -
-
-# File lib/twitter/rest/friends_and_followers.rb, line 253
-def friends(*args)
-  cursor_from_response_with_user(:users, Twitter::User, :get, '/1.1/friends/list.json', args)
-end
-
- -
- - -
- Also aliased as: following -
- - - -
- - -
- - - -
- friendship(source, target, options = {}) - click to toggle source -
- - -
- -

Returns detailed information about the relationship between two users

- -

@see dev.twitter.com/docs/api/1.1/get/friendships/show -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Twitter::Relationship] @param source [Integer, String, Twitter::User] The -Twitter user ID, screen name, or object of -the source user. @param target [Integer, String, Twitter::User] The Twitter user ID, screen name, or object of -the target user. @param options [Hash] A customizable set of options.

- - - -
-
-# File lib/twitter/rest/friends_and_followers.rb, line 185
-def friendship(source, target, options = {})
-  merge_user!(options, source, 'source')
-  options[:source_id] = options.delete(:source_user_id) unless options[:source_user_id].nil?
-  merge_user!(options, target, 'target')
-  options[:target_id] = options.delete(:target_user_id) unless options[:target_user_id].nil?
-  perform_with_object(:get, '/1.1/friendships/show.json', options, Twitter::Relationship)
-end
-
- -
- - -
- Also aliased as: friendship_show, relationship -
- - - -
- - -
- - - -
- friendship?(source, target, options = {}) - click to toggle source -
- - -
- -

Test for the existence of friendship between two users

- -

@see dev.twitter.com/docs/api/1.1/get/friendships/show -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Boolean] true if -user_a follows user_b, otherwise false. @param source [Integer, String, -Twitter::User] The Twitter user ID, screen -name, or object of the source user. @param target [Integer, String, -Twitter::User] The Twitter user ID, screen -name, or object of the target user. @param options [Hash] A customizable -set of options.

- - - -
-
-# File lib/twitter/rest/friends_and_followers.rb, line 205
-def friendship?(source, target, options = {})
-  friendship(source, target, options).source.following?
-end
-
- -
- - - - -
- - -
- - - -
- friendship_show(source, target, options = {}) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: friendship -
- -
- - -
- - - -
- friendship_update(user, options = {}) - click to toggle source -
- - -
- -

Allows one to enable or disable retweets and device notifications from the -specified user.

- -

@see dev.twitter.com/docs/api/1.1/post/friendships/update -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Twitter::Relationship] @param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object. -@param options [Hash] A customizable set of options. @option options -[Boolean] :device Enable/disable device notifications from the target user. -@option options [Boolean] :retweets Enable/disable retweets from the target -user.

- - - -
-
-# File lib/twitter/rest/friends_and_followers.rb, line 170
-def friendship_update(user, options = {})
-  merge_user!(options, user)
-  perform_with_object(:post, '/1.1/friendships/update.json', options, Twitter::Relationship)
-end
-
- -
- - - - -
- - -
- - - -
- friendships(*args) - click to toggle source -
- - -
- -

Returns the relationship of the authenticating user to the comma separated -list of up to 100 screen_names or user_ids provided. Values for connections -can be: following, following_requested, followed_by, none.

- -

@see dev.twitter.com/docs/api/1.1/get/friendships/lookup -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::User>] The requested users. @overload -friendships(*users)

- -
@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
- -

@overload friendships(*users, options)

- -
@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/friends_and_followers.rb, line 63
-def friendships(*args)
-  arguments = Twitter::Arguments.new(args)
-  merge_users!(arguments.options, arguments)
-  perform_with_objects(:get, '/1.1/friendships/lookup.json', arguments.options, Twitter::User)
-end
-
- -
- - - - -
- - -
- - - -
- friendships_incoming(options = {}) - click to toggle source -
- - -
- -

Returns an array of numeric IDs for every user who has a pending request to -follow the authenticating user

- -

@see dev.twitter.com/docs/api/1.1/get/friendships/incoming -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::Cursor] -@param options [Hash] A customizable set of options.

- - - -
-
-# File lib/twitter/rest/friends_and_followers.rb, line 77
-def friendships_incoming(options = {})
-  perform_with_cursor(:get, '/1.1/friendships/incoming.json', options, :ids)
-end
-
- -
- - - - -
- - -
- - - -
- friendships_outgoing(options = {}) - click to toggle source -
- - -
- -

Returns an array of numeric IDs for every protected user for whom the -authenticating user has a pending follow request

- -

@see dev.twitter.com/docs/api/1.1/get/friendships/outgoing -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::Cursor] -@param options [Hash] A customizable set of options.

- - - -
-
-# File lib/twitter/rest/friends_and_followers.rb, line 89
-def friendships_outgoing(options = {})
-  perform_with_cursor(:get, '/1.1/friendships/outgoing.json', options, :ids)
-end
-
- -
- - - - -
- - -
- - - -
- no_retweet_ids(options = {}) - click to toggle source -
- - -
- -

Returns a collection of user IDs that the currently authenticated user does -not want to receive retweets from. @see dev.twitter.com/docs/api/1.1/get/friendships/no_retweets/ids -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Integer>] @param options [Hash] A customizable set of options.

- - - -
-
-# File lib/twitter/rest/friends_and_followers.rb, line 265
-def no_retweet_ids(options = {})
-  get('/1.1/friendships/no_retweets/ids.json', options).body.collect(&:to_i)
-end
-
- -
- - -
- Also aliased as: no_retweets_ids -
- - - -
- - -
- - - -
- no_retweets_ids(options = {}) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: no_retweet_ids -
- -
- - -
- - - -
- relationship(source, target, options = {}) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: friendship -
- -
- - -
- - - -
- unfollow(*args) - click to toggle source -
- - -
- -

Allows the authenticating user to unfollow the specified users

- -

@see dev.twitter.com/docs/api/1.1/post/friendships/destroy -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::User>] The unfollowed users. @overload -unfollow(*users)

- -
@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
- -

@overload unfollow(*users, options)

- -
@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/friends_and_followers.rb, line 153
-def unfollow(*args)
-  parallel_users_from_response(:post, '/1.1/friendships/destroy.json', args)
-end
-
- -
- - -
- Also aliased as: destroy_friendship -
- - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Help.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Help.html deleted file mode 100644 index a30b0a9..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Help.html +++ /dev/null @@ -1,534 +0,0 @@ - - - - - - - Module: Twitter::REST::Help - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::Help

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- configuration(options = {}) - click to toggle source -
- - -
- -

Returns the current configuration used by Twitter

- -

@see dev.twitter.com/docs/api/1.1/get/help/configuration -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Twitter::Configuration] Twitter’s configuration.

- - - -
-
-# File lib/twitter/rest/help.rb, line 18
-def configuration(options = {})
-  perform_with_object(:get, '/1.1/help/configuration.json', options, Twitter::Configuration)
-end
-
- -
- - - - -
- - -
- - - -
- languages(options = {}) - click to toggle source -
- - -
- -

Returns the list of languages supported by Twitter

- -

@see dev.twitter.com/docs/api/1.1/get/help/languages -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::Language>]

- - - -
-
-# File lib/twitter/rest/help.rb, line 29
-def languages(options = {})
-  perform_with_objects(:get, '/1.1/help/languages.json', options, Twitter::Language)
-end
-
- -
- - - - -
- - -
- - - -
- privacy(options = {}) - click to toggle source -
- - -
- -

Returns {twitter.com/privacy -Twitter’s Privacy Policy}

- -

@see dev.twitter.com/docs/api/1.1/get/help/privacy -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [String]

- - - -
-
-# File lib/twitter/rest/help.rb, line 40
-def privacy(options = {})
-  get('/1.1/help/privacy.json', options).body[:privacy]
-end
-
- -
- - - - -
- - -
- - - -
- tos(options = {}) - click to toggle source -
- - -
- -

Returns {twitter.com/tos Twitter’s -Terms of Service}

- -

@see dev.twitter.com/docs/api/1.1/get/help/tos -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [String]

- - - -
-
-# File lib/twitter/rest/help.rb, line 51
-def tos(options = {})
-  get('/1.1/help/tos.json', options).body[:tos]
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Lists.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Lists.html deleted file mode 100644 index d476e03..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Lists.html +++ /dev/null @@ -1,1463 +0,0 @@ - - - - - - - Module: Twitter::REST::Lists - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- - - -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::Lists

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
MAX_USERS_PER_REQUEST
- -
- - -
URI_SUBSTRING
- -
- - -
-
- - - - - - -
-

Public Instance Methods

- - -
- - - -
- add_list_member(*args) - click to toggle source -
- - -
- -

Add a member to a list

- -

@see dev.twitter.com/docs/api/1.1/post/lists/members/create -@note Lists are limited to having 500 members. -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::List] The -list. @overload add_list_member(list, -user_to_add, options = {})

- -
@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param user_to_add [Integer, String] The user id or screen name to add to the list.
-@param options [Hash] A customizable set of options.
- -

@overload add_list_member(user, list, -user_to_add, options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param user_to_add [Integer, String] The user id or screen name to add to the list.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/lists.rb, line 258
-def add_list_member(*args)
-  list_from_response_with_user(:post, '/1.1/lists/members/create.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- add_list_members(*args) - click to toggle source -
- - -
- -

Adds specified members to a list

- -

@see dev.twitter.com/docs/api/1.1/post/lists/members/create_all -@note Lists are limited to having 500 members, and -you are limited to adding up to 100 members to a list at a time with this -method. @rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::List] The -list. @overload add_list_members(list, -users, options = {})

- -
@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
-@param options [Hash] A customizable set of options.
- -

@overload add_list_members(user, -list, users, options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/lists.rb, line 198
-def add_list_members(*args)
-  list_from_response_with_users(:post, '/1.1/lists/members/create_all.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- create_list(name, options = {}) - click to toggle source -
- - -
- -

Creates a new list for the authenticated user

- -

@see dev.twitter.com/docs/api/1.1/post/lists/create -@note Accounts are limited to 20 lists. @rate_limited No @authentication -Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are -not valid. @return [Twitter::List] The created list. @param name [String] -The name for the list. @param options [Hash] A customizable set of options. -@option options [String] :mode (‘public’) Whether your list is public or -private. Values can be ‘public’ or ‘private’. @option options [String] -:description The description to give the list.

- - - -
-
-# File lib/twitter/rest/lists.rb, line 317
-def create_list(name, options = {})
-  perform_with_object(:post, '/1.1/lists/create.json', options.merge(:name => name), Twitter::List)
-end
-
- -
- - - - -
- - -
- - - -
- destroy_list(*args) - click to toggle source -
- - -
- -

Deletes the specified list

- -

@see dev.twitter.com/docs/api/1.1/post/lists/destroy -@note Must be owned by the authenticated user. @rate_limited No -@authentication Requires user context @raise [Twitter::Error::Unauthorized] -Error raised when supplied user credentials are -not valid. @return [Twitter::List] The deleted list. @overload destroy_list(list, options = -{})

- -
@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param options [Hash] A customizable set of options.
- -

@overload destroy_list(user, -list, options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/lists.rb, line 278
-def destroy_list(*args)
-  list_from_response(:post, '/1.1/lists/destroy.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- list(*args) - click to toggle source -
- - -
- -

Show the specified list

- -

@see dev.twitter.com/docs/api/1.1/get/lists/show -@note Private lists will only be shown if the authenticated user owns the -specified list. @rate_limited Yes @authentication Requires user context -@raise [Twitter::Error::Unauthorized] Error -raised when supplied user credentials are not valid. @return -[Twitter::List] The specified list. @overload list(list, options = {})

- -
@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param options [Hash] A customizable set of options.
- -

@overload list(user, list, options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/lists.rb, line 337
-def list(*args)
-  list_from_response(:get, '/1.1/lists/show.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- list_member?(*args) - click to toggle source -
- - -
- -

Check if a user is a member of the specified list

- -

@see dev.twitter.com/docs/api/1.1/get/lists/members/show -@authentication Requires user context @rate_limited Yes @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Boolean] true if -user is a member of the specified list, otherwise false. @overload -list_member?(list, user_to_check, options = {})

- -
@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param user_to_check [Integer, String] The user ID or screen name of the list member.
-@param options [Hash] A customizable set of options.
- -

@overload list_member?(user, list, user_to_check, options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param user_to_check [Integer, String] The user ID or screen name of the list member.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/lists.rb, line 219
-def list_member?(*args)
-  list_user?(:get, '/1.1/lists/members/show.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- list_members(*args) - click to toggle source -
- - -
- -

Returns the members of the specified list

- -

@see dev.twitter.com/docs/api/1.1/get/lists/members -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::Cursor] -@overload list_members(list, -options = {})

- -
@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param options [Hash] A customizable set of options.
- -

@overload list_members(user, -list, options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/lists.rb, line 237
-def list_members(*args)
-  cursor_from_response_with_list(:get, '/1.1/lists/members.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- list_subscribe(*args) - click to toggle source -
- - -
- -

Make the authenticated user follow the specified list

- -

@see dev.twitter.com/docs/api/1.1/post/lists/subscribers/create -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::List] The -specified list. @overload list_subscribe(list, options -= {})

- -
@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param options [Hash] A customizable set of options.
- -

@overload list_subscribe(user, list, -options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/lists.rb, line 138
-def list_subscribe(*args)
-  list_from_response(:post, '/1.1/lists/subscribers/create.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- list_subscriber?(*args) - click to toggle source -
- - -
- -

Check if a user is a subscriber of the specified list

- -

@see dev.twitter.com/docs/api/1.1/get/lists/subscribers/show -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Boolean] true if -user is a subscriber of the specified list, otherwise false. @overload -list_subscriber?(list, user_to_check, options = {})

- -
@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param user_to_check [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param options [Hash] A customizable set of options.
- -

@overload list_subscriber?(user, list, user_to_check, options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param user_to_check [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param options [Hash] A customizable set of options.
- -

@return [Boolean] true if user is a subscriber of the specified list, -otherwise false.

- - - -
-
-# File lib/twitter/rest/lists.rb, line 159
-def list_subscriber?(*args)
-  list_user?(:get, '/1.1/lists/subscribers/show.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- list_subscribers(*args) - click to toggle source -
- - -
- -

Returns the subscribers of the specified list

- -

@see dev.twitter.com/docs/api/1.1/get/lists/subscribers -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::Cursor] The -subscribers of the specified list. @overload list_subscribers(list, -options = {})

- -
@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param options [Hash] A customizable set of options.
- -

@overload list_subscribers(user, -list, options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/lists.rb, line 120
-def list_subscribers(*args)
-  cursor_from_response_with_list(:get, '/1.1/lists/subscribers.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- list_timeline(*args) - click to toggle source -
- - -
- -

Show tweet timeline for members of the specified list

- -

@see dev.twitter.com/docs/api/1.1/get/lists/statuses -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::Tweet>] @overload list_timeline(list, options = -{})

- -
@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param options [Hash] A customizable set of options.
-@option options [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID.
-@option options [Integer] :max_id Returns results with an ID less than (that is, older than) or equal to the specified ID.
-@option options [Integer] :count The number of results to retrieve.
- -

@overload list_timeline(user, list, -options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param options [Hash] A customizable set of options.
-@option options [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID.
-@option options [Integer] :max_id Returns results with an ID less than (that is, older than) or equal to the specified ID.
-@option options [Integer] :count The number of results to retrieve.
- - - -
-
-# File lib/twitter/rest/lists.rb, line 58
-def list_timeline(*args)
-  arguments = Twitter::Arguments.new(args)
-  merge_list!(arguments.options, arguments.pop)
-  merge_owner!(arguments.options, arguments.pop)
-  perform_with_objects(:get, '/1.1/lists/statuses.json', arguments.options, Twitter::Tweet)
-end
-
- -
- - - - -
- - -
- - - -
- list_unsubscribe(*args) - click to toggle source -
- - -
- -

Unsubscribes the authenticated user form the specified list

- -

@see dev.twitter.com/docs/api/1.1/post/lists/subscribers/destroy -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::List] The -specified list. @overload list_unsubscribe(list, -options = {})

- -
@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param options [Hash] A customizable set of options.
- -

@overload list_unsubscribe(user, -list, options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/lists.rb, line 177
-def list_unsubscribe(*args)
-  list_from_response(:post, '/1.1/lists/subscribers/destroy.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- list_update(*args) - click to toggle source -
- - -
- -

Updates the specified list

- -

@see dev.twitter.com/docs/api/1.1/post/lists/update -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::List] The -created list. @overload list_update(list, options = {})

- -
@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param options [Hash] A customizable set of options.
-@option options [String] :mode ('public') Whether your list is public or private. Values can be 'public' or 'private'.
-@option options [String] :description The description to give the list.
- -

@overload list_update(user, -list, options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param options [Hash] A customizable set of options.
-@option options [String] :mode ('public') Whether your list is public or private. Values can be 'public' or 'private'.
-@option options [String] :description The description to give the list.
- - - -
-
-# File lib/twitter/rest/lists.rb, line 301
-def list_update(*args)
-  list_from_response(:post, '/1.1/lists/update.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- lists(*args) - click to toggle source -
- - -
- -

Returns all lists the authenticating or specified user subscribes to, -including their own

- -

@see dev.twitter.com/docs/api/1.1/get/lists/list -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::List>] @overload lists(options = {})

- -
@param options [Hash] A customizable set of options.
-@option options [Boolean] :reverse Set this to true if you would like owned lists to be returned first.
- -

@overload lists(user, options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param options [Hash] A customizable set of options.
-@option options [Boolean] :reverse Set this to true if you would like owned lists to be returned first.
- - - -
-
-# File lib/twitter/rest/lists.rb, line 33
-def lists(*args)
-  objects_from_response_with_user(Twitter::List, :get, '/1.1/lists/list.json', args)
-end
-
- -
- - -
- Also aliased as: lists_subscribed_to -
- - - -
- - -
- - - -
- lists_subscribed_to(*args) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: lists -
- -
- - -
- - - -
- memberships(*args) - click to toggle source -
- - -
- -

List the lists the specified user has been added -to

- -

@see dev.twitter.com/docs/api/1.1/get/lists/memberships -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::Cursor] -@overload memberships(options = {})

- -
@param options [Hash] A customizable set of options.
-@option options [Integer] :count The amount of results to return per page. Defaults to 20. No more than 1000 results will ever be returned in a single page.
-@option options [Boolean, String, Integer] :filter_to_owned_lists When set to true, t or 1, will return just lists the authenticating user owns, and the user represented by user_id or screen_name is a member of.
- -

@overload memberships(user, options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param options [Hash] A customizable set of options.
-@option options [Integer] :count The amount of results to return per page. Defaults to 20. No more than 1000 results will ever be returned in a single page.
-@option options [Boolean, String, Integer] :filter_to_owned_lists When set to true, t or 1, will return just lists the authenticating user owns, and the user represented by user_id or screen_name is a member of.
- - - -
-
-# File lib/twitter/rest/lists.rb, line 102
-def memberships(*args)
-  cursor_from_response_with_user(:lists, Twitter::List, :get, '/1.1/lists/memberships.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- owned_lists(*args) - click to toggle source -
- - -
- -

Returns the lists owned by the specified Twitter user

- -

@see dev.twitter.com/docs/api/1.1/get/lists/ownerships -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::List>] @overload owned_lists(options = {})

- -
@param options [Hash] A customizable set of options.
-@option options [Integer] :count The amount of results to return per page. Defaults to 20. No more than 1000 results will ever be returned in a single page.
- -

@overload owned_lists(user, -options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param options [Hash] A customizable set of options.
-@option options [Integer] :count The amount of results to return per page. Defaults to 20. No more than 1000 results will ever be returned in a single page.
- - - -
-
-# File lib/twitter/rest/lists.rb, line 392
-def owned_lists(*args)
-  cursor_from_response_with_user(:lists, Twitter::List, :get, '/1.1/lists/ownerships.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- remove_list_member(*args) - click to toggle source -
- - -
- -

Removes the specified member from the list

- -

@see dev.twitter.com/docs/api/1.1/post/lists/members/destroy -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::List] The -list. @overload remove_list_member(list, -user_to_remove, options = {})

- -
@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param user_to_remove [Integer, String] The user id or screen name of the list member to remove.
-@param options [Hash] A customizable set of options.
- -

@overload remove_list_member(user, -list, user_to_remove, options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param user_to_remove [Integer, String] The user id or screen name of the list member to remove.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/lists.rb, line 81
-def remove_list_member(*args)
-  list_from_response_with_user(:post, '/1.1/lists/members/destroy.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- remove_list_members(*args) - click to toggle source -
- - -
- -

Removes specified members from the list

- -

@see dev.twitter.com/docs/api/1.1/post/lists/members/destroy_all -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::List] The -list. @overload remove_list_members(list, -users, options = {})

- -
@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
-@param options [Hash] A customizable set of options.
- -

@overload remove_list_members(user, -list, users, options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
-@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/lists.rb, line 373
-def remove_list_members(*args)
-  list_from_response_with_users(:post, '/1.1/lists/members/destroy_all.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- subscriptions(*args) - click to toggle source -
- - -
- -

List the lists the specified user follows

- -

@see dev.twitter.com/docs/api/1.1/get/lists/subscriptions -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::Cursor] -@overload subscriptions(options = {})

- -
@param options [Hash] A customizable set of options.
- -

@overload subscriptions(user, options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/lists.rb, line 353
-def subscriptions(*args)
-  cursor_from_response_with_user(:lists, Twitter::List, :get, '/1.1/lists/subscriptions.json', args)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Media.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Media.html deleted file mode 100644 index f73e2a1..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Media.html +++ /dev/null @@ -1,405 +0,0 @@ - - - - - - - Module: Twitter::REST::Media - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::Media

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- upload(media, options = {}) - click to toggle source -
- - -
- -

Uploads media to attach to a tweet

- -

@see dev.twitter.com/docs/api/multiple-media-extended-entities -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @raise -[Twitter::Error::UnacceptableIO] Error when the -IO object for the media argument does not have a to_io method. @return -[Integer] The uploaded media ID. @param media [File, Hash] A File object -with your picture (PNG, JPEG or GIF) @param options [Hash] A customizable -set of options.

- - - -
-
-# File lib/twitter/rest/media.rb, line 17
-def upload(media, options = {})
-  fail(Twitter::Error::UnacceptableIO.new) unless media.respond_to?(:to_io)
-  url_prefix = 'https://upload.twitter.com'
-  path = '/1.1/media/upload.json'
-  conn = connection.dup
-  conn.url_prefix = url_prefix
-  headers = request_headers(:post, url_prefix + path, options)
-  options.merge!(:media => media)
-  conn.post(path, options) { |request| request.headers.update(headers) }.env.body[:media_id]
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/OAuth.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/OAuth.html deleted file mode 100644 index d81541a..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/OAuth.html +++ /dev/null @@ -1,552 +0,0 @@ - - - - - - - Module: Twitter::REST::OAuth - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::OAuth

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- bearer_token(options = {}) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: token -
- -
- - -
- - - -
- invalidate_token(access_token, options = {}) - click to toggle source -
- - -
- -

Allows a registered application to revoke an issued OAuth 2 Bearer Token by -presenting its client credentials.

- -

@see dev.twitter.com/docs/api/1.1/post/oauth2/invalidate_token -@rate_limited No @authentication Required @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @param access_token [String, -Twitter::Token] The bearer token to revoke. @param options [Hash] A -customizable set of options. @return [Twitter::Token] The invalidated -token. token_type should be nil.

- - - -
-
-# File lib/twitter/rest/oauth.rb, line 42
-def invalidate_token(access_token, options = {})
-  access_token = access_token.access_token if access_token.is_a?(Twitter::Token)
-  options[:access_token] = access_token
-  perform_with_object(:post, '/oauth2/invalidate_token', options, Twitter::Token)
-end
-
- -
- - - - -
- - -
- - - -
- reverse_token() - click to toggle source -
- - -
- -

Allows a registered application to revoke an issued OAuth 2 Bearer Token by -presenting its client credentials.

- -

@see dev.twitter.com/docs/api/1.1/post/oauth2/invalidate_token -@rate_limited No @authentication Required @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [String] The token -string.

- - - -
-
-# File lib/twitter/rest/oauth.rb, line 55
-def reverse_token
-  conn = connection.dup
-  conn.builder.swap(4, Twitter::REST::Response::ParseErrorJson)
-  response = conn.post('/oauth/request_token?x_auth_mode=reverse_auth') do |request|
-    request.headers[:authorization] = oauth_auth_header(:post, 'https://api.twitter.com/oauth/request_token', :x_auth_mode => 'reverse_auth').to_s
-  end
-  response.body
-end
-
- -
- - - - -
- - -
- - - -
- token(options = {}) - click to toggle source -
- - -
- -

Allows a registered application to obtain an OAuth -2 Bearer Token, which can be used to make API requests on an application’s own behalf, without a -user context.

- -

Only one bearer token may exist outstanding for an application, and -repeated requests to this method will yield the same already-existent token -until it has been invalidated.

- -

@see dev.twitter.com/docs/api/1.1/post/oauth2/token -@rate_limited No @authentication Required @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::Token] The -Bearer Token. token_type should be ‘bearer’. -@param options [Hash] A customizable set of options. @example Generate a -Bearer Token

- -
client = Twitter::REST::Client.new(:consumer_key => "abc", :consumer_secret => 'def')
-bearer_token = client.token
- - - -
-
-# File lib/twitter/rest/oauth.rb, line 26
-def token(options = {})
-  options[:bearer_token_request] = true
-  options[:grant_type] ||= 'client_credentials'
-  perform_with_object(:post, '/oauth2/token', options, Twitter::Token)
-end
-
- -
- - -
- Also aliased as: bearer_token -
- - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/PlacesAndGeo.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/PlacesAndGeo.html deleted file mode 100644 index 3950e89..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/PlacesAndGeo.html +++ /dev/null @@ -1,676 +0,0 @@ - - - - - - - Module: Twitter::REST::PlacesAndGeo - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - - - - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::PlacesAndGeo

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- geo_search(options = {}) - click to toggle source -
- - -
- -

Search for places that can be attached to a {Twitter::REST::Tweets#update}

- -

@see dev.twitter.com/docs/api/1.1/get/geo/search -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @param options [Hash] A -customizable set of options. @option options [Float] :lat The latitude to -search around. This option will be ignored unless it is inside the range --90.0 to +90.0 (North is positive) inclusive. It will also be ignored if -there isn’t a corresponding :long option. @option options [Float] :long The -longitude to search around. The valid range for longitude is -180.0 to -+180.0 (East is positive) inclusive. This option will be ignored if outside -that range, if it is not a number, if geo_enabled is disabled, or if there -not a corresponding :lat option. @option options [String] :query Free-form -text to match against while executing a geo-based query, best suited for -finding nearby locations by name. @option options [String] :ip An IP -address. Used when attempting to fix geolocation based off of the user’s IP -address. @option options [String] :granularity (‘neighborhood’) This is the -minimal granularity of place types to return and must be one of: ‘poi’, -‘neighborhood’, ‘city’, ‘admin’ or ‘country’. @option options [String] -:accuracy (‘0m’) A hint on the “region” in which to search. If a number, -then this is a radius in meters, but it can also take a string that is -suffixed with ft to specify feet. If coming from a device, in practice, -this value is whatever accuracy the device has measuring its location -(whether it be coming from a GPS, WiFi triangulation, etc.). @option -options [Integer] :max_results A hint as to the number of results to -return. This does not guarantee that the number of results returned will -equal max_results, but instead informs how many “nearby” results to return. -Ideally, only pass in the number of places you intend to display to the -user here. @option options [String] :contained_within This is the place_id -which you would like to restrict the search results to. Setting this value -means only places within the given place_id will be found. @option options -[String] :“attribute:street_address” This option searches for places which -have this given street address. There are other well-known and -application-specific attributes available. Custom attributes are also -permitted. @return [Array<Twitter::Place>]

- - - -
-
-# File lib/twitter/rest/places_and_geo.rb, line 59
-def geo_search(options = {})
-  perform_with_object(:get, '/1.1/geo/search.json', options, Twitter::GeoResults)
-end
-
- -
- - -
- Also aliased as: places_nearby -
- - - -
- - -
- - - -
- place(place_id, options = {}) - click to toggle source -
- - -
- -

Returns all the information about a known place

- -

@see dev.twitter.com/docs/api/1.1/get/geo/id/:place_id -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @param place_id [String] A -place in the world. These IDs can be retrieved from {Twitter::REST::PlacesAndGeo#reverse_geocode}. -@param options [Hash] A customizable set of options. @return -[Twitter::Place] The requested place.

- - - -
-
-# File lib/twitter/rest/places_and_geo.rb, line 20
-def place(place_id, options = {})
-  perform_with_object(:get, "/1.1/geo/id/#{place_id}.json", options, Twitter::Place)
-end
-
- -
- - - - -
- - -
- - - -
- places_nearby(options = {}) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: geo_search -
- -
- - -
- - - -
- places_similar(options = {}) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: similar_places -
- -
- - -
- - - -
- reverse_geocode(options = {}) - click to toggle source -
- - -
- -

Searches for up to 20 places that can be used as a place_id

- -

@see dev.twitter.com/docs/api/1.1/get/geo/reverse_geocode -@note This request is an informative call and will deliver generalized -results about geography. @rate_limited Yes @authentication Requires user -context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are -not valid. @param options [Hash] A customizable set of options. @option -options [Float] :lat The latitude to search around. This option will be -ignored unless it is inside the range -90.0 to +90.0 (North is positive) -inclusive. It will also be ignored if there isn’t a corresponding :long -option. @option options [Float] :long The longitude to search around. The -valid range for longitude is -180.0 to +180.0 (East is positive) inclusive. -This option will be ignored if outside that range, if it is not a number, -if geo_enabled is disabled, or if there not a corresponding :lat option. -@option options [String] :accuracy (‘0m’) A hint on the “region” in which -to search. If a number, then this is a radius in meters, but it can also -take a string that is suffixed with ft to specify feet. If coming from a -device, in practice, this value is whatever accuracy the device has -measuring its location (whether it be coming from a GPS, WiFi -triangulation, etc.). @option options [String] :granularity -(‘neighborhood’) This is the minimal granularity of place types to return -and must be one of: ‘poi’, ‘neighborhood’, ‘city’, ‘admin’ or ‘country’. -@option options [Integer] :max_results A hint as to the number of results -to return. This does not guarantee that the number of results returned will -equal max_results, but instead informs how many “nearby” results to return. -Ideally, only pass in the number of places you intend to display to the -user here. @return [Array<Twitter::Place>]

- - - -
-
-# File lib/twitter/rest/places_and_geo.rb, line 38
-def reverse_geocode(options = {})
-  perform_with_object(:get, '/1.1/geo/reverse_geocode.json', options, Twitter::GeoResults)
-end
-
- -
- - - - -
- - -
- - - -
- similar_places(options = {}) - click to toggle source -
- - -
- -

Locates places near the given coordinates which are similar in name

- -

@see dev.twitter.com/docs/api/1.1/get/geo/similar_places -@note Conceptually, you would use this method to get a list of known places -to choose from first. Then, if the desired place doesn’t exist, make a -request to {Twitter::REST::PlacesAndGeo#place} -to create a new one. The token contained in the response is the token -necessary to create a new place. @rate_limited Yes @authentication Requires -user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are -not valid. @param options [Hash] A customizable set of options. @option -options [Float] :lat The latitude to search around. This option will be -ignored unless it is inside the range -90.0 to +90.0 (North is positive) -inclusive. It will also be ignored if there isn’t a corresponding :long -option. @option options [Float] :long The longitude to search around. The -valid range for longitude is -180.0 to +180.0 (East is positive) inclusive. -This option will be ignored if outside that range, if it is not a number, -if geo_enabled is disabled, or if there not a corresponding :lat option. -@option options [String] :name The name a place is known as. @option -options [String] :contained_within This is the place_id which you would -like to restrict the search results to. Setting this value means only -places within the given place_id will be found. @option options [String] -:“attribute:street_address” This option searches for places which have this -given street address. There are other well-known and application-specific -attributes available. Custom attributes are also permitted. @return -[Array<Twitter::Place>]

- - - -
-
-# File lib/twitter/rest/places_and_geo.rb, line 78
-def similar_places(options = {})
-  perform_with_object(:get, '/1.1/geo/similar_places.json', options, Twitter::GeoResults)
-end
-
- -
- - -
- Also aliased as: places_similar -
- - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Request.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Request.html deleted file mode 100644 index c53cea9..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Request.html +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - - Module: Twitter::REST::Request - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
- - - -
- -
- - - - - - -
-

Namespace

- -
- - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::Request

- -
- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Request/MultipartWithFile.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Request/MultipartWithFile.html deleted file mode 100644 index fa6d359..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Request/MultipartWithFile.html +++ /dev/null @@ -1,427 +0,0 @@ - - - - - - - Class: Twitter::REST::Request::MultipartWithFile - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
- - - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::Request::MultipartWithFile

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
CONTENT_TYPE
- -
- - -
GIF_REGEX
- -
- - -
JPEG_REGEX
- -
- - -
PNG_REGEX
- -
- - -
-
- - - - - - -
-

Public Instance Methods

- - -
- - - -
- call(request) - click to toggle source -
- - -
- - - - - -
-
-# File lib/twitter/rest/request/multipart_with_file.rb, line 12
-def call(request)
-  request.body.each do |key, value|
-    next unless value.respond_to?(:to_io)
-    request.body[key] = Faraday::UploadIO.new(value, mime_type(value.path), value.path)
-  end if request.body.is_a?(::Hash)
-  @app.call(request)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Response.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Response.html deleted file mode 100644 index 58e40d8..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Response.html +++ /dev/null @@ -1,358 +0,0 @@ - - - - - - - Module: Twitter::REST::Response - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- - - -
- - - - - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::Response

- -
- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Response/ParseErrorJson.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Response/ParseErrorJson.html deleted file mode 100644 index 2cc68b6..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Response/ParseErrorJson.html +++ /dev/null @@ -1,395 +0,0 @@ - - - - - - - Class: Twitter::REST::Response::ParseErrorJson - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
- - - -
- -
- - - - - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::Response::ParseErrorJson

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- unparsable_status_codes() - click to toggle source -
- - -
- - - - - -
-
-# File lib/twitter/rest/response/parse_error_json.rb, line 7
-def unparsable_status_codes
-  super + [200]
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Response/ParseJson.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Response/ParseJson.html deleted file mode 100644 index a9a8960..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Response/ParseJson.html +++ /dev/null @@ -1,483 +0,0 @@ - - - - - - - Class: Twitter::REST::Response::ParseJson - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::Response::ParseJson

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
WHITESPACE_REGEX
- -
- - -
-
- - - - - - -
-

Public Instance Methods

- - -
- - - -
- on_complete(response) - click to toggle source -
- - -
- - - - - -
-
-# File lib/twitter/rest/response/parse_json.rb, line 19
-def on_complete(response)
-  response.body = parse(response.body) if respond_to?(:parse) && !unparsable_status_codes.include?(response.status)
-end
-
- -
- - - - -
- - -
- - - -
- parse(body) - click to toggle source -
- - -
- - - - - -
-
-# File lib/twitter/rest/response/parse_json.rb, line 10
-def parse(body)
-  case body
-  when WHITESPACE_REGEX, nil
-    nil
-  else
-    JSON.parse(body, :symbolize_names => true)
-  end
-end
-
- -
- - - - -
- - -
- - - -
- unparsable_status_codes() - click to toggle source -
- - -
- - - - - -
-
-# File lib/twitter/rest/response/parse_json.rb, line 23
-def unparsable_status_codes
-  [204, 301, 302, 304]
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Response/RaiseError.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Response/RaiseError.html deleted file mode 100644 index 48801d7..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Response/RaiseError.html +++ /dev/null @@ -1,403 +0,0 @@ - - - - - - - Class: Twitter::REST::Response::RaiseError - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::Response::RaiseError

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- on_complete(response) - click to toggle source -
- - -
- - - - - -
-
-# File lib/twitter/rest/response/raise_error.rb, line 8
-def on_complete(response)
-  status_code = response.status.to_i
-  klass = Twitter::Error.errors[status_code]
-  return unless klass
-  error = if klass == Twitter::Error::Forbidden
-    handle_forbidden_errors(response)
-  else
-    klass.from_response(response)
-  end
-  fail(error)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/SavedSearches.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/SavedSearches.html deleted file mode 100644 index dc0d8f8..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/SavedSearches.html +++ /dev/null @@ -1,582 +0,0 @@ - - - - - - - Module: Twitter::REST::SavedSearches - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - - - - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::SavedSearches

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- create_saved_search(query, options = {}) - click to toggle source -
- - -
- -

Creates a saved search for the authenticated user

- -

@see dev.twitter.com/docs/api/1.1/post/saved_searches/create -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Twitter::SavedSearch] The created saved search. @param query [String] The -query of the search the user would like to save. @param options [Hash] A -customizable set of options.

- - - -
-
-# File lib/twitter/rest/saved_searches.rb, line 66
-def create_saved_search(query, options = {})
-  perform_with_object(:post, '/1.1/saved_searches/create.json', options.merge(:query => query), Twitter::SavedSearch)
-end
-
- -
- - - - -
- - -
- - - -
- destroy_saved_search(*args) - click to toggle source -
- - -
- -

Destroys saved searches for the authenticated user

- -

@see dev.twitter.com/docs/api/1.1/post/saved_searches/destroy/:id -@note The search specified by ID must be owned by the authenticating user. -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::SavedSearch>] The deleted saved searches. @overload -destroy_saved_search(*ids)

- -
@param ids [Enumerable<Integer>] A collection of saved search IDs.
- -

@overload destroy_saved_search(*ids, -options)

- -
@param ids [Enumerable<Integer>] A collection of saved search IDs.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/saved_searches.rb, line 84
-def destroy_saved_search(*args)
-  arguments = Twitter::Arguments.new(args)
-  pmap(arguments) do |id|
-    perform_with_object(:post, "/1.1/saved_searches/destroy/#{id}.json", arguments.options, Twitter::SavedSearch)
-  end
-end
-
- -
- - - - -
- - -
- - - -
- saved_search(id, options = {}) - click to toggle source -
- - -
- -

Retrieve the data for saved searches owned by the authenticating user

- -

@see dev.twitter.com/docs/api/1.1/get/saved_searches/show/:id -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Twitter::SavedSearch] The saved searches. @param id [Integer] The ID of -the saved search. @param options [Hash] A customizable set of options.

- - - -
-
-# File lib/twitter/rest/saved_searches.rb, line 53
-def saved_search(id, options = {})
-  perform_with_object(:get, "/1.1/saved_searches/show/#{id}.json", options, Twitter::SavedSearch)
-end
-
- -
- - - - -
- - -
- - - -
- saved_searches(*args) - click to toggle source -
- - -
- -

@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::SavedSearch>] The saved searches. @overload saved_search(options = -{})

- -
Returns the authenticated user's saved search queries
-
-@see https://dev.twitter.com/docs/api/1.1/get/saved_searches/list
-@param options [Hash] A customizable set of options.
- -

@overload saved_search(*ids)

- -
Retrieve the data for saved searches owned by the authenticating user
-
-@see https://dev.twitter.com/docs/api/1.1/get/saved_searches/show/:id
-@param ids [Enumerable<Integer>] A collection of saved search IDs.
- -

@overload saved_search(*ids, -options)

- -
Retrieve the data for saved searches owned by the authenticating user
-
-@see https://dev.twitter.com/docs/api/1.1/get/saved_searches/show/:id
-@param ids [Enumerable<Integer>] A collection of saved search IDs.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/saved_searches.rb, line 33
-def saved_searches(*args)
-  arguments = Twitter::Arguments.new(args)
-  if arguments.empty?
-    perform_with_objects(:get, '/1.1/saved_searches/list.json', arguments.options, Twitter::SavedSearch)
-  else
-    pmap(arguments) do |id|
-      saved_search(id, arguments.options)
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Search.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Search.html deleted file mode 100644 index dfa8122..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Search.html +++ /dev/null @@ -1,443 +0,0 @@ - - - - - - - Module: Twitter::REST::Search - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::Search

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
MAX_TWEETS_PER_REQUEST
- -
- - -
-
- - - - - - -
-

Public Instance Methods

- - -
- - - -
- search(q, options = {}) - click to toggle source -
- - -
- -

Returns tweets that match a specified query.

- -

@see dev.twitter.com/docs/api/1.1/get/search/tweets -@see dev.twitter.com/docs/using-search -@note Please note that Twitter’s search service and, by extension, the Search API is not meant to be -an exhaustive source of Tweets. Not all Tweets will be indexed or made available via the -search interface. @rate_limited Yes @authentication Requires user context -@raise [Twitter::Error::Unauthorized] Error -raised when supplied user credentials are not valid. @param q [String] A -search term. @param options [Hash] A customizable set of options. @option -options [String] :geocode Returns tweets by users located within a given -radius of the given latitude/longitude. The location is preferentially -taking from the Geotagging API, but will fall back -to their Twitter profile. The parameter -value is specified by “latitude,longitude,radius”, where radius units must -be specified as either “mi” (miles) or “km” (kilometers). Note that you -cannot use the near operator via the API to geocode -arbitrary locations; however you can use this geocode parameter to search -near geocodes directly. @option options [String] :lang Restricts tweets to -the given language, given by an ISO 639-1 code. @option options [String] -:locale Specify the language of the query you are sending (only ja is -currently effective). This is intended for language-specific clients and -the default should work in the majority of cases. @option options [String] -:result_type Specifies what type of search results you would prefer to -receive. Options are “mixed”, “recent”, and “popular”. The current default -is “mixed.” @option options [Integer] :count The number of tweets to return -per page, up to a maximum of 100. @option options [String] :until Optional. -Returns tweets generated before the given date. Date should be formatted as -YYYY-MM-DD. @option options [Integer] :since_id Returns results with an ID -greater than (that is, more recent than) the specified ID. There are limits -to the number of Tweets which can be accessed -through the API. If the limit of Tweets has occured since the since_id, the since_id -will be forced to the oldest ID available. @option options [Integer] -:max_id Returns results with an ID less than (that is, older than) or equal -to the specified ID. @return [Twitter::SearchResults] Return tweets that -match a specified query with search metadata

- - - -
-
-# File lib/twitter/rest/search.rb, line 28
-def search(q, options = {})
-  options[:count] ||= MAX_TWEETS_PER_REQUEST
-  request = Twitter::Request.new(self, :get, '/1.1/search/tweets.json', options.merge(:q => q))
-  response = get(request.path, request.options).body
-  Twitter::SearchResults.new(response, request)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/SpamReporting.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/SpamReporting.html deleted file mode 100644 index a632a66..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/SpamReporting.html +++ /dev/null @@ -1,417 +0,0 @@ - - - - - - - Module: Twitter::REST::SpamReporting - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::SpamReporting

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- report_spam(*args) - click to toggle source -
- - -
- -

The users specified are blocked by the authenticated user and reported as -spammers

- -

@see dev.twitter.com/docs/api/1.1/post/users/report_spam -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::User>] The reported users. @overload report_spam(*users)

- -
@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
- -

@overload report_spam(*users, -options)

- -
@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/spam_reporting.rb, line 22
-def report_spam(*args)
-  parallel_users_from_response(:post, '/1.1/users/report_spam.json', args)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/SuggestedUsers.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/SuggestedUsers.html deleted file mode 100644 index a73fc8e..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/SuggestedUsers.html +++ /dev/null @@ -1,464 +0,0 @@ - - - - - - - Module: Twitter::REST::SuggestedUsers - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::SuggestedUsers

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- suggest_users(slug, options = {}) - click to toggle source -
- - -
- -

Access the users in a given category of the Twitter suggested user list and return their -most recent Tweet if they are not a protected -user

- -

@see dev.twitter.com/docs/api/1.1/get/users/suggestions/:slug/members -@rate_limited Yes @authentication Requires user context @param slug -[String] The short name of list or a category. @param options [Hash] A -customizable set of options. @return [Array<Twitter::User>]

- - - -
-
-# File lib/twitter/rest/suggested_users.rb, line 44
-def suggest_users(slug, options = {})
-  perform_with_objects(:get, "/1.1/users/suggestions/#{slug}/members.json", options, Twitter::User)
-end
-
- -
- - - - -
- - -
- - - -
- suggestions(*args) - click to toggle source -
- - -
- -

@return [Array<Twitter::Suggestion>] @rate_limited Yes -@authentication Requires user context @raise [Twitter::Error::Unauthorized] -Error raised when supplied user credentials are -not valid. @overload suggestions(options = {})

- -
Returns the list of suggested user categories
-
-@see https://dev.twitter.com/docs/api/1.1/get/users/suggestions
-@param options [Hash] A customizable set of options.
- -

@overload suggestions(slug, options = {})

- -
Returns the users in a given category
-
-@see https://dev.twitter.com/docs/api/1.1/get/users/suggestions/:slug
-@param slug [String] The short name of list or a category.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/suggested_users.rb, line 27
-def suggestions(*args)
-  arguments = Twitter::Arguments.new(args)
-  if arguments.last
-    perform_with_object(:get, "/1.1/users/suggestions/#{arguments.pop}.json", arguments.options, Twitter::Suggestion)
-  else
-    perform_with_objects(:get, '/1.1/users/suggestions.json', arguments.options, Twitter::Suggestion)
-  end
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Timelines.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Timelines.html deleted file mode 100644 index 0a2be56..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Timelines.html +++ /dev/null @@ -1,860 +0,0 @@ - - - - - - - Module: Twitter::REST::Timelines - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - - - - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::Timelines

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
DEFAULT_TWEETS_PER_REQUEST
- -
- - -
MAX_TWEETS_PER_REQUEST
- -
- - -
-
- - - - - - -
-

Public Instance Methods

- - -
- - - -
- home_timeline(options = {}) - click to toggle source -
- - -
- -

Returns the 20 most recent Tweets, including -retweets if they exist, posted by the authenticating user and the users -they follow

- -

@see dev.twitter.com/docs/api/1.1/get/statuses/home_timeline -@note This method can only return up to 800 Tweets, including retweets. @rate_limited Yes -@authentication Requires user context @raise [Twitter::Error::Unauthorized] -Error raised when supplied user credentials are -not valid. @return [Array<Twitter::Tweet>] @param options [Hash] A -customizable set of options. @option options [Integer] :since_id Returns -results with an ID greater than (that is, more recent than) the specified -ID. @option options [Integer] :max_id Returns results with an ID less than -(that is, older than) or equal to the specified ID. @option options -[Integer] :count Specifies the number of records to retrieve. Must be less -than or equal to 200. @option options [Boolean, String, Integer] :trim_user -Each tweet returned in a timeline will include a user object with only the -author’s numerical ID when set to true, ‘t’ or 1. @option options [Boolean, -String, Integer] :exclude_replies This parameter will prevent replies from -appearing in the returned timeline. Using exclude_replies with the count -parameter will mean you will receive up-to count tweets - this is because -the count parameter retrieves that many tweets before filtering out -retweets and replies. @option options [Boolean, String, Integer] -:include_rts Specifies that the timeline should include native retweets in -addition to regular tweets. Note: If you’re using the trim_user parameter -in conjunction with include_rts, the retweets will no longer contain a full -user object. @option options [Boolean, String, Integer] -:contributor_details Specifies that the contributors element should be -enhanced to include the screen_name of the contributor.

- - - -
-
-# File lib/twitter/rest/timelines.rb, line 113
-def home_timeline(options = {})
-  perform_with_objects(:get, '/1.1/statuses/home_timeline.json', options, Twitter::Tweet)
-end
-
- -
- - - - -
- - -
- - - -
- mentions(options = {}) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: mentions_timeline -
- -
- - -
- - - -
- mentions_timeline(options = {}) - click to toggle source -
- - -
- -

Returns the 20 most recent mentions (statuses containing @username) for the -authenticating user

- -

@see dev.twitter.com/docs/api/1.1/get/statuses/mentions_timeline -@note This method can only return up to 800 Tweets. @rate_limited Yes @authentication Requires -user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are -not valid. @return [Array<Twitter::Tweet>] @param options [Hash] A -customizable set of options. @option options [Integer] :since_id Returns -results with an ID greater than (that is, more recent than) the specified -ID. @option options [Integer] :max_id Returns results with an ID less than -(that is, older than) or equal to the specified ID. @option options -[Integer] :count Specifies the number of records to retrieve. Must be less -than or equal to 200. @option options [Boolean, String, Integer] :trim_user -Each tweet returned in a timeline will include a user object with only the -author’s numerical ID when set to true, ‘t’ or 1.

- - - -
-
-# File lib/twitter/rest/timelines.rb, line 26
-def mentions_timeline(options = {})
-  perform_with_objects(:get, '/1.1/statuses/mentions_timeline.json', options, Twitter::Tweet)
-end
-
- -
- - -
- Also aliased as: mentions -
- - - -
- - -
- - - -
- retweeted_by(user, options = {}) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: retweeted_by_user -
- -
- - -
- - - -
- retweeted_by_me(options = {}) - click to toggle source -
- - -
- -

Returns the 20 most recent retweets posted by the authenticating user

- -

@see dev.twitter.com/docs/api/1.1/get/statuses/user_timeline -@note This method can only return up to 3,200 Tweets. @rate_limited Yes @authentication Requires -user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are -not valid. @return [Array<Twitter::Tweet>] @param options [Hash] A -customizable set of options. @option options [Integer] :since_id Returns -results with an ID greater than (that is, more recent than) the specified -ID. @option options [Integer] :max_id Returns results with an ID less than -(that is, older than) or equal to the specified ID. @option options -[Integer] :count Specifies the number of records to retrieve. Must be less -than or equal to 200. @option options [Boolean, String, Integer] :trim_user -Each tweet returned in a timeline will include a user object with only the -author’s numerical ID when set to true, ‘t’ or 1. @option options [Boolean, -String, Integer] :exclude_replies This parameter will prevent replies from -appearing in the returned timeline. Using exclude_replies with the count -parameter will mean you will receive up-to count tweets - this is because -the count parameter retrieves that many tweets before filtering out -retweets and replies. @option options [Boolean, String, Integer] -:contributor_details Specifies that the contributors element should be -enhanced to include the screen_name of the contributor.

- - - -
-
-# File lib/twitter/rest/timelines.rb, line 91
-def retweeted_by_me(options = {})
-  retweets_from_timeline(options) do |opts|
-    user_timeline(opts)
-  end
-end
-
- -
- - - - -
- - -
- - - -
- retweeted_by_user(user, options = {}) - click to toggle source -
- - -
- -

Returns the 20 most recent retweets posted by the specified user

- -

@see dev.twitter.com/docs/api/1.1/get/statuses/user_timeline -@note This method can only return up to 3,200 Tweets. @rate_limited Yes @authentication Requires -user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are -not valid. @return [Array<Twitter::Tweet>] @param user [Integer, -String, Twitter::User] A Twitter user ID, -screen name, URI, or object. @param options [Hash] A customizable set of -options. @option options [Integer] :since_id Returns results with an ID -greater than (that is, more recent than) the specified ID. @option options -[Integer] :max_id Returns results with an ID less than (that is, older -than) or equal to the specified ID. @option options [Integer] :count -Specifies the number of records to retrieve. Must be less than or equal to -200. @option options [Boolean, String, Integer] :trim_user Each tweet -returned in a timeline will include a user object with only the author’s -numerical ID when set to true, ‘t’ or 1. @option options [Boolean, String, -Integer] :exclude_replies This parameter will prevent replies from -appearing in the returned timeline. Using exclude_replies with the count -parameter will mean you will receive up-to count tweets - this is because -the count parameter retrieves that many tweets before filtering out -retweets and replies. @option options [Boolean, String, Integer] -:contributor_details Specifies that the contributors element should be -enhanced to include the screen_name of the contributor.

- - - -
-
-# File lib/twitter/rest/timelines.rb, line 69
-def retweeted_by_user(user, options = {})
-  retweets_from_timeline(options) do |opts|
-    user_timeline(user, opts)
-  end
-end
-
- -
- - -
- Also aliased as: retweeted_by -
- - - -
- - -
- - - -
- retweeted_to_me(options = {}) - click to toggle source -
- - -
- -

Returns the 20 most recent retweets posted by users the authenticating user -follow.

- -

@see dev.twitter.com/docs/api/1.1/get/statuses/home_timeline -@note This method can only return up to 800 Tweets, including retweets. @rate_limited Yes -@authentication Requires user context @raise [Twitter::Error::Unauthorized] -Error raised when supplied user credentials are -not valid. @return [Array<Twitter::Tweet>] @param options [Hash] A -customizable set of options. @option options [Integer] :since_id Returns -results with an ID greater than (that is, more recent than) the specified -ID. @option options [Integer] :max_id Returns results with an ID less than -(that is, older than) or equal to the specified ID. @option options -[Integer] :count Specifies the number of records to retrieve. Must be less -than or equal to 200. @option options [Boolean, String, Integer] :trim_user -Each tweet returned in a timeline will include a user object with only the -author’s numerical ID when set to true, ‘t’ or 1. @option options [Boolean, -String, Integer] :exclude_replies This parameter will prevent replies from -appearing in the returned timeline. Using exclude_replies with the count -parameter will mean you will receive up-to count tweets - this is because -the count parameter retrieves that many tweets before filtering out -retweets and replies. @option options [Boolean, String, Integer] -:contributor_details Specifies that the contributors element should be -enhanced to include the screen_name of the contributor.

- - - -
-
-# File lib/twitter/rest/timelines.rb, line 132
-def retweeted_to_me(options = {})
-  retweets_from_timeline(options) do |opts|
-    home_timeline(opts)
-  end
-end
-
- -
- - - - -
- - -
- - - -
- retweets_of_me(options = {}) - click to toggle source -
- - -
- -

Returns the 20 most recent tweets of the authenticated user that have been -retweeted by others

- -

@see dev.twitter.com/docs/api/1.1/get/statuses/retweets_of_me -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::Tweet>] @param options [Hash] A customizable set of -options. @option options [Integer] :count Specifies the number of records -to retrieve. Must be less than or equal to 200. @option options [Integer] -:since_id Returns results with an ID greater than (that is, more recent -than) the specified ID. @option options [Integer] :max_id Returns results -with an ID less than (that is, older than) or equal to the specified ID. -@option options [Boolean, String, Integer] :trim_user Each tweet returned -in a timeline will include a user object with only the author’s numerical -ID when set to true, ‘t’ or 1. @option options [Boolean, String, Integer] -:include_user_entities The user entities node will be disincluded when set -to false.

- - - -
-
-# File lib/twitter/rest/timelines.rb, line 151
-def retweets_of_me(options = {})
-  perform_with_objects(:get, '/1.1/statuses/retweets_of_me.json', options, Twitter::Tweet)
-end
-
- -
- - - - -
- - -
- - - -
- user_timeline(*args) - click to toggle source -
- - -
- -

Returns the 20 most recent Tweets posted by the -specified user

- -

@see dev.twitter.com/docs/api/1.1/get/statuses/user_timeline -@note This method can only return up to 3,200 Tweets. @rate_limited Yes @authentication Requires -user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are -not valid. @return [Array<Twitter::Tweet>] @overload user_timeline(user, -options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param options [Hash] A customizable set of options.
-@option options [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID.
-@option options [Integer] :max_id Returns results with an ID less than (that is, older than) or equal to the specified ID.
-@option options [Integer] :count Specifies the number of records to retrieve. Must be less than or equal to 200.
-@option options [Boolean, String, Integer] :trim_user Each tweet returned in a timeline will include a user object with only the author's numerical ID when set to true, 't' or 1.
-@option options [Boolean, String, Integer] :exclude_replies This parameter will prevent replies from appearing in the returned timeline. Using exclude_replies with the count parameter will mean you will receive up-to count tweets - this is because the count parameter retrieves that many tweets before filtering out retweets and replies.
-@option options [Boolean, String, Integer] :contributor_details Specifies that the contributors element should be enhanced to include the screen_name of the contributor.
-@option options [Boolean, String, Integer] :include_rts Specifies that the timeline should include native retweets in addition to regular tweets. Note: If you're using the trim_user parameter in conjunction with include_rts, the retweets will no longer contain a full user object.
- - - -
-
-# File lib/twitter/rest/timelines.rb, line 49
-def user_timeline(*args)
-  objects_from_response_with_user(Twitter::Tweet, :get, '/1.1/statuses/user_timeline.json', args)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Trends.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Trends.html deleted file mode 100644 index 02fbb2d..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Trends.html +++ /dev/null @@ -1,609 +0,0 @@ - - - - - - - Module: Twitter::REST::Trends - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - - - - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::Trends

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - - - - -
- - - -
- trend_locations(options = {}) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: trends_available -
- -
- - - - - - - - - - - - - - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Tweets.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Tweets.html deleted file mode 100644 index 49d3ee8..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Tweets.html +++ /dev/null @@ -1,1208 +0,0 @@ - - - - - - - Module: Twitter::REST::Tweets - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - - - - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::Tweets

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
MAX_TWEETS_PER_REQUEST
- -
- - -
-
- - - - - - -
-

Public Instance Methods

- - -
- - - -
- destroy_status(*args) - click to toggle source -
- - -
- -

Destroys the specified Tweets

- -

@see dev.twitter.com/docs/api/1.1/post/statuses/destroy/:id -@note The authenticating user must be the author of the specified Tweets. @rate_limited No @authentication Requires -user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are -not valid. @return [Array<Twitter::Tweet>] The deleted Tweets. @overload destroy_status(*tweets)

- -
@param tweets [Enumerable<Integer, String, URI, Twitter::Tweet>] A collection of Tweet IDs, URIs, or objects.
- -

@overload destroy_status(*tweets, -options)

- -
@param tweets [Enumerable<Integer, String, URI, Twitter::Tweet>] A collection of Tweet IDs, URIs, or objects.
-@param options [Hash] A customizable set of options.
-@option options [Boolean, String, Integer] :trim_user Each tweet returned in a timeline will include a user object with only the author's numerical ID when set to true, 't' or 1.
- - - -
-
-# File lib/twitter/rest/tweets.rb, line 99
-def destroy_status(*args)
-  arguments = Twitter::Arguments.new(args)
-  pmap(arguments) do |tweet|
-    perform_with_object(:post, "/1.1/statuses/destroy/#{extract_id(tweet)}.json", arguments.options, Twitter::Tweet)
-  end
-end
-
- -
- - -
- Also aliased as: destroy_tweet -
- - - -
- - -
- - - -
- destroy_tweet(*args) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: destroy_status -
- -
- - -
- - - -
- oembed(tweet, options = {}) - click to toggle source -
- - -
- -

Returns oEmbed for a Tweet

- -

@see dev.twitter.com/docs/api/1.1/get/statuses/oembed -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::OEmbed] OEmbed for the requested Tweet. @param tweet [Integer, String, URI, -Twitter::Tweet] A Tweet ID, URI, or object. -@param options [Hash] A customizable set of options. @option options -[Integer] :maxwidth The maximum width in pixels that the embed should be -rendered at. This value is constrained to be between 250 and 550 pixels. -@option options [Boolean, String, Integer] :hide_media Specifies whether -the embedded Tweet should automatically expand -images which were uploaded via {dev.twitter.com/docs/api/1.1/post/statuses/update_with_media -POST statuses/update_with_media}. When set to either true, t or 1 images -will not be expanded. Defaults to false. @option options [Boolean, String, -Integer] :hide_thread Specifies whether the embedded Tweet should automatically show the original -message in the case that the embedded Tweet is -a reply. When set to either true, t or 1 the original Tweet will not be shown. Defaults to false. -@option options [Boolean, String, Integer] :omit_script Specifies whether -the embedded Tweet HTML should include a -`<script>` element pointing to widgets.js. In cases where a page -already includes widgets.js, setting this value to true will prevent a -redundant script element from being included. When set to either true, t or -1 the `<script>` element will not be included in the embed HTML, -meaning that pages must include a reference to widgets.js manually. -Defaults to false. @option options [String] :align Specifies whether the -embedded Tweet should be left aligned, right -aligned, or centered in the page. Valid values are left, right, center, and -none. Defaults to none, meaning no alignment styles are specified for the -Tweet. @option options [String] :related A -value for the TWT related parameter, as described in {dev.twitter.com/docs/intents -Web Intents}. This value will be forwarded to all Web Intents calls. -@option options [String] :lang Language code -for the rendered embed. This will affect the text and localization of the -rendered HTML.

- - - -
-
-# File lib/twitter/rest/tweets.rb, line 253
-def oembed(tweet, options = {})
-  options[:id] = extract_id(tweet)
-  perform_with_object(:get, '/1.1/statuses/oembed.json', options, Twitter::OEmbed)
-end
-
- -
- - - - -
- - -
- - - -
- oembeds(*args) - click to toggle source -
- - -
- -

Returns oEmbeds for Tweets

- -

@see dev.twitter.com/docs/api/1.1/get/statuses/oembed -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::OEmbed>] OEmbeds for the requested Tweets. @overload oembed(*tweets)

- -
@param tweets [Enumerable<Integer, String, URI, Twitter::Tweet>] A collection of Tweet IDs, URIs, or objects.
- -

@overload oembed(*tweets, options)

- -
@param tweets [Enumerable<Integer, String, URI, Twitter::Tweet>] A collection of Tweet IDs, URIs, or objects.
-@param options [Hash] A customizable set of options.
-@option options [Integer] :maxwidth The maximum width in pixels that the embed should be rendered at. This value is constrained to be between 250 and 550 pixels.
-@option options [Boolean, String, Integer] :hide_media Specifies whether the embedded Tweet should automatically expand images which were uploaded via {https://dev.twitter.com/docs/api/1.1/post/statuses/update_with_media POST statuses/update_with_media}. When set to either true, t or 1 images will not be expanded. Defaults to false.
-@option options [Boolean, String, Integer] :hide_thread Specifies whether the embedded Tweet should automatically show the original message in the case that the embedded Tweet is a reply. When set to either true, t or 1 the original Tweet will not be shown. Defaults to false.
-@option options [Boolean, String, Integer] :omit_script Specifies whether the embedded Tweet HTML should include a `<script>` element pointing to widgets.js. In cases where a page already includes widgets.js, setting this value to true will prevent a redundant script element from being included. When set to either true, t or 1 the `<script>` element will not be included in the embed HTML, meaning that pages must include a reference to widgets.js manually. Defaults to false.
-@option options [String] :align Specifies whether the embedded Tweet should be left aligned, right aligned, or centered in the page. Valid values are left, right, center, and none. Defaults to none, meaning no alignment styles are specified for the Tweet.
-@option options [String] :related A value for the TWT related parameter, as described in {https://dev.twitter.com/docs/intents Web Intents}. This value will be forwarded to all Web Intents calls.
-@option options [String] :lang Language code for the rendered embed. This will affect the text and localization of the rendered HTML.
- - - -
-
-# File lib/twitter/rest/tweets.rb, line 277
-def oembeds(*args)
-  arguments = Twitter::Arguments.new(args)
-  pmap(arguments) do |tweet|
-    oembed(extract_id(tweet), arguments.options)
-  end
-end
-
- -
- - - - -
- - -
- - - -
- retweet(*args) - click to toggle source -
- - -
- -

Retweets the specified Tweets as the -authenticating user

- -

@see dev.twitter.com/docs/api/1.1/post/statuses/retweet/:id -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::Tweet>] The original tweets with retweet details -embedded. @overload retweet(*tweets)

- -
@param tweets [Enumerable<Integer, String, URI, Twitter::Tweet>] A collection of Tweet IDs, URIs, or objects.
- -

@overload retweet(*tweets, options)

- -
@param tweets [Enumerable<Integer, String, URI, Twitter::Tweet>] A collection of Tweet IDs, URIs, or objects.
-@param options [Hash] A customizable set of options.
-@option options [Boolean, String, Integer] :trim_user Each tweet returned in a timeline will include a user object with only the author's numerical ID when set to true, 't' or 1.
- - - -
-
-# File lib/twitter/rest/tweets.rb, line 176
-def retweet(*args)
-  arguments = Twitter::Arguments.new(args)
-  pmap(arguments) do |tweet|
-    begin
-      post_retweet(extract_id(tweet), arguments.options)
-    rescue Twitter::Error::AlreadyRetweeted
-      next
-    end
-  end.compact
-end
-
- -
- - - - -
- - -
- - - -
- retweet!(*args) - click to toggle source -
- - -
- -

Retweets the specified Tweets as the -authenticating user and raises an error if one has already been retweeted

- -

@see dev.twitter.com/docs/api/1.1/post/statuses/retweet/:id -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::AlreadyRetweeted] Error raised -when tweet has already been retweeted. @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::Tweet>] The original tweets with retweet details -embedded. @overload retweet!(*tweets)

- -
@param tweets [Enumerable<Integer, String, URI, Twitter::Tweet>] A collection of Tweet IDs, URIs, or objects.
- -

@overload retweet!(*tweets, options)

- -
@param tweets [Enumerable<Integer, String, URI, Twitter::Tweet>] A collection of Tweet IDs, URIs, or objects.
-@param options [Hash] A customizable set of options.
-@option options [Boolean, String, Integer] :trim_user Each tweet returned in a timeline will include a user object with only the author's numerical ID when set to true, 't' or 1.
- - - -
-
-# File lib/twitter/rest/tweets.rb, line 201
-def retweet!(*args)
-  arguments = Twitter::Arguments.new(args)
-  pmap(arguments) do |tweet|
-    post_retweet(extract_id(tweet), arguments.options)
-  end.compact
-end
-
- -
- - - - -
- - -
- - - -
- retweeters_ids(*args) - click to toggle source -
- - -
- -

Returns a collection of up to 100 user IDs belonging to users who have -retweeted the tweet specified by the id parameter.

- -

@see dev.twitter.com/docs/api/1.1/get/statuses/retweeters/ids -@rate_limited Yes @authentication Required @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::Cursor] -@overload retweeters_ids(options)

- -
@param options [Hash] A customizable set of options.
- -

@overload retweeters_ids(id, options = -{})

- -
@param tweet [Integer, String, URI, Twitter::Tweet] A Tweet ID, URI, or object.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/tweets.rb, line 296
-def retweeters_ids(*args)
-  arguments = Twitter::Arguments.new(args)
-  arguments.options[:id] ||= extract_id(arguments.first)
-  perform_with_cursor(:get, '/1.1/statuses/retweeters/ids.json', arguments.options, :ids)
-end
-
- -
- - - - -
- - -
- - - -
- retweeters_of(tweet, options = {}) - click to toggle source -
- - -
- -

Show up to 100 users who retweeted the Tweet

- -

@see dev.twitter.com/docs/api/1.1/get/statuses/retweets/:id -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Array] @param tweet -[Integer, String, URI, Twitter::Tweet] A Tweet -ID, URI, or object. @param options [Hash] A customizable set of options. -@option options [Integer] :count Specifies the number of records to -retrieve. Must be less than or equal to 100. @option options [Boolean, -String, Integer] :trim_user Each tweet returned in a timeline will include -a user object with only the author’s numerical ID when set to true, ‘t’ or -1. @option options [Boolean] :ids_only (‘false’) Only return user IDs -instead of full user objects.

- - - -
-
-# File lib/twitter/rest/tweets.rb, line 43
-def retweeters_of(tweet, options = {})
-  ids_only = !!options.delete(:ids_only)
-  retweeters = retweets(tweet, options).collect(&:user)
-  ids_only ? retweeters.collect(&:id) : retweeters
-end
-
- -
- - - - -
- - -
- - - -
- retweets(tweet, options = {}) - click to toggle source -
- - -
- -

Returns up to 100 of the first retweets of a given tweet

- -

@see dev.twitter.com/docs/api/1.1/get/statuses/retweets/:id -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::Tweet>] @param tweet [Integer, String, URI, -Twitter::Tweet] A Tweet ID, URI, or object. -@param options [Hash] A customizable set of options. @option options -[Integer] :count Specifies the number of records to retrieve. Must be less -than or equal to 100. @option options [Boolean, String, Integer] :trim_user -Each tweet returned in a timeline will include a user object with only the -author’s numerical ID when set to true, ‘t’ or 1.

- - - -
-
-# File lib/twitter/rest/tweets.rb, line 27
-def retweets(tweet, options = {})
-  perform_with_objects(:get, "/1.1/statuses/retweets/#{extract_id(tweet)}.json", options, Twitter::Tweet)
-end
-
- -
- - - - -
- - -
- - - -
- status(tweet, options = {}) - click to toggle source -
- - -
- -

Returns a Tweet

- -

@see dev.twitter.com/docs/api/1.1/get/statuses/show/:id -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @raise -[Twitter::Error::Forbidden] Error raised when -supplied status is over 140 characters. @return [Twitter::Tweet] The -requested Tweet. @param tweet [Integer, String, -URI, Twitter::Tweet] A Tweet ID, URI, or -object. @param options [Hash] A customizable set of options. @option -options [Boolean, String, Integer] :trim_user Each tweet returned in a -timeline will include a user object with only the author’s numerical ID -when set to true, ‘t’ or 1.

- - - -
-
-# File lib/twitter/rest/tweets.rb, line 60
-def status(tweet, options = {})
-  perform_with_object(:get, "/1.1/statuses/show/#{extract_id(tweet)}.json", options, Twitter::Tweet)
-end
-
- -
- - - - -
- - -
- - - -
- statuses(*args) - click to toggle source -
- - -
- -

Returns Tweets

- -

@see dev.twitter.com/docs/api/1.1/get/statuses/lookup -@rate_limited Yes @authentication Required @return -[Array<Twitter::Tweet>] The requested Tweets. @overload statuses(*tweets)

- -
@param tweets [Enumerable<Integer, String, URI, Twitter::Tweet>] A collection of Tweet IDs, URIs, or objects.
- -

@overload statuses(*tweets, options)

- -
@param tweets [Enumerable<Integer, String, URI, Twitter::Tweet>] A collection of Tweet IDs, URIs, or objects.
-@param options [Hash] A customizable set of options.
-@option options [Symbol, String] :method Requests users via a GET request instead of the standard POST request if set to ':get'.
-@option options [Boolean, String, Integer] :trim_user Each tweet returned in a timeline will include a user object with only the author's numerical ID when set to true, 't' or 1.
- - - -
-
-# File lib/twitter/rest/tweets.rb, line 77
-def statuses(*args)
-  arguments = Twitter::Arguments.new(args)
-  request_method = arguments.options.delete(:method) || :post
-  flat_pmap(arguments.each_slice(MAX_TWEETS_PER_REQUEST)) do |tweets|
-    perform_with_objects(request_method, '/1.1/statuses/lookup.json', arguments.options.merge(:id => tweets.collect { |u| extract_id(u) }.join(',')), Twitter::Tweet)
-  end
-end
-
- -
- - - - -
- - -
- - - -
- update(status, options = {}) - click to toggle source -
- - -
- -

Updates the authenticating user’s status

- -

@see dev.twitter.com/docs/api/1.1/post/statuses/update -@note A status update with text identical to the authenticating user’s -current status will be ignored to prevent duplicates. @rate_limited No -@authentication Requires user context @raise [Twitter::Error::Unauthorized] -Error raised when supplied user credentials are -not valid. @return [Twitter::Tweet] The created Tweet. @param status [String] The text of your -status update, up to 140 characters. @param options [Hash] A customizable -set of options. @option options [Boolean, String, Integer] -:possibly_sensitive Set to true for content which may not be suitable for -every audience. @option options [Twitter::Tweet] :in_reply_to_status An -existing status that the update is in reply to. @option options [Integer] -:in_reply_to_status_id The ID of an existing status that the update is in -reply to. @option options [Float] :lat The latitude of the location this -tweet refers to. This option will be ignored unless it is inside the range --90.0 to +90.0 (North is positive) inclusive. It will also be ignored if -there isn’t a corresponding :long option. @option options [Float] :long The -longitude of the location this tweet refers to. The valid ranges for -longitude is -180.0 to +180.0 (East is positive) inclusive. This option -will be ignored if outside that range, if it is not a number, if -geo_enabled is disabled, or if there not a corresponding :lat option. -@option options [Twitter::Place] :place A place in the world. These can be -retrieved from {Twitter::REST::PlacesAndGeo#reverse_geocode}. -@option options [String] :place_id A place in the world. These IDs can be -retrieved from {Twitter::REST::PlacesAndGeo#reverse_geocode}. -@option options [String] :media_ids A comma separated list of uploaded -media IDs to attach to the Tweet. @option -options [String] :display_coordinates Whether or not to put a pin on the -exact coordinates a tweet has been sent from. @option options [Boolean, -String, Integer] :trim_user Each tweet returned in a timeline will include -a user object with only the author’s numerical ID when set to true, ‘t’ or -1.

- - - -
-
-# File lib/twitter/rest/tweets.rb, line 129
-def update(status, options = {})
-  update!(status, options)
-rescue Twitter::Error::DuplicateStatus
-  user_timeline(:count => 1).first
-end
-
- -
- - - - -
- - -
- - - -
- update!(status, options = {}) - click to toggle source -
- - -
- -

Updates the authenticating user’s status

- -

@see dev.twitter.com/docs/api/1.1/post/statuses/update -@note A status update with text identical to the authenticating user’s -current status will be ignored to prevent duplicates. @rate_limited No -@authentication Requires user context @raise [Twitter::Error::Unauthorized] -Error raised when supplied user credentials are -not valid. @raise [Twitter::Error::DuplicateStatus] Error raised when a duplicate status is posted. -@return [Twitter::Tweet] The created Tweet. -@param status [String] The text of your status update, up to 140 -characters. @param options [Hash] A customizable set of options. @option -options [Boolean, String, Integer] :possibly_sensitive Set to true for -content which may not be suitable for every audience. @option options -[Twitter::Tweet] :in_reply_to_status An existing status that the update is -in reply to. @option options [Integer] :in_reply_to_status_id The ID of an -existing status that the update is in reply to. @option options [Float] -:lat The latitude of the location this tweet refers to. This option will be -ignored unless it is inside the range -90.0 to +90.0 (North is positive) -inclusive. It will also be ignored if there isn’t a corresponding :long -option. @option options [Float] :long The longitude of the location this -tweet refers to. The valid ranges for longitude is -180.0 to +180.0 (East -is positive) inclusive. This option will be ignored if outside that range, -if it is not a number, if geo_enabled is disabled, or if there not a -corresponding :lat option. @option options [Twitter::Place] :place A place -in the world. These can be retrieved from {Twitter::REST::PlacesAndGeo#reverse_geocode}. -@option options [String] :place_id A place in the world. These IDs can be -retrieved from {Twitter::REST::PlacesAndGeo#reverse_geocode}. -@option options [String] :media_ids A comma separated list of uploaded -media IDs to attach to the Tweet. @option -options [String] :display_coordinates Whether or not to put a pin on the -exact coordinates a tweet has been sent from. @option options [Boolean, -String, Integer] :trim_user Each tweet returned in a timeline will include -a user object with only the author’s numerical ID when set to true, ‘t’ or -1.

- - - -
-
-# File lib/twitter/rest/tweets.rb, line 156
-def update!(status, options = {})
-  hash = options.dup
-  hash[:in_reply_to_status_id] = hash.delete(:in_reply_to_status).id unless hash[:in_reply_to_status].nil?
-  hash[:place_id] = hash.delete(:place).woeid unless hash[:place].nil?
-  perform_with_object(:post, '/1.1/statuses/update.json', hash.merge(:status => status), Twitter::Tweet)
-end
-
- -
- - - - -
- - -
- - - -
- update_with_media(status, media, options = {}) - click to toggle source -
- - -
- -

Updates the authenticating user’s status with media

- -

@see dev.twitter.com/docs/api/1.1/post/statuses/update_with_media -@note A status update with text/media identical to the authenticating -user’s current status will NOT be ignored @rate_limited No @authentication -Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are -not valid. @raise [Twitter::Error::UnacceptableIO] Error when the IO object for the media argument -does not have a to_io method. @return [Twitter::Tweet] The created Tweet. @param status [String] The text of your -status update, up to 140 characters. @param media [File, Hash] A File -object with your picture (PNG, JPEG or GIF) @param options [Hash] A -customizable set of options. @option options [Boolean, String, Integer] -:possibly_sensitive Set to true for content which may not be suitable for -every audience. @option options [Twitter::Tweet] :in_reply_to_status An -existing status that the update is in reply to. @option options [Integer] -:in_reply_to_status_id The ID of an existing Tweet that the update is in reply to. @option -options [Float] :lat The latitude of the location this tweet refers to. -This option will be ignored unless it is inside the range -90.0 to +90.0 -(North is positive) inclusive. It will also be ignored if there isn’t a -corresponding :long option. @option options [Float] :long The longitude of -the location this tweet refers to. The valid ranges for longitude is -180.0 -to +180.0 (East is positive) inclusive. This option will be ignored if -outside that range, if it is not a number, if geo_enabled is disabled, or -if there not a corresponding :lat option. @option options [Twitter::Place] -:place A place in the world. These can be retrieved from {Twitter::REST::PlacesAndGeo#reverse_geocode}. -@option options [String] :place_id A place in the world. These IDs can be -retrieved from {Twitter::REST::PlacesAndGeo#reverse_geocode}. -@option options [String] :display_coordinates Whether or not to put a pin -on the exact coordinates a tweet has been sent from. @option options -[Boolean, String, Integer] :trim_user Each tweet returned in a timeline -will include a user object with only the author’s numerical ID when set to -true, ‘t’ or 1.

- - - -
-
-# File lib/twitter/rest/tweets.rb, line 229
-def update_with_media(status, media, options = {})
-  fail(Twitter::Error::UnacceptableIO.new) unless media.respond_to?(:to_io)
-  hash = options.dup
-  hash[:in_reply_to_status_id] = hash.delete(:in_reply_to_status).id unless hash[:in_reply_to_status].nil?
-  hash[:place_id] = hash.delete(:place).woeid unless hash[:place].nil?
-  perform_with_object(:post, '/1.1/statuses/update_with_media.json', hash.merge('media[]' => media, 'status' => status), Twitter::Tweet)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Undocumented.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Undocumented.html deleted file mode 100644 index 141a6a3..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Undocumented.html +++ /dev/null @@ -1,457 +0,0 @@ - - - - - - - Module: Twitter::REST::Undocumented - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::Undocumented

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- following_followers_of(*args) - click to toggle source -
- - -
- -

@note Undocumented @rate_limited Yes -@authentication Requires user context @raise [Twitter::Error::Unauthorized] -Error raised when supplied user credentials are -not valid. @return [Twitter::Cursor] @overload following_followers_of(options -= {})

- -
Returns users following followers of the specified user
-
-@param options [Hash] A customizable set of options.
- -

@overload following_followers_of(user, -options = {})

- -
Returns users following followers of the authenticated user
-
-@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/undocumented.rb, line 26
-def following_followers_of(*args)
-  cursor_from_response_with_user(:users, Twitter::User, :get, '/users/following_followers_of.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- tweet_count(uri, options = {}) - click to toggle source -
- - -
- -

Returns Tweets count for a URI

- -

@note Undocumented @rate_limited No -@authentication Not required @return [Integer] @param uri [String, URI] A -URI. @param options [Hash] A customizable set of options.

- - - -
-
-# File lib/twitter/rest/undocumented.rb, line 38
-def tweet_count(uri, options = {})
-  connection = Faraday.new('https://cdn.api.twitter.com', connection_options.merge(:builder => middleware))
-  connection.get('/1/urls/count.json', options.merge(:url => uri.to_s)).body[:count]
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Users.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Users.html deleted file mode 100644 index 79bcd35..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Users.html +++ /dev/null @@ -1,1693 +0,0 @@ - - - - - - - Module: Twitter::REST::Users - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- - - -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::Users

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
MAX_USERS_PER_REQUEST
- -
- - -
-
- - - - - - -
-

Public Instance Methods

- - -
- - - -
- block(*args) - click to toggle source -
- - -
- -

Blocks the users specified by the authenticating user

- -

@see dev.twitter.com/docs/api/1.1/post/blocks/create -@note Destroys a friendship to the blocked user if it exists. @rate_limited -Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::User>] The blocked users. @overload block(*users)

- -
@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
- -

@overload block(*users, options)

- -
@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/users.rb, line 194
-def block(*args)
-  parallel_users_from_response(:post, '/1.1/blocks/create.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- block?(user, options = {}) - click to toggle source -
- - -
- -

Returns true if the authenticating user is blocking a target user

- -

@see dev.twitter.com/docs/api/1.1/get/blocks/ids -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Boolean] true if the -authenticating user is blocking the target user, otherwise false. @param -user [Integer, String, URI, Twitter::User] A Twitter user ID, screen name, URI, or object. -@param options [Hash] A customizable set of options.

- - - -
-
-# File lib/twitter/rest/users.rb, line 169
-def block?(user, options = {})
-  user_id = case user
-  when Integer
-    user
-  when String, URI, Addressable::URI
-    user(user).id
-  when Twitter::User
-    user.id
-  end
-  blocked_ids(options).collect(&:to_i).include?(user_id)
-end
-
- -
- - - - -
- - -
- - - -
- blocked(options = {}) - click to toggle source -
- - -
- -

Returns an array of user objects that the authenticating user is blocking

- -

@see dev.twitter.com/docs/api/1.1/get/blocks/list -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::User>] User objects that -the authenticating user is blocking. @param options [Hash] A customizable -set of options. @option options [Boolean, String, Integer] :skip_status Do -not include user’s Tweets when set to true, ‘t’ -or 1.

- - - -
-
-# File lib/twitter/rest/users.rb, line 140
-def blocked(options = {})
-  perform_with_cursor(:get, '/1.1/blocks/list.json', options, :users, Twitter::User)
-end
-
- -
- - - - -
- - -
- - - -
- blocked_ids(*args) - click to toggle source -
- - -
- -

Returns an array of numeric user IDs the authenticating user is blocking

- -

@see dev.twitter.com/docs/api/1.1/get/blocks/ids -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::Cursor] -Numeric user IDs the authenticating user is blocking. @overload blocked_ids(options = {})

- -
@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/users.rb, line 154
-def blocked_ids(*args)
-  arguments = Twitter::Arguments.new(args)
-  merge_user!(arguments.options, arguments.pop)
-  perform_with_cursor(:get, '/1.1/blocks/ids.json', arguments.options, :ids)
-end
-
- -
- - - - -
- - -
- - - -
- contributees(*args) - click to toggle source -
- - -
- -

Returns an array of users that the specified user can contribute to

- -

@see dev.twitter.com/docs/api/1.1/get/users/contributees -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::User>] @overload contributees(options = {})

- -
@param options [Hash] A customizable set of options.
-@option options [Boolean, String, Integer] :skip_status Do not include contributee's Tweets when set to true, 't' or 1.
- -

@overload contributees(user, options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param options [Hash] A customizable set of options.
-@option options [Boolean, String, Integer] :skip_status Do not include contributee's Tweets when set to true, 't' or 1.
- - - -
-
-# File lib/twitter/rest/users.rb, line 305
-def contributees(*args)
-  users_from_response(:get, '/1.1/users/contributees.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- contributors(*args) - click to toggle source -
- - -
- -

Returns an array of users who can contribute to the specified account

- -

@see dev.twitter.com/docs/api/1.1/get/users/contributors -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::User>] @overload contributors(options = {})

- -
@param options [Hash] A customizable set of options.
-@option options [Boolean, String, Integer] :skip_status Do not include contributee's Tweets when set to true, 't' or 1.
- -

@overload contributors(user, options = {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param options [Hash] A customizable set of options.
-@option options [Boolean, String, Integer] :skip_status Do not include contributee's Tweets when set to true, 't' or 1.
- - - -
-
-# File lib/twitter/rest/users.rb, line 323
-def contributors(*args)
-  users_from_response(:get, '/1.1/users/contributors.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- current_user(options = {}) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: verify_credentials -
- -
- - -
- - - -
- mute(*args) - click to toggle source -
- - -
- -

Mutes the users specified by the authenticating user

- -

@see dev.twitter.com/docs/api/1.1/post/mutes/users/create -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::User>] The muted users. @overload mute(*users)

- -
@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
- -

@overload mute(*users, options)

- -
@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/users.rb, line 392
-def mute(*args)
-  parallel_users_from_response(:post, '/1.1/mutes/users/create.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- muted(options = {}) - click to toggle source -
- - -
- -

Returns an array of user objects that the authenticating user is muting

- -

@see dev.twitter.com/docs/api/1.1/get/mutes/users/list -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::User>] User objects that -the authenticating user is muting. @param options [Hash] A customizable set -of options. @option options [Boolean, String, Integer] :skip_status Do not -include user’s Tweets when set to true, ‘t’ or 1.

- - - -
-
-# File lib/twitter/rest/users.rb, line 421
-def muted(options = {})
-  perform_with_cursor(:get, '/1.1/mutes/users/list.json', options, :users, Twitter::User)
-end
-
- -
- - - - -
- - -
- - - -
- muted_ids(*args) - click to toggle source -
- - -
- -

Returns an array of numeric user IDs the authenticating user is muting

- -

@see dev.twitter.com/docs/api/1.1/get/mutes/users/ids -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::Cursor] -Numeric user IDs the authenticating user is muting @overload muted_ids(options = {})

- -
@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/users.rb, line 435
-def muted_ids(*args)
-  arguments = Twitter::Arguments.new(args)
-  merge_user!(arguments.options, arguments.pop)
-  perform_with_cursor(:get, '/1.1/mutes/users/ids.json', arguments.options, :ids)
-end
-
- -
- - - - -
- - -
- - - -
- profile_banner(*args) - click to toggle source -
- - -
- -

Returns the available size variations of the specified user’s profile -banner.

- -

@see dev.twitter.com/docs/api/1.1/get/users/profile_banner -@note If the user has not uploaded a profile banner, a HTTP 404 will be -served instead. @rate_limited Yes @authentication Requires user context -@raise [Twitter::Error::Unauthorized] Error -raised when supplied user credentials are not valid. @return -[Twitter::ProfileBanner] @overload profile_banner(options = {}) -@overload profile_banner(user, options -= {})

- -
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
- - - -
-
-# File lib/twitter/rest/users.rb, line 374
-def profile_banner(*args)
-  arguments = Twitter::Arguments.new(args)
-  merge_user!(arguments.options, arguments.pop || user_id) unless arguments.options[:user_id] || arguments.options[:screen_name]
-  perform_with_object(:get, '/1.1/users/profile_banner.json', arguments.options, Twitter::ProfileBanner)
-end
-
- -
- - - - -
- - -
- - - -
- remove_profile_banner(options = {}) - click to toggle source -
- - -
- -

Removes the authenticating user’s profile banner image

- -

@see dev.twitter.com/docs/api/1.1/post/account/remove_profile_banner -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [nil] @param options -[Hash] A customizable set of options.

- - - -
-
-# File lib/twitter/rest/users.rb, line 335
-def remove_profile_banner(options = {})
-  post('/1.1/account/remove_profile_banner.json', options).body
-  true
-end
-
- -
- - - - -
- - -
- - - -
- settings(options = {}) - click to toggle source -
- - -
- -

Updates the authenticating user’s settings. Or, if no options supplied, -returns settings (including current trend, geo and sleep time information) -for the authenticating user.

- -

@see dev.twitter.com/docs/api/1.1/post/account/settings -@see dev.twitter.com/docs/api/1.1/get/account/settings -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::Settings] -@param options [Hash] A customizable set of options. @option options -[Integer] :trend_location_woeid The Yahoo! Where On Earth ID to use as the -user’s default trend location. Global information is available by using 1 -as the WOEID. The woeid must be one of the locations returned by {dev.twitter.com/docs/api/1.1/get/trends/available -GET trends/available}. @option options [Boolean, String, Integer] -:sleep_time_enabled When set to true, ‘t’ or 1, will enable sleep time for -the user. Sleep time is the time when push or SMS notifications should not -be sent to the user. @option options [Integer] :start_sleep_time The hour -that sleep time should begin if it is enabled. The value for this parameter -should be provided in {en.wikipedia.org/wiki/ISO_8601 -ISO8601} format (i.e. 00-23). The time is considered to be in the same -timezone as the user’s time_zone setting. @option options [Integer] -:end_sleep_time The hour that sleep time should end if it is enabled. The -value for this parameter should be provided in {en.wikipedia.org/wiki/ISO_8601 -ISO8601} format (i.e. 00-23). The time is considered to be in the same -timezone as the user’s time_zone setting. @option options [String] -:time_zone The timezone dates and times should be displayed in for the -user. The timezone must be one of the {api.rubyonrails.org/classes/ActiveSupport/TimeZone.html -Rails TimeZone} names. @option options [String] :lang The language which Twitter should render in for this user. The -language must be specified by the appropriate two letter ISO 639-1 -representation. Currently supported languages are provided by {dev.twitter.com/docs/api/1.1/get/help/languages -GET help/languages}.

- - - -
-
-# File lib/twitter/rest/users.rb, line 33
-def settings(options = {})
-  request_method = options.size.zero? ? :get : :post
-  response = send(request_method.to_sym, '/1.1/account/settings.json', options).body
-  # https://dev.twitter.com/issues/59
-  response.update(:trend_location => response.fetch(:trend_location, []).first)
-  Twitter::Settings.new(response)
-end
-
- -
- - - - -
- - -
- - - -
- unblock(*args) - click to toggle source -
- - -
- -

Un-blocks the users specified by the authenticating user

- -

@see dev.twitter.com/docs/api/1.1/post/blocks/destroy -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::User>] The un-blocked users. @overload -unblock(*users)

- -
@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
- -

@overload unblock(*users, options)

- -
@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/users.rb, line 210
-def unblock(*args)
-  parallel_users_from_response(:post, '/1.1/blocks/destroy.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- unmute(*args) - click to toggle source -
- - -
- -

Un-mutes the user specified by the authenticating user.

- -

@see dev.twitter.com/docs/api/1.1/post/mutes/users/destroy -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::User>] The un-muted users. @overload unmute(*users)

- -
@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
- -

@overload unmute(*users, options)

- -
@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
-@param options [Hash] A customizable set of options.
- - - -
-
-# File lib/twitter/rest/users.rb, line 408
-def unmute(*args)
-  parallel_users_from_response(:post, '/1.1/mutes/users/destroy.json', args)
-end
-
- -
- - - - -
- - -
- - - -
- update_delivery_device(device, options = {}) - click to toggle source -
- - -
- -

Sets which device Twitter delivers updates -to for the authenticating user

- -

@see dev.twitter.com/docs/api/1.1/post/account/update_delivery_device -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::User] The -authenticated user. @param device [String] Must be one of: ‘sms’, ‘none’. -@param options [Hash] A customizable set of options.

- - - -
-
-# File lib/twitter/rest/users.rb, line 64
-def update_delivery_device(device, options = {})
-  perform_with_object(:post, '/1.1/account/update_delivery_device.json', options.merge(:device => device), Twitter::User)
-end
-
- -
- - - - -
- - -
- - - -
- update_profile(options = {}) - click to toggle source -
- - -
- -

Sets values that users are able to set under the “Account” tab of their -settings page

- -

@see dev.twitter.com/docs/api/1.1/post/account/update_profile -@note Only the options specified will be updated. @rate_limited No -@authentication Requires user context @raise [Twitter::Error::Unauthorized] -Error raised when supplied user credentials are -not valid. @return [Twitter::User] The authenticated user. @param options -[Hash] A customizable set of options. @option options [String] :name Full -name associated with the profile. Maximum of 20 characters. @option options -[String] :url URL associated with the profile. Will be prepended with -“http://” if not present. Maximum of 100 characters. @option options -[String] :location The city or country describing where the user of the -account is located. The contents are not normalized or geocoded in any way. -Maximum of 30 characters. @option options [String] :description A -description of the user owning the account. Maximum of 160 characters.

- - - -
-
-# File lib/twitter/rest/users.rb, line 81
-def update_profile(options = {})
-  perform_with_object(:post, '/1.1/account/update_profile.json', options, Twitter::User)
-end
-
- -
- - - - -
- - -
- - - -
- update_profile_background_image(image, options = {}) - click to toggle source -
- - -
- -

Updates the authenticating user’s profile background image

- -

@see dev.twitter.com/docs/api/1.1/post/account/update_profile_background_image -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::User] The -authenticated user. @param image [File] The background image for the -profile, base64-encoded. Must be a valid GIF, JPG, or PNG image of less -than 800 kilobytes in size. Images with width larger than 2048 pixels will -be forcibly scaled down. The image must be provided as raw multipart data, -not a URL. @param options [Hash] A customizable set of options. @option -options [Boolean] :tile Whether or not to tile the background image. If set -to true the background image will be displayed tiled. The image will not be -tiled otherwise.

- - - -
-
-# File lib/twitter/rest/users.rb, line 95
-def update_profile_background_image(image, options = {})
-  perform_with_object(:post, '/1.1/account/update_profile_background_image.json', options.merge(:image => image), Twitter::User)
-end
-
- -
- - - - -
- - -
- - - -
- update_profile_banner(banner, options = {}) - click to toggle source -
- - -
- -

Updates the authenticating user’s profile banner image

- -

@see dev.twitter.com/docs/api/1.1/post/account/update_profile_banner -@note Uploads a profile banner on behalf of the authenticating user. For -best results, upload an <5MB image that is exactly 1252px by 626px. -Images will be resized for a number of display options. Users with an uploaded profile banner will have a -profile_banner_url node in their Users objects. -More information about sizing variations can be found in User Profile Images -and Banners. @note Profile banner images are -processed asynchronously. The profile_banner_url and its variant sizes will -not necessary be available directly after upload. @rate_limited No -@authentication Requires user context @raise [Twitter::Error::BadRequest] -Error raised when either an image was not -provided or the image data could not be processed. @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @raise -[Twitter::Error::UnprocessableEntity] Error -raised when the image could not be resized or is too large. @return [nil] -@param banner [File] The Base64-encoded or raw image data being uploaded as -the user’s new profile banner. @param options [Hash] A customizable set of -options. @option options [Integer] :width The width of the preferred -section of the image being uploaded in pixels. Use with height, -offset_left, and offset_top to select the desired region of the image to -use. @option options [Integer] :height The height of the preferred section -of the image being uploaded in pixels. Use with width, offset_left, and -offset_top to select the desired region of the image to use. @option -options [Integer] :offset_left The number of pixels by which to offset the -uploaded image from the left. Use with height, width, and offset_top to -select the desired region of the image to use. @option options [Integer] -:offset_top The number of pixels by which to offset the uploaded image from -the top. Use with height, width, and offset_left to select the desired -region of the image to use.

- - - -
-
-# File lib/twitter/rest/users.rb, line 358
-def update_profile_banner(banner, options = {})
-  post('/1.1/account/update_profile_banner.json', options.merge(:banner => banner)).body
-  true
-end
-
- -
- - - - -
- - -
- - - -
- update_profile_colors(options = {}) - click to toggle source -
- - -
- -

Sets one or more hex values that control the color scheme of the -authenticating user’s profile

- -

@see dev.twitter.com/docs/api/1.1/post/account/update_profile_colors -@rate_limited No @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::User] The -authenticated user. @param options [Hash] A customizable set of options. -@option options [String] :profile_background_color Profile background color. @option options -[String] :profile_text_color Profile text -color. @option options [String] :profile_link_color Profile link color. @option options [String] -:profile_sidebar_fill_color Profile sidebar’s -background color. @option options [String] :profile_sidebar_border_color Profile sidebar’s border color.

- - - -
-
-# File lib/twitter/rest/users.rb, line 112
-def update_profile_colors(options = {})
-  perform_with_object(:post, '/1.1/account/update_profile_colors.json', options, Twitter::User)
-end
-
- -
- - - - -
- - -
- - - -
- update_profile_image(image, options = {}) - click to toggle source -
- - -
- -

Updates the authenticating user’s profile image

- -

@see dev.twitter.com/docs/api/1.1/post/account/update_profile_image -@note Updates the authenticating user’s profile image. Note that this -method expects raw multipart data, not a URL to an image. @note This method -asynchronously processes the uploaded file before updating the user’s -profile image URL. You can either update your local cache the next time you -request the user’s information, or, at least 5 seconds after uploading the -image, ask for the updated URL using GET users/show. @rate_limited No -@authentication Requires user context @raise [Twitter::Error::Unauthorized] -Error raised when supplied user credentials are -not valid. @return [Twitter::User] The authenticated user. @param image -[File] The avatar image for the profile, base64-encoded. Must be a valid -GIF, JPG, or PNG image of less than 700 kilobytes in size. Images with -width larger than 500 pixels will be scaled down. Animated GIFs will be -converted to a static GIF of the first frame, removing the animation. -@param options [Hash] A customizable set of options.

- - - -
-
-# File lib/twitter/rest/users.rb, line 127
-def update_profile_image(image, options = {})
-  perform_with_object(:post, '/1.1/account/update_profile_image.json', options.merge(:image => image), Twitter::User)
-end
-
- -
- - - - -
- - -
- - - -
- user(*args) - click to toggle source -
- - -
- -

@see dev.twitter.com/docs/api/1.1/get/users/show -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::User] The -requested user. @overload user(options = {})

- -
Returns extended information for the authenticated user
-
-@param options [Hash] A customizable set of options.
-@option options [Boolean, String, Integer] :skip_status Do not include user's Tweets when set to true, 't' or 1.
- -

@overload user(user, options = {})

- -
Returns extended information for a given user
-
-@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
-@param options [Hash] A customizable set of options.
-@option options [Boolean, String, Integer] :skip_status Do not include user's Tweets when set to true, 't' or 1.
- - - -
-
-# File lib/twitter/rest/users.rb, line 251
-def user(*args)
-  arguments = Twitter::Arguments.new(args)
-  if arguments.last || user_id?
-    merge_user!(arguments.options, arguments.pop || user_id)
-    perform_with_object(:get, '/1.1/users/show.json', arguments.options, Twitter::User)
-  else
-    verify_credentials(arguments.options)
-  end
-end
-
- -
- - - - -
- - -
- - - -
- user?(user, options = {}) - click to toggle source -
- - -
- -

Returns true if the specified user exists

- -

@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Boolean] true if the -user exists, otherwise false. @param user [Integer, String, Twitter::User] -A Twitter user ID, screen name, URI, or -object.

- - - -
-
-# File lib/twitter/rest/users.rb, line 268
-def user?(user, options = {})
-  merge_user!(options, user)
-  get('/1.1/users/show.json', options)
-  true
-rescue Twitter::Error::NotFound
-  false
-end
-
- -
- - - - -
- - -
- - - -
- user_search(query, options = {}) - click to toggle source -
- - -
- -

Returns users that match the given query

- -

@see dev.twitter.com/docs/api/1.1/get/users/search -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::User>] @param query [String] The search query to run -against people search. @param options [Hash] A customizable set of options. -@option options [Integer] :count The number of people to retrieve. Maxiumum -of 20 allowed per page. @option options [Integer] :page Specifies the page -of results to retrieve.

- - - -
-
-# File lib/twitter/rest/users.rb, line 287
-def user_search(query, options = {})
-  perform_with_objects(:get, '/1.1/users/search.json', options.merge(:q => query), Twitter::User)
-end
-
- -
- - - - -
- - -
- - - -
- users(*args) - click to toggle source -
- - -
- -

Returns extended information for up to 100 users

- -

@see dev.twitter.com/docs/api/1.1/get/users/lookup -@rate_limited Yes @authentication Required @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return -[Array<Twitter::User>] The requested users. @overload users(*users)

- -
@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
- -

@overload users(*users, options)

- -
@param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
-@param options [Hash] A customizable set of options.
-@option options [Symbol, String] :method Requests users via a GET request instead of the standard POST request if set to ':get'.
- - - -
-
-# File lib/twitter/rest/users.rb, line 227
-def users(*args)
-  arguments = Twitter::Arguments.new(args)
-  request_method = arguments.options.delete(:method) || :post
-  flat_pmap(arguments.each_slice(MAX_USERS_PER_REQUEST)) do |users|
-    perform_with_objects(request_method, '/1.1/users/lookup.json', merge_users(arguments.options, users), Twitter::User)
-  end
-end
-
- -
- - - - -
- - -
- - - -
- verify_credentials(options = {}) - click to toggle source -
- - -
- -

Returns the requesting user if authentication was successful, otherwise -raises {Twitter::Error::Unauthorized}

- -

@see dev.twitter.com/docs/api/1.1/get/account/verify_credentials -@rate_limited Yes @authentication Requires user context @raise -[Twitter::Error::Unauthorized] Error raised -when supplied user credentials are not valid. @return [Twitter::User] The -authenticated user. @param options [Hash] A customizable set of options. -@option options [Boolean, String, Integer] :skip_status Do not include -user’s Tweets when set to true, ‘t’ or 1.

- - - -
-
-# File lib/twitter/rest/users.rb, line 50
-def verify_credentials(options = {})
-  perform_with_object(:get, '/1.1/account/verify_credentials.json', options, Twitter::User)
-end
-
- -
- - -
- Also aliased as: current_user -
- - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Utils.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Utils.html deleted file mode 100644 index b561d69..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Utils.html +++ /dev/null @@ -1,368 +0,0 @@ - - - - - - - Module: Twitter::REST::Utils - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - - - - - - - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::REST::Utils

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
DEFAULT_CURSOR
- -
- - -
URI_SUBSTRING
- -
- - -
-
- - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/RateLimit.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/RateLimit.html deleted file mode 100644 index 4983c67..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/RateLimit.html +++ /dev/null @@ -1,538 +0,0 @@ - - - - - - - Class: Twitter::RateLimit - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::RateLimit

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- limit() - click to toggle source -
- - -
- -

@return [Integer]

- - - -
-
-# File lib/twitter/rate_limit.rb, line 4
-def limit
-  limit = @attrs['x-rate-limit-limit']
-  limit.to_i if limit
-end
-
- -
- - - - -
- - -
- - - -
- remaining() - click to toggle source -
- - -
- -

@return [Integer]

- - - -
-
-# File lib/twitter/rate_limit.rb, line 11
-def remaining
-  remaining = @attrs['x-rate-limit-remaining']
-  remaining.to_i if remaining
-end
-
- -
- - - - -
- - -
- - - -
- reset_at() - click to toggle source -
- - -
- -

@return [Time]

- - - -
-
-# File lib/twitter/rate_limit.rb, line 18
-def reset_at
-  reset = @attrs['x-rate-limit-reset']
-  Time.at(reset.to_i) if reset
-end
-
- -
- - - - -
- - -
- - - -
- reset_in() - click to toggle source -
- - -
- -

@return [Integer]

- - - -
-
-# File lib/twitter/rate_limit.rb, line 25
-def reset_in
-  [(reset_at - Time.now).ceil, 0].max if reset_at
-end
-
- -
- - -
- Also aliased as: retry_after -
- - - -
- - -
- - - -
- retry_after() - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: reset_in -
- -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Relationship.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Relationship.html deleted file mode 100644 index bb8686a..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Relationship.html +++ /dev/null @@ -1,397 +0,0 @@ - - - - - - - Class: Twitter::Relationship - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Relationship

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- new(attrs = {}) - click to toggle source -
- - -
- -

Initializes a new object

- -

@param attrs [Hash] @return [Twitter::Relationship]

- - - -
-
-# File lib/twitter/relationship.rb, line 12
-def initialize(attrs = {})
-  @attrs = attrs[:relationship]
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Request.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Request.html deleted file mode 100644 index b784f92..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Request.html +++ /dev/null @@ -1,642 +0,0 @@ - - - - - - - Class: Twitter::Request - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Request

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - - - -
- client[RW] -
- -
- - - -
-
- -
- - - - -
- options[RW] -
- -
- - - -
-
- -
- - - - -
- path[RW] -
- -
- - - -
-
- -
- - - - -
- request_method[RW] -
- -
- - - -
-
- -
- - - - -
- verb[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- - - -
- new(client, request_method, path, options = {}) - click to toggle source -
- - -
- -

@param client [Twitter::Client] @param request_method [String, -Symbol] @param path [String] @param options [Hash] @return -[Twitter::Request]

- - - -
-
-# File lib/twitter/request.rb, line 13
-def initialize(client, request_method, path, options = {})
-  @client = client
-  @request_method = request_method.to_sym
-  @path = path
-  @options = options
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- perform() - click to toggle source -
- - -
- -

@return [Hash]

- - - -
-
-# File lib/twitter/request.rb, line 21
-def perform
-  @client.send(@request_method, @path, @options).body
-end
-
- -
- - - - -
- - -
- - - -
- perform_with_cursor(collection_name, klass = nil) - click to toggle source -
- - -
- -

@param collection_name [Symbol] @param klass [Class] @return -[Twitter::Cursor]

- - - -
-
-# File lib/twitter/request.rb, line 35
-def perform_with_cursor(collection_name, klass = nil)
-  Twitter::Cursor.new(perform, collection_name.to_sym, klass, self)
-end
-
- -
- - - - -
- - -
- - - -
- perform_with_object(klass) - click to toggle source -
- - -
- -

@param klass [Class] @param request [Twitter::Request] @return [Object]

- - - -
-
-# File lib/twitter/request.rb, line 28
-def perform_with_object(klass)
-  klass.new(perform)
-end
-
- -
- - - - -
- - -
- - - -
- perform_with_objects(klass) - click to toggle source -
- - -
- -

@param klass [Class] @return [Array]

- - - -
-
-# File lib/twitter/request.rb, line 41
-def perform_with_objects(klass)
-  perform.collect do |element|
-    klass.new(element)
-  end
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/SavedSearch.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/SavedSearch.html deleted file mode 100644 index 1be9f05..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/SavedSearch.html +++ /dev/null @@ -1,410 +0,0 @@ - - - - - - - Class: Twitter::SavedSearch - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::SavedSearch

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- name[R] -
- -
- - - -
-
- -
- - -
- position[R] -
- -
- - - -
-
- -
- - -
- query[R] -
- -
- - - -
-
- -
- - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/SearchResults.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/SearchResults.html deleted file mode 100644 index c3eabe1..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/SearchResults.html +++ /dev/null @@ -1,456 +0,0 @@ - - - - - - - Class: Twitter::SearchResults - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::SearchResults

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- attrs[R] -
- -
- - - -
-
- -
- - -
- to_h[R] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- - - -
- new(attrs, request) - click to toggle source -
- - -
- -

Initializes a new SearchResults object

- -

@param attrs [Hash] @param request [Twitter::Request] @return -[Twitter::SearchResults]

- - - -
-
-# File lib/twitter/search_results.rb, line 20
-def initialize(attrs, request)
-  @client = request.client
-  @request_method = request.verb
-  @path = request.path
-  @options = request.options
-  @collection = []
-  self.attrs = attrs
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Settings.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Settings.html deleted file mode 100644 index 183c692..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Settings.html +++ /dev/null @@ -1,413 +0,0 @@ - - - - - - - Class: Twitter::Settings - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Settings

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- language[R] -
- -
- - - -
-
- -
- - -
- screen_name[R] -
- -
- - - -
-
- -
- - -
- sleep_time[R] -
- -
- - - -
-
- -
- - -
- time_zone[R] -
- -
- - - -
-
- -
- - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Size.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Size.html deleted file mode 100644 index becc27b..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Size.html +++ /dev/null @@ -1,440 +0,0 @@ - - - - - - - Class: Twitter::Size - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Size

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- h[R] -
- -
- - - -
-
- -
- - -
- height[R] -
- -
- - - -
-
- -
- - -
- resize[R] -
- -
- - - -
-
- -
- - -
- w[R] -
- -
- - - -
-
- -
- - -
- width[R] -
- -
- - - -
-
- -
- - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/SourceUser.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/SourceUser.html deleted file mode 100644 index 774ded6..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/SourceUser.html +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - - Class: Twitter::SourceUser - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::SourceUser

- -
- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming.html deleted file mode 100644 index c9559de..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming.html +++ /dev/null @@ -1,396 +0,0 @@ - - - - - - - Module: Twitter::Streaming - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- - - - - -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Streaming

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
DeletedStatus
- -
- - -
-
- - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/Client.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/Client.html deleted file mode 100644 index 7c88574..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/Client.html +++ /dev/null @@ -1,780 +0,0 @@ - - - - - - - Class: Twitter::Streaming::Client - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Streaming::Client

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - - - -
- connection[W] -
- -
- - - -
-
- -
- - - - -
- ssl_socket_class[RW] -
- -
- - - -
-
- -
- - - - -
- tcp_socket_class[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- - - -
- new(options = {}) - click to toggle source -
- - -
- -

Initializes a new Client object

- -

@param options [Hash] A customizable set of options. @option options -[String] :tcp_socket_class A -class that Connection will use to create a -new TCP socket. @option options [String] :ssl_socket_class A -class that Connection will use to create a -new SSL socket. @return [Twitter::Streaming::Client]

- - - -
-
-# File lib/twitter/streaming/client.rb, line 20
-def initialize(options = {})
-  super
-  @connection = Streaming::Connection.new(options)
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- before_request(&block) - click to toggle source -
- - -
- -

Set a Proc to be run when connection established.

- - - -
-
-# File lib/twitter/streaming/client.rb, line 94
-def before_request(&block)
-  if block_given?
-    @before_request = block
-    self
-  elsif instance_variable_defined?(:@before_request)
-    @before_request
-  else
-    proc {}
-  end
-end
-
- -
- - - - -
- - -
- - - -
- filter(options = {}, &block) - click to toggle source -
- - -
- -

Returns public statuses that match one or more filter predicates

- -

@see dev.twitter.com/docs/api/1.1/post/statuses/filter -@see dev.twitter.com/docs/streaming-apis/parameters -@note At least one predicate parameter (follow, locations, or track) must -be specified. @param options [Hash] A customizable set of options. @option -options [String] :follow A comma separated list of user IDs, indicating the -users to return statuses for in the stream. @option options [String] :track -Includes additional Tweets matching the specified keywords. Phrases of -keywords are specified by a comma-separated list. @option options [String] -:locations Includes additional Tweets falling within the specified bounding -boxes. @yield [Twitter::Tweet, Twitter::Streaming::Event, Twitter::DirectMessage, Twitter::Streaming::FriendList, Twitter::Streaming::DeletedTweet, -Twitter::Streaming::StallWarning] A stream of Twitter objects.

- - - -
-
-# File lib/twitter/streaming/client.rb, line 35
-def filter(options = {}, &block)
-  request(:post, 'https://stream.twitter.com:443/1.1/statuses/filter.json', options, &block)
-end
-
- -
- - - - -
- - -
- - - -
- firehose(options = {}, &block) - click to toggle source -
- - -
- -

Returns all public statuses

- -

@see dev.twitter.com/docs/api/1.1/get/statuses/firehose -@see dev.twitter.com/docs/streaming-apis/parameters -@note This endpoint requires special permission to access. @param options -[Hash] A customizable set of options. @option options [Integer] :count The -number of messages to backfill. @yield [Twitter::Tweet, Twitter::Streaming::Event, Twitter::DirectMessage, Twitter::Streaming::FriendList, Twitter::Streaming::DeletedTweet, -Twitter::Streaming::StallWarning] A stream of Twitter objects.

- - - -
-
-# File lib/twitter/streaming/client.rb, line 47
-def firehose(options = {}, &block)
-  request(:get, 'https://stream.twitter.com:443/1.1/statuses/firehose.json', options, &block)
-end
-
- -
- - - - -
- - -
- - - -
- sample(options = {}, &block) - click to toggle source -
- - -
- -

Returns a small random sample of all public statuses

- -

@see dev.twitter.com/docs/api/1.1/get/statuses/sample -@see dev.twitter.com/docs/streaming-apis/parameters -@yield [Twitter::Tweet, Twitter::Streaming::Event, Twitter::DirectMessage, Twitter::Streaming::FriendList, Twitter::Streaming::DeletedTweet, -Twitter::Streaming::StallWarning] A stream of Twitter objects.

- - - -
-
-# File lib/twitter/streaming/client.rb, line 56
-def sample(options = {}, &block)
-  request(:get, 'https://stream.twitter.com:443/1.1/statuses/sample.json', options, &block)
-end
-
- -
- - - - -
- - -
- - - -
- site(*args, &block) - click to toggle source -
- - -
- -

Streams messages for a set of user

- -

@see dev.twitter.com/docs/api/1.1/get/site -@see dev.twitter.com/docs/streaming-apis/streams/site -@see dev.twitter.com/docs/streaming-apis/parameters -@note Site Streams is currently in a limited beta. Access is restricted to -whitelisted accounts. @param follow [Enumerable<Integer, String, -Twitter::User>] A list of user IDs, indicating the users to return -statuses for in the stream. @param options [Hash] A customizable set of -options. @option options [String] :with Specifies whether to return -information for just the users specified in the follow parameter, or -include messages from accounts they follow. @option options [String] -:replies Specifies whether stall warnings should be delivered. @yield [Twitter::Tweet, Twitter::Streaming::Event, Twitter::DirectMessage, Twitter::Streaming::FriendList, Twitter::Streaming::DeletedTweet, -Twitter::Streaming::StallWarning] A stream of Twitter objects.

- - - -
-
-# File lib/twitter/streaming/client.rb, line 71
-def site(*args, &block)
-  arguments = Arguments.new(args)
-  user_ids = collect_user_ids(arguments)
-  request(:get, 'https://sitestream.twitter.com:443/1.1/site.json', arguments.options.merge(:follow => user_ids.join(',')), &block)
-end
-
- -
- - - - -
- - -
- - - -
- user(options = {}, &block) - click to toggle source -
- - -
- -

Streams messages for a single user

- -

@see dev.twitter.com/docs/api/1.1/get/user -@see dev.twitter.com/docs/streaming-apis/streams/user -@see dev.twitter.com/docs/streaming-apis/parameters -@param options [Hash] A customizable set of options. @option options -[String] :with Specifies whether to return information for just the users -specified in the follow parameter, or include messages from accounts they -follow. @option options [String] :replies Specifies whether to return -additional @replies. @option options [String] :stall_warnings Specifies -whether stall warnings should be delivered. @option options [String] :track -Includes additional Tweets matching the specified keywords. Phrases of -keywords are specified by a comma-separated list. @option options [String] -:locations Includes additional Tweets falling within the specified bounding -boxes. @yield [Twitter::Tweet, Twitter::Streaming::Event, Twitter::DirectMessage, Twitter::Streaming::FriendList, Twitter::Streaming::DeletedTweet, -Twitter::Streaming::StallWarning] A stream of Twitter objects.

- - - -
-
-# File lib/twitter/streaming/client.rb, line 89
-def user(options = {}, &block)
-  request(:get, 'https://userstream.twitter.com:443/1.1/user.json', options, &block)
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/Connection.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/Connection.html deleted file mode 100644 index 7d9f2b6..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/Connection.html +++ /dev/null @@ -1,482 +0,0 @@ - - - - - - - Class: Twitter::Streaming::Connection - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Streaming::Connection

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- ssl_socket_class[R] -
- -
- - - -
-
- -
- - -
- tcp_socket_class[R] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- - - -
- new(opts = {}) - click to toggle source -
- - -
- - - - - -
-
-# File lib/twitter/streaming/connection.rb, line 8
-def initialize(opts = {})
-  @tcp_socket_class = opts.fetch(:tcp_socket_class) { TCPSocket }
-  @ssl_socket_class = opts.fetch(:ssl_socket_class) { OpenSSL::SSL::SSLSocket }
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- stream(request, response) - click to toggle source -
- - -
- - - - - -
-
-# File lib/twitter/streaming/connection.rb, line 14
-def stream(request, response)
-  client_context = OpenSSL::SSL::SSLContext.new
-  client         = @tcp_socket_class.new(Resolv.getaddress(request.uri.host), request.uri.port)
-  ssl_client     = @ssl_socket_class.new(client, client_context)
-
-  ssl_client.connect
-  request.stream(ssl_client)
-  while body = ssl_client.readpartial(1024) # rubocop:disable AssignmentInCondition, WhileUntilModifier
-    response << body
-  end
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/DeletedTweet.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/DeletedTweet.html deleted file mode 100644 index 12e7eb1..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/DeletedTweet.html +++ /dev/null @@ -1,368 +0,0 @@ - - - - - - - Class: Twitter::Streaming::DeletedTweet - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Streaming::DeletedTweet

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- user_id[R] -
- -
- - - -
-
- -
- - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/Event.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/Event.html deleted file mode 100644 index ddcc49f..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/Event.html +++ /dev/null @@ -1,483 +0,0 @@ - - - - - - - Class: Twitter::Streaming::Event - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Streaming::Event

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
LIST_EVENTS
- -
- - -
TWEET_EVENTS
- -
- - -
-
- - - - -
-

Attributes

- - -
- - -
- name[R] -
- -
- - - -
-
- -
- - -
- source[R] -
- -
- - - -
-
- -
- - -
- target[R] -
- -
- - - -
-
- -
- - -
- target_object[R] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- - - -
- new(data) - click to toggle source -
- - -
- -

@param data [Hash]

- - - -
-
-# File lib/twitter/streaming/event.rb, line 17
-def initialize(data)
-  @name = data[:event].to_sym
-  @source = Twitter::User.new(data[:source])
-  @target = Twitter::User.new(data[:target])
-  @target_object = target_object_factory(@name, data[:target_object])
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/FriendList.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/FriendList.html deleted file mode 100644 index 9cf4a75..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/FriendList.html +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - - Class: Twitter::Streaming::FriendList - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Streaming::FriendList

- -
- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/MessageParser.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/MessageParser.html deleted file mode 100644 index db3aca6..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/MessageParser.html +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - - Class: Twitter::Streaming::MessageParser - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Streaming::MessageParser

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- parse(data) - click to toggle source -
- - -
- - - - - -
-
-# File lib/twitter/streaming/message_parser.rb, line 11
-def self.parse(data) # rubocop:disable CyclomaticComplexity
-  if data[:id]
-    Tweet.new(data)
-  elsif data[:event]
-    Event.new(data)
-  elsif data[:direct_message]
-    DirectMessage.new(data[:direct_message])
-  elsif data[:friends]
-    FriendList.new(data[:friends])
-  elsif data[:delete] && data[:delete][:status]
-    DeletedTweet.new(data[:delete][:status])
-  elsif data[:warning]
-    StallWarning.new(data[:warning])
-  end
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/Response.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/Response.html deleted file mode 100644 index 22ff74d..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/Response.html +++ /dev/null @@ -1,514 +0,0 @@ - - - - - - - Class: Twitter::Streaming::Response - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Streaming::Response

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- new(&block) - click to toggle source -
- - -
- -

Initializes a new Response object

- -

@return [Twitter::Streaming::Response]

- - - -
-
-# File lib/twitter/streaming/response.rb, line 9
-def initialize(&block)
-  @block     = block
-  @parser    = Http::Parser.new(self)
-  @tokenizer = BufferedTokenizer.new("\r\n")
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- <<(data) - click to toggle source -
- - -
- - - - - -
-
-# File lib/twitter/streaming/response.rb, line 15
-def <<(data)
-  @parser << data
-end
-
- -
- - - - -
- - -
- - - -
- on_body(data) - click to toggle source -
- - -
- - - - - -
-
-# File lib/twitter/streaming/response.rb, line 24
-def on_body(data)
-  @tokenizer.extract(data).each do |line|
-    next if line.empty?
-    @block.call(JSON.parse(line, :symbolize_names => true))
-  end
-end
-
- -
- - - - -
- - -
- - - -
- on_headers_complete(_headers) - click to toggle source -
- - -
- - - - - -
-
-# File lib/twitter/streaming/response.rb, line 19
-def on_headers_complete(_headers)
-  error = Twitter::Error.errors[@parser.status_code]
-  fail error.new if error
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/StallWarning.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/StallWarning.html deleted file mode 100644 index dc39ee9..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Streaming/StallWarning.html +++ /dev/null @@ -1,398 +0,0 @@ - - - - - - - Class: Twitter::Streaming::StallWarning - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Streaming::StallWarning

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- code[R] -
- -
- - - -
-
- -
- - -
- message[R] -
- -
- - - -
-
- -
- - -
- percent_full[R] -
- -
- - - -
-
- -
- - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Suggestion.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Suggestion.html deleted file mode 100644 index 0a48ace..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Suggestion.html +++ /dev/null @@ -1,461 +0,0 @@ - - - - - - - Class: Twitter::Suggestion - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Suggestion

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- name[R] -
- -
- - - -
-
- -
- - -
- size[R] -
- -
- - - -
-
- -
- - -
- slug[R] -
- -
- - - -
-
- -
- - - - -
-

Public Instance Methods

- - -
- - - -
- users() - click to toggle source -
- - -
- -

@return [Array<Twitter::User>]

- - - -
-
-# File lib/twitter/suggestion.rb, line 10
-def users
-  @attrs.fetch(:users, []).collect do |user|
-    User.new(user)
-  end
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/TargetUser.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/TargetUser.html deleted file mode 100644 index 3ad349a..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/TargetUser.html +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - - Class: Twitter::TargetUser - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::TargetUser

- -
- -
- - - - -
- - - - - - - - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Token.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Token.html deleted file mode 100644 index fc1ff60..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Token.html +++ /dev/null @@ -1,460 +0,0 @@ - - - - - - - Class: Twitter::Token - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Token

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
BEARER_TYPE
- -
- - -
-
- - - - -
-

Attributes

- - -
- - -
- access_token[R] -
- -
- - - -
-
- -
- - -
- to_s[R] -
- -
- - - -
-
- -
- - -
- token_type[R] -
- -
- - - -
-
- -
- - - - -
-

Public Instance Methods

- - -
- - - -
- bearer?() - click to toggle source -
- - -
- -

@return [Boolean]

- - - -
-
-# File lib/twitter/token.rb, line 11
-def bearer?
-  @attrs[:token_type] == BEARER_TYPE
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Trend.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Trend.html deleted file mode 100644 index 21cac1e..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Trend.html +++ /dev/null @@ -1,410 +0,0 @@ - - - - - - - Class: Twitter::Trend - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Trend

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- events[R] -
- -
- - - -
-
- -
- - -
- name[R] -
- -
- - - -
-
- -
- - -
- query[R] -
- -
- - - -
-
- -
- - - - -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/TrendResults.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/TrendResults.html deleted file mode 100644 index 18d10a1..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/TrendResults.html +++ /dev/null @@ -1,609 +0,0 @@ - - - - - - - Class: Twitter::TrendResults - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::TrendResults

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- attrs[R] -
- -
- - - -
-
- -
- - -
- to_h[R] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- - - -
- new(attrs = {}) - click to toggle source -
- - -
- -

Initializes a new TrendResults object

- -

@param attrs [Hash] @return [Twitter::TrendResults]

- - - -
-
-# File lib/twitter/trend_results.rb, line 22
-def initialize(attrs = {})
-  @attrs = attrs
-  @collection = @attrs.fetch(:trends, []).collect do |trend|
-    Trend.new(trend)
-  end
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- - - -
- as_of() - click to toggle source -
- - -
- -

Time when the object was created on Twitter

- -

@return [Time]

- - - -
-
-# File lib/twitter/trend_results.rb, line 32
-def as_of
-  Time.parse(@attrs[:as_of]) unless @attrs[:as_of].nil?
-end
-
- -
- - - - -
- - -
- - - -
- as_of?() - click to toggle source -
- - -
- - - - - -
-
-# File lib/twitter/trend_results.rb, line 37
-def as_of?
-  !!@attrs[:as_of]
-end
-
- -
- - - - -
- - -
- - - -
- location() - click to toggle source -
- - -
- -

@return [Twitter::Place, NullObject]

- - - -
-
-# File lib/twitter/trend_results.rb, line 43
-def location
-  location? ? Place.new(@attrs[:locations].first) : NullObject.new
-end
-
- -
- - - - -
- - -
- - - -
- location?() - click to toggle source -
- - -
- -

@return [Boolean]

- - - -
-
-# File lib/twitter/trend_results.rb, line 49
-def location?
-  !@attrs[:locations].nil? && !@attrs[:locations].first.nil?
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Tweet.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Tweet.html deleted file mode 100644 index 0cae740..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Tweet.html +++ /dev/null @@ -1,658 +0,0 @@ - - - - - - - Class: Twitter::Tweet - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Tweet

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- favorite_count[R] -
- -
- - - -
-
- -
- - -
- filter_level[R] -
- -
- - - -
-
- -
- - -
- in_reply_to_attrs_id[R] -
- -
- - - -
-
- -
- - -
- in_reply_to_screen_name[R] -
- -
- - - -
-
- -
- - -
- in_reply_to_status_id[R] -
- -
- - - -
-
- -
- - -
- in_reply_to_tweet_id[R] -
- -
- - - -
-
- -
- - -
- in_reply_to_user_id[R] -
- -
- - - -
-
- -
- - -
- lang[R] -
- -
- - - -
-
- -
- - -
- retweet_count[R] -
- -
- - - -
-
- -
- - -
- source[R] -
- -
- - - -
-
- -
- - -
- text[R] -
- -
- - - -
-
- -
- - - - -
-

Public Instance Methods

- - -
- - - -
- full_text() - click to toggle source -
- - -
- -

@note May be > 140 characters. @return [String]

- - - -
-
-# File lib/twitter/tweet.rb, line 29
-def full_text
-  if retweet?
-    prefix = text[/\A(RT @[a-z0-9_]{1,20}: )/, 1]
-    [prefix, retweeted_status.text].compact.join
-  else
-    text
-  end
-end
-
- -
- - - - -
- - -
- - - -
- uri() - click to toggle source -
- - -
- -

@return [String] The URL to the tweet.

- - - -
-
-# File lib/twitter/tweet.rb, line 40
-def uri
-  Addressable::URI.parse("https://twitter.com/#{user.screen_name}/status/#{id}") unless user.nil?
-end
-
- -
- - -
- Also aliased as: url -
- - - -
- - -
- - - -
- url() - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: uri -
- -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/User.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/User.html deleted file mode 100644 index 3f52bac..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/User.html +++ /dev/null @@ -1,911 +0,0 @@ - - - - - - - Class: Twitter::User - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - - -
-

Included Modules

- -
- -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::User

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
- - -
- connections[R] -
- -
- - - -
-
- -
- - -
- description[R] -
- -
- - - -
-
- -
- - -
- favorites_count[R] -
- -
- - - -
-
- -
- - -
- favourites_count[R] -
- -
- - - -
-
- -
- - -
- followers_count[R] -
- -
- - - -
-
- -
- - -
- friends_count[R] -
- -
- - - -
-
- -
- - -
- lang[R] -
- -
- - - -
-
- -
- - -
- listed_count[R] -
- -
- - - -
-
- -
- - -
- location[R] -
- -
- - - -
-
- -
- - -
- name[R] -
- -
- - - -
-
- -
- - -
- profile_background_color[R] -
- -
- - - -
-
- -
- - -
- profile_background_image_uri[R] -
- -
- - - -
-
- -
- - -
- profile_background_image_uri_https[R] -
- -
- - - -
-
- -
- - -
- profile_background_image_url[R] -
- -
- - - -
-
- -
- - -
- profile_background_image_url_https[R] -
- -
- - - -
-
- - - -
- - -
- profile_sidebar_border_color[R] -
- -
- - - -
-
- -
- - -
- profile_sidebar_fill_color[R] -
- -
- - - -
-
- -
- - -
- profile_text_color[R] -
- -
- - - -
-
- -
- - -
- statuses_count[R] -
- -
- - - -
-
- -
- - -
- time_zone[R] -
- -
- - - -
-
- -
- - -
- tweets_count[R] -
- -
- - - -
-
- -
- - -
- utc_offset[R] -
- -
- - - -
-
- -
- - - - -
-

Public Instance Methods

- - -
- - - -
- entities?() - click to toggle source -
- - -
- -

@return [Boolean]

- - - -
-
-# File lib/twitter/user.rb, line 76
-def entities?
-  !@attrs[:entities].nil? && @attrs[:entities].any? { |_, hash| hash[:urls].any? }
-end
-
- -
- - - - -
- - -
- - - -
- uri() - click to toggle source -
- - -
- -

@return [String] The URL to the user.

- - - -
-
-# File lib/twitter/user.rb, line 82
-def uri
-  Addressable::URI.parse("https://twitter.com/#{screen_name}") unless screen_name.nil?
-end
-
- -
- - -
- Also aliased as: url -
- - - -
- - -
- - - -
- url() - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: uri -
- -
- - -
- - - -
- website() - click to toggle source -
- - -
- -

@return [String] The URL to the user’s website.

- - - -
-
-# File lib/twitter/user.rb, line 89
-def website
-  if website_urls?
-    website_urls.first.expanded_url
-  else
-    Addressable::URI.parse(@attrs[:url])
-  end
-end
-
- -
- - - - -
- - -
- - - -
- website?() - click to toggle source -
- - -
- - - - - -
-
-# File lib/twitter/user.rb, line 98
-def website?
-  !!(website_uris? || @attrs[:url])
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Utils.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Utils.html deleted file mode 100644 index e6a7230..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Utils.html +++ /dev/null @@ -1,481 +0,0 @@ - - - - - - - Module: Twitter::Utils - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - - - - - -
-

Namespace

- -
- - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Utils

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- - - -
- flat_pmap(enumerable) - click to toggle source -
- - -
- -

Returns a new array with the concatenated results of running block once for -every element in enumerable. If no block is given, an enumerator is -returned instead.

- -

@param enumerable [Enumerable] @return [Array, Enumerator]

- - - -
-
-# File lib/twitter/utils.rb, line 27
-def flat_pmap(enumerable)
-  return to_enum(:flat_pmap, enumerable) unless block_given?
-  pmap(enumerable, &Proc.new).flatten!(1)
-end
-
- -
- - - - -
- - -
- - - -
- included(base) - click to toggle source -
- - -
- - - - - -
-
-# File lib/twitter/utils.rb, line 4
-def included(base)
-  base.extend(ClassMethods)
-end
-
- -
- - - - -
- - -
- - - -
- pmap(enumerable) - click to toggle source -
- - -
- -

Returns a new array with the results of running block once for every -element in enumerable. If no block is given, an enumerator is returned -instead.

- -

@param enumerable [Enumerable] @return [Array, Enumerator]

- - - -
-
-# File lib/twitter/utils.rb, line 38
-def pmap(enumerable)
-  return to_enum(:pmap, enumerable) unless block_given?
-  if enumerable.count == 1
-    enumerable.collect { |object| yield(object) }
-  else
-    enumerable.collect { |object| Thread.new { yield(object) } }.collect(&:value)
-  end
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Utils/ClassMethods.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Utils/ClassMethods.html deleted file mode 100644 index b3778b7..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Utils/ClassMethods.html +++ /dev/null @@ -1,394 +0,0 @@ - - - - - - - Module: Twitter::Utils::ClassMethods - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

-
- -
-
- - -
- -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Utils::ClassMethods

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- - - -
- deprecate_alias(new_name, old_name) - click to toggle source -
- - -
- - - - - -
-
-# File lib/twitter/utils.rb, line 10
-def deprecate_alias(new_name, old_name)
-  define_method(new_name) do |*args|
-    warn "#{Kernel.caller.first}: [DEPRECATION] ##{new_name} is deprecated. Use ##{old_name} instead."
-    if block_given?
-      send(old_name, *args, &Proc.new)
-    else
-      send(old_name, *args)
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Version.html b/.gems/doc/twitter-5.11.0/rdoc/Twitter/Version.html deleted file mode 100644 index 29d3e5a..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/Twitter/Version.html +++ /dev/null @@ -1,423 +0,0 @@ - - - - - - - Class: Twitter::Version - - - - - - - - - - - -
-
-
-

- Home - Classes - Methods -

-
-
- -
-
-

In Files

- -
- - -
- -
- - -
-

Parent

- - - -
- - - - - - - - -
-

Methods

- -
- - - -
- -
- - - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
-
- -
-

Twitter::Version

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
MAJOR
- -
- - -
MINOR
- -
- - -
PATCH
- -
- - -
PRE
- -
- - -
-
- - - - - - -
-

Public Class Methods

- - -
- - - -
- to_s() - click to toggle source -
- - -
- -

@return [String]

- - - -
-
-# File lib/twitter/version.rb, line 10
-def to_s
-  [MAJOR, MINOR, PATCH, PRE].compact.join('.')
-end
-
- -
- - - - -
- - -
- -
- - -
- -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/created.rid b/.gems/doc/twitter-5.11.0/rdoc/created.rid deleted file mode 100644 index bd0fa9e..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/created.rid +++ /dev/null @@ -1,84 +0,0 @@ -Wed, 03 Sep 2014 10:27:32 +0200 -lib/twitter/target_user.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/entities.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/client.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/trend_results.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/media_factory.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/size.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/profile.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/source_user.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/relationship.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/creatable.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/geo_factory.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/version.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/entity/symbol.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/entity/uri.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/entity/hashtag.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/entity/user_mention.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/tweet.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/geo/point.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/geo/polygon.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/factory.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/utils.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/trend.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/streaming/deleted_tweet.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/streaming/client.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/streaming/stall_warning.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/streaming/connection.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/streaming/message_parser.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/streaming/friend_list.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/streaming/response.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/streaming/event.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/basic_user.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/profile_banner.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/search_results.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/geo.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/cursor.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/request.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/arguments.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/saved_search.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rate_limit.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/metadata.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/direct_message.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/client.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/api.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/suggested_users.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/oauth.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/response/parse_error_json.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/response/parse_json.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/response/raise_error.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/search.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/undocumented.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/saved_searches.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/favorites.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/utils.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/request/multipart_with_file.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/places_and_geo.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/users.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/lists.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/help.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/spam_reporting.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/media.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/tweets.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/friends_and_followers.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/trends.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/timelines.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/direct_messages.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/configuration.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/geo_results.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/suggestion.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/null_object.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/media/photo.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/identity.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/base.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/oembed.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/settings.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/language.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/list.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/token.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/entity.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/user.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/enumerable.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/place.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/error.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter.rb Wed, 03 Sep 2014 10:27:28 +0200 diff --git a/.gems/doc/twitter-5.11.0/rdoc/images/brick.png b/.gems/doc/twitter-5.11.0/rdoc/images/brick.png deleted file mode 100644 index 7851cf3..0000000 Binary files a/.gems/doc/twitter-5.11.0/rdoc/images/brick.png and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/rdoc/images/brick_link.png b/.gems/doc/twitter-5.11.0/rdoc/images/brick_link.png deleted file mode 100644 index 9ebf013..0000000 Binary files a/.gems/doc/twitter-5.11.0/rdoc/images/brick_link.png and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/rdoc/images/bug.png b/.gems/doc/twitter-5.11.0/rdoc/images/bug.png deleted file mode 100644 index 2d5fb90..0000000 Binary files a/.gems/doc/twitter-5.11.0/rdoc/images/bug.png and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/rdoc/images/bullet_black.png b/.gems/doc/twitter-5.11.0/rdoc/images/bullet_black.png deleted file mode 100644 index 5761970..0000000 Binary files a/.gems/doc/twitter-5.11.0/rdoc/images/bullet_black.png and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/rdoc/images/bullet_toggle_minus.png b/.gems/doc/twitter-5.11.0/rdoc/images/bullet_toggle_minus.png deleted file mode 100644 index b47ce55..0000000 Binary files a/.gems/doc/twitter-5.11.0/rdoc/images/bullet_toggle_minus.png and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/rdoc/images/bullet_toggle_plus.png b/.gems/doc/twitter-5.11.0/rdoc/images/bullet_toggle_plus.png deleted file mode 100644 index 9ab4a89..0000000 Binary files a/.gems/doc/twitter-5.11.0/rdoc/images/bullet_toggle_plus.png and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/rdoc/images/date.png b/.gems/doc/twitter-5.11.0/rdoc/images/date.png deleted file mode 100644 index 783c833..0000000 Binary files a/.gems/doc/twitter-5.11.0/rdoc/images/date.png and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/rdoc/images/find.png b/.gems/doc/twitter-5.11.0/rdoc/images/find.png deleted file mode 100644 index 1547479..0000000 Binary files a/.gems/doc/twitter-5.11.0/rdoc/images/find.png and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/rdoc/images/loadingAnimation.gif b/.gems/doc/twitter-5.11.0/rdoc/images/loadingAnimation.gif deleted file mode 100644 index 82290f4..0000000 Binary files a/.gems/doc/twitter-5.11.0/rdoc/images/loadingAnimation.gif and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/rdoc/images/macFFBgHack.png b/.gems/doc/twitter-5.11.0/rdoc/images/macFFBgHack.png deleted file mode 100644 index c6473b3..0000000 Binary files a/.gems/doc/twitter-5.11.0/rdoc/images/macFFBgHack.png and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/rdoc/images/package.png b/.gems/doc/twitter-5.11.0/rdoc/images/package.png deleted file mode 100644 index da3c2a2..0000000 Binary files a/.gems/doc/twitter-5.11.0/rdoc/images/package.png and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/rdoc/images/page_green.png b/.gems/doc/twitter-5.11.0/rdoc/images/page_green.png deleted file mode 100644 index de8e003..0000000 Binary files a/.gems/doc/twitter-5.11.0/rdoc/images/page_green.png and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/rdoc/images/page_white_text.png b/.gems/doc/twitter-5.11.0/rdoc/images/page_white_text.png deleted file mode 100644 index 813f712..0000000 Binary files a/.gems/doc/twitter-5.11.0/rdoc/images/page_white_text.png and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/rdoc/images/page_white_width.png b/.gems/doc/twitter-5.11.0/rdoc/images/page_white_width.png deleted file mode 100644 index 1eb8809..0000000 Binary files a/.gems/doc/twitter-5.11.0/rdoc/images/page_white_width.png and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/rdoc/images/plugin.png b/.gems/doc/twitter-5.11.0/rdoc/images/plugin.png deleted file mode 100644 index 6187b15..0000000 Binary files a/.gems/doc/twitter-5.11.0/rdoc/images/plugin.png and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/rdoc/images/ruby.png b/.gems/doc/twitter-5.11.0/rdoc/images/ruby.png deleted file mode 100644 index f763a16..0000000 Binary files a/.gems/doc/twitter-5.11.0/rdoc/images/ruby.png and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/rdoc/images/tag_green.png b/.gems/doc/twitter-5.11.0/rdoc/images/tag_green.png deleted file mode 100644 index 83ec984..0000000 Binary files a/.gems/doc/twitter-5.11.0/rdoc/images/tag_green.png and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/rdoc/images/wrench.png b/.gems/doc/twitter-5.11.0/rdoc/images/wrench.png deleted file mode 100644 index 5c8213f..0000000 Binary files a/.gems/doc/twitter-5.11.0/rdoc/images/wrench.png and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/rdoc/images/wrench_orange.png b/.gems/doc/twitter-5.11.0/rdoc/images/wrench_orange.png deleted file mode 100644 index 565a933..0000000 Binary files a/.gems/doc/twitter-5.11.0/rdoc/images/wrench_orange.png and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/rdoc/images/zoom.png b/.gems/doc/twitter-5.11.0/rdoc/images/zoom.png deleted file mode 100644 index 908612e..0000000 Binary files a/.gems/doc/twitter-5.11.0/rdoc/images/zoom.png and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/rdoc/index.html b/.gems/doc/twitter-5.11.0/rdoc/index.html deleted file mode 100644 index fcbeb13..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/index.html +++ /dev/null @@ -1,813 +0,0 @@ - - - - - - - - twitter-5.11.0 Documentation - - - - - - - - - - - - -

twitter-5.11.0 Documentation

- - -

This is the API documentation for 'twitter-5.11.0 Documentation'.

- - - - - -

Classes/Modules

- - -

Methods

- - -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - diff --git a/.gems/doc/twitter-5.11.0/rdoc/js/darkfish.js b/.gems/doc/twitter-5.11.0/rdoc/js/darkfish.js deleted file mode 100644 index 7a2f44c..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/js/darkfish.js +++ /dev/null @@ -1,118 +0,0 @@ -/** - * - * Darkfish Page Functions - * $Id: darkfish.js 53 2009-01-07 02:52:03Z deveiant $ - * - * Author: Michael Granger - * - */ - -/* Provide console simulation for firebug-less environments */ -if (!("console" in window) || !("firebug" in console)) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", - "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; - - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -}; - - -/** - * Unwrap the first element that matches the given @expr@ from the targets and return them. - */ -$.fn.unwrap = function( expr ) { - return this.each( function() { - $(this).parents( expr ).eq( 0 ).after( this ).remove(); - }); -}; - - -function showSource( e ) { - var target = e.target; - var codeSections = $(target). - parents('.method-detail'). - find('.method-source-code'); - - $(target). - parents('.method-detail'). - find('.method-source-code'). - slideToggle(); -}; - -function hookSourceViews() { - $('.method-description,.method-heading').click( showSource ); -}; - -function toggleDebuggingSection() { - $('.debugging-section').slideToggle(); -}; - -function hookDebuggingToggle() { - $('#debugging-toggle img').click( toggleDebuggingSection ); -}; - -function hookQuickSearch() { - $('.quicksearch-field').each( function() { - var searchElems = $(this).parents('.section').find( 'li' ); - var toggle = $(this).parents('.section').find('h3 .search-toggle'); - // console.debug( "Toggle is: %o", toggle ); - var qsbox = $(this).parents('form').get( 0 ); - - $(this).quicksearch( this, searchElems, { - noSearchResultsIndicator: 'no-class-search-results', - focusOnLoad: false - }); - $(toggle).click( function() { - // console.debug( "Toggling qsbox: %o", qsbox ); - $(qsbox).toggle(); - }); - }); -}; - -function highlightTarget( anchor ) { - console.debug( "Highlighting target '%s'.", anchor ); - - $("a[name]").each( function() { - if ( $(this).attr("name") == anchor ) { - if ( !$(this).parent().parent().hasClass('target-section') ) { - console.debug( "Wrapping the target-section" ); - $('div.method-detail').unwrap( 'div.target-section' ); - $(this).parent().wrap( '
' ); - } else { - console.debug( "Already wrapped." ); - } - } - }); -}; - -function highlightLocationTarget() { - console.debug( "Location hash: %s", window.location.hash ); - if ( ! window.location.hash || window.location.hash.length == 0 ) return; - - var anchor = window.location.hash.substring(1); - console.debug( "Found anchor: %s; matching %s", anchor, "a[name=" + anchor + "]" ); - - highlightTarget( anchor ); -}; - -function highlightClickTarget( event ) { - console.debug( "Highlighting click target for event %o", event.target ); - try { - var anchor = $(event.target).attr( 'href' ).substring(1); - console.debug( "Found target anchor: %s", anchor ); - highlightTarget( anchor ); - } catch ( err ) { - console.error( "Exception while highlighting: %o", err ); - }; -}; - - -$(document).ready( function() { - hookSourceViews(); - hookDebuggingToggle(); - hookQuickSearch(); - highlightLocationTarget(); - - $('ul.link-list a').bind( "click", highlightClickTarget ); -}); diff --git a/.gems/doc/twitter-5.11.0/rdoc/js/jquery.js b/.gems/doc/twitter-5.11.0/rdoc/js/jquery.js deleted file mode 100644 index afe9e74..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/js/jquery.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * jQuery 1.2.6 - New Wave Javascript - * - * Copyright (c) 2008 John Resig (jquery.com) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * $Date: 2008-09-25 09:50:52 -0700 (Thu, 25 Sep 2008) $ - * $Rev: 38 $ - */ -(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else -return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else -return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else -selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else -this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else -return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else -jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else -jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("",""]||!tags.indexOf("",""]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!tags.indexOf("",""]||(!tags.indexOf("",""]||!tags.indexOf("",""]||jQuery.browser.msie&&[1,"div
","
"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf(""&&tags.indexOf("=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else -ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&¬xml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&¬xml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&¬xml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else -while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return im[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else -for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("
").append(res.responseText.replace(//g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)xhr.open(type,s.url,s.async,s.username,s.password);else -xhr.open(type,s.url,s.async);try{if(s.data)xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else -jQuery.handleError(s,xhr,status);complete();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xhr,s]);}function complete(){if(s.complete)s.complete(xhr,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(filter)data=filter(data,type);if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else -for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else -s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return opt.complete.call(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else -e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;ithis.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done)this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})(); \ No newline at end of file diff --git a/.gems/doc/twitter-5.11.0/rdoc/js/quicksearch.js b/.gems/doc/twitter-5.11.0/rdoc/js/quicksearch.js deleted file mode 100644 index 70dbd33..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/js/quicksearch.js +++ /dev/null @@ -1,114 +0,0 @@ -/** - * - * JQuery QuickSearch - Hook up a form field to hide non-matching elements. - * $Id: quicksearch.js 53 2009-01-07 02:52:03Z deveiant $ - * - * Author: Michael Granger - * - */ -jQuery.fn.quicksearch = function( target, searchElems, options ) { - // console.debug( "Quicksearch fn" ); - - var settings = { - delay: 250, - clearButton: false, - highlightMatches: false, - focusOnLoad: false, - noSearchResultsIndicator: null - }; - if ( options ) $.extend( settings, options ); - - return jQuery(this).each( function() { - // console.debug( "Creating a new quicksearch on %o for %o", this, searchElems ); - new jQuery.quicksearch( this, searchElems, settings ); - }); -}; - - -jQuery.quicksearch = function( searchBox, searchElems, settings ) { - var timeout; - var boxdiv = $(searchBox).parents('div').eq(0); - - function init() { - setupKeyEventHandlers(); - focusOnLoad(); - }; - - function setupKeyEventHandlers() { - // console.debug( "Hooking up the 'keypress' event to %o", searchBox ); - $(searchBox). - unbind( 'keyup' ). - keyup( function(e) { return onSearchKey( e.keyCode ); }); - $(searchBox). - unbind( 'keypress' ). - keypress( function(e) { - switch( e.which ) { - // Execute the search on Enter, Tab, or Newline - case 9: - case 13: - case 10: - clearTimeout( timeout ); - e.preventDefault(); - doQuickSearch(); - break; - - // Allow backspace - case 8: - return true; - break; - - // Only allow valid search characters - default: - return validQSChar( e.charCode ); - } - }); - }; - - function focusOnLoad() { - if ( !settings.focusOnLoad ) return false; - $(searchBox).focus(); - }; - - function onSearchKey ( code ) { - clearTimeout( timeout ); - // console.debug( "...scheduling search." ); - timeout = setTimeout( doQuickSearch, settings.delay ); - }; - - function validQSChar( code ) { - var c = String.fromCharCode( code ); - return ( - (c == ':') || - (c >= 'a' && c <= 'z') || - (c >= 'A' && c <= 'Z') - ); - }; - - function doQuickSearch() { - var searchText = searchBox.value; - var pat = new RegExp( searchText, "im" ); - var shownCount = 0; - - if ( settings.noSearchResultsIndicator ) { - $('#' + settings.noSearchResultsIndicator).hide(); - } - - // All elements start out hidden - $(searchElems).each( function(index) { - var str = $(this).text(); - - if ( pat.test(str) ) { - shownCount += 1; - $(this).fadeIn(); - } else { - $(this).hide(); - } - }); - - if ( shownCount == 0 && settings.noSearchResultsIndicator ) { - $('#' + settings.noSearchResultsIndicator).slideDown(); - } - }; - - init(); -}; diff --git a/.gems/doc/twitter-5.11.0/rdoc/js/thickbox-compressed.js b/.gems/doc/twitter-5.11.0/rdoc/js/thickbox-compressed.js deleted file mode 100644 index 3a3fdae..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/js/thickbox-compressed.js +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Thickbox 3 - One Box To Rule Them All. - * By Cody Lindley (http://www.codylindley.com) - * Copyright (c) 2007 cody lindley - * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php -*/ - -var tb_pathToImage = "../images/loadingAnimation.gif"; - -eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$(o).2S(9(){1u(\'a.18, 3n.18, 3i.18\');1w=1p 1t();1w.L=2H});9 1u(b){$(b).s(9(){6 t=X.Q||X.1v||M;6 a=X.u||X.23;6 g=X.1N||P;19(t,a,g);X.2E();H P})}9 19(d,f,g){3m{3(2t o.v.J.2i==="2g"){$("v","11").r({A:"28%",z:"28%"});$("11").r("22","2Z");3(o.1Y("1F")===M){$("v").q("<4 5=\'B\'><4 5=\'8\'>");$("#B").s(G)}}n{3(o.1Y("B")===M){$("v").q("<4 5=\'B\'><4 5=\'8\'>");$("#B").s(G)}}3(1K()){$("#B").1J("2B")}n{$("#B").1J("2z")}3(d===M){d=""}$("v").q("<4 5=\'K\'><1I L=\'"+1w.L+"\' />");$(\'#K\').2y();6 h;3(f.O("?")!==-1){h=f.3l(0,f.O("?"))}n{h=f}6 i=/\\.2s$|\\.2q$|\\.2m$|\\.2l$|\\.2k$/;6 j=h.1C().2h(i);3(j==\'.2s\'||j==\'.2q\'||j==\'.2m\'||j==\'.2l\'||j==\'.2k\'){1D="";1G="";14="";1z="";1x="";R="";1n="";1r=P;3(g){E=$("a[@1N="+g+"]").36();25(D=0;((D&1d;&1d;2T &2R;"}n{1D=E[D].Q;1G=E[D].u;14="<1e 5=\'1U\'>&1d;&1d;&2O; 2N"}}n{1r=1b;1n="1t "+(D+1)+" 2L "+(E.1c)}}}S=1p 1t();S.1g=9(){S.1g=M;6 a=2x();6 x=a[0]-1M;6 y=a[1]-1M;6 b=S.z;6 c=S.A;3(b>x){c=c*(x/b);b=x;3(c>y){b=b*(y/c);c=y}}n 3(c>y){b=b*(y/c);c=y;3(b>x){c=c*(x/b);b=x}}13=b+30;1a=c+2G;$("#8").q("<1I 5=\'2F\' L=\'"+f+"\' z=\'"+b+"\' A=\'"+c+"\' 23=\'"+d+"\'/>"+"<4 5=\'2D\'>"+d+"<4 5=\'2C\'>"+1n+14+R+"<4 5=\'2A\'>1l 1k 1j 1s");$("#Z").s(G);3(!(14==="")){9 12(){3($(o).N("s",12)){$(o).N("s",12)}$("#8").C();$("v").q("<4 5=\'8\'>");19(1D,1G,g);H P}$("#1U").s(12)}3(!(R==="")){9 1i(){$("#8").C();$("v").q("<4 5=\'8\'>");19(1z,1x,g);H P}$("#1X").s(1i)}o.1h=9(e){3(e==M){I=2w.2v}n{I=e.2u}3(I==27){G()}n 3(I==3k){3(!(R=="")){o.1h="";1i()}}n 3(I==3j){3(!(14=="")){o.1h="";12()}}};16();$("#K").C();$("#1L").s(G);$("#8").r({Y:"T"})};S.L=f}n{6 l=f.2r(/^[^\\?]+\\??/,\'\');6 m=2p(l);13=(m[\'z\']*1)+30||3h;1a=(m[\'A\']*1)+3g||3f;W=13-30;V=1a-3e;3(f.O(\'2j\')!=-1){1E=f.1B(\'3d\');$("#15").C();3(m[\'1A\']!="1b"){$("#8").q("<4 5=\'2f\'><4 5=\'1H\'>"+d+"<4 5=\'2e\'>1l 1k 1j 1s ")}n{$("#B").N();$("#8").q(" ")}}n{3($("#8").r("Y")!="T"){3(m[\'1A\']!="1b"){$("#8").q("<4 5=\'2f\'><4 5=\'1H\'>"+d+"<4 5=\'2e\'>1l 1k 1j 1s<4 5=\'F\' J=\'z:"+W+"p;A:"+V+"p\'>")}n{$("#B").N();$("#8").q("<4 5=\'F\' 3c=\'3b\' J=\'z:"+W+"p;A:"+V+"p;\'>")}}n{$("#F")[0].J.z=W+"p";$("#F")[0].J.A=V+"p";$("#F")[0].3a=0;$("#1H").11(d)}}$("#Z").s(G);3(f.O(\'37\')!=-1){$("#F").q($(\'#\'+m[\'26\']).1T());$("#8").24(9(){$(\'#\'+m[\'26\']).q($("#F").1T())});16();$("#K").C();$("#8").r({Y:"T"})}n 3(f.O(\'2j\')!=-1){16();3($.1q.35){$("#K").C();$("#8").r({Y:"T"})}}n{$("#F").34(f+="&1y="+(1p 33().32()),9(){16();$("#K").C();1u("#F a.18");$("#8").r({Y:"T"})})}}3(!m[\'1A\']){o.21=9(e){3(e==M){I=2w.2v}n{I=e.2u}3(I==27){G()}}}}31(e){}}9 1m(){$("#K").C();$("#8").r({Y:"T"})}9 G(){$("#2Y").N("s");$("#Z").N("s");$("#8").2X("2W",9(){$(\'#8,#B,#1F\').2V("24").N().C()});$("#K").C();3(2t o.v.J.2i=="2g"){$("v","11").r({A:"1Z",z:"1Z"});$("11").r("22","")}o.1h="";o.21="";H P}9 16(){$("#8").r({2U:\'-\'+20((13/2),10)+\'p\',z:13+\'p\'});3(!(1V.1q.2Q&&1V.1q.2P<7)){$("#8").r({38:\'-\'+20((1a/2),10)+\'p\'})}}9 2p(a){6 b={};3(!a){H b}6 c=a.1B(/[;&]/);25(6 i=0;i - - - - - - - File: arguments.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/base_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/base_rb.html deleted file mode 100644 index a9bbf31..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/base_rb.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - File: base.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • addressable/uri
  • - -
  • forwardable
  • - -
  • memoizable
  • - -
  • twitter/null_object
  • - -
  • twitter/utils
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/basic_user_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/basic_user_rb.html deleted file mode 100644 index 7794bda..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/basic_user_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: basic_user.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/identity
  • - -
  • twitter/utils
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/client_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/client_rb.html deleted file mode 100644 index 76c98fc..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/client_rb.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - File: client.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • addressable/uri
  • - -
  • simple_oauth
  • - -
  • twitter/error
  • - -
  • twitter/utils
  • - -
  • twitter/version
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/configuration_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/configuration_rb.html deleted file mode 100644 index b5b957b..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/configuration_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: configuration.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/base
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/creatable_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/creatable_rb.html deleted file mode 100644 index ff0682a..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/creatable_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: creatable.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • time
  • - -
  • memoizable
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/cursor_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/cursor_rb.html deleted file mode 100644 index 85584b0..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/cursor_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: cursor.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/enumerable
  • - -
  • twitter/utils
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/direct_message_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/direct_message_rb.html deleted file mode 100644 index 2c7703a..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/direct_message_rb.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - File: direct_message.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/creatable
  • - -
  • twitter/entities
  • - -
  • twitter/identity
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/entities_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/entities_rb.html deleted file mode 100644 index 5fab229..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/entities_rb.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - File: entities.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • memoizable
  • - -
  • twitter/entity/hashtag
  • - -
  • twitter/entity/symbol
  • - -
  • twitter/entity/uri
  • - -
  • twitter/entity/user_mention
  • - -
  • twitter/media_factory
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/entity/hashtag_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/entity/hashtag_rb.html deleted file mode 100644 index 65f5d66..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/entity/hashtag_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: hashtag.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/entity
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/entity/symbol_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/entity/symbol_rb.html deleted file mode 100644 index 069f504..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/entity/symbol_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: symbol.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/entity
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/entity/uri_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/entity/uri_rb.html deleted file mode 100644 index 9df928c..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/entity/uri_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: uri.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/entity
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/entity/user_mention_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/entity/user_mention_rb.html deleted file mode 100644 index f4cadef..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/entity/user_mention_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: user_mention.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/entity
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/entity_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/entity_rb.html deleted file mode 100644 index 46d6b20..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/entity_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: entity.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/base
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/enumerable_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/enumerable_rb.html deleted file mode 100644 index b192771..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/enumerable_rb.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - File: enumerable.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/error_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/error_rb.html deleted file mode 100644 index d3d16eb..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/error_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: error.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/rate_limit
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/factory_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/factory_rb.html deleted file mode 100644 index 3cc9616..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/factory_rb.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - File: factory.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/geo/point_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/geo/point_rb.html deleted file mode 100644 index 673bc8b..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/geo/point_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: point.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/geo
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/geo/polygon_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/geo/polygon_rb.html deleted file mode 100644 index 1bb6359..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/geo/polygon_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: polygon.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/geo
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/geo_factory_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/geo_factory_rb.html deleted file mode 100644 index b6a3823..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/geo_factory_rb.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - File: geo_factory.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/factory
  • - -
  • twitter/geo/point
  • - -
  • twitter/geo/polygon
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/geo_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/geo_rb.html deleted file mode 100644 index aeee994..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/geo_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: geo.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • equalizer
  • - -
  • twitter/base
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/geo_results_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/geo_results_rb.html deleted file mode 100644 index 0f7387c..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/geo_results_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: geo_results.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/enumerable
  • - -
  • twitter/utils
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/identity_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/identity_rb.html deleted file mode 100644 index b2e6713..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/identity_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: identity.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • equalizer
  • - -
  • twitter/base
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/language_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/language_rb.html deleted file mode 100644 index 8f360e0..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/language_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: language.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/base
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/list_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/list_rb.html deleted file mode 100644 index e64afb4..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/list_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: list.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/creatable
  • - -
  • twitter/identity
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/media/photo_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/media/photo_rb.html deleted file mode 100644 index 6305659..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/media/photo_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: photo.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/identity
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/media_factory_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/media_factory_rb.html deleted file mode 100644 index dd9efee..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/media_factory_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: media_factory.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/factory
  • - -
  • twitter/media/photo
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/metadata_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/metadata_rb.html deleted file mode 100644 index 58e525c..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/metadata_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: metadata.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/base
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/null_object_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/null_object_rb.html deleted file mode 100644 index 05cdc99..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/null_object_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: null_object.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • naught
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/oembed_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/oembed_rb.html deleted file mode 100644 index 6b3afe0..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/oembed_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: oembed.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/base
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/place_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/place_rb.html deleted file mode 100644 index 3d34149..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/place_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: place.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • equalizer
  • - -
  • twitter/identity
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/profile_banner_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/profile_banner_rb.html deleted file mode 100644 index e9fb1bb..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/profile_banner_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: profile_banner.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/base
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/profile_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/profile_rb.html deleted file mode 100644 index 7c2a5ce..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/profile_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: profile.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • addressable/uri
  • - -
  • memoizable
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rate_limit_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rate_limit_rb.html deleted file mode 100644 index 36dd068..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rate_limit_rb.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - File: rate_limit.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/relationship_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/relationship_rb.html deleted file mode 100644 index dee941b..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/relationship_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: relationship.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/base
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/request_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/request_rb.html deleted file mode 100644 index 1dcaf1d..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/request_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: request.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/cursor
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/api_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/api_rb.html deleted file mode 100644 index 7694c98..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/api_rb.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - File: api.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/rest/direct_messages
  • - -
  • twitter/rest/favorites
  • - -
  • twitter/rest/friends_and_followers
  • - -
  • twitter/rest/help
  • - -
  • twitter/rest/lists
  • - -
  • twitter/rest/media
  • - -
  • twitter/rest/oauth
  • - -
  • twitter/rest/places_and_geo
  • - -
  • twitter/rest/saved_searches
  • - -
  • twitter/rest/search
  • - -
  • twitter/rest/spam_reporting
  • - -
  • twitter/rest/suggested_users
  • - -
  • twitter/rest/timelines
  • - -
  • twitter/rest/trends
  • - -
  • twitter/rest/tweets
  • - -
  • twitter/rest/undocumented
  • - -
  • twitter/rest/users
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/client_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/client_rb.html deleted file mode 100644 index e9aeb18..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/client_rb.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - File: client.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • base64
  • - -
  • faraday
  • - -
  • faraday/request/multipart
  • - -
  • json
  • - -
  • timeout
  • - -
  • twitter/client
  • - -
  • twitter/error
  • - -
  • twitter/rest/api
  • - -
  • twitter/rest/request/multipart_with_file
  • - -
  • twitter/rest/response/parse_json
  • - -
  • twitter/rest/response/raise_error
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/direct_messages_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/direct_messages_rb.html deleted file mode 100644 index 6ba1335..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/direct_messages_rb.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - File: direct_messages.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/arguments
  • - -
  • twitter/direct_message
  • - -
  • twitter/request
  • - -
  • twitter/rest/utils
  • - -
  • twitter/user
  • - -
  • twitter/utils
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/favorites_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/favorites_rb.html deleted file mode 100644 index 11a91ae..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/favorites_rb.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - File: favorites.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/arguments
  • - -
  • twitter/error
  • - -
  • twitter/request
  • - -
  • twitter/rest/utils
  • - -
  • twitter/tweet
  • - -
  • twitter/user
  • - -
  • twitter/utils
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/friends_and_followers_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/friends_and_followers_rb.html deleted file mode 100644 index 7efe3b2..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/friends_and_followers_rb.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - File: friends_and_followers.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/arguments
  • - -
  • twitter/cursor
  • - -
  • twitter/relationship
  • - -
  • twitter/request
  • - -
  • twitter/rest/utils
  • - -
  • twitter/user
  • - -
  • twitter/utils
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/help_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/help_rb.html deleted file mode 100644 index d8a1498..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/help_rb.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - File: help.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/configuration
  • - -
  • twitter/language
  • - -
  • twitter/request
  • - -
  • twitter/rest/utils
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/lists_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/lists_rb.html deleted file mode 100644 index e2ded55..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/lists_rb.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - File: lists.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/arguments
  • - -
  • twitter/cursor
  • - -
  • twitter/error
  • - -
  • twitter/list
  • - -
  • twitter/request
  • - -
  • twitter/rest/utils
  • - -
  • twitter/tweet
  • - -
  • twitter/user
  • - -
  • twitter/utils
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/media_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/media_rb.html deleted file mode 100644 index ed380b2..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/media_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: media.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/error
  • - -
  • twitter/rest/utils
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/oauth_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/oauth_rb.html deleted file mode 100644 index 6a006bc..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/oauth_rb.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - File: oauth.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/request
  • - -
  • twitter/rest/utils
  • - -
  • twitter/rest/response/parse_error_json
  • - -
  • twitter/token
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/places_and_geo_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/places_and_geo_rb.html deleted file mode 100644 index cf0e4fc..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/places_and_geo_rb.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - File: places_and_geo.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/geo_results
  • - -
  • twitter/place
  • - -
  • twitter/request
  • - -
  • twitter/rest/utils
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/request/multipart_with_file_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/request/multipart_with_file_rb.html deleted file mode 100644 index 866917d..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/request/multipart_with_file_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: multipart_with_file.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • faraday
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/response/parse_error_json_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/response/parse_error_json_rb.html deleted file mode 100644 index de800f9..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/response/parse_error_json_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: parse_error_json.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/rest/response/parse_json
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/response/parse_json_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/response/parse_json_rb.html deleted file mode 100644 index e411b7f..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/response/parse_json_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: parse_json.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • faraday
  • - -
  • json
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/response/raise_error_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/response/raise_error_rb.html deleted file mode 100644 index a933146..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/response/raise_error_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: raise_error.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • faraday
  • - -
  • twitter/error
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/saved_searches_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/saved_searches_rb.html deleted file mode 100644 index e06f41b..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/saved_searches_rb.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - File: saved_searches.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/arguments
  • - -
  • twitter/request
  • - -
  • twitter/rest/utils
  • - -
  • twitter/saved_search
  • - -
  • twitter/utils
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/search_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/search_rb.html deleted file mode 100644 index 0fcdb01..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/search_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: search.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/request
  • - -
  • twitter/search_results
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/spam_reporting_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/spam_reporting_rb.html deleted file mode 100644 index 164de2d..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/spam_reporting_rb.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - File: spam_reporting.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/request
  • - -
  • twitter/rest/utils
  • - -
  • twitter/user
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/suggested_users_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/suggested_users_rb.html deleted file mode 100644 index 2688002..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/suggested_users_rb.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - File: suggested_users.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/arguments
  • - -
  • twitter/request
  • - -
  • twitter/rest/utils
  • - -
  • twitter/suggestion
  • - -
  • twitter/user
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/timelines_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/timelines_rb.html deleted file mode 100644 index dcc9562..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/timelines_rb.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - File: timelines.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/request
  • - -
  • twitter/rest/utils
  • - -
  • twitter/tweet
  • - -
  • twitter/user
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/trends_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/trends_rb.html deleted file mode 100644 index 9e0c640..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/trends_rb.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - File: trends.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/place
  • - -
  • twitter/request
  • - -
  • twitter/rest/utils
  • - -
  • twitter/trend_results
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/tweets_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/tweets_rb.html deleted file mode 100644 index 55fb76b..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/tweets_rb.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - File: tweets.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/arguments
  • - -
  • twitter/error
  • - -
  • twitter/oembed
  • - -
  • twitter/request
  • - -
  • twitter/rest/utils
  • - -
  • twitter/tweet
  • - -
  • twitter/utils
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/undocumented_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/undocumented_rb.html deleted file mode 100644 index 19023e3..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/undocumented_rb.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - File: undocumented.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/arguments
  • - -
  • twitter/cursor
  • - -
  • twitter/rest/utils
  • - -
  • twitter/tweet
  • - -
  • twitter/user
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/users_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/users_rb.html deleted file mode 100644 index 3df9a61..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/users_rb.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - File: users.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/arguments
  • - -
  • twitter/error
  • - -
  • twitter/profile_banner
  • - -
  • twitter/request
  • - -
  • twitter/rest/utils
  • - -
  • twitter/settings
  • - -
  • twitter/user
  • - -
  • twitter/utils
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/utils_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/utils_rb.html deleted file mode 100644 index ffdaff4..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/rest/utils_rb.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - File: utils.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • addressable/uri
  • - -
  • twitter/arguments
  • - -
  • twitter/request
  • - -
  • twitter/user
  • - -
  • twitter/utils
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/saved_search_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/saved_search_rb.html deleted file mode 100644 index 7ad7bf2..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/saved_search_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: saved_search.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/creatable
  • - -
  • twitter/identity
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/search_results_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/search_results_rb.html deleted file mode 100644 index 9b4d288..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/search_results_rb.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - File: search_results.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • cgi
  • - -
  • twitter/enumerable
  • - -
  • twitter/utils
  • - -
  • uri
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/settings_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/settings_rb.html deleted file mode 100644 index dc419ca..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/settings_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: settings.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/base
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/size_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/size_rb.html deleted file mode 100644 index 2a7ebe1..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/size_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: size.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • equalizer
  • - -
  • twitter/base
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/source_user_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/source_user_rb.html deleted file mode 100644 index 282ba07..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/source_user_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: source_user.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/basic_user
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/client_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/client_rb.html deleted file mode 100644 index 0d33eef..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/client_rb.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - File: client.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • http/request
  • - -
  • twitter/arguments
  • - -
  • twitter/client
  • - -
  • twitter/streaming/connection
  • - -
  • twitter/streaming/response
  • - -
  • twitter/streaming/message_parser
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/connection_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/connection_rb.html deleted file mode 100644 index 4885d2f..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/connection_rb.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - File: connection.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • http/parser
  • - -
  • openssl
  • - -
  • resolv
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/deleted_tweet_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/deleted_tweet_rb.html deleted file mode 100644 index 2a07f99..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/deleted_tweet_rb.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - File: deleted_tweet.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/event_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/event_rb.html deleted file mode 100644 index 47009a2..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/event_rb.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - File: event.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/friend_list_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/friend_list_rb.html deleted file mode 100644 index 85a1ba6..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/friend_list_rb.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - File: friend_list.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/message_parser_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/message_parser_rb.html deleted file mode 100644 index 847d627..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/message_parser_rb.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - File: message_parser.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/direct_message
  • - -
  • twitter/streaming/deleted_tweet
  • - -
  • twitter/streaming/event
  • - -
  • twitter/streaming/friend_list
  • - -
  • twitter/streaming/stall_warning
  • - -
  • twitter/tweet
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/response_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/response_rb.html deleted file mode 100644 index f1854df..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/response_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: response.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • buftok
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/stall_warning_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/stall_warning_rb.html deleted file mode 100644 index 6b86d53..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/streaming/stall_warning_rb.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - File: stall_warning.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/suggestion_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/suggestion_rb.html deleted file mode 100644 index e8ad1e3..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/suggestion_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: suggestion.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • equalizer
  • - -
  • twitter/base
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/target_user_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/target_user_rb.html deleted file mode 100644 index 8261aef..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/target_user_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: target_user.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/basic_user
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/token_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/token_rb.html deleted file mode 100644 index 9d896dc..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/token_rb.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - File: token.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/base
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/trend_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/trend_rb.html deleted file mode 100644 index a6b1bf5..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/trend_rb.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - File: trend.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • equalizer
  • - -
  • twitter/base
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/trend_results_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/trend_results_rb.html deleted file mode 100644 index 5afa9a7..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/trend_results_rb.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - File: trend_results.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • memoizable
  • - -
  • twitter/creatable
  • - -
  • twitter/enumerable
  • - -
  • twitter/null_object
  • - -
  • twitter/utils
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/tweet_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/tweet_rb.html deleted file mode 100644 index c746f0e..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/tweet_rb.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - File: tweet.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • twitter/creatable
  • - -
  • twitter/entities
  • - -
  • twitter/identity
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/user_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/user_rb.html deleted file mode 100644 index 2940885..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/user_rb.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - File: user.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • addressable/uri
  • - -
  • memoizable
  • - -
  • twitter/basic_user
  • - -
  • twitter/creatable
  • - -
  • twitter/entity/uri
  • - -
  • twitter/profile
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/utils_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/utils_rb.html deleted file mode 100644 index c644b03..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/utils_rb.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - File: utils.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/version_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/version_rb.html deleted file mode 100644 index e16e546..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter/version_rb.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - File: version.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter_rb.html b/.gems/doc/twitter-5.11.0/rdoc/lib/twitter_rb.html deleted file mode 100644 index dab3d41..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/lib/twitter_rb.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - File: twitter.rb [twitter-5.11.0 Documentation] - - - - - - - - - - -
-
-
Last Modified
-
2014-09-03 10:27:28 +0200
- - -
Requires
-
-
    - -
  • addressable/uri
  • - -
  • twitter/configuration
  • - -
  • twitter/cursor
  • - -
  • twitter/direct_message
  • - -
  • twitter/entity
  • - -
  • twitter/entity/hashtag
  • - -
  • twitter/entity/symbol
  • - -
  • twitter/entity/uri
  • - -
  • twitter/entity/user_mention
  • - -
  • twitter/geo_factory
  • - -
  • twitter/language
  • - -
  • twitter/list
  • - -
  • twitter/media_factory
  • - -
  • twitter/metadata
  • - -
  • twitter/oembed
  • - -
  • twitter/place
  • - -
  • twitter/profile_banner
  • - -
  • twitter/rate_limit
  • - -
  • twitter/relationship
  • - -
  • twitter/rest/client
  • - -
  • twitter/saved_search
  • - -
  • twitter/search_results
  • - -
  • twitter/settings
  • - -
  • twitter/size
  • - -
  • twitter/source_user
  • - -
  • twitter/streaming/client
  • - -
  • twitter/suggestion
  • - -
  • twitter/target_user
  • - -
  • twitter/trend
  • - -
  • twitter/tweet
  • - -
  • twitter/user
  • - -
-
- - - -
-
- -
- -
-

Description

- -
- -
- - - diff --git a/.gems/doc/twitter-5.11.0/rdoc/rdoc.css b/.gems/doc/twitter-5.11.0/rdoc/rdoc.css deleted file mode 100644 index ea91421..0000000 --- a/.gems/doc/twitter-5.11.0/rdoc/rdoc.css +++ /dev/null @@ -1,763 +0,0 @@ -/* - * "Darkfish" Rdoc CSS - * $Id: rdoc.css 54 2009-01-27 01:09:48Z deveiant $ - * - * Author: Michael Granger - * - */ - -/* Base Green is: #6C8C22 */ - -*{ padding: 0; margin: 0; } - -body { - background: #efefef; - font: 14px "Helvetica Neue", Helvetica, Tahoma, sans-serif; -} -body.class, body.module, body.file { - margin-left: 40px; -} -body.file-popup { - font-size: 90%; - margin-left: 0; -} - -h1 { - font-size: 300%; - text-shadow: rgba(135,145,135,0.65) 2px 2px 3px; - color: #6C8C22; -} -h2,h3,h4 { margin-top: 1.5em; } - -:link, -:visited { - color: #6C8C22; - text-decoration: none; -} -:link:hover, -:visited:hover { - border-bottom: 1px dotted #6C8C22; -} - -pre { - background: #ddd; - padding: 0.5em 0; -} - - -/* @group Generic Classes */ - -.initially-hidden { - display: none; -} - -.quicksearch-field { - width: 98%; - background: #ddd; - border: 1px solid #aaa; - height: 1.5em; - -webkit-border-radius: 4px; -} -.quicksearch-field:focus { - background: #f1edba; -} - -.missing-docs { - font-size: 120%; - background: white url(images/wrench_orange.png) no-repeat 4px center; - color: #ccc; - line-height: 2em; - border: 1px solid #d00; - opacity: 1; - padding-left: 20px; - text-indent: 24px; - letter-spacing: 3px; - font-weight: bold; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; -} - -.target-section { - border: 2px solid #dcce90; - border-left-width: 8px; - padding: 0 1em; - background: #fff3c2; -} - -/* @end */ - - -/* @group Index Page, Standalone file pages */ -body.indexpage { - margin: 1em 3em; -} -body.indexpage p, -body.indexpage div, -body.file p { - margin: 1em 0; -} - -.indexpage .rdoc-list p, .file .rdoc-list p { - margin: 0em 0; -} - -.indexpage ol, -.file #documentation ol { - line-height: 160%; -} - -.indexpage ul, -.file #documentation ul { - line-height: 160%; - list-style: none; -} -.indexpage ul :link, -.indexpage ul :visited { - font-size: 16px; -} - -.indexpage li, -.file #documentation li { - padding-left: 20px; -} - -.indexpage ol, -.file #documentation ol { - margin-left: 20px; -} - -.indexpage ol > li, -.file #documentation ol > li { - padding-left: 0; -} - -.indexpage ul > li, -.file #documentation ul > li { - background: url(images/bullet_black.png) no-repeat left 4px; -} -.indexpage li.module { - background: url(images/package.png) no-repeat left 4px; -} -.indexpage li.class { - background: url(images/ruby.png) no-repeat left 4px; -} -.indexpage li.file { - background: url(images/page_white_text.png) no-repeat left 4px; -} -.file li p, -.indexpage li p { - margin: 0 0; -} - -/* @end */ - -/* @group Top-Level Structure */ - -.class #metadata, -.file #metadata, -.module #metadata { - float: left; - width: 260px; -} - -.class #documentation, -.file #documentation, -.module #documentation { - margin: 2em 1em 5em 300px; - min-width: 340px; -} - -.file #metadata { - margin: 0.8em; -} - -#validator-badges { - clear: both; - margin: 1em 1em 2em; -} - -/* @end */ - -/* @group Metadata Section */ -#metadata .section { - background-color: #dedede; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border: 1px solid #aaa; - margin: 0 8px 16px; - font-size: 90%; - overflow: hidden; -} -#metadata h3.section-header { - margin: 0; - padding: 2px 8px; - background: #ccc; - color: #666; - -moz-border-radius-topleft: 4px; - -moz-border-radius-topright: 4px; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - border-bottom: 1px solid #aaa; -} -#metadata #home-section h3.section-header { - border-bottom: 0; -} - -#metadata ul, -#metadata dl, -#metadata p { - padding: 8px; - list-style: none; -} - -#file-metadata ul { - padding-left: 28px; - list-style-image: url(images/page_green.png); -} - -dl.svninfo { - color: #666; - margin: 0; -} -dl.svninfo dt { - font-weight: bold; -} - -ul.link-list li { - white-space: nowrap; -} -ul.link-list .type { - font-size: 8px; - text-transform: uppercase; - color: white; - background: #969696; - padding: 2px 4px; - -webkit-border-radius: 5px; -} - -/* @end */ - - -/* @group Project Metadata Section */ -#project-metadata { - margin-top: 3em; -} - -.file #project-metadata { - margin-top: 0em; -} - -#project-metadata .section { - border: 1px solid #aaa; -} -#project-metadata h3.section-header { - border-bottom: 1px solid #aaa; - position: relative; -} -#project-metadata h3.section-header .search-toggle { - position: absolute; - right: 5px; -} - - -#project-metadata form { - color: #777; - background: #ccc; - padding: 8px 8px 16px; - border-bottom: 1px solid #bbb; -} -#project-metadata fieldset { - border: 0; -} - -#no-class-search-results { - margin: 0 auto 1em; - text-align: center; - font-size: 14px; - font-weight: bold; - color: #aaa; -} - -/* @end */ - - -/* @group Documentation Section */ -.description { - font-size: 100%; - color: #333; -} - -.description p { - margin: 1em 0.4em; -} - -.description li p { - margin: 0; -} - -.description ul { - margin-left: 1.5em; -} -.description ul li { - line-height: 1.4em; -} - -.description dl, -#documentation dl { - margin: 8px 1.5em; - border: 1px solid #ccc; -} -.description dl { - font-size: 14px; -} - -.description dt, -#documentation dt { - padding: 2px 4px; - font-weight: bold; - background: #ddd; -} -.description dd, -#documentation dd { - padding: 2px 12px; -} -.description dd + dt, -#documentation dd + dt { - margin-top: 0.7em; -} - -#documentation .section { - font-size: 90%; -} - -#documentation h2.section-header { - margin-top: 2em; - padding: 0.75em 0.5em; - background: #ccc; - color: #333; - font-size: 175%; - border: 1px solid #bbb; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; -} - -#documentation h3.section-header { - margin-top: 2em; - padding: 0.25em 0.5em; - background-color: #dedede; - color: #333; - font-size: 150%; - border: 1px solid #bbb; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; -} - -#constants-list > dl, -#attributes-list > dl { - margin: 1em 0 2em; - border: 0; -} -#constants-list > dl dt, -#attributes-list > dl dt { - padding-left: 0; - font-weight: bold; - font-family: Monaco, "Andale Mono"; - background: inherit; -} -#constants-list > dl dt a, -#attributes-list > dl dt a { - color: inherit; -} -#constants-list > dl dd, -#attributes-list > dl dd { - margin: 0 0 1em 0; - padding: 0; - color: #666; -} - -.documentation-section h2 { - position: relative; -} - -.documentation-section h2 a { - position: absolute; - top: 8px; - right: 10px; - font-size: 12px; - color: #9b9877; - visibility: hidden; -} - -.documentation-section h2:hover a { - visibility: visible; -} - -/* @group Method Details */ - -#documentation .method-source-code { - display: none; -} - -#documentation .method-detail { - margin: 0.5em 0; - padding: 0.5em 0; - cursor: pointer; -} -#documentation .method-detail:hover { - background-color: #f1edba; -} -#documentation .method-heading { - position: relative; - padding: 2px 4px 0 20px; - font-size: 125%; - font-weight: bold; - color: #333; - background: url(images/brick.png) no-repeat left bottom; -} -#documentation .method-heading :link, -#documentation .method-heading :visited { - color: inherit; -} -#documentation .method-click-advice { - position: absolute; - top: 2px; - right: 5px; - font-size: 10px; - color: #9b9877; - visibility: hidden; - padding-right: 20px; - line-height: 20px; - background: url(images/zoom.png) no-repeat right top; -} -#documentation .method-detail:hover .method-click-advice { - visibility: visible; -} - -#documentation .method-alias .method-heading { - color: #666; - background: url(images/brick_link.png) no-repeat left bottom; -} - -#documentation .method-description, -#documentation .aliases { - margin: 0 20px; - color: #666; -} - -#documentation .method-description p, -#documentation .aliases p { - line-height: 1.2em; -} - -#documentation .aliases { - padding-top: 4px; - font-style: italic; - cursor: default; -} -#documentation .method-description p { - padding: 0; -} -#documentation .method-description p + p { - margin-bottom: 0.5em; -} -#documentation .method-description ul { - margin-left: 1.5em; -} - -#documentation .attribute-method-heading { - background: url(images/tag_green.png) no-repeat left bottom; -} -#documentation #attribute-method-details .method-detail:hover { - background-color: transparent; - cursor: default; -} -#documentation .attribute-access-type { - font-size: 60%; - text-transform: uppercase; - vertical-align: super; - padding: 0 2px; -} -/* @end */ - -/* @end */ - - - -/* @group Source Code */ - -div.method-source-code { - background: #262626; - color: #efefef; - margin: 1em; - padding: 0.5em; - border: 1px dashed #999; - overflow: hidden; -} - -div.method-source-code pre { - background: inherit; - padding: 0; - color: white; - overflow: auto; -} - -/* @group Ruby keyword styles */ - -.ruby-constant { color: #7fffd4; background: transparent; } -.ruby-keyword { color: #00ffff; background: transparent; } -.ruby-ivar { color: #eedd82; background: transparent; } -.ruby-operator { color: #00ffee; background: transparent; } -.ruby-identifier { color: #ffdead; background: transparent; } -.ruby-node { color: #ffa07a; background: transparent; } -.ruby-comment { color: #b22222; font-weight: bold; background: transparent; } -.ruby-regexp { color: #ffa07a; background: transparent; } -.ruby-value { color: #7fffd4; background: transparent; } - -/* @end */ -/* @end */ - - -/* @group File Popup Contents */ - -.file #metadata, -.file-popup #metadata { -} - -.file-popup dl { - font-size: 80%; - padding: 0.75em; - background-color: #dedede; - color: #333; - border: 1px solid #bbb; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; -} -.file dt { - font-weight: bold; - padding-left: 22px; - line-height: 20px; - background: url(images/page_white_width.png) no-repeat left top; -} -.file dt.modified-date { - background: url(images/date.png) no-repeat left top; -} -.file dt.requires { - background: url(images/plugin.png) no-repeat left top; -} -.file dt.scs-url { - background: url(images/wrench.png) no-repeat left top; -} - -.file dl dd { - margin: 0 0 1em 0; -} -.file #metadata dl dd ul { - list-style: circle; - margin-left: 20px; - padding-top: 0; -} -.file #metadata dl dd ul li { -} - - -.file h2 { - margin-top: 2em; - padding: 0.75em 0.5em; - background-color: #dedede; - color: #333; - font-size: 120%; - border: 1px solid #bbb; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; -} - -/* @end */ - - - - -/* @group ThickBox Styles */ -#TB_window { - font: 12px Arial, Helvetica, sans-serif; - color: #333333; -} - -#TB_secondLine { - font: 10px Arial, Helvetica, sans-serif; - color:#666666; -} - -#TB_window :link, -#TB_window :visited { color: #666666; } -#TB_window :link:hover, -#TB_window :visited:hover { color: #000; } -#TB_window :link:active, -#TB_window :visited:active { color: #666666; } -#TB_window :link:focus, -#TB_window :visited:focus { color: #666666; } - -#TB_overlay { - position: fixed; - z-index:100; - top: 0px; - left: 0px; - height:100%; - width:100%; -} - -.TB_overlayMacFFBGHack {background: url(images/macFFBgHack.png) repeat;} -.TB_overlayBG { - background-color:#000; - filter:alpha(opacity=75); - -moz-opacity: 0.75; - opacity: 0.75; -} - -* html #TB_overlay { /* ie6 hack */ - position: absolute; - height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); -} - -#TB_window { - position: fixed; - background: #ffffff; - z-index: 102; - color:#000000; - display:none; - border: 4px solid #525252; - text-align:left; - top:50%; - left:50%; -} - -* html #TB_window { /* ie6 hack */ - position: absolute; - margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); -} - -#TB_window img#TB_Image { - display:block; - margin: 15px 0 0 15px; - border-right: 1px solid #ccc; - border-bottom: 1px solid #ccc; - border-top: 1px solid #666; - border-left: 1px solid #666; -} - -#TB_caption{ - height:25px; - padding:7px 30px 10px 25px; - float:left; -} - -#TB_closeWindow{ - height:25px; - padding:11px 25px 10px 0; - float:right; -} - -#TB_closeAjaxWindow{ - padding:7px 10px 5px 0; - margin-bottom:1px; - text-align:right; - float:right; -} - -#TB_ajaxWindowTitle{ - float:left; - padding:7px 0 5px 10px; - margin-bottom:1px; - font-size: 22px; -} - -#TB_title{ - background-color: #6C8C22; - color: #dedede; - height:40px; -} -#TB_title :link, -#TB_title :visited { - color: white !important; - border-bottom: 1px dotted #dedede; -} - -#TB_ajaxContent{ - clear:both; - padding:2px 15px 15px 15px; - overflow:auto; - text-align:left; - line-height:1.4em; -} - -#TB_ajaxContent.TB_modal{ - padding:15px; -} - -#TB_ajaxContent p{ - padding:5px 0px 5px 0px; -} - -#TB_load{ - position: fixed; - display:none; - height:13px; - width:208px; - z-index:103; - top: 50%; - left: 50%; - margin: -6px 0 0 -104px; /* -height/2 0 0 -width/2 */ -} - -* html #TB_load { /* ie6 hack */ - position: absolute; - margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); -} - -#TB_HideSelect{ - z-index:99; - position:fixed; - top: 0; - left: 0; - background-color:#fff; - border:none; - filter:alpha(opacity=0); - -moz-opacity: 0; - opacity: 0; - height:100%; - width:100%; -} - -* html #TB_HideSelect { /* ie6 hack */ - position: absolute; - height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); -} - -#TB_iframeContent{ - clear:both; - border:none; - margin-bottom:-1px; - margin-top:1px; - _margin-bottom:1px; -} - -/* @end */ - -/* @group Debugging Section */ - -#debugging-toggle { - text-align: center; -} -#debugging-toggle img { - cursor: pointer; -} - -#rdoc-debugging-section-dump { - display: none; - margin: 0 2em 2em; - background: #ccc; - border: 1px solid #999; -} - - - -/* @end */ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Arguments/cdesc-Arguments.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Arguments/cdesc-Arguments.ri deleted file mode 100644 index 85a3d1a..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Arguments/cdesc-Arguments.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Arguments/new-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Arguments/new-c.ri deleted file mode 100644 index c3f06cb..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Arguments/new-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Arguments/options-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Arguments/options-i.ri deleted file mode 100644 index a8f7119..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Arguments/options-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/%5b%5d-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Base/%5b%5d-i.ri deleted file mode 100644 index 762b326..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/%5b%5d-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/attr_reader-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Base/attr_reader-c.ri deleted file mode 100644 index 248ccdb..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/attr_reader-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/attrs-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Base/attrs-i.ri deleted file mode 100644 index 099baa2..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/attrs-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/cdesc-Base.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Base/cdesc-Base.ri deleted file mode 100644 index 016eab8..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/cdesc-Base.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/define_attribute_method-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Base/define_attribute_method-c.ri deleted file mode 100644 index 952f889..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/define_attribute_method-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/define_predicate_method-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Base/define_predicate_method-c.ri deleted file mode 100644 index 9ef714e..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/define_predicate_method-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/define_uri_method-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Base/define_uri_method-c.ri deleted file mode 100644 index 0a1f6cf..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/define_uri_method-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/deprecate_attribute_method-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Base/deprecate_attribute_method-c.ri deleted file mode 100644 index 9b89118..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/deprecate_attribute_method-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/display_uri_attr_reader-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Base/display_uri_attr_reader-c.ri deleted file mode 100644 index c5edc89..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/display_uri_attr_reader-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/new-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Base/new-c.ri deleted file mode 100644 index 10c69b8..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/new-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/object_attr_reader-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Base/object_attr_reader-c.ri deleted file mode 100644 index bbc3f19..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/object_attr_reader-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/predicate_attr_reader-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Base/predicate_attr_reader-c.ri deleted file mode 100644 index 04a57ac..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/predicate_attr_reader-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/to_h-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Base/to_h-i.ri deleted file mode 100644 index d09dfd2..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/to_h-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/uri_attr_reader-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Base/uri_attr_reader-c.ri deleted file mode 100644 index 5f3fd18..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Base/uri_attr_reader-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/BasicUser/cdesc-BasicUser.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/BasicUser/cdesc-BasicUser.ri deleted file mode 100644 index 9dab598..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/BasicUser/cdesc-BasicUser.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/BasicUser/screen_name-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/BasicUser/screen_name-i.ri deleted file mode 100644 index 5106a7c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/BasicUser/screen_name-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/access_token-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Client/access_token-i.ri deleted file mode 100644 index 2d282c8..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/access_token-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/access_token_secret-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Client/access_token_secret-i.ri deleted file mode 100644 index ec86232..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/access_token_secret-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/cdesc-Client.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Client/cdesc-Client.ri deleted file mode 100644 index b8a00a4..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/cdesc-Client.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/consumer_key-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Client/consumer_key-i.ri deleted file mode 100644 index bafc2c8..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/consumer_key-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/consumer_secret-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Client/consumer_secret-i.ri deleted file mode 100644 index bb6e54c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/consumer_secret-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/credentials%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Client/credentials%3f-i.ri deleted file mode 100644 index a98d1a3..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/credentials%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/credentials-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Client/credentials-i.ri deleted file mode 100644 index fd20979..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/credentials-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/new-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Client/new-c.ri deleted file mode 100644 index e0fda84..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/new-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/proxy-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Client/proxy-i.ri deleted file mode 100644 index d717a3c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/proxy-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/user_agent-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Client/user_agent-i.ri deleted file mode 100644 index a75bc77..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/user_agent-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/user_token%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Client/user_token%3f-i.ri deleted file mode 100644 index 8344695..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Client/user_token%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/cdesc-Configuration.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/cdesc-Configuration.ri deleted file mode 100644 index 0e2f1c7..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/cdesc-Configuration.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/characters_reserved_per_media-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/characters_reserved_per_media-i.ri deleted file mode 100644 index 4758d22..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/characters_reserved_per_media-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/max_media_per_upload-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/max_media_per_upload-i.ri deleted file mode 100644 index e5d0b53..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/max_media_per_upload-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/non_username_paths-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/non_username_paths-i.ri deleted file mode 100644 index f683fa4..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/non_username_paths-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/photo_size_limit-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/photo_size_limit-i.ri deleted file mode 100644 index 508ecb3..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/photo_size_limit-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/photo_sizes-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/photo_sizes-i.ri deleted file mode 100644 index c827f02..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/photo_sizes-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/short_uri_length-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/short_uri_length-i.ri deleted file mode 100644 index 7d2561c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/short_uri_length-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/short_uri_length_https-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/short_uri_length_https-i.ri deleted file mode 100644 index e474aae..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/short_uri_length_https-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/short_url_length-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/short_url_length-i.ri deleted file mode 100644 index 14f408c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/short_url_length-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/short_url_length_https-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/short_url_length_https-i.ri deleted file mode 100644 index e492bae..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Configuration/short_url_length_https-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Creatable/cdesc-Creatable.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Creatable/cdesc-Creatable.ri deleted file mode 100644 index 831fd84..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Creatable/cdesc-Creatable.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Creatable/created%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Creatable/created%3f-i.ri deleted file mode 100644 index 9e27868..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Creatable/created%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Creatable/created_at-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Creatable/created_at-i.ri deleted file mode 100644 index 08cf7fb..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Creatable/created_at-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Cursor/attrs-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Cursor/attrs-i.ri deleted file mode 100644 index cce06c8..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Cursor/attrs-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Cursor/cdesc-Cursor.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Cursor/cdesc-Cursor.ri deleted file mode 100644 index f9a1cdc..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Cursor/cdesc-Cursor.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Cursor/new-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Cursor/new-c.ri deleted file mode 100644 index ed86ba9..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Cursor/new-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Cursor/to_h-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Cursor/to_h-i.ri deleted file mode 100644 index 01b8688..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Cursor/to_h-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/DirectMessage/cdesc-DirectMessage.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/DirectMessage/cdesc-DirectMessage.ri deleted file mode 100644 index 689e751..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/DirectMessage/cdesc-DirectMessage.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/DirectMessage/full_text-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/DirectMessage/full_text-i.ri deleted file mode 100644 index bcd8cb6..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/DirectMessage/full_text-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/DirectMessage/text-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/DirectMessage/text-i.ri deleted file mode 100644 index 66aa271..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/DirectMessage/text-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/cdesc-Entities.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/cdesc-Entities.ri deleted file mode 100644 index d35a70d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/cdesc-Entities.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/entities%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/entities%3f-i.ri deleted file mode 100644 index b9c7d74..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/entities%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/hashtags%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/hashtags%3f-i.ri deleted file mode 100644 index 4a2c55d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/hashtags%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/hashtags-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/hashtags-i.ri deleted file mode 100644 index 0b00bb7..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/hashtags-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/media%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/media%3f-i.ri deleted file mode 100644 index 9a685e3..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/media%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/media-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/media-i.ri deleted file mode 100644 index 019b96d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/media-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/symbols%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/symbols%3f-i.ri deleted file mode 100644 index 987c547..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/symbols%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/symbols-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/symbols-i.ri deleted file mode 100644 index d69dabd..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/symbols-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/uris%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/uris%3f-i.ri deleted file mode 100644 index 5db36c7..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/uris%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/uris-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/uris-i.ri deleted file mode 100644 index 95c9011..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/uris-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/urls%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/urls%3f-i.ri deleted file mode 100644 index 60902f0..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/urls%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/urls-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/urls-i.ri deleted file mode 100644 index 3d468f6..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/urls-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/user_mentions%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/user_mentions%3f-i.ri deleted file mode 100644 index 85bf2a2..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/user_mentions%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/user_mentions-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/user_mentions-i.ri deleted file mode 100644 index b2ab3d3..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entities/user_mentions-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/Hashtag/cdesc-Hashtag.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/Hashtag/cdesc-Hashtag.ri deleted file mode 100644 index cc267a7..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/Hashtag/cdesc-Hashtag.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/Hashtag/text-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/Hashtag/text-i.ri deleted file mode 100644 index d3c84c7..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/Hashtag/text-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/Symbol/cdesc-Symbol.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/Symbol/cdesc-Symbol.ri deleted file mode 100644 index 72416e7..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/Symbol/cdesc-Symbol.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/Symbol/text-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/Symbol/text-i.ri deleted file mode 100644 index a08146a..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/Symbol/text-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/URI/cdesc-URI.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/URI/cdesc-URI.ri deleted file mode 100644 index 9ee5ecc..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/URI/cdesc-URI.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/URL/cdesc-URL.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/URL/cdesc-URL.ri deleted file mode 100644 index 91edc69..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/URL/cdesc-URL.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/UserMention/cdesc-UserMention.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/UserMention/cdesc-UserMention.ri deleted file mode 100644 index 8948990..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/UserMention/cdesc-UserMention.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/UserMention/id-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/UserMention/id-i.ri deleted file mode 100644 index 1225e35..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/UserMention/id-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/UserMention/name-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/UserMention/name-i.ri deleted file mode 100644 index 6d3bdbf..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/UserMention/name-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/UserMention/screen_name-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/UserMention/screen_name-i.ri deleted file mode 100644 index 6d33c6b..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/UserMention/screen_name-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/cdesc-Entity.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/cdesc-Entity.ri deleted file mode 100644 index 0b12ea1..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/cdesc-Entity.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/indices-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/indices-i.ri deleted file mode 100644 index 67aa582..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Entity/indices-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Enumerable/cdesc-Enumerable.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Enumerable/cdesc-Enumerable.ri deleted file mode 100644 index 850befb..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Enumerable/cdesc-Enumerable.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Enumerable/each-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Enumerable/each-i.ri deleted file mode 100644 index 86f4a2c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Enumerable/each-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/AlreadyFavorited/cdesc-AlreadyFavorited.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/AlreadyFavorited/cdesc-AlreadyFavorited.ri deleted file mode 100644 index ce66b7b..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/AlreadyFavorited/cdesc-AlreadyFavorited.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/AlreadyRetweeted/cdesc-AlreadyRetweeted.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/AlreadyRetweeted/cdesc-AlreadyRetweeted.ri deleted file mode 100644 index fcb5f39..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/AlreadyRetweeted/cdesc-AlreadyRetweeted.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/BadGateway/cdesc-BadGateway.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/BadGateway/cdesc-BadGateway.ri deleted file mode 100644 index 6906068..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/BadGateway/cdesc-BadGateway.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/BadRequest/cdesc-BadRequest.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/BadRequest/cdesc-BadRequest.ri deleted file mode 100644 index 4127fca..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/BadRequest/cdesc-BadRequest.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/ClientError/cdesc-ClientError.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/ClientError/cdesc-ClientError.ri deleted file mode 100644 index d819aae..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/ClientError/cdesc-ClientError.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/Code/cdesc-Code.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/Code/cdesc-Code.ri deleted file mode 100644 index 91c2729..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/Code/cdesc-Code.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/ConfigurationError/cdesc-ConfigurationError.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/ConfigurationError/cdesc-ConfigurationError.ri deleted file mode 100644 index ec58baa..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/ConfigurationError/cdesc-ConfigurationError.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/DuplicateStatus/cdesc-DuplicateStatus.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/DuplicateStatus/cdesc-DuplicateStatus.ri deleted file mode 100644 index 96fc7f0..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/DuplicateStatus/cdesc-DuplicateStatus.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/Forbidden/cdesc-Forbidden.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/Forbidden/cdesc-Forbidden.ri deleted file mode 100644 index 9bec8b7..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/Forbidden/cdesc-Forbidden.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/GatewayTimeout/cdesc-GatewayTimeout.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/GatewayTimeout/cdesc-GatewayTimeout.ri deleted file mode 100644 index c8c3af6..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/GatewayTimeout/cdesc-GatewayTimeout.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/InternalServerError/cdesc-InternalServerError.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/InternalServerError/cdesc-InternalServerError.ri deleted file mode 100644 index dcc414c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/InternalServerError/cdesc-InternalServerError.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/NotAcceptable/cdesc-NotAcceptable.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/NotAcceptable/cdesc-NotAcceptable.ri deleted file mode 100644 index eba4eb3..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/NotAcceptable/cdesc-NotAcceptable.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/NotFound/cdesc-NotFound.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/NotFound/cdesc-NotFound.ri deleted file mode 100644 index 95555fe..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/NotFound/cdesc-NotFound.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/RequestTimeout/cdesc-RequestTimeout.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/RequestTimeout/cdesc-RequestTimeout.ri deleted file mode 100644 index 5093bed..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/RequestTimeout/cdesc-RequestTimeout.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/ServerError/cdesc-ServerError.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/ServerError/cdesc-ServerError.ri deleted file mode 100644 index a156e00..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/ServerError/cdesc-ServerError.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/ServiceUnavailable/cdesc-ServiceUnavailable.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/ServiceUnavailable/cdesc-ServiceUnavailable.ri deleted file mode 100644 index 50dfd7f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/ServiceUnavailable/cdesc-ServiceUnavailable.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/TooManyRequests/cdesc-TooManyRequests.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/TooManyRequests/cdesc-TooManyRequests.ri deleted file mode 100644 index 8a81cf1..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/TooManyRequests/cdesc-TooManyRequests.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/UnacceptableIO/cdesc-UnacceptableIO.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/UnacceptableIO/cdesc-UnacceptableIO.ri deleted file mode 100644 index c53c7e1..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/UnacceptableIO/cdesc-UnacceptableIO.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/UnacceptableIO/new-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/UnacceptableIO/new-c.ri deleted file mode 100644 index cb43440..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/UnacceptableIO/new-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/Unauthorized/cdesc-Unauthorized.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/Unauthorized/cdesc-Unauthorized.ri deleted file mode 100644 index ed6193f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/Unauthorized/cdesc-Unauthorized.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/UnprocessableEntity/cdesc-UnprocessableEntity.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/UnprocessableEntity/cdesc-UnprocessableEntity.ri deleted file mode 100644 index 0d19a50..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/UnprocessableEntity/cdesc-UnprocessableEntity.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/cdesc-Error.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/cdesc-Error.ri deleted file mode 100644 index 1b3a842..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/cdesc-Error.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/code-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/code-i.ri deleted file mode 100644 index af6dbcc..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/code-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/errors-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/errors-c.ri deleted file mode 100644 index 486ae6d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/errors-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/forbidden_messages-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/forbidden_messages-c.ri deleted file mode 100644 index f0f078a..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/forbidden_messages-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/from_response-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/from_response-c.ri deleted file mode 100644 index 99b5103..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/from_response-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/new-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/new-c.ri deleted file mode 100644 index 06957cb..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/new-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/rate_limit-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Error/rate_limit-i.ri deleted file mode 100644 index 6abaf03..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Error/rate_limit-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Factory/cdesc-Factory.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Factory/cdesc-Factory.ri deleted file mode 100644 index 665092d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Factory/cdesc-Factory.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Factory/new-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Factory/new-c.ri deleted file mode 100644 index aa2d3a7..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Factory/new-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Point/cdesc-Point.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Point/cdesc-Point.ri deleted file mode 100644 index 6a40202..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Point/cdesc-Point.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Point/lat-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Point/lat-i.ri deleted file mode 100644 index 17951b3..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Point/lat-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Point/latitude-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Point/latitude-i.ri deleted file mode 100644 index b817402..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Point/latitude-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Point/lng-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Point/lng-i.ri deleted file mode 100644 index fc0154b..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Point/lng-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Point/long-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Point/long-i.ri deleted file mode 100644 index ca2110f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Point/long-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Point/longitude-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Point/longitude-i.ri deleted file mode 100644 index 97127e1..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Point/longitude-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Polygon/cdesc-Polygon.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Polygon/cdesc-Polygon.ri deleted file mode 100644 index bc8033a..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/Polygon/cdesc-Polygon.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/cdesc-Geo.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/cdesc-Geo.ri deleted file mode 100644 index 2b56099..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/cdesc-Geo.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/coordinates-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/coordinates-i.ri deleted file mode 100644 index c2092fb..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/coordinates-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/coords-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/coords-i.ri deleted file mode 100644 index e5bd41e..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Geo/coords-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/GeoFactory/cdesc-GeoFactory.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/GeoFactory/cdesc-GeoFactory.ri deleted file mode 100644 index 008cf61..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/GeoFactory/cdesc-GeoFactory.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/GeoFactory/new-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/GeoFactory/new-c.ri deleted file mode 100644 index 197ba6c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/GeoFactory/new-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/GeoResults/attrs-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/GeoResults/attrs-i.ri deleted file mode 100644 index cc5f5f9..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/GeoResults/attrs-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/GeoResults/cdesc-GeoResults.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/GeoResults/cdesc-GeoResults.ri deleted file mode 100644 index 1884faa..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/GeoResults/cdesc-GeoResults.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/GeoResults/new-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/GeoResults/new-c.ri deleted file mode 100644 index 4eea229..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/GeoResults/new-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/GeoResults/to_h-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/GeoResults/to_h-i.ri deleted file mode 100644 index 54469fe..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/GeoResults/to_h-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/GeoResults/token-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/GeoResults/token-i.ri deleted file mode 100644 index 99e3be8..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/GeoResults/token-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Identity/cdesc-Identity.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Identity/cdesc-Identity.ri deleted file mode 100644 index 06cba8d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Identity/cdesc-Identity.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Identity/id-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Identity/id-i.ri deleted file mode 100644 index 91290be..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Identity/id-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Identity/new-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Identity/new-c.ri deleted file mode 100644 index ea248c7..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Identity/new-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Language/cdesc-Language.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Language/cdesc-Language.ri deleted file mode 100644 index 76ee31c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Language/cdesc-Language.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Language/code-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Language/code-i.ri deleted file mode 100644 index db38b03..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Language/code-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Language/name-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Language/name-i.ri deleted file mode 100644 index 1f32072..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Language/name-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Language/status-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Language/status-i.ri deleted file mode 100644 index 5ba5521..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Language/status-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/List/cdesc-List.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/List/cdesc-List.ri deleted file mode 100644 index 9dff1e0..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/List/cdesc-List.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/List/description-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/List/description-i.ri deleted file mode 100644 index a7b4a84..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/List/description-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/List/full_name-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/List/full_name-i.ri deleted file mode 100644 index f6e4f7c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/List/full_name-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/List/member_count-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/List/member_count-i.ri deleted file mode 100644 index f5ae2eb..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/List/member_count-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/List/members_uri-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/List/members_uri-i.ri deleted file mode 100644 index 9bb54b9..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/List/members_uri-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/List/members_url-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/List/members_url-i.ri deleted file mode 100644 index 8ad9957..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/List/members_url-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/List/mode-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/List/mode-i.ri deleted file mode 100644 index 25b86c2..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/List/mode-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/List/name-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/List/name-i.ri deleted file mode 100644 index 012f469..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/List/name-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/List/slug-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/List/slug-i.ri deleted file mode 100644 index b9172e1..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/List/slug-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/List/subscriber_count-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/List/subscriber_count-i.ri deleted file mode 100644 index f53671e..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/List/subscriber_count-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/List/subscribers_uri-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/List/subscribers_uri-i.ri deleted file mode 100644 index 9a79998..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/List/subscribers_uri-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/List/subscribers_url-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/List/subscribers_url-i.ri deleted file mode 100644 index 586c8d4..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/List/subscribers_url-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/List/uri-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/List/uri-i.ri deleted file mode 100644 index 704a830..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/List/uri-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/List/url-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/List/url-i.ri deleted file mode 100644 index 95303a4..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/List/url-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Media/Photo/cdesc-Photo.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Media/Photo/cdesc-Photo.ri deleted file mode 100644 index fe0bc44..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Media/Photo/cdesc-Photo.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Media/Photo/indices-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Media/Photo/indices-i.ri deleted file mode 100644 index 4c66395..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Media/Photo/indices-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Media/Photo/sizes-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Media/Photo/sizes-i.ri deleted file mode 100644 index 3567a53..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Media/Photo/sizes-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Media/cdesc-Media.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Media/cdesc-Media.ri deleted file mode 100644 index 3946ea8..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Media/cdesc-Media.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/MediaFactory/cdesc-MediaFactory.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/MediaFactory/cdesc-MediaFactory.ri deleted file mode 100644 index 0120d94..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/MediaFactory/cdesc-MediaFactory.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/MediaFactory/new-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/MediaFactory/new-c.ri deleted file mode 100644 index 673fe23..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/MediaFactory/new-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Metadata/cdesc-Metadata.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Metadata/cdesc-Metadata.ri deleted file mode 100644 index 7d47e53..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Metadata/cdesc-Metadata.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Metadata/iso_language_code-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Metadata/iso_language_code-i.ri deleted file mode 100644 index 6cdfac2..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Metadata/iso_language_code-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Metadata/result_type-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Metadata/result_type-i.ri deleted file mode 100644 index 88fc469..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Metadata/result_type-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/author_name-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/author_name-i.ri deleted file mode 100644 index 5d5c11c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/author_name-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/cache_age-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/cache_age-i.ri deleted file mode 100644 index 3144003..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/cache_age-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/cdesc-OEmbed.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/cdesc-OEmbed.ri deleted file mode 100644 index 6926b7e..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/cdesc-OEmbed.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/height-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/height-i.ri deleted file mode 100644 index 4dec8a2..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/height-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/html-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/html-i.ri deleted file mode 100644 index 601bc0d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/html-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/provider_name-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/provider_name-i.ri deleted file mode 100644 index 3f10c3d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/provider_name-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/type-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/type-i.ri deleted file mode 100644 index f06213b..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/type-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/version-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/version-i.ri deleted file mode 100644 index 614dfcb..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/version-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/width-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/width-i.ri deleted file mode 100644 index ad1106d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/OEmbed/width-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Place/attributes-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Place/attributes-i.ri deleted file mode 100644 index e59bf3a..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Place/attributes-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Place/cdesc-Place.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Place/cdesc-Place.ri deleted file mode 100644 index 800104f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Place/cdesc-Place.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Place/country-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Place/country-i.ri deleted file mode 100644 index d7e7c43..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Place/country-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Place/country_code-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Place/country_code-i.ri deleted file mode 100644 index c2e58d7..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Place/country_code-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Place/full_name-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Place/full_name-i.ri deleted file mode 100644 index f8656af..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Place/full_name-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Place/name-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Place/name-i.ri deleted file mode 100644 index 46feeb3..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Place/name-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Place/new-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Place/new-c.ri deleted file mode 100644 index f626ca3..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Place/new-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Place/parent_id-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Place/parent_id-i.ri deleted file mode 100644 index 9735d54..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Place/parent_id-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Place/place_type-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Place/place_type-i.ri deleted file mode 100644 index b6a5538..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Place/place_type-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/cdesc-Profile.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/cdesc-Profile.ri deleted file mode 100644 index 110d34c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/cdesc-Profile.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_banner_uri%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_banner_uri%3f-i.ri deleted file mode 100644 index df40fda..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_banner_uri%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_banner_uri-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_banner_uri-i.ri deleted file mode 100644 index 2249f7c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_banner_uri-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_banner_uri_https-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_banner_uri_https-i.ri deleted file mode 100644 index 6f31eb3..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_banner_uri_https-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_banner_url-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_banner_url-i.ri deleted file mode 100644 index 8a28439..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_banner_url-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_banner_url_https-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_banner_url_https-i.ri deleted file mode 100644 index 44dceb4..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_banner_url_https-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_image_uri%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_image_uri%3f-i.ri deleted file mode 100644 index 39efc58..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_image_uri%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_image_uri-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_image_uri-i.ri deleted file mode 100644 index 403e48f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_image_uri-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_image_uri_https-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_image_uri_https-i.ri deleted file mode 100644 index 234675a..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_image_uri_https-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_image_url-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_image_url-i.ri deleted file mode 100644 index 8c48003..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_image_url-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_image_url_https-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_image_url_https-i.ri deleted file mode 100644 index 9d9468e..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Profile/profile_image_url_https-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/ProfileBanner/cdesc-ProfileBanner.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/ProfileBanner/cdesc-ProfileBanner.ri deleted file mode 100644 index 1aa6233..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/ProfileBanner/cdesc-ProfileBanner.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/ProfileBanner/sizes-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/ProfileBanner/sizes-i.ri deleted file mode 100644 index 1e4eb32..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/ProfileBanner/sizes-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/API/cdesc-API.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/API/cdesc-API.ri deleted file mode 100644 index 7ddaa99..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/API/cdesc-API.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/bearer_token%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/bearer_token%3f-i.ri deleted file mode 100644 index fa00b03..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/bearer_token%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/bearer_token-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/bearer_token-i.ri deleted file mode 100644 index f5ecc11..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/bearer_token-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/cdesc-Client.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/cdesc-Client.ri deleted file mode 100644 index 657be91..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/cdesc-Client.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/connection_options%3d-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/connection_options%3d-i.ri deleted file mode 100644 index 7c6f000..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/connection_options%3d-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/connection_options-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/connection_options-i.ri deleted file mode 100644 index 9a61c6b..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/connection_options-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/credentials%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/credentials%3f-i.ri deleted file mode 100644 index 876a133..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/credentials%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/get-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/get-i.ri deleted file mode 100644 index 323a87c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/get-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/middleware%3d-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/middleware%3d-i.ri deleted file mode 100644 index 869c452..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/middleware%3d-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/middleware-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/middleware-i.ri deleted file mode 100644 index fada185..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/middleware-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/post-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/post-i.ri deleted file mode 100644 index bd4a399..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Client/post-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/cdesc-DirectMessages.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/cdesc-DirectMessages.ri deleted file mode 100644 index e21b70f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/cdesc-DirectMessages.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/create_direct_message-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/create_direct_message-i.ri deleted file mode 100644 index c8abb86..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/create_direct_message-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/d-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/d-i.ri deleted file mode 100644 index 37855f0..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/d-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/destroy_direct_message-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/destroy_direct_message-i.ri deleted file mode 100644 index d65f15f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/destroy_direct_message-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/direct_message-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/direct_message-i.ri deleted file mode 100644 index 7349684..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/direct_message-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/direct_messages-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/direct_messages-i.ri deleted file mode 100644 index dbb8cf1..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/direct_messages-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/direct_messages_received-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/direct_messages_received-i.ri deleted file mode 100644 index f2a9f59..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/direct_messages_received-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/direct_messages_sent-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/direct_messages_sent-i.ri deleted file mode 100644 index d52f071..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/direct_messages_sent-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/dm-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/dm-i.ri deleted file mode 100644 index a1a671f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/dm-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/m-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/m-i.ri deleted file mode 100644 index 53257b2..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/DirectMessages/m-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/cdesc-Favorites.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/cdesc-Favorites.ri deleted file mode 100644 index cbc034c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/cdesc-Favorites.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/create_favorite%21-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/create_favorite%21-i.ri deleted file mode 100644 index 708bfb8..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/create_favorite%21-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/destroy_favorite-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/destroy_favorite-i.ri deleted file mode 100644 index c0c1387..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/destroy_favorite-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/fav%21-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/fav%21-i.ri deleted file mode 100644 index a1a1730..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/fav%21-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/fav-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/fav-i.ri deleted file mode 100644 index 5884e01..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/fav-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/fave%21-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/fave%21-i.ri deleted file mode 100644 index 7cf3819..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/fave%21-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/fave-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/fave-i.ri deleted file mode 100644 index 5ce9122..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/fave-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/favorite%21-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/favorite%21-i.ri deleted file mode 100644 index 2b72f70..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/favorite%21-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/favorite-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/favorite-i.ri deleted file mode 100644 index 6967c67..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/favorite-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/favorites-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/favorites-i.ri deleted file mode 100644 index 232acea..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/favorites-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/unfavorite-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/unfavorite-i.ri deleted file mode 100644 index 562e807..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Favorites/unfavorite-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/cdesc-FriendsAndFollowers.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/cdesc-FriendsAndFollowers.ri deleted file mode 100644 index f1d041a..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/cdesc-FriendsAndFollowers.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/create_friendship%21-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/create_friendship%21-i.ri deleted file mode 100644 index 6630637..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/create_friendship%21-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/create_friendship-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/create_friendship-i.ri deleted file mode 100644 index 81c8c03..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/create_friendship-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/destroy_friendship-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/destroy_friendship-i.ri deleted file mode 100644 index fe8c1cd..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/destroy_friendship-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/follow%21-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/follow%21-i.ri deleted file mode 100644 index 3ce2793..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/follow%21-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/follow-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/follow-i.ri deleted file mode 100644 index ef9088e..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/follow-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/follower_ids-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/follower_ids-i.ri deleted file mode 100644 index 32aad93..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/follower_ids-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/followers-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/followers-i.ri deleted file mode 100644 index 07bc0ac..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/followers-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/following-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/following-i.ri deleted file mode 100644 index c67fd36..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/following-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friend_ids-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friend_ids-i.ri deleted file mode 100644 index 6eb5ed5..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friend_ids-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friends-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friends-i.ri deleted file mode 100644 index 3897e99..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friends-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendship%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendship%3f-i.ri deleted file mode 100644 index f2c914f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendship%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendship-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendship-i.ri deleted file mode 100644 index bae1e1b..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendship-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendship_show-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendship_show-i.ri deleted file mode 100644 index f2f8250..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendship_show-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendship_update-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendship_update-i.ri deleted file mode 100644 index 4a358ef..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendship_update-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendships-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendships-i.ri deleted file mode 100644 index 7953c9a..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendships-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendships_incoming-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendships_incoming-i.ri deleted file mode 100644 index d7e5dbc..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendships_incoming-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendships_outgoing-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendships_outgoing-i.ri deleted file mode 100644 index 9cc68fd..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/friendships_outgoing-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/no_retweet_ids-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/no_retweet_ids-i.ri deleted file mode 100644 index d6f81ae..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/no_retweet_ids-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/no_retweets_ids-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/no_retweets_ids-i.ri deleted file mode 100644 index e80afcb..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/no_retweets_ids-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/relationship-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/relationship-i.ri deleted file mode 100644 index 109a877..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/relationship-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/unfollow-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/unfollow-i.ri deleted file mode 100644 index d2ae2b4..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/FriendsAndFollowers/unfollow-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Help/cdesc-Help.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Help/cdesc-Help.ri deleted file mode 100644 index d84e4ce..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Help/cdesc-Help.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Help/configuration-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Help/configuration-i.ri deleted file mode 100644 index f6ec3b5..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Help/configuration-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Help/languages-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Help/languages-i.ri deleted file mode 100644 index 41174f1..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Help/languages-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Help/privacy-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Help/privacy-i.ri deleted file mode 100644 index b92d87a..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Help/privacy-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Help/tos-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Help/tos-i.ri deleted file mode 100644 index 5946132..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Help/tos-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/add_list_member-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/add_list_member-i.ri deleted file mode 100644 index d937037..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/add_list_member-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/add_list_members-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/add_list_members-i.ri deleted file mode 100644 index 6b205c5..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/add_list_members-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/cdesc-Lists.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/cdesc-Lists.ri deleted file mode 100644 index 65ddf97..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/cdesc-Lists.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/create_list-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/create_list-i.ri deleted file mode 100644 index 27ea655..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/create_list-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/destroy_list-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/destroy_list-i.ri deleted file mode 100644 index 505bdfa..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/destroy_list-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list-i.ri deleted file mode 100644 index ec1d20d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_member%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_member%3f-i.ri deleted file mode 100644 index b96c353..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_member%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_members-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_members-i.ri deleted file mode 100644 index be223da..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_members-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_subscribe-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_subscribe-i.ri deleted file mode 100644 index 70c24b6..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_subscribe-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_subscriber%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_subscriber%3f-i.ri deleted file mode 100644 index bc71dfc..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_subscriber%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_subscribers-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_subscribers-i.ri deleted file mode 100644 index 3654c4d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_subscribers-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_timeline-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_timeline-i.ri deleted file mode 100644 index 606ab09..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_timeline-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_unsubscribe-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_unsubscribe-i.ri deleted file mode 100644 index f8c44c9..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_unsubscribe-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_update-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_update-i.ri deleted file mode 100644 index 7419619..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/list_update-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/lists-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/lists-i.ri deleted file mode 100644 index d2c3427..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/lists-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/lists_subscribed_to-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/lists_subscribed_to-i.ri deleted file mode 100644 index 56517df..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/lists_subscribed_to-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/memberships-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/memberships-i.ri deleted file mode 100644 index e584710..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/memberships-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/owned_lists-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/owned_lists-i.ri deleted file mode 100644 index 918d9e7..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/owned_lists-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/remove_list_member-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/remove_list_member-i.ri deleted file mode 100644 index e42e128..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/remove_list_member-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/remove_list_members-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/remove_list_members-i.ri deleted file mode 100644 index 2b2e73d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/remove_list_members-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/subscriptions-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/subscriptions-i.ri deleted file mode 100644 index 93deb9d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Lists/subscriptions-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Media/cdesc-Media.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Media/cdesc-Media.ri deleted file mode 100644 index 65926e5..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Media/cdesc-Media.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Media/upload-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Media/upload-i.ri deleted file mode 100644 index 5d7172a..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Media/upload-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/OAuth/bearer_token-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/OAuth/bearer_token-i.ri deleted file mode 100644 index f42bbcf..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/OAuth/bearer_token-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/OAuth/cdesc-OAuth.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/OAuth/cdesc-OAuth.ri deleted file mode 100644 index 51e999d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/OAuth/cdesc-OAuth.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/OAuth/invalidate_token-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/OAuth/invalidate_token-i.ri deleted file mode 100644 index 6cca4e2..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/OAuth/invalidate_token-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/OAuth/reverse_token-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/OAuth/reverse_token-i.ri deleted file mode 100644 index 6ccdc8a..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/OAuth/reverse_token-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/OAuth/token-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/OAuth/token-i.ri deleted file mode 100644 index 71fd5d3..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/OAuth/token-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/cdesc-PlacesAndGeo.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/cdesc-PlacesAndGeo.ri deleted file mode 100644 index 369fa69..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/cdesc-PlacesAndGeo.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/geo_search-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/geo_search-i.ri deleted file mode 100644 index f57508b..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/geo_search-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/place-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/place-i.ri deleted file mode 100644 index 22c553c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/place-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/places_nearby-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/places_nearby-i.ri deleted file mode 100644 index f91072f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/places_nearby-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/places_similar-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/places_similar-i.ri deleted file mode 100644 index 732cc30..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/places_similar-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/reverse_geocode-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/reverse_geocode-i.ri deleted file mode 100644 index 96f7106..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/reverse_geocode-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/similar_places-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/similar_places-i.ri deleted file mode 100644 index d18ce3f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/PlacesAndGeo/similar_places-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Request/MultipartWithFile/call-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Request/MultipartWithFile/call-i.ri deleted file mode 100644 index 02f96d8..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Request/MultipartWithFile/call-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Request/MultipartWithFile/cdesc-MultipartWithFile.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Request/MultipartWithFile/cdesc-MultipartWithFile.ri deleted file mode 100644 index 521a6d7..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Request/MultipartWithFile/cdesc-MultipartWithFile.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Request/cdesc-Request.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Request/cdesc-Request.ri deleted file mode 100644 index 7bdb26e..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Request/cdesc-Request.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/ParseErrorJson/cdesc-ParseErrorJson.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/ParseErrorJson/cdesc-ParseErrorJson.ri deleted file mode 100644 index 51771e8..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/ParseErrorJson/cdesc-ParseErrorJson.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/ParseErrorJson/unparsable_status_codes-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/ParseErrorJson/unparsable_status_codes-i.ri deleted file mode 100644 index 432a2b7..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/ParseErrorJson/unparsable_status_codes-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/ParseJson/cdesc-ParseJson.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/ParseJson/cdesc-ParseJson.ri deleted file mode 100644 index fc08df5..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/ParseJson/cdesc-ParseJson.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/ParseJson/on_complete-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/ParseJson/on_complete-i.ri deleted file mode 100644 index b17e729..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/ParseJson/on_complete-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/ParseJson/parse-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/ParseJson/parse-i.ri deleted file mode 100644 index de6b08d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/ParseJson/parse-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/ParseJson/unparsable_status_codes-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/ParseJson/unparsable_status_codes-i.ri deleted file mode 100644 index 2a8ca39..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/ParseJson/unparsable_status_codes-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/RaiseError/cdesc-RaiseError.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/RaiseError/cdesc-RaiseError.ri deleted file mode 100644 index 203ff9c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/RaiseError/cdesc-RaiseError.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/RaiseError/on_complete-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/RaiseError/on_complete-i.ri deleted file mode 100644 index 96adfce..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/RaiseError/on_complete-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/cdesc-Response.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/cdesc-Response.ri deleted file mode 100644 index b8800cd..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Response/cdesc-Response.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SavedSearches/cdesc-SavedSearches.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SavedSearches/cdesc-SavedSearches.ri deleted file mode 100644 index 48c6e64..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SavedSearches/cdesc-SavedSearches.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SavedSearches/create_saved_search-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SavedSearches/create_saved_search-i.ri deleted file mode 100644 index e56b375..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SavedSearches/create_saved_search-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SavedSearches/destroy_saved_search-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SavedSearches/destroy_saved_search-i.ri deleted file mode 100644 index ea62fcd..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SavedSearches/destroy_saved_search-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SavedSearches/saved_search-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SavedSearches/saved_search-i.ri deleted file mode 100644 index 45dc649..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SavedSearches/saved_search-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SavedSearches/saved_searches-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SavedSearches/saved_searches-i.ri deleted file mode 100644 index 2353890..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SavedSearches/saved_searches-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Search/cdesc-Search.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Search/cdesc-Search.ri deleted file mode 100644 index 8fea4fe..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Search/cdesc-Search.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Search/search-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Search/search-i.ri deleted file mode 100644 index 4416906..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Search/search-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SpamReporting/cdesc-SpamReporting.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SpamReporting/cdesc-SpamReporting.ri deleted file mode 100644 index efd7d21..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SpamReporting/cdesc-SpamReporting.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SpamReporting/report_spam-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SpamReporting/report_spam-i.ri deleted file mode 100644 index e86bd49..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SpamReporting/report_spam-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SuggestedUsers/cdesc-SuggestedUsers.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SuggestedUsers/cdesc-SuggestedUsers.ri deleted file mode 100644 index 4a56e2e..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SuggestedUsers/cdesc-SuggestedUsers.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SuggestedUsers/suggest_users-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SuggestedUsers/suggest_users-i.ri deleted file mode 100644 index 12f4925..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SuggestedUsers/suggest_users-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SuggestedUsers/suggestions-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SuggestedUsers/suggestions-i.ri deleted file mode 100644 index b7be376..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/SuggestedUsers/suggestions-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/cdesc-Timelines.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/cdesc-Timelines.ri deleted file mode 100644 index 164dc3f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/cdesc-Timelines.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/home_timeline-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/home_timeline-i.ri deleted file mode 100644 index 0ccf377..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/home_timeline-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/mentions-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/mentions-i.ri deleted file mode 100644 index 99dc1ca..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/mentions-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/mentions_timeline-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/mentions_timeline-i.ri deleted file mode 100644 index 937622f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/mentions_timeline-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/retweeted_by-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/retweeted_by-i.ri deleted file mode 100644 index 5a829af..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/retweeted_by-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/retweeted_by_me-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/retweeted_by_me-i.ri deleted file mode 100644 index 9e18fdc..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/retweeted_by_me-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/retweeted_by_user-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/retweeted_by_user-i.ri deleted file mode 100644 index dc88ac4..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/retweeted_by_user-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/retweeted_to_me-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/retweeted_to_me-i.ri deleted file mode 100644 index 09aac66..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/retweeted_to_me-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/retweets_of_me-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/retweets_of_me-i.ri deleted file mode 100644 index 066686e..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/retweets_of_me-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/user_timeline-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/user_timeline-i.ri deleted file mode 100644 index 0abed77..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Timelines/user_timeline-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/cdesc-Trends.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/cdesc-Trends.ri deleted file mode 100644 index 5c1bead..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/cdesc-Trends.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/local_trends-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/local_trends-i.ri deleted file mode 100644 index dbd9647..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/local_trends-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/trend_locations-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/trend_locations-i.ri deleted file mode 100644 index 8258208..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/trend_locations-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/trends-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/trends-i.ri deleted file mode 100644 index 967db81..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/trends-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/trends_available-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/trends_available-i.ri deleted file mode 100644 index 6d62465..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/trends_available-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/trends_closest-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/trends_closest-i.ri deleted file mode 100644 index 62f782b..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/trends_closest-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/trends_place-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/trends_place-i.ri deleted file mode 100644 index fcb1f66..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Trends/trends_place-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/cdesc-Tweets.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/cdesc-Tweets.ri deleted file mode 100644 index 63f3a2f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/cdesc-Tweets.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/destroy_status-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/destroy_status-i.ri deleted file mode 100644 index 5a0d7af..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/destroy_status-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/destroy_tweet-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/destroy_tweet-i.ri deleted file mode 100644 index dc7d4d0..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/destroy_tweet-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/oembed-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/oembed-i.ri deleted file mode 100644 index 3edb1c4..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/oembed-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/oembeds-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/oembeds-i.ri deleted file mode 100644 index 500839d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/oembeds-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/retweet%21-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/retweet%21-i.ri deleted file mode 100644 index 3926860..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/retweet%21-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/retweet-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/retweet-i.ri deleted file mode 100644 index 87f34bb..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/retweet-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/retweeters_ids-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/retweeters_ids-i.ri deleted file mode 100644 index e127adf..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/retweeters_ids-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/retweeters_of-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/retweeters_of-i.ri deleted file mode 100644 index 660b761..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/retweeters_of-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/retweets-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/retweets-i.ri deleted file mode 100644 index 9ad917a..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/retweets-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/status-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/status-i.ri deleted file mode 100644 index 93d5838..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/status-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/statuses-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/statuses-i.ri deleted file mode 100644 index 347e39b..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/statuses-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/update%21-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/update%21-i.ri deleted file mode 100644 index daa2f6f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/update%21-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/update-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/update-i.ri deleted file mode 100644 index 100eb09..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/update-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/update_with_media-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/update_with_media-i.ri deleted file mode 100644 index a6bf3f3..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Tweets/update_with_media-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Undocumented/cdesc-Undocumented.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Undocumented/cdesc-Undocumented.ri deleted file mode 100644 index c65ebf6..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Undocumented/cdesc-Undocumented.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Undocumented/following_followers_of-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Undocumented/following_followers_of-i.ri deleted file mode 100644 index 9ebad71..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Undocumented/following_followers_of-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Undocumented/tweet_count-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Undocumented/tweet_count-i.ri deleted file mode 100644 index 12653ac..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Undocumented/tweet_count-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/block%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/block%3f-i.ri deleted file mode 100644 index f7098c0..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/block%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/block-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/block-i.ri deleted file mode 100644 index 5261be8..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/block-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/blocked-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/blocked-i.ri deleted file mode 100644 index 4442ecd..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/blocked-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/blocked_ids-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/blocked_ids-i.ri deleted file mode 100644 index 3d42b34..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/blocked_ids-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/cdesc-Users.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/cdesc-Users.ri deleted file mode 100644 index d16c70b..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/cdesc-Users.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/contributees-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/contributees-i.ri deleted file mode 100644 index e4bc1db..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/contributees-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/contributors-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/contributors-i.ri deleted file mode 100644 index 70fca73..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/contributors-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/current_user-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/current_user-i.ri deleted file mode 100644 index 698dea6..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/current_user-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/mute-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/mute-i.ri deleted file mode 100644 index 7785c1a..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/mute-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/muted-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/muted-i.ri deleted file mode 100644 index d6ddc7e..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/muted-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/muted_ids-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/muted_ids-i.ri deleted file mode 100644 index 641b072..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/muted_ids-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/profile_banner-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/profile_banner-i.ri deleted file mode 100644 index a2b9573..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/profile_banner-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/remove_profile_banner-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/remove_profile_banner-i.ri deleted file mode 100644 index 82f5081..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/remove_profile_banner-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/settings-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/settings-i.ri deleted file mode 100644 index 0824c6a..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/settings-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/unblock-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/unblock-i.ri deleted file mode 100644 index e545f1e..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/unblock-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/unmute-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/unmute-i.ri deleted file mode 100644 index 922a589..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/unmute-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/update_delivery_device-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/update_delivery_device-i.ri deleted file mode 100644 index ad16f61..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/update_delivery_device-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/update_profile-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/update_profile-i.ri deleted file mode 100644 index 20d276b..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/update_profile-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/update_profile_background_image-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/update_profile_background_image-i.ri deleted file mode 100644 index 923ad0e..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/update_profile_background_image-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/update_profile_banner-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/update_profile_banner-i.ri deleted file mode 100644 index a4f1cb6..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/update_profile_banner-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/update_profile_colors-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/update_profile_colors-i.ri deleted file mode 100644 index 02a7fb2..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/update_profile_colors-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/update_profile_image-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/update_profile_image-i.ri deleted file mode 100644 index e87971e..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/update_profile_image-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/user%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/user%3f-i.ri deleted file mode 100644 index 1e01933..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/user%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/user-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/user-i.ri deleted file mode 100644 index 259f17a..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/user-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/user_search-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/user_search-i.ri deleted file mode 100644 index 4d23538..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/user_search-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/users-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/users-i.ri deleted file mode 100644 index cfc4a4f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/users-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/verify_credentials-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/verify_credentials-i.ri deleted file mode 100644 index 307ca26..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Users/verify_credentials-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Utils/cdesc-Utils.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Utils/cdesc-Utils.ri deleted file mode 100644 index 40ac01c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/Utils/cdesc-Utils.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/cdesc-REST.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/REST/cdesc-REST.ri deleted file mode 100644 index 92ab953..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/REST/cdesc-REST.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/RateLimit/cdesc-RateLimit.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/RateLimit/cdesc-RateLimit.ri deleted file mode 100644 index 294e2a2..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/RateLimit/cdesc-RateLimit.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/RateLimit/limit-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/RateLimit/limit-i.ri deleted file mode 100644 index 4418114..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/RateLimit/limit-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/RateLimit/remaining-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/RateLimit/remaining-i.ri deleted file mode 100644 index f2b70d7..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/RateLimit/remaining-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/RateLimit/reset_at-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/RateLimit/reset_at-i.ri deleted file mode 100644 index 1fecdea..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/RateLimit/reset_at-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/RateLimit/reset_in-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/RateLimit/reset_in-i.ri deleted file mode 100644 index e651d1e..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/RateLimit/reset_in-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/RateLimit/retry_after-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/RateLimit/retry_after-i.ri deleted file mode 100644 index dfec673..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/RateLimit/retry_after-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Relationship/cdesc-Relationship.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Relationship/cdesc-Relationship.ri deleted file mode 100644 index c1d2de5..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Relationship/cdesc-Relationship.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Relationship/new-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Relationship/new-c.ri deleted file mode 100644 index 4eede7b..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Relationship/new-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/cdesc-Request.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Request/cdesc-Request.ri deleted file mode 100644 index e21bf73..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/cdesc-Request.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/client-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Request/client-i.ri deleted file mode 100644 index 7d2bf8f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/client-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/new-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Request/new-c.ri deleted file mode 100644 index 4ee6918..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/new-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/options-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Request/options-i.ri deleted file mode 100644 index 2f61e41..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/options-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/path-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Request/path-i.ri deleted file mode 100644 index cdc114e..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/path-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/perform-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Request/perform-i.ri deleted file mode 100644 index ac3fa5f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/perform-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/perform_with_cursor-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Request/perform_with_cursor-i.ri deleted file mode 100644 index f3ee074..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/perform_with_cursor-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/perform_with_object-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Request/perform_with_object-i.ri deleted file mode 100644 index 364c8e8..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/perform_with_object-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/perform_with_objects-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Request/perform_with_objects-i.ri deleted file mode 100644 index afdc6ab..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/perform_with_objects-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/request_method-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Request/request_method-i.ri deleted file mode 100644 index f125165..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/request_method-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/verb-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Request/verb-i.ri deleted file mode 100644 index cf7f4ec..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Request/verb-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/SavedSearch/cdesc-SavedSearch.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/SavedSearch/cdesc-SavedSearch.ri deleted file mode 100644 index ab367ba..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/SavedSearch/cdesc-SavedSearch.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/SavedSearch/name-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/SavedSearch/name-i.ri deleted file mode 100644 index b8efc62..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/SavedSearch/name-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/SavedSearch/position-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/SavedSearch/position-i.ri deleted file mode 100644 index bc928db..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/SavedSearch/position-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/SavedSearch/query-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/SavedSearch/query-i.ri deleted file mode 100644 index e6b9cb4..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/SavedSearch/query-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/SearchResults/attrs-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/SearchResults/attrs-i.ri deleted file mode 100644 index be9ec66..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/SearchResults/attrs-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/SearchResults/cdesc-SearchResults.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/SearchResults/cdesc-SearchResults.ri deleted file mode 100644 index 1d65927..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/SearchResults/cdesc-SearchResults.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/SearchResults/new-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/SearchResults/new-c.ri deleted file mode 100644 index 86e0bde..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/SearchResults/new-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/SearchResults/to_h-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/SearchResults/to_h-i.ri deleted file mode 100644 index 1259085..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/SearchResults/to_h-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Settings/cdesc-Settings.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Settings/cdesc-Settings.ri deleted file mode 100644 index f2c0d9f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Settings/cdesc-Settings.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Settings/language-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Settings/language-i.ri deleted file mode 100644 index afbb598..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Settings/language-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Settings/screen_name-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Settings/screen_name-i.ri deleted file mode 100644 index 00a3616..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Settings/screen_name-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Settings/sleep_time-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Settings/sleep_time-i.ri deleted file mode 100644 index 9326f1b..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Settings/sleep_time-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Settings/time_zone-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Settings/time_zone-i.ri deleted file mode 100644 index 1d5fdf9..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Settings/time_zone-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Size/cdesc-Size.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Size/cdesc-Size.ri deleted file mode 100644 index 5e298c4..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Size/cdesc-Size.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Size/h-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Size/h-i.ri deleted file mode 100644 index 64f79d7..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Size/h-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Size/height-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Size/height-i.ri deleted file mode 100644 index 95b3f67..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Size/height-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Size/resize-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Size/resize-i.ri deleted file mode 100644 index 80605c3..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Size/resize-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Size/w-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Size/w-i.ri deleted file mode 100644 index 608d671..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Size/w-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Size/width-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Size/width-i.ri deleted file mode 100644 index 32c4826..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Size/width-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/SourceUser/cdesc-SourceUser.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/SourceUser/cdesc-SourceUser.ri deleted file mode 100644 index 6e58a44..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/SourceUser/cdesc-SourceUser.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/before_request-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/before_request-i.ri deleted file mode 100644 index 69fd226..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/before_request-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/cdesc-Client.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/cdesc-Client.ri deleted file mode 100644 index 4d79a45..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/cdesc-Client.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/connection-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/connection-i.ri deleted file mode 100644 index 6bd95ee..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/connection-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/filter-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/filter-i.ri deleted file mode 100644 index 0876759..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/filter-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/firehose-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/firehose-i.ri deleted file mode 100644 index 3e5f350..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/firehose-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/new-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/new-c.ri deleted file mode 100644 index 3700516..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/new-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/sample-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/sample-i.ri deleted file mode 100644 index 90fa72d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/sample-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/site-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/site-i.ri deleted file mode 100644 index 63400c4..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/site-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/ssl_socket_class-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/ssl_socket_class-i.ri deleted file mode 100644 index 345dda6..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/ssl_socket_class-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/tcp_socket_class-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/tcp_socket_class-i.ri deleted file mode 100644 index 8bfc806..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/tcp_socket_class-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/user-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/user-i.ri deleted file mode 100644 index 6253647..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Client/user-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Connection/cdesc-Connection.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Connection/cdesc-Connection.ri deleted file mode 100644 index a10bc1a..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Connection/cdesc-Connection.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Connection/new-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Connection/new-c.ri deleted file mode 100644 index c4e5ae9..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Connection/new-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Connection/ssl_socket_class-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Connection/ssl_socket_class-i.ri deleted file mode 100644 index 3a267ca..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Connection/ssl_socket_class-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Connection/stream-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Connection/stream-i.ri deleted file mode 100644 index 2c93e25..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Connection/stream-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Connection/tcp_socket_class-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Connection/tcp_socket_class-i.ri deleted file mode 100644 index 8d4c847..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Connection/tcp_socket_class-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/DeletedTweet/cdesc-DeletedTweet.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/DeletedTweet/cdesc-DeletedTweet.ri deleted file mode 100644 index d56f4d5..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/DeletedTweet/cdesc-DeletedTweet.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/DeletedTweet/user_id-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/DeletedTweet/user_id-i.ri deleted file mode 100644 index 9ed8687..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/DeletedTweet/user_id-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Event/cdesc-Event.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Event/cdesc-Event.ri deleted file mode 100644 index 016bbf0..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Event/cdesc-Event.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Event/name-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Event/name-i.ri deleted file mode 100644 index 648752c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Event/name-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Event/new-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Event/new-c.ri deleted file mode 100644 index 16525c6..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Event/new-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Event/source-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Event/source-i.ri deleted file mode 100644 index 1dc4fd5..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Event/source-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Event/target-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Event/target-i.ri deleted file mode 100644 index 2cb4e3e..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Event/target-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Event/target_object-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Event/target_object-i.ri deleted file mode 100644 index b2c9c67..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Event/target_object-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/FriendList/cdesc-FriendList.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/FriendList/cdesc-FriendList.ri deleted file mode 100644 index 0d18a1d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/FriendList/cdesc-FriendList.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/MessageParser/cdesc-MessageParser.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/MessageParser/cdesc-MessageParser.ri deleted file mode 100644 index 99f4ca6..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/MessageParser/cdesc-MessageParser.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/MessageParser/parse-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/MessageParser/parse-c.ri deleted file mode 100644 index 8450ee8..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/MessageParser/parse-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Response/%3c%3c-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Response/%3c%3c-i.ri deleted file mode 100644 index d7cf1c5..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Response/%3c%3c-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Response/cdesc-Response.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Response/cdesc-Response.ri deleted file mode 100644 index 32cde89..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Response/cdesc-Response.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Response/new-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Response/new-c.ri deleted file mode 100644 index d3128d7..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Response/new-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Response/on_body-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Response/on_body-i.ri deleted file mode 100644 index d4a0ede..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Response/on_body-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Response/on_headers_complete-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Response/on_headers_complete-i.ri deleted file mode 100644 index af6f4c2..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/Response/on_headers_complete-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/StallWarning/cdesc-StallWarning.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/StallWarning/cdesc-StallWarning.ri deleted file mode 100644 index c9d1956..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/StallWarning/cdesc-StallWarning.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/StallWarning/code-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/StallWarning/code-i.ri deleted file mode 100644 index 7462ce9..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/StallWarning/code-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/StallWarning/message-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/StallWarning/message-i.ri deleted file mode 100644 index c72693f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/StallWarning/message-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/StallWarning/percent_full-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/StallWarning/percent_full-i.ri deleted file mode 100644 index 7a9dfb7..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/StallWarning/percent_full-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/cdesc-Streaming.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/cdesc-Streaming.ri deleted file mode 100644 index c0cc228..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Streaming/cdesc-Streaming.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Suggestion/cdesc-Suggestion.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Suggestion/cdesc-Suggestion.ri deleted file mode 100644 index b3f60d9..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Suggestion/cdesc-Suggestion.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Suggestion/name-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Suggestion/name-i.ri deleted file mode 100644 index 2eb3422..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Suggestion/name-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Suggestion/size-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Suggestion/size-i.ri deleted file mode 100644 index 2a96b4b..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Suggestion/size-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Suggestion/slug-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Suggestion/slug-i.ri deleted file mode 100644 index d6d6e6d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Suggestion/slug-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Suggestion/users-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Suggestion/users-i.ri deleted file mode 100644 index df6f1e4..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Suggestion/users-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/TargetUser/cdesc-TargetUser.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/TargetUser/cdesc-TargetUser.ri deleted file mode 100644 index 7e8eff1..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/TargetUser/cdesc-TargetUser.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Token/access_token-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Token/access_token-i.ri deleted file mode 100644 index 3f1321d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Token/access_token-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Token/bearer%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Token/bearer%3f-i.ri deleted file mode 100644 index b499233..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Token/bearer%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Token/cdesc-Token.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Token/cdesc-Token.ri deleted file mode 100644 index 60625ce..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Token/cdesc-Token.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Token/to_s-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Token/to_s-i.ri deleted file mode 100644 index b46bf83..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Token/to_s-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Token/token_type-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Token/token_type-i.ri deleted file mode 100644 index bc3eb75..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Token/token_type-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Trend/cdesc-Trend.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Trend/cdesc-Trend.ri deleted file mode 100644 index f00110f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Trend/cdesc-Trend.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Trend/events-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Trend/events-i.ri deleted file mode 100644 index d3d34d3..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Trend/events-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Trend/name-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Trend/name-i.ri deleted file mode 100644 index d31226b..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Trend/name-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Trend/query-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Trend/query-i.ri deleted file mode 100644 index 4e2f1f9..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Trend/query-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/as_of%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/as_of%3f-i.ri deleted file mode 100644 index 15c8eb7..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/as_of%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/as_of-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/as_of-i.ri deleted file mode 100644 index d5025b6..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/as_of-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/attrs-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/attrs-i.ri deleted file mode 100644 index e8922cd..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/attrs-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/cdesc-TrendResults.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/cdesc-TrendResults.ri deleted file mode 100644 index 1a4c4b9..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/cdesc-TrendResults.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/location%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/location%3f-i.ri deleted file mode 100644 index b5eaa26..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/location%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/location-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/location-i.ri deleted file mode 100644 index 53fafd3..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/location-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/new-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/new-c.ri deleted file mode 100644 index f5bb1c6..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/new-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/to_h-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/to_h-i.ri deleted file mode 100644 index 9cef557..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/TrendResults/to_h-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/cdesc-Tweet.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/cdesc-Tweet.ri deleted file mode 100644 index 2b07226..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/cdesc-Tweet.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/favorite_count-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/favorite_count-i.ri deleted file mode 100644 index e44373d..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/favorite_count-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/filter_level-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/filter_level-i.ri deleted file mode 100644 index 6cb7f05..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/filter_level-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/full_text-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/full_text-i.ri deleted file mode 100644 index b95e419..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/full_text-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/in_reply_to_attrs_id-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/in_reply_to_attrs_id-i.ri deleted file mode 100644 index 6df7db4..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/in_reply_to_attrs_id-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/in_reply_to_screen_name-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/in_reply_to_screen_name-i.ri deleted file mode 100644 index d7d4d45..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/in_reply_to_screen_name-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/in_reply_to_status_id-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/in_reply_to_status_id-i.ri deleted file mode 100644 index 3c09e49..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/in_reply_to_status_id-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/in_reply_to_tweet_id-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/in_reply_to_tweet_id-i.ri deleted file mode 100644 index fe677bc..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/in_reply_to_tweet_id-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/in_reply_to_user_id-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/in_reply_to_user_id-i.ri deleted file mode 100644 index 76f00e7..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/in_reply_to_user_id-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/lang-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/lang-i.ri deleted file mode 100644 index f2652d4..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/lang-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/retweet_count-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/retweet_count-i.ri deleted file mode 100644 index 46719c6..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/retweet_count-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/source-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/source-i.ri deleted file mode 100644 index e89d657..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/source-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/text-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/text-i.ri deleted file mode 100644 index dceaf0e..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/text-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/uri-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/uri-i.ri deleted file mode 100644 index 5579663..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/uri-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/url-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/url-i.ri deleted file mode 100644 index 84aaa7f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Tweet/url-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/cdesc-User.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/cdesc-User.ri deleted file mode 100644 index 7fbcbe1..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/cdesc-User.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/connections-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/connections-i.ri deleted file mode 100644 index 8de7a00..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/connections-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/description-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/description-i.ri deleted file mode 100644 index a2a3edb..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/description-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/entities%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/entities%3f-i.ri deleted file mode 100644 index fb322d9..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/entities%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/favorites_count-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/favorites_count-i.ri deleted file mode 100644 index a1cac0a..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/favorites_count-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/favourites_count-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/favourites_count-i.ri deleted file mode 100644 index 812ec2b..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/favourites_count-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/followers_count-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/followers_count-i.ri deleted file mode 100644 index b4a3a73..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/followers_count-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/friends_count-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/friends_count-i.ri deleted file mode 100644 index 730f7db..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/friends_count-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/lang-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/lang-i.ri deleted file mode 100644 index dfaecb8..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/lang-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/listed_count-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/listed_count-i.ri deleted file mode 100644 index 9b7274b..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/listed_count-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/location-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/location-i.ri deleted file mode 100644 index cd00a3c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/location-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/name-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/name-i.ri deleted file mode 100644 index bdc0570..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/name-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_background_color-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_background_color-i.ri deleted file mode 100644 index 55f619f..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_background_color-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_background_image_uri-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_background_image_uri-i.ri deleted file mode 100644 index 37d2b38..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_background_image_uri-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_background_image_uri_https-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_background_image_uri_https-i.ri deleted file mode 100644 index 6825864..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_background_image_uri_https-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_background_image_url-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_background_image_url-i.ri deleted file mode 100644 index 6ae2996..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_background_image_url-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_background_image_url_https-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_background_image_url_https-i.ri deleted file mode 100644 index fd47d75..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_background_image_url_https-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_link_color-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_link_color-i.ri deleted file mode 100644 index ac0db8b..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_link_color-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_sidebar_border_color-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_sidebar_border_color-i.ri deleted file mode 100644 index 525b89b..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_sidebar_border_color-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_sidebar_fill_color-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_sidebar_fill_color-i.ri deleted file mode 100644 index 49875db..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_sidebar_fill_color-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_text_color-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_text_color-i.ri deleted file mode 100644 index 369ad7e..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/profile_text_color-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/statuses_count-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/statuses_count-i.ri deleted file mode 100644 index 9d766e5..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/statuses_count-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/time_zone-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/time_zone-i.ri deleted file mode 100644 index e71ba23..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/time_zone-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/tweets_count-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/tweets_count-i.ri deleted file mode 100644 index 71cfebf..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/tweets_count-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/uri-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/uri-i.ri deleted file mode 100644 index d92ef5c..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/uri-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/url-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/url-i.ri deleted file mode 100644 index 96977f5..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/url-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/utc_offset-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/utc_offset-i.ri deleted file mode 100644 index 3a84e62..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/utc_offset-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/website%3f-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/website%3f-i.ri deleted file mode 100644 index 2824415..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/website%3f-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/User/website-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/User/website-i.ri deleted file mode 100644 index 3b55554..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/User/website-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Utils/ClassMethods/cdesc-ClassMethods.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Utils/ClassMethods/cdesc-ClassMethods.ri deleted file mode 100644 index 60efc86..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Utils/ClassMethods/cdesc-ClassMethods.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Utils/ClassMethods/deprecate_alias-i.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Utils/ClassMethods/deprecate_alias-i.ri deleted file mode 100644 index 4bd8359..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Utils/ClassMethods/deprecate_alias-i.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Utils/cdesc-Utils.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Utils/cdesc-Utils.ri deleted file mode 100644 index 2b1c52e..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Utils/cdesc-Utils.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Utils/flat_pmap-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Utils/flat_pmap-c.ri deleted file mode 100644 index c231451..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Utils/flat_pmap-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Utils/included-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Utils/included-c.ri deleted file mode 100644 index 1b3bb00..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Utils/included-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Utils/pmap-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Utils/pmap-c.ri deleted file mode 100644 index db6f1e7..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Utils/pmap-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Version/cdesc-Version.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Version/cdesc-Version.ri deleted file mode 100644 index 9aa7ce8..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Version/cdesc-Version.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/Version/to_s-c.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/Version/to_s-c.ri deleted file mode 100644 index d504f9b..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/Version/to_s-c.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/Twitter/cdesc-Twitter.ri b/.gems/doc/twitter-5.11.0/ri/Twitter/cdesc-Twitter.ri deleted file mode 100644 index a89d4c6..0000000 Binary files a/.gems/doc/twitter-5.11.0/ri/Twitter/cdesc-Twitter.ri and /dev/null differ diff --git a/.gems/doc/twitter-5.11.0/ri/cache.ri b/.gems/doc/twitter-5.11.0/ri/cache.ri deleted file mode 100644 index 409c5c5..0000000 --- a/.gems/doc/twitter-5.11.0/ri/cache.ri +++ /dev/null @@ -1,39 +0,0 @@ -{ :ancestors{gI"Twitter::TargetUser:EF[I"Twitter::BasicUser;FI"Twitter::Client;F[I" Object;FI"Twitter::Utils;FI"Twitter::TrendResults;F[ -I"Memoizable;FI" Object;FI"Twitter::Creatable;FI"Twitter::Enumerable;F@ I"Twitter::MediaFactory;F[I"Twitter::Factory;FI"Twitter::Size;F[I"Equalizer;FI"Twitter::Base;FI"Twitter::SourceUser;F[@ I"Twitter::Relationship;F[@I"Twitter::GeoFactory;F[@I"Twitter::Version;F[I" Object;FI"Twitter::Entity;F[@I"Twitter::Entity::Symbol;F[I"Twitter::Entity;FI"Twitter::Entity::URI;F[@(I"Twitter::Entity::URL;F[@(I"Twitter::Entity::Hashtag;F[@(I"!Twitter::Entity::UserMention;F[@(I"Twitter::Tweet;F[@I"Twitter::Entities;FI"Twitter::Identity;FI"Twitter::Geo;F[I"Equalizer;F@I"Twitter::Geo::Point;F[I"Twitter::Geo;FI"Twitter::Geo::Polygon;F[@:I"Twitter::Factory;F[I" Object;FI"Twitter::Trend;F[I"Equalizer;F@I"%Twitter::Streaming::DeletedTweet;F[@4I"Twitter::Streaming::Client;F[I"Twitter::Client;FI"%Twitter::Streaming::StallWarning;F[@I"#Twitter::Streaming::Connection;F[I" Object;FI"&Twitter::Streaming::MessageParser;F[I" Object;FI"#Twitter::Streaming::FriendList;F[I" -Array;FI"!Twitter::Streaming::Response;F[I" Object;FI"Twitter::Streaming::Event;F[I" Object;FI"Twitter::BasicUser;F[@4I"Twitter::ProfileBanner;F[@I"Twitter::SearchResults;F[I" Object;F@@ I"Twitter::Cursor;F[I" Object;F@@ I"Twitter::Request;F[I" Object;FI"Twitter::Arguments;F[I" -Array;FI"Twitter::SavedSearch;F[@@4I"Twitter::RateLimit;F[@I"Twitter::Metadata;F[@I"Twitter::DirectMessage;F[@@3@4I"Twitter::REST::Client;F[@GI"Twitter::REST::API;FI",Twitter::REST::Response::ParseErrorJson;F[I"'Twitter::REST::Response::ParseJson;FI"'Twitter::REST::Response::ParseJson;F[I""Faraday::Response::Middleware;FI"(Twitter::REST::Response::RaiseError;F[I""Faraday::Response::Middleware;FI".Twitter::REST::Request::MultipartWithFile;F[I"Faraday::Middleware;FI"Twitter::Configuration;F[@I"Twitter::GeoResults;F[I" Object;F@@ I"Twitter::Suggestion;F[I"Equalizer;F@I"Twitter::Media::Photo;F[@4I"Twitter::Identity;F[I"Equalizer;F@I"Twitter::Base;F[I"Memoizable;FI" Object;F@ I"Twitter::OEmbed;F[@I"Twitter::Settings;F[@I"Twitter::Language;F[@I"Twitter::List;F[@@4I"Twitter::Token;F[@I"Twitter::User;F[ I"Memoizable;F@ @I"Twitter::Profile;FI"Twitter::Place;F[@4I"Twitter::Error;F[I"StandardError;FI"'Twitter::Error::ConfigurationError;F[I"ArgumentError;FI"#Twitter::Error::UnacceptableIO;F[I"StandardError;FI" Twitter::Error::ClientError;F[I" self;FI"Twitter::Error::BadRequest;F[I" Twitter::Error::ClientError;FI"!Twitter::Error::Unauthorized;F[@I"Twitter::Error::Forbidden;F[@I"%Twitter::Error::AlreadyFavorited;F[I"Twitter::Error::Forbidden;FI"%Twitter::Error::AlreadyRetweeted;F[@I"$Twitter::Error::DuplicateStatus;F[@I"Twitter::Error::NotFound;F[@I""Twitter::Error::NotAcceptable;F[@I"#Twitter::Error::RequestTimeout;F[@I"(Twitter::Error::UnprocessableEntity;F[@I"$Twitter::Error::TooManyRequests;F[@I" Twitter::Error::ServerError;F[I" self;FI"(Twitter::Error::InternalServerError;F[I" Twitter::Error::ServerError;FI"Twitter::Error::BadGateway;F[@I"'Twitter::Error::ServiceUnavailable;F[@I"#Twitter::Error::GatewayTimeout;F[@I"Twitter::Entities;F[I"Memoizable;FI"Twitter::Profile;F[I"Memoizable;FI"Twitter::Creatable;F[I"Memoizable;FI"Twitter::REST::API;F[I""Twitter::REST::DirectMessages;FI"Twitter::REST::Favorites;FI"'Twitter::REST::FriendsAndFollowers;FI"Twitter::REST::Help;FI"Twitter::REST::Lists;FI"Twitter::REST::Media;FI"Twitter::REST::OAuth;FI" Twitter::REST::PlacesAndGeo;FI"!Twitter::REST::SavedSearches;FI"Twitter::REST::Search;FI"!Twitter::REST::SpamReporting;FI""Twitter::REST::SuggestedUsers;FI"Twitter::REST::Timelines;FI"Twitter::REST::Trends;FI"Twitter::REST::Tweets;FI" Twitter::REST::Undocumented;FI"Twitter::REST::Users;FI""Twitter::REST::SuggestedUsers;F[I"Twitter::REST::Utils;FI"Twitter::REST::OAuth;F[@I" Twitter::REST::Undocumented;F[@I"!Twitter::REST::SavedSearches;F[@@ I"Twitter::REST::Favorites;F[@@ I"Twitter::REST::Utils;F[@ I" Twitter::REST::PlacesAndGeo;F[@I"Twitter::REST::Users;F[@@ I"Twitter::REST::Lists;F[@@ I"Twitter::REST::Help;F[@I"!Twitter::REST::SpamReporting;F[@I"Twitter::REST::Tweets;F[@@ I"'Twitter::REST::FriendsAndFollowers;F[@@ I"Twitter::REST::Trends;F[@I"Twitter::REST::Timelines;F[@I""Twitter::REST::DirectMessages;F[@@ I"Twitter::Enumerable;F[I"::Enumerable;F:attributes{+I"Twitter::Client;F[ I"attr_accessor access_token;FI"&attr_accessor access_token_secret;FI"attr_accessor consumer_key;FI""attr_accessor consumer_secret;FI"attr_accessor proxy;FI"attr_writer user_agent;FI"Twitter::TrendResults;F[I"attr_reader attrs;FI"attr_reader to_h;FI"Twitter::Size;F[ -I"attr_reader h;FI"attr_reader height;FI"attr_reader resize;FI"attr_reader w;FI"attr_reader width;FI"Twitter::Entity;F[I"attr_reader indices;FI"Twitter::Entity::Symbol;F[I"attr_reader text;F@-[I"attr_reader text;F@/[I"attr_reader id;FI"attr_reader name;FI"attr_reader screen_name;FI"Twitter::Tweet;F[I"attr_reader favorite_count;FI"attr_reader filter_level;FI"%attr_reader in_reply_to_attrs_id;FI"(attr_reader in_reply_to_screen_name;FI"&attr_reader in_reply_to_status_id;FI"%attr_reader in_reply_to_tweet_id;FI"$attr_reader in_reply_to_user_id;FI"attr_reader lang;FI"attr_reader retweet_count;FI"attr_reader source;FI"attr_reader text;FI"Twitter::Geo;F[I"attr_reader coordinates;FI"attr_reader coords;FI"Twitter::Trend;F[I"attr_reader events;FI"attr_reader name;FI"attr_reader query;F@C[I"attr_reader user_id;F@E[I"#attr_accessor ssl_socket_class;FI"#attr_accessor tcp_socket_class;FI"attr_writer connection;F@H[I"attr_reader code;FI"attr_reader message;FI"attr_reader percent_full;F@J[I"!attr_reader ssl_socket_class;FI"!attr_reader tcp_socket_class;F@V[ I"attr_reader name;FI"attr_reader source;FI"attr_reader target;FI"attr_reader target_object;FI"Twitter::BasicUser;F[I"attr_reader screen_name;FI"Twitter::SearchResults;F[I"attr_reader attrs;FI"attr_reader to_h;FI"Twitter::Cursor;F[I"attr_reader attrs;FI"attr_reader to_h;FI"Twitter::Request;F[ -I"attr_accessor client;FI"attr_accessor options;FI"attr_accessor path;FI"!attr_accessor request_method;FI"attr_accessor verb;FI"Twitter::Arguments;F[I"attr_reader options;FI"Twitter::SavedSearch;F[I"attr_reader name;FI"attr_reader position;FI"attr_reader query;FI"Twitter::Metadata;F[I""attr_reader iso_language_code;FI"attr_reader result_type;FI"Twitter::DirectMessage;F[I"attr_reader full_text;FI"attr_reader text;FI"Twitter::REST::Client;F[I"attr_accessor bearer_token;FI"Twitter::Configuration;F[ I".attr_reader characters_reserved_per_media;FI"%attr_reader max_media_per_upload;FI"#attr_reader non_username_paths;FI"!attr_reader photo_size_limit;FI"!attr_reader short_uri_length;FI"'attr_reader short_uri_length_https;FI"!attr_reader short_url_length;FI"'attr_reader short_url_length_https;FI"Twitter::GeoResults;F[I"attr_reader attrs;FI"attr_reader to_h;FI"Twitter::Suggestion;F[I"attr_reader name;FI"attr_reader size;FI"attr_reader slug;FI"Twitter::Media::Photo;F[I"attr_reader indices;FI"Twitter::Identity;F[I"attr_reader id;FI"Twitter::Base;F[I"attr_reader attrs;FI"attr_reader to_h;FI"Twitter::OEmbed;F[ I"attr_reader author_name;FI"attr_reader cache_age;FI"attr_reader height;FI"attr_reader html;FI"attr_reader provider_name;FI"attr_reader type;FI"attr_reader version;FI"attr_reader width;FI"Twitter::Settings;F[ I"attr_reader language;FI"attr_reader screen_name;FI"attr_reader sleep_time;FI"attr_reader time_zone;FI"Twitter::Language;F[I"attr_reader code;FI"attr_reader name;FI"attr_reader status;FI"Twitter::List;F[ I"attr_reader description;FI"attr_reader full_name;FI"attr_reader member_count;FI"attr_reader mode;FI"attr_reader name;FI"attr_reader slug;FI"!attr_reader subscriber_count;FI"Twitter::Token;F[I"attr_reader access_token;FI"attr_reader to_s;FI"attr_reader token_type;FI"Twitter::User;F[I"attr_reader connections;FI"attr_reader description;FI" attr_reader favorites_count;FI"!attr_reader favourites_count;FI" attr_reader followers_count;FI"attr_reader friends_count;FI"attr_reader lang;FI"attr_reader listed_count;FI"attr_reader location;FI"attr_reader name;FI")attr_reader profile_background_color;FI"-attr_reader profile_background_image_uri;FI"3attr_reader profile_background_image_uri_https;FI"-attr_reader profile_background_image_url;FI"3attr_reader profile_background_image_url_https;FI"#attr_reader profile_link_color;FI"-attr_reader profile_sidebar_border_color;FI"+attr_reader profile_sidebar_fill_color;FI"#attr_reader profile_text_color;FI"attr_reader statuses_count;FI"attr_reader time_zone;FI"attr_reader tweets_count;FI"attr_reader utc_offset;FI"Twitter::Place;F[ I"attr_reader attributes;FI"attr_reader country;FI"attr_reader full_name;FI"attr_reader name;FI"Twitter::Error;F[I"attr_reader code;FI"attr_reader rate_limit;F:class_methods{I"Twitter::Client;F[I"new;FI"Twitter::TrendResults;F[I"new;FI"Twitter::MediaFactory;F[I"new;FI"Twitter::Relationship;F[I"new;FI"Twitter::GeoFactory;F[I"new;FI"Twitter::Version;F[I" to_s;FI"Twitter::Factory;F[I"new;F@E[I"new;F@J[I"new;F@M[I" -parse;F@S[I"new;F@V[I"new;FI"Twitter::SearchResults;F[I"new;FI"Twitter::Cursor;F[I"new;FI"Twitter::Request;F[I"new;FI"Twitter::Arguments;F[I"new;FI"Twitter::GeoResults;F[I"new;FI"Twitter::Identity;F[I"new;FI"Twitter::Base;F[I"attr_reader;FI"define_attribute_method;FI"define_predicate_method;FI"define_uri_method;FI"deprecate_attribute_method;FI"display_uri_attr_reader;FI"new;FI"object_attr_reader;FI"predicate_attr_reader;FI"uri_attr_reader;FI"Twitter::Place;F[I"new;FI"Twitter::Error;F[ I" errors;FI"forbidden_messages;FI"from_response;FI"new;F@[I"new;FI"Twitter::Utils;F[I"flat_pmap;FI" included;FI" pmap;F: encodingIu: Encoding -UTF-8;F:instance_methods{II"Twitter::Client;F[I"access_token;FI"access_token_secret;FI"consumer_key;FI"consumer_secret;FI"credentials;FI"credentials?;FI" -proxy;FI"user_agent;FI"user_token?;FI"Twitter::TrendResults;F[ I" -as_of;FI" as_of?;FI" -attrs;FI" location;FI"location?;FI" to_h;FI"Twitter::Size;F[ -I"h;FI" height;FI" resize;FI"w;FI" -width;FI"Twitter::Entity;F[I" indices;FI"Twitter::Entity::Symbol;F[I" text;F@-[I" text;F@/[I"id;FI" name;FI"screen_name;FI"Twitter::Tweet;F[I"favorite_count;FI"filter_level;FI"full_text;FI"in_reply_to_attrs_id;FI"in_reply_to_screen_name;FI"in_reply_to_status_id;FI"in_reply_to_tweet_id;FI"in_reply_to_user_id;FI" lang;FI"retweet_count;FI" source;FI" text;FI"uri;FI"url;FI"Twitter::Geo;F[I"coordinates;FI" coords;FI"Twitter::Geo::Point;F[ -I"lat;FI" latitude;FI"lng;FI" long;FI"longitude;FI"Twitter::Trend;F[I" events;FI" name;FI" -query;F@C[I" user_id;F@E[I"before_request;FI"connection;FI" filter;FI" firehose;FI" sample;FI" site;FI"ssl_socket_class;FI"tcp_socket_class;FI" user;F@H[I" code;FI" message;FI"percent_full;F@J[I"ssl_socket_class;FI" stream;FI"tcp_socket_class;F@S[I"<<;FI" on_body;FI"on_headers_complete;F@V[ I" name;FI" source;FI" target;FI"target_object;FI"Twitter::BasicUser;F[I"screen_name;FI"Twitter::ProfileBanner;F[I" -sizes;FI"Twitter::SearchResults;F[I" -attrs;FI" to_h;FI"Twitter::Cursor;F[I" -attrs;FI" to_h;FI"Twitter::Request;F[I" client;FI" options;FI" path;FI" perform;FI"perform_with_cursor;FI"perform_with_object;FI"perform_with_objects;FI"request_method;FI" verb;FI"Twitter::Arguments;F[I" options;FI"Twitter::SavedSearch;F[I" name;FI" position;FI" -query;FI"Twitter::RateLimit;F[ -I" -limit;FI"remaining;FI" reset_at;FI" reset_in;FI"retry_after;FI"Twitter::Metadata;F[I"iso_language_code;FI"result_type;FI"Twitter::DirectMessage;F[I"full_text;FI" text;FI"Twitter::REST::Client;F[I"bearer_token;FI"bearer_token?;FI"connection_options;FI"connection_options=;FI"credentials?;FI"get;FI"middleware;FI"middleware=;FI" post;F@t[I"unparsable_status_codes;F@w[I"on_complete;FI" -parse;FI"unparsable_status_codes;F@z[I"on_complete;F@}[I" call;FI"Twitter::Configuration;F[I""characters_reserved_per_media;FI"max_media_per_upload;FI"non_username_paths;FI"photo_size_limit;FI"photo_sizes;FI"short_uri_length;FI"short_uri_length_https;FI"short_url_length;FI"short_url_length_https;FI"Twitter::GeoResults;F[I" -attrs;FI" to_h;FI" -token;FI"Twitter::Suggestion;F[ I" name;FI" size;FI" slug;FI" -users;FI"Twitter::Media::Photo;F[I" indices;FI" -sizes;FI"Twitter::Identity;F[I"id;FI"Twitter::Base;F[I"[];FI" -attrs;FI" to_h;FI"Twitter::OEmbed;F[ I"author_name;FI"cache_age;FI" height;FI" html;FI"provider_name;FI" type;FI" version;FI" -width;FI"Twitter::Settings;F[ I" language;FI"screen_name;FI"sleep_time;FI"time_zone;FI"Twitter::Language;F[I" code;FI" name;FI" status;FI"Twitter::List;F[I"description;FI"full_name;FI"member_count;FI"members_uri;FI"members_url;FI" mode;FI" name;FI" slug;FI"subscriber_count;FI"subscribers_uri;FI"subscribers_url;FI"uri;FI"url;FI"Twitter::Token;F[ I"access_token;FI" bearer?;FI" to_s;FI"token_type;FI"Twitter::User;F[!I"connections;FI"description;FI"entities?;FI"favorites_count;FI"favourites_count;FI"followers_count;FI"friends_count;FI" lang;FI"listed_count;FI" location;FI" name;FI"profile_background_color;FI"!profile_background_image_uri;FI"'profile_background_image_uri_https;FI"!profile_background_image_url;FI"'profile_background_image_url_https;FI"profile_link_color;FI"!profile_sidebar_border_color;FI"profile_sidebar_fill_color;FI"profile_text_color;FI"statuses_count;FI"time_zone;FI"tweets_count;FI"uri;FI"url;FI"utc_offset;FI" website;FI" website?;FI"Twitter::Place;F[ I"attributes;FI" country;FI"country_code;FI"full_name;FI" name;FI"parent_id;FI"place_type;FI"Twitter::Error;F[I" code;FI"rate_limit;FI"Twitter::Entities;F[I"entities?;FI" hashtags;FI"hashtags?;FI" -media;FI" media?;FI" symbols;FI" symbols?;FI" uris;FI" -uris?;FI" urls;FI" -urls?;FI"user_mentions;FI"user_mentions?;FI"Twitter::Profile;F[I"profile_banner_uri;FI"profile_banner_uri?;FI"profile_banner_uri_https;FI"profile_banner_url;FI"profile_banner_url_https;FI"profile_image_uri;FI"profile_image_uri?;FI"profile_image_uri_https;FI"profile_image_url;FI"profile_image_url_https;FI"Twitter::Creatable;F[I" created?;FI"created_at;FI"!Twitter::Utils::ClassMethods;F[I"deprecate_alias;F@[I"suggest_users;FI"suggestions;FI"Twitter::REST::OAuth;F[ I"bearer_token;FI"invalidate_token;FI"reverse_token;FI" -token;FI"Twitter::REST::Search;F[I" search;F@[I"following_followers_of;FI"tweet_count;F@[ I"create_saved_search;FI"destroy_saved_search;FI"saved_search;FI"saved_searches;F@[I"create_favorite!;FI"destroy_favorite;FI"fav;FI" fav!;FI" fave;FI" -fave!;FI" favorite;FI"favorite!;FI"favorites;FI"unfavorite;F@[ I"geo_search;FI" -place;FI"places_nearby;FI"places_similar;FI"reverse_geocode;FI"similar_places;FI"Twitter::REST::Users;F[I" -block;FI" block?;FI" blocked;FI"blocked_ids;FI"contributees;FI"contributors;FI"current_user;FI" mute;FI" -muted;FI"muted_ids;FI"profile_banner;FI"remove_profile_banner;FI" settings;FI" unblock;FI" unmute;FI"update_delivery_device;FI"update_profile;FI"$update_profile_background_image;FI"update_profile_banner;FI"update_profile_colors;FI"update_profile_image;FI" user;FI" -user?;FI"user_search;FI" -users;FI"verify_credentials;FI"Twitter::REST::Lists;F[I"add_list_member;FI"add_list_members;FI"create_list;FI"destroy_list;FI" list;FI"list_member?;FI"list_members;FI"list_subscribe;FI"list_subscriber?;FI"list_subscribers;FI"list_timeline;FI"list_unsubscribe;FI"list_update;FI" -lists;FI"lists_subscribed_to;FI"memberships;FI"owned_lists;FI"remove_list_member;FI"remove_list_members;FI"subscriptions;FI"Twitter::REST::Help;F[ I"configuration;FI"languages;FI" privacy;FI"tos;F@[I"report_spam;FI"Twitter::REST::Media;F[I" upload;FI"Twitter::REST::Tweets;F[I"destroy_status;FI"destroy_tweet;FI" oembed;FI" oembeds;FI" retweet;FI" retweet!;FI"retweeters_ids;FI"retweeters_of;FI" retweets;FI" status;FI" statuses;FI" update;FI" update!;FI"update_with_media;F@[I"create_friendship;FI"create_friendship!;FI"destroy_friendship;FI" follow;FI" follow!;FI"follower_ids;FI"followers;FI"following;FI"friend_ids;FI" friends;FI"friendship;FI"friendship?;FI"friendship_show;FI"friendship_update;FI"friendships;FI"friendships_incoming;FI"friendships_outgoing;FI"no_retweet_ids;FI"no_retweets_ids;FI"relationship;FI" unfollow;FI"Twitter::REST::Trends;F[ I"local_trends;FI"trend_locations;FI" trends;FI"trends_available;FI"trends_closest;FI"trends_place;F@[I"home_timeline;FI" mentions;FI"mentions_timeline;FI"retweeted_by;FI"retweeted_by_me;FI"retweeted_by_user;FI"retweeted_to_me;FI"retweets_of_me;FI"user_timeline;F@[I"create_direct_message;FI"d;FI"destroy_direct_message;FI"direct_message;FI"direct_messages;FI"direct_messages_received;FI"direct_messages_sent;FI"dm;FI"m;FI"Twitter::Enumerable;F[I" each;F: modules[rI" Twitter;FI"Twitter::Arguments;F@@ @GI"Twitter::Configuration;F@I"Twitter::Cursor;FI"Twitter::DirectMessage;F@3@(I"Twitter::Entity::Hashtag;FI"Twitter::Entity::Symbol;FI"Twitter::Entity::URI;FI"Twitter::Entity::URL;FI"!Twitter::Entity::UserMention;F@I"Twitter::Error;FI"%Twitter::Error::AlreadyFavorited;FI"%Twitter::Error::AlreadyRetweeted;FI"Twitter::Error::BadGateway;FI"Twitter::Error::BadRequest;F@I"Twitter::Error::Code;FI"'Twitter::Error::ConfigurationError;FI"$Twitter::Error::DuplicateStatus;F@I"#Twitter::Error::GatewayTimeout;FI"(Twitter::Error::InternalServerError;FI""Twitter::Error::NotAcceptable;FI"Twitter::Error::NotFound;FI"#Twitter::Error::RequestTimeout;F@I"'Twitter::Error::ServiceUnavailable;FI"$Twitter::Error::TooManyRequests;FI"#Twitter::Error::UnacceptableIO;FI"!Twitter::Error::Unauthorized;FI"(Twitter::Error::UnprocessableEntity;F@@:I"Twitter::Geo::Point;FI"Twitter::Geo::Polygon;FI"Twitter::GeoFactory;FI"Twitter::GeoResults;F@4I"Twitter::Language;FI"Twitter::List;FI"Twitter::Media;FI"Twitter::Media::Photo;FI"Twitter::MediaFactory;FI"Twitter::Metadata;FI"Twitter::OEmbed;FI"Twitter::Place;F@I"Twitter::ProfileBanner;FI"Twitter::REST;F@sI"Twitter::REST::Client;F@@@@@@@@I"Twitter::REST::Request;FI".Twitter::REST::Request::MultipartWithFile;FI"Twitter::REST::Response;FI",Twitter::REST::Response::ParseErrorJson;F@vI"(Twitter::REST::Response::RaiseError;F@@@@@@@@@@I"Twitter::RateLimit;FI"Twitter::Relationship;FI"Twitter::Request;FI"Twitter::SavedSearch;FI"Twitter::SearchResults;FI"Twitter::Settings;FI"Twitter::Size;FI"Twitter::SourceUser;FI"Twitter::Streaming;FI"Twitter::Streaming::Client;FI"#Twitter::Streaming::Connection;FI"%Twitter::Streaming::DeletedTweet;FI"Twitter::Streaming::Event;FI"#Twitter::Streaming::FriendList;FI"&Twitter::Streaming::MessageParser;FI"!Twitter::Streaming::Response;FI"%Twitter::Streaming::StallWarning;FI"Twitter::Suggestion;FI"Twitter::TargetUser;FI"Twitter::Token;FI"Twitter::Trend;FI"Twitter::TrendResults;FI"Twitter::Tweet;FI"Twitter::User;F@ I"!Twitter::Utils::ClassMethods;FI"Twitter::Version;F \ No newline at end of file diff --git a/.gems/doc/twitter-5.11.0/ri/created.rid b/.gems/doc/twitter-5.11.0/ri/created.rid deleted file mode 100644 index 9557ce0..0000000 --- a/.gems/doc/twitter-5.11.0/ri/created.rid +++ /dev/null @@ -1,84 +0,0 @@ -Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/target_user.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/entities.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/client.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/trend_results.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/media_factory.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/size.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/profile.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/source_user.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/relationship.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/creatable.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/geo_factory.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/version.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/entity/symbol.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/entity/uri.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/entity/hashtag.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/entity/user_mention.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/tweet.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/geo/point.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/geo/polygon.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/factory.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/utils.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/trend.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/streaming/deleted_tweet.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/streaming/client.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/streaming/stall_warning.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/streaming/connection.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/streaming/message_parser.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/streaming/friend_list.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/streaming/response.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/streaming/event.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/basic_user.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/profile_banner.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/search_results.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/geo.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/cursor.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/request.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/arguments.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/saved_search.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rate_limit.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/metadata.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/direct_message.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/client.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/api.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/suggested_users.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/oauth.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/response/parse_error_json.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/response/parse_json.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/response/raise_error.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/search.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/undocumented.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/saved_searches.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/favorites.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/utils.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/request/multipart_with_file.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/places_and_geo.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/users.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/lists.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/help.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/spam_reporting.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/media.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/tweets.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/friends_and_followers.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/trends.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/timelines.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/rest/direct_messages.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/configuration.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/geo_results.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/suggestion.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/null_object.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/media/photo.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/identity.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/base.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/oembed.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/settings.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/language.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/list.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/token.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/entity.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/user.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/enumerable.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/place.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter/error.rb Wed, 03 Sep 2014 10:27:28 +0200 -lib/twitter.rb Wed, 03 Sep 2014 10:27:28 +0200 diff --git a/.gems/gems/addressable-2.3.6/CHANGELOG.md b/.gems/gems/addressable-2.3.6/CHANGELOG.md deleted file mode 100644 index 67fcb6f..0000000 --- a/.gems/gems/addressable-2.3.6/CHANGELOG.md +++ /dev/null @@ -1,170 +0,0 @@ -# Addressable 2.3.6 -- normalization drops empty query string -- better handling in template extract for missing values -- template modifier for `'?'` now treated as optional -- fixed issue where character class parameters were modified -- templates can now be tested for equality -- added `:sorted` option to normalization of query strings -- fixed issue with normalization of hosts given in `'example.com.'` form - -# Addressable 2.3.5 -- added Addressable::URI#empty? method -- Addressable::URI#hostname methods now strip square brackets from IPv6 hosts -- compatibility with Net::HTTP in Ruby 2.0.0 -- Addressable::URI#route_from should always give relative URIs - -# Addressable 2.3.4 -- fixed issue with encoding altering its inputs -- query string normalization now leaves ';' characters alone -- FakeFS is detected before attempting to load unicode tables -- additional testing to ensure frozen objects don't cause problems - -# Addressable 2.3.3 -- fixed issue with converting common primitives during template expansion -- fixed port encoding issue -- removed a few warnings -- normalize should now ignore %2B in query strings -- the IDNA logic should now be handled by libidn in Ruby 1.9 -- no template match should now result in nil instead of an empty MatchData -- added license information to gemspec - -# Addressable 2.3.2 -- added Addressable::URI#default_port method -- fixed issue with Marshalling Unicode data on Windows -- improved heuristic parsing to better handle IPv4 addresses - -# Addressable 2.3.1 -- fixed missing unicode data file - -# Addressable 2.3.0 -- updated Addressable::Template to use RFC 6570, level 4 -- fixed compatibility problems with some versions of Ruby -- moved unicode tables into a data file for performance reasons -- removing support for multiple query value notations - -# Addressable 2.2.8 -- fixed issues with dot segment removal code -- form encoding can now handle multiple values per key -- updated development environment - -# Addressable 2.2.7 -- fixed issues related to Addressable::URI#query_values= -- the Addressable::URI.parse method is now polymorphic - -# Addressable 2.2.6 -- changed the way ambiguous paths are handled -- fixed bug with frozen URIs -- https supported in heuristic parsing - -# Addressable 2.2.5 -- 'parsing' a pre-parsed URI object is now a dup operation -- introduced conditional support for libidn -- fixed normalization issue on ampersands in query strings -- added additional tests around handling of query strings - -# Addressable 2.2.4 -- added origin support from draft-ietf-websec-origin-00 -- resolved issue with attempting to navigate below root -- fixed bug with string splitting in query strings - -# Addressable 2.2.3 -- added :flat_array notation for query strings - -# Addressable 2.2.2 -- fixed issue with percent escaping of '+' character in query strings - -# Addressable 2.2.1 -- added support for application/x-www-form-urlencoded. - -# Addressable 2.2.0 -- added site methods -- improved documentation - -# Addressable 2.1.2 -- added HTTP request URI methods -- better handling of Windows file paths -- validation_deferred boolean replaced with defer_validation block -- normalization of percent-encoded paths should now be correct -- fixed issue with constructing URIs with relative paths -- fixed warnings - -# Addressable 2.1.1 -- more type checking changes -- fixed issue with unicode normalization -- added method to find template defaults -- symbolic keys are now allowed in template mappings -- numeric values and symbolic values are now allowed in template mappings - -# Addressable 2.1.0 -- refactored URI template support out into its own class -- removed extract method due to being useless and unreliable -- removed Addressable::URI.expand_template -- removed Addressable::URI#extract_mapping -- added partial template expansion -- fixed minor bugs in the parse and heuristic_parse methods -- fixed incompatibility with Ruby 1.9.1 -- fixed bottleneck in Addressable::URI#hash and Addressable::URI#to_s -- fixed unicode normalization exception -- updated query_values methods to better handle subscript notation -- worked around issue with freezing URIs -- improved specs - -# Addressable 2.0.2 -- fixed issue with URI template expansion -- fixed issue with percent escaping characters 0-15 - -# Addressable 2.0.1 -- fixed issue with query string assignment -- fixed issue with improperly encoded components - -# Addressable 2.0.0 -- the initialize method now takes an options hash as its only parameter -- added query_values method to URI class -- completely replaced IDNA implementation with pure Ruby -- renamed Addressable::ADDRESSABLE_VERSION to Addressable::VERSION -- completely reworked the Rakefile -- changed the behavior of the port method significantly -- Addressable::URI.encode_segment, Addressable::URI.unencode_segment renamed -- documentation is now in YARD format -- more rigorous type checking -- to_str method implemented, implicit conversion to Strings now allowed -- Addressable::URI#omit method added, Addressable::URI#merge method replaced -- updated URI Template code to match v 03 of the draft spec -- added a bunch of new specifications - -# Addressable 1.0.4 -- switched to using RSpec's pending system for specs that rely on IDN -- fixed issue with creating URIs with paths that are not prefixed with '/' - -# Addressable 1.0.3 -- implemented a hash method - -# Addressable 1.0.2 -- fixed minor bug with the extract_mapping method - -# Addressable 1.0.1 -- fixed minor bug with the extract_mapping method - -# Addressable 1.0.0 -- heuristic parse method added -- parsing is slightly more strict -- replaced to_h with to_hash -- fixed routing methods -- improved specifications -- improved heckle rake task -- no surviving heckle mutations - -# Addressable 0.1.2 -- improved normalization -- fixed bug in joining algorithm -- updated specifications - -# Addressable 0.1.1 -- updated documentation -- added URI Template variable extraction - -# Addressable 0.1.0 -- initial release -- implementation based on RFC 3986, 3987 -- support for IRIs via libidn -- support for the URI Template draft spec diff --git a/.gems/gems/addressable-2.3.6/Gemfile b/.gems/gems/addressable-2.3.6/Gemfile deleted file mode 100644 index 6258640..0000000 --- a/.gems/gems/addressable-2.3.6/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -source 'https://rubygems.org' - -group :development do - gem 'launchy' - gem 'yard' - gem 'redcarpet', :platform => :mri_19 - gem 'rubyforge' -end - -group :test, :development do - gem 'rake', '>= 0.7.3' - gem 'rspec', '>= 2.9.0' - gem 'coveralls', :require => false -end - -gem 'idn', :platform => :mri_18 -gem 'idn-ruby', :platform => :mri_19 - -platforms :mri_18 do - gem 'mime-types', '~> 1.25' -end - -platforms :rbx do - gem 'rubysl', '~> 2.0' - gem 'rubinius-coverage' -end - -gemspec diff --git a/.gems/gems/addressable-2.3.6/LICENSE.txt b/.gems/gems/addressable-2.3.6/LICENSE.txt deleted file mode 100644 index ef51da2..0000000 --- a/.gems/gems/addressable-2.3.6/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/.gems/gems/addressable-2.3.6/README.md b/.gems/gems/addressable-2.3.6/README.md deleted file mode 100644 index 9381a67..0000000 --- a/.gems/gems/addressable-2.3.6/README.md +++ /dev/null @@ -1,102 +0,0 @@ -# Addressable - -
-
Homepage
addressable.rubyforge.org
-
Author
Bob Aman
-
Copyright
Copyright © 2006-2013 Bob Aman
-
License
Apache 2.0
-
- -[![Gem Version](https://badge.fury.io/rb/addressable.png)][gem] -[![Build Status](https://secure.travis-ci.org/sporkmonger/addressable.png?branch=master)][travis] -[![Dependency Status](https://gemnasium.com/sporkmonger/addressable.png?travis)][gemnasium] -[![Coverage Status](https://coveralls.io/repos/sporkmonger/addressable/badge.png?branch=master)][coveralls] - -[gem]: https://rubygems.org/gems/addressable -[travis]: http://travis-ci.org/sporkmonger/addressable -[gemnasium]: https://gemnasium.com/sporkmonger/addressable -[coveralls]: https://coveralls.io/r/sporkmonger/addressable - -# Description - -Addressable is a replacement for the URI implementation that is part of -Ruby's standard library. It more closely conforms to RFC 3986, RFC 3987, and -RFC 6570 (level 4), providing support for IRIs and URI templates. - -# Reference - -- {Addressable::URI} -- {Addressable::Template} - -# Example usage - -```ruby -require "addressable/uri" - -uri = Addressable::URI.parse("http://example.com/path/to/resource/") -uri.scheme -#=> "http" -uri.host -#=> "example.com" -uri.path -#=> "/path/to/resource/" - -uri = Addressable::URI.parse("http://www.詹姆斯.com/") -uri.normalize -#=> # -``` - - -# URI Templates - -For more details, see [RFC 6570](https://www.rfc-editor.org/rfc/rfc6570.txt). - - -```ruby - -require "addressable/template" - -template = Addressable::Template.new("http://example.com/{?query*}/") -template.expand({ - "query" => { - 'foo' => 'bar', - 'color' => 'red' - } -}) -#=> # - -template = Addressable::Template.new("http://example.com/{?one,two,three}/") -template.partial_expand({"one" => "1", "three" => 3}).pattern -#=> "http://example.com/?one=1{&two}&three=3" - -template = Addressable::Template.new( - "http://{host}{/segments}/{?one,two,bogus}{#fragment}" -) -uri = Addressable::URI.parse( - "http://example.com/a/b/c/?one=1&two=2#foo" -) -template.extract(uri) -#=> -# { -# "host" => "example.com", -# "segments" => ["a", "b", "c"], -# "one" => "1", -# "two" => "2", -# "fragment" => "foo" -# } -``` - -# Install - -```console -$ sudo gem install addressable -``` - -You may optionally turn on native IDN support by installing libidn and the -idn gem: - -```console -$ sudo apt-get install idn # Debian/Ubuntu -$ sudo brew install libidn # OS X -$ sudo gem install idn-ruby -``` diff --git a/.gems/gems/addressable-2.3.6/Rakefile b/.gems/gems/addressable-2.3.6/Rakefile deleted file mode 100644 index 46d3e82..0000000 --- a/.gems/gems/addressable-2.3.6/Rakefile +++ /dev/null @@ -1,37 +0,0 @@ -require 'rubygems' -require 'rake' - -require File.join(File.dirname(__FILE__), 'lib', 'addressable', 'version') - -PKG_DISPLAY_NAME = 'Addressable' -PKG_NAME = PKG_DISPLAY_NAME.downcase -PKG_VERSION = Addressable::VERSION::STRING -PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}" - -RELEASE_NAME = "REL #{PKG_VERSION}" - -RUBY_FORGE_PROJECT = PKG_NAME -RUBY_FORGE_USER = "sporkmonger" -RUBY_FORGE_PATH = "/var/www/gforge-projects/#{RUBY_FORGE_PROJECT}" -RUBY_FORGE_URL = "http://#{RUBY_FORGE_PROJECT}.rubyforge.org/" - -PKG_SUMMARY = "URI Implementation" -PKG_DESCRIPTION = <<-TEXT -Addressable is a replacement for the URI implementation that is part of -Ruby's standard library. It more closely conforms to the relevant RFCs and -adds support for IRIs and URI templates. -TEXT - -PKG_FILES = FileList[ - "lib/**/*", "spec/**/*", "vendor/**/*", "data/**/*", - "tasks/**/*", "website/**/*", - "[A-Z]*", "Rakefile" -].exclude(/database\.yml/).exclude(/Gemfile\.lock/).exclude(/[_\.]git$/) - -RCOV_ENABLED = (RUBY_PLATFORM != "java" && RUBY_VERSION =~ /^1\.8/) -task :default => "spec" - -WINDOWS = (RUBY_PLATFORM =~ /mswin|win32|mingw|bccwin|cygwin/) rescue false -SUDO = WINDOWS ? '' : ('sudo' unless ENV['SUDOLESS']) - -Dir['tasks/**/*.rake'].each { |rake| load rake } diff --git a/.gems/gems/addressable-2.3.6/data/unicode.data b/.gems/gems/addressable-2.3.6/data/unicode.data deleted file mode 100644 index cdfc224..0000000 Binary files a/.gems/gems/addressable-2.3.6/data/unicode.data and /dev/null differ diff --git a/.gems/gems/addressable-2.3.6/lib/addressable/idna.rb b/.gems/gems/addressable-2.3.6/lib/addressable/idna.rb deleted file mode 100644 index 2ceb756..0000000 --- a/.gems/gems/addressable-2.3.6/lib/addressable/idna.rb +++ /dev/null @@ -1,25 +0,0 @@ -# encoding:utf-8 -#-- -# Copyright (C) 2006-2013 Bob Aman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#++ - - -begin - require "addressable/idna/native" -rescue LoadError - # libidn or the idn gem was not available, fall back on a pure-Ruby - # implementation... - require "addressable/idna/pure" -end diff --git a/.gems/gems/addressable-2.3.6/lib/addressable/idna/native.rb b/.gems/gems/addressable-2.3.6/lib/addressable/idna/native.rb deleted file mode 100644 index cbf810c..0000000 --- a/.gems/gems/addressable-2.3.6/lib/addressable/idna/native.rb +++ /dev/null @@ -1,43 +0,0 @@ -# encoding:utf-8 -#-- -# Copyright (C) 2006-2013 Bob Aman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#++ - - -require "idn" - -module Addressable - module IDNA - def self.punycode_encode(value) - IDN::Punycode.encode(value) - end - - def self.punycode_decode(value) - IDN::Punycode.decode(value) - end - - def self.unicode_normalize_kc(value) - IDN::Stringprep.nfkc_normalize(value) - end - - def self.to_ascii(value) - IDN::Idna.toASCII(value) - end - - def self.to_unicode(value) - IDN::Idna.toUnicode(value) - end - end -end diff --git a/.gems/gems/addressable-2.3.6/lib/addressable/idna/pure.rb b/.gems/gems/addressable-2.3.6/lib/addressable/idna/pure.rb deleted file mode 100644 index 5780199..0000000 --- a/.gems/gems/addressable-2.3.6/lib/addressable/idna/pure.rb +++ /dev/null @@ -1,669 +0,0 @@ -# encoding:utf-8 -#-- -# Copyright (C) 2006-2013 Bob Aman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#++ - - -module Addressable - module IDNA - # This module is loosely based on idn_actionmailer by Mick Staugaard, - # the unicode library by Yoshida Masato, and the punycode implementation - # by Kazuhiro Nishiyama. Most of the code was copied verbatim, but - # some reformatting was done, and some translation from C was done. - # - # Without their code to work from as a base, we'd all still be relying - # on the presence of libidn. Which nobody ever seems to have installed. - # - # Original sources: - # http://github.com/staugaard/idn_actionmailer - # http://www.yoshidam.net/Ruby.html#unicode - # http://rubyforge.org/frs/?group_id=2550 - - - UNICODE_TABLE = File.expand_path( - File.join(File.dirname(__FILE__), '../../..', 'data/unicode.data') - ) - - ACE_PREFIX = "xn--" - - UTF8_REGEX = /\A(?: - [\x09\x0A\x0D\x20-\x7E] # ASCII - | [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte - | \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs - | [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte - | \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates - | \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3 - | [\xF1-\xF3][\x80-\xBF]{3} # planes 4nil5 - | \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16 - )*\z/mnx - - UTF8_REGEX_MULTIBYTE = /(?: - [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte - | \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs - | [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte - | \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates - | \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3 - | [\xF1-\xF3][\x80-\xBF]{3} # planes 4nil5 - | \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16 - )/mnx - - # :startdoc: - - # Converts from a Unicode internationalized domain name to an ASCII - # domain name as described in RFC 3490. - def self.to_ascii(input) - input = input.dup - if input.respond_to?(:force_encoding) - input.force_encoding(Encoding::ASCII_8BIT) - end - if input =~ UTF8_REGEX && input =~ UTF8_REGEX_MULTIBYTE - parts = unicode_downcase(input).split('.') - parts.map! do |part| - if part.respond_to?(:force_encoding) - part.force_encoding(Encoding::ASCII_8BIT) - end - if part =~ UTF8_REGEX && part =~ UTF8_REGEX_MULTIBYTE - ACE_PREFIX + punycode_encode(unicode_normalize_kc(part)) - else - part - end - end - parts.join('.') - else - input - end - end - - # Converts from an ASCII domain name to a Unicode internationalized - # domain name as described in RFC 3490. - def self.to_unicode(input) - parts = input.split('.') - parts.map! do |part| - if part =~ /^#{ACE_PREFIX}/ - punycode_decode(part[/^#{ACE_PREFIX}(.+)/, 1]) - else - part - end - end - output = parts.join('.') - if output.respond_to?(:force_encoding) - output.force_encoding(Encoding::UTF_8) - end - output - end - - # Unicode normalization form KC. - def self.unicode_normalize_kc(input) - input = input.to_s unless input.is_a?(String) - unpacked = input.unpack("U*") - unpacked = - unicode_compose(unicode_sort_canonical(unicode_decompose(unpacked))) - return unpacked.pack("U*") - end - - ## - # Unicode aware downcase method. - # - # @api private - # @param [String] input - # The input string. - # @return [String] The downcased result. - def self.unicode_downcase(input) - unpacked = input.unpack("U*") - unpacked.map! { |codepoint| lookup_unicode_lowercase(codepoint) } - return unpacked.pack("U*") - end - (class <= HANGUL_LBASE && ch_one < HANGUL_LBASE + HANGUL_LCOUNT && - ch_two >= HANGUL_VBASE && ch_two < HANGUL_VBASE + HANGUL_VCOUNT - # Hangul L + V - return HANGUL_SBASE + ( - (ch_one - HANGUL_LBASE) * HANGUL_VCOUNT + (ch_two - HANGUL_VBASE) - ) * HANGUL_TCOUNT - elsif ch_one >= HANGUL_SBASE && - ch_one < HANGUL_SBASE + HANGUL_SCOUNT && - (ch_one - HANGUL_SBASE) % HANGUL_TCOUNT == 0 && - ch_two >= HANGUL_TBASE && ch_two < HANGUL_TBASE + HANGUL_TCOUNT - # Hangul LV + T - return ch_one + (ch_two - HANGUL_TBASE) - end - - p = [] - ucs4_to_utf8 = lambda do |ch| - # For some reason, rcov likes to drop BUS errors here. - if ch < 128 - p << ch - elsif ch < 2048 - p << (ch >> 6 | 192) - p << (ch & 63 | 128) - elsif ch < 0x10000 - p << (ch >> 12 | 224) - p << (ch >> 6 & 63 | 128) - p << (ch & 63 | 128) - elsif ch < 0x200000 - p << (ch >> 18 | 240) - p << (ch >> 12 & 63 | 128) - p << (ch >> 6 & 63 | 128) - p << (ch & 63 | 128) - elsif ch < 0x4000000 - p << (ch >> 24 | 248) - p << (ch >> 18 & 63 | 128) - p << (ch >> 12 & 63 | 128) - p << (ch >> 6 & 63 | 128) - p << (ch & 63 | 128) - elsif ch < 0x80000000 - p << (ch >> 30 | 252) - p << (ch >> 24 & 63 | 128) - p << (ch >> 18 & 63 | 128) - p << (ch >> 12 & 63 | 128) - p << (ch >> 6 & 63 | 128) - p << (ch & 63 | 128) - end - end - - ucs4_to_utf8.call(ch_one) - ucs4_to_utf8.call(ch_two) - - return lookup_unicode_composition(p) - end - (class < cc - unpacked[i] = last - unpacked[i-1] = ch - i -= 1 if i > 1 - else - i += 1 - end - end - return unpacked - end - (class <= HANGUL_SBASE && cp < HANGUL_SBASE + HANGUL_SCOUNT - l, v, t = unicode_decompose_hangul(cp) - unpacked_result << l - unpacked_result << v if v - unpacked_result << t if t - else - dc = lookup_unicode_compatibility(cp) - unless dc - unpacked_result << cp - else - unpacked_result.concat(unicode_decompose(dc.unpack("U*"))) - end - end - end - return unpacked_result - end - (class <= HANGUL_SCOUNT - l = codepoint - v = t = nil - return l, v, t - end - l = HANGUL_LBASE + sindex / HANGUL_NCOUNT - v = HANGUL_VBASE + (sindex % HANGUL_NCOUNT) / HANGUL_TCOUNT - t = HANGUL_TBASE + sindex % HANGUL_TCOUNT - if t == HANGUL_TBASE - t = nil - end - return l, v, t - end - (class <?" + - "@ABCDEFGHIJKLMNO" + - "PQRSTUVWXYZ[\\]^_" + - "`abcdefghijklmno" + - "pqrstuvwxyz{|}~\n" - - # Input is invalid. - class PunycodeBadInput < StandardError; end - # Output would exceed the space provided. - class PunycodeBigOutput < StandardError; end - # Input needs wider integers to process. - class PunycodeOverflow < StandardError; end - - def self.punycode_encode(unicode) - input = unicode.unpack("U*") - output = [0] * (ACE_MAX_LENGTH + 1) - input_length = input.size - output_length = [ACE_MAX_LENGTH] - - # Initialize the state - n = PUNYCODE_INITIAL_N - delta = out = 0 - max_out = output_length[0] - bias = PUNYCODE_INITIAL_BIAS - - # Handle the basic code points: - input_length.times do |j| - if punycode_basic?(input[j]) - if max_out - out < 2 - raise PunycodeBigOutput, - "Output would exceed the space provided." - end - output[out] = input[j] - out += 1 - end - end - - h = b = out - - # h is the number of code points that have been handled, b is the - # number of basic code points, and out is the number of characters - # that have been output. - - if b > 0 - output[out] = PUNYCODE_DELIMITER - out += 1 - end - - # Main encoding loop: - - while h < input_length - # All non-basic code points < n have been - # handled already. Find the next larger one: - - m = PUNYCODE_MAXINT - input_length.times do |j| - m = input[j] if (n...m) === input[j] - end - - # Increase delta enough to advance the decoder's - # state to , but guard against overflow: - - if m - n > (PUNYCODE_MAXINT - delta) / (h + 1) - raise PunycodeOverflow, "Input needs wider integers to process." - end - delta += (m - n) * (h + 1) - n = m - - input_length.times do |j| - # Punycode does not need to check whether input[j] is basic: - if input[j] < n - delta += 1 - if delta == 0 - raise PunycodeOverflow, - "Input needs wider integers to process." - end - end - - if input[j] == n - # Represent delta as a generalized variable-length integer: - - q = delta; k = PUNYCODE_BASE - while true - if out >= max_out - raise PunycodeBigOutput, - "Output would exceed the space provided." - end - t = ( - if k <= bias - PUNYCODE_TMIN - elsif k >= bias + PUNYCODE_TMAX - PUNYCODE_TMAX - else - k - bias - end - ) - break if q < t - output[out] = - punycode_encode_digit(t + (q - t) % (PUNYCODE_BASE - t)) - out += 1 - q = (q - t) / (PUNYCODE_BASE - t) - k += PUNYCODE_BASE - end - - output[out] = punycode_encode_digit(q) - out += 1 - bias = punycode_adapt(delta, h + 1, h == b) - delta = 0 - h += 1 - end - end - - delta += 1 - n += 1 - end - - output_length[0] = out - - outlen = out - outlen.times do |j| - c = output[j] - unless c >= 0 && c <= 127 - raise Exception, "Invalid output char." - end - unless PUNYCODE_PRINT_ASCII[c] - raise PunycodeBadInput, "Input is invalid." - end - end - - output[0..outlen].map { |x| x.chr }.join("").sub(/\0+\z/, "") - end - (class <= 0 && c <= 127 - raise PunycodeBadInput, "Input is invalid." - end - input.push(c) - end - - input_length = input.length - output_length = [UNICODE_MAX_LENGTH] - - # Initialize the state - n = PUNYCODE_INITIAL_N - - out = i = 0 - max_out = output_length[0] - bias = PUNYCODE_INITIAL_BIAS - - # Handle the basic code points: Let b be the number of input code - # points before the last delimiter, or 0 if there is none, then - # copy the first b code points to the output. - - b = 0 - input_length.times do |j| - b = j if punycode_delimiter?(input[j]) - end - if b > max_out - raise PunycodeBigOutput, "Output would exceed the space provided." - end - - b.times do |j| - unless punycode_basic?(input[j]) - raise PunycodeBadInput, "Input is invalid." - end - output[out] = input[j] - out+=1 - end - - # Main decoding loop: Start just after the last delimiter if any - # basic code points were copied; start at the beginning otherwise. - - in_ = b > 0 ? b + 1 : 0 - while in_ < input_length - - # in_ is the index of the next character to be consumed, and - # out is the number of code points in the output array. - - # Decode a generalized variable-length integer into delta, - # which gets added to i. The overflow checking is easier - # if we increase i as we go, then subtract off its starting - # value at the end to obtain delta. - - oldi = i; w = 1; k = PUNYCODE_BASE - while true - if in_ >= input_length - raise PunycodeBadInput, "Input is invalid." - end - digit = punycode_decode_digit(input[in_]) - in_+=1 - if digit >= PUNYCODE_BASE - raise PunycodeBadInput, "Input is invalid." - end - if digit > (PUNYCODE_MAXINT - i) / w - raise PunycodeOverflow, "Input needs wider integers to process." - end - i += digit * w - t = ( - if k <= bias - PUNYCODE_TMIN - elsif k >= bias + PUNYCODE_TMAX - PUNYCODE_TMAX - else - k - bias - end - ) - break if digit < t - if w > PUNYCODE_MAXINT / (PUNYCODE_BASE - t) - raise PunycodeOverflow, "Input needs wider integers to process." - end - w *= PUNYCODE_BASE - t - k += PUNYCODE_BASE - end - - bias = punycode_adapt(i - oldi, out + 1, oldi == 0) - - # I was supposed to wrap around from out + 1 to 0, - # incrementing n each time, so we'll fix that now: - - if i / (out + 1) > PUNYCODE_MAXINT - n - raise PunycodeOverflow, "Input needs wider integers to process." - end - n += i / (out + 1) - i %= out + 1 - - # Insert n at position i of the output: - - # not needed for Punycode: - # raise PUNYCODE_INVALID_INPUT if decode_digit(n) <= base - if out >= max_out - raise PunycodeBigOutput, "Output would exceed the space provided." - end - - #memmove(output + i + 1, output + i, (out - i) * sizeof *output) - output[i + 1, out - i] = output[i, out - i] - output[i] = n - i += 1 - - out += 1 - end - - output_length[0] = out - - output.pack("U*") - end - (class <> 1 - # delta >> 1 is a faster way of doing delta / 2 - delta += delta / numpoints - difference = PUNYCODE_BASE - PUNYCODE_TMIN - - k = 0 - while delta > (difference * PUNYCODE_TMAX) / 2 - delta /= difference - k += PUNYCODE_BASE - end - - k + (difference + 1) * delta / (delta + PUNYCODE_SKEW) - end - (class < '?', - '/' => '/', - '#' => '#', - '.' => '.', - ';' => ';', - '&' => '&' - } - JOINERS = { - '?' => '&', - '.' => '.', - ';' => ';', - '&' => '&', - '/' => '/' - } - - ## - # Raised if an invalid template value is supplied. - class InvalidTemplateValueError < StandardError - end - - ## - # Raised if an invalid template operator is used in a pattern. - class InvalidTemplateOperatorError < StandardError - end - - ## - # Raised if an invalid template operator is used in a pattern. - class TemplateOperatorAbortedError < StandardError - end - - ## - # This class represents the data that is extracted when a Template - # is matched against a URI. - class MatchData - ## - # Creates a new MatchData object. - # MatchData objects should never be instantiated directly. - # - # @param [Addressable::URI] uri - # The URI that the template was matched against. - def initialize(uri, template, mapping) - @uri = uri.dup.freeze - @template = template - @mapping = mapping.dup.freeze - end - - ## - # @return [Addressable::URI] - # The URI that the Template was matched against. - attr_reader :uri - - ## - # @return [Addressable::Template] - # The Template used for the match. - attr_reader :template - - ## - # @return [Hash] - # The mapping that resulted from the match. - # Note that this mapping does not include keys or values for - # variables that appear in the Template, but are not present - # in the URI. - attr_reader :mapping - - ## - # @return [Array] - # The list of variables that were present in the Template. - # Note that this list will include variables which do not appear - # in the mapping because they were not present in URI. - def variables - self.template.variables - end - alias_method :keys, :variables - alias_method :names, :variables - - ## - # @return [Array] - # The list of values that were captured by the Template. - # Note that this list will include nils for any variables which - # were in the Template, but did not appear in the URI. - def values - @values ||= self.variables.inject([]) do |accu, key| - accu << self.mapping[key] - accu - end - end - alias_method :captures, :values - - ## - # Accesses captured values by name or by index. - # - # @param [String, Symbol, Fixnum] key - # Capture index or name. Note that when accessing by with index - # of 0, the full URI will be returned. The intention is to mimic - # the ::MatchData#[] behavior. - # - # @param [#to_int, nil] len - # If provided, an array of values will be returend with the given - # parameter used as length. - # - # @return [Array, String, nil] - # The captured value corresponding to the index or name. If the - # value was not provided or the key is unknown, nil will be - # returned. - # - # If the second parameter is provided, an array of that length will - # be returned instead. - def [](key, len = nil) - if len - to_a[key, len] - elsif String === key or Symbol === key - mapping[key.to_s] - else - to_a[key] - end - end - - ## - # @return [Array] - # Array with the matched URI as first element followed by the captured - # values. - def to_a - [to_s, *values] - end - - ## - # @return [String] - # The matched URI as String. - def to_s - uri.to_s - end - alias_method :string, :to_s - - # Returns multiple captured values at once. - # - # @param [String, Symbol, Fixnum] *indexes - # Indices of the captures to be returned - # - # @return [Array] - # Values corresponding to given indices. - # - # @see Addressable::Template::MatchData#[] - def values_at(*indexes) - indexes.map { |i| self[i] } - end - - ## - # Returns a String representation of the MatchData's state. - # - # @return [String] The MatchData's state, as a String. - def inspect - sprintf("#<%s:%#0x RESULT:%s>", - self.class.to_s, self.object_id, self.mapping.inspect) - end - - ## - # Dummy method for code expecting a ::MatchData instance - # - # @return [String] An empty string. - def pre_match - "" - end - alias_method :post_match, :pre_match - end - - ## - # Creates a new Addressable::Template object. - # - # @param [#to_str] pattern The URI Template pattern. - # - # @return [Addressable::Template] The initialized Template object. - def initialize(pattern) - if !pattern.respond_to?(:to_str) - raise TypeError, "Can't convert #{pattern.class} into String." - end - @pattern = pattern.to_str.freeze - end - - ## - # @return [String] The Template object's pattern. - attr_reader :pattern - - ## - # Returns a String representation of the Template object's state. - # - # @return [String] The Template object's state, as a String. - def inspect - sprintf("#<%s:%#0x PATTERN:%s>", - self.class.to_s, self.object_id, self.pattern) - end - - ## - # Returns true if the Template objects are equal. This method - # does NOT normalize either Template before doing the comparison. - # - # @param [Object] template The Template to compare. - # - # @return [TrueClass, FalseClass] - # true if the Templates are equivalent, false - # otherwise. - def ==(template) - return false unless template.kind_of?(Template) - return self.pattern == template.pattern - end - - ## - # Addressable::Template makes no distinction between `==` and `eql?`. - # - # @see #== - alias_method :eql?, :== - - ## - # Extracts a mapping from the URI using a URI Template pattern. - # - # @param [Addressable::URI, #to_str] uri - # The URI to extract from. - # - # @param [#restore, #match] processor - # A template processor object may optionally be supplied. - # - # The object should respond to either the restore or - # match messages or both. The restore method should - # take two parameters: `[String] name` and `[String] value`. - # The restore method should reverse any transformations that - # have been performed on the value to ensure a valid URI. - # The match method should take a single - # parameter: `[String] name`. The match method should return - # a String containing a regular expression capture group for - # matching on that particular variable. The default value is `".*?"`. - # The match method has no effect on multivariate operator - # expansions. - # - # @return [Hash, NilClass] - # The Hash mapping that was extracted from the URI, or - # nil if the URI didn't match the template. - # - # @example - # class ExampleProcessor - # def self.restore(name, value) - # return value.gsub(/\+/, " ") if name == "query" - # return value - # end - # - # def self.match(name) - # return ".*?" if name == "first" - # return ".*" - # end - # end - # - # uri = Addressable::URI.parse( - # "http://example.com/search/an+example+search+query/" - # ) - # Addressable::Template.new( - # "http://example.com/search/{query}/" - # ).extract(uri, ExampleProcessor) - # #=> {"query" => "an example search query"} - # - # uri = Addressable::URI.parse("http://example.com/a/b/c/") - # Addressable::Template.new( - # "http://example.com/{first}/{second}/" - # ).extract(uri, ExampleProcessor) - # #=> {"first" => "a", "second" => "b/c"} - # - # uri = Addressable::URI.parse("http://example.com/a/b/c/") - # Addressable::Template.new( - # "http://example.com/{first}/{-list|/|second}/" - # ).extract(uri) - # #=> {"first" => "a", "second" => ["b", "c"]} - def extract(uri, processor=nil) - match_data = self.match(uri, processor) - return (match_data ? match_data.mapping : nil) - end - - ## - # Extracts match data from the URI using a URI Template pattern. - # - # @param [Addressable::URI, #to_str] uri - # The URI to extract from. - # - # @param [#restore, #match] processor - # A template processor object may optionally be supplied. - # - # The object should respond to either the restore or - # match messages or both. The restore method should - # take two parameters: `[String] name` and `[String] value`. - # The restore method should reverse any transformations that - # have been performed on the value to ensure a valid URI. - # The match method should take a single - # parameter: `[String] name`. The match method should return - # a String containing a regular expression capture group for - # matching on that particular variable. The default value is `".*?"`. - # The match method has no effect on multivariate operator - # expansions. - # - # @return [Hash, NilClass] - # The Hash mapping that was extracted from the URI, or - # nil if the URI didn't match the template. - # - # @example - # class ExampleProcessor - # def self.restore(name, value) - # return value.gsub(/\+/, " ") if name == "query" - # return value - # end - # - # def self.match(name) - # return ".*?" if name == "first" - # return ".*" - # end - # end - # - # uri = Addressable::URI.parse( - # "http://example.com/search/an+example+search+query/" - # ) - # match = Addressable::Template.new( - # "http://example.com/search/{query}/" - # ).match(uri, ExampleProcessor) - # match.variables - # #=> ["query"] - # match.captures - # #=> ["an example search query"] - # - # uri = Addressable::URI.parse("http://example.com/a/b/c/") - # match = Addressable::Template.new( - # "http://example.com/{first}/{+second}/" - # ).match(uri, ExampleProcessor) - # match.variables - # #=> ["first", "second"] - # match.captures - # #=> ["a", "b/c"] - # - # uri = Addressable::URI.parse("http://example.com/a/b/c/") - # match = Addressable::Template.new( - # "http://example.com/{first}{/second*}/" - # ).match(uri) - # match.variables - # #=> ["first", "second"] - # match.captures - # #=> ["a", ["b", "c"]] - def match(uri, processor=nil) - uri = Addressable::URI.parse(uri) - mapping = {} - - # First, we need to process the pattern, and extract the values. - expansions, expansion_regexp = - parse_template_pattern(pattern, processor) - - return nil unless uri.to_str.match(expansion_regexp) - unparsed_values = uri.to_str.scan(expansion_regexp).flatten - - if uri.to_str == pattern - return Addressable::Template::MatchData.new(uri, self, mapping) - elsif expansions.size > 0 - index = 0 - expansions.each do |expansion| - _, operator, varlist = *expansion.match(EXPRESSION) - varlist.split(',').each do |varspec| - _, name, modifier = *varspec.match(VARSPEC) - mapping[name] ||= nil - case operator - when nil, '+', '#', '/', '.' - unparsed_value = unparsed_values[index] - name = varspec[VARSPEC, 1] - value = unparsed_value - value = value.split(JOINERS[operator]) if value && modifier == '*' - when ';', '?', '&' - if modifier == '*' - if unparsed_values[index] - value = unparsed_values[index].split(JOINERS[operator]) - value = value.inject({}) do |acc, v| - key, val = v.split('=') - val = "" if val.nil? - acc[key] = val - acc - end - end - else - if (unparsed_values[index]) - name, value = unparsed_values[index].split('=') - value = "" if value.nil? - end - end - end - if processor != nil && processor.respond_to?(:restore) - value = processor.restore(name, value) - end - if processor == nil - if value.is_a?(Hash) - value = value.inject({}){|acc, (k, v)| - acc[Addressable::URI.unencode_component(k)] = - Addressable::URI.unencode_component(v) - acc - } - elsif value.is_a?(Array) - value = value.map{|v| Addressable::URI.unencode_component(v) } - else - value = Addressable::URI.unencode_component(value) - end - end - if !mapping.has_key?(name) || mapping[name].nil? - # Doesn't exist, set to value (even if value is nil) - mapping[name] = value - end - index = index + 1 - end - end - return Addressable::Template::MatchData.new(uri, self, mapping) - else - return nil - end - end - - ## - # Expands a URI template into another URI template. - # - # @param [Hash] mapping The mapping that corresponds to the pattern. - # @param [#validate, #transform] processor - # An optional processor object may be supplied. - # - # The object should respond to either the validate or - # transform messages or both. Both the validate and - # transform methods should take two parameters: name and - # value. The validate method should return true - # or false; true if the value of the variable is valid, - # false otherwise. An InvalidTemplateValueError - # exception will be raised if the value is invalid. The transform - # method should return the transformed variable value as a String. - # If a transform method is used, the value will not be percent - # encoded automatically. Unicode normalization will be performed both - # before and after sending the value to the transform method. - # - # @return [Addressable::Template] The partially expanded URI template. - # - # @example - # Addressable::Template.new( - # "http://example.com/{one}/{two}/" - # ).partial_expand({"one" => "1"}).pattern - # #=> "http://example.com/1/{two}/" - # - # Addressable::Template.new( - # "http://example.com/{?one,two}/" - # ).partial_expand({"one" => "1"}).pattern - # #=> "http://example.com/?one=1{&two}/" - # - # Addressable::Template.new( - # "http://example.com/{?one,two,three}/" - # ).partial_expand({"one" => "1", "three" => 3}).pattern - # #=> "http://example.com/?one=1{&two}&three=3" - def partial_expand(mapping, processor=nil) - result = self.pattern.dup - mapping = normalize_keys(mapping) - result.gsub!( EXPRESSION ) do |capture| - transform_partial_capture(mapping, capture, processor) - end - return Addressable::Template.new(result) - end - - ## - # Expands a URI template into a full URI. - # - # @param [Hash] mapping The mapping that corresponds to the pattern. - # @param [#validate, #transform] processor - # An optional processor object may be supplied. - # - # The object should respond to either the validate or - # transform messages or both. Both the validate and - # transform methods should take two parameters: name and - # value. The validate method should return true - # or false; true if the value of the variable is valid, - # false otherwise. An InvalidTemplateValueError - # exception will be raised if the value is invalid. The transform - # method should return the transformed variable value as a String. - # If a transform method is used, the value will not be percent - # encoded automatically. Unicode normalization will be performed both - # before and after sending the value to the transform method. - # - # @return [Addressable::URI] The expanded URI template. - # - # @example - # class ExampleProcessor - # def self.validate(name, value) - # return !!(value =~ /^[\w ]+$/) if name == "query" - # return true - # end - # - # def self.transform(name, value) - # return value.gsub(/ /, "+") if name == "query" - # return value - # end - # end - # - # Addressable::Template.new( - # "http://example.com/search/{query}/" - # ).expand( - # {"query" => "an example search query"}, - # ExampleProcessor - # ).to_str - # #=> "http://example.com/search/an+example+search+query/" - # - # Addressable::Template.new( - # "http://example.com/search/{query}/" - # ).expand( - # {"query" => "an example search query"} - # ).to_str - # #=> "http://example.com/search/an%20example%20search%20query/" - # - # Addressable::Template.new( - # "http://example.com/search/{query}/" - # ).expand( - # {"query" => "bogus!"}, - # ExampleProcessor - # ).to_str - # #=> Addressable::Template::InvalidTemplateValueError - def expand(mapping, processor=nil) - result = self.pattern.dup - mapping = normalize_keys(mapping) - result.gsub!( EXPRESSION ) do |capture| - transform_capture(mapping, capture, processor) - end - return Addressable::URI.parse(result) - end - - ## - # Returns an Array of variables used within the template pattern. - # The variables are listed in the Array in the order they appear within - # the pattern. Multiple occurrences of a variable within a pattern are - # not represented in this Array. - # - # @return [Array] The variables present in the template's pattern. - def variables - @variables ||= ordered_variable_defaults.map { |var, val| var }.uniq - end - alias_method :keys, :variables - - ## - # Returns a mapping of variables to their default values specified - # in the template. Variables without defaults are not returned. - # - # @return [Hash] Mapping of template variables to their defaults - def variable_defaults - @variable_defaults ||= - Hash[*ordered_variable_defaults.reject { |k, v| v.nil? }.flatten] - end - - private - def ordered_variable_defaults - @ordered_variable_defaults ||= ( - expansions, _ = parse_template_pattern(pattern) - expansions.map do |capture| - _, _, varlist = *capture.match(EXPRESSION) - varlist.split(',').map do |varspec| - varspec[VARSPEC, 1] - end - end.flatten - ) - end - - - ## - # Loops through each capture and expands any values available in mapping - # - # @param [Hash] mapping - # Set of keys to expand - # @param [String] capture - # The expression to expand - # @param [#validate, #transform] processor - # An optional processor object may be supplied. - # - # The object should respond to either the validate or - # transform messages or both. Both the validate and - # transform methods should take two parameters: name and - # value. The validate method should return true - # or false; true if the value of the variable is valid, - # false otherwise. An InvalidTemplateValueError exception - # will be raised if the value is invalid. The transform method - # should return the transformed variable value as a String. If a - # transform method is used, the value will not be percent encoded - # automatically. Unicode normalization will be performed both before and - # after sending the value to the transform method. - # - # @return [String] The expanded expression - def transform_partial_capture(mapping, capture, processor = nil) - _, operator, varlist = *capture.match(EXPRESSION) - is_first = true - varlist.split(',').inject('') do |acc, varspec| - _, name, _ = *varspec.match(VARSPEC) - value = mapping[name] - if value - operator = '&' if !is_first && operator == '?' - acc << transform_capture(mapping, "{#{operator}#{varspec}}", processor) - else - operator = '&' if !is_first && operator == '?' - acc << "{#{operator}#{varspec}}" - end - is_first = false - acc - end - end - - ## - # Transforms a mapped value so that values can be substituted into the - # template. - # - # @param [Hash] mapping The mapping to replace captures - # @param [String] capture - # The expression to replace - # @param [#validate, #transform] processor - # An optional processor object may be supplied. - # - # The object should respond to either the validate or - # transform messages or both. Both the validate and - # transform methods should take two parameters: name and - # value. The validate method should return true - # or false; true if the value of the variable is valid, - # false otherwise. An InvalidTemplateValueError exception - # will be raised if the value is invalid. The transform method - # should return the transformed variable value as a String. If a - # transform method is used, the value will not be percent encoded - # automatically. Unicode normalization will be performed both before and - # after sending the value to the transform method. - # - # @return [String] The expanded expression - def transform_capture(mapping, capture, processor=nil) - _, operator, varlist = *capture.match(EXPRESSION) - return_value = varlist.split(',').inject([]) do |acc, varspec| - _, name, modifier = *varspec.match(VARSPEC) - value = mapping[name] - unless value == nil || value == {} - allow_reserved = %w(+ #).include?(operator) - # Common primitives where the .to_s output is well-defined - if Numeric === value || Symbol === value || - value == true || value == false - value = value.to_s - end - length = modifier.gsub(':', '').to_i if modifier =~ /^:\d+/ - - unless (Hash === value) || - value.respond_to?(:to_ary) || value.respond_to?(:to_str) - raise TypeError, - "Can't convert #{value.class} into String or Array." - end - - value = normalize_value(value) - - if processor == nil || !processor.respond_to?(:transform) - # Handle percent escaping - if allow_reserved - encode_map = - Addressable::URI::CharacterClasses::RESERVED + - Addressable::URI::CharacterClasses::UNRESERVED - else - encode_map = Addressable::URI::CharacterClasses::UNRESERVED - end - if value.kind_of?(Array) - transformed_value = value.map do |val| - if length - Addressable::URI.encode_component(val[0...length], encode_map) - else - Addressable::URI.encode_component(val, encode_map) - end - end - unless modifier == "*" - transformed_value = transformed_value.join(',') - end - elsif value.kind_of?(Hash) - transformed_value = value.map do |key, val| - if modifier == "*" - "#{ - Addressable::URI.encode_component( key, encode_map) - }=#{ - Addressable::URI.encode_component( val, encode_map) - }" - else - "#{ - Addressable::URI.encode_component( key, encode_map) - },#{ - Addressable::URI.encode_component( val, encode_map) - }" - end - end - unless modifier == "*" - transformed_value = transformed_value.join(',') - end - else - if length - transformed_value = Addressable::URI.encode_component( - value[0...length], encode_map) - else - transformed_value = Addressable::URI.encode_component( - value, encode_map) - end - end - end - - # Process, if we've got a processor - if processor != nil - if processor.respond_to?(:validate) - if !processor.validate(name, value) - display_value = value.kind_of?(Array) ? value.inspect : value - raise InvalidTemplateValueError, - "#{name}=#{display_value} is an invalid template value." - end - end - if processor.respond_to?(:transform) - transformed_value = processor.transform(name, value) - transformed_value = normalize_value(transformed_value) - end - end - acc << [name, transformed_value] - end - acc - end - return "" if return_value.empty? - join_values(operator, return_value) - end - - ## - # Takes a set of values, and joins them together based on the - # operator. - # - # @param [String, Nil] operator One of the operators from the set - # (?,&,+,#,;,/,.), or nil if there wasn't one. - # @param [Array] return_value - # The set of return values (as [variable_name, value] tuples) that will - # be joined together. - # - # @return [String] The transformed mapped value - def join_values(operator, return_value) - leader = LEADERS.fetch(operator, '') - joiner = JOINERS.fetch(operator, ',') - case operator - when '&', '?' - leader + return_value.map{|k,v| - if v.is_a?(Array) && v.first =~ /=/ - v.join(joiner) - elsif v.is_a?(Array) - v.map{|inner_value| "#{k}=#{inner_value}"}.join(joiner) - else - "#{k}=#{v}" - end - }.join(joiner) - when ';' - return_value.map{|k,v| - if v.is_a?(Array) && v.first =~ /=/ - ';' + v.join(";") - elsif v.is_a?(Array) - ';' + v.map{|inner_value| "#{k}=#{inner_value}"}.join(";") - else - v && v != '' ? ";#{k}=#{v}" : ";#{k}" - end - }.join - else - leader + return_value.map{|k,v| v}.join(joiner) - end - end - - ## - # Takes a set of values, and joins them together based on the - # operator. - # - # @param [Hash, Array, String] value - # Normalizes keys and values with IDNA#unicode_normalize_kc - # - # @return [Hash, Array, String] The normalized values - def normalize_value(value) - unless value.is_a?(Hash) - value = value.respond_to?(:to_ary) ? value.to_ary : value.to_str - end - - # Handle unicode normalization - if value.kind_of?(Array) - value.map! { |val| Addressable::IDNA.unicode_normalize_kc(val) } - elsif value.kind_of?(Hash) - value = value.inject({}) { |acc, (k, v)| - acc[Addressable::IDNA.unicode_normalize_kc(k)] = - Addressable::IDNA.unicode_normalize_kc(v) - acc - } - else - value = Addressable::IDNA.unicode_normalize_kc(value) - end - value - end - - ## - # Generates a hash with string keys - # - # @param [Hash] mapping A mapping hash to normalize - # - # @return [Hash] - # A hash with stringified keys - def normalize_keys(mapping) - return mapping.inject({}) do |accu, pair| - name, value = pair - if Symbol === name - name = name.to_s - elsif name.respond_to?(:to_str) - name = name.to_str - else - raise TypeError, - "Can't convert #{name.class} into String." - end - accu[name] = value - accu - end - end - - ## - # Generates the Regexp that parses a template pattern. - # - # @param [String] pattern The URI template pattern. - # @param [#match] processor The template processor to use. - # - # @return [Regexp] - # A regular expression which may be used to parse a template pattern. - def parse_template_pattern(pattern, processor=nil) - # Escape the pattern. The two gsubs restore the escaped curly braces - # back to their original form. Basically, escape everything that isn't - # within an expansion. - escaped_pattern = Regexp.escape( - pattern - ).gsub(/\\\{(.*?)\\\}/) do |escaped| - escaped.gsub(/\\(.)/, "\\1") - end - - expansions = [] - - # Create a regular expression that captures the values of the - # variables in the URI. - regexp_string = escaped_pattern.gsub( EXPRESSION ) do |expansion| - - expansions << expansion - _, operator, varlist = *expansion.match(EXPRESSION) - leader = Regexp.escape(LEADERS.fetch(operator, '')) - joiner = Regexp.escape(JOINERS.fetch(operator, ',')) - combined = varlist.split(',').map do |varspec| - _, name, modifier = *varspec.match(VARSPEC) - - result = processor && processor.respond_to?(:match) ? processor.match(name) : nil - if result - "(#{ result })" - else - group = case operator - when '+' - "#{ RESERVED }*?" - when '#' - "#{ RESERVED }*?" - when '/' - "#{ UNRESERVED }*?" - when '.' - "#{ UNRESERVED.gsub('\.', '') }*?" - when ';' - "#{ UNRESERVED }*=?#{ UNRESERVED }*?" - when '?' - "#{ UNRESERVED }*=#{ UNRESERVED }*?" - when '&' - "#{ UNRESERVED }*=#{ UNRESERVED }*?" - else - "#{ UNRESERVED }*?" - end - if modifier == '*' - "(#{group}(?:#{joiner}?#{group})*)?" - else - "(#{group})?" - end - end - end.join("#{joiner}?") - "(?:|#{leader}#{combined})" - end - - # Ensure that the regular expression matches the whole URI. - regexp_string = "^#{regexp_string}$" - return expansions, Regexp.new(regexp_string) - end - - end -end diff --git a/.gems/gems/addressable-2.3.6/lib/addressable/uri.rb b/.gems/gems/addressable-2.3.6/lib/addressable/uri.rb deleted file mode 100644 index e7ddc9f..0000000 --- a/.gems/gems/addressable-2.3.6/lib/addressable/uri.rb +++ /dev/null @@ -1,2351 +0,0 @@ -# encoding:utf-8 -#-- -# Copyright (C) 2006-2013 Bob Aman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#++ - - -require "addressable/version" -require "addressable/idna" - -## -# Addressable is a library for processing links and URIs. -module Addressable - ## - # This is an implementation of a URI parser based on - # RFC 3986, - # RFC 3987. - class URI - ## - # Raised if something other than a uri is supplied. - class InvalidURIError < StandardError - end - - ## - # Container for the character classes specified in - # RFC 3986. - module CharacterClasses - ALPHA = "a-zA-Z" - DIGIT = "0-9" - GEN_DELIMS = "\\:\\/\\?\\#\\[\\]\\@" - SUB_DELIMS = "\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=" - RESERVED = GEN_DELIMS + SUB_DELIMS - UNRESERVED = ALPHA + DIGIT + "\\-\\.\\_\\~" - PCHAR = UNRESERVED + SUB_DELIMS + "\\:\\@" - SCHEME = ALPHA + DIGIT + "\\-\\+\\." - AUTHORITY = PCHAR - PATH = PCHAR + "\\/" - QUERY = PCHAR + "\\/\\?" - FRAGMENT = PCHAR + "\\/\\?" - end - - SLASH = '/' - EMPTY_STR = '' - - URIREGEX = /^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/ - - PORT_MAPPING = { - "http" => 80, - "https" => 443, - "ftp" => 21, - "tftp" => 69, - "sftp" => 22, - "ssh" => 22, - "svn+ssh" => 22, - "telnet" => 23, - "nntp" => 119, - "gopher" => 70, - "wais" => 210, - "ldap" => 389, - "prospero" => 1525 - } - - ## - # Returns a URI object based on the parsed string. - # - # @param [String, Addressable::URI, #to_str] uri - # The URI string to parse. - # No parsing is performed if the object is already an - # Addressable::URI. - # - # @return [Addressable::URI] The parsed URI. - def self.parse(uri) - # If we were given nil, return nil. - return nil unless uri - # If a URI object is passed, just return itself. - return uri.dup if uri.kind_of?(self) - - # If a URI object of the Ruby standard library variety is passed, - # convert it to a string, then parse the string. - # We do the check this way because we don't want to accidentally - # cause a missing constant exception to be thrown. - if uri.class.name =~ /^URI\b/ - uri = uri.to_s - end - - # Otherwise, convert to a String - begin - uri = uri.to_str - rescue TypeError, NoMethodError - raise TypeError, "Can't convert #{uri.class} into String." - end if not uri.is_a? String - - # This Regexp supplied as an example in RFC 3986, and it works great. - scan = uri.scan(URIREGEX) - fragments = scan[0] - scheme = fragments[1] - authority = fragments[3] - path = fragments[4] - query = fragments[6] - fragment = fragments[8] - user = nil - password = nil - host = nil - port = nil - if authority != nil - # The Regexp above doesn't split apart the authority. - userinfo = authority[/^([^\[\]]*)@/, 1] - if userinfo != nil - user = userinfo.strip[/^([^:]*):?/, 1] - password = userinfo.strip[/:(.*)$/, 1] - end - host = authority.gsub( - /^([^\[\]]*)@/, EMPTY_STR - ).gsub( - /:([^:@\[\]]*?)$/, EMPTY_STR - ) - port = authority[/:([^:@\[\]]*?)$/, 1] - end - if port == EMPTY_STR - port = nil - end - - return new( - :scheme => scheme, - :user => user, - :password => password, - :host => host, - :port => port, - :path => path, - :query => query, - :fragment => fragment - ) - end - - ## - # Converts an input to a URI. The input does not have to be a valid - # URI — the method will use heuristics to guess what URI was intended. - # This is not standards-compliant, merely user-friendly. - # - # @param [String, Addressable::URI, #to_str] uri - # The URI string to parse. - # No parsing is performed if the object is already an - # Addressable::URI. - # @param [Hash] hints - # A Hash of hints to the heuristic parser. - # Defaults to {:scheme => "http"}. - # - # @return [Addressable::URI] The parsed URI. - def self.heuristic_parse(uri, hints={}) - # If we were given nil, return nil. - return nil unless uri - # If a URI object is passed, just return itself. - return uri.dup if uri.kind_of?(self) - - # If a URI object of the Ruby standard library variety is passed, - # convert it to a string, then parse the string. - # We do the check this way because we don't want to accidentally - # cause a missing constant exception to be thrown. - if uri.class.name =~ /^URI\b/ - uri = uri.to_s - end - - if !uri.respond_to?(:to_str) - raise TypeError, "Can't convert #{uri.class} into String." - end - # Otherwise, convert to a String - uri = uri.to_str.dup - hints = { - :scheme => "http" - }.merge(hints) - case uri - when /^http:\/+/ - uri.gsub!(/^http:\/+/, "http://") - when /^https:\/+/ - uri.gsub!(/^https:\/+/, "https://") - when /^feed:\/+http:\/+/ - uri.gsub!(/^feed:\/+http:\/+/, "feed:http://") - when /^feed:\/+/ - uri.gsub!(/^feed:\/+/, "feed://") - when /^file:\/+/ - uri.gsub!(/^file:\/+/, "file:///") - when /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/ - uri.gsub!(/^/, hints[:scheme] + "://") - end - parsed = self.parse(uri) - if parsed.scheme =~ /^[^\/?#\.]+\.[^\/?#]+$/ - parsed = self.parse(hints[:scheme] + "://" + uri) - end - if parsed.path.include?(".") - new_host = parsed.path[/^([^\/]+\.[^\/]*)/, 1] - if new_host - parsed.defer_validation do - new_path = parsed.path.gsub( - Regexp.new("^" + Regexp.escape(new_host)), EMPTY_STR) - parsed.host = new_host - parsed.path = new_path - parsed.scheme = hints[:scheme] unless parsed.scheme - end - end - end - return parsed - end - - ## - # Converts a path to a file scheme URI. If the path supplied is - # relative, it will be returned as a relative URI. If the path supplied - # is actually a non-file URI, it will parse the URI as if it had been - # parsed with Addressable::URI.parse. Handles all of the - # various Microsoft-specific formats for specifying paths. - # - # @param [String, Addressable::URI, #to_str] path - # Typically a String path to a file or directory, but - # will return a sensible return value if an absolute URI is supplied - # instead. - # - # @return [Addressable::URI] - # The parsed file scheme URI or the original URI if some other URI - # scheme was provided. - # - # @example - # base = Addressable::URI.convert_path("/absolute/path/") - # uri = Addressable::URI.convert_path("relative/path") - # (base + uri).to_s - # #=> "file:///absolute/path/relative/path" - # - # Addressable::URI.convert_path( - # "c:\\windows\\My Documents 100%20\\foo.txt" - # ).to_s - # #=> "file:///c:/windows/My%20Documents%20100%20/foo.txt" - # - # Addressable::URI.convert_path("http://example.com/").to_s - # #=> "http://example.com/" - def self.convert_path(path) - # If we were given nil, return nil. - return nil unless path - # If a URI object is passed, just return itself. - return path if path.kind_of?(self) - if !path.respond_to?(:to_str) - raise TypeError, "Can't convert #{path.class} into String." - end - # Otherwise, convert to a String - path = path.to_str.strip - - path.gsub!(/^file:\/?\/?/, EMPTY_STR) if path =~ /^file:\/?\/?/ - path = SLASH + path if path =~ /^([a-zA-Z])[\|:]/ - uri = self.parse(path) - - if uri.scheme == nil - # Adjust windows-style uris - uri.path.gsub!(/^\/?([a-zA-Z])[\|:][\\\/]/) do - "/#{$1.downcase}:/" - end - uri.path.gsub!(/\\/, SLASH) - if File.exists?(uri.path) && - File.stat(uri.path).directory? - uri.path.gsub!(/\/$/, EMPTY_STR) - uri.path = uri.path + '/' - end - - # If the path is absolute, set the scheme and host. - if uri.path =~ /^\// - uri.scheme = "file" - uri.host = EMPTY_STR - end - uri.normalize! - end - - return uri - end - - ## - # Joins several URIs together. - # - # @param [String, Addressable::URI, #to_str] *uris - # The URIs to join. - # - # @return [Addressable::URI] The joined URI. - # - # @example - # base = "http://example.com/" - # uri = Addressable::URI.parse("relative/path") - # Addressable::URI.join(base, uri) - # #=> # - def self.join(*uris) - uri_objects = uris.collect do |uri| - if !uri.respond_to?(:to_str) - raise TypeError, "Can't convert #{uri.class} into String." - end - uri.kind_of?(self) ? uri : self.parse(uri.to_str) - end - result = uri_objects.shift.dup - for uri in uri_objects - result.join!(uri) - end - return result - end - - ## - # Percent encodes a URI component. - # - # @param [String, #to_str] component The URI component to encode. - # - # @param [String, Regexp] character_class - # The characters which are not percent encoded. If a String - # is passed, the String must be formatted as a regular - # expression character class. (Do not include the surrounding square - # brackets.) For example, "b-zB-Z0-9" would cause - # everything but the letters 'b' through 'z' and the numbers '0' through - # '9' to be percent encoded. If a Regexp is passed, the - # value /[^b-zB-Z0-9]/ would have the same effect. A set of - # useful String values may be found in the - # Addressable::URI::CharacterClasses module. The default - # value is the reserved plus unreserved character classes specified in - # RFC 3986. - # - # @param [Regexp] upcase_encoded - # A string of characters that may already be percent encoded, and whose - # encodings should be upcased. This allows normalization of percent - # encodings for characters not included in the - # character_class. - # - # @return [String] The encoded component. - # - # @example - # Addressable::URI.encode_component("simple/example", "b-zB-Z0-9") - # => "simple%2Fex%61mple" - # Addressable::URI.encode_component("simple/example", /[^b-zB-Z0-9]/) - # => "simple%2Fex%61mple" - # Addressable::URI.encode_component( - # "simple/example", Addressable::URI::CharacterClasses::UNRESERVED - # ) - # => "simple%2Fexample" - def self.encode_component(component, character_class= - CharacterClasses::RESERVED + CharacterClasses::UNRESERVED, - upcase_encoded='') - return nil if component.nil? - - begin - if component.kind_of?(Symbol) || - component.kind_of?(Numeric) || - component.kind_of?(TrueClass) || - component.kind_of?(FalseClass) - component = component.to_s - else - component = component.to_str - end - rescue TypeError, NoMethodError - raise TypeError, "Can't convert #{component.class} into String." - end if !component.is_a? String - - if ![String, Regexp].include?(character_class.class) - raise TypeError, - "Expected String or Regexp, got #{character_class.inspect}" - end - if character_class.kind_of?(String) - character_class = /[^#{character_class}]/ - end - if component.respond_to?(:force_encoding) - # We can't perform regexps on invalid UTF sequences, but - # here we need to, so switch to ASCII. - component = component.dup - component.force_encoding(Encoding::ASCII_8BIT) - end - # Avoiding gsub! because there are edge cases with frozen strings - component = component.gsub(character_class) do |sequence| - (sequence.unpack('C*').map { |c| "%" + ("%02x" % c).upcase }).join - end - if upcase_encoded.length > 0 - component = component.gsub(/%(#{upcase_encoded.chars.map do |char| - char.unpack('C*').map { |c| '%02x' % c }.join - end.join('|')})/i) { |s| s.upcase } - end - return component - end - - class << self - alias_method :encode_component, :encode_component - end - - ## - # Unencodes any percent encoded characters within a URI component. - # This method may be used for unencoding either components or full URIs, - # however, it is recommended to use the unencode_component - # alias when unencoding components. - # - # @param [String, Addressable::URI, #to_str] uri - # The URI or component to unencode. - # - # @param [Class] return_type - # The type of object to return. - # This value may only be set to String or - # Addressable::URI. All other values are invalid. Defaults - # to String. - # - # @param [String] leave_encoded - # A string of characters to leave encoded. If a percent encoded character - # in this list is encountered then it will remain percent encoded. - # - # @return [String, Addressable::URI] - # The unencoded component or URI. - # The return type is determined by the return_type - # parameter. - def self.unencode(uri, return_type=String, leave_encoded='') - return nil if uri.nil? - - begin - uri = uri.to_str - rescue NoMethodError, TypeError - raise TypeError, "Can't convert #{uri.class} into String." - end if !uri.is_a? String - if ![String, ::Addressable::URI].include?(return_type) - raise TypeError, - "Expected Class (String or Addressable::URI), " + - "got #{return_type.inspect}" - end - uri = uri.dup - # Seriously, only use UTF-8. I'm really not kidding! - uri.force_encoding("utf-8") if uri.respond_to?(:force_encoding) - leave_encoded.force_encoding("utf-8") if leave_encoded.respond_to?(:force_encoding) - result = uri.gsub(/%[0-9a-f]{2}/iu) do |sequence| - c = sequence[1..3].to_i(16).chr - c.force_encoding("utf-8") if c.respond_to?(:force_encoding) - leave_encoded.include?(c) ? sequence : c - end - result.force_encoding("utf-8") if result.respond_to?(:force_encoding) - if return_type == String - return result - elsif return_type == ::Addressable::URI - return ::Addressable::URI.parse(result) - end - end - - class << self - alias_method :unescape, :unencode - alias_method :unencode_component, :unencode - alias_method :unescape_component, :unencode - end - - - ## - # Normalizes the encoding of a URI component. - # - # @param [String, #to_str] component The URI component to encode. - # - # @param [String, Regexp] character_class - # The characters which are not percent encoded. If a String - # is passed, the String must be formatted as a regular - # expression character class. (Do not include the surrounding square - # brackets.) For example, "b-zB-Z0-9" would cause - # everything but the letters 'b' through 'z' and the numbers '0' - # through '9' to be percent encoded. If a Regexp is passed, - # the value /[^b-zB-Z0-9]/ would have the same effect. A - # set of useful String values may be found in the - # Addressable::URI::CharacterClasses module. The default - # value is the reserved plus unreserved character classes specified in - # RFC 3986. - # - # @param [String] leave_encoded - # When character_class is a String then - # leave_encoded is a string of characters that should remain - # percent encoded while normalizing the component; if they appear percent - # encoded in the original component, then they will be upcased ("%2f" - # normalized to "%2F") but otherwise left alone. - # - # @return [String] The normalized component. - # - # @example - # Addressable::URI.normalize_component("simpl%65/%65xampl%65", "b-zB-Z") - # => "simple%2Fex%61mple" - # Addressable::URI.normalize_component( - # "simpl%65/%65xampl%65", /[^b-zB-Z]/ - # ) - # => "simple%2Fex%61mple" - # Addressable::URI.normalize_component( - # "simpl%65/%65xampl%65", - # Addressable::URI::CharacterClasses::UNRESERVED - # ) - # => "simple%2Fexample" - # Addressable::URI.normalize_component( - # "one%20two%2fthree%26four", - # "0-9a-zA-Z &/", - # "/" - # ) - # => "one two%2Fthree&four" - def self.normalize_component(component, character_class= - CharacterClasses::RESERVED + CharacterClasses::UNRESERVED, - leave_encoded='') - return nil if component.nil? - - begin - component = component.to_str - rescue NoMethodError, TypeError - raise TypeError, "Can't convert #{component.class} into String." - end if !component.is_a? String - - if ![String, Regexp].include?(character_class.class) - raise TypeError, - "Expected String or Regexp, got #{character_class.inspect}" - end - if character_class.kind_of?(String) - leave_re = if leave_encoded.length > 0 - character_class = "#{character_class}%" unless character_class.include?('%') - - "|%(?!#{leave_encoded.chars.map do |char| - seq = char.unpack('C*').map { |c| '%02x' % c }.join - [seq.upcase, seq.downcase] - end.flatten.join('|')})" - end - - character_class = /[^#{character_class}]#{leave_re}/ - end - if component.respond_to?(:force_encoding) - # We can't perform regexps on invalid UTF sequences, but - # here we need to, so switch to ASCII. - component = component.dup - component.force_encoding(Encoding::ASCII_8BIT) - end - unencoded = self.unencode_component(component, String, leave_encoded) - begin - encoded = self.encode_component( - Addressable::IDNA.unicode_normalize_kc(unencoded), - character_class, - leave_encoded - ) - rescue ArgumentError - encoded = self.encode_component(unencoded) - end - if encoded.respond_to?(:force_encoding) - encoded.force_encoding(Encoding::UTF_8) - end - return encoded - end - - ## - # Percent encodes any special characters in the URI. - # - # @param [String, Addressable::URI, #to_str] uri - # The URI to encode. - # - # @param [Class] return_type - # The type of object to return. - # This value may only be set to String or - # Addressable::URI. All other values are invalid. Defaults - # to String. - # - # @return [String, Addressable::URI] - # The encoded URI. - # The return type is determined by the return_type - # parameter. - def self.encode(uri, return_type=String) - return nil if uri.nil? - - begin - uri = uri.to_str - rescue NoMethodError, TypeError - raise TypeError, "Can't convert #{uri.class} into String." - end if !uri.is_a? String - - if ![String, ::Addressable::URI].include?(return_type) - raise TypeError, - "Expected Class (String or Addressable::URI), " + - "got #{return_type.inspect}" - end - uri_object = uri.kind_of?(self) ? uri : self.parse(uri) - encoded_uri = Addressable::URI.new( - :scheme => self.encode_component(uri_object.scheme, - Addressable::URI::CharacterClasses::SCHEME), - :authority => self.encode_component(uri_object.authority, - Addressable::URI::CharacterClasses::AUTHORITY), - :path => self.encode_component(uri_object.path, - Addressable::URI::CharacterClasses::PATH), - :query => self.encode_component(uri_object.query, - Addressable::URI::CharacterClasses::QUERY), - :fragment => self.encode_component(uri_object.fragment, - Addressable::URI::CharacterClasses::FRAGMENT) - ) - if return_type == String - return encoded_uri.to_s - elsif return_type == ::Addressable::URI - return encoded_uri - end - end - - class << self - alias_method :escape, :encode - end - - ## - # Normalizes the encoding of a URI. Characters within a hostname are - # not percent encoded to allow for internationalized domain names. - # - # @param [String, Addressable::URI, #to_str] uri - # The URI to encode. - # - # @param [Class] return_type - # The type of object to return. - # This value may only be set to String or - # Addressable::URI. All other values are invalid. Defaults - # to String. - # - # @return [String, Addressable::URI] - # The encoded URI. - # The return type is determined by the return_type - # parameter. - def self.normalized_encode(uri, return_type=String) - begin - uri = uri.to_str - rescue NoMethodError, TypeError - raise TypeError, "Can't convert #{uri.class} into String." - end if !uri.is_a? String - - if ![String, ::Addressable::URI].include?(return_type) - raise TypeError, - "Expected Class (String or Addressable::URI), " + - "got #{return_type.inspect}" - end - uri_object = uri.kind_of?(self) ? uri : self.parse(uri) - components = { - :scheme => self.unencode_component(uri_object.scheme), - :user => self.unencode_component(uri_object.user), - :password => self.unencode_component(uri_object.password), - :host => self.unencode_component(uri_object.host), - :port => (uri_object.port.nil? ? nil : uri_object.port.to_s), - :path => self.unencode_component(uri_object.path), - :query => self.unencode_component(uri_object.query), - :fragment => self.unencode_component(uri_object.fragment) - } - components.each do |key, value| - if value != nil - begin - components[key] = - Addressable::IDNA.unicode_normalize_kc(value.to_str) - rescue ArgumentError - # Likely a malformed UTF-8 character, skip unicode normalization - components[key] = value.to_str - end - end - end - encoded_uri = Addressable::URI.new( - :scheme => self.encode_component(components[:scheme], - Addressable::URI::CharacterClasses::SCHEME), - :user => self.encode_component(components[:user], - Addressable::URI::CharacterClasses::UNRESERVED), - :password => self.encode_component(components[:password], - Addressable::URI::CharacterClasses::UNRESERVED), - :host => components[:host], - :port => components[:port], - :path => self.encode_component(components[:path], - Addressable::URI::CharacterClasses::PATH), - :query => self.encode_component(components[:query], - Addressable::URI::CharacterClasses::QUERY), - :fragment => self.encode_component(components[:fragment], - Addressable::URI::CharacterClasses::FRAGMENT) - ) - if return_type == String - return encoded_uri.to_s - elsif return_type == ::Addressable::URI - return encoded_uri - end - end - - ## - # Encodes a set of key/value pairs according to the rules for the - # application/x-www-form-urlencoded MIME type. - # - # @param [#to_hash, #to_ary] form_values - # The form values to encode. - # - # @param [TrueClass, FalseClass] sort - # Sort the key/value pairs prior to encoding. - # Defaults to false. - # - # @return [String] - # The encoded value. - def self.form_encode(form_values, sort=false) - if form_values.respond_to?(:to_hash) - form_values = form_values.to_hash.to_a - elsif form_values.respond_to?(:to_ary) - form_values = form_values.to_ary - else - raise TypeError, "Can't convert #{form_values.class} into Array." - end - - form_values = form_values.inject([]) do |accu, (key, value)| - if value.kind_of?(Array) - value.each do |v| - accu << [key.to_s, v.to_s] - end - else - accu << [key.to_s, value.to_s] - end - accu - end - - if sort - # Useful for OAuth and optimizing caching systems - form_values = form_values.sort - end - escaped_form_values = form_values.map do |(key, value)| - # Line breaks are CRLF pairs - [ - self.encode_component( - key.gsub(/(\r\n|\n|\r)/, "\r\n"), - CharacterClasses::UNRESERVED - ).gsub("%20", "+"), - self.encode_component( - value.gsub(/(\r\n|\n|\r)/, "\r\n"), - CharacterClasses::UNRESERVED - ).gsub("%20", "+") - ] - end - return (escaped_form_values.map do |(key, value)| - "#{key}=#{value}" - end).join("&") - end - - ## - # Decodes a String according to the rules for the - # application/x-www-form-urlencoded MIME type. - # - # @param [String, #to_str] encoded_value - # The form values to decode. - # - # @return [Array] - # The decoded values. - # This is not a Hash because of the possibility for - # duplicate keys. - def self.form_unencode(encoded_value) - if !encoded_value.respond_to?(:to_str) - raise TypeError, "Can't convert #{encoded_value.class} into String." - end - encoded_value = encoded_value.to_str - split_values = encoded_value.split("&").map do |pair| - pair.split("=", 2) - end - return split_values.map do |(key, value)| - [ - key ? self.unencode_component( - key.gsub("+", "%20")).gsub(/(\r\n|\n|\r)/, "\n") : nil, - value ? (self.unencode_component( - value.gsub("+", "%20")).gsub(/(\r\n|\n|\r)/, "\n")) : nil - ] - end - end - - ## - # Creates a new uri object from component parts. - # - # @option [String, #to_str] scheme The scheme component. - # @option [String, #to_str] user The user component. - # @option [String, #to_str] password The password component. - # @option [String, #to_str] userinfo - # The userinfo component. If this is supplied, the user and password - # components must be omitted. - # @option [String, #to_str] host The host component. - # @option [String, #to_str] port The port component. - # @option [String, #to_str] authority - # The authority component. If this is supplied, the user, password, - # userinfo, host, and port components must be omitted. - # @option [String, #to_str] path The path component. - # @option [String, #to_str] query The query component. - # @option [String, #to_str] fragment The fragment component. - # - # @return [Addressable::URI] The constructed URI object. - def initialize(options={}) - if options.has_key?(:authority) - if (options.keys & [:userinfo, :user, :password, :host, :port]).any? - raise ArgumentError, - "Cannot specify both an authority and any of the components " + - "within the authority." - end - end - if options.has_key?(:userinfo) - if (options.keys & [:user, :password]).any? - raise ArgumentError, - "Cannot specify both a userinfo and either the user or password." - end - end - - self.defer_validation do - # Bunch of crazy logic required because of the composite components - # like userinfo and authority. - self.scheme = options[:scheme] if options[:scheme] - self.user = options[:user] if options[:user] - self.password = options[:password] if options[:password] - self.userinfo = options[:userinfo] if options[:userinfo] - self.host = options[:host] if options[:host] - self.port = options[:port] if options[:port] - self.authority = options[:authority] if options[:authority] - self.path = options[:path] if options[:path] - self.query = options[:query] if options[:query] - self.query_values = options[:query_values] if options[:query_values] - self.fragment = options[:fragment] if options[:fragment] - end - end - - ## - # Freeze URI, initializing instance variables. - # - # @return [Addressable::URI] The frozen URI object. - def freeze - self.normalized_scheme - self.normalized_user - self.normalized_password - self.normalized_userinfo - self.normalized_host - self.normalized_port - self.normalized_authority - self.normalized_site - self.normalized_path - self.normalized_query - self.normalized_fragment - self.hash - super - end - - ## - # The scheme component for this URI. - # - # @return [String] The scheme component. - def scheme - return instance_variable_defined?(:@scheme) ? @scheme : nil - end - - ## - # The scheme component for this URI, normalized. - # - # @return [String] The scheme component, normalized. - def normalized_scheme - self.scheme && @normalized_scheme ||= (begin - if self.scheme =~ /^\s*ssh\+svn\s*$/i - "svn+ssh" - else - Addressable::URI.normalize_component( - self.scheme.strip.downcase, - Addressable::URI::CharacterClasses::SCHEME - ) - end - end) - end - - ## - # Sets the scheme component for this URI. - # - # @param [String, #to_str] new_scheme The new scheme component. - def scheme=(new_scheme) - if new_scheme && !new_scheme.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_scheme.class} into String." - elsif new_scheme - new_scheme = new_scheme.to_str - end - if new_scheme && new_scheme !~ /[a-z][a-z0-9\.\+\-]*/i - raise InvalidURIError, "Invalid scheme format." - end - @scheme = new_scheme - @scheme = nil if @scheme.to_s.strip.empty? - - # Reset dependant values - @normalized_scheme = nil - @uri_string = nil - @hash = nil - - # Ensure we haven't created an invalid URI - validate() - end - - ## - # The user component for this URI. - # - # @return [String] The user component. - def user - return instance_variable_defined?(:@user) ? @user : nil - end - - ## - # The user component for this URI, normalized. - # - # @return [String] The user component, normalized. - def normalized_user - self.user && @normalized_user ||= (begin - if normalized_scheme =~ /https?/ && self.user.strip.empty? && - (!self.password || self.password.strip.empty?) - nil - else - Addressable::URI.normalize_component( - self.user.strip, - Addressable::URI::CharacterClasses::UNRESERVED - ) - end - end) - end - - ## - # Sets the user component for this URI. - # - # @param [String, #to_str] new_user The new user component. - def user=(new_user) - if new_user && !new_user.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_user.class} into String." - end - @user = new_user ? new_user.to_str : nil - - # You can't have a nil user with a non-nil password - if password != nil - @user = EMPTY_STR if @user.nil? - end - - # Reset dependant values - @userinfo = nil - @normalized_userinfo = nil - @authority = nil - @normalized_user = nil - @uri_string = nil - @hash = nil - - # Ensure we haven't created an invalid URI - validate() - end - - ## - # The password component for this URI. - # - # @return [String] The password component. - def password - return instance_variable_defined?(:@password) ? @password : nil - end - - ## - # The password component for this URI, normalized. - # - # @return [String] The password component, normalized. - def normalized_password - self.password && @normalized_password ||= (begin - if self.normalized_scheme =~ /https?/ && self.password.strip.empty? && - (!self.user || self.user.strip.empty?) - nil - else - Addressable::URI.normalize_component( - self.password.strip, - Addressable::URI::CharacterClasses::UNRESERVED - ) - end - end) - end - - ## - # Sets the password component for this URI. - # - # @param [String, #to_str] new_password The new password component. - def password=(new_password) - if new_password && !new_password.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_password.class} into String." - end - @password = new_password ? new_password.to_str : nil - - # You can't have a nil user with a non-nil password - @password ||= nil - @user ||= nil - if @password != nil - @user = EMPTY_STR if @user.nil? - end - - # Reset dependant values - @userinfo = nil - @normalized_userinfo = nil - @authority = nil - @normalized_password = nil - @uri_string = nil - @hash = nil - - # Ensure we haven't created an invalid URI - validate() - end - - ## - # The userinfo component for this URI. - # Combines the user and password components. - # - # @return [String] The userinfo component. - def userinfo - current_user = self.user - current_password = self.password - (current_user || current_password) && @userinfo ||= (begin - if current_user && current_password - "#{current_user}:#{current_password}" - elsif current_user && !current_password - "#{current_user}" - end - end) - end - - ## - # The userinfo component for this URI, normalized. - # - # @return [String] The userinfo component, normalized. - def normalized_userinfo - self.userinfo && @normalized_userinfo ||= (begin - current_user = self.normalized_user - current_password = self.normalized_password - if !current_user && !current_password - nil - elsif current_user && current_password - "#{current_user}:#{current_password}" - elsif current_user && !current_password - "#{current_user}" - end - end) - end - - ## - # Sets the userinfo component for this URI. - # - # @param [String, #to_str] new_userinfo The new userinfo component. - def userinfo=(new_userinfo) - if new_userinfo && !new_userinfo.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_userinfo.class} into String." - end - new_user, new_password = if new_userinfo - [ - new_userinfo.to_str.strip[/^(.*):/, 1], - new_userinfo.to_str.strip[/:(.*)$/, 1] - ] - else - [nil, nil] - end - - # Password assigned first to ensure validity in case of nil - self.password = new_password - self.user = new_user - - # Reset dependant values - @authority = nil - @uri_string = nil - @hash = nil - - # Ensure we haven't created an invalid URI - validate() - end - - ## - # The host component for this URI. - # - # @return [String] The host component. - def host - return instance_variable_defined?(:@host) ? @host : nil - end - - ## - # The host component for this URI, normalized. - # - # @return [String] The host component, normalized. - def normalized_host - self.host && @normalized_host ||= (begin - if !self.host.strip.empty? - result = ::Addressable::IDNA.to_ascii( - URI.unencode_component(self.host.strip.downcase) - ) - if result =~ /[^\.]\.$/ - # Single trailing dots are unnecessary. - result = result[0...-1] - end - result - else - EMPTY_STR - end - end) - end - - ## - # Sets the host component for this URI. - # - # @param [String, #to_str] new_host The new host component. - def host=(new_host) - if new_host && !new_host.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_host.class} into String." - end - @host = new_host ? new_host.to_str : nil - - unreserved = CharacterClasses::UNRESERVED - sub_delims = CharacterClasses::SUB_DELIMS - if @host != nil && (@host =~ /[<>{}\/\?\#\@]/ || - (@host[/^\[(.*)\]$/, 1] != nil && @host[/^\[(.*)\]$/, 1] !~ - Regexp.new("^[#{unreserved}#{sub_delims}:]*$"))) - raise InvalidURIError, "Invalid character in host: '#{@host.to_s}'" - end - - # Reset dependant values - @authority = nil - @normalized_host = nil - @uri_string = nil - @hash = nil - - # Ensure we haven't created an invalid URI - validate() - end - - ## - # This method is same as URI::Generic#host except - # brackets for IPv6 (and 'IPvFuture') addresses are removed. - # - # @see Addressable::URI#host - # - # @return [String] The hostname for this URI. - def hostname - v = self.host - /\A\[(.*)\]\z/ =~ v ? $1 : v - end - - ## - # This method is same as URI::Generic#host= except - # the argument can be a bare IPv6 address (or 'IPvFuture'). - # - # @see Addressable::URI#host= - # - # @param [String, #to_str] new_hostname The new hostname for this URI. - def hostname=(new_hostname) - if new_hostname && !new_hostname.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_hostname.class} into String." - end - v = new_hostname ? new_hostname.to_str : nil - v = "[#{v}]" if /\A\[.*\]\z/ !~ v && /:/ =~ v - self.host = v - end - - ## - # The authority component for this URI. - # Combines the user, password, host, and port components. - # - # @return [String] The authority component. - def authority - self.host && @authority ||= (begin - authority = "" - if self.userinfo != nil - authority << "#{self.userinfo}@" - end - authority << self.host - if self.port != nil - authority << ":#{self.port}" - end - authority - end) - end - - ## - # The authority component for this URI, normalized. - # - # @return [String] The authority component, normalized. - def normalized_authority - self.authority && @normalized_authority ||= (begin - authority = "" - if self.normalized_userinfo != nil - authority << "#{self.normalized_userinfo}@" - end - authority << self.normalized_host - if self.normalized_port != nil - authority << ":#{self.normalized_port}" - end - authority - end) - end - - ## - # Sets the authority component for this URI. - # - # @param [String, #to_str] new_authority The new authority component. - def authority=(new_authority) - if new_authority - if !new_authority.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_authority.class} into String." - end - new_authority = new_authority.to_str - new_userinfo = new_authority[/^([^\[\]]*)@/, 1] - if new_userinfo - new_user = new_userinfo.strip[/^([^:]*):?/, 1] - new_password = new_userinfo.strip[/:(.*)$/, 1] - end - new_host = new_authority.gsub( - /^([^\[\]]*)@/, EMPTY_STR - ).gsub( - /:([^:@\[\]]*?)$/, EMPTY_STR - ) - new_port = - new_authority[/:([^:@\[\]]*?)$/, 1] - end - - # Password assigned first to ensure validity in case of nil - self.password = defined?(new_password) ? new_password : nil - self.user = defined?(new_user) ? new_user : nil - self.host = defined?(new_host) ? new_host : nil - self.port = defined?(new_port) ? new_port : nil - - # Reset dependant values - @userinfo = nil - @normalized_userinfo = nil - @uri_string = nil - @hash = nil - - # Ensure we haven't created an invalid URI - validate() - end - - ## - # The origin for this URI, serialized to ASCII, as per - # RFC 6454, section 6.2. - # - # @return [String] The serialized origin. - def origin - return (if self.scheme && self.authority - if self.normalized_port - ( - "#{self.normalized_scheme}://#{self.normalized_host}" + - ":#{self.normalized_port}" - ) - else - "#{self.normalized_scheme}://#{self.normalized_host}" - end - else - "null" - end) - end - - # Returns an array of known ip-based schemes. These schemes typically - # use a similar URI form: - # //:@:/ - def self.ip_based_schemes - return self.port_mapping.keys - end - - # Returns a hash of common IP-based schemes and their default port - # numbers. Adding new schemes to this hash, as necessary, will allow - # for better URI normalization. - def self.port_mapping - PORT_MAPPING - end - - ## - # The port component for this URI. - # This is the port number actually given in the URI. This does not - # infer port numbers from default values. - # - # @return [Integer] The port component. - def port - return instance_variable_defined?(:@port) ? @port : nil - end - - ## - # The port component for this URI, normalized. - # - # @return [Integer] The port component, normalized. - def normalized_port - if URI.port_mapping[self.normalized_scheme] == self.port - nil - else - self.port - end - end - - ## - # Sets the port component for this URI. - # - # @param [String, Integer, #to_s] new_port The new port component. - def port=(new_port) - if new_port != nil && new_port.respond_to?(:to_str) - new_port = Addressable::URI.unencode_component(new_port.to_str) - end - if new_port != nil && !(new_port.to_s =~ /^\d+$/) - raise InvalidURIError, - "Invalid port number: #{new_port.inspect}" - end - - @port = new_port.to_s.to_i - @port = nil if @port == 0 - - # Reset dependant values - @authority = nil - @normalized_port = nil - @uri_string = nil - @hash = nil - - # Ensure we haven't created an invalid URI - validate() - end - - ## - # The inferred port component for this URI. - # This method will normalize to the default port for the URI's scheme if - # the port isn't explicitly specified in the URI. - # - # @return [Integer] The inferred port component. - def inferred_port - if self.port.to_i == 0 - self.default_port - else - self.port.to_i - end - end - - ## - # The default port for this URI's scheme. - # This method will always returns the default port for the URI's scheme - # regardless of the presence of an explicit port in the URI. - # - # @return [Integer] The default port. - def default_port - URI.port_mapping[self.scheme.strip.downcase] if self.scheme - end - - ## - # The combination of components that represent a site. - # Combines the scheme, user, password, host, and port components. - # Primarily useful for HTTP and HTTPS. - # - # For example, "http://example.com/path?query" would have a - # site value of "http://example.com". - # - # @return [String] The components that identify a site. - def site - (self.scheme || self.authority) && @site ||= (begin - site_string = "" - site_string << "#{self.scheme}:" if self.scheme != nil - site_string << "//#{self.authority}" if self.authority != nil - site_string - end) - end - - ## - # The normalized combination of components that represent a site. - # Combines the scheme, user, password, host, and port components. - # Primarily useful for HTTP and HTTPS. - # - # For example, "http://example.com/path?query" would have a - # site value of "http://example.com". - # - # @return [String] The normalized components that identify a site. - def normalized_site - self.site && @normalized_site ||= (begin - site_string = "" - if self.normalized_scheme != nil - site_string << "#{self.normalized_scheme}:" - end - if self.normalized_authority != nil - site_string << "//#{self.normalized_authority}" - end - site_string - end) - end - - ## - # Sets the site value for this URI. - # - # @param [String, #to_str] new_site The new site value. - def site=(new_site) - if new_site - if !new_site.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_site.class} into String." - end - new_site = new_site.to_str - # These two regular expressions derived from the primary parsing - # expression - self.scheme = new_site[/^(?:([^:\/?#]+):)?(?:\/\/(?:[^\/?#]*))?$/, 1] - self.authority = new_site[ - /^(?:(?:[^:\/?#]+):)?(?:\/\/([^\/?#]*))?$/, 1 - ] - else - self.scheme = nil - self.authority = nil - end - end - - ## - # The path component for this URI. - # - # @return [String] The path component. - def path - return instance_variable_defined?(:@path) ? @path : EMPTY_STR - end - - NORMPATH = /^(?!\/)[^\/:]*:.*$/ - ## - # The path component for this URI, normalized. - # - # @return [String] The path component, normalized. - def normalized_path - @normalized_path ||= (begin - path = self.path.to_s - if self.scheme == nil && path =~ NORMPATH - # Relative paths with colons in the first segment are ambiguous. - path = path.sub(":", "%2F") - end - # String#split(delimeter, -1) uses the more strict splitting behavior - # found by default in Python. - result = (path.strip.split(SLASH, -1).map do |segment| - Addressable::URI.normalize_component( - segment, - Addressable::URI::CharacterClasses::PCHAR - ) - end).join(SLASH) - - result = URI.normalize_path(result) - if result.empty? && - ["http", "https", "ftp", "tftp"].include?(self.normalized_scheme) - result = SLASH - end - result - end) - end - - ## - # Sets the path component for this URI. - # - # @param [String, #to_str] new_path The new path component. - def path=(new_path) - if new_path && !new_path.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_path.class} into String." - end - @path = (new_path || EMPTY_STR).to_str - if !@path.empty? && @path[0..0] != SLASH && host != nil - @path = "/#{@path}" - end - - # Reset dependant values - @normalized_path = nil - @uri_string = nil - @hash = nil - end - - ## - # The basename, if any, of the file in the path component. - # - # @return [String] The path's basename. - def basename - # Path cannot be nil - return File.basename(self.path).gsub(/;[^\/]*$/, EMPTY_STR) - end - - ## - # The extname, if any, of the file in the path component. - # Empty string if there is no extension. - # - # @return [String] The path's extname. - def extname - return nil unless self.path - return File.extname(self.basename) - end - - ## - # The query component for this URI. - # - # @return [String] The query component. - def query - return instance_variable_defined?(:@query) ? @query : nil - end - - ## - # The query component for this URI, normalized. - # - # @return [String] The query component, normalized. - def normalized_query(*flags) - modified_query_class = Addressable::URI::CharacterClasses::QUERY.dup - # Make sure possible key-value pair delimiters are escaped. - modified_query_class.sub!("\\&", "").sub!("\\;", "") - pairs = (self.query || "").split("&", -1) - pairs.sort! if flags.include?(:sorted) - component = (pairs.map do |pair| - Addressable::URI.normalize_component(pair, modified_query_class, "+") - end).join("&") - component == "" ? nil : component - end - - ## - # Sets the query component for this URI. - # - # @param [String, #to_str] new_query The new query component. - def query=(new_query) - if new_query && !new_query.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_query.class} into String." - end - @query = new_query ? new_query.to_str : nil - - # Reset dependant values - @normalized_query = nil - @uri_string = nil - @hash = nil - end - - ## - # Converts the query component to a Hash value. - # - # @param [Class] return_type The return type desired. Value must be either - # `Hash` or `Array`. - # - # @return [Hash, Array] The query string parsed as a Hash or Array object. - # - # @example - # Addressable::URI.parse("?one=1&two=2&three=3").query_values - # #=> {"one" => "1", "two" => "2", "three" => "3"} - # Addressable::URI.parse("?one=two&one=three").query_values(Array) - # #=> [["one", "two"], ["one", "three"]] - # Addressable::URI.parse("?one=two&one=three").query_values(Hash) - # #=> {"one" => "three"} - def query_values(return_type=Hash) - empty_accumulator = Array == return_type ? [] : {} - if return_type != Hash && return_type != Array - raise ArgumentError, "Invalid return type. Must be Hash or Array." - end - return nil if self.query == nil - split_query = (self.query.split("&").map do |pair| - pair.split("=", 2) if pair && !pair.empty? - end).compact - return split_query.inject(empty_accumulator.dup) do |accu, pair| - # I'd rather use key/value identifiers instead of array lookups, - # but in this case I really want to maintain the exact pair structure, - # so it's best to make all changes in-place. - pair[0] = URI.unencode_component(pair[0]) - if pair[1].respond_to?(:to_str) - # I loathe the fact that I have to do this. Stupid HTML 4.01. - # Treating '+' as a space was just an unbelievably bad idea. - # There was nothing wrong with '%20'! - # If it ain't broke, don't fix it! - pair[1] = URI.unencode_component(pair[1].to_str.gsub(/\+/, " ")) - end - if return_type == Hash - accu[pair[0]] = pair[1] - else - accu << pair - end - accu - end - end - - ## - # Sets the query component for this URI from a Hash object. - # An empty Hash or Array will result in an empty query string. - # - # @param [Hash, #to_hash, Array] new_query_values The new query values. - # - # @example - # uri.query_values = {:a => "a", :b => ["c", "d", "e"]} - # uri.query - # # => "a=a&b=c&b=d&b=e" - # uri.query_values = [['a', 'a'], ['b', 'c'], ['b', 'd'], ['b', 'e']] - # uri.query - # # => "a=a&b=c&b=d&b=e" - # uri.query_values = [['a', 'a'], ['b', ['c', 'd', 'e']]] - # uri.query - # # => "a=a&b=c&b=d&b=e" - # uri.query_values = [['flag'], ['key', 'value']] - # uri.query - # # => "flag&key=value" - def query_values=(new_query_values) - if new_query_values == nil - self.query = nil - return nil - end - - if !new_query_values.is_a?(Array) - if !new_query_values.respond_to?(:to_hash) - raise TypeError, - "Can't convert #{new_query_values.class} into Hash." - end - new_query_values = new_query_values.to_hash - new_query_values = new_query_values.map do |key, value| - key = key.to_s if key.kind_of?(Symbol) - [key, value] - end - # Useful default for OAuth and caching. - # Only to be used for non-Array inputs. Arrays should preserve order. - new_query_values.sort! - end - - # new_query_values have form [['key1', 'value1'], ['key2', 'value2']] - buffer = "" - new_query_values.each do |key, value| - encoded_key = URI.encode_component( - key, CharacterClasses::UNRESERVED - ) - if value == nil - buffer << "#{encoded_key}&" - elsif value.kind_of?(Array) - value.each do |sub_value| - encoded_value = URI.encode_component( - sub_value, CharacterClasses::UNRESERVED - ) - buffer << "#{encoded_key}=#{encoded_value}&" - end - else - encoded_value = URI.encode_component( - value, CharacterClasses::UNRESERVED - ) - buffer << "#{encoded_key}=#{encoded_value}&" - end - end - self.query = buffer.chop - end - - ## - # The HTTP request URI for this URI. This is the path and the - # query string. - # - # @return [String] The request URI required for an HTTP request. - def request_uri - return nil if self.absolute? && self.scheme !~ /^https?$/ - return ( - (!self.path.empty? ? self.path : SLASH) + - (self.query ? "?#{self.query}" : EMPTY_STR) - ) - end - - ## - # Sets the HTTP request URI for this URI. - # - # @param [String, #to_str] new_request_uri The new HTTP request URI. - def request_uri=(new_request_uri) - if !new_request_uri.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_request_uri.class} into String." - end - if self.absolute? && self.scheme !~ /^https?$/ - raise InvalidURIError, - "Cannot set an HTTP request URI for a non-HTTP URI." - end - new_request_uri = new_request_uri.to_str - path_component = new_request_uri[/^([^\?]*)\?(?:.*)$/, 1] - query_component = new_request_uri[/^(?:[^\?]*)\?(.*)$/, 1] - path_component = path_component.to_s - path_component = (!path_component.empty? ? path_component : SLASH) - self.path = path_component - self.query = query_component - - # Reset dependant values - @uri_string = nil - @hash = nil - end - - ## - # The fragment component for this URI. - # - # @return [String] The fragment component. - def fragment - return instance_variable_defined?(:@fragment) ? @fragment : nil - end - - ## - # The fragment component for this URI, normalized. - # - # @return [String] The fragment component, normalized. - def normalized_fragment - self.fragment && @normalized_fragment ||= (begin - component = Addressable::URI.normalize_component( - self.fragment, - Addressable::URI::CharacterClasses::FRAGMENT - ) - component == "" ? nil : component - end) - end - - ## - # Sets the fragment component for this URI. - # - # @param [String, #to_str] new_fragment The new fragment component. - def fragment=(new_fragment) - if new_fragment && !new_fragment.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_fragment.class} into String." - end - @fragment = new_fragment ? new_fragment.to_str : nil - - # Reset dependant values - @normalized_fragment = nil - @uri_string = nil - @hash = nil - - # Ensure we haven't created an invalid URI - validate() - end - - ## - # Determines if the scheme indicates an IP-based protocol. - # - # @return [TrueClass, FalseClass] - # true if the scheme indicates an IP-based protocol. - # false otherwise. - def ip_based? - if self.scheme - return URI.ip_based_schemes.include?( - self.scheme.strip.downcase) - end - return false - end - - ## - # Determines if the URI is relative. - # - # @return [TrueClass, FalseClass] - # true if the URI is relative. false - # otherwise. - def relative? - return self.scheme.nil? - end - - ## - # Determines if the URI is absolute. - # - # @return [TrueClass, FalseClass] - # true if the URI is absolute. false - # otherwise. - def absolute? - return !relative? - end - - ## - # Joins two URIs together. - # - # @param [String, Addressable::URI, #to_str] The URI to join with. - # - # @return [Addressable::URI] The joined URI. - def join(uri) - if !uri.respond_to?(:to_str) - raise TypeError, "Can't convert #{uri.class} into String." - end - if !uri.kind_of?(URI) - # Otherwise, convert to a String, then parse. - uri = URI.parse(uri.to_str) - end - if uri.to_s.empty? - return self.dup - end - - joined_scheme = nil - joined_user = nil - joined_password = nil - joined_host = nil - joined_port = nil - joined_path = nil - joined_query = nil - joined_fragment = nil - - # Section 5.2.2 of RFC 3986 - if uri.scheme != nil - joined_scheme = uri.scheme - joined_user = uri.user - joined_password = uri.password - joined_host = uri.host - joined_port = uri.port - joined_path = URI.normalize_path(uri.path) - joined_query = uri.query - else - if uri.authority != nil - joined_user = uri.user - joined_password = uri.password - joined_host = uri.host - joined_port = uri.port - joined_path = URI.normalize_path(uri.path) - joined_query = uri.query - else - if uri.path == nil || uri.path.empty? - joined_path = self.path - if uri.query != nil - joined_query = uri.query - else - joined_query = self.query - end - else - if uri.path[0..0] == SLASH - joined_path = URI.normalize_path(uri.path) - else - base_path = self.path.dup - base_path = EMPTY_STR if base_path == nil - base_path = URI.normalize_path(base_path) - - # Section 5.2.3 of RFC 3986 - # - # Removes the right-most path segment from the base path. - if base_path =~ /\// - base_path.gsub!(/\/[^\/]+$/, SLASH) - else - base_path = EMPTY_STR - end - - # If the base path is empty and an authority segment has been - # defined, use a base path of SLASH - if base_path.empty? && self.authority != nil - base_path = SLASH - end - - joined_path = URI.normalize_path(base_path + uri.path) - end - joined_query = uri.query - end - joined_user = self.user - joined_password = self.password - joined_host = self.host - joined_port = self.port - end - joined_scheme = self.scheme - end - joined_fragment = uri.fragment - - return self.class.new( - :scheme => joined_scheme, - :user => joined_user, - :password => joined_password, - :host => joined_host, - :port => joined_port, - :path => joined_path, - :query => joined_query, - :fragment => joined_fragment - ) - end - alias_method :+, :join - - ## - # Destructive form of join. - # - # @param [String, Addressable::URI, #to_str] The URI to join with. - # - # @return [Addressable::URI] The joined URI. - # - # @see Addressable::URI#join - def join!(uri) - replace_self(self.join(uri)) - end - - ## - # Merges a URI with a Hash of components. - # This method has different behavior from join. Any - # components present in the hash parameter will override the - # original components. The path component is not treated specially. - # - # @param [Hash, Addressable::URI, #to_hash] The components to merge with. - # - # @return [Addressable::URI] The merged URI. - # - # @see Hash#merge - def merge(hash) - if !hash.respond_to?(:to_hash) - raise TypeError, "Can't convert #{hash.class} into Hash." - end - hash = hash.to_hash - - if hash.has_key?(:authority) - if (hash.keys & [:userinfo, :user, :password, :host, :port]).any? - raise ArgumentError, - "Cannot specify both an authority and any of the components " + - "within the authority." - end - end - if hash.has_key?(:userinfo) - if (hash.keys & [:user, :password]).any? - raise ArgumentError, - "Cannot specify both a userinfo and either the user or password." - end - end - - uri = self.class.new - uri.defer_validation do - # Bunch of crazy logic required because of the composite components - # like userinfo and authority. - uri.scheme = - hash.has_key?(:scheme) ? hash[:scheme] : self.scheme - if hash.has_key?(:authority) - uri.authority = - hash.has_key?(:authority) ? hash[:authority] : self.authority - end - if hash.has_key?(:userinfo) - uri.userinfo = - hash.has_key?(:userinfo) ? hash[:userinfo] : self.userinfo - end - if !hash.has_key?(:userinfo) && !hash.has_key?(:authority) - uri.user = - hash.has_key?(:user) ? hash[:user] : self.user - uri.password = - hash.has_key?(:password) ? hash[:password] : self.password - end - if !hash.has_key?(:authority) - uri.host = - hash.has_key?(:host) ? hash[:host] : self.host - uri.port = - hash.has_key?(:port) ? hash[:port] : self.port - end - uri.path = - hash.has_key?(:path) ? hash[:path] : self.path - uri.query = - hash.has_key?(:query) ? hash[:query] : self.query - uri.fragment = - hash.has_key?(:fragment) ? hash[:fragment] : self.fragment - end - - return uri - end - - ## - # Destructive form of merge. - # - # @param [Hash, Addressable::URI, #to_hash] The components to merge with. - # - # @return [Addressable::URI] The merged URI. - # - # @see Addressable::URI#merge - def merge!(uri) - replace_self(self.merge(uri)) - end - - ## - # Returns the shortest normalized relative form of this URI that uses the - # supplied URI as a base for resolution. Returns an absolute URI if - # necessary. This is effectively the opposite of route_to. - # - # @param [String, Addressable::URI, #to_str] uri The URI to route from. - # - # @return [Addressable::URI] - # The normalized relative URI that is equivalent to the original URI. - def route_from(uri) - uri = URI.parse(uri).normalize - normalized_self = self.normalize - if normalized_self.relative? - raise ArgumentError, "Expected absolute URI, got: #{self.to_s}" - end - if uri.relative? - raise ArgumentError, "Expected absolute URI, got: #{uri.to_s}" - end - if normalized_self == uri - return Addressable::URI.parse("##{normalized_self.fragment}") - end - components = normalized_self.to_hash - if normalized_self.scheme == uri.scheme - components[:scheme] = nil - if normalized_self.authority == uri.authority - components[:user] = nil - components[:password] = nil - components[:host] = nil - components[:port] = nil - if normalized_self.path == uri.path - components[:path] = nil - if normalized_self.query == uri.query - components[:query] = nil - end - else - if uri.path != SLASH and components[:path] - self_splitted_path = split_path(components[:path]) - uri_splitted_path = split_path(uri.path) - self_dir = self_splitted_path.shift - uri_dir = uri_splitted_path.shift - while !self_splitted_path.empty? && !uri_splitted_path.empty? and self_dir == uri_dir - self_dir = self_splitted_path.shift - uri_dir = uri_splitted_path.shift - end - components[:path] = (uri_splitted_path.fill('..') + [self_dir] + self_splitted_path).join(SLASH) - end - end - end - end - # Avoid network-path references. - if components[:host] != nil - components[:scheme] = normalized_self.scheme - end - return Addressable::URI.new( - :scheme => components[:scheme], - :user => components[:user], - :password => components[:password], - :host => components[:host], - :port => components[:port], - :path => components[:path], - :query => components[:query], - :fragment => components[:fragment] - ) - end - - ## - # Returns the shortest normalized relative form of the supplied URI that - # uses this URI as a base for resolution. Returns an absolute URI if - # necessary. This is effectively the opposite of route_from. - # - # @param [String, Addressable::URI, #to_str] uri The URI to route to. - # - # @return [Addressable::URI] - # The normalized relative URI that is equivalent to the supplied URI. - def route_to(uri) - return URI.parse(uri).route_from(self) - end - - ## - # Returns a normalized URI object. - # - # NOTE: This method does not attempt to fully conform to specifications. - # It exists largely to correct other people's failures to read the - # specifications, and also to deal with caching issues since several - # different URIs may represent the same resource and should not be - # cached multiple times. - # - # @return [Addressable::URI] The normalized URI. - def normalize - # This is a special exception for the frequently misused feed - # URI scheme. - if normalized_scheme == "feed" - if self.to_s =~ /^feed:\/*http:\/*/ - return URI.parse( - self.to_s[/^feed:\/*(http:\/*.*)/, 1] - ).normalize - end - end - - return self.class.new( - :scheme => normalized_scheme, - :authority => normalized_authority, - :path => normalized_path, - :query => normalized_query, - :fragment => normalized_fragment - ) - end - - ## - # Destructively normalizes this URI object. - # - # @return [Addressable::URI] The normalized URI. - # - # @see Addressable::URI#normalize - def normalize! - replace_self(self.normalize) - end - - ## - # Creates a URI suitable for display to users. If semantic attacks are - # likely, the application should try to detect these and warn the user. - # See RFC 3986, - # section 7.6 for more information. - # - # @return [Addressable::URI] A URI suitable for display purposes. - def display_uri - display_uri = self.normalize - display_uri.host = ::Addressable::IDNA.to_unicode(display_uri.host) - return display_uri - end - - ## - # Returns true if the URI objects are equal. This method - # normalizes both URIs before doing the comparison, and allows comparison - # against Strings. - # - # @param [Object] uri The URI to compare. - # - # @return [TrueClass, FalseClass] - # true if the URIs are equivalent, false - # otherwise. - def ===(uri) - if uri.respond_to?(:normalize) - uri_string = uri.normalize.to_s - else - begin - uri_string = ::Addressable::URI.parse(uri).normalize.to_s - rescue InvalidURIError, TypeError - return false - end - end - return self.normalize.to_s == uri_string - end - - ## - # Returns true if the URI objects are equal. This method - # normalizes both URIs before doing the comparison. - # - # @param [Object] uri The URI to compare. - # - # @return [TrueClass, FalseClass] - # true if the URIs are equivalent, false - # otherwise. - def ==(uri) - return false unless uri.kind_of?(URI) - return self.normalize.to_s == uri.normalize.to_s - end - - ## - # Returns true if the URI objects are equal. This method - # does NOT normalize either URI before doing the comparison. - # - # @param [Object] uri The URI to compare. - # - # @return [TrueClass, FalseClass] - # true if the URIs are equivalent, false - # otherwise. - def eql?(uri) - return false unless uri.kind_of?(URI) - return self.to_s == uri.to_s - end - - ## - # A hash value that will make a URI equivalent to its normalized - # form. - # - # @return [Integer] A hash of the URI. - def hash - return @hash ||= (self.to_s.hash * -1) - end - - ## - # Clones the URI object. - # - # @return [Addressable::URI] The cloned URI. - def dup - duplicated_uri = self.class.new( - :scheme => self.scheme ? self.scheme.dup : nil, - :user => self.user ? self.user.dup : nil, - :password => self.password ? self.password.dup : nil, - :host => self.host ? self.host.dup : nil, - :port => self.port, - :path => self.path ? self.path.dup : nil, - :query => self.query ? self.query.dup : nil, - :fragment => self.fragment ? self.fragment.dup : nil - ) - return duplicated_uri - end - - ## - # Omits components from a URI. - # - # @param [Symbol] *components The components to be omitted. - # - # @return [Addressable::URI] The URI with components omitted. - # - # @example - # uri = Addressable::URI.parse("http://example.com/path?query") - # #=> # - # uri.omit(:scheme, :authority) - # #=> # - def omit(*components) - invalid_components = components - [ - :scheme, :user, :password, :userinfo, :host, :port, :authority, - :path, :query, :fragment - ] - unless invalid_components.empty? - raise ArgumentError, - "Invalid component names: #{invalid_components.inspect}." - end - duplicated_uri = self.dup - duplicated_uri.defer_validation do - components.each do |component| - duplicated_uri.send((component.to_s + "=").to_sym, nil) - end - duplicated_uri.user = duplicated_uri.normalized_user - end - duplicated_uri - end - - ## - # Destructive form of omit. - # - # @param [Symbol] *components The components to be omitted. - # - # @return [Addressable::URI] The URI with components omitted. - # - # @see Addressable::URI#omit - def omit!(*components) - replace_self(self.omit(*components)) - end - - ## - # Determines if the URI is an empty string. - # - # @return [TrueClass, FalseClass] - # Returns true if empty, false otherwise. - def empty? - return self.to_s.empty? - end - - ## - # Converts the URI to a String. - # - # @return [String] The URI's String representation. - def to_s - if self.scheme == nil && self.path != nil && !self.path.empty? && - self.path =~ NORMPATH - raise InvalidURIError, - "Cannot assemble URI string with ambiguous path: '#{self.path}'" - end - @uri_string ||= (begin - uri_string = "" - uri_string << "#{self.scheme}:" if self.scheme != nil - uri_string << "//#{self.authority}" if self.authority != nil - uri_string << self.path.to_s - uri_string << "?#{self.query}" if self.query != nil - uri_string << "##{self.fragment}" if self.fragment != nil - if uri_string.respond_to?(:force_encoding) - uri_string.force_encoding(Encoding::UTF_8) - end - uri_string - end) - end - - ## - # URI's are glorified Strings. Allow implicit conversion. - alias_method :to_str, :to_s - - ## - # Returns a Hash of the URI components. - # - # @return [Hash] The URI as a Hash of components. - def to_hash - return { - :scheme => self.scheme, - :user => self.user, - :password => self.password, - :host => self.host, - :port => self.port, - :path => self.path, - :query => self.query, - :fragment => self.fragment - } - end - - ## - # Returns a String representation of the URI object's state. - # - # @return [String] The URI object's state, as a String. - def inspect - sprintf("#<%s:%#0x URI:%s>", URI.to_s, self.object_id, self.to_s) - end - - ## - # This method allows you to make several changes to a URI simultaneously, - # which separately would cause validation errors, but in conjunction, - # are valid. The URI will be revalidated as soon as the entire block has - # been executed. - # - # @param [Proc] block - # A set of operations to perform on a given URI. - def defer_validation(&block) - raise LocalJumpError, "No block given." unless block - @validation_deferred = true - block.call() - @validation_deferred = false - validate - return nil - end - - private - SELF_REF = '.' - PARENT = '..' - - RULE_2A = /\/\.\/|\/\.$/ - RULE_2B_2C = /\/([^\/]*)\/\.\.\/|\/([^\/]*)\/\.\.$/ - RULE_2D = /^\.\.?\/?/ - RULE_PREFIXED_PARENT = /^\/\.\.?\/|^(\/\.\.?)+\/?$/ - - ## - # Resolves paths to their simplest form. - # - # @param [String] path The path to normalize. - # - # @return [String] The normalized path. - def self.normalize_path(path) - # Section 5.2.4 of RFC 3986 - - return nil if path.nil? - normalized_path = path.dup - begin - mod = nil - mod ||= normalized_path.gsub!(RULE_2A, SLASH) - - pair = normalized_path.match(RULE_2B_2C) - parent, current = pair[1], pair[2] if pair - if pair && ((parent != SELF_REF && parent != PARENT) || - (current != SELF_REF && current != PARENT)) - mod ||= normalized_path.gsub!( - Regexp.new( - "/#{Regexp.escape(parent.to_s)}/\\.\\./|" + - "(/#{Regexp.escape(current.to_s)}/\\.\\.$)" - ), SLASH - ) - end - - mod ||= normalized_path.gsub!(RULE_2D, EMPTY_STR) - # Non-standard, removes prefixed dotted segments from path. - mod ||= normalized_path.gsub!(RULE_PREFIXED_PARENT, SLASH) - end until mod.nil? - - return normalized_path - end - - ## - # Ensures that the URI is valid. - def validate - return if !!@validation_deferred - if self.scheme != nil && self.ip_based? && - (self.host == nil || self.host.empty?) && - (self.path == nil || self.path.empty?) - raise InvalidURIError, - "Absolute URI missing hierarchical segment: '#{self.to_s}'" - end - if self.host == nil - if self.port != nil || - self.user != nil || - self.password != nil - raise InvalidURIError, "Hostname not supplied: '#{self.to_s}'" - end - end - if self.path != nil && !self.path.empty? && self.path[0..0] != SLASH && - self.authority != nil - raise InvalidURIError, - "Cannot have a relative path with an authority set: '#{self.to_s}'" - end - return nil - end - - ## - # Replaces the internal state of self with the specified URI's state. - # Used in destructive operations to avoid massive code repetition. - # - # @param [Addressable::URI] uri The URI to replace self with. - # - # @return [Addressable::URI] self. - def replace_self(uri) - # Reset dependant values - instance_variables.each do |var| - instance_variable_set(var, nil) - end - - @scheme = uri.scheme - @user = uri.user - @password = uri.password - @host = uri.host - @port = uri.port - @path = uri.path - @query = uri.query - @fragment = uri.fragment - return self - end - - ## - # Splits path string with "/"(slash). - # It is considered that there is empty string after last slash when - # path ends with slash. - # - # @param [String] path The path to split. - # - # @return [Array] An array of parts of path. - def split_path(path) - splitted = path.split(SLASH) - splitted << EMPTY_STR if path.end_with? SLASH - splitted - end - end -end diff --git a/.gems/gems/addressable-2.3.6/lib/addressable/version.rb b/.gems/gems/addressable-2.3.6/lib/addressable/version.rb deleted file mode 100644 index 75a9ad8..0000000 --- a/.gems/gems/addressable-2.3.6/lib/addressable/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# encoding:utf-8 -#-- -# Copyright (C) 2006-2013 Bob Aman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#++ - - -# Used to prevent the class/module from being loaded more than once -if !defined?(Addressable::VERSION) - module Addressable - module VERSION - MAJOR = 2 - MINOR = 3 - TINY = 6 - - STRING = [MAJOR, MINOR, TINY].join('.') - end - end -end diff --git a/.gems/gems/addressable-2.3.6/spec/addressable/idna_spec.rb b/.gems/gems/addressable-2.3.6/spec/addressable/idna_spec.rb deleted file mode 100644 index b3c778a..0000000 --- a/.gems/gems/addressable-2.3.6/spec/addressable/idna_spec.rb +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 -# Copyright (C) 2006-2013 Bob Aman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -require "spec_helper" - -# Have to use RubyGems to load the idn gem. -require "rubygems" - -require "addressable/idna" - -shared_examples_for "converting from unicode to ASCII" do - it "should convert 'www.google.com' correctly" do - Addressable::IDNA.to_ascii("www.google.com").should == "www.google.com" - end - - it "should convert 'www.詹姆斯.com' correctly" do - Addressable::IDNA.to_ascii( - "www.詹姆斯.com" - ).should == "www.xn--8ws00zhy3a.com" - end - - it "should convert 'www.Iñtërnâtiônàlizætiøn.com' correctly" do - "www.Iñtërnâtiônàlizætiøn.com" - Addressable::IDNA.to_ascii( - "www.I\xC3\xB1t\xC3\xABrn\xC3\xA2ti\xC3\xB4" + - "n\xC3\xA0liz\xC3\xA6ti\xC3\xB8n.com" - ).should == "www.xn--itrntinliztin-vdb0a5exd8ewcye.com" - end - - it "should convert 'www.Iñtërnâtiônàlizætiøn.com' correctly" do - Addressable::IDNA.to_ascii( - "www.In\xCC\x83te\xCC\x88rna\xCC\x82tio\xCC\x82n" + - "a\xCC\x80liz\xC3\xA6ti\xC3\xB8n.com" - ).should == "www.xn--itrntinliztin-vdb0a5exd8ewcye.com" - end - - it "should convert " + - "'www.ほんとうにながいわけのわからないどめいんめいのらべるまだながくしないとたりない.w3.mag.keio.ac.jp' " + - "correctly" do - Addressable::IDNA.to_ascii( - "www.\343\201\273\343\202\223\343\201\250\343\201\206\343\201\253\343" + - "\201\252\343\201\214\343\201\204\343\202\217\343\201\221\343\201\256" + - "\343\202\217\343\201\213\343\202\211\343\201\252\343\201\204\343\201" + - "\251\343\202\201\343\201\204\343\202\223\343\202\201\343\201\204\343" + - "\201\256\343\202\211\343\201\271\343\202\213\343\201\276\343\201\240" + - "\343\201\252\343\201\214\343\201\217\343\201\227\343\201\252\343\201" + - "\204\343\201\250\343\201\237\343\202\212\343\201\252\343\201\204." + - "w3.mag.keio.ac.jp" - ).should == - "www.xn--n8jaaaaai5bhf7as8fsfk3jnknefdde3" + - "fg11amb5gzdb4wi9bya3kc6lra.w3.mag.keio.ac.jp" - end - - it "should convert " + - "'www.ほんとうにながいわけのわからないどめいんめいのらべるまだながくしないとたりない.w3.mag.keio.ac.jp' " + - "correctly" do - Addressable::IDNA.to_ascii( - "www.\343\201\273\343\202\223\343\201\250\343\201\206\343\201\253\343" + - "\201\252\343\201\213\343\202\231\343\201\204\343\202\217\343\201\221" + - "\343\201\256\343\202\217\343\201\213\343\202\211\343\201\252\343\201" + - "\204\343\201\250\343\202\231\343\202\201\343\201\204\343\202\223\343" + - "\202\201\343\201\204\343\201\256\343\202\211\343\201\270\343\202\231" + - "\343\202\213\343\201\276\343\201\237\343\202\231\343\201\252\343\201" + - "\213\343\202\231\343\201\217\343\201\227\343\201\252\343\201\204\343" + - "\201\250\343\201\237\343\202\212\343\201\252\343\201\204." + - "w3.mag.keio.ac.jp" - ).should == - "www.xn--n8jaaaaai5bhf7as8fsfk3jnknefdde3" + - "fg11amb5gzdb4wi9bya3kc6lra.w3.mag.keio.ac.jp" - end - - it "should convert '点心和烤鸭.w3.mag.keio.ac.jp' correctly" do - Addressable::IDNA.to_ascii( - "点心和烤鸭.w3.mag.keio.ac.jp" - ).should == "xn--0trv4xfvn8el34t.w3.mag.keio.ac.jp" - end - - it "should convert '가각갂갃간갅갆갇갈갉힢힣.com' correctly" do - Addressable::IDNA.to_ascii( - "가각갂갃간갅갆갇갈갉힢힣.com" - ).should == "xn--o39acdefghijk5883jma.com" - end - - it "should convert " + - "'\347\242\274\346\250\231\346\272\226\350" + - "\220\254\345\234\213\347\242\274.com' correctly" do - Addressable::IDNA.to_ascii( - "\347\242\274\346\250\231\346\272\226\350" + - "\220\254\345\234\213\347\242\274.com" - ).should == "xn--9cs565brid46mda086o.com" - end - - it "should convert 'リ宠퐱〹.com' correctly" do - Addressable::IDNA.to_ascii( - "\357\276\230\345\256\240\355\220\261\343\200\271.com" - ).should == "xn--eek174hoxfpr4k.com" - end - - it "should convert 'リ宠퐱卄.com' correctly" do - Addressable::IDNA.to_ascii( - "\343\203\252\345\256\240\355\220\261\345\215\204.com" - ).should == "xn--eek174hoxfpr4k.com" - end - - it "should convert 'ᆵ' correctly" do - Addressable::IDNA.to_ascii( - "\341\206\265" - ).should == "xn--4ud" - end - - it "should convert 'ᆵ' correctly" do - Addressable::IDNA.to_ascii( - "\357\276\257" - ).should == "xn--4ud" - end -end - -shared_examples_for "converting from ASCII to unicode" do - it "should convert 'www.google.com' correctly" do - Addressable::IDNA.to_unicode("www.google.com").should == "www.google.com" - end - - it "should convert 'www.詹姆斯.com' correctly" do - Addressable::IDNA.to_unicode( - "www.xn--8ws00zhy3a.com" - ).should == "www.詹姆斯.com" - end - - it "should convert 'www.iñtërnâtiônàlizætiøn.com' correctly" do - Addressable::IDNA.to_unicode( - "www.xn--itrntinliztin-vdb0a5exd8ewcye.com" - ).should == "www.iñtërnâtiônàlizætiøn.com" - end - - it "should convert " + - "'www.ほんとうにながいわけのわからないどめいんめいのらべるまだながくしないとたりない.w3.mag.keio.ac.jp' " + - "correctly" do - Addressable::IDNA.to_unicode( - "www.xn--n8jaaaaai5bhf7as8fsfk3jnknefdde3" + - "fg11amb5gzdb4wi9bya3kc6lra.w3.mag.keio.ac.jp" - ).should == - "www.ほんとうにながいわけのわからないどめいんめいのらべるまだながくしないとたりない.w3.mag.keio.ac.jp" - end - - it "should convert '点心和烤鸭.w3.mag.keio.ac.jp' correctly" do - Addressable::IDNA.to_unicode( - "xn--0trv4xfvn8el34t.w3.mag.keio.ac.jp" - ).should == "点心和烤鸭.w3.mag.keio.ac.jp" - end - - it "should convert '가각갂갃간갅갆갇갈갉힢힣.com' correctly" do - Addressable::IDNA.to_unicode( - "xn--o39acdefghijk5883jma.com" - ).should == "가각갂갃간갅갆갇갈갉힢힣.com" - end - - it "should convert " + - "'\347\242\274\346\250\231\346\272\226\350" + - "\220\254\345\234\213\347\242\274.com' correctly" do - Addressable::IDNA.to_unicode( - "xn--9cs565brid46mda086o.com" - ).should == - "\347\242\274\346\250\231\346\272\226\350" + - "\220\254\345\234\213\347\242\274.com" - end - - it "should convert 'リ宠퐱卄.com' correctly" do - Addressable::IDNA.to_unicode( - "xn--eek174hoxfpr4k.com" - ).should == "\343\203\252\345\256\240\355\220\261\345\215\204.com" - end - - it "should convert 'ᆵ' correctly" do - Addressable::IDNA.to_unicode( - "xn--4ud" - ).should == "\341\206\265" - end - - it "should normalize 'string' correctly" do - Addressable::IDNA.unicode_normalize_kc(:'string').should == "string" - Addressable::IDNA.unicode_normalize_kc("string").should == "string" - end -end - -describe Addressable::IDNA, "when using the pure-Ruby implementation" do - before do - Addressable.send(:remove_const, :IDNA) - load "addressable/idna/pure.rb" - end - - it_should_behave_like "converting from unicode to ASCII" - it_should_behave_like "converting from ASCII to unicode" - - begin - require "fiber" - - it "should not blow up inside fibers" do - f = Fiber.new do - Addressable.send(:remove_const, :IDNA) - load "addressable/idna/pure.rb" - end - f.resume - end - rescue LoadError - # Fibers aren't supported in this version of Ruby, skip this test. - warn('Fibers unsupported.') - end -end - -begin - require "idn" - - describe Addressable::IDNA, "when using the native-code implementation" do - before do - Addressable.send(:remove_const, :IDNA) - load "addressable/idna/native.rb" - end - - it_should_behave_like "converting from unicode to ASCII" - it_should_behave_like "converting from ASCII to unicode" - end -rescue LoadError - # Cannot test the native implementation without libidn support. - warn('Could not load native IDN implementation.') -end diff --git a/.gems/gems/addressable-2.3.6/spec/addressable/net_http_compat_spec.rb b/.gems/gems/addressable-2.3.6/spec/addressable/net_http_compat_spec.rb deleted file mode 100644 index 87a3bdd..0000000 --- a/.gems/gems/addressable-2.3.6/spec/addressable/net_http_compat_spec.rb +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 -# Copyright (C) 2006-2013 Bob Aman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -require "spec_helper" - -require "addressable/uri" -require "net/http" - -describe Net::HTTP do - it "should be compatible with Addressable" do - response_body = - Net::HTTP.get(Addressable::URI.parse('http://www.google.com/')) - response_body.should_not be_nil - end -end diff --git a/.gems/gems/addressable-2.3.6/spec/addressable/template_spec.rb b/.gems/gems/addressable-2.3.6/spec/addressable/template_spec.rb deleted file mode 100644 index 759c19d..0000000 --- a/.gems/gems/addressable-2.3.6/spec/addressable/template_spec.rb +++ /dev/null @@ -1,1328 +0,0 @@ -# coding: utf-8 -# Copyright (C) 2006-2013 Bob Aman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -require "spec_helper" - -require "addressable/template" - -shared_examples_for 'expands' do |tests| - tests.each do |template, expansion| - exp = expansion.is_a?(Array) ? expansion.first : expansion - it "#{template} to #{exp}" do - tmpl = Addressable::Template.new(template).expand(subject) - if expansion.is_a?(Array) - expansion.any?{|i| i == tmpl.to_str}.should be_true - else - tmpl.to_str.should == expansion - end - end - end -end - -describe "eql?" do - let(:template) { Addressable::Template.new('https://www.example.com/{foo}') } - it 'is equal when the pattern matches' do - other_template = Addressable::Template.new('https://www.example.com/{foo}') - expect(template).to be_eql(other_template) - expect(other_template).to be_eql(template) - end - it 'is not equal when the pattern differs' do - other_template = Addressable::Template.new('https://www.example.com/{bar}') - expect(template).to_not be_eql(other_template) - expect(other_template).to_not be_eql(template) - end - it 'is not equal to non-templates' do - uri = 'https://www.example.com/foo/bar' - addressable_template = Addressable::Template.new uri - addressable_uri = Addressable::URI.parse uri - expect(addressable_template).to_not be_eql(addressable_uri) - expect(addressable_uri).to_not be_eql(addressable_template) - end -end - -describe "==" do - let(:template) { Addressable::Template.new('https://www.example.com/{foo}') } - it 'is equal when the pattern matches' do - other_template = Addressable::Template.new('https://www.example.com/{foo}') - expect(template).should == other_template - expect(other_template).should == template - end - it 'is not equal when the pattern differs' do - other_template = Addressable::Template.new('https://www.example.com/{bar}') - expect(template).should_not == other_template - expect(other_template).should_not == template - end - it 'is not equal to non-templates' do - uri = 'https://www.example.com/foo/bar' - addressable_template = Addressable::Template.new uri - addressable_uri = Addressable::URI.parse uri - expect(addressable_template).should_not == addressable_uri - expect(addressable_uri).should_not == addressable_template - end -end - -describe "Type conversion" do - require "bigdecimal" - - subject { - { - :var => true, - :hello => 1234, - :nothing => nil, - :sym => :symbolic, - :decimal => BigDecimal.new(1) - } - } - - it_behaves_like 'expands', { - '{var}' => 'true', - '{hello}' => '1234', - '{nothing}' => '', - '{sym}' => 'symbolic', - '{decimal}' => '0.1E1' - } -end - -describe "Level 1:" do - subject { - {:var => "value", :hello => "Hello World!"} - } - it_behaves_like 'expands', { - '{var}' => 'value', - '{hello}' => 'Hello%20World%21' - } -end - -describe "Level 2" do - subject { - { - :var => "value", - :hello => "Hello World!", - :path => "/foo/bar" - } - } - context "Operator +:" do - it_behaves_like 'expands', { - '{+var}' => 'value', - '{+hello}' => 'Hello%20World!', - '{+path}/here' => '/foo/bar/here', - 'here?ref={+path}' => 'here?ref=/foo/bar' - } - end - context "Operator #:" do - it_behaves_like 'expands', { - 'X{#var}' => 'X#value', - 'X{#hello}' => 'X#Hello%20World!' - } - end -end - -describe "Level 3" do - subject { - { - :var => "value", - :hello => "Hello World!", - :empty => "", - :path => "/foo/bar", - :x => "1024", - :y => "768" - } - } - context "Operator nil (multiple vars):" do - it_behaves_like 'expands', { - 'map?{x,y}' => 'map?1024,768', - '{x,hello,y}' => '1024,Hello%20World%21,768' - } - end - context "Operator + (multiple vars):" do - it_behaves_like 'expands', { - '{+x,hello,y}' => '1024,Hello%20World!,768', - '{+path,x}/here' => '/foo/bar,1024/here' - } - end - context "Operator # (multiple vars):" do - it_behaves_like 'expands', { - '{#x,hello,y}' => '#1024,Hello%20World!,768', - '{#path,x}/here' => '#/foo/bar,1024/here' - } - end - context "Operator ." do - it_behaves_like 'expands', { - 'X{.var}' => 'X.value', - 'X{.x,y}' => 'X.1024.768' - } - end - context "Operator /" do - it_behaves_like 'expands', { - '{/var}' => '/value', - '{/var,x}/here' => '/value/1024/here' - } - end - context "Operator ;" do - it_behaves_like 'expands', { - '{;x,y}' => ';x=1024;y=768', - '{;x,y,empty}' => ';x=1024;y=768;empty' - } - end - context "Operator ?" do - it_behaves_like 'expands', { - '{?x,y}' => '?x=1024&y=768', - '{?x,y,empty}' => '?x=1024&y=768&empty=' - } - end - context "Operator &" do - it_behaves_like 'expands', { - '?fixed=yes{&x}' => '?fixed=yes&x=1024', - '{&x,y,empty}' => '&x=1024&y=768&empty=' - } - end -end - -describe "Level 4" do - subject { - { - :var => "value", - :hello => "Hello World!", - :path => "/foo/bar", - :semi => ";", - :list => %w(red green blue), - :keys => {"semi" => ';', "dot" => '.', "comma" => ','} - } - } - context "Expansion with value modifiers" do - it_behaves_like 'expands', { - '{var:3}' => 'val', - '{var:30}' => 'value', - '{list}' => 'red,green,blue', - '{list*}' => 'red,green,blue', - '{keys}' => [ - 'semi,%3B,dot,.,comma,%2C', - 'dot,.,semi,%3B,comma,%2C', - 'comma,%2C,semi,%3B,dot,.', - 'semi,%3B,comma,%2C,dot,.', - 'dot,.,comma,%2C,semi,%3B', - 'comma,%2C,dot,.,semi,%3B' - ], - '{keys*}' => [ - 'semi=%3B,dot=.,comma=%2C', - 'dot=.,semi=%3B,comma=%2C', - 'comma=%2C,semi=%3B,dot=.', - 'semi=%3B,comma=%2C,dot=.', - 'dot=.,comma=%2C,semi=%3B', - 'comma=%2C,dot=.,semi=%3B' - ] - } - end - context "Operator + with value modifiers" do - it_behaves_like 'expands', { - '{+path:6}/here' => '/foo/b/here', - '{+list}' => 'red,green,blue', - '{+list*}' => 'red,green,blue', - '{+keys}' => [ - 'semi,;,dot,.,comma,,', - 'dot,.,semi,;,comma,,', - 'comma,,,semi,;,dot,.', - 'semi,;,comma,,,dot,.', - 'dot,.,comma,,,semi,;', - 'comma,,,dot,.,semi,;' - ], - '{+keys*}' => [ - 'semi=;,dot=.,comma=,', - 'dot=.,semi=;,comma=,', - 'comma=,,semi=;,dot=.', - 'semi=;,comma=,,dot=.', - 'dot=.,comma=,,semi=;', - 'comma=,,dot=.,semi=;' - ] - } - end - context "Operator # with value modifiers" do - it_behaves_like 'expands', { - '{#path:6}/here' => '#/foo/b/here', - '{#list}' => '#red,green,blue', - '{#list*}' => '#red,green,blue', - '{#keys}' => [ - '#semi,;,dot,.,comma,,', - '#dot,.,semi,;,comma,,', - '#comma,,,semi,;,dot,.', - '#semi,;,comma,,,dot,.', - '#dot,.,comma,,,semi,;', - '#comma,,,dot,.,semi,;' - ], - '{#keys*}' => [ - '#semi=;,dot=.,comma=,', - '#dot=.,semi=;,comma=,', - '#comma=,,semi=;,dot=.', - '#semi=;,comma=,,dot=.', - '#dot=.,comma=,,semi=;', - '#comma=,,dot=.,semi=;' - ] - } - end - context "Operator . with value modifiers" do - it_behaves_like 'expands', { - 'X{.var:3}' => 'X.val', - 'X{.list}' => 'X.red,green,blue', - 'X{.list*}' => 'X.red.green.blue', - 'X{.keys}' => [ - 'X.semi,%3B,dot,.,comma,%2C', - 'X.dot,.,semi,%3B,comma,%2C', - 'X.comma,%2C,semi,%3B,dot,.', - 'X.semi,%3B,comma,%2C,dot,.', - 'X.dot,.,comma,%2C,semi,%3B', - 'X.comma,%2C,dot,.,semi,%3B' - ], - 'X{.keys*}' => [ - 'X.semi=%3B.dot=..comma=%2C', - 'X.dot=..semi=%3B.comma=%2C', - 'X.comma=%2C.semi=%3B.dot=.', - 'X.semi=%3B.comma=%2C.dot=.', - 'X.dot=..comma=%2C.semi=%3B', - 'X.comma=%2C.dot=..semi=%3B' - ] - } - end - context "Operator / with value modifiers" do - it_behaves_like 'expands', { - '{/var:1,var}' => '/v/value', - '{/list}' => '/red,green,blue', - '{/list*}' => '/red/green/blue', - '{/list*,path:4}' => '/red/green/blue/%2Ffoo', - '{/keys}' => [ - '/semi,%3B,dot,.,comma,%2C', - '/dot,.,semi,%3B,comma,%2C', - '/comma,%2C,semi,%3B,dot,.', - '/semi,%3B,comma,%2C,dot,.', - '/dot,.,comma,%2C,semi,%3B', - '/comma,%2C,dot,.,semi,%3B' - ], - '{/keys*}' => [ - '/semi=%3B/dot=./comma=%2C', - '/dot=./semi=%3B/comma=%2C', - '/comma=%2C/semi=%3B/dot=.', - '/semi=%3B/comma=%2C/dot=.', - '/dot=./comma=%2C/semi=%3B', - '/comma=%2C/dot=./semi=%3B' - ] - } - end - context "Operator ; with value modifiers" do - it_behaves_like 'expands', { - '{;hello:5}' => ';hello=Hello', - '{;list}' => ';list=red,green,blue', - '{;list*}' => ';list=red;list=green;list=blue', - '{;keys}' => [ - ';keys=semi,%3B,dot,.,comma,%2C', - ';keys=dot,.,semi,%3B,comma,%2C', - ';keys=comma,%2C,semi,%3B,dot,.', - ';keys=semi,%3B,comma,%2C,dot,.', - ';keys=dot,.,comma,%2C,semi,%3B', - ';keys=comma,%2C,dot,.,semi,%3B' - ], - '{;keys*}' => [ - ';semi=%3B;dot=.;comma=%2C', - ';dot=.;semi=%3B;comma=%2C', - ';comma=%2C;semi=%3B;dot=.', - ';semi=%3B;comma=%2C;dot=.', - ';dot=.;comma=%2C;semi=%3B', - ';comma=%2C;dot=.;semi=%3B' - ] - } - end - context "Operator ? with value modifiers" do - it_behaves_like 'expands', { - '{?var:3}' => '?var=val', - '{?list}' => '?list=red,green,blue', - '{?list*}' => '?list=red&list=green&list=blue', - '{?keys}' => [ - '?keys=semi,%3B,dot,.,comma,%2C', - '?keys=dot,.,semi,%3B,comma,%2C', - '?keys=comma,%2C,semi,%3B,dot,.', - '?keys=semi,%3B,comma,%2C,dot,.', - '?keys=dot,.,comma,%2C,semi,%3B', - '?keys=comma,%2C,dot,.,semi,%3B' - ], - '{?keys*}' => [ - '?semi=%3B&dot=.&comma=%2C', - '?dot=.&semi=%3B&comma=%2C', - '?comma=%2C&semi=%3B&dot=.', - '?semi=%3B&comma=%2C&dot=.', - '?dot=.&comma=%2C&semi=%3B', - '?comma=%2C&dot=.&semi=%3B' - ] - } - end - context "Operator & with value modifiers" do - it_behaves_like 'expands', { - '{&var:3}' => '&var=val', - '{&list}' => '&list=red,green,blue', - '{&list*}' => '&list=red&list=green&list=blue', - '{&keys}' => [ - '&keys=semi,%3B,dot,.,comma,%2C', - '&keys=dot,.,semi,%3B,comma,%2C', - '&keys=comma,%2C,semi,%3B,dot,.', - '&keys=semi,%3B,comma,%2C,dot,.', - '&keys=dot,.,comma,%2C,semi,%3B', - '&keys=comma,%2C,dot,.,semi,%3B' - ], - '{&keys*}' => [ - '&semi=%3B&dot=.&comma=%2C', - '&dot=.&semi=%3B&comma=%2C', - '&comma=%2C&semi=%3B&dot=.', - '&semi=%3B&comma=%2C&dot=.', - '&dot=.&comma=%2C&semi=%3B', - '&comma=%2C&dot=.&semi=%3B' - ] - } - end -end -describe "Modifiers" do - subject { - { - :var => "value", - :semi => ";", - :year => %w(1965 2000 2012), - :dom => %w(example com) - } - } - context "length" do - it_behaves_like 'expands', { - '{var:3}' => 'val', - '{var:30}' => 'value', - '{var}' => 'value', - '{semi}' => '%3B', - '{semi:2}' => '%3B' - } - end - context "explode" do - it_behaves_like 'expands', { - 'find{?year*}' => 'find?year=1965&year=2000&year=2012', - 'www{.dom*}' => 'www.example.com', - } - end -end -describe "Expansion" do - subject { - { - :count => ["one", "two", "three"], - :dom => ["example", "com"], - :dub => "me/too", - :hello => "Hello World!", - :half => "50%", - :var => "value", - :who => "fred", - :base => "http://example.com/home/", - :path => "/foo/bar", - :list => ["red", "green", "blue"], - :keys => {"semi" => ";","dot" => ".","comma" => ","}, - :v => "6", - :x => "1024", - :y => "768", - :empty => "", - :empty_keys => {}, - :undef => nil - } - } - context "concatenation" do - it_behaves_like 'expands', { - '{count}' => 'one,two,three', - '{count*}' => 'one,two,three', - '{/count}' => '/one,two,three', - '{/count*}' => '/one/two/three', - '{;count}' => ';count=one,two,three', - '{;count*}' => ';count=one;count=two;count=three', - '{?count}' => '?count=one,two,three', - '{?count*}' => '?count=one&count=two&count=three', - '{&count*}' => '&count=one&count=two&count=three' - } - end - context "simple expansion" do - it_behaves_like 'expands', { - '{var}' => 'value', - '{hello}' => 'Hello%20World%21', - '{half}' => '50%25', - 'O{empty}X' => 'OX', - 'O{undef}X' => 'OX', - '{x,y}' => '1024,768', - '{x,hello,y}' => '1024,Hello%20World%21,768', - '?{x,empty}' => '?1024,', - '?{x,undef}' => '?1024', - '?{undef,y}' => '?768', - '{var:3}' => 'val', - '{var:30}' => 'value', - '{list}' => 'red,green,blue', - '{list*}' => 'red,green,blue', - '{keys}' => [ - 'semi,%3B,dot,.,comma,%2C', - 'dot,.,semi,%3B,comma,%2C', - 'comma,%2C,semi,%3B,dot,.', - 'semi,%3B,comma,%2C,dot,.', - 'dot,.,comma,%2C,semi,%3B', - 'comma,%2C,dot,.,semi,%3B' - ], - '{keys*}' => [ - 'semi=%3B,dot=.,comma=%2C', - 'dot=.,semi=%3B,comma=%2C', - 'comma=%2C,semi=%3B,dot=.', - 'semi=%3B,comma=%2C,dot=.', - 'dot=.,comma=%2C,semi=%3B', - 'comma=%2C,dot=.,semi=%3B' - ] - } - end - context "reserved expansion (+)" do - it_behaves_like 'expands', { - '{+var}' => 'value', - '{+hello}' => 'Hello%20World!', - '{+half}' => '50%25', - '{base}index' => 'http%3A%2F%2Fexample.com%2Fhome%2Findex', - '{+base}index' => 'http://example.com/home/index', - 'O{+empty}X' => 'OX', - 'O{+undef}X' => 'OX', - '{+path}/here' => '/foo/bar/here', - 'here?ref={+path}' => 'here?ref=/foo/bar', - 'up{+path}{var}/here' => 'up/foo/barvalue/here', - '{+x,hello,y}' => '1024,Hello%20World!,768', - '{+path,x}/here' => '/foo/bar,1024/here', - '{+path:6}/here' => '/foo/b/here', - '{+list}' => 'red,green,blue', - '{+list*}' => 'red,green,blue', - '{+keys}' => [ - 'semi,;,dot,.,comma,,', - 'dot,.,semi,;,comma,,', - 'comma,,,semi,;,dot,.', - 'semi,;,comma,,,dot,.', - 'dot,.,comma,,,semi,;', - 'comma,,,dot,.,semi,;' - ], - '{+keys*}' => [ - 'semi=;,dot=.,comma=,', - 'dot=.,semi=;,comma=,', - 'comma=,,semi=;,dot=.', - 'semi=;,comma=,,dot=.', - 'dot=.,comma=,,semi=;', - 'comma=,,dot=.,semi=;' - ] - } - end - context "fragment expansion (#)" do - it_behaves_like 'expands', { - '{#var}' => '#value', - '{#hello}' => '#Hello%20World!', - '{#half}' => '#50%25', - 'foo{#empty}' => 'foo#', - 'foo{#undef}' => 'foo', - '{#x,hello,y}' => '#1024,Hello%20World!,768', - '{#path,x}/here' => '#/foo/bar,1024/here', - '{#path:6}/here' => '#/foo/b/here', - '{#list}' => '#red,green,blue', - '{#list*}' => '#red,green,blue', - '{#keys}' => [ - '#semi,;,dot,.,comma,,', - '#dot,.,semi,;,comma,,', - '#comma,,,semi,;,dot,.', - '#semi,;,comma,,,dot,.', - '#dot,.,comma,,,semi,;', - '#comma,,,dot,.,semi,;' - ], - '{#keys*}' => [ - '#semi=;,dot=.,comma=,', - '#dot=.,semi=;,comma=,', - '#comma=,,semi=;,dot=.', - '#semi=;,comma=,,dot=.', - '#dot=.,comma=,,semi=;', - '#comma=,,dot=.,semi=;' - ] - } - end - context "label expansion (.)" do - it_behaves_like 'expands', { - '{.who}' => '.fred', - '{.who,who}' => '.fred.fred', - '{.half,who}' => '.50%25.fred', - 'www{.dom*}' => 'www.example.com', - 'X{.var}' => 'X.value', - 'X{.empty}' => 'X.', - 'X{.undef}' => 'X', - 'X{.var:3}' => 'X.val', - 'X{.list}' => 'X.red,green,blue', - 'X{.list*}' => 'X.red.green.blue', - 'X{.keys}' => [ - 'X.semi,%3B,dot,.,comma,%2C', - 'X.dot,.,semi,%3B,comma,%2C', - 'X.comma,%2C,semi,%3B,dot,.', - 'X.semi,%3B,comma,%2C,dot,.', - 'X.dot,.,comma,%2C,semi,%3B', - 'X.comma,%2C,dot,.,semi,%3B' - ], - 'X{.keys*}' => [ - 'X.semi=%3B.dot=..comma=%2C', - 'X.dot=..semi=%3B.comma=%2C', - 'X.comma=%2C.semi=%3B.dot=.', - 'X.semi=%3B.comma=%2C.dot=.', - 'X.dot=..comma=%2C.semi=%3B', - 'X.comma=%2C.dot=..semi=%3B' - ], - 'X{.empty_keys}' => 'X', - 'X{.empty_keys*}' => 'X' - } - end - context "path expansion (/)" do - it_behaves_like 'expands', { - '{/who}' => '/fred', - '{/who,who}' => '/fred/fred', - '{/half,who}' => '/50%25/fred', - '{/who,dub}' => '/fred/me%2Ftoo', - '{/var}' => '/value', - '{/var,empty}' => '/value/', - '{/var,undef}' => '/value', - '{/var,x}/here' => '/value/1024/here', - '{/var:1,var}' => '/v/value', - '{/list}' => '/red,green,blue', - '{/list*}' => '/red/green/blue', - '{/list*,path:4}' => '/red/green/blue/%2Ffoo', - '{/keys}' => [ - '/semi,%3B,dot,.,comma,%2C', - '/dot,.,semi,%3B,comma,%2C', - '/comma,%2C,semi,%3B,dot,.', - '/semi,%3B,comma,%2C,dot,.', - '/dot,.,comma,%2C,semi,%3B', - '/comma,%2C,dot,.,semi,%3B' - ], - '{/keys*}' => [ - '/semi=%3B/dot=./comma=%2C', - '/dot=./semi=%3B/comma=%2C', - '/comma=%2C/semi=%3B/dot=.', - '/semi=%3B/comma=%2C/dot=.', - '/dot=./comma=%2C/semi=%3B', - '/comma=%2C/dot=./semi=%3B' - ] - } - end - context "path-style expansion (;)" do - it_behaves_like 'expands', { - '{;who}' => ';who=fred', - '{;half}' => ';half=50%25', - '{;empty}' => ';empty', - '{;v,empty,who}' => ';v=6;empty;who=fred', - '{;v,bar,who}' => ';v=6;who=fred', - '{;x,y}' => ';x=1024;y=768', - '{;x,y,empty}' => ';x=1024;y=768;empty', - '{;x,y,undef}' => ';x=1024;y=768', - '{;hello:5}' => ';hello=Hello', - '{;list}' => ';list=red,green,blue', - '{;list*}' => ';list=red;list=green;list=blue', - '{;keys}' => [ - ';keys=semi,%3B,dot,.,comma,%2C', - ';keys=dot,.,semi,%3B,comma,%2C', - ';keys=comma,%2C,semi,%3B,dot,.', - ';keys=semi,%3B,comma,%2C,dot,.', - ';keys=dot,.,comma,%2C,semi,%3B', - ';keys=comma,%2C,dot,.,semi,%3B' - ], - '{;keys*}' => [ - ';semi=%3B;dot=.;comma=%2C', - ';dot=.;semi=%3B;comma=%2C', - ';comma=%2C;semi=%3B;dot=.', - ';semi=%3B;comma=%2C;dot=.', - ';dot=.;comma=%2C;semi=%3B', - ';comma=%2C;dot=.;semi=%3B' - ] - } - end - context "form query expansion (?)" do - it_behaves_like 'expands', { - '{?who}' => '?who=fred', - '{?half}' => '?half=50%25', - '{?x,y}' => '?x=1024&y=768', - '{?x,y,empty}' => '?x=1024&y=768&empty=', - '{?x,y,undef}' => '?x=1024&y=768', - '{?var:3}' => '?var=val', - '{?list}' => '?list=red,green,blue', - '{?list*}' => '?list=red&list=green&list=blue', - '{?keys}' => [ - '?keys=semi,%3B,dot,.,comma,%2C', - '?keys=dot,.,semi,%3B,comma,%2C', - '?keys=comma,%2C,semi,%3B,dot,.', - '?keys=semi,%3B,comma,%2C,dot,.', - '?keys=dot,.,comma,%2C,semi,%3B', - '?keys=comma,%2C,dot,.,semi,%3B' - ], - '{?keys*}' => [ - '?semi=%3B&dot=.&comma=%2C', - '?dot=.&semi=%3B&comma=%2C', - '?comma=%2C&semi=%3B&dot=.', - '?semi=%3B&comma=%2C&dot=.', - '?dot=.&comma=%2C&semi=%3B', - '?comma=%2C&dot=.&semi=%3B' - ] - } - end - context "form query expansion (&)" do - it_behaves_like 'expands', { - '{&who}' => '&who=fred', - '{&half}' => '&half=50%25', - '?fixed=yes{&x}' => '?fixed=yes&x=1024', - '{&x,y,empty}' => '&x=1024&y=768&empty=', - '{&x,y,undef}' => '&x=1024&y=768', - '{&var:3}' => '&var=val', - '{&list}' => '&list=red,green,blue', - '{&list*}' => '&list=red&list=green&list=blue', - '{&keys}' => [ - '&keys=semi,%3B,dot,.,comma,%2C', - '&keys=dot,.,semi,%3B,comma,%2C', - '&keys=comma,%2C,semi,%3B,dot,.', - '&keys=semi,%3B,comma,%2C,dot,.', - '&keys=dot,.,comma,%2C,semi,%3B', - '&keys=comma,%2C,dot,.,semi,%3B' - ], - '{&keys*}' => [ - '&semi=%3B&dot=.&comma=%2C', - '&dot=.&semi=%3B&comma=%2C', - '&comma=%2C&semi=%3B&dot=.', - '&semi=%3B&comma=%2C&dot=.', - '&dot=.&comma=%2C&semi=%3B', - '&comma=%2C&dot=.&semi=%3B' - ] - } - end -end - -class ExampleTwoProcessor - def self.restore(name, value) - return value.gsub(/-/, " ") if name == "query" - return value - end - - def self.match(name) - return ".*?" if name == "first" - return ".*" - end - def self.validate(name, value) - return !!(value =~ /^[\w ]+$/) if name == "query" - return true - end - - def self.transform(name, value) - return value.gsub(/ /, "+") if name == "query" - return value - end -end - -class DumbProcessor - def self.match(name) - return ".*?" if name == "first" - end -end - -describe Addressable::Template do - describe "Matching" do - let(:uri){ - Addressable::URI.parse( - "http://example.com/search/an-example-search-query/" - ) - } - let(:uri2){ - Addressable::URI.parse("http://example.com/a/b/c/") - } - let(:uri3){ - Addressable::URI.parse("http://example.com/;a=1;b=2;c=3;first=foo") - } - let(:uri4){ - Addressable::URI.parse("http://example.com/?a=1&b=2&c=3&first=foo") - } - let(:uri5){ - "http://example.com/foo" - } - context "first uri with ExampleTwoProcessor" do - subject { - match = Addressable::Template.new( - "http://example.com/search/{query}/" - ).match(uri, ExampleTwoProcessor) - } - its(:variables){ should == ["query"] } - its(:captures){ should == ["an example search query"] } - end - - context "second uri with ExampleTwoProcessor" do - subject { - match = Addressable::Template.new( - "http://example.com/{first}/{+second}/" - ).match(uri2, ExampleTwoProcessor) - } - its(:variables){ should == ["first", "second"] } - its(:captures){ should == ["a", "b/c"] } - end - - context "second uri with DumbProcessor" do - subject { - match = Addressable::Template.new( - "http://example.com/{first}/{+second}/" - ).match(uri2, DumbProcessor) - } - its(:variables){ should == ["first", "second"] } - its(:captures){ should == ["a", "b/c"] } - end - - context "second uri" do - subject { - match = Addressable::Template.new( - "http://example.com/{first}{/second*}/" - ).match(uri2) - } - its(:variables){ should == ["first", "second"] } - its(:captures){ should == ["a", ["b","c"]] } - end - context "third uri" do - subject { - match = Addressable::Template.new( - "http://example.com/{;hash*,first}" - ).match(uri3) - } - its(:variables){ should == ["hash", "first"] } - its(:captures){ should == [ - {"a" => "1", "b" => "2", "c" => "3", "first" => "foo"}, nil] } - end - # Note that this expansion is impossible to revert deterministically - the - # * operator means first could have been a key of hash or a separate key. - # Semantically, a separate key is more likely, but both are possible. - context "fourth uri" do - subject { - match = Addressable::Template.new( - "http://example.com/{?hash*,first}" - ).match(uri4) - } - its(:variables){ should == ["hash", "first"] } - its(:captures){ should == [ - {"a" => "1", "b" => "2", "c" => "3", "first"=> "foo"}, nil] } - end - context "fifth uri" do - subject { - match = Addressable::Template.new( - "http://example.com/{path}{?hash*,first}" - ).match(uri5) - } - its(:variables){ should == ["path", "hash", "first"] } - its(:captures){ should == ["foo", nil, nil] } - end - end - describe "extract" do - let(:template) { - Addressable::Template.new( - "http://{host}{/segments*}/{?one,two,bogus}{#fragment}" - ) - } - let(:uri){ "http://example.com/a/b/c/?one=1&two=2#foo" } - let(:uri2){ "http://example.com/a/b/c/#foo" } - it "should be able to extract with queries" do - template.extract(uri).should == { - "host" => "example.com", - "segments" => %w(a b c), - "one" => "1", - "bogus" => nil, - "two" => "2", - "fragment" => "foo" - } - end - it "should be able to extract without queries" do - template.extract(uri2).should == { - "host" => "example.com", - "segments" => %w(a b c), - "one" => nil, - "bogus" => nil, - "two" => nil, - "fragment" => "foo" - } - end - - context "issue #137" do - subject { Addressable::Template.new('/path{?page,per_page}') } - - it "can match empty" do - data = subject.extract("/path") - data["page"].should == nil - data["per_page"].should == nil - data.keys.sort.should == ['page', 'per_page'] - end - - it "can match first var" do - data = subject.extract("/path?page=1") - data["page"].should == "1" - data["per_page"].should == nil - data.keys.sort.should == ['page', 'per_page'] - end - - it "can match second var" do - data = subject.extract("/path?per_page=1") - data["page"].should == nil - data["per_page"].should == "1" - data.keys.sort.should == ['page', 'per_page'] - end - - it "can match both vars" do - data = subject.extract("/path?page=2&per_page=1") - data["page"].should == "2" - data["per_page"].should == "1" - data.keys.sort.should == ['page', 'per_page'] - end - end - end - - describe "Partial expand with symbols" do - context "partial_expand with two simple values" do - subject { - Addressable::Template.new("http://example.com/{one}/{two}/") - } - it "builds a new pattern" do - subject.partial_expand(:one => "1").pattern.should == - "http://example.com/1/{two}/" - end - end - context "partial_expand query with missing param in middle" do - subject { - Addressable::Template.new("http://example.com/{?one,two,three}/") - } - it "builds a new pattern" do - subject.partial_expand(:one => "1", :three => "3").pattern.should == - "http://example.com/?one=1{&two}&three=3/" - end - end - context "partial_expand with query string" do - subject { - Addressable::Template.new("http://example.com/{?two,one}/") - } - it "builds a new pattern" do - subject.partial_expand(:one => "1").pattern.should == - "http://example.com/{?two}&one=1/" - end - end - context "partial_expand with path operator" do - subject { - Addressable::Template.new("http://example.com{/one,two}/") - } - it "builds a new pattern" do - subject.partial_expand(:one => "1").pattern.should == - "http://example.com/1{/two}/" - end - end - end - describe "Partial expand with strings" do - context "partial_expand with two simple values" do - subject { - Addressable::Template.new("http://example.com/{one}/{two}/") - } - it "builds a new pattern" do - subject.partial_expand("one" => "1").pattern.should == - "http://example.com/1/{two}/" - end - end - context "partial_expand query with missing param in middle" do - subject { - Addressable::Template.new("http://example.com/{?one,two,three}/") - } - it "builds a new pattern" do - subject.partial_expand("one" => "1", "three" => "3").pattern.should == - "http://example.com/?one=1{&two}&three=3/" - end - end - context "partial_expand with query string" do - subject { - Addressable::Template.new("http://example.com/{?two,one}/") - } - it "builds a new pattern" do - subject.partial_expand("one" => "1").pattern.should == - "http://example.com/{?two}&one=1/" - end - end - context "partial_expand with path operator" do - subject { - Addressable::Template.new("http://example.com{/one,two}/") - } - it "builds a new pattern" do - subject.partial_expand("one" => "1").pattern.should == - "http://example.com/1{/two}/" - end - end - end - describe "Expand" do - context "expand with a processor" do - subject { - Addressable::Template.new("http://example.com/search/{query}/") - } - it "processes spaces" do - subject.expand({"query" => "an example search query"}, - ExampleTwoProcessor).to_str.should == - "http://example.com/search/an+example+search+query/" - end - it "validates" do - lambda{ - subject.expand({"query" => "Bogus!"}, - ExampleTwoProcessor).to_str - }.should raise_error(Addressable::Template::InvalidTemplateValueError) - end - end - context "partial_expand query with missing param in middle" do - subject { - Addressable::Template.new("http://example.com/{?one,two,three}/") - } - it "builds a new pattern" do - subject.partial_expand("one" => "1", "three" => "3").pattern.should == - "http://example.com/?one=1{&two}&three=3/" - end - end - context "partial_expand with query string" do - subject { - Addressable::Template.new("http://example.com/{?two,one}/") - } - it "builds a new pattern" do - subject.partial_expand("one" => "1").pattern.should == - "http://example.com/{?two}&one=1/" - end - end - context "partial_expand with path operator" do - subject { - Addressable::Template.new("http://example.com{/one,two}/") - } - it "builds a new pattern" do - subject.partial_expand("one" => "1").pattern.should == - "http://example.com/1{/two}/" - end - end - end - context "Matching with operators" do - describe "Level 1:" do - subject { Addressable::Template.new("foo{foo}/{bar}baz") } - it "can match" do - data = subject.match("foofoo/bananabaz") - data.mapping["foo"].should == "foo" - data.mapping["bar"].should == "banana" - end - it "can fail" do - subject.match("bar/foo").should be_nil - subject.match("foobaz").should be_nil - end - it "can match empty" do - data = subject.match("foo/baz") - data.mapping["foo"].should == nil - data.mapping["bar"].should == nil - end - it "lists vars" do - subject.variables.should == ["foo", "bar"] - end - end - - describe "Level 2:" do - subject { Addressable::Template.new("foo{+foo}{#bar}baz") } - it "can match" do - data = subject.match("foo/test/banana#bazbaz") - data.mapping["foo"].should == "/test/banana" - data.mapping["bar"].should == "baz" - end - it "can match empty level 2 #" do - data = subject.match("foo/test/bananabaz") - data.mapping["foo"].should == "/test/banana" - data.mapping["bar"].should == nil - data = subject.match("foo/test/banana#baz") - data.mapping["foo"].should == "/test/banana" - data.mapping["bar"].should == "" - end - it "can match empty level 2 +" do - data = subject.match("foobaz") - data.mapping["foo"].should == nil - data.mapping["bar"].should == nil - data = subject.match("foo#barbaz") - data.mapping["foo"].should == nil - data.mapping["bar"].should == "bar" - end - it "lists vars" do - subject.variables.should == ["foo", "bar"] - end - end - - describe "Level 3:" do - context "no operator" do - subject { Addressable::Template.new("foo{foo,bar}baz") } - it "can match" do - data = subject.match("foofoo,barbaz") - data.mapping["foo"].should == "foo" - data.mapping["bar"].should == "bar" - end - it "lists vars" do - subject.variables.should == ["foo", "bar"] - end - end - context "+ operator" do - subject { Addressable::Template.new("foo{+foo,bar}baz") } - it "can match" do - data = subject.match("foofoo/bar,barbaz") - data.mapping["bar"].should == "foo/bar,bar" - data.mapping["foo"].should == "" - end - it "lists vars" do - subject.variables.should == ["foo", "bar"] - end - end - context ". operator" do - subject { Addressable::Template.new("foo{.foo,bar}baz") } - it "can match" do - data = subject.match("foo.foo.barbaz") - data.mapping["foo"].should == "foo" - data.mapping["bar"].should == "bar" - end - it "lists vars" do - subject.variables.should == ["foo", "bar"] - end - end - context "/ operator" do - subject { Addressable::Template.new("foo{/foo,bar}baz") } - it "can match" do - data = subject.match("foo/foo/barbaz") - data.mapping["foo"].should == "foo" - data.mapping["bar"].should == "bar" - end - it "lists vars" do - subject.variables.should == ["foo", "bar"] - end - end - context "; operator" do - subject { Addressable::Template.new("foo{;foo,bar,baz}baz") } - it "can match" do - data = subject.match("foo;foo=bar%20baz;bar=foo;bazbaz") - data.mapping["foo"].should == "bar baz" - data.mapping["bar"].should == "foo" - data.mapping["baz"].should == "" - end - it "lists vars" do - subject.variables.should == %w(foo bar baz) - end - end - context "? operator" do - context "test" do - subject { Addressable::Template.new("foo{?foo,bar}baz") } - it "can match" do - data = subject.match("foo?foo=bar%20baz&bar=foobaz") - data.mapping["foo"].should == "bar baz" - data.mapping["bar"].should == "foo" - end - it "lists vars" do - subject.variables.should == %w(foo bar) - end - end - - context "issue #137" do - subject { Addressable::Template.new('/path{?page,per_page}') } - - it "can match empty" do - data = subject.match("/path") - data.mapping["page"].should == nil - data.mapping["per_page"].should == nil - data.mapping.keys.sort.should == ['page', 'per_page'] - end - - it "can match first var" do - data = subject.match("/path?page=1") - data.mapping["page"].should == "1" - data.mapping["per_page"].should == nil - data.mapping.keys.sort.should == ['page', 'per_page'] - end - - it "can match second var" do - data = subject.match("/path?per_page=1") - data.mapping["page"].should == nil - data.mapping["per_page"].should == "1" - data.mapping.keys.sort.should == ['page', 'per_page'] - end - - it "can match both vars" do - data = subject.match("/path?page=2&per_page=1") - data.mapping["page"].should == "2" - data.mapping["per_page"].should == "1" - data.mapping.keys.sort.should == ['page', 'per_page'] - end - end - - context "issue #71" do - subject { Addressable::Template.new("http://cyberscore.dev/api/users{?username}") } - it "can match" do - data = subject.match("http://cyberscore.dev/api/users?username=foobaz") - data.mapping["username"].should == "foobaz" - end - it "lists vars" do - subject.variables.should == %w(username) - subject.keys.should == %w(username) - end - end - end - context "& operator" do - subject { Addressable::Template.new("foo{&foo,bar}baz") } - it "can match" do - data = subject.match("foo&foo=bar%20baz&bar=foobaz") - data.mapping["foo"].should == "bar baz" - data.mapping["bar"].should == "foo" - end - it "lists vars" do - subject.variables.should == %w(foo bar) - end - end - end - end - - context "support regexes:" do - context "EXPRESSION" do - subject { Addressable::Template::EXPRESSION } - it "should be able to match an expression" do - subject.should match("{foo}") - subject.should match("{foo,9}") - subject.should match("{foo.bar,baz}") - subject.should match("{+foo.bar,baz}") - subject.should match("{foo,foo%20bar}") - subject.should match("{#foo:20,baz*}") - subject.should match("stuff{#foo:20,baz*}things") - end - it "should fail on non vars" do - subject.should_not match("!{foo") - subject.should_not match("{foo.bar.}") - subject.should_not match("!{}") - end - end - context "VARNAME" do - subject { Addressable::Template::VARNAME } - it "should be able to match a variable" do - subject.should match("foo") - subject.should match("9") - subject.should match("foo.bar") - subject.should match("foo_bar") - subject.should match("foo_bar.baz") - subject.should match("foo%20bar") - subject.should match("foo%20bar.baz") - end - it "should fail on non vars" do - subject.should_not match("!foo") - subject.should_not match("foo.bar.") - subject.should_not match("foo%2%00bar") - subject.should_not match("foo_ba%r") - subject.should_not match("foo_bar*") - subject.should_not match("foo_bar:20") - end - end - context "VARIABLE_LIST" do - subject { Addressable::Template::VARIABLE_LIST } - it "should be able to match a variable list" do - subject.should match("foo,bar") - subject.should match("foo") - subject.should match("foo,bar*,baz") - subject.should match("foo.bar,bar_baz*,baz:12") - end - it "should fail on non vars" do - subject.should_not match(",foo,bar*,baz") - subject.should_not match("foo,*bar,baz") - subject.should_not match("foo,,bar*,baz") - end - end - context "VARSPEC" do - subject { Addressable::Template::VARSPEC } - it "should be able to match a variable with modifier" do - subject.should match("9:8") - subject.should match("foo.bar*") - subject.should match("foo_bar:12") - subject.should match("foo_bar.baz*") - subject.should match("foo%20bar:12") - subject.should match("foo%20bar.baz*") - end - it "should fail on non vars" do - subject.should_not match("!foo") - subject.should_not match("*foo") - subject.should_not match("fo*o") - subject.should_not match("fo:o") - subject.should_not match("foo:") - end - end - end -end - -describe Addressable::Template::MatchData do - let(:template) { Addressable::Template.new('{foo}/{bar}') } - subject(:its) { template.match('ab/cd') } - its(:uri) { should == Addressable::URI.parse('ab/cd') } - its(:template) { should == template } - its(:mapping) { should == { 'foo' => 'ab', 'bar' => 'cd' } } - its(:variables) { should == ['foo', 'bar'] } - its(:keys) { should == ['foo', 'bar'] } - its(:names) { should == ['foo', 'bar'] } - its(:values) { should == ['ab', 'cd'] } - its(:captures) { should == ['ab', 'cd'] } - its(:to_a) { should == ['ab/cd', 'ab', 'cd'] } - its(:to_s) { should == 'ab/cd' } - its(:string) { should == its.to_s } - its(:pre_match) { should == "" } - its(:post_match) { should == "" } - - describe 'values_at' do - it 'returns an array with the values' do - its.values_at(0, 2).should == ['ab/cd', 'cd'] - end - it 'allows mixing integer an string keys' do - its.values_at('foo', 1).should == ['ab', 'ab'] - end - it 'accepts unknown keys' do - its.values_at('baz', 'foo').should == [nil, 'ab'] - end - end - - describe '[]' do - context 'string key' do - it 'returns the corresponding capture' do - its['foo'].should == 'ab' - its['bar'].should == 'cd' - end - it 'returns nil for unknown keys' do - its['baz'].should be_nil - end - end - context 'symbol key' do - it 'returns the corresponding capture' do - its[:foo].should == 'ab' - its[:bar].should == 'cd' - end - it 'returns nil for unknown keys' do - its[:baz].should be_nil - end - end - context 'integer key' do - it 'returns the full URI for index 0' do - its[0].should == 'ab/cd' - end - it 'returns the corresponding capture' do - its[1].should == 'ab' - its[2].should == 'cd' - end - it 'returns nil for unknown keys' do - its[3].should be_nil - end - end - context 'other key' do - it 'raises an exception' do - expect { its[Object.new] }.to raise_error(TypeError) - end - end - context 'with length' do - it 'returns an array starting at index with given length' do - its[0, 2].should == ['ab/cd', 'ab'] - its[2, 1].should == ['cd'] - end - end - end -end diff --git a/.gems/gems/addressable-2.3.6/spec/addressable/uri_spec.rb b/.gems/gems/addressable-2.3.6/spec/addressable/uri_spec.rb deleted file mode 100644 index ee45124..0000000 --- a/.gems/gems/addressable-2.3.6/spec/addressable/uri_spec.rb +++ /dev/null @@ -1,5940 +0,0 @@ -# coding: utf-8 -# Copyright (C) 2006-2013 Bob Aman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -require "spec_helper" - -require "addressable/uri" -require "uri" - -if !"".respond_to?("force_encoding") - class String - def force_encoding(encoding) - @encoding = encoding - end - - def encoding - @encoding ||= Encoding::ASCII_8BIT - end - end - - class Encoding - def initialize(name) - @name = name - end - - def to_s - return @name - end - - UTF_8 = Encoding.new("UTF-8") - ASCII_8BIT = Encoding.new("US-ASCII") - end -end - -module Fake - module URI - class HTTP - def initialize(uri) - @uri = uri - end - - def to_s - return @uri.to_s - end - - alias :to_str :to_s - end - end -end - -describe Addressable::URI, "when created with a non-numeric port number" do - it "should raise an error" do - (lambda do - Addressable::URI.new(:port => "bogus") - end).should raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when created with a non-string scheme" do - it "should raise an error" do - (lambda do - Addressable::URI.new(:scheme => :bogus) - end).should raise_error(TypeError) - end -end - -describe Addressable::URI, "when created with a non-string user" do - it "should raise an error" do - (lambda do - Addressable::URI.new(:user => :bogus) - end).should raise_error(TypeError) - end -end - -describe Addressable::URI, "when created with a non-string password" do - it "should raise an error" do - (lambda do - Addressable::URI.new(:password => :bogus) - end).should raise_error(TypeError) - end -end - -describe Addressable::URI, "when created with a non-string userinfo" do - it "should raise an error" do - (lambda do - Addressable::URI.new(:userinfo => :bogus) - end).should raise_error(TypeError) - end -end - -describe Addressable::URI, "when created with a non-string host" do - it "should raise an error" do - (lambda do - Addressable::URI.new(:host => :bogus) - end).should raise_error(TypeError) - end -end - -describe Addressable::URI, "when created with a non-string authority" do - it "should raise an error" do - (lambda do - Addressable::URI.new(:authority => :bogus) - end).should raise_error(TypeError) - end -end - -describe Addressable::URI, "when created with a non-string authority" do - it "should raise an error" do - (lambda do - Addressable::URI.new(:authority => :bogus) - end).should raise_error(TypeError) - end -end - -describe Addressable::URI, "when created with a non-string path" do - it "should raise an error" do - (lambda do - Addressable::URI.new(:path => :bogus) - end).should raise_error(TypeError) - end -end - -describe Addressable::URI, "when created with a non-string query" do - it "should raise an error" do - (lambda do - Addressable::URI.new(:query => :bogus) - end).should raise_error(TypeError) - end -end - -describe Addressable::URI, "when created with a non-string fragment" do - it "should raise an error" do - (lambda do - Addressable::URI.new(:fragment => :bogus) - end).should raise_error(TypeError) - end -end - -describe Addressable::URI, "when created with a scheme but no hierarchical " + - "segment" do - it "should raise an error" do - (lambda do - Addressable::URI.parse("http:") - end).should raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when created with an invalid host" do - it "should raise an error" do - (lambda do - Addressable::URI.new(:host => "") - end).should raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when created from nil components" do - before do - @uri = Addressable::URI.new - end - - it "should have a nil site value" do - @uri.site.should == nil - end - - it "should have an empty path" do - @uri.path.should == "" - end - - it "should be an empty uri" do - @uri.to_s.should == "" - end - - it "should have a nil default port" do - @uri.default_port.should == nil - end - - it "should be empty" do - @uri.should be_empty - end - - it "should raise an error if the scheme is set to whitespace" do - (lambda do - @uri.scheme = "\t \n" - end).should raise_error(Addressable::URI::InvalidURIError) - end - - it "should raise an error if the scheme is set to all digits" do - (lambda do - @uri.scheme = "123" - end).should raise_error(Addressable::URI::InvalidURIError) - end - - it "should raise an error if set into an invalid state" do - (lambda do - @uri.user = "user" - end).should raise_error(Addressable::URI::InvalidURIError) - end - - it "should raise an error if set into an invalid state" do - (lambda do - @uri.password = "pass" - end).should raise_error(Addressable::URI::InvalidURIError) - end - - it "should raise an error if set into an invalid state" do - (lambda do - @uri.scheme = "http" - @uri.fragment = "fragment" - end).should raise_error(Addressable::URI::InvalidURIError) - end - - it "should raise an error if set into an invalid state" do - (lambda do - @uri.fragment = "fragment" - @uri.scheme = "http" - end).should raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when initialized from individual components" do - before do - @uri = Addressable::URI.new( - :scheme => "http", - :user => "user", - :password => "password", - :host => "example.com", - :port => 8080, - :path => "/path", - :query => "query=value", - :fragment => "fragment" - ) - end - - it "returns 'http' for #scheme" do - @uri.scheme.should == "http" - end - - it "returns 'http' for #normalized_scheme" do - @uri.normalized_scheme.should == "http" - end - - it "returns 'user' for #user" do - @uri.user.should == "user" - end - - it "returns 'user' for #normalized_user" do - @uri.normalized_user.should == "user" - end - - it "returns 'password' for #password" do - @uri.password.should == "password" - end - - it "returns 'password' for #normalized_password" do - @uri.normalized_password.should == "password" - end - - it "returns 'user:password' for #userinfo" do - @uri.userinfo.should == "user:password" - end - - it "returns 'user:password' for #normalized_userinfo" do - @uri.normalized_userinfo.should == "user:password" - end - - it "returns 'example.com' for #host" do - @uri.host.should == "example.com" - end - - it "returns 'example.com' for #normalized_host" do - @uri.normalized_host.should == "example.com" - end - - it "returns 'user:password@example.com:8080' for #authority" do - @uri.authority.should == "user:password@example.com:8080" - end - - it "returns 'user:password@example.com:8080' for #normalized_authority" do - @uri.normalized_authority.should == "user:password@example.com:8080" - end - - it "returns 8080 for #port" do - @uri.port.should == 8080 - end - - it "returns 8080 for #normalized_port" do - @uri.normalized_port.should == 8080 - end - - it "returns 80 for #default_port" do - @uri.default_port.should == 80 - end - - it "returns 'http://user:password@example.com:8080' for #site" do - @uri.site.should == "http://user:password@example.com:8080" - end - - it "returns 'http://user:password@example.com:8080' for #normalized_site" do - @uri.normalized_site.should == "http://user:password@example.com:8080" - end - - it "returns '/path' for #path" do - @uri.path.should == "/path" - end - - it "returns '/path' for #normalized_path" do - @uri.normalized_path.should == "/path" - end - - it "returns 'query=value' for #query" do - @uri.query.should == "query=value" - end - - it "returns 'query=value' for #normalized_query" do - @uri.normalized_query.should == "query=value" - end - - it "returns 'fragment' for #fragment" do - @uri.fragment.should == "fragment" - end - - it "returns 'fragment' for #normalized_fragment" do - @uri.normalized_fragment.should == "fragment" - end - - it "returns #hash" do - @uri.hash.should_not be nil - end - - it "returns #to_s" do - @uri.to_s.should == - "http://user:password@example.com:8080/path?query=value#fragment" - end - - it "should not be empty" do - @uri.should_not be_empty - end - - it "should not be frozen" do - @uri.should_not be_frozen - end - - it "should allow destructive operations" do - expect { @uri.normalize! }.not_to raise_error - end -end - -describe Addressable::URI, "when initialized from " + - "frozen individual components" do - before do - @uri = Addressable::URI.new( - :scheme => "http".freeze, - :user => "user".freeze, - :password => "password".freeze, - :host => "example.com".freeze, - :port => "8080".freeze, - :path => "/path".freeze, - :query => "query=value".freeze, - :fragment => "fragment".freeze - ) - end - - it "returns 'http' for #scheme" do - @uri.scheme.should == "http" - end - - it "returns 'http' for #normalized_scheme" do - @uri.normalized_scheme.should == "http" - end - - it "returns 'user' for #user" do - @uri.user.should == "user" - end - - it "returns 'user' for #normalized_user" do - @uri.normalized_user.should == "user" - end - - it "returns 'password' for #password" do - @uri.password.should == "password" - end - - it "returns 'password' for #normalized_password" do - @uri.normalized_password.should == "password" - end - - it "returns 'user:password' for #userinfo" do - @uri.userinfo.should == "user:password" - end - - it "returns 'user:password' for #normalized_userinfo" do - @uri.normalized_userinfo.should == "user:password" - end - - it "returns 'example.com' for #host" do - @uri.host.should == "example.com" - end - - it "returns 'example.com' for #normalized_host" do - @uri.normalized_host.should == "example.com" - end - - it "returns 'user:password@example.com:8080' for #authority" do - @uri.authority.should == "user:password@example.com:8080" - end - - it "returns 'user:password@example.com:8080' for #normalized_authority" do - @uri.normalized_authority.should == "user:password@example.com:8080" - end - - it "returns 8080 for #port" do - @uri.port.should == 8080 - end - - it "returns 8080 for #normalized_port" do - @uri.normalized_port.should == 8080 - end - - it "returns 80 for #default_port" do - @uri.default_port.should == 80 - end - - it "returns 'http://user:password@example.com:8080' for #site" do - @uri.site.should == "http://user:password@example.com:8080" - end - - it "returns 'http://user:password@example.com:8080' for #normalized_site" do - @uri.normalized_site.should == "http://user:password@example.com:8080" - end - - it "returns '/path' for #path" do - @uri.path.should == "/path" - end - - it "returns '/path' for #normalized_path" do - @uri.normalized_path.should == "/path" - end - - it "returns 'query=value' for #query" do - @uri.query.should == "query=value" - end - - it "returns 'query=value' for #normalized_query" do - @uri.normalized_query.should == "query=value" - end - - it "returns 'fragment' for #fragment" do - @uri.fragment.should == "fragment" - end - - it "returns 'fragment' for #normalized_fragment" do - @uri.normalized_fragment.should == "fragment" - end - - it "returns #hash" do - @uri.hash.should_not be nil - end - - it "returns #to_s" do - @uri.to_s.should == - "http://user:password@example.com:8080/path?query=value#fragment" - end - - it "should not be empty" do - @uri.should_not be_empty - end - - it "should not be frozen" do - @uri.should_not be_frozen - end - - it "should allow destructive operations" do - expect { @uri.normalize! }.not_to raise_error - end -end - -describe Addressable::URI, "when parsed from a frozen string" do - before do - @uri = Addressable::URI.parse( - "http://user:password@example.com:8080/path?query=value#fragment".freeze - ) - end - - it "returns 'http' for #scheme" do - @uri.scheme.should == "http" - end - - it "returns 'http' for #normalized_scheme" do - @uri.normalized_scheme.should == "http" - end - - it "returns 'user' for #user" do - @uri.user.should == "user" - end - - it "returns 'user' for #normalized_user" do - @uri.normalized_user.should == "user" - end - - it "returns 'password' for #password" do - @uri.password.should == "password" - end - - it "returns 'password' for #normalized_password" do - @uri.normalized_password.should == "password" - end - - it "returns 'user:password' for #userinfo" do - @uri.userinfo.should == "user:password" - end - - it "returns 'user:password' for #normalized_userinfo" do - @uri.normalized_userinfo.should == "user:password" - end - - it "returns 'example.com' for #host" do - @uri.host.should == "example.com" - end - - it "returns 'example.com' for #normalized_host" do - @uri.normalized_host.should == "example.com" - end - - it "returns 'user:password@example.com:8080' for #authority" do - @uri.authority.should == "user:password@example.com:8080" - end - - it "returns 'user:password@example.com:8080' for #normalized_authority" do - @uri.normalized_authority.should == "user:password@example.com:8080" - end - - it "returns 8080 for #port" do - @uri.port.should == 8080 - end - - it "returns 8080 for #normalized_port" do - @uri.normalized_port.should == 8080 - end - - it "returns 80 for #default_port" do - @uri.default_port.should == 80 - end - - it "returns 'http://user:password@example.com:8080' for #site" do - @uri.site.should == "http://user:password@example.com:8080" - end - - it "returns 'http://user:password@example.com:8080' for #normalized_site" do - @uri.normalized_site.should == "http://user:password@example.com:8080" - end - - it "returns '/path' for #path" do - @uri.path.should == "/path" - end - - it "returns '/path' for #normalized_path" do - @uri.normalized_path.should == "/path" - end - - it "returns 'query=value' for #query" do - @uri.query.should == "query=value" - end - - it "returns 'query=value' for #normalized_query" do - @uri.normalized_query.should == "query=value" - end - - it "returns 'fragment' for #fragment" do - @uri.fragment.should == "fragment" - end - - it "returns 'fragment' for #normalized_fragment" do - @uri.normalized_fragment.should == "fragment" - end - - it "returns #hash" do - @uri.hash.should_not be nil - end - - it "returns #to_s" do - @uri.to_s.should == - "http://user:password@example.com:8080/path?query=value#fragment" - end - - it "should not be empty" do - @uri.should_not be_empty - end - - it "should not be frozen" do - @uri.should_not be_frozen - end - - it "should allow destructive operations" do - expect { @uri.normalize! }.not_to raise_error - end -end - -describe Addressable::URI, "when frozen" do - before do - @uri = Addressable::URI.new.freeze - end - - it "returns nil for #scheme" do - @uri.scheme.should == nil - end - - it "returns nil for #normalized_scheme" do - @uri.normalized_scheme.should == nil - end - - it "returns nil for #user" do - @uri.user.should == nil - end - - it "returns nil for #normalized_user" do - @uri.normalized_user.should == nil - end - - it "returns nil for #password" do - @uri.password.should == nil - end - - it "returns nil for #normalized_password" do - @uri.normalized_password.should == nil - end - - it "returns nil for #userinfo" do - @uri.userinfo.should == nil - end - - it "returns nil for #normalized_userinfo" do - @uri.normalized_userinfo.should == nil - end - - it "returns nil for #host" do - @uri.host.should == nil - end - - it "returns nil for #normalized_host" do - @uri.normalized_host.should == nil - end - - it "returns nil for #authority" do - @uri.authority.should == nil - end - - it "returns nil for #normalized_authority" do - @uri.normalized_authority.should == nil - end - - it "returns nil for #port" do - @uri.port.should == nil - end - - it "returns nil for #normalized_port" do - @uri.normalized_port.should == nil - end - - it "returns nil for #default_port" do - @uri.default_port.should == nil - end - - it "returns nil for #site" do - @uri.site.should == nil - end - - it "returns nil for #normalized_site" do - @uri.normalized_site.should == nil - end - - it "returns '' for #path" do - @uri.path.should == '' - end - - it "returns '' for #normalized_path" do - @uri.normalized_path.should == '' - end - - it "returns nil for #query" do - @uri.query.should == nil - end - - it "returns nil for #normalized_query" do - @uri.normalized_query.should == nil - end - - it "returns nil for #fragment" do - @uri.fragment.should == nil - end - - it "returns nil for #normalized_fragment" do - @uri.normalized_fragment.should == nil - end - - it "returns #hash" do - @uri.hash.should_not be nil - end - - it "returns #to_s" do - @uri.to_s.should == '' - end - - it "should be empty" do - @uri.should be_empty - end - - it "should be frozen" do - @uri.should be_frozen - end - - it "should not be frozen after duping" do - @uri.dup.should_not be_frozen - end - - it "should not allow destructive operations" do - expect { @uri.normalize! }.to raise_error { |error| - error.message.should match(/can't modify frozen/) - error.should satisfy { |e| RuntimeError === e || TypeError === e } - } - end -end - -describe Addressable::URI, "when frozen" do - before do - @uri = Addressable::URI.parse( - "HTTP://example.com.:%38%30/%70a%74%68?a=%31#1%323" - ).freeze - end - - it "returns 'HTTP' for #scheme" do - @uri.scheme.should == "HTTP" - end - - it "returns 'http' for #normalized_scheme" do - @uri.normalized_scheme.should == "http" - @uri.normalize.scheme.should == "http" - end - - it "returns nil for #user" do - @uri.user.should == nil - end - - it "returns nil for #normalized_user" do - @uri.normalized_user.should == nil - end - - it "returns nil for #password" do - @uri.password.should == nil - end - - it "returns nil for #normalized_password" do - @uri.normalized_password.should == nil - end - - it "returns nil for #userinfo" do - @uri.userinfo.should == nil - end - - it "returns nil for #normalized_userinfo" do - @uri.normalized_userinfo.should == nil - end - - it "returns 'example.com.' for #host" do - @uri.host.should == "example.com." - end - - it "returns nil for #normalized_host" do - @uri.normalized_host.should == "example.com" - @uri.normalize.host.should == "example.com" - end - - it "returns 'example.com.:80' for #authority" do - @uri.authority.should == "example.com.:80" - end - - it "returns 'example.com:80' for #normalized_authority" do - @uri.normalized_authority.should == "example.com" - @uri.normalize.authority.should == "example.com" - end - - it "returns 80 for #port" do - @uri.port.should == 80 - end - - it "returns nil for #normalized_port" do - @uri.normalized_port.should == nil - @uri.normalize.port.should == nil - end - - it "returns 80 for #default_port" do - @uri.default_port.should == 80 - end - - it "returns 'HTTP://example.com.:80' for #site" do - @uri.site.should == "HTTP://example.com.:80" - end - - it "returns 'http://example.com' for #normalized_site" do - @uri.normalized_site.should == "http://example.com" - @uri.normalize.site.should == "http://example.com" - end - - it "returns '/%70a%74%68' for #path" do - @uri.path.should == "/%70a%74%68" - end - - it "returns '/path' for #normalized_path" do - @uri.normalized_path.should == "/path" - @uri.normalize.path.should == "/path" - end - - it "returns 'a=%31' for #query" do - @uri.query.should == "a=%31" - end - - it "returns 'a=1' for #normalized_query" do - @uri.normalized_query.should == "a=1" - @uri.normalize.query.should == "a=1" - end - - it "returns '1%323' for #fragment" do - @uri.fragment.should == "1%323" - end - - it "returns '123' for #normalized_fragment" do - @uri.normalized_fragment.should == "123" - @uri.normalize.fragment.should == "123" - end - - it "returns #hash" do - @uri.hash.should_not be nil - end - - it "returns #to_s" do - @uri.to_s.should == 'HTTP://example.com.:80/%70a%74%68?a=%31#1%323' - @uri.normalize.to_s.should == 'http://example.com/path?a=1#123' - end - - it "should not be empty" do - @uri.should_not be_empty - end - - it "should be frozen" do - @uri.should be_frozen - end - - it "should not be frozen after duping" do - @uri.dup.should_not be_frozen - end - - it "should not allow destructive operations" do - expect { @uri.normalize! }.to raise_error { |error| - error.message.should match(/can't modify frozen/) - error.should satisfy { |e| RuntimeError === e || TypeError === e } - } - end -end - -describe Addressable::URI, "when created from string components" do - before do - @uri = Addressable::URI.new( - :scheme => "http", :host => "example.com" - ) - end - - it "should have a site value of 'http://example.com'" do - @uri.site.should == "http://example.com" - end - - it "should be equal to the equivalent parsed URI" do - @uri.should == Addressable::URI.parse("http://example.com") - end - - it "should raise an error if invalid components omitted" do - (lambda do - @uri.omit(:bogus) - end).should raise_error(ArgumentError) - (lambda do - @uri.omit(:scheme, :bogus, :path) - end).should raise_error(ArgumentError) - end -end - -describe Addressable::URI, "when created with a nil host but " + - "non-nil authority components" do - it "should raise an error" do - (lambda do - Addressable::URI.new(:user => "user", :password => "pass", :port => 80) - end).should raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when created with both an authority and a user" do - it "should raise an error" do - (lambda do - Addressable::URI.new( - :user => "user", :authority => "user@example.com:80" - ) - end).should raise_error(ArgumentError) - end -end - -describe Addressable::URI, "when created with an authority and no port" do - before do - @uri = Addressable::URI.new(:authority => "user@example.com") - end - - it "should not infer a port" do - @uri.port.should == nil - @uri.default_port.should == nil - @uri.inferred_port.should == nil - end - - it "should have a site value of '//user@example.com'" do - @uri.site.should == "//user@example.com" - end - - it "should have a 'null' origin" do - @uri.origin.should == 'null' - end -end - -describe Addressable::URI, "when created with a host with trailing dots" do - before do - @uri = Addressable::URI.new(:authority => "example...") - end - - it "should have a stable normalized form" do - @uri.normalize.normalize.normalize.host.should == - @uri.normalize.host - end -end - -describe Addressable::URI, "when created with both a userinfo and a user" do - it "should raise an error" do - (lambda do - Addressable::URI.new(:user => "user", :userinfo => "user:pass") - end).should raise_error(ArgumentError) - end -end - -describe Addressable::URI, "when created with a path that hasn't been " + - "prefixed with a '/' but a host specified" do - before do - @uri = Addressable::URI.new( - :scheme => "http", :host => "example.com", :path => "path" - ) - end - - it "should prefix a '/' to the path" do - @uri.should == Addressable::URI.parse("http://example.com/path") - end - - it "should have a site value of 'http://example.com'" do - @uri.site.should == "http://example.com" - end - - it "should have an origin of 'http://example.com" do - @uri.origin.should == 'http://example.com' - end -end - -describe Addressable::URI, "when created with a path that hasn't been " + - "prefixed with a '/' but no host specified" do - before do - @uri = Addressable::URI.new( - :scheme => "http", :path => "path" - ) - end - - it "should not prefix a '/' to the path" do - @uri.should == Addressable::URI.parse("http:path") - end - - it "should have a site value of 'http:'" do - @uri.site.should == "http:" - end - - it "should have a 'null' origin" do - @uri.origin.should == 'null' - end -end - -describe Addressable::URI, "when parsed from an Addressable::URI object" do - it "should not have unexpected side-effects" do - original_uri = Addressable::URI.parse("http://example.com/") - new_uri = Addressable::URI.parse(original_uri) - new_uri.host = 'www.example.com' - new_uri.host.should == 'www.example.com' - new_uri.to_s.should == 'http://www.example.com/' - original_uri.host.should == 'example.com' - original_uri.to_s.should == 'http://example.com/' - end - - it "should not have unexpected side-effects" do - original_uri = Addressable::URI.parse("http://example.com/") - new_uri = Addressable::URI.heuristic_parse(original_uri) - new_uri.host = 'www.example.com' - new_uri.host.should == 'www.example.com' - new_uri.to_s.should == 'http://www.example.com/' - original_uri.host.should == 'example.com' - original_uri.to_s.should == 'http://example.com/' - end -end - -describe Addressable::URI, "when parsed from something that looks " + - "like a URI object" do - it "should parse without error" do - uri = Addressable::URI.parse(Fake::URI::HTTP.new("http://example.com/")) - (lambda do - Addressable::URI.parse(uri) - end).should_not raise_error - end -end - -describe Addressable::URI, "when parsed from ''" do - before do - @uri = Addressable::URI.parse("") - end - - it "should have no scheme" do - @uri.scheme.should == nil - end - - it "should not be considered to be ip-based" do - @uri.should_not be_ip_based - end - - it "should have a path of ''" do - @uri.path.should == "" - end - - it "should have a request URI of '/'" do - @uri.request_uri.should == "/" - end - - it "should be considered relative" do - @uri.should be_relative - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end - - it "should have a 'null' origin" do - @uri.origin.should == 'null' - end -end - -# Section 1.1.2 of RFC 3986 -describe Addressable::URI, "when parsed from " + - "'ftp://ftp.is.co.za/rfc/rfc1808.txt'" do - before do - @uri = Addressable::URI.parse("ftp://ftp.is.co.za/rfc/rfc1808.txt") - end - - it "should use the 'ftp' scheme" do - @uri.scheme.should == "ftp" - end - - it "should be considered to be ip-based" do - @uri.should be_ip_based - end - - it "should have a host of 'ftp.is.co.za'" do - @uri.host.should == "ftp.is.co.za" - end - - it "should have inferred_port of 21" do - @uri.inferred_port.should == 21 - end - - it "should have a path of '/rfc/rfc1808.txt'" do - @uri.path.should == "/rfc/rfc1808.txt" - end - - it "should not have a request URI" do - @uri.request_uri.should == nil - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end - - it "should have an origin of 'ftp://ftp.is.co.za'" do - @uri.origin.should == 'ftp://ftp.is.co.za' - end -end - -# Section 1.1.2 of RFC 3986 -describe Addressable::URI, "when parsed from " + - "'http://www.ietf.org/rfc/rfc2396.txt'" do - before do - @uri = Addressable::URI.parse("http://www.ietf.org/rfc/rfc2396.txt") - end - - it "should use the 'http' scheme" do - @uri.scheme.should == "http" - end - - it "should be considered to be ip-based" do - @uri.should be_ip_based - end - - it "should have a host of 'www.ietf.org'" do - @uri.host.should == "www.ietf.org" - end - - it "should have inferred_port of 80" do - @uri.inferred_port.should == 80 - end - - it "should have a path of '/rfc/rfc2396.txt'" do - @uri.path.should == "/rfc/rfc2396.txt" - end - - it "should have a request URI of '/rfc/rfc2396.txt'" do - @uri.request_uri.should == "/rfc/rfc2396.txt" - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end - - it "should correctly omit components" do - @uri.omit(:scheme).to_s.should == "//www.ietf.org/rfc/rfc2396.txt" - @uri.omit(:path).to_s.should == "http://www.ietf.org" - end - - it "should correctly omit components destructively" do - @uri.omit!(:scheme) - @uri.to_s.should == "//www.ietf.org/rfc/rfc2396.txt" - end - - it "should have an origin of 'http://www.ietf.org'" do - @uri.origin.should == 'http://www.ietf.org' - end -end - -# Section 1.1.2 of RFC 3986 -describe Addressable::URI, "when parsed from " + - "'ldap://[2001:db8::7]/c=GB?objectClass?one'" do - before do - @uri = Addressable::URI.parse("ldap://[2001:db8::7]/c=GB?objectClass?one") - end - - it "should use the 'ldap' scheme" do - @uri.scheme.should == "ldap" - end - - it "should be considered to be ip-based" do - @uri.should be_ip_based - end - - it "should have a host of '[2001:db8::7]'" do - @uri.host.should == "[2001:db8::7]" - end - - it "should have inferred_port of 389" do - @uri.inferred_port.should == 389 - end - - it "should have a path of '/c=GB'" do - @uri.path.should == "/c=GB" - end - - it "should not have a request URI" do - @uri.request_uri.should == nil - end - - it "should not allow request URI assignment" do - (lambda do - @uri.request_uri = "/" - end).should raise_error(Addressable::URI::InvalidURIError) - end - - it "should have a query of 'objectClass?one'" do - @uri.query.should == "objectClass?one" - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end - - it "should correctly omit components" do - @uri.omit(:scheme, :authority).to_s.should == "/c=GB?objectClass?one" - @uri.omit(:path).to_s.should == "ldap://[2001:db8::7]?objectClass?one" - end - - it "should correctly omit components destructively" do - @uri.omit!(:scheme, :authority) - @uri.to_s.should == "/c=GB?objectClass?one" - end - - it "should raise an error if omission would create an invalid URI" do - (lambda do - @uri.omit(:authority, :path) - end).should raise_error(Addressable::URI::InvalidURIError) - end - - it "should have an origin of 'ldap://[2001:db8::7]'" do - @uri.origin.should == 'ldap://[2001:db8::7]' - end -end - -# Section 1.1.2 of RFC 3986 -describe Addressable::URI, "when parsed from " + - "'mailto:John.Doe@example.com'" do - before do - @uri = Addressable::URI.parse("mailto:John.Doe@example.com") - end - - it "should use the 'mailto' scheme" do - @uri.scheme.should == "mailto" - end - - it "should not be considered to be ip-based" do - @uri.should_not be_ip_based - end - - it "should not have an inferred_port" do - @uri.inferred_port.should == nil - end - - it "should have a path of 'John.Doe@example.com'" do - @uri.path.should == "John.Doe@example.com" - end - - it "should not have a request URI" do - @uri.request_uri.should == nil - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end - - it "should have a 'null' origin" do - @uri.origin.should == 'null' - end -end - -# Section 2 of RFC 6068 -describe Addressable::URI, "when parsed from " + - "'mailto:?to=addr1@an.example,addr2@an.example'" do - before do - @uri = Addressable::URI.parse( - "mailto:?to=addr1@an.example,addr2@an.example" - ) - end - - it "should use the 'mailto' scheme" do - @uri.scheme.should == "mailto" - end - - it "should not be considered to be ip-based" do - @uri.should_not be_ip_based - end - - it "should not have an inferred_port" do - @uri.inferred_port.should == nil - end - - it "should have a path of ''" do - @uri.path.should == "" - end - - it "should not have a request URI" do - @uri.request_uri.should == nil - end - - it "should have the To: field value parameterized" do - @uri.query_values(Hash)["to"].should == ( - "addr1@an.example,addr2@an.example" - ) - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end - - it "should have a 'null' origin" do - @uri.origin.should == 'null' - end -end - -# Section 1.1.2 of RFC 3986 -describe Addressable::URI, "when parsed from " + - "'news:comp.infosystems.www.servers.unix'" do - before do - @uri = Addressable::URI.parse("news:comp.infosystems.www.servers.unix") - end - - it "should use the 'news' scheme" do - @uri.scheme.should == "news" - end - - it "should not have an inferred_port" do - @uri.inferred_port.should == nil - end - - it "should not be considered to be ip-based" do - @uri.should_not be_ip_based - end - - it "should have a path of 'comp.infosystems.www.servers.unix'" do - @uri.path.should == "comp.infosystems.www.servers.unix" - end - - it "should not have a request URI" do - @uri.request_uri.should == nil - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end - - it "should have a 'null' origin" do - @uri.origin.should == 'null' - end -end - -# Section 1.1.2 of RFC 3986 -describe Addressable::URI, "when parsed from " + - "'tel:+1-816-555-1212'" do - before do - @uri = Addressable::URI.parse("tel:+1-816-555-1212") - end - - it "should use the 'tel' scheme" do - @uri.scheme.should == "tel" - end - - it "should not be considered to be ip-based" do - @uri.should_not be_ip_based - end - - it "should not have an inferred_port" do - @uri.inferred_port.should == nil - end - - it "should have a path of '+1-816-555-1212'" do - @uri.path.should == "+1-816-555-1212" - end - - it "should not have a request URI" do - @uri.request_uri.should == nil - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end - - it "should have a 'null' origin" do - @uri.origin.should == 'null' - end -end - -# Section 1.1.2 of RFC 3986 -describe Addressable::URI, "when parsed from " + - "'telnet://192.0.2.16:80/'" do - before do - @uri = Addressable::URI.parse("telnet://192.0.2.16:80/") - end - - it "should use the 'telnet' scheme" do - @uri.scheme.should == "telnet" - end - - it "should have a host of '192.0.2.16'" do - @uri.host.should == "192.0.2.16" - end - - it "should have a port of 80" do - @uri.port.should == 80 - end - - it "should have a inferred_port of 80" do - @uri.inferred_port.should == 80 - end - - it "should have a default_port of 23" do - @uri.default_port.should == 23 - end - - it "should be considered to be ip-based" do - @uri.should be_ip_based - end - - it "should have a path of '/'" do - @uri.path.should == "/" - end - - it "should not have a request URI" do - @uri.request_uri.should == nil - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end - - it "should have an origin of 'telnet://192.0.2.16:80'" do - @uri.origin.should == 'telnet://192.0.2.16:80' - end -end - -# Section 1.1.2 of RFC 3986 -describe Addressable::URI, "when parsed from " + - "'urn:oasis:names:specification:docbook:dtd:xml:4.1.2'" do - before do - @uri = Addressable::URI.parse( - "urn:oasis:names:specification:docbook:dtd:xml:4.1.2") - end - - it "should use the 'urn' scheme" do - @uri.scheme.should == "urn" - end - - it "should not have an inferred_port" do - @uri.inferred_port.should == nil - end - - it "should not be considered to be ip-based" do - @uri.should_not be_ip_based - end - - it "should have a path of " + - "'oasis:names:specification:docbook:dtd:xml:4.1.2'" do - @uri.path.should == "oasis:names:specification:docbook:dtd:xml:4.1.2" - end - - it "should not have a request URI" do - @uri.request_uri.should == nil - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end - - it "should have a 'null' origin" do - @uri.origin.should == 'null' - end -end - -describe Addressable::URI, "when heuristically parsed from " + - "'192.0.2.16:8000/path'" do - before do - @uri = Addressable::URI.heuristic_parse("192.0.2.16:8000/path") - end - - it "should use the 'http' scheme" do - @uri.scheme.should == "http" - end - - it "should have a host of '192.0.2.16'" do - @uri.host.should == "192.0.2.16" - end - - it "should have a port of '8000'" do - @uri.port.should == 8000 - end - - it "should be considered to be ip-based" do - @uri.should be_ip_based - end - - it "should have a path of '/path'" do - @uri.path.should == "/path" - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end - - it "should have an origin of 'http://192.0.2.16:8000'" do - @uri.origin.should == 'http://192.0.2.16:8000' - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com'" do - before do - @uri = Addressable::URI.parse("http://example.com") - end - - it "when inspected, should have the correct URI" do - @uri.inspect.should include("http://example.com") - end - - it "when inspected, should have the correct class name" do - @uri.inspect.should include("Addressable::URI") - end - - it "when inspected, should have the correct object id" do - @uri.inspect.should include("%#0x" % @uri.object_id) - end - - it "should use the 'http' scheme" do - @uri.scheme.should == "http" - end - - it "should be considered to be ip-based" do - @uri.should be_ip_based - end - - it "should have an authority segment of 'example.com'" do - @uri.authority.should == "example.com" - end - - it "should have a host of 'example.com'" do - @uri.host.should == "example.com" - end - - it "should be considered ip-based" do - @uri.should be_ip_based - end - - it "should have no username" do - @uri.user.should == nil - end - - it "should have no password" do - @uri.password.should == nil - end - - it "should use port 80" do - @uri.inferred_port.should == 80 - end - - it "should not have a specified port" do - @uri.port.should == nil - end - - it "should have an empty path" do - @uri.path.should == "" - end - - it "should have no query string" do - @uri.query.should == nil - @uri.query_values.should == nil - end - - it "should have a request URI of '/'" do - @uri.request_uri.should == "/" - end - - it "should have no fragment" do - @uri.fragment.should == nil - end - - it "should be considered absolute" do - @uri.should be_absolute - end - - it "should not be considered relative" do - @uri.should_not be_relative - end - - it "should not be exactly equal to 42" do - @uri.eql?(42).should == false - end - - it "should not be equal to 42" do - (@uri == 42).should == false - end - - it "should not be roughly equal to 42" do - (@uri === 42).should == false - end - - it "should be exactly equal to http://example.com" do - @uri.eql?(Addressable::URI.parse("http://example.com")).should == true - end - - it "should be roughly equal to http://example.com/" do - (@uri === Addressable::URI.parse("http://example.com/")).should == true - end - - it "should be roughly equal to the string 'http://example.com/'" do - (@uri === "http://example.com/").should == true - end - - it "should not be roughly equal to the string " + - "'http://example.com:bogus/'" do - (lambda do - (@uri === "http://example.com:bogus/").should == false - end).should_not raise_error - end - - it "should result in itself when joined with itself" do - @uri.join(@uri).to_s.should == "http://example.com" - @uri.join!(@uri).to_s.should == "http://example.com" - end - - it "should be equivalent to http://EXAMPLE.com" do - @uri.should == Addressable::URI.parse("http://EXAMPLE.com") - end - - it "should be equivalent to http://EXAMPLE.com:80/" do - @uri.should == Addressable::URI.parse("http://EXAMPLE.com:80/") - end - - it "should have the same hash as http://example.com" do - @uri.hash.should == Addressable::URI.parse("http://example.com").hash - end - - it "should have the same hash as http://EXAMPLE.com after assignment" do - @uri.host = "EXAMPLE.com" - @uri.hash.should == Addressable::URI.parse("http://EXAMPLE.com").hash - end - - it "should have a different hash from http://EXAMPLE.com" do - @uri.hash.should_not == Addressable::URI.parse("http://EXAMPLE.com").hash - end - - # Section 6.2.3 of RFC 3986 - it "should be equivalent to http://example.com/" do - @uri.should == Addressable::URI.parse("http://example.com/") - end - - # Section 6.2.3 of RFC 3986 - it "should be equivalent to http://example.com:/" do - @uri.should == Addressable::URI.parse("http://example.com:/") - end - - # Section 6.2.3 of RFC 3986 - it "should be equivalent to http://example.com:80/" do - @uri.should == Addressable::URI.parse("http://example.com:80/") - end - - # Section 6.2.2.1 of RFC 3986 - it "should be equivalent to http://EXAMPLE.COM/" do - @uri.should == Addressable::URI.parse("http://EXAMPLE.COM/") - end - - it "should have a route of '/path/' to 'http://example.com/path/'" do - @uri.route_to("http://example.com/path/").should == - Addressable::URI.parse("/path/") - end - - it "should have a route of '..' from 'http://example.com/path/'" do - @uri.route_from("http://example.com/path/").should == - Addressable::URI.parse("..") - end - - it "should have a route of '#' to 'http://example.com/'" do - @uri.route_to("http://example.com/").should == - Addressable::URI.parse("#") - end - - it "should have a route of 'http://elsewhere.com/' to " + - "'http://elsewhere.com/'" do - @uri.route_to("http://elsewhere.com/").should == - Addressable::URI.parse("http://elsewhere.com/") - end - - it "when joined with 'relative/path' should be " + - "'http://example.com/relative/path'" do - @uri.join('relative/path').should == - Addressable::URI.parse("http://example.com/relative/path") - end - - it "when joined with a bogus object a TypeError should be raised" do - (lambda do - @uri.join(42) - end).should raise_error(TypeError) - end - - it "should have the correct username after assignment" do - @uri.user = "newuser" - @uri.user.should == "newuser" - @uri.password.should == nil - @uri.to_s.should == "http://newuser@example.com" - end - - it "should have the correct username after assignment" do - @uri.user = "user@123!" - @uri.user.should == "user@123!" - @uri.normalized_user.should == "user%40123%21" - @uri.password.should == nil - @uri.normalize.to_s.should == "http://user%40123%21@example.com/" - end - - it "should have the correct password after assignment" do - @uri.password = "newpass" - @uri.password.should == "newpass" - @uri.user.should == "" - @uri.to_s.should == "http://:newpass@example.com" - end - - it "should have the correct password after assignment" do - @uri.password = "#secret@123!" - @uri.password.should == "#secret@123!" - @uri.normalized_password.should == "%23secret%40123%21" - @uri.user.should == "" - @uri.normalize.to_s.should == "http://:%23secret%40123%21@example.com/" - @uri.omit(:password).to_s.should == "http://example.com" - end - - it "should have the correct user/pass after repeated assignment" do - @uri.user = nil - @uri.user.should == nil - @uri.password = "newpass" - @uri.password.should == "newpass" - # Username cannot be nil if the password is set - @uri.user.should == "" - @uri.to_s.should == "http://:newpass@example.com" - @uri.user = "newuser" - @uri.user.should == "newuser" - @uri.password = nil - @uri.password.should == nil - @uri.to_s.should == "http://newuser@example.com" - @uri.user = "newuser" - @uri.user.should == "newuser" - @uri.password = "" - @uri.password.should == "" - @uri.to_s.should == "http://newuser:@example.com" - @uri.password = "newpass" - @uri.password.should == "newpass" - @uri.user = nil - # Username cannot be nil if the password is set - @uri.user.should == "" - @uri.to_s.should == "http://:newpass@example.com" - end - - it "should have the correct user/pass after userinfo assignment" do - @uri.user = "newuser" - @uri.user.should == "newuser" - @uri.password = "newpass" - @uri.password.should == "newpass" - @uri.userinfo = nil - @uri.userinfo.should == nil - @uri.user.should == nil - @uri.password.should == nil - end - - it "should correctly convert to a hash" do - @uri.to_hash.should == { - :scheme => "http", - :user => nil, - :password => nil, - :host => "example.com", - :port => nil, - :path => "", - :query => nil, - :fragment => nil - } - end - - it "should be identical to its duplicate" do - @uri.should == @uri.dup - end - - it "should have an origin of 'http://example.com'" do - @uri.origin.should == 'http://example.com' - end -end - -# Section 5.1.2 of RFC 2616 -describe Addressable::URI, "when parsed from " + - "'http://www.w3.org/pub/WWW/TheProject.html'" do - before do - @uri = Addressable::URI.parse("http://www.w3.org/pub/WWW/TheProject.html") - end - - it "should have the correct request URI" do - @uri.request_uri.should == "/pub/WWW/TheProject.html" - end - - it "should have the correct request URI after assignment" do - @uri.request_uri = "/some/where/else.html?query?string" - @uri.request_uri.should == "/some/where/else.html?query?string" - @uri.path.should == "/some/where/else.html" - @uri.query.should == "query?string" - end - - it "should have the correct request URI after assignment" do - @uri.request_uri = "?x=y" - @uri.request_uri.should == "/?x=y" - @uri.path.should == "/" - @uri.query.should == "x=y" - end - - it "should raise an error if the site value is set to something bogus" do - (lambda do - @uri.site = 42 - end).should raise_error(TypeError) - end - - it "should raise an error if the request URI is set to something bogus" do - (lambda do - @uri.request_uri = 42 - end).should raise_error(TypeError) - end - - it "should correctly convert to a hash" do - @uri.to_hash.should == { - :scheme => "http", - :user => nil, - :password => nil, - :host => "www.w3.org", - :port => nil, - :path => "/pub/WWW/TheProject.html", - :query => nil, - :fragment => nil - } - end - - it "should have an origin of 'http://www.w3.org'" do - @uri.origin.should == 'http://www.w3.org' - end -end - -describe Addressable::URI, "when parsing IPv6 addresses" do - it "should not raise an error for " + - "'http://[3ffe:1900:4545:3:200:f8ff:fe21:67cf]/'" do - Addressable::URI.parse("http://[3ffe:1900:4545:3:200:f8ff:fe21:67cf]/") - end - - it "should not raise an error for " + - "'http://[fe80:0:0:0:200:f8ff:fe21:67cf]/'" do - Addressable::URI.parse("http://[fe80:0:0:0:200:f8ff:fe21:67cf]/") - end - - it "should not raise an error for " + - "'http://[fe80::200:f8ff:fe21:67cf]/'" do - Addressable::URI.parse("http://[fe80::200:f8ff:fe21:67cf]/") - end - - it "should not raise an error for " + - "'http://[::1]/'" do - Addressable::URI.parse("http://[::1]/") - end - - it "should not raise an error for " + - "'http://[fe80::1]/'" do - Addressable::URI.parse("http://[fe80::1]/") - end - - it "should raise an error for " + - "'http://[]/'" do - (lambda do - Addressable::URI.parse("http://[]/") - end).should raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when parsing IPv6 address" do - subject { Addressable::URI.parse("http://[3ffe:1900:4545:3:200:f8ff:fe21:67cf]/") } - its(:host) { should == '[3ffe:1900:4545:3:200:f8ff:fe21:67cf]' } - its(:hostname) { should == '3ffe:1900:4545:3:200:f8ff:fe21:67cf' } -end - -describe Addressable::URI, "when assigning IPv6 address" do - it "should allow to set bare IPv6 address as hostname" do - uri = Addressable::URI.parse("http://[::1]/") - uri.hostname = '3ffe:1900:4545:3:200:f8ff:fe21:67cf' - uri.to_s.should == 'http://[3ffe:1900:4545:3:200:f8ff:fe21:67cf]/' - end - - it "should not allow to set bare IPv6 address as host" do - uri = Addressable::URI.parse("http://[::1]/") - pending "not checked" - (lambda do - uri.host = '3ffe:1900:4545:3:200:f8ff:fe21:67cf' - end).should raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when parsing IPvFuture addresses" do - it "should not raise an error for " + - "'http://[v9.3ffe:1900:4545:3:200:f8ff:fe21:67cf]/'" do - Addressable::URI.parse("http://[v9.3ffe:1900:4545:3:200:f8ff:fe21:67cf]/") - end - - it "should not raise an error for " + - "'http://[vff.fe80:0:0:0:200:f8ff:fe21:67cf]/'" do - Addressable::URI.parse("http://[vff.fe80:0:0:0:200:f8ff:fe21:67cf]/") - end - - it "should not raise an error for " + - "'http://[v12.fe80::200:f8ff:fe21:67cf]/'" do - Addressable::URI.parse("http://[v12.fe80::200:f8ff:fe21:67cf]/") - end - - it "should not raise an error for " + - "'http://[va0.::1]/'" do - Addressable::URI.parse("http://[va0.::1]/") - end - - it "should not raise an error for " + - "'http://[v255.fe80::1]/'" do - Addressable::URI.parse("http://[v255.fe80::1]/") - end - - it "should raise an error for " + - "'http://[v0.]/'" do - (lambda do - Addressable::URI.parse("http://[v0.]/") - end).should raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/'" do - before do - @uri = Addressable::URI.parse("http://example.com/") - end - - # Based on http://intertwingly.net/blog/2004/07/31/URI-Equivalence - it "should be equivalent to http://example.com" do - @uri.should == Addressable::URI.parse("http://example.com") - end - - # Based on http://intertwingly.net/blog/2004/07/31/URI-Equivalence - it "should be equivalent to HTTP://example.com/" do - @uri.should == Addressable::URI.parse("HTTP://example.com/") - end - - # Based on http://intertwingly.net/blog/2004/07/31/URI-Equivalence - it "should be equivalent to http://example.com:/" do - @uri.should == Addressable::URI.parse("http://example.com:/") - end - - # Based on http://intertwingly.net/blog/2004/07/31/URI-Equivalence - it "should be equivalent to http://example.com:80/" do - @uri.should == Addressable::URI.parse("http://example.com:80/") - end - - # Based on http://intertwingly.net/blog/2004/07/31/URI-Equivalence - it "should be equivalent to http://Example.com/" do - @uri.should == Addressable::URI.parse("http://Example.com/") - end - - it "should have the correct username after assignment" do - @uri.user = nil - @uri.user.should == nil - @uri.password.should == nil - @uri.to_s.should == "http://example.com/" - end - - it "should have the correct password after assignment" do - @uri.password = nil - @uri.password.should == nil - @uri.user.should == nil - @uri.to_s.should == "http://example.com/" - end - - it "should have a request URI of '/'" do - @uri.request_uri.should == "/" - end - - it "should correctly convert to a hash" do - @uri.to_hash.should == { - :scheme => "http", - :user => nil, - :password => nil, - :host => "example.com", - :port => nil, - :path => "/", - :query => nil, - :fragment => nil - } - end - - it "should be identical to its duplicate" do - @uri.should == @uri.dup - end - - it "should have the same hash as its duplicate" do - @uri.hash.should == @uri.dup.hash - end - - it "should have a different hash from its equivalent String value" do - @uri.hash.should_not == @uri.to_s.hash - end - - it "should have the same hash as an equal URI" do - @uri.hash.should == Addressable::URI.parse("http://example.com/").hash - end - - it "should be equivalent to http://EXAMPLE.com" do - @uri.should == Addressable::URI.parse("http://EXAMPLE.com") - end - - it "should be equivalent to http://EXAMPLE.com:80/" do - @uri.should == Addressable::URI.parse("http://EXAMPLE.com:80/") - end - - it "should have the same hash as http://example.com/" do - @uri.hash.should == Addressable::URI.parse("http://example.com/").hash - end - - it "should have the same hash as http://example.com after assignment" do - @uri.path = "" - @uri.hash.should == Addressable::URI.parse("http://example.com").hash - end - - it "should have the same hash as http://example.com/? after assignment" do - @uri.query = "" - @uri.hash.should == Addressable::URI.parse("http://example.com/?").hash - end - - it "should have the same hash as http://example.com/? after assignment" do - @uri.query_values = {} - @uri.hash.should == Addressable::URI.parse("http://example.com/?").hash - end - - it "should have the same hash as http://example.com/# after assignment" do - @uri.fragment = "" - @uri.hash.should == Addressable::URI.parse("http://example.com/#").hash - end - - it "should have a different hash from http://example.com" do - @uri.hash.should_not == Addressable::URI.parse("http://example.com").hash - end - - it "should have an origin of 'http://example.com'" do - @uri.origin.should == 'http://example.com' - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com?#'" do - before do - @uri = Addressable::URI.parse("http://example.com?#") - end - - it "should correctly convert to a hash" do - @uri.to_hash.should == { - :scheme => "http", - :user => nil, - :password => nil, - :host => "example.com", - :port => nil, - :path => "", - :query => "", - :fragment => "" - } - end - - it "should have a request URI of '/?'" do - @uri.request_uri.should == "/?" - end - - it "should normalize to 'http://example.com/'" do - @uri.normalize.to_s.should == "http://example.com/" - end - - it "should have an origin of 'http://example.com'" do - @uri.origin.should == "http://example.com" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://@example.com/'" do - before do - @uri = Addressable::URI.parse("http://@example.com/") - end - - it "should be equivalent to http://example.com" do - @uri.should == Addressable::URI.parse("http://example.com") - end - - it "should correctly convert to a hash" do - @uri.to_hash.should == { - :scheme => "http", - :user => "", - :password => nil, - :host => "example.com", - :port => nil, - :path => "/", - :query => nil, - :fragment => nil - } - end - - it "should be identical to its duplicate" do - @uri.should == @uri.dup - end - - it "should have an origin of 'http://example.com'" do - @uri.origin.should == 'http://example.com' - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com./'" do - before do - @uri = Addressable::URI.parse("http://example.com./") - end - - it "should be equivalent to http://example.com" do - @uri.should == Addressable::URI.parse("http://example.com") - end - - it "should not be considered to be in normal form" do - @uri.normalize.should_not be_eql(@uri) - end - - it "should be identical to its duplicate" do - @uri.should == @uri.dup - end - - it "should have an origin of 'http://example.com'" do - @uri.origin.should == 'http://example.com' - end -end - -describe Addressable::URI, "when parsed from " + - "'http://:@example.com/'" do - before do - @uri = Addressable::URI.parse("http://:@example.com/") - end - - it "should be equivalent to http://example.com" do - @uri.should == Addressable::URI.parse("http://example.com") - end - - it "should correctly convert to a hash" do - @uri.to_hash.should == { - :scheme => "http", - :user => "", - :password => "", - :host => "example.com", - :port => nil, - :path => "/", - :query => nil, - :fragment => nil - } - end - - it "should be identical to its duplicate" do - @uri.should == @uri.dup - end - - it "should have an origin of 'http://example.com'" do - @uri.origin.should == 'http://example.com' - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/~smith/'" do - before do - @uri = Addressable::URI.parse("http://example.com/~smith/") - end - - # Based on http://intertwingly.net/blog/2004/07/31/URI-Equivalence - it "should be equivalent to http://example.com/%7Esmith/" do - @uri.should == Addressable::URI.parse("http://example.com/%7Esmith/") - end - - # Based on http://intertwingly.net/blog/2004/07/31/URI-Equivalence - it "should be equivalent to http://example.com/%7esmith/" do - @uri.should == Addressable::URI.parse("http://example.com/%7esmith/") - end - - it "should be identical to its duplicate" do - @uri.should == @uri.dup - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/%E8'" do - before do - @uri = Addressable::URI.parse("http://example.com/%E8") - end - - it "should not raise an exception when normalized" do - (lambda do - @uri.normalize - end).should_not raise_error - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end - - it "should not change if encoded with the normalizing algorithm" do - Addressable::URI.normalized_encode(@uri).to_s.should == - "http://example.com/%E8" - Addressable::URI.normalized_encode(@uri, Addressable::URI).to_s.should === - "http://example.com/%E8" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/path%2Fsegment/'" do - before do - @uri = Addressable::URI.parse("http://example.com/path%2Fsegment/") - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end - - it "should be equal to 'http://example.com/path%2Fsegment/'" do - @uri.normalize.should be_eql( - Addressable::URI.parse("http://example.com/path%2Fsegment/") - ) - end - - it "should not be equal to 'http://example.com/path/segment/'" do - @uri.should_not == - Addressable::URI.parse("http://example.com/path/segment/") - end - - it "should not be equal to 'http://example.com/path/segment/'" do - @uri.normalize.should_not be_eql( - Addressable::URI.parse("http://example.com/path/segment/") - ) - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?%F6'" do - before do - @uri = Addressable::URI.parse("http://example.com/?%F6") - end - - it "should not raise an exception when normalized" do - (lambda do - @uri.normalize - end).should_not raise_error - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end - - it "should not change if encoded with the normalizing algorithm" do - Addressable::URI.normalized_encode(@uri).to_s.should == - "http://example.com/?%F6" - Addressable::URI.normalized_encode(@uri, Addressable::URI).to_s.should === - "http://example.com/?%F6" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/#%F6'" do - before do - @uri = Addressable::URI.parse("http://example.com/#%F6") - end - - it "should not raise an exception when normalized" do - (lambda do - @uri.normalize - end).should_not raise_error - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end - - it "should not change if encoded with the normalizing algorithm" do - Addressable::URI.normalized_encode(@uri).to_s.should == - "http://example.com/#%F6" - Addressable::URI.normalized_encode(@uri, Addressable::URI).to_s.should === - "http://example.com/#%F6" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/%C3%87'" do - before do - @uri = Addressable::URI.parse("http://example.com/%C3%87") - end - - # Based on http://intertwingly.net/blog/2004/07/31/URI-Equivalence - it "should be equivalent to 'http://example.com/C%CC%A7'" do - @uri.should == Addressable::URI.parse("http://example.com/C%CC%A7") - end - - it "should not change if encoded with the normalizing algorithm" do - Addressable::URI.normalized_encode(@uri).to_s.should == - "http://example.com/%C3%87" - Addressable::URI.normalized_encode(@uri, Addressable::URI).to_s.should === - "http://example.com/%C3%87" - end - - it "should raise an error if encoding with an unexpected return type" do - (lambda do - Addressable::URI.normalized_encode(@uri, Integer) - end).should raise_error(TypeError) - end - - it "if percent encoded should be 'http://example.com/C%25CC%25A7'" do - Addressable::URI.encode(@uri).to_s.should == - "http://example.com/%25C3%2587" - end - - it "if percent encoded should be 'http://example.com/C%25CC%25A7'" do - Addressable::URI.encode(@uri, Addressable::URI).should == - Addressable::URI.parse("http://example.com/%25C3%2587") - end - - it "should raise an error if encoding with an unexpected return type" do - (lambda do - Addressable::URI.encode(@uri, Integer) - end).should raise_error(TypeError) - end - - it "should be identical to its duplicate" do - @uri.should == @uri.dup - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?q=string'" do - before do - @uri = Addressable::URI.parse("http://example.com/?q=string") - end - - it "should use the 'http' scheme" do - @uri.scheme.should == "http" - end - - it "should have an authority segment of 'example.com'" do - @uri.authority.should == "example.com" - end - - it "should have a host of 'example.com'" do - @uri.host.should == "example.com" - end - - it "should have no username" do - @uri.user.should == nil - end - - it "should have no password" do - @uri.password.should == nil - end - - it "should use port 80" do - @uri.inferred_port.should == 80 - end - - it "should have a path of '/'" do - @uri.path.should == "/" - end - - it "should have a query string of 'q=string'" do - @uri.query.should == "q=string" - end - - it "should have no fragment" do - @uri.fragment.should == nil - end - - it "should be considered absolute" do - @uri.should be_absolute - end - - it "should not be considered relative" do - @uri.should_not be_relative - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end - - it "should be identical to its duplicate" do - @uri.should == @uri.dup - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com:80/'" do - before do - @uri = Addressable::URI.parse("http://example.com:80/") - end - - it "should use the 'http' scheme" do - @uri.scheme.should == "http" - end - - it "should have an authority segment of 'example.com:80'" do - @uri.authority.should == "example.com:80" - end - - it "should have a host of 'example.com'" do - @uri.host.should == "example.com" - end - - it "should have no username" do - @uri.user.should == nil - end - - it "should have no password" do - @uri.password.should == nil - end - - it "should use port 80" do - @uri.inferred_port.should == 80 - end - - it "should have explicit port 80" do - @uri.port.should == 80 - end - - it "should have a path of '/'" do - @uri.path.should == "/" - end - - it "should have no query string" do - @uri.query.should == nil - end - - it "should have no fragment" do - @uri.fragment.should == nil - end - - it "should be considered absolute" do - @uri.should be_absolute - end - - it "should not be considered relative" do - @uri.should_not be_relative - end - - it "should be exactly equal to http://example.com:80/" do - @uri.eql?(Addressable::URI.parse("http://example.com:80/")).should == true - end - - it "should be roughly equal to http://example.com/" do - (@uri === Addressable::URI.parse("http://example.com/")).should == true - end - - it "should be roughly equal to the string 'http://example.com/'" do - (@uri === "http://example.com/").should == true - end - - it "should not be roughly equal to the string " + - "'http://example.com:bogus/'" do - (lambda do - (@uri === "http://example.com:bogus/").should == false - end).should_not raise_error - end - - it "should result in itself when joined with itself" do - @uri.join(@uri).to_s.should == "http://example.com:80/" - @uri.join!(@uri).to_s.should == "http://example.com:80/" - end - - # Section 6.2.3 of RFC 3986 - it "should be equal to http://example.com/" do - @uri.should == Addressable::URI.parse("http://example.com/") - end - - # Section 6.2.3 of RFC 3986 - it "should be equal to http://example.com:/" do - @uri.should == Addressable::URI.parse("http://example.com:/") - end - - # Section 6.2.3 of RFC 3986 - it "should be equal to http://example.com:80/" do - @uri.should == Addressable::URI.parse("http://example.com:80/") - end - - # Section 6.2.2.1 of RFC 3986 - it "should be equal to http://EXAMPLE.COM/" do - @uri.should == Addressable::URI.parse("http://EXAMPLE.COM/") - end - - it "should correctly convert to a hash" do - @uri.to_hash.should == { - :scheme => "http", - :user => nil, - :password => nil, - :host => "example.com", - :port => 80, - :path => "/", - :query => nil, - :fragment => nil - } - end - - it "should be identical to its duplicate" do - @uri.should == @uri.dup - end - - it "should have an origin of 'http://example.com'" do - @uri.origin.should == 'http://example.com' - end - - it "should not change if encoded with the normalizing algorithm" do - Addressable::URI.normalized_encode(@uri).to_s.should == - "http://example.com:80/" - Addressable::URI.normalized_encode(@uri, Addressable::URI).to_s.should === - "http://example.com:80/" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com:8080/'" do - before do - @uri = Addressable::URI.parse("http://example.com:8080/") - end - - it "should use the 'http' scheme" do - @uri.scheme.should == "http" - end - - it "should have an authority segment of 'example.com:8080'" do - @uri.authority.should == "example.com:8080" - end - - it "should have a host of 'example.com'" do - @uri.host.should == "example.com" - end - - it "should have no username" do - @uri.user.should == nil - end - - it "should have no password" do - @uri.password.should == nil - end - - it "should use port 8080" do - @uri.inferred_port.should == 8080 - end - - it "should have explicit port 8080" do - @uri.port.should == 8080 - end - - it "should have default port 80" do - @uri.default_port.should == 80 - end - - it "should have a path of '/'" do - @uri.path.should == "/" - end - - it "should have no query string" do - @uri.query.should == nil - end - - it "should have no fragment" do - @uri.fragment.should == nil - end - - it "should be considered absolute" do - @uri.should be_absolute - end - - it "should not be considered relative" do - @uri.should_not be_relative - end - - it "should be exactly equal to http://example.com:8080/" do - @uri.eql?(Addressable::URI.parse( - "http://example.com:8080/")).should == true - end - - it "should have a route of 'http://example.com:8080/' from " + - "'http://example.com/path/to/'" do - @uri.route_from("http://example.com/path/to/").should == - Addressable::URI.parse("http://example.com:8080/") - end - - it "should have a route of 'http://example.com:8080/' from " + - "'http://example.com:80/path/to/'" do - @uri.route_from("http://example.com:80/path/to/").should == - Addressable::URI.parse("http://example.com:8080/") - end - - it "should have a route of '../../' from " + - "'http://example.com:8080/path/to/'" do - @uri.route_from("http://example.com:8080/path/to/").should == - Addressable::URI.parse("../../") - end - - it "should have a route of 'http://example.com:8080/' from " + - "'http://user:pass@example.com/path/to/'" do - @uri.route_from("http://user:pass@example.com/path/to/").should == - Addressable::URI.parse("http://example.com:8080/") - end - - it "should correctly convert to a hash" do - @uri.to_hash.should == { - :scheme => "http", - :user => nil, - :password => nil, - :host => "example.com", - :port => 8080, - :path => "/", - :query => nil, - :fragment => nil - } - end - - it "should be identical to its duplicate" do - @uri.should == @uri.dup - end - - it "should have an origin of 'http://example.com:8080'" do - @uri.origin.should == 'http://example.com:8080' - end - - it "should not change if encoded with the normalizing algorithm" do - Addressable::URI.normalized_encode(@uri).to_s.should == - "http://example.com:8080/" - Addressable::URI.normalized_encode(@uri, Addressable::URI).to_s.should === - "http://example.com:8080/" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com:%38%30/'" do - before do - @uri = Addressable::URI.parse("http://example.com:%38%30/") - end - - it "should have the correct port" do - @uri.port.should == 80 - end - - it "should not be considered to be in normal form" do - @uri.normalize.should_not be_eql(@uri) - end - - it "should normalize to 'http://example.com/'" do - @uri.normalize.to_s.should == "http://example.com/" - end - - it "should have an origin of 'http://example.com'" do - @uri.origin.should == 'http://example.com' - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/%2E/'" do - before do - @uri = Addressable::URI.parse("http://example.com/%2E/") - end - - it "should be considered to be in normal form" do - pending( - 'path segment normalization should happen before ' + - 'percent escaping normalization' - ) do - @uri.normalize.should be_eql(@uri) - end - end - - it "should normalize to 'http://example.com/%2E/'" do - pending( - 'path segment normalization should happen before ' + - 'percent escaping normalization' - ) do - @uri.normalize.should == "http://example.com/%2E/" - end - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/..'" do - before do - @uri = Addressable::URI.parse("http://example.com/..") - end - - it "should have the correct port" do - @uri.inferred_port.should == 80 - end - - it "should not be considered to be in normal form" do - @uri.normalize.should_not be_eql(@uri) - end - - it "should normalize to 'http://example.com/'" do - @uri.normalize.to_s.should == "http://example.com/" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/../..'" do - before do - @uri = Addressable::URI.parse("http://example.com/../..") - end - - it "should have the correct port" do - @uri.inferred_port.should == 80 - end - - it "should not be considered to be in normal form" do - @uri.normalize.should_not be_eql(@uri) - end - - it "should normalize to 'http://example.com/'" do - @uri.normalize.to_s.should == "http://example.com/" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/path(/..'" do - before do - @uri = Addressable::URI.parse("http://example.com/path(/..") - end - - it "should have the correct port" do - @uri.inferred_port.should == 80 - end - - it "should not be considered to be in normal form" do - @uri.normalize.should_not be_eql(@uri) - end - - it "should normalize to 'http://example.com/'" do - @uri.normalize.to_s.should == "http://example.com/" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/(path)/..'" do - before do - @uri = Addressable::URI.parse("http://example.com/(path)/..") - end - - it "should have the correct port" do - @uri.inferred_port.should == 80 - end - - it "should not be considered to be in normal form" do - @uri.normalize.should_not be_eql(@uri) - end - - it "should normalize to 'http://example.com/'" do - @uri.normalize.to_s.should == "http://example.com/" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/path(/../'" do - before do - @uri = Addressable::URI.parse("http://example.com/path(/../") - end - - it "should have the correct port" do - @uri.inferred_port.should == 80 - end - - it "should not be considered to be in normal form" do - @uri.normalize.should_not be_eql(@uri) - end - - it "should normalize to 'http://example.com/'" do - @uri.normalize.to_s.should == "http://example.com/" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/(path)/../'" do - before do - @uri = Addressable::URI.parse("http://example.com/(path)/../") - end - - it "should have the correct port" do - @uri.inferred_port.should == 80 - end - - it "should not be considered to be in normal form" do - @uri.normalize.should_not be_eql(@uri) - end - - it "should normalize to 'http://example.com/'" do - @uri.normalize.to_s.should == "http://example.com/" - end -end - -describe Addressable::URI, "when parsed from '/a/b/c/./../../g'" do - before do - @uri = Addressable::URI.parse("/a/b/c/./../../g") - end - - it "should not be considered to be in normal form" do - @uri.normalize.should_not be_eql(@uri) - end - - # Section 5.2.4 of RFC 3986 - it "should normalize to '/a/g'" do - @uri.normalize.to_s.should == "/a/g" - end -end - -describe Addressable::URI, "when parsed from 'mid/content=5/../6'" do - before do - @uri = Addressable::URI.parse("mid/content=5/../6") - end - - it "should not be considered to be in normal form" do - @uri.normalize.should_not be_eql(@uri) - end - - # Section 5.2.4 of RFC 3986 - it "should normalize to 'mid/6'" do - @uri.normalize.to_s.should == "mid/6" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://www.example.com///../'" do - before do - @uri = Addressable::URI.parse('http://www.example.com///../') - end - - it "should not be considered to be in normal form" do - @uri.normalize.should_not be_eql(@uri) - end - - it "should normalize to 'http://www.example.com//'" do - @uri.normalize.to_s.should == "http://www.example.com//" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/path/to/resource/'" do - before do - @uri = Addressable::URI.parse("http://example.com/path/to/resource/") - end - - it "should use the 'http' scheme" do - @uri.scheme.should == "http" - end - - it "should have an authority segment of 'example.com'" do - @uri.authority.should == "example.com" - end - - it "should have a host of 'example.com'" do - @uri.host.should == "example.com" - end - - it "should have no username" do - @uri.user.should == nil - end - - it "should have no password" do - @uri.password.should == nil - end - - it "should use port 80" do - @uri.inferred_port.should == 80 - end - - it "should have a path of '/path/to/resource/'" do - @uri.path.should == "/path/to/resource/" - end - - it "should have no query string" do - @uri.query.should == nil - end - - it "should have no fragment" do - @uri.fragment.should == nil - end - - it "should be considered absolute" do - @uri.should be_absolute - end - - it "should not be considered relative" do - @uri.should_not be_relative - end - - it "should be exactly equal to http://example.com:8080/" do - @uri.eql?(Addressable::URI.parse( - "http://example.com/path/to/resource/")).should == true - end - - it "should have a route of 'resource/' from " + - "'http://example.com/path/to/'" do - @uri.route_from("http://example.com/path/to/").should == - Addressable::URI.parse("resource/") - end - - it "should have a route of '../' from " + - "'http://example.com/path/to/resource/sub'" do - @uri.route_from("http://example.com/path/to/resource/sub").should == - Addressable::URI.parse("../") - end - - - it "should have a route of 'resource/' from " + - "'http://example.com/path/to/another'" do - @uri.route_from("http://example.com/path/to/another").should == - Addressable::URI.parse("resource/") - end - - it "should have a route of 'resource/' from " + - "'http://example.com/path/to/res'" do - @uri.route_from("http://example.com/path/to/res").should == - Addressable::URI.parse("resource/") - end - - it "should have a route of 'resource/' from " + - "'http://example.com:80/path/to/'" do - @uri.route_from("http://example.com:80/path/to/").should == - Addressable::URI.parse("resource/") - end - - it "should have a route of 'http://example.com/path/to/' from " + - "'http://example.com:8080/path/to/'" do - @uri.route_from("http://example.com:8080/path/to/").should == - Addressable::URI.parse("http://example.com/path/to/resource/") - end - - it "should have a route of 'http://example.com/path/to/' from " + - "'http://user:pass@example.com/path/to/'" do - @uri.route_from("http://user:pass@example.com/path/to/").should == - Addressable::URI.parse("http://example.com/path/to/resource/") - end - - it "should have a route of '../../path/to/resource/' from " + - "'http://example.com/to/resource/'" do - @uri.route_from("http://example.com/to/resource/").should == - Addressable::URI.parse("../../path/to/resource/") - end - - it "should correctly convert to a hash" do - @uri.to_hash.should == { - :scheme => "http", - :user => nil, - :password => nil, - :host => "example.com", - :port => nil, - :path => "/path/to/resource/", - :query => nil, - :fragment => nil - } - end - - it "should be identical to its duplicate" do - @uri.should == @uri.dup - end -end - -describe Addressable::URI, "when parsed from " + - "'relative/path/to/resource'" do - before do - @uri = Addressable::URI.parse("relative/path/to/resource") - end - - it "should not have a scheme" do - @uri.scheme.should == nil - end - - it "should not be considered ip-based" do - @uri.should_not be_ip_based - end - - it "should not have an authority segment" do - @uri.authority.should == nil - end - - it "should not have a host" do - @uri.host.should == nil - end - - it "should have no username" do - @uri.user.should == nil - end - - it "should have no password" do - @uri.password.should == nil - end - - it "should not have a port" do - @uri.port.should == nil - end - - it "should have a path of 'relative/path/to/resource'" do - @uri.path.should == "relative/path/to/resource" - end - - it "should have no query string" do - @uri.query.should == nil - end - - it "should have no fragment" do - @uri.fragment.should == nil - end - - it "should not be considered absolute" do - @uri.should_not be_absolute - end - - it "should be considered relative" do - @uri.should be_relative - end - - it "should raise an error if routing is attempted" do - (lambda do - @uri.route_to("http://example.com/") - end).should raise_error(ArgumentError, /relative\/path\/to\/resource/) - (lambda do - @uri.route_from("http://example.com/") - end).should raise_error(ArgumentError, /relative\/path\/to\/resource/) - end - - it "when joined with 'another/relative/path' should be " + - "'relative/path/to/another/relative/path'" do - @uri.join('another/relative/path').should == - Addressable::URI.parse("relative/path/to/another/relative/path") - end - - it "should be identical to its duplicate" do - @uri.should == @uri.dup - end -end - -describe Addressable::URI, "when parsed from " + - "'relative_path_with_no_slashes'" do - before do - @uri = Addressable::URI.parse("relative_path_with_no_slashes") - end - - it "should not have a scheme" do - @uri.scheme.should == nil - end - - it "should not be considered ip-based" do - @uri.should_not be_ip_based - end - - it "should not have an authority segment" do - @uri.authority.should == nil - end - - it "should not have a host" do - @uri.host.should == nil - end - - it "should have no username" do - @uri.user.should == nil - end - - it "should have no password" do - @uri.password.should == nil - end - - it "should not have a port" do - @uri.port.should == nil - end - - it "should have a path of 'relative_path_with_no_slashes'" do - @uri.path.should == "relative_path_with_no_slashes" - end - - it "should have no query string" do - @uri.query.should == nil - end - - it "should have no fragment" do - @uri.fragment.should == nil - end - - it "should not be considered absolute" do - @uri.should_not be_absolute - end - - it "should be considered relative" do - @uri.should be_relative - end - - it "when joined with 'another_relative_path' should be " + - "'another_relative_path'" do - @uri.join('another_relative_path').should == - Addressable::URI.parse("another_relative_path") - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/file.txt'" do - before do - @uri = Addressable::URI.parse("http://example.com/file.txt") - end - - it "should have a scheme of 'http'" do - @uri.scheme.should == "http" - end - - it "should have an authority segment of 'example.com'" do - @uri.authority.should == "example.com" - end - - it "should have a host of 'example.com'" do - @uri.host.should == "example.com" - end - - it "should have no username" do - @uri.user.should == nil - end - - it "should have no password" do - @uri.password.should == nil - end - - it "should use port 80" do - @uri.inferred_port.should == 80 - end - - it "should have a path of '/file.txt'" do - @uri.path.should == "/file.txt" - end - - it "should have a basename of 'file.txt'" do - @uri.basename.should == "file.txt" - end - - it "should have an extname of '.txt'" do - @uri.extname.should == ".txt" - end - - it "should have no query string" do - @uri.query.should == nil - end - - it "should have no fragment" do - @uri.fragment.should == nil - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/file.txt;parameter'" do - before do - @uri = Addressable::URI.parse("http://example.com/file.txt;parameter") - end - - it "should have a scheme of 'http'" do - @uri.scheme.should == "http" - end - - it "should have an authority segment of 'example.com'" do - @uri.authority.should == "example.com" - end - - it "should have a host of 'example.com'" do - @uri.host.should == "example.com" - end - - it "should have no username" do - @uri.user.should == nil - end - - it "should have no password" do - @uri.password.should == nil - end - - it "should use port 80" do - @uri.inferred_port.should == 80 - end - - it "should have a path of '/file.txt;parameter'" do - @uri.path.should == "/file.txt;parameter" - end - - it "should have a basename of 'file.txt'" do - @uri.basename.should == "file.txt" - end - - it "should have an extname of '.txt'" do - @uri.extname.should == ".txt" - end - - it "should have no query string" do - @uri.query.should == nil - end - - it "should have no fragment" do - @uri.fragment.should == nil - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/file.txt;x=y'" do - before do - @uri = Addressable::URI.parse("http://example.com/file.txt;x=y") - end - - it "should have a scheme of 'http'" do - @uri.scheme.should == "http" - end - - it "should have a scheme of 'http'" do - @uri.scheme.should == "http" - end - - it "should have an authority segment of 'example.com'" do - @uri.authority.should == "example.com" - end - - it "should have a host of 'example.com'" do - @uri.host.should == "example.com" - end - - it "should have no username" do - @uri.user.should == nil - end - - it "should have no password" do - @uri.password.should == nil - end - - it "should use port 80" do - @uri.inferred_port.should == 80 - end - - it "should have a path of '/file.txt;x=y'" do - @uri.path.should == "/file.txt;x=y" - end - - it "should have an extname of '.txt'" do - @uri.extname.should == ".txt" - end - - it "should have no query string" do - @uri.query.should == nil - end - - it "should have no fragment" do - @uri.fragment.should == nil - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end -end - -describe Addressable::URI, "when parsed from " + - "'svn+ssh://developername@rubyforge.org/var/svn/project'" do - before do - @uri = Addressable::URI.parse( - "svn+ssh://developername@rubyforge.org/var/svn/project" - ) - end - - it "should have a scheme of 'svn+ssh'" do - @uri.scheme.should == "svn+ssh" - end - - it "should be considered to be ip-based" do - @uri.should be_ip_based - end - - it "should have a path of '/var/svn/project'" do - @uri.path.should == "/var/svn/project" - end - - it "should have a username of 'developername'" do - @uri.user.should == "developername" - end - - it "should have no password" do - @uri.password.should == nil - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end -end - -describe Addressable::URI, "when parsed from " + - "'ssh+svn://developername@RUBYFORGE.ORG/var/svn/project'" do - before do - @uri = Addressable::URI.parse( - "ssh+svn://developername@RUBYFORGE.ORG/var/svn/project" - ) - end - - it "should have a scheme of 'ssh+svn'" do - @uri.scheme.should == "ssh+svn" - end - - it "should have a normalized scheme of 'svn+ssh'" do - @uri.normalized_scheme.should == "svn+ssh" - end - - it "should have a normalized site of 'svn+ssh'" do - @uri.normalized_site.should == "svn+ssh://developername@rubyforge.org" - end - - it "should not be considered to be ip-based" do - @uri.should_not be_ip_based - end - - it "should have a path of '/var/svn/project'" do - @uri.path.should == "/var/svn/project" - end - - it "should have a username of 'developername'" do - @uri.user.should == "developername" - end - - it "should have no password" do - @uri.password.should == nil - end - - it "should not be considered to be in normal form" do - @uri.normalize.should_not be_eql(@uri) - end -end - -describe Addressable::URI, "when parsed from " + - "'mailto:user@example.com'" do - before do - @uri = Addressable::URI.parse("mailto:user@example.com") - end - - it "should have a scheme of 'mailto'" do - @uri.scheme.should == "mailto" - end - - it "should not be considered to be ip-based" do - @uri.should_not be_ip_based - end - - it "should have a path of 'user@example.com'" do - @uri.path.should == "user@example.com" - end - - it "should have no user" do - @uri.user.should == nil - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end -end - -describe Addressable::URI, "when parsed from " + - "'tag:example.com,2006-08-18:/path/to/something'" do - before do - @uri = Addressable::URI.parse( - "tag:example.com,2006-08-18:/path/to/something") - end - - it "should have a scheme of 'tag'" do - @uri.scheme.should == "tag" - end - - it "should be considered to be ip-based" do - @uri.should_not be_ip_based - end - - it "should have a path of " + - "'example.com,2006-08-18:/path/to/something'" do - @uri.path.should == "example.com,2006-08-18:/path/to/something" - end - - it "should have no user" do - @uri.user.should == nil - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end - - it "should have a 'null' origin" do - @uri.origin.should == 'null' - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/x;y/'" do - before do - @uri = Addressable::URI.parse("http://example.com/x;y/") - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?x=1&y=2'" do - before do - @uri = Addressable::URI.parse("http://example.com/?x=1&y=2") - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end -end - -describe Addressable::URI, "when parsed from " + - "'view-source:http://example.com/'" do - before do - @uri = Addressable::URI.parse("view-source:http://example.com/") - end - - it "should have a scheme of 'view-source'" do - @uri.scheme.should == "view-source" - end - - it "should have a path of 'http://example.com/'" do - @uri.path.should == "http://example.com/" - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end - - it "should have a 'null' origin" do - @uri.origin.should == 'null' - end -end - -describe Addressable::URI, "when parsed from " + - "'http://user:pass@example.com/path/to/resource?query=x#fragment'" do - before do - @uri = Addressable::URI.parse( - "http://user:pass@example.com/path/to/resource?query=x#fragment") - end - - it "should use the 'http' scheme" do - @uri.scheme.should == "http" - end - - it "should have an authority segment of 'user:pass@example.com'" do - @uri.authority.should == "user:pass@example.com" - end - - it "should have a username of 'user'" do - @uri.user.should == "user" - end - - it "should have a password of 'pass'" do - @uri.password.should == "pass" - end - - it "should have a host of 'example.com'" do - @uri.host.should == "example.com" - end - - it "should use port 80" do - @uri.inferred_port.should == 80 - end - - it "should have a path of '/path/to/resource'" do - @uri.path.should == "/path/to/resource" - end - - it "should have a query string of 'query=x'" do - @uri.query.should == "query=x" - end - - it "should have a fragment of 'fragment'" do - @uri.fragment.should == "fragment" - end - - it "should be considered to be in normal form" do - @uri.normalize.should be_eql(@uri) - end - - it "should have a route of '../../' to " + - "'http://user:pass@example.com/path/'" do - @uri.route_to("http://user:pass@example.com/path/").should == - Addressable::URI.parse("../../") - end - - it "should have a route of 'to/resource?query=x#fragment' " + - "from 'http://user:pass@example.com/path/'" do - @uri.route_from("http://user:pass@example.com/path/").should == - Addressable::URI.parse("to/resource?query=x#fragment") - end - - it "should have a route of '?query=x#fragment' " + - "from 'http://user:pass@example.com/path/to/resource'" do - @uri.route_from("http://user:pass@example.com/path/to/resource").should == - Addressable::URI.parse("?query=x#fragment") - end - - it "should have a route of '#fragment' " + - "from 'http://user:pass@example.com/path/to/resource?query=x'" do - @uri.route_from( - "http://user:pass@example.com/path/to/resource?query=x").should == - Addressable::URI.parse("#fragment") - end - - it "should have a route of '#fragment' from " + - "'http://user:pass@example.com/path/to/resource?query=x#fragment'" do - @uri.route_from( - "http://user:pass@example.com/path/to/resource?query=x#fragment" - ).should == Addressable::URI.parse("#fragment") - end - - it "should have a route of 'http://elsewhere.com/' to " + - "'http://elsewhere.com/'" do - @uri.route_to("http://elsewhere.com/").should == - Addressable::URI.parse("http://elsewhere.com/") - end - - it "should have a route of " + - "'http://user:pass@example.com/path/to/resource?query=x#fragment' " + - "from 'http://example.com/path/to/'" do - @uri.route_from("http://elsewhere.com/path/to/").should == - Addressable::URI.parse( - "http://user:pass@example.com/path/to/resource?query=x#fragment") - end - - it "should have the correct scheme after assignment" do - @uri.scheme = "ftp" - @uri.scheme.should == "ftp" - @uri.to_s.should == - "ftp://user:pass@example.com/path/to/resource?query=x#fragment" - @uri.to_str.should == - "ftp://user:pass@example.com/path/to/resource?query=x#fragment" - @uri.scheme = "bogus!" - @uri.scheme.should == "bogus!" - @uri.normalized_scheme.should == "bogus%21" - @uri.normalize.to_s.should == - "bogus%21://user:pass@example.com/path/to/resource?query=x#fragment" - @uri.normalize.to_str.should == - "bogus%21://user:pass@example.com/path/to/resource?query=x#fragment" - end - - it "should have the correct site segment after assignment" do - @uri.site = "https://newuser:newpass@example.com:443" - @uri.scheme.should == "https" - @uri.authority.should == "newuser:newpass@example.com:443" - @uri.user.should == "newuser" - @uri.password.should == "newpass" - @uri.userinfo.should == "newuser:newpass" - @uri.normalized_userinfo.should == "newuser:newpass" - @uri.host.should == "example.com" - @uri.port.should == 443 - @uri.inferred_port.should == 443 - @uri.to_s.should == - "https://newuser:newpass@example.com:443" + - "/path/to/resource?query=x#fragment" - end - - it "should have the correct authority segment after assignment" do - @uri.authority = "newuser:newpass@example.com:80" - @uri.authority.should == "newuser:newpass@example.com:80" - @uri.user.should == "newuser" - @uri.password.should == "newpass" - @uri.userinfo.should == "newuser:newpass" - @uri.normalized_userinfo.should == "newuser:newpass" - @uri.host.should == "example.com" - @uri.port.should == 80 - @uri.inferred_port.should == 80 - @uri.to_s.should == - "http://newuser:newpass@example.com:80" + - "/path/to/resource?query=x#fragment" - end - - it "should have the correct userinfo segment after assignment" do - @uri.userinfo = "newuser:newpass" - @uri.userinfo.should == "newuser:newpass" - @uri.authority.should == "newuser:newpass@example.com" - @uri.user.should == "newuser" - @uri.password.should == "newpass" - @uri.host.should == "example.com" - @uri.port.should == nil - @uri.inferred_port.should == 80 - @uri.to_s.should == - "http://newuser:newpass@example.com" + - "/path/to/resource?query=x#fragment" - end - - it "should have the correct username after assignment" do - @uri.user = "newuser" - @uri.user.should == "newuser" - @uri.authority.should == "newuser:pass@example.com" - end - - it "should have the correct password after assignment" do - @uri.password = "newpass" - @uri.password.should == "newpass" - @uri.authority.should == "user:newpass@example.com" - end - - it "should have the correct host after assignment" do - @uri.host = "newexample.com" - @uri.host.should == "newexample.com" - @uri.authority.should == "user:pass@newexample.com" - end - - it "should have the correct port after assignment" do - @uri.port = 8080 - @uri.port.should == 8080 - @uri.authority.should == "user:pass@example.com:8080" - end - - it "should have the correct path after assignment" do - @uri.path = "/newpath/to/resource" - @uri.path.should == "/newpath/to/resource" - @uri.to_s.should == - "http://user:pass@example.com/newpath/to/resource?query=x#fragment" - end - - it "should have the correct scheme and authority after nil assignment" do - @uri.site = nil - @uri.scheme.should == nil - @uri.authority.should == nil - @uri.to_s.should == "/path/to/resource?query=x#fragment" - end - - it "should have the correct scheme and authority after assignment" do - @uri.site = "file://" - @uri.scheme.should == "file" - @uri.authority.should == "" - @uri.to_s.should == "file:///path/to/resource?query=x#fragment" - end - - it "should have the correct path after nil assignment" do - @uri.path = nil - @uri.path.should == "" - @uri.to_s.should == - "http://user:pass@example.com?query=x#fragment" - end - - it "should have the correct query string after assignment" do - @uri.query = "newquery=x" - @uri.query.should == "newquery=x" - @uri.to_s.should == - "http://user:pass@example.com/path/to/resource?newquery=x#fragment" - @uri.query = nil - @uri.query.should == nil - @uri.to_s.should == - "http://user:pass@example.com/path/to/resource#fragment" - end - - it "should have the correct query string after hash assignment" do - @uri.query_values = {"?uestion mark" => "=sign", "hello" => "g\xC3\xBCnther"} - @uri.query.split("&").should include("%3Fuestion%20mark=%3Dsign") - @uri.query.split("&").should include("hello=g%C3%BCnther") - @uri.query_values.should == { - "?uestion mark" => "=sign", "hello" => "g\xC3\xBCnther" - } - end - - it "should have the correct query string after flag hash assignment" do - @uri.query_values = {'flag?1' => nil, 'fl=ag2' => nil, 'flag3' => nil} - @uri.query.split("&").should include("flag%3F1") - @uri.query.split("&").should include("fl%3Dag2") - @uri.query.split("&").should include("flag3") - @uri.query_values(Array).sort.should == [["fl=ag2"], ["flag3"], ["flag?1"]] - @uri.query_values(Hash).should == { - 'flag?1' => nil, 'fl=ag2' => nil, 'flag3' => nil - } - end - - it "should raise an error if query values are set to a bogus type" do - (lambda do - @uri.query_values = "bogus" - end).should raise_error(TypeError) - end - - it "should have the correct fragment after assignment" do - @uri.fragment = "newfragment" - @uri.fragment.should == "newfragment" - @uri.to_s.should == - "http://user:pass@example.com/path/to/resource?query=x#newfragment" - - @uri.fragment = nil - @uri.fragment.should == nil - @uri.to_s.should == - "http://user:pass@example.com/path/to/resource?query=x" - end - - it "should have the correct values after a merge" do - @uri.merge(:fragment => "newfragment").to_s.should == - "http://user:pass@example.com/path/to/resource?query=x#newfragment" - end - - it "should have the correct values after a merge" do - @uri.merge(:fragment => nil).to_s.should == - "http://user:pass@example.com/path/to/resource?query=x" - end - - it "should have the correct values after a merge" do - @uri.merge(:userinfo => "newuser:newpass").to_s.should == - "http://newuser:newpass@example.com/path/to/resource?query=x#fragment" - end - - it "should have the correct values after a merge" do - @uri.merge(:userinfo => nil).to_s.should == - "http://example.com/path/to/resource?query=x#fragment" - end - - it "should have the correct values after a merge" do - @uri.merge(:path => "newpath").to_s.should == - "http://user:pass@example.com/newpath?query=x#fragment" - end - - it "should have the correct values after a merge" do - @uri.merge(:port => "42", :path => "newpath", :query => "").to_s.should == - "http://user:pass@example.com:42/newpath?#fragment" - end - - it "should have the correct values after a merge" do - @uri.merge(:authority => "foo:bar@baz:42").to_s.should == - "http://foo:bar@baz:42/path/to/resource?query=x#fragment" - # Ensure the operation was not destructive - @uri.to_s.should == - "http://user:pass@example.com/path/to/resource?query=x#fragment" - end - - it "should have the correct values after a destructive merge" do - @uri.merge!(:authority => "foo:bar@baz:42") - # Ensure the operation was destructive - @uri.to_s.should == - "http://foo:bar@baz:42/path/to/resource?query=x#fragment" - end - - it "should fail to merge with bogus values" do - (lambda do - @uri.merge(:port => "bogus") - end).should raise_error(Addressable::URI::InvalidURIError) - end - - it "should fail to merge with bogus values" do - (lambda do - @uri.merge(:authority => "bar@baz:bogus") - end).should raise_error(Addressable::URI::InvalidURIError) - end - - it "should fail to merge with bogus parameters" do - (lambda do - @uri.merge(42) - end).should raise_error(TypeError) - end - - it "should fail to merge with bogus parameters" do - (lambda do - @uri.merge("http://example.com/") - end).should raise_error(TypeError) - end - - it "should fail to merge with both authority and subcomponents" do - (lambda do - @uri.merge(:authority => "foo:bar@baz:42", :port => "42") - end).should raise_error(ArgumentError) - end - - it "should fail to merge with both userinfo and subcomponents" do - (lambda do - @uri.merge(:userinfo => "foo:bar", :user => "foo") - end).should raise_error(ArgumentError) - end - - it "should be identical to its duplicate" do - @uri.should == @uri.dup - end - - it "should have an origin of 'http://example.com'" do - @uri.origin.should == 'http://example.com' - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/search?q=Q%26A'" do - - before do - @uri = Addressable::URI.parse("http://example.com/search?q=Q%26A") - end - - it "should have a query of 'q=Q%26A'" do - @uri.query.should == "q=Q%26A" - end - - it "should have query_values of {'q' => 'Q&A'}" do - @uri.query_values.should == { 'q' => 'Q&A' } - end - - it "should normalize to the original uri " + - "(with the ampersand properly percent-encoded)" do - @uri.normalize.to_s.should == "http://example.com/search?q=Q%26A" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?&x=b'" do - before do - @uri = Addressable::URI.parse("http://example.com/?&x=b") - end - - it "should have a query of '&x=b'" do - @uri.query.should == "&x=b" - end - - it "should have query_values of {'x' => 'b'}" do - @uri.query_values.should == {'x' => 'b'} - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?q='one;two'&x=1'" do - before do - @uri = Addressable::URI.parse("http://example.com/?q='one;two'&x=1") - end - - it "should have a query of 'q='one;two'&x=1'" do - @uri.query.should == "q='one;two'&x=1" - end - - it "should have query_values of {\"q\" => \"'one;two'\", \"x\" => \"1\"}" do - @uri.query_values.should == {"q" => "'one;two'", "x" => "1"} - end - - it "should escape the ';' character when normalizing to avoid ambiguity " + - "with the W3C HTML 4.01 specification" do - # HTML 4.01 Section B.2.2 - @uri.normalize.query.should == "q='one%3Btwo'&x=1" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?&&x=b'" do - before do - @uri = Addressable::URI.parse("http://example.com/?&&x=b") - end - - it "should have a query of '&&x=b'" do - @uri.query.should == "&&x=b" - end - - it "should have query_values of {'x' => 'b'}" do - @uri.query_values.should == {'x' => 'b'} - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?q=a&&x=b'" do - before do - @uri = Addressable::URI.parse("http://example.com/?q=a&&x=b") - end - - it "should have a query of 'q=a&&x=b'" do - @uri.query.should == "q=a&&x=b" - end - - it "should have query_values of {'q' => 'a, 'x' => 'b'}" do - @uri.query_values.should == {'q' => 'a', 'x' => 'b'} - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?q&&x=b'" do - before do - @uri = Addressable::URI.parse("http://example.com/?q&&x=b") - end - - it "should have a query of 'q&&x=b'" do - @uri.query.should == "q&&x=b" - end - - it "should have query_values of {'q' => true, 'x' => 'b'}" do - @uri.query_values.should == {'q' => nil, 'x' => 'b'} - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?q=a+b'" do - before do - @uri = Addressable::URI.parse("http://example.com/?q=a+b") - end - - it "should have a query of 'q=a+b'" do - @uri.query.should == "q=a+b" - end - - it "should have query_values of {'q' => 'a b'}" do - @uri.query_values.should == {'q' => 'a b'} - end - - it "should have a normalized query of 'q=a+b'" do - @uri.normalized_query.should == "q=a+b" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?q=a%2bb'" do - before do - @uri = Addressable::URI.parse("http://example.com/?q=a%2bb") - end - - it "should have a query of 'q=a+b'" do - @uri.query.should == "q=a%2bb" - end - - it "should have query_values of {'q' => 'a+b'}" do - @uri.query_values.should == {'q' => 'a+b'} - end - - it "should have a normalized query of 'q=a%2Bb'" do - @uri.normalized_query.should == "q=a%2Bb" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?v=%7E&w=%&x=%25&y=%2B&z=C%CC%A7'" do - before do - @uri = Addressable::URI.parse("http://example.com/?v=%7E&w=%&x=%25&y=%2B&z=C%CC%A7") - end - - it "should have a normalized query of 'v=~&w=%25&x=%25&y=%2B&z=%C3%87'" do - @uri.normalized_query.should == "v=~&w=%25&x=%25&y=%2B&z=%C3%87" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?v=%7E&w=%&x=%25&y=+&z=C%CC%A7'" do - before do - @uri = Addressable::URI.parse("http://example.com/?v=%7E&w=%&x=%25&y=+&z=C%CC%A7") - end - - it "should have a normalized query of 'v=~&w=%25&x=%25&y=+&z=%C3%87'" do - @uri.normalized_query.should == "v=~&w=%25&x=%25&y=+&z=%C3%87" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/sound%2bvision'" do - before do - @uri = Addressable::URI.parse("http://example.com/sound%2bvision") - end - - it "should have a normalized path of '/sound+vision'" do - @uri.normalized_path.should == '/sound+vision' - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?q='" do - before do - @uri = Addressable::URI.parse("http://example.com/?q=") - end - - it "should have a query of 'q='" do - @uri.query.should == "q=" - end - - it "should have query_values of {'q' => ''}" do - @uri.query_values.should == {'q' => ''} - end -end - -describe Addressable::URI, "when parsed from " + - "'http://user@example.com'" do - before do - @uri = Addressable::URI.parse("http://user@example.com") - end - - it "should use the 'http' scheme" do - @uri.scheme.should == "http" - end - - it "should have a username of 'user'" do - @uri.user.should == "user" - end - - it "should have no password" do - @uri.password.should == nil - end - - it "should have a userinfo of 'user'" do - @uri.userinfo.should == "user" - end - - it "should have a normalized userinfo of 'user'" do - @uri.normalized_userinfo.should == "user" - end - - it "should have a host of 'example.com'" do - @uri.host.should == "example.com" - end - - it "should have default_port 80" do - @uri.default_port.should == 80 - end - - it "should use port 80" do - @uri.inferred_port.should == 80 - end - - it "should have the correct username after assignment" do - @uri.user = "newuser" - @uri.user.should == "newuser" - @uri.password.should == nil - @uri.to_s.should == "http://newuser@example.com" - end - - it "should have the correct password after assignment" do - @uri.password = "newpass" - @uri.password.should == "newpass" - @uri.to_s.should == "http://user:newpass@example.com" - end - - it "should have the correct userinfo segment after assignment" do - @uri.userinfo = "newuser:newpass" - @uri.userinfo.should == "newuser:newpass" - @uri.user.should == "newuser" - @uri.password.should == "newpass" - @uri.host.should == "example.com" - @uri.port.should == nil - @uri.inferred_port.should == 80 - @uri.to_s.should == "http://newuser:newpass@example.com" - end - - it "should have the correct userinfo segment after nil assignment" do - @uri.userinfo = nil - @uri.userinfo.should == nil - @uri.user.should == nil - @uri.password.should == nil - @uri.host.should == "example.com" - @uri.port.should == nil - @uri.inferred_port.should == 80 - @uri.to_s.should == "http://example.com" - end - - it "should have the correct authority segment after assignment" do - @uri.authority = "newuser@example.com" - @uri.authority.should == "newuser@example.com" - @uri.user.should == "newuser" - @uri.password.should == nil - @uri.host.should == "example.com" - @uri.port.should == nil - @uri.inferred_port.should == 80 - @uri.to_s.should == "http://newuser@example.com" - end - - it "should raise an error after nil assignment of authority segment" do - (lambda do - # This would create an invalid URI - @uri.authority = nil - end).should raise_error - end -end - -describe Addressable::URI, "when parsed from " + - "'http://user:@example.com'" do - before do - @uri = Addressable::URI.parse("http://user:@example.com") - end - - it "should use the 'http' scheme" do - @uri.scheme.should == "http" - end - - it "should have a username of 'user'" do - @uri.user.should == "user" - end - - it "should have a password of ''" do - @uri.password.should == "" - end - - it "should have a normalized userinfo of 'user:'" do - @uri.normalized_userinfo.should == "user:" - end - - it "should have a host of 'example.com'" do - @uri.host.should == "example.com" - end - - it "should use port 80" do - @uri.inferred_port.should == 80 - end - - it "should have the correct username after assignment" do - @uri.user = "newuser" - @uri.user.should == "newuser" - @uri.password.should == "" - @uri.to_s.should == "http://newuser:@example.com" - end - - it "should have the correct password after assignment" do - @uri.password = "newpass" - @uri.password.should == "newpass" - @uri.to_s.should == "http://user:newpass@example.com" - end - - it "should have the correct authority segment after assignment" do - @uri.authority = "newuser:@example.com" - @uri.authority.should == "newuser:@example.com" - @uri.user.should == "newuser" - @uri.password.should == "" - @uri.host.should == "example.com" - @uri.port.should == nil - @uri.inferred_port.should == 80 - @uri.to_s.should == "http://newuser:@example.com" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://:pass@example.com'" do - before do - @uri = Addressable::URI.parse("http://:pass@example.com") - end - - it "should use the 'http' scheme" do - @uri.scheme.should == "http" - end - - it "should have a username of ''" do - @uri.user.should == "" - end - - it "should have a password of 'pass'" do - @uri.password.should == "pass" - end - - it "should have a userinfo of ':pass'" do - @uri.userinfo.should == ":pass" - end - - it "should have a normalized userinfo of ':pass'" do - @uri.normalized_userinfo.should == ":pass" - end - - it "should have a host of 'example.com'" do - @uri.host.should == "example.com" - end - - it "should use port 80" do - @uri.inferred_port.should == 80 - end - - it "should have the correct username after assignment" do - @uri.user = "newuser" - @uri.user.should == "newuser" - @uri.password.should == "pass" - @uri.to_s.should == "http://newuser:pass@example.com" - end - - it "should have the correct password after assignment" do - @uri.password = "newpass" - @uri.password.should == "newpass" - @uri.user.should == "" - @uri.to_s.should == "http://:newpass@example.com" - end - - it "should have the correct authority segment after assignment" do - @uri.authority = ":newpass@example.com" - @uri.authority.should == ":newpass@example.com" - @uri.user.should == "" - @uri.password.should == "newpass" - @uri.host.should == "example.com" - @uri.port.should == nil - @uri.inferred_port.should == 80 - @uri.to_s.should == "http://:newpass@example.com" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://:@example.com'" do - before do - @uri = Addressable::URI.parse("http://:@example.com") - end - - it "should use the 'http' scheme" do - @uri.scheme.should == "http" - end - - it "should have a username of ''" do - @uri.user.should == "" - end - - it "should have a password of ''" do - @uri.password.should == "" - end - - it "should have a normalized userinfo of nil" do - @uri.normalized_userinfo.should == nil - end - - it "should have a host of 'example.com'" do - @uri.host.should == "example.com" - end - - it "should use port 80" do - @uri.inferred_port.should == 80 - end - - it "should have the correct username after assignment" do - @uri.user = "newuser" - @uri.user.should == "newuser" - @uri.password.should == "" - @uri.to_s.should == "http://newuser:@example.com" - end - - it "should have the correct password after assignment" do - @uri.password = "newpass" - @uri.password.should == "newpass" - @uri.user.should == "" - @uri.to_s.should == "http://:newpass@example.com" - end - - it "should have the correct authority segment after assignment" do - @uri.authority = ":@newexample.com" - @uri.authority.should == ":@newexample.com" - @uri.user.should == "" - @uri.password.should == "" - @uri.host.should == "newexample.com" - @uri.port.should == nil - @uri.inferred_port.should == 80 - @uri.to_s.should == "http://:@newexample.com" - end -end - -describe Addressable::URI, "when parsed from " + - "'#example'" do - before do - @uri = Addressable::URI.parse("#example") - end - - it "should be considered relative" do - @uri.should be_relative - end - - it "should have a host of nil" do - @uri.host.should == nil - end - - it "should have a site of nil" do - @uri.site.should == nil - end - - it "should have a normalized_site of nil" do - @uri.normalized_site.should == nil - end - - it "should have a path of ''" do - @uri.path.should == "" - end - - it "should have a query string of nil" do - @uri.query.should == nil - end - - it "should have a fragment of 'example'" do - @uri.fragment.should == "example" - end -end - -describe Addressable::URI, "when parsed from " + - "the network-path reference '//example.com/'" do - before do - @uri = Addressable::URI.parse("//example.com/") - end - - it "should be considered relative" do - @uri.should be_relative - end - - it "should have a host of 'example.com'" do - @uri.host.should == "example.com" - end - - it "should have a path of '/'" do - @uri.path.should == "/" - end - - it "should raise an error if routing is attempted" do - (lambda do - @uri.route_to("http://example.com/") - end).should raise_error(ArgumentError, /\/\/example.com\//) - (lambda do - @uri.route_from("http://example.com/") - end).should raise_error(ArgumentError, /\/\/example.com\//) - end - - it "should have a 'null' origin" do - @uri.origin.should == 'null' - end -end - -describe Addressable::URI, "when parsed from " + - "'feed://http://example.com/'" do - before do - @uri = Addressable::URI.parse("feed://http://example.com/") - end - - it "should have a host of 'http'" do - @uri.host.should == "http" - end - - it "should have a path of '//example.com/'" do - @uri.path.should == "//example.com/" - end -end - -describe Addressable::URI, "when parsed from " + - "'feed:http://example.com/'" do - before do - @uri = Addressable::URI.parse("feed:http://example.com/") - end - - it "should have a path of 'http://example.com/'" do - @uri.path.should == "http://example.com/" - end - - it "should normalize to 'http://example.com/'" do - @uri.normalize.to_s.should == "http://example.com/" - @uri.normalize!.to_s.should == "http://example.com/" - end - - it "should have a 'null' origin" do - @uri.origin.should == 'null' - end -end - -describe Addressable::URI, "when parsed from " + - "'example://a/b/c/%7Bfoo%7D'" do - before do - @uri = Addressable::URI.parse("example://a/b/c/%7Bfoo%7D") - end - - # Section 6.2.2 of RFC 3986 - it "should be equivalent to eXAMPLE://a/./b/../b/%63/%7bfoo%7d" do - @uri.should == - Addressable::URI.parse("eXAMPLE://a/./b/../b/%63/%7bfoo%7d") - end - - it "should have an origin of 'example://a'" do - @uri.origin.should == 'example://a' - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/indirect/path/./to/../resource/'" do - before do - @uri = Addressable::URI.parse( - "http://example.com/indirect/path/./to/../resource/") - end - - it "should use the 'http' scheme" do - @uri.scheme.should == "http" - end - - it "should have a host of 'example.com'" do - @uri.host.should == "example.com" - end - - it "should use port 80" do - @uri.inferred_port.should == 80 - end - - it "should have a path of '/indirect/path/./to/../resource/'" do - @uri.path.should == "/indirect/path/./to/../resource/" - end - - # Section 6.2.2.3 of RFC 3986 - it "should have a normalized path of '/indirect/path/resource/'" do - @uri.normalize.path.should == "/indirect/path/resource/" - @uri.normalize!.path.should == "/indirect/path/resource/" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://under_score.example.com/'" do - it "should not cause an error" do - (lambda do - Addressable::URI.parse("http://under_score.example.com/") - end).should_not raise_error - end -end - -describe Addressable::URI, "when parsed from " + - "'./this:that'" do - before do - @uri = Addressable::URI.parse("./this:that") - end - - it "should be considered relative" do - @uri.should be_relative - end - - it "should have no scheme" do - @uri.scheme.should == nil - end - - it "should have a 'null' origin" do - @uri.origin.should == 'null' - end -end - -describe Addressable::URI, "when parsed from " + - "'this:that'" do - before do - @uri = Addressable::URI.parse("this:that") - end - - it "should be considered absolute" do - @uri.should be_absolute - end - - it "should have a scheme of 'this'" do - @uri.scheme.should == "this" - end - - it "should have a 'null' origin" do - @uri.origin.should == 'null' - end -end - -describe Addressable::URI, "when parsed from '?'" do - before do - @uri = Addressable::URI.parse("?") - end - - it "should normalize to ''" do - @uri.normalize.to_s.should == "" - end - - it "should have the correct return type" do - @uri.query_values.should == {} - @uri.query_values(Hash).should == {} - @uri.query_values(Array).should == [] - end - - it "should have a 'null' origin" do - @uri.origin.should == 'null' - end -end - -describe Addressable::URI, "when parsed from '?one=1&two=2&three=3'" do - before do - @uri = Addressable::URI.parse("?one=1&two=2&three=3") - end - - it "should have the correct query values" do - @uri.query_values.should == {"one" => "1", "two" => "2", "three" => "3"} - end - - it "should raise an error for invalid return type values" do - (lambda do - @uri.query_values(Fixnum) - end).should raise_error(ArgumentError) - end - - it "should have the correct array query values" do - @uri.query_values(Array).should == [ - ["one", "1"], ["two", "2"], ["three", "3"] - ] - end - - it "should have a 'null' origin" do - @uri.origin.should == 'null' - end -end - -describe Addressable::URI, "when parsed from '?one=1=uno&two=2=dos'" do - before do - @uri = Addressable::URI.parse("?one=1=uno&two=2=dos") - end - - it "should have the correct query values" do - @uri.query_values.should == {"one" => "1=uno", "two" => "2=dos"} - end - - it "should have the correct array query values" do - @uri.query_values(Array).should == [ - ["one", "1=uno"], ["two", "2=dos"] - ] - end -end - -describe Addressable::URI, "when parsed from '?one[two][three]=four'" do - before do - @uri = Addressable::URI.parse("?one[two][three]=four") - end - - it "should have the correct query values" do - @uri.query_values.should == {"one[two][three]" => "four"} - end - - it "should have the correct array query values" do - @uri.query_values(Array).should == [ - ["one[two][three]", "four"] - ] - end -end - -describe Addressable::URI, "when parsed from '?one.two.three=four'" do - before do - @uri = Addressable::URI.parse("?one.two.three=four") - end - - it "should have the correct query values" do - @uri.query_values.should == { - "one.two.three" => "four" - } - end - - it "should have the correct array query values" do - @uri.query_values(Array).should == [ - ["one.two.three", "four"] - ] - end -end - -describe Addressable::URI, "when parsed from " + - "'?one[two][three]=four&one[two][five]=six'" do - before do - @uri = Addressable::URI.parse("?one[two][three]=four&one[two][five]=six") - end - - it "should have the correct query values" do - @uri.query_values.should == { - "one[two][three]" => "four", "one[two][five]" => "six" - } - end - - it "should have the correct array query values" do - @uri.query_values(Array).should == [ - ["one[two][three]", "four"], ["one[two][five]", "six"] - ] - end -end - -describe Addressable::URI, "when parsed from " + - "'?one.two.three=four&one.two.five=six'" do - before do - @uri = Addressable::URI.parse("?one.two.three=four&one.two.five=six") - end - - it "should have the correct query values" do - @uri.query_values.should == { - "one.two.three" => "four", "one.two.five" => "six" - } - end - - it "should have the correct array query values" do - @uri.query_values(Array).should == [ - ["one.two.three", "four"], ["one.two.five", "six"] - ] - end -end - -describe Addressable::URI, "when parsed from " + - "'?one=two&one=three'" do - before do - @uri = Addressable::URI.parse( - "?one=two&one=three&one=four" - ) - end - - it "should have correct array query values" do - @uri.query_values(Array).should == - [['one', 'two'], ['one', 'three'], ['one', 'four']] - end - - it "should have correct hash query values" do - pending("This is probably more desirable behavior.") do - @uri.query_values(Hash).should == - {'one' => ['two', 'three', 'four']} - end - end - - it "should handle assignment with keys of mixed type" do - @uri.query_values = @uri.query_values(Hash).merge({:one => 'three'}) - @uri.query_values(Hash).should == {'one' => 'three'} - end -end - -describe Addressable::URI, "when parsed from " + - "'?one[two][three][]=four&one[two][three][]=five'" do - before do - @uri = Addressable::URI.parse( - "?one[two][three][]=four&one[two][three][]=five" - ) - end - - it "should have correct query values" do - @uri.query_values(Hash).should == {"one[two][three][]" => "five"} - end - - it "should have correct array query values" do - @uri.query_values(Array).should == [ - ["one[two][three][]", "four"], ["one[two][three][]", "five"] - ] - end -end - -describe Addressable::URI, "when parsed from " + - "'?one[two][three][0]=four&one[two][three][1]=five'" do - before do - @uri = Addressable::URI.parse( - "?one[two][three][0]=four&one[two][three][1]=five" - ) - end - - it "should have the correct query values" do - @uri.query_values.should == { - "one[two][three][0]" => "four", "one[two][three][1]" => "five" - } - end -end - -describe Addressable::URI, "when parsed from " + - "'?one[two][three][1]=four&one[two][three][0]=five'" do - before do - @uri = Addressable::URI.parse( - "?one[two][three][1]=four&one[two][three][0]=five" - ) - end - - it "should have the correct query values" do - @uri.query_values.should == { - "one[two][three][1]" => "four", "one[two][three][0]" => "five" - } - end -end - -describe Addressable::URI, "when parsed from " + - "'?one[two][three][2]=four&one[two][three][1]=five'" do - before do - @uri = Addressable::URI.parse( - "?one[two][three][2]=four&one[two][three][1]=five" - ) - end - - it "should have the correct query values" do - @uri.query_values.should == { - "one[two][three][2]" => "four", "one[two][three][1]" => "five" - } - end -end - -describe Addressable::URI, "when parsed from " + - "'http://www.詹姆斯.com/'" do - before do - @uri = Addressable::URI.parse("http://www.詹姆斯.com/") - end - - it "should be equivalent to 'http://www.xn--8ws00zhy3a.com/'" do - @uri.should == - Addressable::URI.parse("http://www.xn--8ws00zhy3a.com/") - end - - it "should not have domain name encoded during normalization" do - Addressable::URI.normalized_encode(@uri.to_s).should == - "http://www.詹姆斯.com/" - end - - it "should have an origin of 'http://www.xn--8ws00zhy3a.com'" do - @uri.origin.should == 'http://www.xn--8ws00zhy3a.com' - end -end - -describe Addressable::URI, "when parsed from " + - "'http://www.詹姆斯.com/ some spaces /'" do - before do - @uri = Addressable::URI.parse("http://www.詹姆斯.com/ some spaces /") - end - - it "should be equivalent to " + - "'http://www.xn--8ws00zhy3a.com/%20some%20spaces%20/'" do - @uri.should == - Addressable::URI.parse( - "http://www.xn--8ws00zhy3a.com/%20some%20spaces%20/") - end - - it "should not have domain name encoded during normalization" do - Addressable::URI.normalized_encode(@uri.to_s).should == - "http://www.詹姆斯.com/%20some%20spaces%20/" - end - - it "should have an origin of 'http://www.xn--8ws00zhy3a.com'" do - @uri.origin.should == 'http://www.xn--8ws00zhy3a.com' - end -end - -describe Addressable::URI, "when parsed from " + - "'http://www.xn--8ws00zhy3a.com/'" do - before do - @uri = Addressable::URI.parse("http://www.xn--8ws00zhy3a.com/") - end - - it "should be displayed as http://www.詹姆斯.com/" do - @uri.display_uri.to_s.should == "http://www.詹姆斯.com/" - end - - it "should properly force the encoding" do - display_string = @uri.display_uri.to_str - display_string.should == "http://www.詹姆斯.com/" - if display_string.respond_to?(:encoding) - display_string.encoding.to_s.should == Encoding::UTF_8.to_s - end - end - - it "should have an origin of 'http://www.xn--8ws00zhy3a.com'" do - @uri.origin.should == 'http://www.xn--8ws00zhy3a.com' - end -end - -describe Addressable::URI, "when parsed from " + - "'http://www.詹姆斯.com/atomtests/iri/詹.html'" do - before do - @uri = Addressable::URI.parse("http://www.詹姆斯.com/atomtests/iri/詹.html") - end - - it "should normalize to " + - "http://www.xn--8ws00zhy3a.com/atomtests/iri/%E8%A9%B9.html" do - @uri.normalize.to_s.should == - "http://www.xn--8ws00zhy3a.com/atomtests/iri/%E8%A9%B9.html" - @uri.normalize!.to_s.should == - "http://www.xn--8ws00zhy3a.com/atomtests/iri/%E8%A9%B9.html" - end -end - -describe Addressable::URI, "when parsed from a percent-encoded IRI" do - before do - @uri = Addressable::URI.parse( - "http://www.%E3%81%BB%E3%82%93%E3%81%A8%E3%81%86%E3%81%AB%E3%81%AA" + - "%E3%81%8C%E3%81%84%E3%82%8F%E3%81%91%E3%81%AE%E3%82%8F%E3%81%8B%E3" + - "%82%89%E3%81%AA%E3%81%84%E3%81%A9%E3%82%81%E3%81%84%E3%82%93%E3%82" + - "%81%E3%81%84%E3%81%AE%E3%82%89%E3%81%B9%E3%82%8B%E3%81%BE%E3%81%A0" + - "%E3%81%AA%E3%81%8C%E3%81%8F%E3%81%97%E3%81%AA%E3%81%84%E3%81%A8%E3" + - "%81%9F%E3%82%8A%E3%81%AA%E3%81%84.w3.mag.keio.ac.jp" - ) - end - - it "should normalize to something sane" do - @uri.normalize.to_s.should == - "http://www.xn--n8jaaaaai5bhf7as8fsfk3jnknefdde3f" + - "g11amb5gzdb4wi9bya3kc6lra.w3.mag.keio.ac.jp/" - @uri.normalize!.to_s.should == - "http://www.xn--n8jaaaaai5bhf7as8fsfk3jnknefdde3f" + - "g11amb5gzdb4wi9bya3kc6lra.w3.mag.keio.ac.jp/" - end - - it "should have the correct origin" do - @uri.origin.should == ( - "http://www.xn--n8jaaaaai5bhf7as8fsfk3jnknefdde3f" + - "g11amb5gzdb4wi9bya3kc6lra.w3.mag.keio.ac.jp" - ) - end -end - -describe Addressable::URI, "with a base uri of 'http://a/b/c/d;p?q'" do - before do - @uri = Addressable::URI.parse("http://a/b/c/d;p?q") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with 'g:h' should resolve to g:h" do - (@uri + "g:h").to_s.should == "g:h" - Addressable::URI.join(@uri, "g:h").to_s.should == "g:h" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with 'g' should resolve to http://a/b/c/g" do - (@uri + "g").to_s.should == "http://a/b/c/g" - Addressable::URI.join(@uri.to_s, "g").to_s.should == "http://a/b/c/g" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with './g' should resolve to http://a/b/c/g" do - (@uri + "./g").to_s.should == "http://a/b/c/g" - Addressable::URI.join(@uri.to_s, "./g").to_s.should == "http://a/b/c/g" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with 'g/' should resolve to http://a/b/c/g/" do - (@uri + "g/").to_s.should == "http://a/b/c/g/" - Addressable::URI.join(@uri.to_s, "g/").to_s.should == "http://a/b/c/g/" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '/g' should resolve to http://a/g" do - (@uri + "/g").to_s.should == "http://a/g" - Addressable::URI.join(@uri.to_s, "/g").to_s.should == "http://a/g" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '//g' should resolve to http://g" do - (@uri + "//g").to_s.should == "http://g" - Addressable::URI.join(@uri.to_s, "//g").to_s.should == "http://g" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '?y' should resolve to http://a/b/c/d;p?y" do - (@uri + "?y").to_s.should == "http://a/b/c/d;p?y" - Addressable::URI.join(@uri.to_s, "?y").to_s.should == "http://a/b/c/d;p?y" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with 'g?y' should resolve to http://a/b/c/g?y" do - (@uri + "g?y").to_s.should == "http://a/b/c/g?y" - Addressable::URI.join(@uri.to_s, "g?y").to_s.should == "http://a/b/c/g?y" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '#s' should resolve to http://a/b/c/d;p?q#s" do - (@uri + "#s").to_s.should == "http://a/b/c/d;p?q#s" - Addressable::URI.join(@uri.to_s, "#s").to_s.should == - "http://a/b/c/d;p?q#s" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with 'g#s' should resolve to http://a/b/c/g#s" do - (@uri + "g#s").to_s.should == "http://a/b/c/g#s" - Addressable::URI.join(@uri.to_s, "g#s").to_s.should == "http://a/b/c/g#s" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with 'g?y#s' should resolve to http://a/b/c/g?y#s" do - (@uri + "g?y#s").to_s.should == "http://a/b/c/g?y#s" - Addressable::URI.join( - @uri.to_s, "g?y#s").to_s.should == "http://a/b/c/g?y#s" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with ';x' should resolve to http://a/b/c/;x" do - (@uri + ";x").to_s.should == "http://a/b/c/;x" - Addressable::URI.join(@uri.to_s, ";x").to_s.should == "http://a/b/c/;x" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with 'g;x' should resolve to http://a/b/c/g;x" do - (@uri + "g;x").to_s.should == "http://a/b/c/g;x" - Addressable::URI.join(@uri.to_s, "g;x").to_s.should == "http://a/b/c/g;x" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with 'g;x?y#s' should resolve to http://a/b/c/g;x?y#s" do - (@uri + "g;x?y#s").to_s.should == "http://a/b/c/g;x?y#s" - Addressable::URI.join( - @uri.to_s, "g;x?y#s").to_s.should == "http://a/b/c/g;x?y#s" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '' should resolve to http://a/b/c/d;p?q" do - (@uri + "").to_s.should == "http://a/b/c/d;p?q" - Addressable::URI.join(@uri.to_s, "").to_s.should == "http://a/b/c/d;p?q" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '.' should resolve to http://a/b/c/" do - (@uri + ".").to_s.should == "http://a/b/c/" - Addressable::URI.join(@uri.to_s, ".").to_s.should == "http://a/b/c/" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with './' should resolve to http://a/b/c/" do - (@uri + "./").to_s.should == "http://a/b/c/" - Addressable::URI.join(@uri.to_s, "./").to_s.should == "http://a/b/c/" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '..' should resolve to http://a/b/" do - (@uri + "..").to_s.should == "http://a/b/" - Addressable::URI.join(@uri.to_s, "..").to_s.should == "http://a/b/" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '../' should resolve to http://a/b/" do - (@uri + "../").to_s.should == "http://a/b/" - Addressable::URI.join(@uri.to_s, "../").to_s.should == "http://a/b/" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '../g' should resolve to http://a/b/g" do - (@uri + "../g").to_s.should == "http://a/b/g" - Addressable::URI.join(@uri.to_s, "../g").to_s.should == "http://a/b/g" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '../..' should resolve to http://a/" do - (@uri + "../..").to_s.should == "http://a/" - Addressable::URI.join(@uri.to_s, "../..").to_s.should == "http://a/" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '../../' should resolve to http://a/" do - (@uri + "../../").to_s.should == "http://a/" - Addressable::URI.join(@uri.to_s, "../../").to_s.should == "http://a/" - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '../../g' should resolve to http://a/g" do - (@uri + "../../g").to_s.should == "http://a/g" - Addressable::URI.join(@uri.to_s, "../../g").to_s.should == "http://a/g" - end - - # Section 5.4.2 of RFC 3986 - it "when joined with '../../../g' should resolve to http://a/g" do - (@uri + "../../../g").to_s.should == "http://a/g" - Addressable::URI.join(@uri.to_s, "../../../g").to_s.should == "http://a/g" - end - - it "when joined with '../.././../g' should resolve to http://a/g" do - (@uri + "../.././../g").to_s.should == "http://a/g" - Addressable::URI.join(@uri.to_s, "../.././../g").to_s.should == - "http://a/g" - end - - # Section 5.4.2 of RFC 3986 - it "when joined with '../../../../g' should resolve to http://a/g" do - (@uri + "../../../../g").to_s.should == "http://a/g" - Addressable::URI.join( - @uri.to_s, "../../../../g").to_s.should == "http://a/g" - end - - # Section 5.4.2 of RFC 3986 - it "when joined with '/./g' should resolve to http://a/g" do - (@uri + "/./g").to_s.should == "http://a/g" - Addressable::URI.join(@uri.to_s, "/./g").to_s.should == "http://a/g" - end - - # Section 5.4.2 of RFC 3986 - it "when joined with '/../g' should resolve to http://a/g" do - (@uri + "/../g").to_s.should == "http://a/g" - Addressable::URI.join(@uri.to_s, "/../g").to_s.should == "http://a/g" - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'g.' should resolve to http://a/b/c/g." do - (@uri + "g.").to_s.should == "http://a/b/c/g." - Addressable::URI.join(@uri.to_s, "g.").to_s.should == "http://a/b/c/g." - end - - # Section 5.4.2 of RFC 3986 - it "when joined with '.g' should resolve to http://a/b/c/.g" do - (@uri + ".g").to_s.should == "http://a/b/c/.g" - Addressable::URI.join(@uri.to_s, ".g").to_s.should == "http://a/b/c/.g" - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'g..' should resolve to http://a/b/c/g.." do - (@uri + "g..").to_s.should == "http://a/b/c/g.." - Addressable::URI.join(@uri.to_s, "g..").to_s.should == "http://a/b/c/g.." - end - - # Section 5.4.2 of RFC 3986 - it "when joined with '..g' should resolve to http://a/b/c/..g" do - (@uri + "..g").to_s.should == "http://a/b/c/..g" - Addressable::URI.join(@uri.to_s, "..g").to_s.should == "http://a/b/c/..g" - end - - # Section 5.4.2 of RFC 3986 - it "when joined with './../g' should resolve to http://a/b/g" do - (@uri + "./../g").to_s.should == "http://a/b/g" - Addressable::URI.join(@uri.to_s, "./../g").to_s.should == "http://a/b/g" - end - - # Section 5.4.2 of RFC 3986 - it "when joined with './g/.' should resolve to http://a/b/c/g/" do - (@uri + "./g/.").to_s.should == "http://a/b/c/g/" - Addressable::URI.join(@uri.to_s, "./g/.").to_s.should == "http://a/b/c/g/" - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'g/./h' should resolve to http://a/b/c/g/h" do - (@uri + "g/./h").to_s.should == "http://a/b/c/g/h" - Addressable::URI.join(@uri.to_s, "g/./h").to_s.should == "http://a/b/c/g/h" - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'g/../h' should resolve to http://a/b/c/h" do - (@uri + "g/../h").to_s.should == "http://a/b/c/h" - Addressable::URI.join(@uri.to_s, "g/../h").to_s.should == "http://a/b/c/h" - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'g;x=1/./y' " + - "should resolve to http://a/b/c/g;x=1/y" do - (@uri + "g;x=1/./y").to_s.should == "http://a/b/c/g;x=1/y" - Addressable::URI.join( - @uri.to_s, "g;x=1/./y").to_s.should == "http://a/b/c/g;x=1/y" - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'g;x=1/../y' should resolve to http://a/b/c/y" do - (@uri + "g;x=1/../y").to_s.should == "http://a/b/c/y" - Addressable::URI.join( - @uri.to_s, "g;x=1/../y").to_s.should == "http://a/b/c/y" - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'g?y/./x' " + - "should resolve to http://a/b/c/g?y/./x" do - (@uri + "g?y/./x").to_s.should == "http://a/b/c/g?y/./x" - Addressable::URI.join( - @uri.to_s, "g?y/./x").to_s.should == "http://a/b/c/g?y/./x" - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'g?y/../x' " + - "should resolve to http://a/b/c/g?y/../x" do - (@uri + "g?y/../x").to_s.should == "http://a/b/c/g?y/../x" - Addressable::URI.join( - @uri.to_s, "g?y/../x").to_s.should == "http://a/b/c/g?y/../x" - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'g#s/./x' " + - "should resolve to http://a/b/c/g#s/./x" do - (@uri + "g#s/./x").to_s.should == "http://a/b/c/g#s/./x" - Addressable::URI.join( - @uri.to_s, "g#s/./x").to_s.should == "http://a/b/c/g#s/./x" - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'g#s/../x' " + - "should resolve to http://a/b/c/g#s/../x" do - (@uri + "g#s/../x").to_s.should == "http://a/b/c/g#s/../x" - Addressable::URI.join( - @uri.to_s, "g#s/../x").to_s.should == "http://a/b/c/g#s/../x" - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'http:g' should resolve to http:g" do - (@uri + "http:g").to_s.should == "http:g" - Addressable::URI.join(@uri.to_s, "http:g").to_s.should == "http:g" - end - - # Edge case to be sure - it "when joined with '//example.com/' should " + - "resolve to http://example.com/" do - (@uri + "//example.com/").to_s.should == "http://example.com/" - Addressable::URI.join( - @uri.to_s, "//example.com/").to_s.should == "http://example.com/" - end - - it "when joined with a bogus object a TypeError should be raised" do - (lambda do - Addressable::URI.join(@uri, 42) - end).should raise_error(TypeError) - end -end - -describe Addressable::URI, "when converting the path " + - "'relative/path/to/something'" do - before do - @path = 'relative/path/to/something' - end - - it "should convert to " + - "\'relative/path/to/something\'" do - @uri = Addressable::URI.convert_path(@path) - @uri.to_str.should == "relative/path/to/something" - end - - it "should join with an absolute file path correctly" do - @base = Addressable::URI.convert_path("/absolute/path/") - @uri = Addressable::URI.convert_path(@path) - (@base + @uri).to_str.should == - "file:///absolute/path/relative/path/to/something" - end -end - -describe Addressable::URI, "when converting a bogus path" do - it "should raise a TypeError" do - (lambda do - Addressable::URI.convert_path(42) - end).should raise_error(TypeError) - end -end - -describe Addressable::URI, "when given a UNIX root directory" do - before do - @path = "/" - end - - it "should convert to \'file:///\'" do - @uri = Addressable::URI.convert_path(@path) - @uri.to_str.should == "file:///" - end - - it "should have an origin of 'file://'" do - @uri = Addressable::URI.convert_path(@path) - @uri.origin.should == 'file://' - end -end - -describe Addressable::URI, "when given a Windows root directory" do - before do - @path = "C:\\" - end - - it "should convert to \'file:///c:/\'" do - @uri = Addressable::URI.convert_path(@path) - @uri.to_str.should == "file:///c:/" - end - - it "should have an origin of 'file://'" do - @uri = Addressable::URI.convert_path(@path) - @uri.origin.should == 'file://' - end -end - -describe Addressable::URI, "when given the path '/one/two/'" do - before do - @path = '/one/two/' - end - - it "should convert to " + - "\'file:///one/two/\'" do - @uri = Addressable::URI.convert_path(@path) - @uri.to_str.should == "file:///one/two/" - end - - it "should have an origin of 'file://'" do - @uri = Addressable::URI.convert_path(@path) - @uri.origin.should == 'file://' - end -end - -describe Addressable::URI, "when given the path " + - "'c:\\windows\\My Documents 100%20\\foo.txt'" do - before do - @path = "c:\\windows\\My Documents 100%20\\foo.txt" - end - - it "should convert to " + - "\'file:///c:/windows/My%20Documents%20100%20/foo.txt\'" do - @uri = Addressable::URI.convert_path(@path) - @uri.to_str.should == "file:///c:/windows/My%20Documents%20100%20/foo.txt" - end - - it "should have an origin of 'file://'" do - @uri = Addressable::URI.convert_path(@path) - @uri.origin.should == 'file://' - end -end - -describe Addressable::URI, "when given the path " + - "'file://c:\\windows\\My Documents 100%20\\foo.txt'" do - before do - @path = "file://c:\\windows\\My Documents 100%20\\foo.txt" - end - - it "should convert to " + - "\'file:///c:/windows/My%20Documents%20100%20/foo.txt\'" do - @uri = Addressable::URI.convert_path(@path) - @uri.to_str.should == "file:///c:/windows/My%20Documents%20100%20/foo.txt" - end - - it "should have an origin of 'file://'" do - @uri = Addressable::URI.convert_path(@path) - @uri.origin.should == 'file://' - end -end - -describe Addressable::URI, "when given the path " + - "'file:c:\\windows\\My Documents 100%20\\foo.txt'" do - before do - @path = "file:c:\\windows\\My Documents 100%20\\foo.txt" - end - - it "should convert to " + - "\'file:///c:/windows/My%20Documents%20100%20/foo.txt\'" do - @uri = Addressable::URI.convert_path(@path) - @uri.to_str.should == "file:///c:/windows/My%20Documents%20100%20/foo.txt" - end - - it "should have an origin of 'file://'" do - @uri = Addressable::URI.convert_path(@path) - @uri.origin.should == 'file://' - end -end - -describe Addressable::URI, "when given the path " + - "'file:/c:\\windows\\My Documents 100%20\\foo.txt'" do - before do - @path = "file:/c:\\windows\\My Documents 100%20\\foo.txt" - end - - it "should convert to " + - "\'file:///c:/windows/My%20Documents%20100%20/foo.txt\'" do - @uri = Addressable::URI.convert_path(@path) - @uri.to_str.should == "file:///c:/windows/My%20Documents%20100%20/foo.txt" - end - - it "should have an origin of 'file://'" do - @uri = Addressable::URI.convert_path(@path) - @uri.origin.should == 'file://' - end -end - -describe Addressable::URI, "when given the path " + - "'file:///c|/windows/My%20Documents%20100%20/foo.txt'" do - before do - @path = "file:///c|/windows/My%20Documents%20100%20/foo.txt" - end - - it "should convert to " + - "\'file:///c:/windows/My%20Documents%20100%20/foo.txt\'" do - @uri = Addressable::URI.convert_path(@path) - @uri.to_str.should == "file:///c:/windows/My%20Documents%20100%20/foo.txt" - end - - it "should have an origin of 'file://'" do - @uri = Addressable::URI.convert_path(@path) - @uri.origin.should == 'file://' - end -end - -describe Addressable::URI, "when given an http protocol URI" do - before do - @path = "http://example.com/" - end - - it "should not do any conversion at all" do - @uri = Addressable::URI.convert_path(@path) - @uri.to_str.should == "http://example.com/" - end -end - -class SuperString - def initialize(string) - @string = string.to_s - end - - def to_str - return @string - end -end - -describe Addressable::URI, "when parsing a non-String object" do - it "should correctly parse anything with a 'to_str' method" do - Addressable::URI.parse(SuperString.new(42)) - end - - it "should raise a TypeError for objects than cannot be converted" do - (lambda do - Addressable::URI.parse(42) - end).should raise_error(TypeError, "Can't convert Fixnum into String.") - end - - it "should correctly parse heuristically anything with a 'to_str' method" do - Addressable::URI.heuristic_parse(SuperString.new(42)) - end - - it "should raise a TypeError for objects than cannot be converted" do - (lambda do - Addressable::URI.heuristic_parse(42) - end).should raise_error(TypeError, "Can't convert Fixnum into String.") - end -end - -describe Addressable::URI, "when form encoding a hash" do - it "should result in correct percent encoded sequence" do - Addressable::URI.form_encode( - [["&one", "/1"], ["=two", "?2"], [":three", "#3"]] - ).should == "%26one=%2F1&%3Dtwo=%3F2&%3Athree=%233" - end - - it "should result in correct percent encoded sequence" do - Addressable::URI.form_encode( - {"q" => "one two three"} - ).should == "q=one+two+three" - end - - it "should result in correct percent encoded sequence" do - Addressable::URI.form_encode( - {"key" => nil} - ).should == "key=" - end - - it "should result in correct percent encoded sequence" do - Addressable::URI.form_encode( - {"q" => ["one", "two", "three"]} - ).should == "q=one&q=two&q=three" - end - - it "should result in correctly encoded newlines" do - Addressable::URI.form_encode( - {"text" => "one\ntwo\rthree\r\nfour\n\r"} - ).should == "text=one%0D%0Atwo%0D%0Athree%0D%0Afour%0D%0A%0D%0A" - end - - it "should result in a sorted percent encoded sequence" do - Addressable::URI.form_encode( - [["a", "1"], ["dup", "3"], ["dup", "2"]], true - ).should == "a=1&dup=2&dup=3" - end -end - -describe Addressable::URI, "when form encoding a non-Array object" do - it "should raise a TypeError for objects than cannot be converted" do - (lambda do - Addressable::URI.form_encode(42) - end).should raise_error(TypeError, "Can't convert Fixnum into Array.") - end -end - -describe Addressable::URI, "when form unencoding a string" do - it "should result in correct values" do - Addressable::URI.form_unencode( - "%26one=%2F1&%3Dtwo=%3F2&%3Athree=%233" - ).should == [["&one", "/1"], ["=two", "?2"], [":three", "#3"]] - end - - it "should result in correct values" do - Addressable::URI.form_unencode( - "q=one+two+three" - ).should == [["q", "one two three"]] - end - - it "should result in correct values" do - Addressable::URI.form_unencode( - "text=one%0D%0Atwo%0D%0Athree%0D%0Afour%0D%0A%0D%0A" - ).should == [["text", "one\ntwo\nthree\nfour\n\n"]] - end - - it "should result in correct values" do - Addressable::URI.form_unencode( - "a=1&dup=2&dup=3" - ).should == [["a", "1"], ["dup", "2"], ["dup", "3"]] - end - - it "should result in correct values" do - Addressable::URI.form_unencode( - "key" - ).should == [["key", nil]] - end - - it "should result in correct values" do - Addressable::URI.form_unencode("GivenName=Ren%C3%A9").should == - [["GivenName", "René"]] - end -end - -describe Addressable::URI, "when form unencoding a non-String object" do - it "should correctly parse anything with a 'to_str' method" do - Addressable::URI.form_unencode(SuperString.new(42)) - end - - it "should raise a TypeError for objects than cannot be converted" do - (lambda do - Addressable::URI.form_unencode(42) - end).should raise_error(TypeError, "Can't convert Fixnum into String.") - end -end - -describe Addressable::URI, "when normalizing a non-String object" do - it "should correctly parse anything with a 'to_str' method" do - Addressable::URI.normalize_component(SuperString.new(42)) - end - - it "should raise a TypeError for objects than cannot be converted" do - (lambda do - Addressable::URI.normalize_component(42) - end).should raise_error(TypeError, "Can't convert Fixnum into String.") - end - - it "should raise a TypeError for objects than cannot be converted" do - (lambda do - Addressable::URI.normalize_component("component", 42) - end).should raise_error(TypeError) - end -end - -describe Addressable::URI, "when normalizing a path with an encoded slash" do - it "should result in correct percent encoded sequence" do - Addressable::URI.parse("/path%2Fsegment/").normalize.path.should == - "/path%2Fsegment/" - end -end - -describe Addressable::URI, "when normalizing a partially encoded string" do - it "should result in correct percent encoded sequence" do - Addressable::URI.normalize_component( - "partially % encoded%21" - ).should == "partially%20%25%20encoded!" - end - - it "should result in correct percent encoded sequence" do - Addressable::URI.normalize_component( - "partially %25 encoded!" - ).should == "partially%20%25%20encoded!" - end -end - -describe Addressable::URI, "when normalizing a unicode sequence" do - it "should result in correct percent encoded sequence" do - Addressable::URI.normalize_component( - "/C%CC%A7" - ).should == "/%C3%87" - end - - it "should result in correct percent encoded sequence" do - Addressable::URI.normalize_component( - "/%C3%87" - ).should == "/%C3%87" - end -end - -describe Addressable::URI, "when normalizing a multibyte string" do - it "should result in correct percent encoded sequence" do - Addressable::URI.normalize_component("günther").should == - "g%C3%BCnther" - end - - it "should result in correct percent encoded sequence" do - Addressable::URI.normalize_component("g%C3%BCnther").should == - "g%C3%BCnther" - end -end - -describe Addressable::URI, "when normalizing a string but leaving some characters encoded" do - it "should result in correct percent encoded sequence" do - Addressable::URI.normalize_component("%58X%59Y%5AZ", "0-9a-zXY", "Y").should == - "XX%59Y%5A%5A" - end - - it "should not modify the character class" do - character_class = "0-9a-zXY" - - character_class_copy = character_class.dup - - Addressable::URI.normalize_component("%58X%59Y%5AZ", character_class, "Y") - - character_class.should == character_class_copy - end -end - -describe Addressable::URI, "when encoding a string with existing encodings to upcase" do - it "should result in correct percent encoded sequence" do - Addressable::URI.encode_component("JK%4c", "0-9A-IKM-Za-z%", "L").should == "%4AK%4C" - end -end - -describe Addressable::URI, "when encoding a multibyte string" do - it "should result in correct percent encoded sequence" do - Addressable::URI.encode_component("günther").should == "g%C3%BCnther" - end - - it "should result in correct percent encoded sequence" do - Addressable::URI.encode_component( - "günther", /[^a-zA-Z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\-\.\_\~]/ - ).should == "g%C3%BCnther" - end -end - -describe Addressable::URI, "when form encoding a multibyte string" do - it "should result in correct percent encoded sequence" do - Addressable::URI.form_encode({"GivenName" => "René"}).should == - "GivenName=Ren%C3%A9" - end -end - -describe Addressable::URI, "when encoding a string with ASCII chars 0-15" do - it "should result in correct percent encoded sequence" do - Addressable::URI.encode_component("one\ntwo").should == "one%0Atwo" - end - - it "should result in correct percent encoded sequence" do - Addressable::URI.encode_component( - "one\ntwo", /[^a-zA-Z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\-\.\_\~]/ - ).should == "one%0Atwo" - end -end - -describe Addressable::URI, "when unencoding a multibyte string" do - it "should result in correct percent encoded sequence" do - Addressable::URI.unencode_component("g%C3%BCnther").should == "günther" - end - - it "should consistently use UTF-8 internally" do - Addressable::URI.unencode_component("ski=%BA%DAɫ").should == "ski=\xBA\xDAɫ" - end - - it "should result in correct percent encoded sequence as a URI" do - Addressable::URI.unencode( - "/path?g%C3%BCnther", ::Addressable::URI - ).should == Addressable::URI.new( - :path => "/path", :query => "günther" - ) - end -end - -describe Addressable::URI, "when partially unencoding a string" do - it "should unencode all characters by default" do - Addressable::URI.unencode('%%25~%7e+%2b', String).should == '%%~~++' - end - - it "should unencode characters not in leave_encoded" do - Addressable::URI.unencode('%%25~%7e+%2b', String, '~').should == '%%~%7e++' - end - - it "should leave characters in leave_encoded alone" do - Addressable::URI.unencode('%%25~%7e+%2b', String, '%~+').should == '%%25~%7e+%2b' - end -end - -describe Addressable::URI, "when unencoding a bogus object" do - it "should raise a TypeError" do - (lambda do - Addressable::URI.unencode_component(42) - end).should raise_error(TypeError) - end - - it "should raise a TypeError" do - (lambda do - Addressable::URI.unencode("/path?g%C3%BCnther", Integer) - end).should raise_error(TypeError) - end -end - -describe Addressable::URI, "when encoding a bogus object" do - it "should raise a TypeError" do - (lambda do - Addressable::URI.encode(Object.new) - end).should raise_error(TypeError) - end - - it "should raise a TypeError" do - (lambda do - Addressable::URI.normalized_encode(Object.new) - end).should raise_error(TypeError) - end - - it "should raise a TypeError" do - (lambda do - Addressable::URI.encode_component("günther", Object.new) - end).should raise_error(TypeError) - end - - it "should raise a TypeError" do - (lambda do - Addressable::URI.encode_component(Object.new) - end).should raise_error(TypeError) - end -end - -describe Addressable::URI, "when given the input " + - "'http://example.com/'" do - before do - @input = "http://example.com/" - end - - it "should heuristically parse to 'http://example.com/'" do - @uri = Addressable::URI.heuristic_parse(@input) - @uri.to_s.should == "http://example.com/" - end - - it "should not raise error when frozen" do - (lambda do - Addressable::URI.heuristic_parse(@input).freeze.to_s - end).should_not raise_error - end -end - -describe Addressable::URI, "when given the input " + - "'https://example.com/'" do - before do - @input = "https://example.com/" - end - - it "should heuristically parse to 'https://example.com/'" do - @uri = Addressable::URI.heuristic_parse(@input) - @uri.to_s.should == "https://example.com/" - end -end - -describe Addressable::URI, "when given the input " + - "'http:example.com/'" do - before do - @input = "http:example.com/" - end - - it "should heuristically parse to 'http://example.com/'" do - @uri = Addressable::URI.heuristic_parse(@input) - @uri.to_s.should == "http://example.com/" - end - - it "should heuristically parse to 'http://example.com/' " + - "even with a scheme hint of 'ftp'" do - @uri = Addressable::URI.heuristic_parse(@input, {:scheme => 'ftp'}) - @uri.to_s.should == "http://example.com/" - end -end - -describe Addressable::URI, "when given the input " + - "'https:example.com/'" do - before do - @input = "https:example.com/" - end - - it "should heuristically parse to 'https://example.com/'" do - @uri = Addressable::URI.heuristic_parse(@input) - @uri.to_s.should == "https://example.com/" - end - - it "should heuristically parse to 'https://example.com/' " + - "even with a scheme hint of 'ftp'" do - @uri = Addressable::URI.heuristic_parse(@input, {:scheme => 'ftp'}) - @uri.to_s.should == "https://example.com/" - end -end - -describe Addressable::URI, "when given the input " + - "'http://example.com/example.com/'" do - before do - @input = "http://example.com/example.com/" - end - - it "should heuristically parse to 'http://example.com/example.com/'" do - @uri = Addressable::URI.heuristic_parse(@input) - @uri.to_s.should == "http://example.com/example.com/" - end -end - -describe Addressable::URI, "when given the input " + - "'/path/to/resource'" do - before do - @input = "/path/to/resource" - end - - it "should heuristically parse to '/path/to/resource'" do - @uri = Addressable::URI.heuristic_parse(@input) - @uri.to_s.should == "/path/to/resource" - end -end - -describe Addressable::URI, "when given the input " + - "'relative/path/to/resource'" do - before do - @input = "relative/path/to/resource" - end - - it "should heuristically parse to 'relative/path/to/resource'" do - @uri = Addressable::URI.heuristic_parse(@input) - @uri.to_s.should == "relative/path/to/resource" - end -end - -describe Addressable::URI, "when given the input " + - "'example.com'" do - before do - @input = "example.com" - end - - it "should heuristically parse to 'http://example.com'" do - @uri = Addressable::URI.heuristic_parse(@input) - @uri.to_s.should == "http://example.com" - end -end - -describe Addressable::URI, "when given the input " + - "'example.com' and a scheme hint of 'ftp'" do - before do - @input = "example.com" - @hints = {:scheme => 'ftp'} - end - - it "should heuristically parse to 'http://example.com'" do - @uri = Addressable::URI.heuristic_parse(@input, @hints) - @uri.to_s.should == "ftp://example.com" - end -end - -describe Addressable::URI, "when given the input " + - "'example.com:21' and a scheme hint of 'ftp'" do - before do - @input = "example.com:21" - @hints = {:scheme => 'ftp'} - end - - it "should heuristically parse to 'http://example.com:21'" do - @uri = Addressable::URI.heuristic_parse(@input, @hints) - @uri.to_s.should == "ftp://example.com:21" - end -end - -describe Addressable::URI, "when given the input " + - "'example.com/path/to/resource'" do - before do - @input = "example.com/path/to/resource" - end - - it "should heuristically parse to 'http://example.com/path/to/resource'" do - @uri = Addressable::URI.heuristic_parse(@input) - @uri.to_s.should == "http://example.com/path/to/resource" - end -end - -describe Addressable::URI, "when given the input " + - "'http:///example.com'" do - before do - @input = "http:///example.com" - end - - it "should heuristically parse to 'http://example.com'" do - @uri = Addressable::URI.heuristic_parse(@input) - @uri.to_s.should == "http://example.com" - end -end - -describe Addressable::URI, "when given the input " + - "'feed:///example.com'" do - before do - @input = "feed:///example.com" - end - - it "should heuristically parse to 'feed://example.com'" do - @uri = Addressable::URI.heuristic_parse(@input) - @uri.to_s.should == "feed://example.com" - end -end - -describe Addressable::URI, "when given the input " + - "'file://path/to/resource/'" do - before do - @input = "file://path/to/resource/" - end - - it "should heuristically parse to 'file:///path/to/resource/'" do - @uri = Addressable::URI.heuristic_parse(@input) - @uri.to_s.should == "file:///path/to/resource/" - end -end - -describe Addressable::URI, "when given the input " + - "'feed://http://example.com'" do - before do - @input = "feed://http://example.com" - end - - it "should heuristically parse to 'feed:http://example.com'" do - @uri = Addressable::URI.heuristic_parse(@input) - @uri.to_s.should == "feed:http://example.com" - end -end - -describe Addressable::URI, "when given the input " + - "::URI.parse('http://example.com')" do - before do - @input = ::URI.parse('http://example.com') - end - - it "should heuristically parse to 'http://example.com'" do - @uri = Addressable::URI.heuristic_parse(@input) - @uri.to_s.should == "http://example.com" - end -end - -describe Addressable::URI, "when assigning query values" do - before do - @uri = Addressable::URI.new - end - - it "should correctly assign {:a => 'a', :b => ['c', 'd', 'e']}" do - @uri.query_values = {:a => "a", :b => ["c", "d", "e"]} - @uri.query.should == "a=a&b=c&b=d&b=e" - end - - it "should raise an error attempting to assign {'a' => {'b' => ['c']}}" do - (lambda do - @uri.query_values = { 'a' => {'b' => ['c'] } } - end).should raise_error(TypeError) - end - - it "should raise an error attempting to assign " + - "{:b => '2', :a => {:c => '1'}}" do - (lambda do - @uri.query_values = {:b => '2', :a => {:c => '1'}} - end).should raise_error(TypeError) - end - - it "should raise an error attempting to assign " + - "{:a => 'a', :b => [{:c => 'c', :d => 'd'}, " + - "{:e => 'e', :f => 'f'}]}" do - (lambda do - @uri.query_values = { - :a => "a", :b => [{:c => "c", :d => "d"}, {:e => "e", :f => "f"}] - } - end).should raise_error(TypeError) - end - - it "should raise an error attempting to assign " + - "{:a => 'a', :b => [{:c => true, :d => 'd'}, " + - "{:e => 'e', :f => 'f'}]}" do - (lambda do - @uri.query_values = { - :a => 'a', :b => [{:c => true, :d => 'd'}, {:e => 'e', :f => 'f'}] - } - end).should raise_error(TypeError) - end - - it "should raise an error attempting to assign " + - "{:a => 'a', :b => {:c => true, :d => 'd'}}" do - (lambda do - @uri.query_values = { - :a => 'a', :b => {:c => true, :d => 'd'} - } - end).should raise_error(TypeError) - end - - it "should raise an error attempting to assign " + - "{:a => 'a', :b => {:c => true, :d => 'd'}}" do - (lambda do - @uri.query_values = { - :a => 'a', :b => {:c => true, :d => 'd'} - } - end).should raise_error(TypeError) - end - - it "should correctly assign {:a => 1, :b => 1.5}" do - @uri.query_values = { :a => 1, :b => 1.5 } - @uri.query.should == "a=1&b=1.5" - end - - it "should raise an error attempting to assign " + - "{:z => 1, :f => [2, {999.1 => [3,'4']}, ['h', 'i']], " + - ":a => {:b => ['c', 'd'], :e => true, :y => 0.5}}" do - (lambda do - @uri.query_values = { - :z => 1, - :f => [ 2, {999.1 => [3,'4']}, ['h', 'i'] ], - :a => { :b => ['c', 'd'], :e => true, :y => 0.5 } - } - end).should raise_error(TypeError) - end - - it "should correctly assign {}" do - @uri.query_values = {} - @uri.query.should == '' - end - - it "should correctly assign nil" do - @uri.query_values = nil - @uri.query.should == nil - end - - it "should correctly sort {'ab' => 'c', :ab => 'a', :a => 'x'}" do - @uri.query_values = {'ab' => 'c', :ab => 'a', :a => 'x'} - @uri.query.should == "a=x&ab=a&ab=c" - end - - it "should correctly assign " + - "[['b', 'c'], ['b', 'a'], ['a', 'a']]" do - # Order can be guaranteed in this format, so preserve it. - @uri.query_values = [['b', 'c'], ['b', 'a'], ['a', 'a']] - @uri.query.should == "b=c&b=a&a=a" - end - - it "should preserve query string order" do - query_string = (('a'..'z').to_a.reverse.map { |e| "#{e}=#{e}" }).join("&") - @uri.query = query_string - original_uri = @uri.to_s - @uri.query_values = @uri.query_values(Array) - @uri.to_s.should == original_uri - end - - describe 'when a hash with mixed types is assigned to query_values' do - it 'should not raise an error' do - pending 'Issue #94' do - expect { subject.query_values = { "page" => "1", :page => 2 } }.to_not raise_error - end - end - end -end - -describe Addressable::URI, "when assigning path values" do - before do - @uri = Addressable::URI.new - end - - it "should correctly assign paths containing colons" do - @uri.path = "acct:bob@sporkmonger.com" - @uri.path.should == "acct:bob@sporkmonger.com" - @uri.normalize.to_str.should == "acct%2Fbob@sporkmonger.com" - (lambda { @uri.to_s }).should raise_error( - Addressable::URI::InvalidURIError - ) - end - - it "should correctly assign paths containing colons" do - @uri.path = "/acct:bob@sporkmonger.com" - @uri.authority = "example.com" - @uri.normalize.to_str.should == "//example.com/acct:bob@sporkmonger.com" - end - - it "should correctly assign paths containing colons" do - @uri.path = "acct:bob@sporkmonger.com" - @uri.scheme = "something" - @uri.normalize.to_str.should == "something:acct:bob@sporkmonger.com" - end - - it "should not allow relative paths to be assigned on absolute URIs" do - (lambda do - @uri.scheme = "http" - @uri.host = "example.com" - @uri.path = "acct:bob@sporkmonger.com" - end).should raise_error(Addressable::URI::InvalidURIError) - end - - it "should not allow relative paths to be assigned on absolute URIs" do - (lambda do - @uri.path = "acct:bob@sporkmonger.com" - @uri.scheme = "http" - @uri.host = "example.com" - end).should raise_error(Addressable::URI::InvalidURIError) - end - - it "should not allow relative paths to be assigned on absolute URIs" do - (lambda do - @uri.path = "uuid:0b3ecf60-3f93-11df-a9c3-001f5bfffe12" - @uri.scheme = "urn" - end).should_not raise_error - end -end - -describe Addressable::URI, "when initializing a subclass of Addressable::URI" do - before do - @uri = Class.new(Addressable::URI).new - end - - it "should have the same class after being parsed" do - @uri.class.should == Addressable::URI.parse(@uri).class - end - - it "should have the same class as its duplicate" do - @uri.class.should == @uri.dup.class - end - - it "should have the same class after being normalized" do - @uri.class.should == @uri.normalize.class - end - - it "should have the same class after being merged" do - @uri.class.should == @uri.merge(:path => 'path').class - end - - it "should have the same class after being joined" do - @uri.class.should == @uri.join('path').class - end -end diff --git a/.gems/gems/addressable-2.3.6/spec/spec_helper.rb b/.gems/gems/addressable-2.3.6/spec/spec_helper.rb deleted file mode 100644 index e0020ba..0000000 --- a/.gems/gems/addressable-2.3.6/spec/spec_helper.rb +++ /dev/null @@ -1,6 +0,0 @@ -begin - require 'coveralls' - Coveralls.wear! -rescue LoadError - warn "warning: coveralls gem not found; skipping Coveralls" -end diff --git a/.gems/gems/addressable-2.3.6/tasks/clobber.rake b/.gems/gems/addressable-2.3.6/tasks/clobber.rake deleted file mode 100644 index 093ce81..0000000 --- a/.gems/gems/addressable-2.3.6/tasks/clobber.rake +++ /dev/null @@ -1,2 +0,0 @@ -desc "Remove all build products" -task "clobber" diff --git a/.gems/gems/addressable-2.3.6/tasks/gem.rake b/.gems/gems/addressable-2.3.6/tasks/gem.rake deleted file mode 100644 index 8596712..0000000 --- a/.gems/gems/addressable-2.3.6/tasks/gem.rake +++ /dev/null @@ -1,86 +0,0 @@ -require "rubygems/package_task" - -namespace :gem do - GEM_SPEC = Gem::Specification.new do |s| - s.name = PKG_NAME - s.version = PKG_VERSION - s.summary = PKG_SUMMARY - s.description = PKG_DESCRIPTION - - s.files = PKG_FILES.to_a - - s.has_rdoc = true - s.extra_rdoc_files = %w( README.md ) - s.rdoc_options.concat ["--main", "README.md"] - - if !s.respond_to?(:add_development_dependency) - puts "Cannot build Gem with this version of RubyGems." - exit(1) - end - - s.add_development_dependency("rake", ">= 0.7.3") - s.add_development_dependency("rspec", ">= 2.9.0") - s.add_development_dependency("launchy", ">= 0.3.2") - - s.require_path = "lib" - - s.author = "Bob Aman" - s.email = "bob@sporkmonger.com" - s.homepage = RUBY_FORGE_URL - s.rubyforge_project = RUBY_FORGE_PROJECT - s.license = "Apache License 2.0" - end - - Gem::PackageTask.new(GEM_SPEC) do |p| - p.gem_spec = GEM_SPEC - p.need_tar = true - p.need_zip = true - end - - desc "Generates .gemspec file" - task :gemspec do - spec_string = GEM_SPEC.to_ruby - - begin - Thread.new { eval("$SAFE = 3\n#{spec_string}", binding) }.join - rescue - abort "unsafe gemspec: #{$!}" - else - File.open("#{GEM_SPEC.name}.gemspec", 'w') do |file| - file.write spec_string - end - end - end - - desc "Show information about the gem" - task :debug do - puts GEM_SPEC.to_ruby - end - - desc "Install the gem" - task :install => ["clobber", "gem:package"] do - sh "#{SUDO} gem install --local pkg/#{GEM_SPEC.full_name}" - end - - desc "Uninstall the gem" - task :uninstall do - installed_list = Gem.source_index.find_name(PKG_NAME) - if installed_list && - (installed_list.collect { |s| s.version.to_s}.include?(PKG_VERSION)) - sh( - "#{SUDO} gem uninstall --version '#{PKG_VERSION}' " + - "--ignore-dependencies --executables #{PKG_NAME}" - ) - end - end - - desc "Reinstall the gem" - task :reinstall => [:uninstall, :install] -end - -desc "Alias to gem:package" -task "gem" => "gem:package" - -task "gem:release" => "gem:gemspec" - -task "clobber" => ["gem:clobber_package"] diff --git a/.gems/gems/addressable-2.3.6/tasks/git.rake b/.gems/gems/addressable-2.3.6/tasks/git.rake deleted file mode 100644 index 092032b..0000000 --- a/.gems/gems/addressable-2.3.6/tasks/git.rake +++ /dev/null @@ -1,45 +0,0 @@ -namespace :git do - namespace :tag do - desc "List tags from the Git repository" - task :list do - tags = `git tag -l` - tags.gsub!("\r", "") - tags = tags.split("\n").sort {|a, b| b <=> a } - puts tags.join("\n") - end - - desc "Create a new tag in the Git repository" - task :create do - changelog = File.open("CHANGELOG.md", "r") { |file| file.read } - puts "-" * 80 - puts changelog - puts "-" * 80 - puts - - v = ENV["VERSION"] or abort "Must supply VERSION=x.y.z" - abort "Versions don't match #{v} vs #{PKG_VERSION}" if v != PKG_VERSION - - git_status = `git status` - if git_status !~ /nothing to commit \(working directory clean\)/ - abort "Working directory isn't clean." - end - - tag = "#{PKG_NAME}-#{PKG_VERSION}" - msg = "Release #{PKG_NAME}-#{PKG_VERSION}" - - existing_tags = `git tag -l #{PKG_NAME}-*`.split('\n') - if existing_tags.include?(tag) - warn("Tag already exists, deleting...") - unless system "git tag -d #{tag}" - abort "Tag deletion failed." - end - end - puts "Creating git tag '#{tag}'..." - unless system "git tag -a -m \"#{msg}\" #{tag}" - abort "Tag creation failed." - end - end - end -end - -task "gem:release" => "git:tag:create" diff --git a/.gems/gems/addressable-2.3.6/tasks/metrics.rake b/.gems/gems/addressable-2.3.6/tasks/metrics.rake deleted file mode 100644 index 41fc5c2..0000000 --- a/.gems/gems/addressable-2.3.6/tasks/metrics.rake +++ /dev/null @@ -1,22 +0,0 @@ -namespace :metrics do - task :lines do - lines, codelines, total_lines, total_codelines = 0, 0, 0, 0 - for file_name in FileList["lib/**/*.rb"] - f = File.open(file_name) - while line = f.gets - lines += 1 - next if line =~ /^\s*$/ - next if line =~ /^\s*#/ - codelines += 1 - end - puts "L: #{sprintf("%4d", lines)}, " + - "LOC #{sprintf("%4d", codelines)} | #{file_name}" - total_lines += lines - total_codelines += codelines - - lines, codelines = 0, 0 - end - - puts "Total: Lines #{total_lines}, LOC #{total_codelines}" - end -end diff --git a/.gems/gems/addressable-2.3.6/tasks/rspec.rake b/.gems/gems/addressable-2.3.6/tasks/rspec.rake deleted file mode 100644 index 6b7e3a7..0000000 --- a/.gems/gems/addressable-2.3.6/tasks/rspec.rake +++ /dev/null @@ -1,58 +0,0 @@ -require "rspec/core/rake_task" - -namespace :spec do - RSpec::Core::RakeTask.new(:rcov) do |t| - t.pattern = FileList['spec/**/*_spec.rb'] - t.rspec_opts = ['--color', '--format', 'documentation'] - - t.rcov = RCOV_ENABLED - t.rcov_opts = [ - '--exclude', 'lib\\/compat', - '--exclude', 'spec', - '--exclude', '\\.rvm\\/gems', - '--exclude', '1\\.8\\/gems', - '--exclude', '1\\.9\\/gems', - '--exclude', '\\.rvm', - '--exclude', '\\/Library\\/Ruby', - '--exclude', 'addressable\\/idna' # environment dependant - ] - end - - RSpec::Core::RakeTask.new(:normal) do |t| - t.pattern = FileList['spec/**/*_spec.rb'].exclude(/compat/) - t.rspec_opts = ['--color', '--format', 'documentation'] - t.rcov = false - end - - RSpec::Core::RakeTask.new(:all) do |t| - t.pattern = FileList['spec/**/*_spec.rb'] - t.rspec_opts = ['--color', '--format', 'documentation'] - t.rcov = false - end - - desc "Generate HTML Specdocs for all specs" - RSpec::Core::RakeTask.new(:specdoc) do |t| - specdoc_path = File.expand_path( - File.join(File.dirname(__FILE__), '..', 'documentation') - ) - Dir.mkdir(specdoc_path) if !File.exist?(specdoc_path) - - output_file = File.join(specdoc_path, 'index.html') - t.pattern = FileList['spec/**/*_spec.rb'] - t.rspec_opts = ["--format", "\"html:#{output_file}\"", "--diff"] - t.fail_on_error = false - end - - namespace :rcov do - desc "Browse the code coverage report." - task :browse => "spec:rcov" do - require "launchy" - Launchy::Browser.run("coverage/index.html") - end - end -end - -desc "Alias to spec:normal" -task "spec" => "spec:normal" - -task "clobber" => ["spec:clobber_rcov"] diff --git a/.gems/gems/addressable-2.3.6/tasks/rubyforge.rake b/.gems/gems/addressable-2.3.6/tasks/rubyforge.rake deleted file mode 100644 index 61d2ddb..0000000 --- a/.gems/gems/addressable-2.3.6/tasks/rubyforge.rake +++ /dev/null @@ -1,73 +0,0 @@ -namespace :gem do - desc 'Package and upload to RubyForge' - task :release => ["gem:package", "gem:gemspec"] do |t| - require 'rubyforge' - - v = ENV['VERSION'] or abort 'Must supply VERSION=x.y.z' - abort "Versions don't match #{v} vs #{PROJ.version}" if v != PKG_VERSION - pkg = "pkg/#{GEM_SPEC.full_name}" - - rf = RubyForge.new - rf.configure - puts 'Logging in...' - rf.login - - c = rf.userconfig - changelog = File.open("CHANGELOG.md") { |file| file.read } - c['release_changes'] = changelog - c['preformatted'] = true - - files = ["#{pkg}.tgz", "#{pkg}.zip", "#{pkg}.gem"] - - puts "Releasing #{PKG_NAME} v. #{PKG_VERSION}" - rf.add_release RUBY_FORGE_PROJECT, PKG_NAME, PKG_VERSION, *files - end -end - -namespace :spec do - desc "Publish specdoc to RubyForge" - task :release => ["spec:specdoc"] do - require "rake/contrib/sshpublisher" - require "yaml" - - config = YAML.load( - File.read(File.expand_path('~/.rubyforge/user-config.yml')) - ) - host = "#{config['username']}@rubyforge.org" - remote_dir = RUBY_FORGE_PATH + "/specdoc" - local_dir = "specdoc" - Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload - end - - namespace :rcov do - desc "Publish coverage report to RubyForge" - task :release => ["spec:rcov"] do - require "rake/contrib/sshpublisher" - require "yaml" - - config = YAML.load( - File.read(File.expand_path('~/.rubyforge/user-config.yml')) - ) - host = "#{config['username']}@rubyforge.org" - remote_dir = RUBY_FORGE_PATH + "/coverage" - local_dir = "coverage" - Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload - end - end -end - -namespace :website do - desc "Publish website to RubyForge" - task :release => ["doc:release", "spec:release", "spec:rcov:release"] do - require "rake/contrib/sshpublisher" - require "yaml" - - config = YAML.load( - File.read(File.expand_path('~/.rubyforge/user-config.yml')) - ) - host = "#{config['username']}@rubyforge.org" - remote_dir = RUBY_FORGE_PATH - local_dir = "website" - Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload - end -end diff --git a/.gems/gems/addressable-2.3.6/tasks/yard.rake b/.gems/gems/addressable-2.3.6/tasks/yard.rake deleted file mode 100644 index 68e4491..0000000 --- a/.gems/gems/addressable-2.3.6/tasks/yard.rake +++ /dev/null @@ -1,27 +0,0 @@ -require "rake" - -begin - require "yard" - require "yard/rake/yardoc_task" - - namespace :doc do - desc "Generate Yardoc documentation" - YARD::Rake::YardocTask.new do |yardoc| - yardoc.name = "yard" - yardoc.options = ["--verbose", "--markup", "markdown"] - yardoc.files = FileList[ - "lib/**/*.rb", "ext/**/*.c", - "README.md", "CHANGELOG.md", "LICENSE.txt" - ].exclude(/idna/) - end - end - - task "clobber" => ["doc:clobber_yard"] - - desc "Alias to doc:yard" - task "doc" => "doc:yard" -rescue LoadError - # If yard isn't available, it's not the end of the world - desc "Alias to doc:rdoc" - task "doc" => "doc:rdoc" -end diff --git a/.gems/gems/addressable-2.3.6/website/index.html b/.gems/gems/addressable-2.3.6/website/index.html deleted file mode 100644 index ba92bd6..0000000 --- a/.gems/gems/addressable-2.3.6/website/index.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - Addressable - - - -

Addressable

-
-

- Addressable is a replacement for the URI implementation that is part - of Ruby's standard library. It more closely conforms to the relevant - RFCs and adds support for IRIs and URI templates. -

- -

- You know what to do: -

-

- sudo gem install addressable -

-

- Alternatively, you can: -

-

- - git submodule add - git://github.com/sporkmonger/addressable.git - vendor/gems/addressable - -

-

- Addressable works in Ruby 1.8.x, 1.9.x, and JRuby. -

-
- - diff --git a/.gems/gems/buftok-0.2.0/CONTRIBUTING.md b/.gems/gems/buftok-0.2.0/CONTRIBUTING.md deleted file mode 100644 index 06c35bb..0000000 --- a/.gems/gems/buftok-0.2.0/CONTRIBUTING.md +++ /dev/null @@ -1,49 +0,0 @@ -## Contributing -In the spirit of [free software][free-sw], **everyone** is encouraged to help -improve this project. Here are some ways *you* can contribute: - -[free-sw]: http://www.fsf.org/licensing/essays/free-sw.html - -* Use alpha, beta, and pre-release versions. -* Report bugs. -* Suggest new features. -* Write or edit documentation. -* Write specifications. -* Write code (**no patch is too small**: fix typos, add comments, clean up - inconsistent whitespace). -* Refactor code. -* Fix [issues][]. -* Review patches. - -[issues]: https://github.com/sferik/buftok/issues - -## Submitting an Issue -We use the [GitHub issue tracker][issues] to track bugs and features. Before -submitting a bug report or feature request, check to make sure it hasn't -already been submitted. When submitting a bug report, please include a [Gist][] -that includes a stack trace and any details that may be necessary to reproduce -the bug, including your gem version, Ruby version, and operating system. -Ideally, a bug report should include a pull request with failing specs. - -[gist]: https://gist.github.com/ - -## Submitting a Pull Request -1. [Fork the repository.][fork] -2. [Create a topic branch.][branch] -3. Add specs for your unimplemented feature or bug fix. -4. Run `bundle exec rake spec`. If your specs pass, return to step 3. -5. Implement your feature or bug fix. -6. Run `bundle exec rake spec`. If your specs fail, return to step 5. -7. Run `open coverage/index.html`. If your changes are not completely covered - by your tests, return to step 3. -8. Run `RUBYOPT=W2 bundle exec rake spec 2>&1 | grep buftok`. If your changes - produce any warnings, return to step 5. -9. Add documentation for your feature or bug fix. -10. Run `bundle exec rake yard`. If your changes are not 100% documented, go - back to step 9. -11. Commit and push your changes. -12. [Submit a pull request.][pr] - -[fork]: http://help.github.com/fork-a-repo/ -[branch]: http://learn.github.com/p/branching.html -[pr]: http://help.github.com/send-pull-requests/ diff --git a/.gems/gems/buftok-0.2.0/Gemfile b/.gems/gems/buftok-0.2.0/Gemfile deleted file mode 100644 index 976088b..0000000 --- a/.gems/gems/buftok-0.2.0/Gemfile +++ /dev/null @@ -1,6 +0,0 @@ -source 'https://rubygems.org' - -gem 'rake' -gem 'rdoc' - -gemspec diff --git a/.gems/gems/buftok-0.2.0/LICENSE.md b/.gems/gems/buftok-0.2.0/LICENSE.md deleted file mode 100644 index 426810a..0000000 --- a/.gems/gems/buftok-0.2.0/LICENSE.md +++ /dev/null @@ -1,56 +0,0 @@ -Ruby is copyrighted free software by Yukihiro Matsumoto . -You can redistribute it and/or modify it under either the terms of the -2-clause BSDL (see the file BSDL), or the conditions below: - - 1. You may make and give away verbatim copies of the source form of the - software without restriction, provided that you duplicate all of the - original copyright notices and associated disclaimers. - - 2. You may modify your copy of the software in any way, provided that - you do at least ONE of the following: - - a) place your modifications in the Public Domain or otherwise - make them Freely Available, such as by posting said - modifications to Usenet or an equivalent medium, or by allowing - the author to include your modifications in the software. - - b) use the modified software only within your corporation or - organization. - - c) give non-standard binaries non-standard names, with - instructions on where to get the original software distribution. - - d) make other distribution arrangements with the author. - - 3. You may distribute the software in object code or binary form, - provided that you do at least ONE of the following: - - a) distribute the binaries and library files of the software, - together with instructions (in the manual page or equivalent) - on where to get the original distribution. - - b) accompany the distribution with the machine-readable source of - the software. - - c) give non-standard binaries non-standard names, with - instructions on where to get the original software distribution. - - d) make other distribution arrangements with the author. - - 4. You may modify and include the part of the software into any other - software (possibly commercial). But some files in the distribution - are not written by the author, so that they are not under these terms. - - For the list of those files and their copying conditions, see the - file LEGAL. - - 5. The scripts and library files supplied as input to or produced as - output from the software do not automatically fall under the - copyright of the software, but belong to whomever generated them, - and may be sold commercially, and may be aggregated with this - software. - - 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE. diff --git a/.gems/gems/buftok-0.2.0/README.md b/.gems/gems/buftok-0.2.0/README.md deleted file mode 100644 index afba76b..0000000 --- a/.gems/gems/buftok-0.2.0/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# BufferedTokenizer - -[![Gem Version](https://badge.fury.io/rb/buftok.png)][gem] -[![Build Status](https://travis-ci.org/sferik/buftok.png?branch=master)][travis] -[![Dependency Status](https://gemnasium.com/sferik/buftok.png?travis)][gemnasium] -[![Code Climate](https://codeclimate.com/github/sferik/buftok.png)][codeclimate] - -[gem]: https://rubygems.org/gems/buftok -[travis]: https://travis-ci.org/sferik/buftok -[gemnasium]: https://gemnasium.com/sferik/buftok -[codeclimate]: https://codeclimate.com/github/sferik/buftok - -###### Statefully split input data by a specifiable token - -BufferedTokenizer takes a delimiter upon instantiation, or acts line-based by -default. It allows input to be spoon-fed from some outside source which -receives arbitrary length datagrams which may-or-may-not contain the token by -which entities are delimited. In this respect it's ideally paired with -something like [EventMachine][]. - -[EventMachine]: http://rubyeventmachine.com/ - -## Supported Ruby Versions -This library aims to support and is [tested against][travis] the following Ruby -implementations: - -* Ruby 1.8.7 -* Ruby 1.9.2 -* Ruby 1.9.3 -* Ruby 2.0.0 - -If something doesn't work on one of these interpreters, it's a bug. - -This library may inadvertently work (or seem to work) on other Ruby -implementations, however support will only be provided for the versions listed -above. - -If you would like this library to support another Ruby version, you may -volunteer to be a maintainer. Being a maintainer entails making sure all tests -run and pass on that implementation. When something breaks on your -implementation, you will be responsible for providing patches in a timely -fashion. If critical issues for a particular implementation exist at the time -of a major release, support for that Ruby version may be dropped. - -## Copyright -Copyright (c) 2006-2013 Tony Arcieri, Martin Emde, Erik Michaels-Ober. -Distributed under the [Ruby license][license]. -[license]: http://www.ruby-lang.org/en/LICENSE.txt diff --git a/.gems/gems/buftok-0.2.0/Rakefile b/.gems/gems/buftok-0.2.0/Rakefile deleted file mode 100644 index b2ba2d0..0000000 --- a/.gems/gems/buftok-0.2.0/Rakefile +++ /dev/null @@ -1,66 +0,0 @@ -require 'bundler' -require 'rdoc/task' -require 'rake/testtask' - -task :default => :test - -Bundler::GemHelper.install_tasks - -RDoc::Task.new do |task| - task.rdoc_dir = 'doc' - task.title = 'BufferedTokenizer' - task.rdoc_files.include('lib/**/*.rb') -end - -Rake::TestTask.new :test do |t| - t.libs << 'lib' - t.test_files = FileList['test/**/*.rb'] -end - -desc "Benchmark the current implementation" -task :bench do - require 'benchmark' - require File.expand_path('lib/buftok', File.dirname(__FILE__)) - - n = 50000 - delimiter = "\n\n" - - frequency1 = 1000 - puts "generating #{n} strings, with #{delimiter.inspect} every #{frequency1} strings..." - data1 = (0...n).map do |i| - (((i % frequency1 == 1) ? "\n" : "") + - ("s" * i) + - ((i % frequency1 == 0) ? "\n" : "")).freeze - end - - frequency2 = 10 - puts "generating #{n} strings, with #{delimiter.inspect} every #{frequency2} strings..." - data2 = (0...n).map do |i| - (((i % frequency2 == 1) ? "\n" : "") + - ("s" * i) + - ((i % frequency2 == 0) ? "\n" : "")).freeze - end - - Benchmark.bmbm do |x| - x.report("1 char, freq: #{frequency1}") do - bt1 = BufferedTokenizer.new - n.times { |i| bt1.extract(data1[i]) } - end - - x.report("2 char, freq: #{frequency1}") do - bt2 = BufferedTokenizer.new(delimiter) - n.times { |i| bt2.extract(data1[i]) } - end - - x.report("1 char, freq: #{frequency2}") do - bt3 = BufferedTokenizer.new - n.times { |i| bt3.extract(data2[i]) } - end - - x.report("2 char, freq: #{frequency2}") do - bt4 = BufferedTokenizer.new(delimiter) - n.times { |i| bt4.extract(data2[i]) } - end - - end -end diff --git a/.gems/gems/buftok-0.2.0/buftok.gemspec b/.gems/gems/buftok-0.2.0/buftok.gemspec deleted file mode 100644 index e108dd3..0000000 --- a/.gems/gems/buftok-0.2.0/buftok.gemspec +++ /dev/null @@ -1,17 +0,0 @@ -Gem::Specification.new do |spec| - spec.add_development_dependency 'bundler', '~> 1.0' - spec.authors = ["Tony Arcieri", "Martin Emde", "Erik Michaels-Ober"] - spec.description = %q{BufferedTokenizer extracts token delimited entities from a sequence of arbitrary inputs} - spec.email = "sferik@gmail.com" - spec.files = %w(CONTRIBUTING.md Gemfile LICENSE.md README.md Rakefile buftok.gemspec) - spec.files += Dir.glob("lib/**/*.rb") - spec.files += Dir.glob("test/**/*.rb") - spec.test_files = spec.files.grep(%r{^test/}) - spec.homepage = "https://github.com/sferik/buftok" - spec.licenses = ['MIT'] - spec.name = "buftok" - spec.require_paths = ["lib"] - spec.required_rubygems_version = '>= 1.3.5' - spec.summary = spec.description - spec.version = "0.2.0" -end diff --git a/.gems/gems/buftok-0.2.0/lib/buftok.rb b/.gems/gems/buftok-0.2.0/lib/buftok.rb deleted file mode 100644 index caf4f77..0000000 --- a/.gems/gems/buftok-0.2.0/lib/buftok.rb +++ /dev/null @@ -1,59 +0,0 @@ -# BufferedTokenizer takes a delimiter upon instantiation, or acts line-based -# by default. It allows input to be spoon-fed from some outside source which -# receives arbitrary length datagrams which may-or-may-not contain the token -# by which entities are delimited. In this respect it's ideally paired with -# something like EventMachine (http://rubyeventmachine.com/). -class BufferedTokenizer - # New BufferedTokenizers will operate on lines delimited by a delimiter, - # which is by default the global input delimiter $/ ("\n"). - # - # The input buffer is stored as an array. This is by far the most efficient - # approach given language constraints (in C a linked list would be a more - # appropriate data structure). Segments of input data are stored in a list - # which is only joined when a token is reached, substantially reducing the - # number of objects required for the operation. - def initialize(delimiter = $/) - @delimiter = delimiter - @input = [] - @tail = '' - @trim = @delimiter.length - 1 - end - - # Extract takes an arbitrary string of input data and returns an array of - # tokenized entities, provided there were any available to extract. This - # makes for easy processing of datagrams using a pattern like: - # - # tokenizer.extract(data).map { |entity| Decode(entity) }.each do ... - # - # Using -1 makes split to return "" if the token is at the end of - # the string, meaning the last element is the start of the next chunk. - def extract(data) - if @trim > 0 - tail_end = @tail.slice!(-@trim, @trim) # returns nil if string is too short - data = tail_end + data if tail_end - end - - @input << @tail - entities = data.split(@delimiter, -1) - @tail = entities.shift - - unless entities.empty? - @input << @tail - entities.unshift @input.join - @input.clear - @tail = entities.pop - end - - entities - end - - # Flush the contents of the input buffer, i.e. return the input buffer even though - # a token has not yet been encountered - def flush - @input << @tail - buffer = @input.join - @input.clear - @tail = "" # @tail.clear is slightly faster, but not supported on 1.8.7 - buffer - end -end diff --git a/.gems/gems/buftok-0.2.0/test/test_buftok.rb b/.gems/gems/buftok-0.2.0/test/test_buftok.rb deleted file mode 100644 index 535b362..0000000 --- a/.gems/gems/buftok-0.2.0/test/test_buftok.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'test/unit' -require 'buftok' - -class TestBuftok < Test::Unit::TestCase - def test_buftok - tokenizer = BufferedTokenizer.new - assert_equal %w[foo], tokenizer.extract("foo\nbar".freeze) - assert_equal %w[barbaz qux], tokenizer.extract("baz\nqux\nquu".freeze) - assert_equal 'quu', tokenizer.flush - assert_equal '', tokenizer.flush - end - - def test_delimiter - tokenizer = BufferedTokenizer.new('<>') - assert_equal ['', "foo\n"], tokenizer.extract("<>foo\n<>".freeze) - assert_equal %w[bar], tokenizer.extract('bar<>baz'.freeze) - assert_equal 'baz', tokenizer.flush - end - - def test_split_delimiter - tokenizer = BufferedTokenizer.new('<>'.freeze) - assert_equal [], tokenizer.extract('foo<'.freeze) - assert_equal %w[foo], tokenizer.extract('>bar<'.freeze) - assert_equal %w[barqux<>'.freeze) - assert_equal '', tokenizer.flush - end -end diff --git a/.gems/gems/equalizer-0.0.9/.gitignore b/.gems/gems/equalizer-0.0.9/.gitignore deleted file mode 100644 index b98eb63..0000000 --- a/.gems/gems/equalizer-0.0.9/.gitignore +++ /dev/null @@ -1,37 +0,0 @@ -## MAC OS -.DS_Store - -## TEXTMATE -*.tmproj -tmtags - -## EMACS -*~ -\#* -.\#* - -## VIM -*.swp - -## Rubinius -*.rbc -.rbx - -## PROJECT::GENERAL -*.gem -coverage -profiling -turbulence -rdoc -pkg -tmp -doc -log -.yardoc -measurements - -## BUNDLER -.bundle -Gemfile.lock - -## PROJECT::SPECIFIC diff --git a/.gems/gems/equalizer-0.0.9/.reek.yml b/.gems/gems/equalizer-0.0.9/.reek.yml deleted file mode 100644 index 7111519..0000000 --- a/.gems/gems/equalizer-0.0.9/.reek.yml +++ /dev/null @@ -1,106 +0,0 @@ ---- -Attribute: - enabled: true - exclude: [] -BooleanParameter: - enabled: true - exclude: [] -ClassVariable: - enabled: true - exclude: [] -ControlParameter: - enabled: true - exclude: [] -DataClump: - enabled: true - exclude: [] - max_copies: 2 - min_clump_size: 2 -DuplicateMethodCall: - enabled: true - exclude: [] - max_calls: 1 - allow_calls: [] -FeatureEnvy: - enabled: true - exclude: [] -IrresponsibleModule: - enabled: true - exclude: [] -LongParameterList: - enabled: true - exclude: [] - max_params: 2 - overrides: - initialize: - max_params: 3 -LongYieldList: - enabled: true - exclude: [] - max_params: 2 -NestedIterators: - enabled: true - exclude: - - Equalizer#define_cmp_method - - Equalizer#define_hash_method - - Equalizer#define_inspect_method - max_allowed_nesting: 1 - ignore_iterators: [] -NilCheck: - enabled: true - exclude: [] -RepeatedConditional: - enabled: true - exclude: [] - max_ifs: 1 -TooManyInstanceVariables: - enabled: true - exclude: [] - max_instance_variables: 3 -TooManyMethods: - enabled: true - exclude: [] - max_methods: 10 -TooManyStatements: - enabled: true - exclude: - - each - max_statements: 5 -UncommunicativeMethodName: - enabled: true - exclude: [] - reject: - - !ruby/regexp /^[a-z]$/ - - !ruby/regexp /[0-9]$/ - - !ruby/regexp /[A-Z]/ - accept: [] -UncommunicativeModuleName: - enabled: true - exclude: [] - reject: - - !ruby/regexp /^.$/ - - !ruby/regexp /[0-9]$/ - accept: [] -UncommunicativeParameterName: - enabled: true - exclude: [] - reject: - - !ruby/regexp /^.$/ - - !ruby/regexp /[0-9]$/ - - !ruby/regexp /[A-Z]/ - accept: [] -UncommunicativeVariableName: - enabled: true - exclude: [] - reject: - - !ruby/regexp /^.$/ - - !ruby/regexp /[0-9]$/ - - !ruby/regexp /[A-Z]/ - accept: [] -UnusedParameters: - enabled: true - exclude: [] -UtilityFunction: - enabled: true - exclude: [] - max_helper_calls: 0 diff --git a/.gems/gems/equalizer-0.0.9/.rspec b/.gems/gems/equalizer-0.0.9/.rspec deleted file mode 100644 index 5e712d3..0000000 --- a/.gems/gems/equalizer-0.0.9/.rspec +++ /dev/null @@ -1,5 +0,0 @@ ---color ---format progress ---profile ---warnings ---order random diff --git a/.gems/gems/equalizer-0.0.9/.rubocop.yml b/.gems/gems/equalizer-0.0.9/.rubocop.yml deleted file mode 100644 index 4935186..0000000 --- a/.gems/gems/equalizer-0.0.9/.rubocop.yml +++ /dev/null @@ -1,69 +0,0 @@ -AllCops: - Includes: - - '**/*.rake' - - 'Gemfile' - - 'Rakefile' - Excludes: - - 'vendor/**' - -# Avoid parameter lists longer than five parameters. -ParameterLists: - Max: 3 - CountKeywordArgs: true - -# Avoid more than `Max` levels of nesting. -BlockNesting: - Max: 3 - -# Align with the style guide. -CollectionMethods: - PreferredMethods: - collect: 'map' - inject: 'reduce' - find: 'detect' - find_all: 'select' - -# Do not force public/protected/private keyword to be indented at the same -# level as the def keyword. My personal preference is to outdent these keywords -# because I think when scanning code it makes it easier to identify the -# sections of code and visually separate them. When the keyword is at the same -# level I think it sort of blends in with the def keywords and makes it harder -# to scan the code and see where the sections are. -AccessModifierIndentation: - Enabled: false - -# Disable documentation checking until a class needs to be documented once -Documentation: - Enabled: false - -# Do not always use &&/|| instead of and/or. -AndOr: - Enabled: false - -# Do not favor modifier if/unless usage when you have a single-line body -IfUnlessModifier: - Enabled: false - -# Allow case equality operator (in limited use within the specs) -CaseEquality: - Enabled: false - -# Constants do not always have to use SCREAMING_SNAKE_CASE -ConstantName: - Enabled: false - -# Not all trivial readers/writers can be defined with attr_* methods -TrivialAccessors: - Enabled: false - -# Allow empty lines around body -EmptyLinesAroundBody: - Enabled: false - -# Enforce Ruby 1.8-compatible hash syntax -HashSyntax: - EnforcedStyle: hash_rockets - -# Allow dots at the end of lines -DotPosition: - Enabled: false diff --git a/.gems/gems/equalizer-0.0.9/.ruby-gemset b/.gems/gems/equalizer-0.0.9/.ruby-gemset deleted file mode 100644 index c013490..0000000 --- a/.gems/gems/equalizer-0.0.9/.ruby-gemset +++ /dev/null @@ -1 +0,0 @@ -equalizer diff --git a/.gems/gems/equalizer-0.0.9/.travis.yml b/.gems/gems/equalizer-0.0.9/.travis.yml deleted file mode 100644 index e7c6aef..0000000 --- a/.gems/gems/equalizer-0.0.9/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: ruby -cache: bundler -bundler_args: --without yard guard benchmarks -script: "bundle exec rake ci" -rvm: - - ree - - 1.8.7 - - 1.9.2 - - 1.9.3 - - 2.0.0 - - ruby-head - - rbx -matrix: - include: - - rvm: jruby-18mode - env: JRUBY_OPTS="$JRUBY_OPTS --debug" # for simplecov - - rvm: jruby-19mode - env: JRUBY_OPTS="$JRUBY_OPTS --debug" # for simplecov - - rvm: jruby-20mode - env: JRUBY_OPTS="$JRUBY_OPTS --debug" # for simplecov - - rvm: jruby-head - env: JRUBY_OPTS="$JRUBY_OPTS --debug" # for simplecov - fast_finish: true -notifications: - irc: - channels: - - irc.freenode.org#rom-rb - on_success: never - on_failure: change diff --git a/.gems/gems/equalizer-0.0.9/.yardstick.yml b/.gems/gems/equalizer-0.0.9/.yardstick.yml deleted file mode 100644 index a6b63e8..0000000 --- a/.gems/gems/equalizer-0.0.9/.yardstick.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -threshold: 100 diff --git a/.gems/gems/equalizer-0.0.9/CONTRIBUTING.md b/.gems/gems/equalizer-0.0.9/CONTRIBUTING.md deleted file mode 100644 index 333b403..0000000 --- a/.gems/gems/equalizer-0.0.9/CONTRIBUTING.md +++ /dev/null @@ -1,11 +0,0 @@ -Contributing ------------- - -* If you want your code merged into the mainline, please discuss the proposed changes with me before doing any work on it. This library is still in early development, and the direction it is going may not always be clear. Some features may not be appropriate yet, may need to be deferred until later when the foundation for them is laid, or may be more applicable in a plugin. -* Fork the project. -* Make your feature addition or bug fix. - * Follow this [style guide](https://github.com/dkubb/styleguide). -* Add specs for it. This is important so I don't break it in a future version unintentionally. Tests must cover all branches within the code, and code must be fully covered. -* Commit, do not mess with Rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull) -* Run "rake ci". This must pass and not show any regressions in the metrics for the code to be merged. -* Send me a pull request. Bonus points for topic branches. diff --git a/.gems/gems/equalizer-0.0.9/Gemfile b/.gems/gems/equalizer-0.0.9/Gemfile deleted file mode 100644 index 633eefc..0000000 --- a/.gems/gems/equalizer-0.0.9/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -# encoding: utf-8 - -source 'https://rubygems.org' - -gem 'rake' - -group :test do - gem 'backports' - gem 'coveralls', :require => false - gem 'json', :platforms => [:ruby_19] - gem 'reek' - gem 'rspec', '~> 2.14' - gem 'rubocop', :platforms => [:ruby_19, :ruby_20] - gem 'simplecov', :require => false - gem 'yardstick' -end - -platforms :jruby, :ruby_18 do - gem 'mime-types', '~> 1.25' -end - -platforms :rbx do - gem 'racc' - gem 'rubinius-coverage', '~> 2.0' - gem 'rubysl', '~> 2.0' -end - -gemspec diff --git a/.gems/gems/equalizer-0.0.9/LICENSE b/.gems/gems/equalizer-0.0.9/LICENSE deleted file mode 100644 index 18b962b..0000000 --- a/.gems/gems/equalizer-0.0.9/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2009-2013 Dan Kubb -Copyright (c) 2012 Markus Schirp (packaging) - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/.gems/gems/equalizer-0.0.9/README.md b/.gems/gems/equalizer-0.0.9/README.md deleted file mode 100644 index 056a7fe..0000000 --- a/.gems/gems/equalizer-0.0.9/README.md +++ /dev/null @@ -1,97 +0,0 @@ -equalizer -========= - -Module to define equality, equivalence and inspection methods - -[![Gem Version](https://badge.fury.io/rb/equalizer.png)][gem] -[![Build Status](https://secure.travis-ci.org/dkubb/equalizer.png?branch=master)][travis] -[![Dependency Status](https://gemnasium.com/dkubb/equalizer.png)][gemnasium] -[![Code Climate](https://codeclimate.com/github/dkubb/equalizer.png)][codeclimate] -[![Coverage Status](https://coveralls.io/repos/dkubb/equalizer/badge.png?branch=master)][coveralls] - -[gem]: https://rubygems.org/gems/equalizer -[travis]: https://travis-ci.org/dkubb/equalizer -[gemnasium]: https://gemnasium.com/dkubb/equalizer -[codeclimate]: https://codeclimate.com/github/dkubb/equalizer -[coveralls]: https://coveralls.io/r/dkubb/equalizer - -Examples --------- - -``` ruby -class GeoLocation - include Equalizer.new(:latitude, :longitude) - - attr_reader :latitude, :longitude - - def initialize(latitude, longitude) - @latitude, @longitude = latitude, longitude - end -end - -point_a = GeoLocation.new(1, 2) -point_b = GeoLocation.new(1, 2) -point_c = GeoLocation.new(2, 2) - -point_a.inspect # => "#" - -point_a == point_b # => true -point_a.hash == point_b.hash # => true -point_a.eql?(point_b) # => true -point_a.equal?(point_b) # => false - -point_a == point_c # => false -point_a.hash == point_c.hash # => false -point_a.eql?(point_c) # => false -point_a.equal?(point_c) # => false -``` - -Supported Ruby Versions ------------------------ - -This library aims to support and is [tested against][travis] the following Ruby -implementations: - -* Ruby 1.8.7 -* Ruby 1.9.2 -* Ruby 1.9.3 -* Ruby 2.0.0 -* [JRuby][] -* [Rubinius][] -* [Ruby Enterprise Edition][ree] - -[jruby]: http://jruby.org/ -[rubinius]: http://rubini.us/ -[ree]: http://www.rubyenterpriseedition.com/ - -If something doesn't work on one of these versions, it's a bug. - -This library may inadvertently work (or seem to work) on other Ruby versions or -implementations, however support will only be provided for the implementations -listed above. - -If you would like this library to support another Ruby version or -implementation, you may volunteer to be a maintainer. Being a maintainer -entails making sure all tests run and pass on that implementation. When -something breaks on your implementation, you will be responsible for providing -patches in a timely fashion. If critical issues for a particular implementation -exist at the time of a major release, support for that Ruby version may be -dropped. - -Credits -------- - -* Dan Kubb ([dkubb](https://github.com/dkubb)) -* Piotr Solnica ([solnic](https://github.com/solnic)) -* Markus Schirp ([mbj](https://github.com/mbj)) -* Erik Michaels-Ober ([sferik](https://github.com/sferik)) - -Contributing -------------- - -See [CONTRIBUTING.md](CONTRIBUTING.md) for details. - -Copyright ---------- - -Copyright © 2009-2013 Dan Kubb. See LICENSE for details. diff --git a/.gems/gems/equalizer-0.0.9/Rakefile b/.gems/gems/equalizer-0.0.9/Rakefile deleted file mode 100644 index 2da2334..0000000 --- a/.gems/gems/equalizer-0.0.9/Rakefile +++ /dev/null @@ -1,39 +0,0 @@ -# encoding: utf-8 - -require 'bundler' -Bundler::GemHelper.install_tasks - -require 'rspec/core/rake_task' -RSpec::Core::RakeTask.new(:spec) - -task :test => :spec -task :default => :spec - -require 'reek/rake/task' -Reek::Rake::Task.new do |reek| - reek.reek_opts = '--quiet' - reek.fail_on_error = true - reek.config_files = '.reek.yml' -end - -begin - require 'rubocop/rake_task' - Rubocop::RakeTask.new -rescue LoadError - desc 'Run RuboCop' - task :rubocop do - $stderr.puts 'Rubocop is disabled' - end -end - -require 'yardstick/rake/measurement' -Yardstick::Rake::Measurement.new do |measurement| - measurement.output = 'measurement/report.txt' -end - -require 'yardstick/rake/verify' -Yardstick::Rake::Verify.new do |verify| - verify.threshold = 100 -end - -task :ci => [:spec, :rubocop, :reek, :verify_measurements] diff --git a/.gems/gems/equalizer-0.0.9/equalizer.gemspec b/.gems/gems/equalizer-0.0.9/equalizer.gemspec deleted file mode 100644 index 9f9933f..0000000 --- a/.gems/gems/equalizer-0.0.9/equalizer.gemspec +++ /dev/null @@ -1,21 +0,0 @@ -# encoding: utf-8 - -require File.expand_path('../lib/equalizer/version', __FILE__) - -Gem::Specification.new do |gem| - gem.name = 'equalizer' - gem.version = Equalizer::VERSION.dup - gem.authors = ['Dan Kubb', 'Markus Schirp'] - gem.email = %w[dan.kubb@gmail.com mbj@schirp-dso.com] - gem.description = 'Module to define equality, equivalence and inspection methods' - gem.summary = gem.description - gem.homepage = 'https://github.com/dkubb/equalizer' - gem.licenses = 'MIT' - - gem.require_paths = %w[lib] - gem.files = `git ls-files`.split("\n") - gem.test_files = `git ls-files -- spec/{unit,integration}`.split("\n") - gem.extra_rdoc_files = %w[LICENSE README.md CONTRIBUTING.md] - - gem.add_development_dependency('bundler', '~> 1.3', '>= 1.3.5') -end diff --git a/.gems/gems/equalizer-0.0.9/lib/equalizer.rb b/.gems/gems/equalizer-0.0.9/lib/equalizer.rb deleted file mode 100644 index 833901b..0000000 --- a/.gems/gems/equalizer-0.0.9/lib/equalizer.rb +++ /dev/null @@ -1,122 +0,0 @@ -# encoding: utf-8 - -# Define equality, equivalence and inspection methods -class Equalizer < Module - - # Initialize an Equalizer with the given keys - # - # Will use the keys with which it is initialized to define #cmp?, - # #hash, and #inspect - # - # @param [Array] keys - # - # @return [undefined] - # - # @api private - def initialize(*keys) - @keys = keys - define_methods - freeze - end - -private - - # Hook called when module is included - # - # @param [Module] descendant - # the module or class including Equalizer - # - # @return [self] - # - # @api private - def included(descendant) - super - descendant.module_eval { include Methods } - end - - # Define the equalizer methods based on #keys - # - # @return [undefined] - # - # @api private - def define_methods - define_cmp_method - define_hash_method - define_inspect_method - end - - # Define an #cmp? method based on the instance's values identified by #keys - # - # @return [undefined] - # - # @api private - def define_cmp_method - keys = @keys - define_method(:cmp?) do |comparator, other| - keys.all? { |key| send(key).send(comparator, other.send(key)) } - end - private :cmp? - end - - # Define a #hash method based on the instance's values identified by #keys - # - # @return [undefined] - # - # @api private - def define_hash_method - keys = @keys - define_method(:hash) do || - keys.map(&method(:send)).push(self.class).hash - end - end - - # Define an inspect method that reports the values of the instance's keys - # - # @return [undefined] - # - # @api private - def define_inspect_method - keys = @keys - define_method(:inspect) do || - klass = self.class - name = klass.name || klass.inspect - "#<#{name}#{keys.map { |key| " #{key}=#{send(key).inspect}" }.join}>" - end - end - - # The comparison methods - module Methods - - # Compare the object with other object for equality - # - # @example - # object.eql?(other) # => true or false - # - # @param [Object] other - # the other object to compare with - # - # @return [Boolean] - # - # @api public - def eql?(other) - instance_of?(other.class) && cmp?(__method__, other) - end - - # Compare the object with other object for equivalency - # - # @example - # object == other # => true or false - # - # @param [Object] other - # the other object to compare with - # - # @return [Boolean] - # - # @api public - def ==(other) - other = coerce(other) if respond_to?(:coerce, true) - other.kind_of?(self.class) && cmp?(__method__, other) - end - - end # module Methods -end # class Equalizer diff --git a/.gems/gems/equalizer-0.0.9/lib/equalizer/version.rb b/.gems/gems/equalizer-0.0.9/lib/equalizer/version.rb deleted file mode 100644 index 1451289..0000000 --- a/.gems/gems/equalizer-0.0.9/lib/equalizer/version.rb +++ /dev/null @@ -1,8 +0,0 @@ -# encoding: utf-8 - -class Equalizer < Module - - # Gem version - VERSION = '0.0.9'.freeze - -end # class Equalizer diff --git a/.gems/gems/equalizer-0.0.9/spec/spec_helper.rb b/.gems/gems/equalizer-0.0.9/spec/spec_helper.rb deleted file mode 100644 index 045a60b..0000000 --- a/.gems/gems/equalizer-0.0.9/spec/spec_helper.rb +++ /dev/null @@ -1,34 +0,0 @@ -# encoding: utf-8 - -if ENV['COVERAGE'] == 'true' - require 'simplecov' - require 'coveralls' - - SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ - SimpleCov::Formatter::HTMLFormatter, - Coveralls::SimpleCov::Formatter, - ] - - SimpleCov.start do - command_name 'spec:unit' - - add_filter 'config' - add_filter 'spec' - add_filter 'vendor' - - minimum_coverage 100 - end -end - -require 'equalizer' - -# TODO: FIXME! -# Cache correct freezer in ice_nine before -# rspec2 infects the world... -Equalizer.new - -RSpec.configure do |config| - config.expect_with :rspec do |expect_with| - expect_with.syntax = :expect - end -end diff --git a/.gems/gems/equalizer-0.0.9/spec/support/config_alias.rb b/.gems/gems/equalizer-0.0.9/spec/support/config_alias.rb deleted file mode 100644 index 9c3f42f..0000000 --- a/.gems/gems/equalizer-0.0.9/spec/support/config_alias.rb +++ /dev/null @@ -1,5 +0,0 @@ -# encoding: utf-8 - -require 'rbconfig' - -::Config = RbConfig unless defined?(::Config) diff --git a/.gems/gems/equalizer-0.0.9/spec/unit/equalizer/included_spec.rb b/.gems/gems/equalizer-0.0.9/spec/unit/equalizer/included_spec.rb deleted file mode 100644 index 229da6f..0000000 --- a/.gems/gems/equalizer-0.0.9/spec/unit/equalizer/included_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -# encoding: utf-8 - -require 'spec_helper' - -describe Equalizer, '#included' do - subject { descendant.instance_exec(object) { |mod| include mod } } - - let(:object) { described_class.new } - let(:descendant) { Class.new } - let(:superclass) { described_class.superclass } - - before do - # Prevent Module.included from being called through inheritance - described_class::Methods.stub(:included) - end - - around do |example| - # Restore included method after each example - superclass.class_eval do - alias_method :original_included, :included - example.call - undef_method :included - alias_method :included, :original_included - end - end - - it 'delegates to the superclass #included method' do - # This is the most succinct approach I could think of to test whether the - # superclass#included method is called. All of the built-in rspec helpers - # did not seem to work for this. - included = false - superclass.class_eval { define_method(:included) { |_| included = true } } - expect { subject }.to change { included }.from(false).to(true) - end - - it 'includes methods into the descendant' do - subject - expect(descendant.included_modules).to include(described_class::Methods) - end -end diff --git a/.gems/gems/equalizer-0.0.9/spec/unit/equalizer/methods/eql_predicate_spec.rb b/.gems/gems/equalizer-0.0.9/spec/unit/equalizer/methods/eql_predicate_spec.rb deleted file mode 100644 index 774eb5f..0000000 --- a/.gems/gems/equalizer-0.0.9/spec/unit/equalizer/methods/eql_predicate_spec.rb +++ /dev/null @@ -1,65 +0,0 @@ -# encoding: utf-8 - -require 'spec_helper' - -describe Equalizer::Methods, '#eql?' do - subject { object.eql?(other) } - - let(:object) { described_class.new(true) } - - let(:described_class) do - Class.new do - include Equalizer::Methods - - attr_reader :boolean - - def initialize(boolean) - @boolean = boolean - end - - def cmp?(comparator, other) - boolean.send(comparator, other.boolean) - end - end - end - - context 'with the same object' do - let(:other) { object } - - it { should be(true) } - - it 'is symmetric' do - should eql(other.eql?(object)) - end - end - - context 'with an equivalent object' do - let(:other) { object.dup } - - it { should be(true) } - - it 'is symmetric' do - should eql(other.eql?(object)) - end - end - - context 'with an equivalent object of a subclass' do - let(:other) { Class.new(described_class).new(true) } - - it { should be(false) } - - it 'is symmetric' do - should eql(other.eql?(object)) - end - end - - context 'with a different object' do - let(:other) { described_class.new(false) } - - it { should be(false) } - - it 'is symmetric' do - should eql(other.eql?(object)) - end - end -end diff --git a/.gems/gems/equalizer-0.0.9/spec/unit/equalizer/methods/equality_operator_spec.rb b/.gems/gems/equalizer-0.0.9/spec/unit/equalizer/methods/equality_operator_spec.rb deleted file mode 100644 index e08b90c..0000000 --- a/.gems/gems/equalizer-0.0.9/spec/unit/equalizer/methods/equality_operator_spec.rb +++ /dev/null @@ -1,108 +0,0 @@ -# encoding: utf-8 - -require 'spec_helper' - -describe Equalizer::Methods, '#==' do - subject { object == other } - - let(:object) { described_class.new(true) } - let(:described_class) { Class.new(super_class) } - - let(:super_class) do - Class.new do - include Equalizer::Methods - - attr_reader :boolean - - def initialize(boolean) - @boolean = boolean - end - - def cmp?(comparator, other) - boolean.send(comparator, other.boolean) - end - end - end - - context 'with the same object' do - let(:other) { object } - - it { should be(true) } - - it 'is symmetric' do - should eql(other == object) - end - end - - context 'with an equivalent object' do - let(:other) { object.dup } - - it { should be(true) } - - it 'is symmetric' do - should eql(other == object) - end - end - - context 'with a subclass instance having equivalent obervable state' do - let(:other) { Class.new(described_class).new(true) } - - it { should be(true) } - - it 'is not symmetric' do - # the subclass instance should maintain substitutability with the object - # (in the LSP sense) the reverse is not true. - should_not eql(other == object) - end - end - - context 'with a superclass instance having equivalent observable state' do - let(:other) { super_class.new(true) } - - it { should be(false) } - - it 'is not symmetric' do - should_not eql(other == object) - end - end - - context 'with an object of another class' do - let(:other) { Class.new.new } - - it { should be(false) } - - it 'is symmetric' do - should eql(other == object) - end - end - - context 'with an equivalent object after coercion' do - let(:other) { Object.new } - - before do - # declare a private #coerce method - described_class.class_eval do - def coerce(other) - self.class.new(!!other) - end - private :coerce - end - end - - it { should be(true) } - - it 'is not symmetric' do - should_not eql(other == object) - end - end - - context 'with a different object' do - let(:other) { described_class.new(false) } - - it { should be(false) } - - it 'is symmetric' do - should eql(other == object) - end - end -end diff --git a/.gems/gems/equalizer-0.0.9/spec/unit/equalizer/universal_spec.rb b/.gems/gems/equalizer-0.0.9/spec/unit/equalizer/universal_spec.rb deleted file mode 100644 index 0549e04..0000000 --- a/.gems/gems/equalizer-0.0.9/spec/unit/equalizer/universal_spec.rb +++ /dev/null @@ -1,159 +0,0 @@ -# encoding: utf-8 - -require 'spec_helper' - -describe Equalizer, '.new' do - - let(:object) { described_class } - let(:name) { 'User' } - let(:klass) { ::Class.new } - - context 'with no keys' do - subject { object.new } - - before do - # specify the class #name method - klass.stub(:name).and_return(name) - klass.send(:include, subject) - end - - let(:instance) { klass.new } - - it { should be_instance_of(object) } - - it { should be_frozen } - - it 'defines #hash and #inspect methods dynamically' do - expect(subject.public_instance_methods(false).map(&:to_s).sort). - to eql(%w[hash inspect]) - end - - describe '#eql?' do - context 'when the objects are similar' do - let(:other) { instance.dup } - - it { expect(instance.eql?(other)).to be(true) } - end - - context 'when the objects are different' do - let(:other) { double('other') } - - it { expect(instance.eql?(other)).to be(false) } - end - end - - describe '#==' do - context 'when the objects are similar' do - let(:other) { instance.dup } - - it { expect(instance == other).to be(true) } - end - - context 'when the objects are different' do - let(:other) { double('other') } - - it { expect(instance == other).to be(false) } - end - end - - describe '#hash' do - it 'has the expected arity' do - expect(klass.instance_method(:hash).arity).to be(0) - end - - it { expect(instance.hash).to eql([klass].hash) } - end - - describe '#inspect' do - it 'has the expected arity' do - expect(klass.instance_method(:inspect).arity).to be(0) - end - - it { expect(instance.inspect).to eql('#') } - end - end - - context 'with keys' do - subject { object.new(*keys) } - - let(:keys) { [:firstname, :lastname].freeze } - let(:firstname) { 'John' } - let(:lastname) { 'Doe' } - let(:instance) { klass.new(firstname, lastname) } - - let(:klass) do - ::Class.new do - attr_reader :firstname, :lastname - private :firstname, :lastname - - def initialize(firstname, lastname) - @firstname, @lastname = firstname, lastname - end - end - end - - before do - # specify the class #inspect method - klass.stub(:name).and_return(nil) - klass.stub(:inspect).and_return(name) - klass.send(:include, subject) - end - - it { should be_instance_of(object) } - - it { should be_frozen } - - it 'defines #hash and #inspect methods dynamically' do - expect(subject.public_instance_methods(false).map(&:to_s).sort). - to eql(%w[ hash inspect ]) - end - - describe '#eql?' do - context 'when the objects are similar' do - let(:other) { instance.dup } - - it { expect(instance.eql?(other)).to be(true) } - end - - context 'when the objects are different' do - let(:other) { double('other') } - - it { expect(instance.eql?(other)).to be(false) } - end - end - - describe '#==' do - context 'when the objects are similar' do - let(:other) { instance.dup } - - it { expect(instance == other).to be(true) } - end - - context 'when the objects are different type' do - let(:other) { klass.new('Foo', 'Bar') } - - it { expect(instance == other).to be(false) } - end - - context 'when the objects are from different type' do - let(:other) { double('other') } - - it { expect(instance == other).to be(false) } - end - end - - describe '#hash' do - it 'returns the expected hash' do - expect(instance.hash). - to eql([firstname, lastname, klass].hash) - end - end - - describe '#inspect' do - it 'returns the expected string' do - expect(instance.inspect). - to eql('#') - end - end - end -end diff --git a/.gems/gems/faraday-0.9.0/.document b/.gems/gems/faraday-0.9.0/.document deleted file mode 100644 index 1fd4b83..0000000 --- a/.gems/gems/faraday-0.9.0/.document +++ /dev/null @@ -1,6 +0,0 @@ -CONTRIBUTING.md -LICENSE.md -README.md -bin/* -lib/**/*.rb -test/**/*.rb diff --git a/.gems/gems/faraday-0.9.0/CHANGELOG.md b/.gems/gems/faraday-0.9.0/CHANGELOG.md deleted file mode 100644 index 650ba1d..0000000 --- a/.gems/gems/faraday-0.9.0/CHANGELOG.md +++ /dev/null @@ -1,15 +0,0 @@ -# Faraday Changelog - -## v0.9.0 - -* Add HTTPClient adapter (@hakanensari) -* Improve Retry handler (@mislav) -* Remove autoloading by default (@technoweenie) -* Improve internal docs (@technoweenie, @mislav) -* Respect user/password in http proxy string (@mislav) -* Adapter options are structs. Reinforces consistent options across adapters - (@technoweenie) -* Stop stripping trailing / off base URLs in a Faraday::Connection. (@technoweenie) -* Add a configurable URI parser. (@technoweenie) -* Remove need to manually autoload when using the authorization header helpers on `Faraday::Connection`. (@technoweenie) -* `Faraday::Adapter::Test` respects the `Faraday::RequestOptions#params_encoder` option. (@technoweenie) diff --git a/.gems/gems/faraday-0.9.0/CONTRIBUTING.md b/.gems/gems/faraday-0.9.0/CONTRIBUTING.md deleted file mode 100644 index 63bdf29..0000000 --- a/.gems/gems/faraday-0.9.0/CONTRIBUTING.md +++ /dev/null @@ -1,36 +0,0 @@ -## Contributing - -You can run the test suite against a live server by running `script/test`. It -automatically starts a test server in background. Only tests in -`test/adapters/*_test.rb` require a server, though. - -``` sh -# run the whole suite -$ script/test - -# run only specific files -$ script/test excon typhoeus - -# run tests using SSL -$ SSL=yes script/test -``` - -We will accept middleware that: - -1. is useful to a broader audience, but can be implemented relatively - simple; and -2. which isn't already present in [faraday_middleware][] project. - -We will accept adapters that: - -1. support SSL & streaming; -1. are proven and may have better performance than existing ones; or -2. if they have features not present in included adapters. - -We are pushing towards a 1.0 release, when we will have to follow [Semantic -Versioning][semver]. If your patch includes changes to break compatiblitity, -note that so we can add it to the [Changelog][]. - -[semver]: http://semver.org/ -[changelog]: https://github.com/technoweenie/faraday/wiki/Changelog -[faraday_middleware]: https://github.com/pengwynn/faraday_middleware/wiki diff --git a/.gems/gems/faraday-0.9.0/Gemfile b/.gems/gems/faraday-0.9.0/Gemfile deleted file mode 100644 index 8824eb6..0000000 --- a/.gems/gems/faraday-0.9.0/Gemfile +++ /dev/null @@ -1,29 +0,0 @@ -source 'https://rubygems.org' - -gem 'ffi-ncurses', '~> 0.3', :platforms => :jruby -gem 'jruby-openssl', '~> 0.8.8', :platforms => :jruby -gem 'rake' - -group :test do - gem 'coveralls', :require => false - gem 'em-http-request', '>= 1.1', :require => 'em-http' - gem 'em-synchrony', '>= 1.0.3', :require => ['em-synchrony', 'em-synchrony/em-http'] - gem 'excon', '>= 0.27.4' - gem 'httpclient', '>= 2.2' - gem 'leftright', '>= 0.9', :require => false - gem 'mime-types', '~> 1.25', :platforms => [:jruby, :ruby_18] - gem 'minitest', '>= 5.0.5' - gem 'net-http-persistent', '>= 2.5', :require => false - gem 'patron', '>= 0.4.2', :platforms => :ruby - gem 'rack-test', '>= 0.6', :require => 'rack/test' - gem 'simplecov' - gem 'sinatra', '~> 1.3' - gem 'typhoeus', '~> 0.3.3', :platforms => :ruby -end - -platforms :rbx do - gem 'rubinius-coverage' - gem 'rubysl' -end - -gemspec diff --git a/.gems/gems/faraday-0.9.0/LICENSE.md b/.gems/gems/faraday-0.9.0/LICENSE.md deleted file mode 100644 index 98dc016..0000000 --- a/.gems/gems/faraday-0.9.0/LICENSE.md +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2009-2013 Rick Olson, Zack Hobson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/.gems/gems/faraday-0.9.0/README.md b/.gems/gems/faraday-0.9.0/README.md deleted file mode 100644 index e59d09d..0000000 --- a/.gems/gems/faraday-0.9.0/README.md +++ /dev/null @@ -1,216 +0,0 @@ -# Faraday - -Faraday is an HTTP client lib that provides a common interface over many -adapters (such as Net::HTTP) and embraces the concept of Rack middleware when -processing the request/response cycle. - -Faraday supports these adapters: - -* Net::HTTP -* [Excon][] -* [Typhoeus][] -* [Patron][] -* [EventMachine][] - -It also includes a Rack adapter for hitting loaded Rack applications through -Rack::Test, and a Test adapter for stubbing requests by hand. - -## Usage - -```ruby -conn = Faraday.new(:url => 'http://sushi.com') do |faraday| - faraday.request :url_encoded # form-encode POST params - faraday.response :logger # log requests to STDOUT - faraday.adapter Faraday.default_adapter # make requests with Net::HTTP -end - -## GET ## - -response = conn.get '/nigiri/sake.json' # GET http://sushi.com/nigiri/sake.json -response.body - -conn.get '/nigiri', { :name => 'Maguro' } # GET /nigiri?name=Maguro - -conn.get do |req| # GET http://sushi.com/search?page=2&limit=100 - req.url '/search', :page => 2 - req.params['limit'] = 100 -end - -## POST ## - -conn.post '/nigiri', { :name => 'Maguro' } # POST "name=maguro" to http://sushi.com/nigiri - -# post payload as JSON instead of "www-form-urlencoded" encoding: -conn.post do |req| - req.url '/nigiri' - req.headers['Content-Type'] = 'application/json' - req.body = '{ "name": "Unagi" }' -end - -## Per-request options ## - -conn.get do |req| - req.url '/search' - req.options.timeout = 5 # open/read timeout in seconds - req.options.open_timeout = 2 # connection open timeout in seconds -end -``` - -If you don't need to set up anything, you can roll with just the bare minimum: - -```ruby -# using the default stack: -response = Faraday.get 'http://sushi.com/nigiri/sake.json' -``` - -## Advanced middleware usage - -The order in which middleware is stacked is important. Like with Rack, the -first middleware on the list wraps all others, while the last middleware is the -innermost one, so that must be the adapter. - -```ruby -Faraday.new(...) do |conn| - # POST/PUT params encoders: - conn.request :multipart - conn.request :url_encoded - - conn.adapter :net_http -end -``` - -This request middleware setup affects POST/PUT requests in the following way: - -1. `Request::Multipart` checks for files in the payload, otherwise leaves - everything untouched; -2. `Request::UrlEncoded` encodes as "application/x-www-form-urlencoded" if not - already encoded or of another type - -Swapping middleware means giving the other priority. Specifying the -"Content-Type" for the request is explicitly stating which middleware should -process it. - -Examples: - -```ruby -# uploading a file: -payload[:profile_pic] = Faraday::UploadIO.new('/path/to/avatar.jpg', 'image/jpeg') - -# "Multipart" middleware detects files and encodes with "multipart/form-data": -conn.put '/profile', payload -``` - -## Writing middleware - -Middleware are classes that implement a `call` instance method. They hook into -the request/response cycle. - -```ruby -def call(env) - # do something with the request - - @app.call(env).on_complete do - # do something with the response - end -end -``` - -It's important to do all processing of the response only in the `on_complete` -block. This enables middleware to work in parallel mode where requests are -asynchronous. - -The `env` is a hash with symbol keys that contains info about the request and, -later, response. Some keys are: - -``` -# request phase -:method - :get, :post, ... -:url - URI for the current request; also contains GET parameters -:body - POST parameters for :post/:put requests -:request_headers - -# response phase -:status - HTTP response status code, such as 200 -:body - the response body -:response_headers -``` - -## Using Faraday for testing - -```ruby -# It's possible to define stubbed request outside a test adapter block. -stubs = Faraday::Adapter::Test::Stubs.new do |stub| - stub.get('/tamago') { [200, {}, 'egg'] } -end - -# You can pass stubbed request to the test adapter or define them in a block -# or a combination of the two. -test = Faraday.new do |builder| - builder.adapter :test, stubs do |stub| - stub.get('/ebi') {[ 200, {}, 'shrimp' ]} - end -end - -# It's also possible to stub additional requests after the connection has -# been initialized. This is useful for testing. -stubs.get('/uni') {[ 200, {}, 'urchin' ]} - -resp = test.get '/tamago' -resp.body # => 'egg' -resp = test.get '/ebi' -resp.body # => 'shrimp' -resp = test.get '/uni' -resp.body # => 'urchin' -resp = test.get '/else' #=> raises "no such stub" error - -# If you like, you can treat your stubs as mocks by verifying that all of -# the stubbed calls were made. NOTE that this feature is still fairly -# experimental: It will not verify the order or count of any stub, only that -# it was called once during the course of the test. -stubs.verify_stubbed_calls -``` - -## TODO - -* support streaming requests/responses -* better stubbing API - -## Supported Ruby versions - -This library aims to support and is [tested against][travis] the following Ruby -implementations: - -* MRI 1.8.7 -* MRI 1.9.2 -* MRI 1.9.3 -* MRI 2.0.0 -* MRI 2.1.0 -* [JRuby][] -* [Rubinius][] - -If something doesn't work on one of these Ruby versions, it's a bug. - -This library may inadvertently work (or seem to work) on other Ruby -implementations, however support will only be provided for the versions listed -above. - -If you would like this library to support another Ruby version, you may -volunteer to be a maintainer. Being a maintainer entails making sure all tests -run and pass on that implementation. When something breaks on your -implementation, you will be responsible for providing patches in a timely -fashion. If critical issues for a particular implementation exist at the time -of a major release, support for that Ruby version may be dropped. - -## Copyright - -Copyright (c) 2009-2013 [Rick Olson](mailto:technoweenie@gmail.com), Zack Hobson. -See [LICENSE][] for details. - -[travis]: http://travis-ci.org/lostisland/faraday -[excon]: https://github.com/geemus/excon#readme -[typhoeus]: https://github.com/typhoeus/typhoeus#readme -[patron]: http://toland.github.com/patron/ -[eventmachine]: https://github.com/igrigorik/em-http-request#readme -[jruby]: http://jruby.org/ -[rubinius]: http://rubini.us/ -[license]: LICENSE.md diff --git a/.gems/gems/faraday-0.9.0/Rakefile b/.gems/gems/faraday-0.9.0/Rakefile deleted file mode 100644 index bcd8c01..0000000 --- a/.gems/gems/faraday-0.9.0/Rakefile +++ /dev/null @@ -1,71 +0,0 @@ -require 'date' -require 'fileutils' -require 'openssl' -require 'rake/testtask' -require 'bundler' -Bundler::GemHelper.install_tasks - -task :default => :test - -## helper functions - -def name - @name ||= Dir['*.gemspec'].first.split('.').first -end - -def version - line = File.read("lib/#{name}.rb")[/^\s*VERSION\s*=\s*.*/] - line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1] -end - -def gemspec_file - "#{name}.gemspec" -end - -def gem_file - "#{name}-#{version}.gem" -end - -def replace_header(head, header_name) - head.sub!(/(\.#{header_name}\s*= ').*'/) { "#{$1}#{send(header_name)}'"} -end - -# Adapted from WEBrick::Utils. Skips cert extensions so it -# can be used as a CA bundle -def create_self_signed_cert(bits, cn, comment) - rsa = OpenSSL::PKey::RSA.new(bits) - cert = OpenSSL::X509::Certificate.new - cert.version = 2 - cert.serial = 1 - name = OpenSSL::X509::Name.new(cn) - cert.subject = name - cert.issuer = name - cert.not_before = Time.now - cert.not_after = Time.now + (365*24*60*60) - cert.public_key = rsa.public_key - cert.sign(rsa, OpenSSL::Digest::SHA1.new) - return [cert, rsa] -end - -## standard tasks - -desc "Run all tests" -task :test do - exec 'script/test' -end - -desc "Generate certificates for SSL tests" -task :'test:generate_certs' do - cert, key = create_self_signed_cert(1024, [['CN', 'localhost']], 'Faraday Test CA') - FileUtils.mkdir_p 'tmp' - File.open('tmp/faraday-cert.key', 'w') {|f| f.puts(key) } - File.open('tmp/faraday-cert.crt', 'w') {|f| f.puts(cert.to_s) } -end - -file 'tmp/faraday-cert.key' => :'test:generate_certs' -file 'tmp/faraday-cert.crt' => :'test:generate_certs' - -desc "Open an irb session preloaded with this library" -task :console do - sh "irb -rubygems -r ./lib/#{name}.rb" -end diff --git a/.gems/gems/faraday-0.9.0/faraday.gemspec b/.gems/gems/faraday-0.9.0/faraday.gemspec deleted file mode 100644 index 3ee9cae..0000000 --- a/.gems/gems/faraday-0.9.0/faraday.gemspec +++ /dev/null @@ -1,34 +0,0 @@ -lib = "faraday" -lib_file = File.expand_path("../lib/#{lib}.rb", __FILE__) -File.read(lib_file) =~ /\bVERSION\s*=\s*["'](.+?)["']/ -version = $1 - -Gem::Specification.new do |spec| - spec.specification_version = 2 if spec.respond_to? :specification_version= - spec.required_rubygems_version = '>= 1.3.5' - - spec.name = lib - spec.version = version - - spec.summary = "HTTP/REST API client library." - - spec.authors = ["Rick Olson"] - spec.email = 'technoweenie@gmail.com' - spec.homepage = 'https://github.com/lostisland/faraday' - spec.licenses = ['MIT'] - - spec.add_dependency 'multipart-post', '>= 1.2', '< 3' - spec.add_development_dependency 'bundler', '~> 1.0' - - spec.files = %w(.document CHANGELOG.md CONTRIBUTING.md Gemfile LICENSE.md README.md Rakefile) - spec.files << "#{lib}.gemspec" - spec.files += Dir.glob("lib/**/*.rb") - spec.files += Dir.glob("test/**/*.{rb,txt}") - spec.files += Dir.glob("script/*") - - dev_null = File.exist?('/dev/null') ? '/dev/null' : 'NUL' - git_files = `git ls-files -z 2>#{dev_null}` - spec.files &= git_files.split("\0") if $?.success? - - spec.test_files = Dir.glob("test/**/*.rb") -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday.rb b/.gems/gems/faraday-0.9.0/lib/faraday.rb deleted file mode 100644 index 4b63ec8..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday.rb +++ /dev/null @@ -1,268 +0,0 @@ -require 'thread' -require 'cgi' -require 'set' -require 'forwardable' - -# Public: This is the main namespace for Faraday. You can either use it to -# create Faraday::Connection objects, or access it directly. -# -# Examples -# -# Faraday.get "http://faraday.com" -# -# conn = Faraday.new "http://faraday.com" -# conn.get '/' -# -module Faraday - VERSION = "0.9.0" - - class << self - # Public: Gets or sets the root path that Faraday is being loaded from. - # This is the root from where the libraries are auto-loaded from. - attr_accessor :root_path - - # Public: Gets or sets the path that the Faraday libs are loaded from. - attr_accessor :lib_path - - # Public: Gets or sets the Symbol key identifying a default Adapter to use - # for the default Faraday::Connection. - attr_reader :default_adapter - - # Public: Sets the default Faraday::Connection for simple scripts that - # access the Faraday constant directly. - # - # Faraday.get "https://faraday.com" - attr_writer :default_connection - - # Public: Sets the default options used when calling Faraday#new. - attr_writer :default_connection_options - - # Public: Initializes a new Faraday::Connection. - # - # url - The optional String base URL to use as a prefix for all - # requests. Can also be the options Hash. - # options - The optional Hash used to configure this Faraday::Connection. - # Any of these values will be set on every request made, unless - # overridden for a specific request. - # :url - String base URL. - # :params - Hash of URI query unencoded key/value pairs. - # :headers - Hash of unencoded HTTP header key/value pairs. - # :request - Hash of request options. - # :ssl - Hash of SSL options. - # :proxy - Hash of Proxy options. - # - # Examples - # - # Faraday.new 'http://faraday.com' - # - # # http://faraday.com?page=1 - # Faraday.new 'http://faraday.com', :params => {:page => 1} - # - # # same - # - # Faraday.new :url => 'http://faraday.com', - # :params => {:page => 1} - # - # Returns a Faraday::Connection. - def new(url = nil, options = nil) - block = block_given? ? Proc.new : nil - options = options ? default_connection_options.merge(options) : default_connection_options.dup - Faraday::Connection.new(url, options, &block) - end - - # Internal: Requires internal Faraday libraries. - # - # *libs - One or more relative String names to Faraday classes. - # - # Returns nothing. - def require_libs(*libs) - libs.each do |lib| - require "#{lib_path}/#{lib}" - end - end - - # Public: Updates default adapter while resetting - # #default_connection. - # - # Returns the new default_adapter. - def default_adapter=(adapter) - @default_connection = nil - @default_adapter = adapter - end - - alias require_lib require_libs - - private - # Internal: Proxies method calls on the Faraday constant to - # #default_connection. - def method_missing(name, *args, &block) - default_connection.send(name, *args, &block) - end - end - - self.root_path = File.expand_path "..", __FILE__ - self.lib_path = File.expand_path "../faraday", __FILE__ - self.default_adapter = :net_http - - # Gets the default connection used for simple scripts. - # - # Returns a Faraday::Connection, configured with the #default_adapter. - def self.default_connection - @default_connection ||= Connection.new - end - - # Gets the default connection options used when calling Faraday#new. - # - # Returns a Faraday::ConnectionOptions. - def self.default_connection_options - @default_connection_options ||= ConnectionOptions.new - end - - if (!defined?(RUBY_ENGINE) || "ruby" == RUBY_ENGINE) && RUBY_VERSION < '1.9' - begin - require 'system_timer' - Timer = SystemTimer - rescue LoadError - warn "Faraday: you may want to install system_timer for reliable timeouts" - end - end - - unless const_defined? :Timer - require 'timeout' - Timer = Timeout - end - - # Public: Adds the ability for other modules to register and lookup - # middleware classes. - module MiddlewareRegistry - # Public: Register middleware class(es) on the current module. - # - # mapping - A Hash mapping Symbol keys to classes. Classes can be expressed - # as fully qualified constant, or a Proc that will be lazily - # called to return the former. - # - # Examples - # - # module Faraday - # class Whatever - # # Middleware looked up by :foo returns Faraday::Whatever::Foo. - # register_middleware :foo => Foo - # - # # Middleware looked up by :bar returns Faraday::Whatever.const_get(:Bar) - # register_middleware :bar => :Bar - # - # # Middleware looked up by :baz requires 'baz' and returns Faraday::Whatever.const_get(:Baz) - # register_middleware :baz => [:Baz, 'baz'] - # end - # end - # - # Returns nothing. - def register_middleware(autoload_path = nil, mapping = nil) - if mapping.nil? - mapping = autoload_path - autoload_path = nil - end - middleware_mutex do - @middleware_autoload_path = autoload_path if autoload_path - (@registered_middleware ||= {}).update(mapping) - end - end - - # Public: Lookup middleware class with a registered Symbol shortcut. - # - # key - The Symbol key for the registered middleware. - # - # Examples - # - # module Faraday - # class Whatever - # register_middleware :foo => Foo - # end - # end - # - # Faraday::Whatever.lookup_middleware(:foo) - # # => Faraday::Whatever::Foo - # - # Returns a middleware Class. - def lookup_middleware(key) - load_middleware(key) || - raise(Faraday::Error.new("#{key.inspect} is not registered on #{self}")) - end - - def middleware_mutex(&block) - @middleware_mutex ||= begin - require 'monitor' - Monitor.new - end - @middleware_mutex.synchronize(&block) - end - - def fetch_middleware(key) - defined?(@registered_middleware) && @registered_middleware[key] - end - - def load_middleware(key) - value = fetch_middleware(key) - case value - when Module - value - when Symbol, String - middleware_mutex do - @registered_middleware[key] = const_get(value) - end - when Proc - middleware_mutex do - @registered_middleware[key] = value.call - end - when Array - middleware_mutex do - const, path = value - if root = @middleware_autoload_path - path = "#{root}/#{path}" - end - require(path) - @registered_middleware[key] = const - end - load_middleware(key) - end - end - end - - def self.const_missing(name) - if name.to_sym == :Builder - warn "Faraday::Builder is now Faraday::RackBuilder." - const_set name, RackBuilder - else - super - end - end - - require_libs "utils", "options", "connection", "rack_builder", "parameters", - "middleware", "adapter", "request", "response", "upload_io", "error" - - if !ENV["FARADAY_NO_AUTOLOAD"] - require_lib 'autoload' - end -end - -# not pulling in active-support JUST for this method. And I love this method. -class Object - # The primary purpose of this method is to "tap into" a method chain, - # in order to perform operations on intermediate results within the chain. - # - # Examples - # - # (1..10).tap { |x| puts "original: #{x.inspect}" }.to_a. - # tap { |x| puts "array: #{x.inspect}" }. - # select { |x| x%2 == 0 }. - # tap { |x| puts "evens: #{x.inspect}" }. - # map { |x| x*x }. - # tap { |x| puts "squares: #{x.inspect}" } - # - # Yields self. - # Returns self. - def tap - yield(self) - self - end unless Object.respond_to?(:tap) -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/adapter.rb b/.gems/gems/faraday-0.9.0/lib/faraday/adapter.rb deleted file mode 100644 index f018b50..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/adapter.rb +++ /dev/null @@ -1,46 +0,0 @@ -module Faraday - # Public: This is a base class for all Faraday adapters. Adapters are - # responsible for fulfilling a Faraday request. - class Adapter < Middleware - CONTENT_LENGTH = 'Content-Length'.freeze - - register_middleware File.expand_path('../adapter', __FILE__), - :test => [:Test, 'test'], - :net_http => [:NetHttp, 'net_http'], - :net_http_persistent => [:NetHttpPersistent, 'net_http_persistent'], - :typhoeus => [:Typhoeus, 'typhoeus'], - :patron => [:Patron, 'patron'], - :em_synchrony => [:EMSynchrony, 'em_synchrony'], - :em_http => [:EMHttp, 'em_http'], - :excon => [:Excon, 'excon'], - :rack => [:Rack, 'rack'], - :httpclient => [:HTTPClient, 'httpclient'] - - # Public: This module marks an Adapter as supporting parallel requests. - module Parallelism - attr_writer :supports_parallel - def supports_parallel?() @supports_parallel end - - def inherited(subclass) - super - subclass.supports_parallel = self.supports_parallel? - end - end - - extend Parallelism - self.supports_parallel = false - - def call(env) - env.clear_body if env.needs_body? - end - - def save_response(env, status, body, headers = nil) - env.status = status - env.body = body - env.response_headers = Utils::Headers.new.tap do |response_headers| - response_headers.update headers unless headers.nil? - yield(response_headers) if block_given? - end - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/em_http.rb b/.gems/gems/faraday-0.9.0/lib/faraday/adapter/em_http.rb deleted file mode 100644 index a248fcf..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/em_http.rb +++ /dev/null @@ -1,237 +0,0 @@ -module Faraday - class Adapter - # EventMachine adapter is useful for either asynchronous requests - # when in EM reactor loop or for making parallel requests in - # synchronous code. - class EMHttp < Faraday::Adapter - module Options - def connection_config(env) - options = {} - configure_proxy(options, env) - configure_timeout(options, env) - configure_socket(options, env) - configure_ssl(options, env) - options - end - - def request_config(env) - options = { - :body => read_body(env), - :head => env[:request_headers], - # :keepalive => true, - # :file => 'path/to/file', # stream data off disk - } - configure_compression(options, env) - options - end - - def read_body(env) - body = env[:body] - body.respond_to?(:read) ? body.read : body - end - - def configure_proxy(options, env) - if proxy = request_options(env)[:proxy] - options[:proxy] = { - :host => proxy[:uri].host, - :port => proxy[:uri].port, - :authorization => [proxy[:user], proxy[:password]] - } - end - end - - def configure_socket(options, env) - if bind = request_options(env)[:bind] - options[:bind] = { - :host => bind[:host], - :port => bind[:port] - } - end - end - - def configure_ssl(options, env) - if env[:url].scheme == 'https' && env[:ssl] - options[:ssl] = { - :cert_chain_file => env[:ssl][:ca_file], - :verify_peer => env[:ssl].fetch(:verify, true) - } - end - end - - def configure_timeout(options, env) - timeout, open_timeout = request_options(env).values_at(:timeout, :open_timeout) - options[:connect_timeout] = options[:inactivity_timeout] = timeout - options[:connect_timeout] = open_timeout if open_timeout - end - - def configure_compression(options, env) - if env[:method] == :get and not options[:head].key? 'accept-encoding' - options[:head]['accept-encoding'] = 'gzip, compressed' - end - end - - def request_options(env) - env[:request] - end - end - - include Options - - dependency 'em-http' - - self.supports_parallel = true - - def self.setup_parallel_manager(options = nil) - Manager.new - end - - def call(env) - super - perform_request env - @app.call env - end - - def perform_request(env) - if parallel?(env) - manager = env[:parallel_manager] - manager.add { - perform_single_request(env). - callback { env[:response].finish(env) } - } - else - unless EventMachine.reactor_running? - error = nil - # start EM, block until request is completed - EventMachine.run do - perform_single_request(env). - callback { EventMachine.stop }. - errback { |client| - error = error_message(client) - EventMachine.stop - } - end - raise_error(error) if error - else - # EM is running: instruct upstream that this is an async request - env[:parallel_manager] = true - perform_single_request(env). - callback { env[:response].finish(env) }. - errback { - # TODO: no way to communicate the error in async mode - raise NotImplementedError - } - end - end - rescue EventMachine::Connectify::CONNECTError => err - if err.message.include?("Proxy Authentication Required") - raise Error::ConnectionFailed, %{407 "Proxy Authentication Required "} - else - raise Error::ConnectionFailed, err - end - rescue => err - if defined?(OpenSSL) && OpenSSL::SSL::SSLError === err - raise Faraday::SSLError, err - else - raise - end - end - - # TODO: reuse the connection to support pipelining - def perform_single_request(env) - req = EventMachine::HttpRequest.new(env[:url], connection_config(env)) - req.setup_request(env[:method], request_config(env)).callback { |client| - save_response(env, client.response_header.status, client.response) do |resp_headers| - client.response_header.each do |name, value| - resp_headers[name.to_sym] = value - end - end - } - end - - def error_message(client) - client.error or "request failed" - end - - def raise_error(msg) - errklass = Faraday::Error::ClientError - if msg == Errno::ETIMEDOUT - errklass = Faraday::Error::TimeoutError - msg = "request timed out" - elsif msg == Errno::ECONNREFUSED - errklass = Faraday::Error::ConnectionFailed - msg = "connection refused" - elsif msg == "connection closed by server" - errklass = Faraday::Error::ConnectionFailed - end - raise errklass, msg - end - - def parallel?(env) - !!env[:parallel_manager] - end - - # The parallel manager is designed to start an EventMachine loop - # and block until all registered requests have been completed. - class Manager - def initialize - reset - end - - def reset - @registered_procs = [] - @num_registered = 0 - @num_succeeded = 0 - @errors = [] - @running = false - end - - def running?() @running end - - def add - if running? - perform_request { yield } - else - @registered_procs << Proc.new - end - @num_registered += 1 - end - - def run - if @num_registered > 0 - @running = true - EventMachine.run do - @registered_procs.each do |proc| - perform_request(&proc) - end - end - if @errors.size > 0 - raise Faraday::Error::ClientError, @errors.first || "connection failed" - end - end - ensure - reset - end - - def perform_request - client = yield - client.callback { @num_succeeded += 1; check_finished } - client.errback { @errors << client.error; check_finished } - end - - def check_finished - if @num_succeeded + @errors.size == @num_registered - EventMachine.stop - end - end - end - end - end -end - -begin - require 'openssl' -rescue LoadError - warn "Warning: no such file to load -- openssl. Make sure it is installed if you want HTTPS support" -else - require 'faraday/adapter/em_http_ssl_patch' -end if Faraday::Adapter::EMHttp.loaded? diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/em_http_ssl_patch.rb b/.gems/gems/faraday-0.9.0/lib/faraday/adapter/em_http_ssl_patch.rb deleted file mode 100644 index 8bbfcbc..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/em_http_ssl_patch.rb +++ /dev/null @@ -1,56 +0,0 @@ -require 'openssl' -require 'em-http' - -module EmHttpSslPatch - def ssl_verify_peer(cert_string) - cert = nil - begin - cert = OpenSSL::X509::Certificate.new(cert_string) - rescue OpenSSL::X509::CertificateError - return false - end - - @last_seen_cert = cert - - if certificate_store.verify(@last_seen_cert) - begin - certificate_store.add_cert(@last_seen_cert) - rescue OpenSSL::X509::StoreError => e - raise e unless e.message == 'cert already in hash table' - end - true - else - raise OpenSSL::SSL::SSLError.new(%(unable to verify the server certificate for "#{host}")) - end - end - - def ssl_handshake_completed - return true unless verify_peer? - - unless OpenSSL::SSL.verify_certificate_identity(@last_seen_cert, host) - raise OpenSSL::SSL::SSLError.new(%(host "#{host}" does not match the server certificate)) - else - true - end - end - - def verify_peer? - parent.connopts.tls[:verify_peer] - end - - def host - parent.connopts.host - end - - def certificate_store - @certificate_store ||= begin - store = OpenSSL::X509::Store.new - store.set_default_paths - ca_file = parent.connopts.tls[:cert_chain_file] - store.add_file(ca_file) if ca_file - store - end - end -end - -EventMachine::HttpStubConnection.send(:include, EmHttpSslPatch) diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/em_synchrony.rb b/.gems/gems/faraday-0.9.0/lib/faraday/adapter/em_synchrony.rb deleted file mode 100644 index 305e702..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/em_synchrony.rb +++ /dev/null @@ -1,92 +0,0 @@ -require 'uri' - -module Faraday - class Adapter - class EMSynchrony < Faraday::Adapter - include EMHttp::Options - - dependency do - require 'em-synchrony/em-http' - require 'em-synchrony/em-multi' - require 'fiber' - end - - self.supports_parallel = true - - def self.setup_parallel_manager(options = {}) - ParallelManager.new - end - - def call(env) - super - request = EventMachine::HttpRequest.new(Utils::URI(env[:url].to_s), connection_config(env)) - - http_method = env[:method].to_s.downcase.to_sym - - # Queue requests for parallel execution. - if env[:parallel_manager] - env[:parallel_manager].add(request, http_method, request_config(env)) do |resp| - save_response(env, resp.response_header.status, resp.response) do |resp_headers| - resp.response_header.each do |name, value| - resp_headers[name.to_sym] = value - end - end - - # Finalize the response object with values from `env`. - env[:response].finish(env) - end - - # Execute single request. - else - client = nil - block = lambda { request.send(http_method, request_config(env)) } - - if !EM.reactor_running? - EM.run do - Fiber.new { - client = block.call - EM.stop - }.resume - end - else - client = block.call - end - - raise client.error if client.error - - save_response(env, client.response_header.status, client.response) do |resp_headers| - client.response_header.each do |name, value| - resp_headers[name.to_sym] = value - end - end - end - - @app.call env - rescue Errno::ECONNREFUSED - raise Error::ConnectionFailed, $! - rescue EventMachine::Connectify::CONNECTError => err - if err.message.include?("Proxy Authentication Required") - raise Error::ConnectionFailed, %{407 "Proxy Authentication Required "} - else - raise Error::ConnectionFailed, err - end - rescue => err - if defined?(OpenSSL) && OpenSSL::SSL::SSLError === err - raise Faraday::SSLError, err - else - raise - end - end - end - end -end - -require 'faraday/adapter/em_synchrony/parallel_manager' - -begin - require 'openssl' -rescue LoadError - warn "Warning: no such file to load -- openssl. Make sure it is installed if you want HTTPS support" -else - require 'faraday/adapter/em_http_ssl_patch' -end if Faraday::Adapter::EMSynchrony.loaded? diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/em_synchrony/parallel_manager.rb b/.gems/gems/faraday-0.9.0/lib/faraday/adapter/em_synchrony/parallel_manager.rb deleted file mode 100644 index 12a1baf..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/em_synchrony/parallel_manager.rb +++ /dev/null @@ -1,66 +0,0 @@ -module Faraday - class Adapter - class EMSynchrony < Faraday::Adapter - class ParallelManager - - # Add requests to queue. The `request` argument should be a - # `EM::HttpRequest` object. - def add(request, method, *args, &block) - queue << { - :request => request, - :method => method, - :args => args, - :block => block - } - end - - # Run all requests on queue with `EM::Synchrony::Multi`, wrapping - # it in a reactor and fiber if needed. - def run - result = nil - if !EM.reactor_running? - EM.run { - Fiber.new do - result = perform - EM.stop - end.resume - } - else - result = perform - end - result - end - - - private - - # The request queue. - def queue - @queue ||= [] - end - - # Main `EM::Synchrony::Multi` performer. - def perform - multi = ::EM::Synchrony::Multi.new - - queue.each do |item| - method = "a#{item[:method]}".to_sym - - req = item[:request].send(method, *item[:args]) - req.callback(&item[:block]) - - req_name = "req_#{multi.requests.size}".to_sym - multi.add(req_name, req) - end - - # Clear the queue, so parallel manager objects can be reused. - @queue = [] - - # Block fiber until all requests have returned. - multi.perform - end - - end # ParallelManager - end # EMSynchrony - end # Adapter -end # Faraday diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/excon.rb b/.gems/gems/faraday-0.9.0/lib/faraday/adapter/excon.rb deleted file mode 100644 index db0c7c3..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/excon.rb +++ /dev/null @@ -1,80 +0,0 @@ -module Faraday - class Adapter - class Excon < Faraday::Adapter - dependency 'excon' - - def initialize(app, connection_options = {}) - @connection_options = connection_options - super(app) - end - - def call(env) - super - - opts = {} - if env[:url].scheme == 'https' && ssl = env[:ssl] - opts[:ssl_verify_peer] = !!ssl.fetch(:verify, true) - opts[:ssl_ca_path] = ssl[:ca_path] if ssl[:ca_path] - opts[:ssl_ca_file] = ssl[:ca_file] if ssl[:ca_file] - opts[:client_cert] = ssl[:client_cert] if ssl[:client_cert] - opts[:client_key] = ssl[:client_key] if ssl[:client_key] - opts[:certificate] = ssl[:certificate] if ssl[:certificate] - opts[:private_key] = ssl[:private_key] if ssl[:private_key] - - # https://github.com/geemus/excon/issues/106 - # https://github.com/jruby/jruby-ossl/issues/19 - opts[:nonblock] = false - end - - if ( req = env[:request] ) - if req[:timeout] - opts[:read_timeout] = req[:timeout] - opts[:connect_timeout] = req[:timeout] - opts[:write_timeout] = req[:timeout] - end - - if req[:open_timeout] - opts[:connect_timeout] = req[:open_timeout] - opts[:write_timeout] = req[:open_timeout] - end - - if req[:proxy] - opts[:proxy] = { - :host => req[:proxy][:uri].host, - :port => req[:proxy][:uri].port, - :scheme => req[:proxy][:uri].scheme, - :user => req[:proxy][:user], - :password => req[:proxy][:password] - } - end - end - - conn = ::Excon.new(env[:url].to_s, opts.merge(@connection_options)) - - resp = conn.request \ - :method => env[:method].to_s.upcase, - :headers => env[:request_headers], - :body => read_body(env) - - save_response(env, resp.status.to_i, resp.body, resp.headers) - - @app.call env - rescue ::Excon::Errors::SocketError => err - if err.message =~ /\btimeout\b/ - raise Error::TimeoutError, err - elsif err.message =~ /\bcertificate\b/ - raise Faraday::SSLError, err - else - raise Error::ConnectionFailed, err - end - rescue ::Excon::Errors::Timeout => err - raise Error::TimeoutError, err - end - - # TODO: support streaming requests - def read_body(env) - env[:body].respond_to?(:read) ? env[:body].read : env[:body] - end - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/httpclient.rb b/.gems/gems/faraday-0.9.0/lib/faraday/adapter/httpclient.rb deleted file mode 100644 index 06c663f..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/httpclient.rb +++ /dev/null @@ -1,106 +0,0 @@ -module Faraday - class Adapter - class HTTPClient < Faraday::Adapter - dependency 'httpclient' - - def client - @client ||= ::HTTPClient.new - end - - def call(env) - super - - if req = env[:request] - if proxy = req[:proxy] - configure_proxy proxy - end - - if bind = req[:bind] - configure_socket bind - end - - configure_timeouts req - end - - if env[:url].scheme == 'https' && ssl = env[:ssl] - configure_ssl ssl - end - - # TODO Don't stream yet. - # https://github.com/nahi/httpclient/pull/90 - env[:body] = env[:body].read if env[:body].respond_to? :read - - resp = client.request env[:method], env[:url], - :body => env[:body], - :header => env[:request_headers] - - save_response env, resp.status, resp.body, resp.headers - - @app.call env - rescue ::HTTPClient::TimeoutError - raise Faraday::Error::TimeoutError, $! - rescue ::HTTPClient::BadResponseError => err - if err.message.include?('status 407') - raise Faraday::Error::ConnectionFailed, %{407 "Proxy Authentication Required "} - else - raise Faraday::Error::ClientError, $! - end - rescue Errno::ECONNREFUSED, EOFError - raise Faraday::Error::ConnectionFailed, $! - rescue => err - if defined?(OpenSSL) && OpenSSL::SSL::SSLError === err - raise Faraday::SSLError, err - else - raise - end - end - - def configure_socket(bind) - client.socket_local.host = bind[:host] - client.socket_local.port = bind[:port] - end - - def configure_proxy(proxy) - client.proxy = proxy[:uri] - if proxy[:user] && proxy[:password] - client.set_proxy_auth proxy[:user], proxy[:password] - end - end - - def configure_ssl(ssl) - ssl_config = client.ssl_config - - ssl_config.add_trust_ca ssl[:ca_file] if ssl[:ca_file] - ssl_config.add_trust_ca ssl[:ca_path] if ssl[:ca_path] - ssl_config.cert_store = ssl[:cert_store] if ssl[:cert_store] - ssl_config.client_cert = ssl[:client_cert] if ssl[:client_cert] - ssl_config.client_key = ssl[:client_key] if ssl[:client_key] - ssl_config.verify_depth = ssl[:verify_depth] if ssl[:verify_depth] - ssl_config.verify_mode = ssl_verify_mode(ssl) - end - - def configure_timeouts(req) - if req[:timeout] - client.connect_timeout = req[:timeout] - client.receive_timeout = req[:timeout] - client.send_timeout = req[:timeout] - end - - if req[:open_timeout] - client.connect_timeout = req[:open_timeout] - client.send_timeout = req[:open_timeout] - end - end - - def ssl_verify_mode(ssl) - ssl[:verify_mode] || begin - if ssl.fetch(:verify, true) - OpenSSL::SSL::VERIFY_PEER | OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT - else - OpenSSL::SSL::VERIFY_NONE - end - end - end - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/net_http.rb b/.gems/gems/faraday-0.9.0/lib/faraday/adapter/net_http.rb deleted file mode 100644 index 449388a..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/net_http.rb +++ /dev/null @@ -1,124 +0,0 @@ -begin - require 'net/https' -rescue LoadError - warn "Warning: no such file to load -- net/https. Make sure openssl is installed if you want ssl support" - require 'net/http' -end -require 'zlib' - -module Faraday - class Adapter - class NetHttp < Faraday::Adapter - NET_HTTP_EXCEPTIONS = [ - EOFError, - Errno::ECONNABORTED, - Errno::ECONNREFUSED, - Errno::ECONNRESET, - Errno::EHOSTUNREACH, - Errno::EINVAL, - Errno::ENETUNREACH, - Net::HTTPBadResponse, - Net::HTTPHeaderSyntaxError, - Net::ProtocolError, - SocketError, - Zlib::GzipFile::Error, - ] - - NET_HTTP_EXCEPTIONS << OpenSSL::SSL::SSLError if defined?(OpenSSL) - - def call(env) - super - http = net_http_connection(env) - configure_ssl(http, env[:ssl]) if env[:url].scheme == 'https' and env[:ssl] - - req = env[:request] - http.read_timeout = http.open_timeout = req[:timeout] if req[:timeout] - http.open_timeout = req[:open_timeout] if req[:open_timeout] - - begin - http_response = perform_request(http, env) - rescue *NET_HTTP_EXCEPTIONS => err - if defined?(OpenSSL) && OpenSSL::SSL::SSLError === err - raise Faraday::SSLError, err - else - raise Error::ConnectionFailed, err - end - end - - save_response(env, http_response.code.to_i, http_response.body || '') do |response_headers| - http_response.each_header do |key, value| - response_headers[key] = value - end - end - - @app.call env - rescue Timeout::Error => err - raise Faraday::Error::TimeoutError, err - end - - def create_request(env) - request = Net::HTTPGenericRequest.new \ - env[:method].to_s.upcase, # request method - !!env[:body], # is there request body - :head != env[:method], # is there response body - env[:url].request_uri, # request uri path - env[:request_headers] # request headers - - if env[:body].respond_to?(:read) - request.body_stream = env[:body] - else - request.body = env[:body] - end - request - end - - def perform_request(http, env) - if :get == env[:method] and !env[:body] - # prefer `get` to `request` because the former handles gzip (ruby 1.9) - http.get env[:url].request_uri, env[:request_headers] - else - http.request create_request(env) - end - end - - def net_http_connection(env) - if proxy = env[:request][:proxy] - Net::HTTP::Proxy(proxy[:uri].host, proxy[:uri].port, proxy[:user], proxy[:password]) - else - Net::HTTP - end.new(env[:url].host, env[:url].port) - end - - def configure_ssl(http, ssl) - http.use_ssl = true - http.verify_mode = ssl_verify_mode(ssl) - http.cert_store = ssl_cert_store(ssl) - - http.cert = ssl[:client_cert] if ssl[:client_cert] - http.key = ssl[:client_key] if ssl[:client_key] - http.ca_file = ssl[:ca_file] if ssl[:ca_file] - http.ca_path = ssl[:ca_path] if ssl[:ca_path] - http.verify_depth = ssl[:verify_depth] if ssl[:verify_depth] - http.ssl_version = ssl[:version] if ssl[:version] - end - - def ssl_cert_store(ssl) - return ssl[:cert_store] if ssl[:cert_store] - # Use the default cert store by default, i.e. system ca certs - cert_store = OpenSSL::X509::Store.new - cert_store.set_default_paths - cert_store - end - - def ssl_verify_mode(ssl) - ssl[:verify_mode] || begin - if ssl.fetch(:verify, true) - OpenSSL::SSL::VERIFY_PEER - else - OpenSSL::SSL::VERIFY_NONE - end - end - end - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/net_http_persistent.rb b/.gems/gems/faraday-0.9.0/lib/faraday/adapter/net_http_persistent.rb deleted file mode 100644 index e0cc958..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/net_http_persistent.rb +++ /dev/null @@ -1,47 +0,0 @@ -# Rely on autoloading instead of explicit require; helps avoid the "already -# initialized constant" warning on Ruby 1.8.7 when NetHttp is refereced below. -# require 'faraday/adapter/net_http' - -module Faraday - class Adapter - # Experimental adapter for net-http-persistent - class NetHttpPersistent < NetHttp - dependency 'net/http/persistent' - - def net_http_connection(env) - if proxy = env[:request][:proxy] - proxy_uri = ::URI::HTTP === proxy[:uri] ? proxy[:uri].dup : ::URI.parse(proxy[:uri].to_s) - proxy_uri.user = proxy_uri.password = nil - # awful patch for net-http-persistent 2.8 not unescaping user/password - (class << proxy_uri; self; end).class_eval do - define_method(:user) { proxy[:user] } - define_method(:password) { proxy[:password] } - end if proxy[:user] - end - Net::HTTP::Persistent.new 'Faraday', proxy_uri - end - - def perform_request(http, env) - http.request env[:url], create_request(env) - rescue Net::HTTP::Persistent::Error => error - if error.message.include? 'Timeout' - raise Faraday::Error::TimeoutError, error - elsif error.message.include? 'connection refused' - raise Faraday::Error::ConnectionFailed, error - else - raise - end - end - - def configure_ssl(http, ssl) - http.verify_mode = ssl_verify_mode(ssl) - http.cert_store = ssl_cert_store(ssl) - - http.certificate = ssl[:client_cert] if ssl[:client_cert] - http.private_key = ssl[:client_key] if ssl[:client_key] - http.ca_file = ssl[:ca_file] if ssl[:ca_file] - http.ssl_version = ssl[:version] if ssl[:version] - end - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/patron.rb b/.gems/gems/faraday-0.9.0/lib/faraday/adapter/patron.rb deleted file mode 100644 index 24a6d83..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/patron.rb +++ /dev/null @@ -1,68 +0,0 @@ -module Faraday - class Adapter - class Patron < Faraday::Adapter - dependency 'patron' - - def initialize(app, &block) - super(app) - @block = block - end - - def call(env) - super - - # TODO: support streaming requests - env[:body] = env[:body].read if env[:body].respond_to? :read - - session = @session ||= create_session - - if req = env[:request] - session.timeout = session.connect_timeout = req[:timeout] if req[:timeout] - session.connect_timeout = req[:open_timeout] if req[:open_timeout] - - if proxy = req[:proxy] - proxy_uri = proxy[:uri].dup - proxy_uri.user = proxy[:user] && Utils.escape(proxy[:user]).gsub('+', '%20') - proxy_uri.password = proxy[:password] && Utils.escape(proxy[:password]).gsub('+', '%20') - session.proxy = proxy_uri.to_s - end - end - - response = begin - data = env[:body] ? env[:body].to_s : nil - session.request(env[:method], env[:url].to_s, env[:request_headers], :data => data) - rescue Errno::ECONNREFUSED, ::Patron::ConnectionFailed - raise Error::ConnectionFailed, $! - end - - save_response(env, response.status, response.body, response.headers) - - @app.call env - rescue ::Patron::TimeoutError => err - raise Faraday::Error::TimeoutError, err - rescue ::Patron::Error => err - if err.message.include?("code 407") - raise Error::ConnectionFailed, %{407 "Proxy Authentication Required "} - else - raise Error::ConnectionFailed, err - end - end - - if loaded? && defined?(::Patron::Request::VALID_ACTIONS) - # HAX: helps but doesn't work completely - # https://github.com/toland/patron/issues/34 - ::Patron::Request::VALID_ACTIONS.tap do |actions| - actions << :patch unless actions.include? :patch - actions << :options unless actions.include? :options - end - end - - def create_session - session = ::Patron::Session.new - session.insecure = true - @block.call(session) if @block - session - end - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/rack.rb b/.gems/gems/faraday-0.9.0/lib/faraday/adapter/rack.rb deleted file mode 100644 index 0d21464..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/rack.rb +++ /dev/null @@ -1,58 +0,0 @@ -module Faraday - class Adapter - # Sends requests to a Rack app. - # - # Examples - # - # class MyRackApp - # def call(env) - # [200, {'Content-Type' => 'text/html'}, ["hello world"]] - # end - # end - # - # Faraday.new do |conn| - # conn.adapter :rack, MyRackApp.new - # end - class Rack < Faraday::Adapter - dependency 'rack/test' - - # not prefixed with "HTTP_" - SPECIAL_HEADERS = %w[ CONTENT_LENGTH CONTENT_TYPE ] - - def initialize(faraday_app, rack_app) - super(faraday_app) - mock_session = ::Rack::MockSession.new(rack_app) - @session = ::Rack::Test::Session.new(mock_session) - end - - def call(env) - super - rack_env = { - :method => env[:method], - :input => env[:body].respond_to?(:read) ? env[:body].read : env[:body], - 'rack.url_scheme' => env[:url].scheme - } - - env[:request_headers].each do |name, value| - name = name.upcase.tr('-', '_') - name = "HTTP_#{name}" unless SPECIAL_HEADERS.include? name - rack_env[name] = value - end if env[:request_headers] - - timeout = env[:request][:timeout] || env[:request][:open_timeout] - response = if timeout - Timer.timeout(timeout, Faraday::Error::TimeoutError) { execute_request(env, rack_env) } - else - execute_request(env, rack_env) - end - - save_response(env, response.status, response.body, response.headers) - @app.call env - end - - def execute_request(env, rack_env) - @session.request(env[:url].to_s, rack_env) - end - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/test.rb b/.gems/gems/faraday-0.9.0/lib/faraday/adapter/test.rb deleted file mode 100644 index 9a34575..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/test.rb +++ /dev/null @@ -1,162 +0,0 @@ -module Faraday - class Adapter - # test = Faraday::Connection.new do - # use Faraday::Adapter::Test do |stub| - # stub.get '/nigiri/sake.json' do - # [200, {}, 'hi world'] - # end - # end - # end - # - # resp = test.get '/nigiri/sake.json' - # resp.body # => 'hi world' - # - class Test < Faraday::Adapter - attr_accessor :stubs - - class Stubs - class NotFound < StandardError - end - - def initialize - # {:get => [Stub, Stub]} - @stack, @consumed = {}, {} - yield(self) if block_given? - end - - def empty? - @stack.empty? - end - - def match(request_method, path, headers, body) - return false if !@stack.key?(request_method) - stack = @stack[request_method] - consumed = (@consumed[request_method] ||= []) - - if stub = matches?(stack, path, headers, body) - consumed << stack.delete(stub) - stub - else - matches?(consumed, path, headers, body) - end - end - - def get(path, headers = {}, &block) - new_stub(:get, path, headers, &block) - end - - def head(path, headers = {}, &block) - new_stub(:head, path, headers, &block) - end - - def post(path, body=nil, headers = {}, &block) - new_stub(:post, path, headers, body, &block) - end - - def put(path, body=nil, headers = {}, &block) - new_stub(:put, path, headers, body, &block) - end - - def patch(path, body=nil, headers = {}, &block) - new_stub(:patch, path, headers, body, &block) - end - - def delete(path, headers = {}, &block) - new_stub(:delete, path, headers, &block) - end - - def options(path, headers = {}, &block) - new_stub(:options, path, headers, &block) - end - - # Raises an error if any of the stubbed calls have not been made. - def verify_stubbed_calls - failed_stubs = [] - @stack.each do |method, stubs| - unless stubs.size == 0 - failed_stubs.concat(stubs.map {|stub| - "Expected #{method} #{stub}." - }) - end - end - raise failed_stubs.join(" ") unless failed_stubs.size == 0 - end - - protected - - def new_stub(request_method, path, headers = {}, body=nil, &block) - normalized_path = Faraday::Utils.normalize_path(path) - (@stack[request_method] ||= []) << Stub.new(normalized_path, headers, body, block) - end - - def matches?(stack, path, headers, body) - stack.detect { |stub| stub.matches?(path, headers, body) } - end - end - - class Stub < Struct.new(:path, :params, :headers, :body, :block) - def initialize(full, headers, body, block) - path, query = full.split('?') - params = query ? - Faraday::Utils.parse_nested_query(query) : - {} - super(path, params, headers, body, block) - end - - def matches?(request_uri, request_headers, request_body) - request_path, request_query = request_uri.split('?') - request_params = request_query ? - Faraday::Utils.parse_nested_query(request_query) : - {} - request_path == path && - params_match?(request_params) && - (body.to_s.size.zero? || request_body == body) && - headers_match?(request_headers) - end - - def params_match?(request_params) - params.keys.all? do |key| - request_params[key] == params[key] - end - end - - def headers_match?(request_headers) - headers.keys.all? do |key| - request_headers[key] == headers[key] - end - end - - def to_s - "#{path} #{body}" - end - end - - def initialize(app, stubs=nil, &block) - super(app) - @stubs = stubs || Stubs.new - configure(&block) if block - end - - def configure - yield(stubs) - end - - def call(env) - super - normalized_path = Faraday::Utils.normalize_path(env[:url]) - params_encoder = env.request.params_encoder || Faraday::Utils.default_params_encoder - - if stub = stubs.match(env[:method], normalized_path, env.request_headers, env[:body]) - env[:params] = (query = env[:url].query) ? - params_encoder.decode(query) : - {} - status, headers, body = stub.block.call(env) - save_response(env, status, body, headers) - else - raise Stubs::NotFound, "no stubbed request for #{env[:method]} #{normalized_path} #{env[:body]}" - end - @app.call(env) - end - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/typhoeus.rb b/.gems/gems/faraday-0.9.0/lib/faraday/adapter/typhoeus.rb deleted file mode 100644 index 69b6a51..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/adapter/typhoeus.rb +++ /dev/null @@ -1,123 +0,0 @@ -module Faraday - class Adapter - class Typhoeus < Faraday::Adapter - self.supports_parallel = true - - def self.setup_parallel_manager(options = {}) - options.empty? ? ::Typhoeus::Hydra.hydra : ::Typhoeus::Hydra.new(options) - end - - dependency 'typhoeus' - - def call(env) - super - perform_request env - @app.call env - end - - def perform_request(env) - read_body env - - hydra = env[:parallel_manager] || self.class.setup_parallel_manager - hydra.queue request(env) - hydra.run unless parallel?(env) - rescue Errno::ECONNREFUSED - raise Error::ConnectionFailed, $! - end - - # TODO: support streaming requests - def read_body(env) - env[:body] = env[:body].read if env[:body].respond_to? :read - end - - def request(env) - method = env[:method] - # For some reason, prevents Typhoeus from using "100-continue". - # We want this because Webrick 1.3.1 can't seem to handle it w/ PUT. - method = method.to_s.upcase if method == :put - - req = ::Typhoeus::Request.new env[:url].to_s, - :method => method, - :body => env[:body], - :headers => env[:request_headers], - :disable_ssl_peer_verification => (env[:ssl] && env[:ssl].disable?) - - configure_ssl req, env - configure_proxy req, env - configure_timeout req, env - configure_socket req, env - - req.on_complete do |resp| - if resp.timed_out? - if parallel?(env) - # TODO: error callback in async mode - else - raise Faraday::Error::TimeoutError, "request timed out" - end - end - - case resp.curl_return_code - when 0 - # everything OK - when 7 - raise Error::ConnectionFailed, resp.curl_error_message - when 60 - raise Faraday::SSLError, resp.curl_error_message - else - raise Error::ClientError, resp.curl_error_message - end - - save_response(env, resp.code, resp.body) do |response_headers| - response_headers.parse resp.headers - end - # in async mode, :response is initialized at this point - env[:response].finish(env) if parallel?(env) - end - - req - end - - def configure_ssl(req, env) - ssl = env[:ssl] - - req.ssl_version = ssl[:version] if ssl[:version] - req.ssl_cert = ssl[:client_cert] if ssl[:client_cert] - req.ssl_key = ssl[:client_key] if ssl[:client_key] - req.ssl_cacert = ssl[:ca_file] if ssl[:ca_file] - req.ssl_capath = ssl[:ca_path] if ssl[:ca_path] - end - - def configure_proxy(req, env) - proxy = request_options(env)[:proxy] - return unless proxy - - req.proxy = "#{proxy[:uri].host}:#{proxy[:uri].port}" - - if proxy[:user] && proxy[:password] - req.proxy_username = proxy[:user] - req.proxy_password = proxy[:password] - end - end - - def configure_timeout(req, env) - env_req = request_options(env) - req.timeout = req.connect_timeout = (env_req[:timeout] * 1000) if env_req[:timeout] - req.connect_timeout = (env_req[:open_timeout] * 1000) if env_req[:open_timeout] - end - - def configure_socket(req, env) - if bind = request_options(env)[:bind] - req.interface = bind[:host] - end - end - - def request_options(env) - env[:request] - end - - def parallel?(env) - !!env[:parallel_manager] - end - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/autoload.rb b/.gems/gems/faraday-0.9.0/lib/faraday/autoload.rb deleted file mode 100644 index ec413ff..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/autoload.rb +++ /dev/null @@ -1,85 +0,0 @@ -module Faraday - # Internal: Adds the ability for other modules to manage autoloadable - # constants. - module AutoloadHelper - # Internal: Registers the constants to be auto loaded. - # - # prefix - The String require prefix. If the path is inside Faraday, then - # it will be prefixed with the root path of this loaded Faraday - # version. - # options - Hash of Symbol => String library names. - # - # Examples. - # - # Faraday.autoload_all 'faraday/foo', - # :Bar => 'bar' - # - # # requires faraday/foo/bar to load Faraday::Bar. - # Faraday::Bar - # - # - # Returns nothing. - def autoload_all(prefix, options) - if prefix =~ /^faraday(\/|$)/i - prefix = File.join(Faraday.root_path, prefix) - end - options.each do |const_name, path| - autoload const_name, File.join(prefix, path) - end - end - - # Internal: Loads each autoloaded constant. If thread safety is a concern, - # wrap this in a Mutex. - # - # Returns nothing. - def load_autoloaded_constants - constants.each do |const| - const_get(const) if autoload?(const) - end - end - - # Internal: Filters the module's contents with those that have been already - # autoloaded. - # - # Returns an Array of Class/Module objects. - def all_loaded_constants - constants.map { |c| const_get(c) }. - select { |a| a.respond_to?(:loaded?) && a.loaded? } - end - end - - class Adapter - extend AutoloadHelper - autoload_all 'faraday/adapter', - :NetHttp => 'net_http', - :NetHttpPersistent => 'net_http_persistent', - :Typhoeus => 'typhoeus', - :EMSynchrony => 'em_synchrony', - :EMHttp => 'em_http', - :Patron => 'patron', - :Excon => 'excon', - :Test => 'test', - :Rack => 'rack', - :HTTPClient => 'httpclient' - end - - class Request - extend AutoloadHelper - autoload_all 'faraday/request', - :UrlEncoded => 'url_encoded', - :Multipart => 'multipart', - :Retry => 'retry', - :Timeout => 'timeout', - :Authorization => 'authorization', - :BasicAuthentication => 'basic_authentication', - :TokenAuthentication => 'token_authentication', - :Instrumentation => 'instrumentation' - end - - class Response - extend AutoloadHelper - autoload_all 'faraday/response', - :RaiseError => 'raise_error', - :Logger => 'logger' - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/connection.rb b/.gems/gems/faraday-0.9.0/lib/faraday/connection.rb deleted file mode 100644 index 1e408e2..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/connection.rb +++ /dev/null @@ -1,432 +0,0 @@ -module Faraday - # Public: Connection objects manage the default properties and the middleware - # stack for fulfilling an HTTP request. - # - # Examples - # - # conn = Faraday::Connection.new 'http://sushi.com' - # - # # GET http://sushi.com/nigiri - # conn.get 'nigiri' - # # => # - # - class Connection - # A Set of allowed HTTP verbs. - METHODS = Set.new [:get, :post, :put, :delete, :head, :patch, :options] - - # Public: Returns a Hash of URI query unencoded key/value pairs. - attr_reader :params - - # Public: Returns a Hash of unencoded HTTP header key/value pairs. - attr_reader :headers - - # Public: Returns a URI with the prefix used for all requests from this - # Connection. This includes a default host name, scheme, port, and path. - attr_reader :url_prefix - - # Public: Returns the Faraday::Builder for this Connection. - attr_reader :builder - - # Public: Returns a Hash of the request options. - attr_reader :options - - # Public: Returns a Hash of the SSL options. - attr_reader :ssl - - # Public: Returns the parallel manager for this Connection. - attr_reader :parallel_manager - - # Public: Sets the default parallel manager for this connection. - attr_writer :default_parallel_manager - - # Public: Initializes a new Faraday::Connection. - # - # url - URI or String base URL to use as a prefix for all - # requests (optional). - # options - Hash or Faraday::ConnectionOptions. - # :url - URI or String base URL (default: "http:/"). - # :params - Hash of URI query unencoded key/value pairs. - # :headers - Hash of unencoded HTTP header key/value pairs. - # :request - Hash of request options. - # :ssl - Hash of SSL options. - # :proxy - URI, String or Hash of HTTP proxy options - # (default: "http_proxy" environment variable). - # :uri - URI or String - # :user - String (optional) - # :password - String (optional) - def initialize(url = nil, options = nil) - if url.is_a?(Hash) - options = ConnectionOptions.from(url) - url = options.url - else - options = ConnectionOptions.from(options) - end - - @parallel_manager = nil - @headers = Utils::Headers.new - @params = Utils::ParamsHash.new - @options = options.request - @ssl = options.ssl - @default_parallel_manager = options.parallel_manager - - @builder = options.builder || begin - # pass an empty block to Builder so it doesn't assume default middleware - options.new_builder(block_given? ? Proc.new { |b| } : nil) - end - - self.url_prefix = url || 'http:/' - - @params.update(options.params) if options.params - @headers.update(options.headers) if options.headers - - @proxy = nil - proxy(options.fetch(:proxy) { - uri = ENV['http_proxy'] - if uri && !uri.empty? - uri = 'http://' + uri if uri !~ /^http/i - uri - end - }) - - yield(self) if block_given? - - @headers[:user_agent] ||= "Faraday v#{VERSION}" - end - - # Public: Sets the Hash of URI query unencoded key/value pairs. - def params=(hash) - @params.replace hash - end - - # Public: Sets the Hash of unencoded HTTP header key/value pairs. - def headers=(hash) - @headers.replace hash - end - - extend Forwardable - - def_delegators :builder, :build, :use, :request, :response, :adapter, :app - - # Public: Makes an HTTP request without a body. - # - # url - The optional String base URL to use as a prefix for all - # requests. Can also be the options Hash. - # params - Hash of URI query unencoded key/value pairs. - # headers - Hash of unencoded HTTP header key/value pairs. - # - # Examples - # - # conn.get '/items', {:page => 1}, :accept => 'application/json' - # conn.head '/items/1' - # - # # ElasticSearch example sending a body with GET. - # conn.get '/twitter/tweet/_search' do |req| - # req.headers[:content_type] = 'application/json' - # req.params[:routing] = 'kimchy' - # req.body = JSON.generate(:query => {...}) - # end - # - # Yields a Faraday::Response for further request customizations. - # Returns a Faraday::Response. - # - # Signature - # - # (url = nil, params = nil, headers = nil) - # - # verb - An HTTP verb: get, head, or delete. - %w[get head delete].each do |method| - class_eval <<-RUBY, __FILE__, __LINE__ + 1 - def #{method}(url = nil, params = nil, headers = nil) - run_request(:#{method}, url, nil, headers) { |request| - request.params.update(params) if params - yield(request) if block_given? - } - end - RUBY - end - - # Public: Makes an HTTP request with a body. - # - # url - The optional String base URL to use as a prefix for all - # requests. Can also be the options Hash. - # body - The String body for the request. - # headers - Hash of unencoded HTTP header key/value pairs. - # - # Examples - # - # conn.post '/items', data, :content_type => 'application/json' - # - # # Simple ElasticSearch indexing sample. - # conn.post '/twitter/tweet' do |req| - # req.headers[:content_type] = 'application/json' - # req.params[:routing] = 'kimchy' - # req.body = JSON.generate(:user => 'kimchy', ...) - # end - # - # Yields a Faraday::Response for further request customizations. - # Returns a Faraday::Response. - # - # Signature - # - # (url = nil, body = nil, headers = nil) - # - # verb - An HTTP verb: post, put, or patch. - %w[post put patch].each do |method| - class_eval <<-RUBY, __FILE__, __LINE__ + 1 - def #{method}(url = nil, body = nil, headers = nil, &block) - run_request(:#{method}, url, body, headers, &block) - end - RUBY - end - - # Public: Sets up the Authorization header with these credentials, encoded - # with base64. - # - # login - The authentication login. - # pass - The authentication password. - # - # Examples - # - # conn.basic_auth 'Aladdin', 'open sesame' - # conn.headers['Authorization'] - # # => "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" - # - # Returns nothing. - def basic_auth(login, pass) - set_authorization_header(:basic_auth, login, pass) - end - - # Public: Sets up the Authorization header with the given token. - # - # token - The String token. - # options - Optional Hash of extra token options. - # - # Examples - # - # conn.token_auth 'abcdef', :foo => 'bar' - # conn.headers['Authorization'] - # # => "Token token=\"abcdef\", - # foo=\"bar\"" - # - # Returns nothing. - def token_auth(token, options = nil) - set_authorization_header(:token_auth, token, options) - end - - # Public: Sets up a custom Authorization header. - # - # type - The String authorization type. - # token - The String or Hash token. A String value is taken literally, and - # a Hash is encoded into comma separated key/value pairs. - # - # Examples - # - # conn.authorization :Bearer, 'mF_9.B5f-4.1JqM' - # conn.headers['Authorization'] - # # => "Bearer mF_9.B5f-4.1JqM" - # - # conn.authorization :Token, :token => 'abcdef', :foo => 'bar' - # conn.headers['Authorization'] - # # => "Token token=\"abcdef\", - # foo=\"bar\"" - # - # Returns nothing. - def authorization(type, token) - set_authorization_header(:authorization, type, token) - end - - # Internal: Traverse the middleware stack in search of a - # parallel-capable adapter. - # - # Yields in case of not found. - # - # Returns a parallel manager or nil if not found. - def default_parallel_manager - @default_parallel_manager ||= begin - handler = @builder.handlers.detect do |h| - h.klass.respond_to?(:supports_parallel?) and h.klass.supports_parallel? - end - - if handler - handler.klass.setup_parallel_manager - elsif block_given? - yield - end - end - end - - # Public: Determine if this Faraday::Connection can make parallel requests. - # - # Returns true or false. - def in_parallel? - !!@parallel_manager - end - - # Public: Sets up the parallel manager to make a set of requests. - # - # manager - The parallel manager that this Connection's Adapter uses. - # - # Yields a block to execute multiple requests. - # Returns nothing. - def in_parallel(manager = nil) - @parallel_manager = manager || default_parallel_manager { - warn "Warning: `in_parallel` called but no parallel-capable adapter on Faraday stack" - warn caller[2,10].join("\n") - nil - } - yield - @parallel_manager && @parallel_manager.run - ensure - @parallel_manager = nil - end - - # Public: Gets or Sets the Hash proxy options. - def proxy(arg = nil) - return @proxy if arg.nil? - @proxy = ProxyOptions.from(arg) - end - - def_delegators :url_prefix, :scheme, :scheme=, :host, :host=, :port, :port= - def_delegator :url_prefix, :path, :path_prefix - - # Public: Parses the giving url with URI and stores the individual - # components in this connection. These components serve as defaults for - # requests made by this connection. - # - # url - A String or URI. - # - # Examples - # - # conn = Faraday::Connection.new { ... } - # conn.url_prefix = "https://sushi.com/api" - # conn.scheme # => https - # conn.path_prefix # => "/api" - # - # conn.get("nigiri?page=2") # accesses https://sushi.com/api/nigiri - # - # Returns the parsed URI from teh given input.. - def url_prefix=(url, encoder = nil) - uri = @url_prefix = Utils.URI(url) - self.path_prefix = uri.path - - params.merge_query(uri.query, encoder) - uri.query = nil - - with_uri_credentials(uri) do |user, password| - basic_auth user, password - uri.user = uri.password = nil - end - - uri - end - - # Public: Sets the path prefix and ensures that it always has a leading - # slash. - # - # value - A String. - # - # Returns the new String path prefix. - def path_prefix=(value) - url_prefix.path = if value - value = '/' + value unless value[0,1] == '/' - value - end - end - - # Public: Takes a relative url for a request and combines it with the defaults - # set on the connection instance. - # - # conn = Faraday::Connection.new { ... } - # conn.url_prefix = "https://sushi.com/api?token=abc" - # conn.scheme # => https - # conn.path_prefix # => "/api" - # - # conn.build_url("nigiri?page=2") # => https://sushi.com/api/nigiri?token=abc&page=2 - # conn.build_url("nigiri", :page => 2) # => https://sushi.com/api/nigiri?token=abc&page=2 - # - def build_url(url = nil, extra_params = nil) - uri = build_exclusive_url(url) - - query_values = params.dup.merge_query(uri.query, options.params_encoder) - query_values.update extra_params if extra_params - uri.query = query_values.empty? ? nil : query_values.to_query(options.params_encoder) - - uri - end - - # Builds and runs the Faraday::Request. - # - # method - The Symbol HTTP method. - # url - The String or URI to access. - # body - The String body - # headers - Hash of unencoded HTTP header key/value pairs. - # - # Returns a Faraday::Response. - def run_request(method, url, body, headers) - if !METHODS.include?(method) - raise ArgumentError, "unknown http method: #{method}" - end - - request = build_request(method) do |req| - req.url(url) if url - req.headers.update(headers) if headers - req.body = body if body - yield(req) if block_given? - end - - builder.build_response(self, request) - end - - # Creates and configures the request object. - # - # Returns the new Request. - def build_request(method) - Request.create(method) do |req| - req.params = self.params.dup - req.headers = self.headers.dup - req.options = self.options.merge(:proxy => self.proxy) - yield(req) if block_given? - end - end - - # Internal: Build an absolute URL based on url_prefix. - # - # url - A String or URI-like object - # params - A Faraday::Utils::ParamsHash to replace the query values - # of the resulting url (default: nil). - # - # Returns the resulting URI instance. - def build_exclusive_url(url = nil, params = nil) - url = nil if url.respond_to?(:empty?) and url.empty? - base = url_prefix - if url and base.path and base.path !~ /\/$/ - base = base.dup - base.path = base.path + '/' # ensure trailing slash - end - uri = url ? base + url : base - uri.query = params.to_query(options.params_encoder) if params - uri.query = nil if uri.query and uri.query.empty? - uri - end - - # Internal: Creates a duplicate of this Faraday::Connection. - # - # Returns a Faraday::Connection. - def dup - self.class.new(build_exclusive_url, :headers => headers.dup, :params => params.dup, :builder => builder.dup, :ssl => ssl.dup) - end - - # Internal: Yields username and password extracted from a URI if they both exist. - def with_uri_credentials(uri) - if uri.user and uri.password - yield(Utils.unescape(uri.user), Utils.unescape(uri.password)) - end - end - - def set_authorization_header(header_type, *args) - header = Faraday::Request.lookup_middleware(header_type). - header(*args) - headers[Faraday::Request::Authorization::KEY] = header - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/error.rb b/.gems/gems/faraday-0.9.0/lib/faraday/error.rb deleted file mode 100644 index 1771230..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/error.rb +++ /dev/null @@ -1,53 +0,0 @@ -module Faraday - class Error < StandardError; end - class MissingDependency < Error; end - - class ClientError < Error - attr_reader :response - - def initialize(ex, response = nil) - @wrapped_exception = nil - @response = response - - if ex.respond_to?(:backtrace) - super(ex.message) - @wrapped_exception = ex - elsif ex.respond_to?(:each_key) - super("the server responded with status #{ex[:status]}") - @response = ex - else - super(ex.to_s) - end - end - - def backtrace - if @wrapped_exception - @wrapped_exception.backtrace - else - super - end - end - - def inspect - %(#<#{self.class}>) - end - end - - class ConnectionFailed < ClientError; end - class ResourceNotFound < ClientError; end - class ParsingError < ClientError; end - - class TimeoutError < ClientError - def initialize(ex = nil) - super(ex || "timeout") - end - end - - class SSLError < ClientError - end - - [:MissingDependency, :ClientError, :ConnectionFailed, :ResourceNotFound, - :ParsingError, :TimeoutError, :SSLError].each do |const| - Error.const_set(const, Faraday.const_get(const)) - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/middleware.rb b/.gems/gems/faraday-0.9.0/lib/faraday/middleware.rb deleted file mode 100644 index c45d51a..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/middleware.rb +++ /dev/null @@ -1,37 +0,0 @@ -module Faraday - class Middleware - extend MiddlewareRegistry - - class << self - attr_accessor :load_error - private :load_error= - end - - self.load_error = nil - - # Executes a block which should try to require and reference dependent libraries - def self.dependency(lib = nil) - lib ? require(lib) : yield - rescue LoadError, NameError => error - self.load_error = error - end - - def self.new(*) - raise "missing dependency for #{self}: #{load_error.message}" unless loaded? - super - end - - def self.loaded? - load_error.nil? - end - - def self.inherited(subclass) - super - subclass.send(:load_error=, self.load_error) - end - - def initialize(app = nil) - @app = app - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/options.rb b/.gems/gems/faraday-0.9.0/lib/faraday/options.rb deleted file mode 100644 index c1b36f6..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/options.rb +++ /dev/null @@ -1,350 +0,0 @@ -module Faraday - # Subclasses Struct with some special helpers for converting from a Hash to - # a Struct. - class Options < Struct - # Public - def self.from(value) - value ? new.update(value) : new - end - - # Public - def each - return to_enum(:each) unless block_given? - members.each do |key| - yield(key.to_sym, send(key)) - end - end - - # Public - def update(obj) - obj.each do |key, value| - if sub_options = self.class.options_for(key) - value = sub_options.from(value) if value - elsif Hash === value - hash = {} - value.each do |hash_key, hash_value| - hash[hash_key] = hash_value - end - value = hash - end - - self.send("#{key}=", value) unless value.nil? - end - self - end - - alias merge! update - - # Public - def delete(key) - value = send(key) - send("#{key}=", nil) - value - end - - # Public - def clear - members.each { |member| delete(member) } - end - - # Public - def merge(value) - dup.update(value) - end - - # Public - def fetch(key, *args) - unless symbolized_key_set.include?(key.to_sym) - key_setter = "#{key}=" - if args.size > 0 - send(key_setter, args.first) - elsif block_given? - send(key_setter, Proc.new.call(key)) - else - raise self.class.fetch_error_class, "key not found: #{key.inspect}" - end - end - send(key) - end - - # Public - def values_at(*keys) - keys.map { |key| send(key) } - end - - # Public - def keys - members.reject { |member| send(member).nil? } - end - - # Public - def empty? - keys.empty? - end - - # Public - def each_key - return to_enum(:each_key) unless block_given? - keys.each do |key| - yield(key) - end - end - - # Public - def key?(key) - keys.include?(key) - end - - alias has_key? key? - - # Public - def each_value - return to_enum(:each_value) unless block_given? - values.each do |value| - yield(value) - end - end - - # Public - def value?(value) - values.include?(value) - end - - alias has_value? value? - - # Public - def to_hash - hash = {} - members.each do |key| - value = send(key) - hash[key.to_sym] = value unless value.nil? - end - hash - end - - # Internal - def inspect - values = [] - members.each do |member| - value = send(member) - values << "#{member}=#{value.inspect}" if value - end - values = values.empty? ? ' (empty)' : (' ' << values.join(", ")) - - %(#<#{self.class}#{values}>) - end - - # Internal - def self.options(mapping) - attribute_options.update(mapping) - end - - # Internal - def self.options_for(key) - attribute_options[key] - end - - # Internal - def self.attribute_options - @attribute_options ||= {} - end - - def self.memoized(key) - memoized_attributes[key.to_sym] = Proc.new - class_eval <<-RUBY, __FILE__, __LINE__ + 1 - def #{key}() self[:#{key}]; end - RUBY - end - - def self.memoized_attributes - @memoized_attributes ||= {} - end - - def [](key) - key = key.to_sym - if method = self.class.memoized_attributes[key] - super(key) || (self[key] = instance_eval(&method)) - else - super - end - end - - def symbolized_key_set - @symbolized_key_set ||= Set.new(keys.map { |k| k.to_sym }) - end - - def self.inherited(subclass) - super - subclass.attribute_options.update(attribute_options) - subclass.memoized_attributes.update(memoized_attributes) - end - - def self.fetch_error_class - @fetch_error_class ||= if Object.const_defined?(:KeyError) - ::KeyError - else - ::IndexError - end - end - end - - class RequestOptions < Options.new(:params_encoder, :proxy, :bind, - :timeout, :open_timeout, :boundary, - :oauth) - - def []=(key, value) - if key && key.to_sym == :proxy - super(key, value ? ProxyOptions.from(value) : nil) - else - super(key, value) - end - end - end - - class SSLOptions < Options.new(:verify, :ca_file, :ca_path, :verify_mode, - :cert_store, :client_cert, :client_key, :certificate, :private_key, :verify_depth, :version) - - def verify? - verify != false - end - - def disable? - !verify? - end - end - - class ProxyOptions < Options.new(:uri, :user, :password) - extend Forwardable - def_delegators :uri, :scheme, :scheme=, :host, :host=, :port, :port=, :path, :path= - - def self.from(value) - case value - when String - value = {:uri => Utils.URI(value)} - when URI - value = {:uri => value} - when Hash, Options - if uri = value.delete(:uri) - value[:uri] = Utils.URI(uri) - end - end - super(value) - end - - memoized(:user) { uri.user && Utils.unescape(uri.user) } - memoized(:password) { uri.password && Utils.unescape(uri.password) } - end - - class ConnectionOptions < Options.new(:request, :proxy, :ssl, :builder, :url, - :parallel_manager, :params, :headers, :builder_class) - - options :request => RequestOptions, :ssl => SSLOptions - - memoized(:request) { self.class.options_for(:request).new } - - memoized(:ssl) { self.class.options_for(:ssl).new } - - memoized(:builder_class) { RackBuilder } - - def new_builder(block) - builder_class.new(&block) - end - end - - class Env < Options.new(:method, :body, :url, :request, :request_headers, - :ssl, :parallel_manager, :params, :response, :response_headers, :status) - - ContentLength = 'Content-Length'.freeze - StatusesWithoutBody = Set.new [204, 304] - SuccessfulStatuses = 200..299 - - # A Set of HTTP verbs that typically send a body. If no body is set for - # these requests, the Content-Length header is set to 0. - MethodsWithBodies = Set.new [:post, :put, :patch, :options] - - options :request => RequestOptions, - :request_headers => Utils::Headers, :response_headers => Utils::Headers - - extend Forwardable - - def_delegators :request, :params_encoder - - # Public - def [](key) - if in_member_set?(key) - super(key) - else - custom_members[key] - end - end - - # Public - def []=(key, value) - if in_member_set?(key) - super(key, value) - else - custom_members[key] = value - end - end - - # Public - def success? - SuccessfulStatuses.include?(status) - end - - # Public - def needs_body? - !body && MethodsWithBodies.include?(method) - end - - # Public - def clear_body - request_headers[ContentLength] = '0' - self.body = '' - end - - # Public - def parse_body? - !StatusesWithoutBody.include?(status) - end - - # Public - def parallel? - !!parallel_manager - end - - def inspect - attrs = [nil] - members.each do |mem| - if value = send(mem) - attrs << "@#{mem}=#{value.inspect}" - end - end - if !custom_members.empty? - attrs << "@custom=#{custom_members.inspect}" - end - %(#<#{self.class}#{attrs.join(" ")}>) - end - - # Internal - def custom_members - @custom_members ||= {} - end - - # Internal - if members.first.is_a?(Symbol) - def in_member_set?(key) - self.class.member_set.include?(key.to_sym) - end - else - def in_member_set?(key) - self.class.member_set.include?(key.to_s) - end - end - - # Internal - def self.member_set - @member_set ||= Set.new(members) - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/parameters.rb b/.gems/gems/faraday-0.9.0/lib/faraday/parameters.rb deleted file mode 100644 index 136c43b..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/parameters.rb +++ /dev/null @@ -1,193 +0,0 @@ -module Faraday - module NestedParamsEncoder - ESCAPE_RE = /[^a-zA-Z0-9 .~_-]/ - - def self.escape(s) - return s.to_s.gsub(ESCAPE_RE) { - '%' + $&.unpack('H2' * $&.bytesize).join('%').upcase - }.tr(' ', '+') - end - - def self.unescape(s) - CGI.unescape(s.to_s) - end - - def self.encode(params) - return nil if params == nil - - if !params.is_a?(Array) - if !params.respond_to?(:to_hash) - raise TypeError, - "Can't convert #{params.class} into Hash." - end - params = params.to_hash - params = params.map do |key, value| - key = key.to_s if key.kind_of?(Symbol) - [key, value] - end - # Useful default for OAuth and caching. - # Only to be used for non-Array inputs. Arrays should preserve order. - params.sort! - end - - # Helper lambda - to_query = lambda do |parent, value| - if value.is_a?(Hash) - value = value.map do |key, val| - key = escape(key) - [key, val] - end - value.sort! - buffer = "" - value.each do |key, val| - new_parent = "#{parent}%5B#{key}%5D" - buffer << "#{to_query.call(new_parent, val)}&" - end - return buffer.chop - elsif value.is_a?(Array) - buffer = "" - value.each_with_index do |val, i| - new_parent = "#{parent}%5B%5D" - buffer << "#{to_query.call(new_parent, val)}&" - end - return buffer.chop - else - encoded_value = escape(value) - return "#{parent}=#{encoded_value}" - end - end - - # The params have form [['key1', 'value1'], ['key2', 'value2']]. - buffer = '' - params.each do |parent, value| - encoded_parent = escape(parent) - buffer << "#{to_query.call(encoded_parent, value)}&" - end - return buffer.chop - end - - def self.decode(query) - return nil if query == nil - # Recursive helper lambda - dehash = lambda do |hash| - hash.each do |(key, value)| - if value.kind_of?(Hash) - hash[key] = dehash.call(value) - end - end - # Numeric keys implies an array - if hash != {} && hash.keys.all? { |key| key =~ /^\d+$/ } - hash.sort.inject([]) do |accu, (_, value)| - accu << value; accu - end - else - hash - end - end - - empty_accumulator = {} - return ((query.split('&').map do |pair| - pair.split('=', 2) if pair && !pair.empty? - end).compact.inject(empty_accumulator.dup) do |accu, (key, value)| - key = unescape(key) - if value.kind_of?(String) - value = unescape(value.gsub(/\+/, ' ')) - end - - array_notation = !!(key =~ /\[\]$/) - subkeys = key.split(/[\[\]]+/) - current_hash = accu - for i in 0...(subkeys.size - 1) - subkey = subkeys[i] - current_hash[subkey] = {} unless current_hash[subkey] - current_hash = current_hash[subkey] - end - if array_notation - current_hash[subkeys.last] = [] unless current_hash[subkeys.last] - current_hash[subkeys.last] << value - else - current_hash[subkeys.last] = value - end - accu - end).inject(empty_accumulator.dup) do |accu, (key, value)| - accu[key] = value.kind_of?(Hash) ? dehash.call(value) : value - accu - end - end - end - - module FlatParamsEncoder - ESCAPE_RE = /[^a-zA-Z0-9 .~_-]/ - - def self.escape(s) - return s.to_s.gsub(ESCAPE_RE) { - '%' + $&.unpack('H2' * $&.bytesize).join('%').upcase - }.tr(' ', '+') - end - - def self.unescape(s) - CGI.unescape(s.to_s) - end - - def self.encode(params) - return nil if params == nil - - if !params.is_a?(Array) - if !params.respond_to?(:to_hash) - raise TypeError, - "Can't convert #{params.class} into Hash." - end - params = params.to_hash - params = params.map do |key, value| - key = key.to_s if key.kind_of?(Symbol) - [key, value] - end - # Useful default for OAuth and caching. - # Only to be used for non-Array inputs. Arrays should preserve order. - params.sort! - end - - # The params have form [['key1', 'value1'], ['key2', 'value2']]. - buffer = '' - params.each do |key, value| - encoded_key = escape(key) - value = value.to_s if value == true || value == false - if value == nil - buffer << "#{encoded_key}&" - elsif value.kind_of?(Array) - value.each do |sub_value| - encoded_value = escape(sub_value) - buffer << "#{encoded_key}=#{encoded_value}&" - end - else - encoded_value = escape(value) - buffer << "#{encoded_key}=#{encoded_value}&" - end - end - return buffer.chop - end - - def self.decode(query) - empty_accumulator = {} - return nil if query == nil - split_query = (query.split('&').map do |pair| - pair.split('=', 2) if pair && !pair.empty? - end).compact - return split_query.inject(empty_accumulator.dup) do |accu, pair| - pair[0] = unescape(pair[0]) - pair[1] = true if pair[1].nil? - if pair[1].respond_to?(:to_str) - pair[1] = unescape(pair[1].to_str.gsub(/\+/, " ")) - end - if accu[pair[0]].kind_of?(Array) - accu[pair[0]] << pair[1] - elsif accu[pair[0]] - accu[pair[0]] = [accu[pair[0]], pair[1]] - else - accu[pair[0]] = pair[1] - end - accu - end - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/rack_builder.rb b/.gems/gems/faraday-0.9.0/lib/faraday/rack_builder.rb deleted file mode 100644 index 204ce41..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/rack_builder.rb +++ /dev/null @@ -1,212 +0,0 @@ -module Faraday - # A Builder that processes requests into responses by passing through an inner - # middleware stack (heavily inspired by Rack). - # - # Faraday::Connection.new(:url => 'http://sushi.com') do |builder| - # builder.request :url_encoded # Faraday::Request::UrlEncoded - # builder.adapter :net_http # Faraday::Adapter::NetHttp - # end - class RackBuilder - attr_accessor :handlers - - # Error raised when trying to modify the stack after calling `lock!` - class StackLocked < RuntimeError; end - - # borrowed from ActiveSupport::Dependencies::Reference & - # ActionDispatch::MiddlewareStack::Middleware - class Handler - @@constants_mutex = Mutex.new - @@constants = Hash.new { |h, k| - value = k.respond_to?(:constantize) ? k.constantize : Object.const_get(k) - @@constants_mutex.synchronize { h[k] = value } - } - - attr_reader :name - - def initialize(klass, *args, &block) - @name = klass.to_s - if klass.respond_to?(:name) - @@constants_mutex.synchronize { @@constants[@name] = klass } - end - @args, @block = args, block - end - - def klass() @@constants[@name] end - def inspect() @name end - - def ==(other) - if other.is_a? Handler - self.name == other.name - elsif other.respond_to? :name - klass == other - else - @name == other.to_s - end - end - - def build(app) - klass.new(app, *@args, &@block) - end - end - - def initialize(handlers = []) - @handlers = handlers - if block_given? - build(&Proc.new) - elsif @handlers.empty? - # default stack, if nothing else is configured - self.request :url_encoded - self.adapter Faraday.default_adapter - end - end - - def build(options = {}) - raise_if_locked - @handlers.clear unless options[:keep] - yield(self) if block_given? - end - - def [](idx) - @handlers[idx] - end - - # Locks the middleware stack to ensure no further modifications are possible. - def lock! - @handlers.freeze - end - - def locked? - @handlers.frozen? - end - - def use(klass, *args, &block) - if klass.is_a? Symbol - use_symbol(Faraday::Middleware, klass, *args, &block) - else - raise_if_locked - @handlers << self.class::Handler.new(klass, *args, &block) - end - end - - def request(key, *args, &block) - use_symbol(Faraday::Request, key, *args, &block) - end - - def response(key, *args, &block) - use_symbol(Faraday::Response, key, *args, &block) - end - - def adapter(key, *args, &block) - use_symbol(Faraday::Adapter, key, *args, &block) - end - - ## methods to push onto the various positions in the stack: - - def insert(index, *args, &block) - raise_if_locked - index = assert_index(index) - handler = self.class::Handler.new(*args, &block) - @handlers.insert(index, handler) - end - - alias_method :insert_before, :insert - - def insert_after(index, *args, &block) - index = assert_index(index) - insert(index + 1, *args, &block) - end - - def swap(index, *args, &block) - raise_if_locked - index = assert_index(index) - @handlers.delete_at(index) - insert(index, *args, &block) - end - - def delete(handler) - raise_if_locked - @handlers.delete(handler) - end - - # Processes a Request into a Response by passing it through this Builder's - # middleware stack. - # - # connection - Faraday::Connection - # request - Faraday::Request - # - # Returns a Faraday::Response. - def build_response(connection, request) - app.call(build_env(connection, request)) - end - - # The "rack app" wrapped in middleware. All requests are sent here. - # - # The builder is responsible for creating the app object. After this, - # the builder gets locked to ensure no further modifications are made - # to the middleware stack. - # - # Returns an object that responds to `call` and returns a Response. - def app - @app ||= begin - lock! - to_app(lambda { |env| - response = Response.new - response.finish(env) unless env.parallel? - env.response = response - }) - end - end - - def to_app(inner_app) - # last added handler is the deepest and thus closest to the inner app - @handlers.reverse.inject(inner_app) { |app, handler| handler.build(app) } - end - - def ==(other) - other.is_a?(self.class) && @handlers == other.handlers - end - - def dup - self.class.new(@handlers.dup) - end - - # ENV Keys - # :method - a symbolized request method (:get, :post) - # :body - the request body that will eventually be converted to a string. - # :url - URI instance for the current request. - # :status - HTTP response status code - # :request_headers - hash of HTTP Headers to be sent to the server - # :response_headers - Hash of HTTP headers from the server - # :parallel_manager - sent if the connection is in parallel mode - # :request - Hash of options for configuring the request. - # :timeout - open/read timeout Integer in seconds - # :open_timeout - read timeout Integer in seconds - # :proxy - Hash of proxy options - # :uri - Proxy Server URI - # :user - Proxy server username - # :password - Proxy server password - # :ssl - Hash of options for configuring SSL requests. - def build_env(connection, request) - Env.new(request.method, request.body, - connection.build_exclusive_url(request.path, request.params), - request.options, request.headers, connection.ssl, - connection.parallel_manager) - end - - private - - def raise_if_locked - raise StackLocked, "can't modify middleware stack after making a request" if locked? - end - - def use_symbol(mod, key, *args, &block) - use(mod.lookup_middleware(key), *args, &block) - end - - def assert_index(index) - idx = index.is_a?(Integer) ? index : @handlers.index(index) - raise "No such handler: #{index.inspect}" unless idx - idx - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/request.rb b/.gems/gems/faraday-0.9.0/lib/faraday/request.rb deleted file mode 100644 index 481077f..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/request.rb +++ /dev/null @@ -1,92 +0,0 @@ -module Faraday - # Used to setup urls, params, headers, and the request body in a sane manner. - # - # @connection.post do |req| - # req.url 'http://localhost', 'a' => '1' # 'http://localhost?a=1' - # req.headers['b'] = '2' # Header - # req.params['c'] = '3' # GET Param - # req['b'] = '2' # also Header - # req.body = 'abc' - # end - # - class Request < Struct.new(:method, :path, :params, :headers, :body, :options) - extend MiddlewareRegistry - - register_middleware File.expand_path('../request', __FILE__), - :url_encoded => [:UrlEncoded, 'url_encoded'], - :multipart => [:Multipart, 'multipart'], - :retry => [:Retry, 'retry'], - :authorization => [:Authorization, 'authorization'], - :basic_auth => [:BasicAuthentication, 'basic_authentication'], - :token_auth => [:TokenAuthentication, 'token_authentication'], - :instrumentation => [:Instrumentation, 'instrumentation'] - - def self.create(request_method) - new(request_method).tap do |request| - yield(request) if block_given? - end - end - - # Public: Replace params, preserving the existing hash type - def params=(hash) - if params - params.replace hash - else - super - end - end - - # Public: Replace request headers, preserving the existing hash type - def headers=(hash) - if headers - headers.replace hash - else - super - end - end - - def url(path, params = nil) - if path.respond_to? :query - if query = path.query - path = path.dup - path.query = nil - end - else - path, query = path.split('?', 2) - end - self.path = path - self.params.merge_query query, options.params_encoder - self.params.update(params) if params - end - - def [](key) - headers[key] - end - - def []=(key, value) - headers[key] = value - end - - # ENV Keys - # :method - a symbolized request method (:get, :post) - # :body - the request body that will eventually be converted to a string. - # :url - URI instance for the current request. - # :status - HTTP response status code - # :request_headers - hash of HTTP Headers to be sent to the server - # :response_headers - Hash of HTTP headers from the server - # :parallel_manager - sent if the connection is in parallel mode - # :request - Hash of options for configuring the request. - # :timeout - open/read timeout Integer in seconds - # :open_timeout - read timeout Integer in seconds - # :proxy - Hash of proxy options - # :uri - Proxy Server URI - # :user - Proxy server username - # :password - Proxy server password - # :ssl - Hash of options for configuring SSL requests. - def to_env(connection) - Env.new(method, body, connection.build_exclusive_url(path, params), - options, headers, connection.ssl, connection.parallel_manager) - end - end -end - diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/request/authorization.rb b/.gems/gems/faraday-0.9.0/lib/faraday/request/authorization.rb deleted file mode 100644 index 43b4528..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/request/authorization.rb +++ /dev/null @@ -1,42 +0,0 @@ -module Faraday - class Request::Authorization < Faraday::Middleware - KEY = "Authorization".freeze unless defined? KEY - - # Public - def self.header(type, token) - case token - when String, Symbol - "#{type} #{token}" - when Hash - build_hash(type.to_s, token) - else - raise ArgumentError, "Can't build an Authorization #{type} header from #{token.inspect}" - end - end - - # Internal - def self.build_hash(type, hash) - offset = KEY.size + type.size + 3 - comma = ",\n#{' ' * offset}" - values = [] - hash.each do |key, value| - values << "#{key}=#{value.to_s.inspect}" - end - "#{type} #{values * comma}" - end - - def initialize(app, type, token) - @header_value = self.class.header(type, token) - super(app) - end - - # Public - def call(env) - unless env.request_headers[KEY] - env.request_headers[KEY] = @header_value - end - @app.call(env) - end - end -end - diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/request/basic_authentication.rb b/.gems/gems/faraday-0.9.0/lib/faraday/request/basic_authentication.rb deleted file mode 100644 index 54c8dee..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/request/basic_authentication.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'base64' - -module Faraday - class Request::BasicAuthentication < Request.load_middleware(:authorization) - # Public - def self.header(login, pass) - value = Base64.encode64([login, pass].join(':')) - value.gsub!("\n", '') - super(:Basic, value) - end - end -end - diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/request/instrumentation.rb b/.gems/gems/faraday-0.9.0/lib/faraday/request/instrumentation.rb deleted file mode 100644 index 42af8bc..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/request/instrumentation.rb +++ /dev/null @@ -1,36 +0,0 @@ -module Faraday - class Request::Instrumentation < Faraday::Middleware - class Options < Faraday::Options.new(:name, :instrumenter) - def name - self[:name] ||= 'request.faraday' - end - - def instrumenter - self[:instrumenter] ||= ActiveSupport::Notifications - end - end - - # Public: Instruments requests using Active Support. - # - # Measures time spent only for synchronous requests. - # - # Examples - # - # ActiveSupport::Notifications.subscribe('request.faraday') do |name, starts, ends, _, env| - # url = env[:url] - # http_method = env[:method].to_s.upcase - # duration = ends - starts - # $stderr.puts '[%s] %s %s (%.3f s)' % [url.host, http_method, url.request_uri, duration] - # end - def initialize(app, options = nil) - super(app) - @name, @instrumenter = Options.from(options).values_at(:name, :instrumenter) - end - - def call(env) - @instrumenter.instrument(@name, env) do - @app.call(env) - end - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/request/multipart.rb b/.gems/gems/faraday-0.9.0/lib/faraday/request/multipart.rb deleted file mode 100644 index 38b452a..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/request/multipart.rb +++ /dev/null @@ -1,63 +0,0 @@ -require File.expand_path("../url_encoded", __FILE__) - -module Faraday - class Request::Multipart < Request::UrlEncoded - self.mime_type = 'multipart/form-data'.freeze - DEFAULT_BOUNDARY = "-----------RubyMultipartPost".freeze unless defined? DEFAULT_BOUNDARY - - def call(env) - match_content_type(env) do |params| - env.request.boundary ||= DEFAULT_BOUNDARY - env.request_headers[CONTENT_TYPE] += "; boundary=#{env.request.boundary}" - env.body = create_multipart(env, params) - end - @app.call env - end - - def process_request?(env) - type = request_type(env) - env.body.respond_to?(:each_key) and !env.body.empty? and ( - (type.empty? and has_multipart?(env.body)) or - type == self.class.mime_type - ) - end - - def has_multipart?(obj) - # string is an enum in 1.8, returning list of itself - if obj.respond_to?(:each) && !obj.is_a?(String) - (obj.respond_to?(:values) ? obj.values : obj).each do |val| - return true if (val.respond_to?(:content_type) || has_multipart?(val)) - end - end - false - end - - def create_multipart(env, params) - boundary = env.request.boundary - parts = process_params(params) do |key, value| - Faraday::Parts::Part.new(boundary, key, value) - end - parts << Faraday::Parts::EpiloguePart.new(boundary) - - body = Faraday::CompositeReadIO.new(parts) - env.request_headers[Faraday::Env::ContentLength] = body.length.to_s - return body - end - - def process_params(params, prefix = nil, pieces = nil, &block) - params.inject(pieces || []) do |all, (key, value)| - key = "#{prefix}[#{key}]" if prefix - - case value - when Array - values = value.inject([]) { |a,v| a << [nil, v] } - process_params(values, key, all, &block) - when Hash - process_params(value, key, all, &block) - else - all << block.call(key, value) - end - end - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/request/retry.rb b/.gems/gems/faraday-0.9.0/lib/faraday/request/retry.rb deleted file mode 100644 index 0459b67..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/request/retry.rb +++ /dev/null @@ -1,118 +0,0 @@ -module Faraday - # Catches exceptions and retries each request a limited number of times. - # - # By default, it retries 2 times and handles only timeout exceptions. It can - # be configured with an arbitrary number of retries, a list of exceptions to - # handle, a retry interval, a percentage of randomness to add to the retry - # interval, and a backoff factor. - # - # Examples - # - # Faraday.new do |conn| - # conn.request :retry, max: 2, interval: 0.05, - # interval_randomness: 0.5, backoff_factor: 2 - # exceptions: [CustomException, 'Timeout::Error'] - # conn.adapter ... - # end - # - # This example will result in a first interval that is random between 0.05 and 0.075 and a second - # interval that is random between 0.1 and 0.15 - # - class Request::Retry < Faraday::Middleware - class Options < Faraday::Options.new(:max, :interval, :interval_randomness, :backoff_factor, :exceptions) - def self.from(value) - if Fixnum === value - new(value) - else - super(value) - end - end - - def max - (self[:max] ||= 2).to_i - end - - def interval - (self[:interval] ||= 0).to_f - end - - def interval_randomness - (self[:interval_randomness] ||= 0).to_i - end - - def backoff_factor - (self[:backoff_factor] ||= 1).to_f - end - - def exceptions - Array(self[:exceptions] ||= [Errno::ETIMEDOUT, 'Timeout::Error', - Error::TimeoutError]) - end - - end - - # Public: Initialize middleware - # - # Options: - # max - Maximum number of retries (default: 2) - # interval - Pause in seconds between retries (default: 0) - # interval_randomness - The maximum random interval amount expressed - # as a float between 0 and 1 to use in addition to the - # interval. (default: 0) - # backoff_factor - The amount to multiple each successive retry's - # interval amount by in order to provide backoff - # (default: 1) - # exceptions - The list of exceptions to handle. Exceptions can be - # given as Class, Module, or String. (default: - # [Errno::ETIMEDOUT, Timeout::Error, - # Error::TimeoutError]) - def initialize(app, options = nil) - super(app) - @options = Options.from(options) - @errmatch = build_exception_matcher(@options.exceptions) - end - - def sleep_amount(retries) - retry_index = @options.max - retries - current_interval = @options.interval * (@options.backoff_factor ** retry_index) - random_interval = rand * @options.interval_randomness.to_f * @options.interval - current_interval + random_interval - end - - def call(env) - retries = @options.max - request_body = env[:body] - begin - env[:body] = request_body # after failure env[:body] is set to the response body - @app.call(env) - rescue @errmatch - if retries > 0 - retries -= 1 - sleep sleep_amount(retries + 1) - retry - end - raise - end - end - - # Private: construct an exception matcher object. - # - # An exception matcher for the rescue clause can usually be any object that - # responds to `===`, but for Ruby 1.8 it has to be a Class or Module. - def build_exception_matcher(exceptions) - matcher = Module.new - (class << matcher; self; end).class_eval do - define_method(:===) do |error| - exceptions.any? do |ex| - if ex.is_a? Module - error.is_a? ex - else - error.class.to_s == ex.to_s - end - end - end - end - matcher - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/request/token_authentication.rb b/.gems/gems/faraday-0.9.0/lib/faraday/request/token_authentication.rb deleted file mode 100644 index 2558608..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/request/token_authentication.rb +++ /dev/null @@ -1,15 +0,0 @@ -module Faraday - class Request::TokenAuthentication < Request.load_middleware(:authorization) - # Public - def self.header(token, options = nil) - options ||= {} - options[:token] = token - super(:Token, options) - end - - def initialize(app, token, options = nil) - super(app, token, options) - end - end -end - diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/request/url_encoded.rb b/.gems/gems/faraday-0.9.0/lib/faraday/request/url_encoded.rb deleted file mode 100644 index b02a266..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/request/url_encoded.rb +++ /dev/null @@ -1,36 +0,0 @@ -module Faraday - class Request::UrlEncoded < Faraday::Middleware - CONTENT_TYPE = 'Content-Type'.freeze unless defined? CONTENT_TYPE - - class << self - attr_accessor :mime_type - end - self.mime_type = 'application/x-www-form-urlencoded'.freeze - - def call(env) - match_content_type(env) do |data| - params = Faraday::Utils::ParamsHash[data] - env.body = params.to_query(env.params_encoder) - end - @app.call env - end - - def match_content_type(env) - if process_request?(env) - env.request_headers[CONTENT_TYPE] ||= self.class.mime_type - yield(env.body) unless env.body.respond_to?(:to_str) - end - end - - def process_request?(env) - type = request_type(env) - env.body and (type.empty? or type == self.class.mime_type) - end - - def request_type(env) - type = env.request_headers[CONTENT_TYPE].to_s - type = type.split(';', 2).first if type.index(';') - type - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/response.rb b/.gems/gems/faraday-0.9.0/lib/faraday/response.rb deleted file mode 100644 index fa55958..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/response.rb +++ /dev/null @@ -1,93 +0,0 @@ -require 'forwardable' - -module Faraday - class Response - # Used for simple response middleware. - class Middleware < Faraday::Middleware - def call(env) - @app.call(env).on_complete do |environment| - on_complete(environment) - end - end - - # Override this to modify the environment after the response has finished. - # Calls the `parse` method if defined - def on_complete(env) - env.body = parse(env.body) if respond_to?(:parse) && env.parse_body? - end - end - - extend Forwardable - extend MiddlewareRegistry - - register_middleware File.expand_path('../response', __FILE__), - :raise_error => [:RaiseError, 'raise_error'], - :logger => [:Logger, 'logger'] - - def initialize(env = nil) - @env = Env.from(env) if env - @on_complete_callbacks = [] - end - - attr_reader :env - - def_delegators :env, :to_hash - - def status - finished? ? env.status : nil - end - - def headers - finished? ? env.response_headers : {} - end - def_delegator :headers, :[] - - def body - finished? ? env.body : nil - end - - def finished? - !!env - end - - def on_complete - if not finished? - @on_complete_callbacks << Proc.new - else - yield(env) - end - return self - end - - def finish(env) - raise "response already finished" if finished? - @env = Env.from(env) - @on_complete_callbacks.each { |callback| callback.call(env) } - return self - end - - def success? - finished? && env.success? - end - - # because @on_complete_callbacks cannot be marshalled - def marshal_dump - !finished? ? nil : { - :status => @env.status, :body => @env.body, - :response_headers => @env.response_headers - } - end - - def marshal_load(env) - @env = Env.from(env) - end - - # Expand the env with more properties, without overriding existing ones. - # Useful for applying request params after restoring a marshalled Response. - def apply_request(request_env) - raise "response didn't finish yet" unless finished? - @env = Env.from(request_env).update(@env) - return self - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/response/logger.rb b/.gems/gems/faraday-0.9.0/lib/faraday/response/logger.rb deleted file mode 100644 index cab7f1b..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/response/logger.rb +++ /dev/null @@ -1,34 +0,0 @@ -require 'forwardable' - -module Faraday - class Response::Logger < Response::Middleware - extend Forwardable - - def initialize(app, logger = nil) - super(app) - @logger = logger || begin - require 'logger' - ::Logger.new(STDOUT) - end - end - - def_delegators :@logger, :debug, :info, :warn, :error, :fatal - - def call(env) - info "#{env.method} #{env.url.to_s}" - debug('request') { dump_headers env.request_headers } - super - end - - def on_complete(env) - info('Status') { env.status.to_s } - debug('response') { dump_headers env.response_headers } - end - - private - - def dump_headers(headers) - headers.map { |k, v| "#{k}: #{v.inspect}" }.join("\n") - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/response/raise_error.rb b/.gems/gems/faraday-0.9.0/lib/faraday/response/raise_error.rb deleted file mode 100644 index 437762b..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/response/raise_error.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Faraday - class Response::RaiseError < Response::Middleware - ClientErrorStatuses = 400...600 - - def on_complete(env) - case env[:status] - when 404 - raise Faraday::Error::ResourceNotFound, response_values(env) - when 407 - # mimic the behavior that we get with proxy requests with HTTPS - raise Faraday::Error::ConnectionFailed, %{407 "Proxy Authentication Required "} - when ClientErrorStatuses - raise Faraday::Error::ClientError, response_values(env) - end - end - - def response_values(env) - {:status => env.status, :headers => env.response_headers, :body => env.body} - end - end -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/upload_io.rb b/.gems/gems/faraday-0.9.0/lib/faraday/upload_io.rb deleted file mode 100644 index 9130d15..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/upload_io.rb +++ /dev/null @@ -1,67 +0,0 @@ -begin - require 'composite_io' - require 'parts' - require 'stringio' -rescue LoadError - $stderr.puts "Install the multipart-post gem." - raise -end - -module Faraday - # Similar but not compatible with ::CompositeReadIO provided by multipart-post. - class CompositeReadIO - def initialize(*parts) - @parts = parts.flatten - @ios = @parts.map { |part| part.to_io } - @index = 0 - end - - def length - @parts.inject(0) { |sum, part| sum + part.length } - end - - def rewind - @ios.each { |io| io.rewind } - @index = 0 - end - - # Read from IOs in order until `length` bytes have been received. - def read(length = nil, outbuf = nil) - got_result = false - outbuf = outbuf ? outbuf.replace("") : "" - - while io = current_io - if result = io.read(length) - got_result ||= !result.nil? - result.force_encoding("BINARY") if result.respond_to?(:force_encoding) - outbuf << result - length -= result.length if length - break if length == 0 - end - advance_io - end - (!got_result && length) ? nil : outbuf - end - - def close - @ios.each { |io| io.close } - end - - def ensure_open_and_readable - # Rubinius compatibility - end - - private - - def current_io - @ios[@index] - end - - def advance_io - @index += 1 - end - end - - UploadIO = ::UploadIO - Parts = ::Parts -end diff --git a/.gems/gems/faraday-0.9.0/lib/faraday/utils.rb b/.gems/gems/faraday-0.9.0/lib/faraday/utils.rb deleted file mode 100644 index 1cd6526..0000000 --- a/.gems/gems/faraday-0.9.0/lib/faraday/utils.rb +++ /dev/null @@ -1,297 +0,0 @@ -require 'thread' -Faraday.require_libs 'parameters' - -module Faraday - module Utils - extend self - - # Adapted from Rack::Utils::HeaderHash - class Headers < ::Hash - def self.from(value) - new(value) - end - - def initialize(hash = nil) - super() - @names = {} - self.update(hash || {}) - end - - # need to synchronize concurrent writes to the shared KeyMap - keymap_mutex = Mutex.new - - # symbol -> string mapper + cache - KeyMap = Hash.new do |map, key| - value = if key.respond_to?(:to_str) - key - else - key.to_s.split('_'). # :user_agent => %w(user agent) - each { |w| w.capitalize! }. # => %w(User Agent) - join('-') # => "User-Agent" - end - keymap_mutex.synchronize { map[key] = value } - end - KeyMap[:etag] = "ETag" - - def [](k) - k = KeyMap[k] - super(k) || super(@names[k.downcase]) - end - - def []=(k, v) - k = KeyMap[k] - k = (@names[k.downcase] ||= k) - # join multiple values with a comma - v = v.to_ary.join(', ') if v.respond_to? :to_ary - super(k, v) - end - - def fetch(k, *args, &block) - k = KeyMap[k] - key = @names.fetch(k.downcase, k) - super(key, *args, &block) - end - - def delete(k) - k = KeyMap[k] - if k = @names[k.downcase] - @names.delete k.downcase - super(k) - end - end - - def include?(k) - @names.include? k.downcase - end - - alias_method :has_key?, :include? - alias_method :member?, :include? - alias_method :key?, :include? - - def merge!(other) - other.each { |k, v| self[k] = v } - self - end - alias_method :update, :merge! - - def merge(other) - hash = dup - hash.merge! other - end - - def replace(other) - clear - self.update other - self - end - - def to_hash() ::Hash.new.update(self) end - - def parse(header_string) - return unless header_string && !header_string.empty? - header_string.split(/\r\n/). - tap { |a| a.shift if a.first.index('HTTP/') == 0 }. # drop the HTTP status line - map { |h| h.split(/:\s+/, 2) }.reject { |p| p[0].nil? }. # split key and value, ignore blank lines - each { |key, value| - # join multiple values with a comma - if self[key] - self[key] << ', ' << value - else - self[key] = value - end - } - end - end - - # hash with stringified keys - class ParamsHash < Hash - def [](key) - super(convert_key(key)) - end - - def []=(key, value) - super(convert_key(key), value) - end - - def delete(key) - super(convert_key(key)) - end - - def include?(key) - super(convert_key(key)) - end - - alias_method :has_key?, :include? - alias_method :member?, :include? - alias_method :key?, :include? - - def update(params) - params.each do |key, value| - self[key] = value - end - self - end - alias_method :merge!, :update - - def merge(params) - dup.update(params) - end - - def replace(other) - clear - update(other) - end - - def merge_query(query, encoder = nil) - if query && !query.empty? - update((encoder || Utils.default_params_encoder).decode(query)) - end - self - end - - def to_query(encoder = nil) - (encoder || Utils.default_params_encoder).encode(self) - end - - private - - def convert_key(key) - key.to_s - end - end - - def build_query(params) - FlatParamsEncoder.encode(params) - end - - def build_nested_query(params) - NestedParamsEncoder.encode(params) - end - - ESCAPE_RE = /[^a-zA-Z0-9 .~_-]/ - - def escape(s) - s.to_s.gsub(ESCAPE_RE) {|match| - '%' + match.unpack('H2' * match.bytesize).join('%').upcase - }.tr(' ', '+') - end - - def unescape(s) CGI.unescape s.to_s end - - DEFAULT_SEP = /[&;] */n - - # Adapted from Rack - def parse_query(query) - FlatParamsEncoder.decode(query) - end - - def parse_nested_query(query) - NestedParamsEncoder.decode(query) - end - - def default_params_encoder - @default_params_encoder ||= NestedParamsEncoder - end - - class << self - attr_writer :default_params_encoder - end - - # Stolen from Rack - def normalize_params(params, name, v = nil) - name =~ %r(\A[\[\]]*([^\[\]]+)\]*) - k = $1 || '' - after = $' || '' - - return if k.empty? - - if after == "" - if params[k] - params[k] = Array[params[k]] unless params[k].kind_of?(Array) - params[k] << v - else - params[k] = v - end - elsif after == "[]" - params[k] ||= [] - raise TypeError, "expected Array (got #{params[k].class.name}) for param `#{k}'" unless params[k].is_a?(Array) - params[k] << v - elsif after =~ %r(^\[\]\[([^\[\]]+)\]$) || after =~ %r(^\[\](.+)$) - child_key = $1 - params[k] ||= [] - raise TypeError, "expected Array (got #{params[k].class.name}) for param `#{k}'" unless params[k].is_a?(Array) - if params[k].last.is_a?(Hash) && !params[k].last.key?(child_key) - normalize_params(params[k].last, child_key, v) - else - params[k] << normalize_params({}, child_key, v) - end - else - params[k] ||= {} - raise TypeError, "expected Hash (got #{params[k].class.name}) for param `#{k}'" unless params[k].is_a?(Hash) - params[k] = normalize_params(params[k], after, v) - end - - return params - end - - # Normalize URI() behavior across Ruby versions - # - # url - A String or URI. - # - # Returns a parsed URI. - def URI(url) - if url.respond_to?(:host) - url - elsif url.respond_to?(:to_str) - default_uri_parser.call(url) - else - raise ArgumentError, "bad argument (expected URI object or URI string)" - end - end - - def default_uri_parser - @default_uri_parser ||= begin - require 'uri' - Kernel.method(:URI) - end - end - - def default_uri_parser=(parser) - @default_uri_parser = if parser.respond_to?(:call) || parser.nil? - parser - else - parser.method(:parse) - end - end - - # Receives a String or URI and returns just the path with the query string sorted. - def normalize_path(url) - url = URI(url) - (url.path.start_with?('/') ? url.path : '/' + url.path) + - (url.query ? "?#{sort_query_params(url.query)}" : "") - end - - # Recursive hash update - def deep_merge!(target, hash) - hash.each do |key, value| - if Hash === value and Hash === target[key] - target[key] = deep_merge(target[key], value) - else - target[key] = value - end - end - target - end - - # Recursive hash merge - def deep_merge(source, hash) - deep_merge!(source.dup, hash) - end - - protected - - def sort_query_params(query) - query.split('&').sort.join('&') - end - end -end diff --git a/.gems/gems/faraday-0.9.0/script/console b/.gems/gems/faraday-0.9.0/script/console deleted file mode 100755 index 5d18d7a..0000000 --- a/.gems/gems/faraday-0.9.0/script/console +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -# Usage: script/console -# Starts an IRB console with this library loaded. - -gemspec="$(ls *.gemspec | head -1)" - -exec bundle exec irb -r "${gemspec%.*}" diff --git a/.gems/gems/faraday-0.9.0/script/generate_certs b/.gems/gems/faraday-0.9.0/script/generate_certs deleted file mode 100755 index 30063f7..0000000 --- a/.gems/gems/faraday-0.9.0/script/generate_certs +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env ruby -# Usage: generate_certs -# Generate test certs for testing Faraday with SSL - -require 'openssl' -require 'fileutils' - -$shell = ARGV.include? '-s' - -# Adapted from WEBrick::Utils. Skips cert extensions so it -# can be used as a CA bundle -def create_self_signed_cert(bits, cn, comment) - rsa = OpenSSL::PKey::RSA.new(bits) - cert = OpenSSL::X509::Certificate.new - cert.version = 2 - cert.serial = 1 - name = OpenSSL::X509::Name.new(cn) - cert.subject = name - cert.issuer = name - cert.not_before = Time.now - cert.not_after = Time.now + (365*24*60*60) - cert.public_key = rsa.public_key - cert.sign(rsa, OpenSSL::Digest::SHA1.new) - return [cert, rsa] -end - -def write(file, contents, env_var) - FileUtils.mkdir_p(File.dirname(file)) - File.open(file, 'w') {|f| f.puts(contents) } - puts %(export #{env_var}="#{file}") if $shell -end - - -# One cert / CA for ease of testing when ignoring verification -cert, key = create_self_signed_cert(1024, [['CN', 'localhost']], 'Faraday Test CA') -write 'tmp/faraday-cert.key', key, 'SSL_KEY' -write 'tmp/faraday-cert.crt', cert, 'SSL_FILE' - -# And a second CA to prove that verification can fail -cert, key = create_self_signed_cert(1024, [['CN', 'real-ca.com']], 'A different CA') -write 'tmp/faraday-different-ca-cert.key', key, 'SSL_KEY_ALT' -write 'tmp/faraday-different-ca-cert.crt', cert, 'SSL_FILE_ALT' diff --git a/.gems/gems/faraday-0.9.0/script/package b/.gems/gems/faraday-0.9.0/script/package deleted file mode 100755 index 926f489..0000000 --- a/.gems/gems/faraday-0.9.0/script/package +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -# Usage: script/gem -# Updates the gemspec and builds a new gem in the pkg directory. - -mkdir -p pkg -gem build *.gemspec -mv *.gem pkg diff --git a/.gems/gems/faraday-0.9.0/script/proxy-server b/.gems/gems/faraday-0.9.0/script/proxy-server deleted file mode 100755 index e5ba4bc..0000000 --- a/.gems/gems/faraday-0.9.0/script/proxy-server +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env ruby -# Usage: script/proxy-server [-p PORT] [-u USER:PASSWORD] -require 'webrick' -require 'webrick/httpproxy' - -port = 4001 - -if found = ARGV.index('-p') - port = ARGV[found + 1].to_i -end -if found = ARGV.index('-u') - username, password = ARGV[found + 1].split(':', 2) -end - -match_credentials = lambda { |credentials| - got_username, got_password = credentials.to_s.unpack("m*")[0].split(":", 2) - got_username == username && got_password == password -} - -log_io = $stdout -log_io.sync = true - -webrick_opts = { - :Port => port, :Logger => WEBrick::Log::new(log_io), - :AccessLog => [[log_io, "[%{X-Faraday-Adapter}i] %m %U -> %s %b"]], - :ProxyAuthProc => lambda { |req, res| - if username - type, credentials = req.header['proxy-authorization'].first.to_s.split(/\s+/, 2) - unless "Basic" == type && match_credentials.call(credentials) - res['proxy-authenticate'] = %{Basic realm="testing"} - raise WEBrick::HTTPStatus::ProxyAuthenticationRequired - end - end - } -} - -proxy = WEBrick::HTTPProxyServer.new(webrick_opts) - -trap(:TERM) { proxy.shutdown } -trap(:INT) { proxy.shutdown } - -proxy.start diff --git a/.gems/gems/faraday-0.9.0/script/release b/.gems/gems/faraday-0.9.0/script/release deleted file mode 100755 index ed73118..0000000 --- a/.gems/gems/faraday-0.9.0/script/release +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -# Usage: script/release -# Build the package, tag a commit, push it to origin, and then release the -# package publicly. - -set -e - -version="$(script/package | grep Version: | awk '{print $2}')" -[ -n "$version" ] || exit 1 - -git commit --allow-empty -a -m "Release $version" -git tag "v$version" -git push origin -git push origin "v$version" -git push legacy -git push legacy "v$version" -gem push pkg/*-${version}.gem diff --git a/.gems/gems/faraday-0.9.0/script/server b/.gems/gems/faraday-0.9.0/script/server deleted file mode 100755 index f497d35..0000000 --- a/.gems/gems/faraday-0.9.0/script/server +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env ruby -old_verbose, $VERBOSE = $VERBOSE, nil -begin - require File.expand_path('../../test/live_server', __FILE__) -ensure - $VERBOSE = old_verbose -end -require 'webrick' - -port = 4000 -if found = ARGV.index('-p') - port = ARGV[found + 1].to_i -end - -log_io = $stdout -log_io.sync = true - -webrick_opts = { - :Port => port, :Logger => WEBrick::Log::new(log_io), - :AccessLog => [[log_io, "[%{X-Faraday-Adapter}i] %m %U -> %s %b"]] -} - -if ENV['SSL_KEY'] - require 'openssl' - require 'webrick/https' - webrick_opts.update \ - :SSLEnable => true, - :SSLPrivateKey => OpenSSL::PKey::RSA.new(File.read(ENV['SSL_KEY'])), - :SSLCertificate => OpenSSL::X509::Certificate.new(File.read(ENV['SSL_FILE'])), - :SSLVerifyClient => OpenSSL::SSL::VERIFY_NONE -end - -Rack::Handler::WEBrick.run(Faraday::LiveServer, webrick_opts) do |server| - trap(:INT) { server.stop } - trap(:TERM) { server.stop } -end diff --git a/.gems/gems/faraday-0.9.0/script/test b/.gems/gems/faraday-0.9.0/script/test deleted file mode 100755 index beb9af2..0000000 --- a/.gems/gems/faraday-0.9.0/script/test +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env bash -# Usage: script/test [file] [adapter]... -- [test/unit options] -# Runs the test suite against a local server spawned automatically in a -# thread. After tests are done, the server is shut down. -# -# If filename arguments are given, only those files are run. If arguments given -# are not filenames, they are taken as words that filter the list of files to run. -# -# Examples: -# -# $ script/test -# $ script/test test/env_test.rb -# $ script/test excon typhoeus -# -# # Run only tests matching /ssl/ for the net_http adapter, with SSL enabled. -# $ SSL=yes script/test net_http -- -n /ssl/ -# -# # Run against multiple rbenv versions -# $ RBENV_VERSIONS="1.9.3-p194 ree-1.8.7-2012.02" script/test -set -e - -if [[ "$RUBYOPT" != *"bundler/setup"* ]]; then - export RUBYOPT="-rbundler/setup $RUBYOPT" -fi - -port=3999 -proxy_port=3998 -scheme=http - -if [ "$SSL" = "yes" ]; then - scheme=https - if [ -z "$SSL_KEY" ] || [ -z "$SSL_FILE" ]; then - eval "$(script/generate_certs -s)" - fi -fi - -find_test_files() { - find "$1" -name '*_test.rb' -} - -filter_matching() { - pattern="$1" - shift - for line in "$@"; do - [[ $line == *"$pattern"* ]] && echo "$line" - done -} - -start_server() { - mkdir -p log - script/server -p $port >log/test.log 2>&1 & - echo $! -} - -start_proxy() { - mkdir -p log - script/proxy-server -p $proxy_port -u "faraday@test.local:there is cake" >log/proxy.log 2>&1 & - echo $! -} - -server_started() { - lsof -i :${1?} >/dev/null -} - -timestamp() { - date +%s -} - -wait_for_server() { - timeout=$(( `timestamp` + $1 )) - while true; do - if server_started "$2"; then - break - elif [ `timestamp` -gt "$timeout" ]; then - echo "timed out after $1 seconds" >&2 - return 1 - fi - done -} - -filtered= -IFS=$'\n' test_files=($(find_test_files "test")) -declare -a explicit_files - -# Process filter arguments: -# - test filenames as taken as-is -# - other words are taken as pattern to match the list of known files against -# - arguments after "--" are forwarded to the ruby process -while [ $# -gt 0 ]; do - arg="$1" - shift - if [ "$arg" = "--" ]; then - break - elif [ -f "$arg" ]; then - filtered=true - explicit_files[${#explicit_files[@]}+1]="$arg" - else - filtered=true - IFS=$'\n' explicit_files=( - ${explicit_files[@]} - $(filter_matching "$arg" "${test_files[@]}" || true) - ) - fi -done - -# If there were filter args, replace test files list with the results -if [ -n "$filtered" ]; then - if [ ${#explicit_files[@]} -eq 0 ]; then - echo "Error: no test files match" >&2 - exit 1 - else - test_files=(${explicit_files[@]}) - echo running "${test_files[@]}" - fi -fi - -# If there are any adapter tests, spin up the HTTP server -if [ -n "$(filter_matching "adapters" "${test_files[@]}")" ]; then - if server_started $port; then - echo "aborted: another instance of server running on $port" >&2 - exit 1 - fi - server_pid=$(start_server) - proxy_pid=$(start_proxy) - wait_for_server 30 $port || { - cat log/test.log - kill "$server_pid" - kill "$proxy_pid" - exit 1 - } - wait_for_server 5 $proxy_port - cleanup() { - if [ $? -ne 0 ] && [ -n "$TRAVIS" ]; then - cat log/test.log - fi - kill "$server_pid" - kill "$proxy_pid" - } - trap cleanup INT EXIT - export LIVE="${scheme}://localhost:${port}" - export LIVE_PROXY="http://faraday%40test.local:there%20is%20cake@localhost:${proxy_port}" -fi - -warnings="${TMPDIR:-/tmp}/faraday-warnings.$$" - -run_test_files() { - # Save warnings on stderr to a separate file - RUBYOPT="$RUBYOPT -w" ruby -e 'while f=ARGV.shift and f!="--"; load f; end' "${test_files[@]}" -- "$@" \ - 2> >(tee >(grep 'warning:' >"$warnings") | grep -v 'warning:') -} - -check_warnings() { - # Display Ruby warnings from this project's source files. Abort if any were found. - num="$(grep -F "$PWD" "$warnings" | grep -v "${PWD}/bundle" | sort | uniq -c | sort -rn | tee /dev/stderr | wc -l)" - rm -f "$warnings" - if [ "$num" -gt 0 ]; then - echo "FAILED: this test suite doesn't tolerate Ruby syntax warnings!" >&2 - exit 1 - fi -} - -if [ -n "$RBENV_VERSIONS" ]; then - IFS=' ' versions=($RBENV_VERSIONS) - for version in "${versions[@]}"; do - echo "[${version}]" - RBENV_VERSION="$version" run_test_files "$@" - done -else - run_test_files "$@" -fi - -check_warnings diff --git a/.gems/gems/faraday-0.9.0/test/adapters/default_test.rb b/.gems/gems/faraday-0.9.0/test/adapters/default_test.rb deleted file mode 100644 index 400baab..0000000 --- a/.gems/gems/faraday-0.9.0/test/adapters/default_test.rb +++ /dev/null @@ -1,14 +0,0 @@ -require File.expand_path('../integration', __FILE__) - -module Adapters - class DefaultTest < Faraday::TestCase - - def adapter() :default end - - Integration.apply(self, :NonParallel) do - # default stack is not configured with Multipart - undef :test_POST_sends_files - end - - end -end diff --git a/.gems/gems/faraday-0.9.0/test/adapters/em_http_test.rb b/.gems/gems/faraday-0.9.0/test/adapters/em_http_test.rb deleted file mode 100644 index f122090..0000000 --- a/.gems/gems/faraday-0.9.0/test/adapters/em_http_test.rb +++ /dev/null @@ -1,20 +0,0 @@ -require File.expand_path('../integration', __FILE__) - -module Adapters - class EMHttpTest < Faraday::TestCase - - def adapter() :em_http end - - Integration.apply(self, :Parallel) do - # https://github.com/eventmachine/eventmachine/pull/289 - undef :test_timeout - - def test_binds_local_socket - host = '1.2.3.4' - conn = create_connection :request => { :bind => { :host => host } } - assert_equal host, conn.options[:bind][:host] - end - end unless jruby? and ssl_mode? - # https://github.com/eventmachine/eventmachine/issues/180 - end -end diff --git a/.gems/gems/faraday-0.9.0/test/adapters/em_synchrony_test.rb b/.gems/gems/faraday-0.9.0/test/adapters/em_synchrony_test.rb deleted file mode 100644 index 59cdef7..0000000 --- a/.gems/gems/faraday-0.9.0/test/adapters/em_synchrony_test.rb +++ /dev/null @@ -1,20 +0,0 @@ -require File.expand_path('../integration', __FILE__) - -module Adapters - class EMSynchronyTest < Faraday::TestCase - - def adapter() :em_synchrony end - - Integration.apply(self, :Parallel) do - # https://github.com/eventmachine/eventmachine/pull/289 - undef :test_timeout - - def test_binds_local_socket - host = '1.2.3.4' - conn = create_connection :request => { :bind => { :host => host } } - #put conn.get('/who-am-i').body - assert_equal host, conn.options[:bind][:host] - end - end unless RUBY_VERSION < '1.9' or jruby? - end -end diff --git a/.gems/gems/faraday-0.9.0/test/adapters/excon_test.rb b/.gems/gems/faraday-0.9.0/test/adapters/excon_test.rb deleted file mode 100644 index f7b9967..0000000 --- a/.gems/gems/faraday-0.9.0/test/adapters/excon_test.rb +++ /dev/null @@ -1,20 +0,0 @@ -require File.expand_path('../integration', __FILE__) - -module Adapters - class ExconTest < Faraday::TestCase - - def adapter() :excon end - - Integration.apply(self, :NonParallel) do - # https://github.com/geemus/excon/issues/126 ? - undef :test_timeout if ssl_mode? - - # Excon lets OpenSSL::SSL::SSLError be raised without any way to - # distinguish whether it happened because of a 407 proxy response - undef :test_proxy_auth_fail if ssl_mode? - - # https://github.com/geemus/excon/issues/358 - undef :test_connection_error if RUBY_VERSION >= '2.1.0' - end - end -end diff --git a/.gems/gems/faraday-0.9.0/test/adapters/httpclient_test.rb b/.gems/gems/faraday-0.9.0/test/adapters/httpclient_test.rb deleted file mode 100644 index ba93ccc..0000000 --- a/.gems/gems/faraday-0.9.0/test/adapters/httpclient_test.rb +++ /dev/null @@ -1,21 +0,0 @@ -require File.expand_path('../integration', __FILE__) - -module Adapters - class HttpclientTest < Faraday::TestCase - - def adapter() :httpclient end - - Integration.apply(self, :NonParallel) do - def setup - require 'httpclient' unless defined?(HTTPClient) - HTTPClient::NO_PROXY_HOSTS.delete('localhost') - end - - def test_binds_local_socket - host = '1.2.3.4' - conn = create_connection :request => { :bind => { :host => host } } - assert_equal host, conn.options[:bind][:host] - end - end - end -end diff --git a/.gems/gems/faraday-0.9.0/test/adapters/integration.rb b/.gems/gems/faraday-0.9.0/test/adapters/integration.rb deleted file mode 100644 index 45445fe..0000000 --- a/.gems/gems/faraday-0.9.0/test/adapters/integration.rb +++ /dev/null @@ -1,254 +0,0 @@ -require 'forwardable' -require File.expand_path("../../helper", __FILE__) -Faraday.require_lib 'autoload' - -module Adapters - # Adapter integration tests. To use, implement two methods: - # - # `#adapter` required. returns a symbol for the adapter middleware name - # `#adapter_options` optional. extra arguments for building an adapter - module Integration - def self.apply(base, *extra_features) - if base.live_server? - features = [:Common] - features.concat extra_features - features << :SSL if base.ssl_mode? - features.each {|name| base.send(:include, self.const_get(name)) } - yield if block_given? - elsif !defined? @warned - warn "Warning: Not running integration tests against a live server." - warn "Start the server `ruby test/live_server.rb` and set the LIVE=1 env variable." - @warned = true - end - end - - module Parallel - def test_in_parallel - resp1, resp2 = nil, nil - - connection = create_connection - connection.in_parallel do - resp1 = connection.get('echo?a=1') - resp2 = connection.get('echo?b=2') - assert connection.in_parallel? - assert_nil resp1.body - assert_nil resp2.body - end - assert !connection.in_parallel? - assert_equal 'get ?{"a"=>"1"}', resp1.body - assert_equal 'get ?{"b"=>"2"}', resp2.body - end - end - - module NonParallel - def test_no_parallel_support - connection = create_connection - response = nil - - err = capture_warnings do - connection.in_parallel do - response = connection.get('echo').body - end - end - assert response - assert_match "no parallel-capable adapter on Faraday stack", err - assert_match __FILE__, err - end - end - - module Compression - def test_GET_handles_compression - res = get('echo_header', :name => 'accept-encoding') - assert_match(/gzip;.+\bdeflate\b/, res.body) - end - end - - module SSL - def test_GET_ssl_fails_with_bad_cert - ca_file = 'tmp/faraday-different-ca-cert.crt' - conn = create_connection(:ssl => {:ca_file => ca_file}) - err = assert_raises Faraday::SSLError do - conn.get('/ssl') - end - assert_includes err.message, "certificate" - end - end - - module Common - extend Forwardable - def_delegators :create_connection, :get, :head, :put, :post, :patch, :delete, :run_request - - def test_GET_retrieves_the_response_body - assert_equal 'get', get('echo').body - end - - def test_GET_send_url_encoded_params - assert_equal %(get ?{"name"=>"zack"}), get('echo', :name => 'zack').body - end - - def test_GET_retrieves_the_response_headers - response = get('echo') - assert_match(/text\/plain/, response.headers['Content-Type'], 'original case fail') - assert_match(/text\/plain/, response.headers['content-type'], 'lowercase fail') - end - - def test_GET_handles_headers_with_multiple_values - assert_equal 'one, two', get('multi').headers['set-cookie'] - end - - def test_GET_with_body - response = get('echo') do |req| - req.body = {'bodyrock' => true} - end - assert_equal %(get {"bodyrock"=>"true"}), response.body - end - - def test_GET_sends_user_agent - response = get('echo_header', {:name => 'user-agent'}, :user_agent => 'Agent Faraday') - assert_equal 'Agent Faraday', response.body - end - - def test_GET_ssl - expected = self.class.ssl_mode?.to_s - assert_equal expected, get('ssl').body - end - - def test_POST_send_url_encoded_params - assert_equal %(post {"name"=>"zack"}), post('echo', :name => 'zack').body - end - - def test_POST_send_url_encoded_nested_params - resp = post('echo', 'name' => {'first' => 'zack'}) - assert_equal %(post {"name"=>{"first"=>"zack"}}), resp.body - end - - def test_POST_retrieves_the_response_headers - assert_match(/text\/plain/, post('echo').headers['content-type']) - end - - def test_POST_sends_files - resp = post('file') do |req| - req.body = {'uploaded_file' => Faraday::UploadIO.new(__FILE__, 'text/x-ruby')} - end - assert_equal "file integration.rb text/x-ruby #{File.size(__FILE__)}", resp.body - end - - def test_PUT_send_url_encoded_params - assert_equal %(put {"name"=>"zack"}), put('echo', :name => 'zack').body - end - - def test_PUT_send_url_encoded_nested_params - resp = put('echo', 'name' => {'first' => 'zack'}) - assert_equal %(put {"name"=>{"first"=>"zack"}}), resp.body - end - - def test_PUT_retrieves_the_response_headers - assert_match(/text\/plain/, put('echo').headers['content-type']) - end - - def test_PATCH_send_url_encoded_params - assert_equal %(patch {"name"=>"zack"}), patch('echo', :name => 'zack').body - end - - def test_OPTIONS - resp = run_request(:options, 'echo', nil, {}) - assert_equal 'options', resp.body - end - - def test_HEAD_retrieves_no_response_body - assert_equal '', head('echo').body - end - - def test_HEAD_retrieves_the_response_headers - assert_match(/text\/plain/, head('echo').headers['content-type']) - end - - def test_DELETE_retrieves_the_response_headers - assert_match(/text\/plain/, delete('echo').headers['content-type']) - end - - def test_DELETE_retrieves_the_body - assert_equal %(delete), delete('echo').body - end - - def test_timeout - conn = create_connection(:request => {:timeout => 1, :open_timeout => 1}) - assert_raises Faraday::Error::TimeoutError do - conn.get '/slow' - end - end - - def test_connection_error - assert_raises Faraday::Error::ConnectionFailed do - get 'http://localhost:4' - end - end - - def test_proxy - proxy_uri = URI(ENV['LIVE_PROXY']) - conn = create_connection(:proxy => proxy_uri) - - res = conn.get '/echo' - assert_equal 'get', res.body - - unless self.class.ssl_mode? - # proxy can't append "Via" header for HTTPS responses - assert_match(/:#{proxy_uri.port}$/, res['via']) - end - end - - def test_proxy_auth_fail - proxy_uri = URI(ENV['LIVE_PROXY']) - proxy_uri.password = 'WRONG' - conn = create_connection(:proxy => proxy_uri) - - err = assert_raises Faraday::Error::ConnectionFailed do - conn.get '/echo' - end - - unless self.class.ssl_mode? && self.class.jruby? - # JRuby raises "End of file reached" which cannot be distinguished from a 407 - assert_equal %{407 "Proxy Authentication Required "}, err.message - end - end - - def test_empty_body_response_represented_as_blank_string - response = get('204') - assert_equal '', response.body - end - - def adapter - raise NotImplementedError.new("Need to override #adapter") - end - - # extra options to pass when building the adapter - def adapter_options - [] - end - - def create_connection(options = {}) - if adapter == :default - builder_block = nil - else - builder_block = Proc.new do |b| - b.request :multipart - b.request :url_encoded - b.adapter adapter, *adapter_options - end - end - - server = self.class.live_server - url = '%s://%s:%d' % [server.scheme, server.host, server.port] - - options[:ssl] ||= {} - options[:ssl][:ca_file] ||= ENV['SSL_FILE'] - - Faraday::Connection.new(url, options, &builder_block).tap do |conn| - conn.headers['X-Faraday-Adapter'] = adapter.to_s - adapter_handler = conn.builder.handlers.last - conn.builder.insert_before adapter_handler, Faraday::Response::RaiseError - end - end - end - end -end diff --git a/.gems/gems/faraday-0.9.0/test/adapters/logger_test.rb b/.gems/gems/faraday-0.9.0/test/adapters/logger_test.rb deleted file mode 100644 index 7a71ca6..0000000 --- a/.gems/gems/faraday-0.9.0/test/adapters/logger_test.rb +++ /dev/null @@ -1,37 +0,0 @@ -require File.expand_path('../../helper', __FILE__) -require 'stringio' -require 'logger' - -module Adapters - class LoggerTest < Faraday::TestCase - def setup - @io = StringIO.new - @logger = Logger.new(@io) - @logger.level = Logger::DEBUG - - @conn = Faraday.new do |b| - b.response :logger, @logger - b.adapter :test do |stubs| - stubs.get('/hello') { [200, {'Content-Type' => 'text/html'}, 'hello'] } - end - end - @resp = @conn.get '/hello', nil, :accept => 'text/html' - end - - def test_still_returns_output - assert_equal 'hello', @resp.body - end - - def test_logs_method_and_url - assert_match "get http:/hello", @io.string - end - - def test_logs_request_headers - assert_match %(Accept: "text/html), @io.string - end - - def test_logs_response_headers - assert_match %(Content-Type: "text/html), @io.string - end - end -end diff --git a/.gems/gems/faraday-0.9.0/test/adapters/net_http_persistent_test.rb b/.gems/gems/faraday-0.9.0/test/adapters/net_http_persistent_test.rb deleted file mode 100644 index edd986a..0000000 --- a/.gems/gems/faraday-0.9.0/test/adapters/net_http_persistent_test.rb +++ /dev/null @@ -1,20 +0,0 @@ -require File.expand_path('../integration', __FILE__) - -module Adapters - class NetHttpPersistentTest < Faraday::TestCase - - def adapter() :net_http_persistent end - - Integration.apply(self, :NonParallel) do - def setup - if defined?(Net::HTTP::Persistent) - # work around problems with mixed SSL certificates - # https://github.com/drbrain/net-http-persistent/issues/45 - http = Net::HTTP::Persistent.new('Faraday') - http.ssl_cleanup(4) - end - end if ssl_mode? - end - - end -end diff --git a/.gems/gems/faraday-0.9.0/test/adapters/net_http_test.rb b/.gems/gems/faraday-0.9.0/test/adapters/net_http_test.rb deleted file mode 100644 index 810fad4..0000000 --- a/.gems/gems/faraday-0.9.0/test/adapters/net_http_test.rb +++ /dev/null @@ -1,14 +0,0 @@ -require File.expand_path('../integration', __FILE__) - -module Adapters - class NetHttpTest < Faraday::TestCase - - def adapter() :net_http end - - behaviors = [:NonParallel] - behaviors << :Compression if RUBY_VERSION >= '1.9' - - Integration.apply(self, *behaviors) - - end -end diff --git a/.gems/gems/faraday-0.9.0/test/adapters/patron_test.rb b/.gems/gems/faraday-0.9.0/test/adapters/patron_test.rb deleted file mode 100644 index 828d7fb..0000000 --- a/.gems/gems/faraday-0.9.0/test/adapters/patron_test.rb +++ /dev/null @@ -1,20 +0,0 @@ -require File.expand_path('../integration', __FILE__) - -module Adapters - class Patron < Faraday::TestCase - - def adapter() :patron end - - Integration.apply(self, :NonParallel) do - # https://github.com/toland/patron/issues/34 - undef :test_PATCH_send_url_encoded_params - - # https://github.com/toland/patron/issues/52 - undef :test_GET_with_body - - # no support for SSL peer verification - undef :test_GET_ssl_fails_with_bad_cert if ssl_mode? - end unless jruby? - - end -end diff --git a/.gems/gems/faraday-0.9.0/test/adapters/rack_test.rb b/.gems/gems/faraday-0.9.0/test/adapters/rack_test.rb deleted file mode 100644 index 545099c..0000000 --- a/.gems/gems/faraday-0.9.0/test/adapters/rack_test.rb +++ /dev/null @@ -1,31 +0,0 @@ -require File.expand_path("../integration", __FILE__) -require File.expand_path('../../live_server', __FILE__) - -module Adapters - class RackTest < Faraday::TestCase - - def adapter() :rack end - - def adapter_options - [Faraday::LiveServer] - end - - # no Integration.apply because this doesn't require a server as a separate process - include Integration::Common - include Integration::NonParallel - - # not using shared test because error is swallowed by Sinatra - def test_timeout - conn = create_connection(:request => {:timeout => 1, :open_timeout => 1}) - begin - conn.get '/slow' - rescue Faraday::Error::ClientError - end - end - - # test not applicable - undef test_connection_error - undef test_proxy - undef test_proxy_auth_fail - end -end diff --git a/.gems/gems/faraday-0.9.0/test/adapters/test_middleware_test.rb b/.gems/gems/faraday-0.9.0/test/adapters/test_middleware_test.rb deleted file mode 100644 index 2acd4a4..0000000 --- a/.gems/gems/faraday-0.9.0/test/adapters/test_middleware_test.rb +++ /dev/null @@ -1,114 +0,0 @@ -require File.expand_path('../../helper', __FILE__) - -module Adapters - class TestMiddleware < Faraday::TestCase - Stubs = Faraday::Adapter.lookup_middleware(:test)::Stubs - def setup - @stubs = Stubs.new - @conn = Faraday.new do |builder| - builder.adapter :test, @stubs - end - @stubs.get('/hello') { [200, {'Content-Type' => 'text/html'}, 'hello'] } - @resp = @conn.get('/hello') - end - - def test_middleware_with_simple_path_sets_status - assert_equal 200, @resp.status - end - - def test_middleware_with_simple_path_sets_headers - assert_equal 'text/html', @resp.headers['Content-Type'] - end - - def test_middleware_with_simple_path_sets_body - assert_equal 'hello', @resp.body - end - - def test_middleware_can_be_called_several_times - assert_equal 'hello', @conn.get("/hello").body - end - - def test_middleware_with_get_params - @stubs.get('/param?a=1') { [200, {}, 'a'] } - assert_equal 'a', @conn.get('/param?a=1').body - end - - def test_middleware_ignores_unspecified_get_params - @stubs.get('/optional?a=1') { [200, {}, 'a'] } - assert_equal 'a', @conn.get('/optional?a=1&b=1').body - assert_equal 'a', @conn.get('/optional?a=1').body - assert_raises Faraday::Adapter::Test::Stubs::NotFound do - @conn.get('/optional') - end - end - - def test_middleware_with_http_headers - @stubs.get('/yo', { 'X-HELLO' => 'hello' }) { [200, {}, 'a'] } - @stubs.get('/yo') { [200, {}, 'b'] } - assert_equal 'a', @conn.get('/yo') { |env| env.headers['X-HELLO'] = 'hello' }.body - assert_equal 'b', @conn.get('/yo').body - end - - def test_middleware_allow_different_outcomes_for_the_same_request - @stubs.get('/hello') { [200, {'Content-Type' => 'text/html'}, 'hello'] } - @stubs.get('/hello') { [200, {'Content-Type' => 'text/html'}, 'world'] } - assert_equal 'hello', @conn.get("/hello").body - assert_equal 'world', @conn.get("/hello").body - end - - def test_yields_env_to_stubs - @stubs.get '/hello' do |env| - assert_equal '/hello', env[:url].path - assert_equal 'foo.com', env[:url].host - assert_equal '1', env[:params]['a'] - assert_equal 'text/plain', env[:request_headers]['Accept'] - [200, {}, 'a'] - end - - @conn.headers['Accept'] = 'text/plain' - assert_equal 'a', @conn.get('http://foo.com/hello?a=1').body - end - - def test_parses_params_with_default_encoder - @stubs.get '/hello' do |env| - assert_equal '1', env[:params]['a']['b'] - [200, {}, 'a'] - end - - assert_equal 'a', @conn.get('http://foo.com/hello?a[b]=1').body - end - - def test_parses_params_with_nested_encoder - @stubs.get '/hello' do |env| - assert_equal '1', env[:params]['a']['b'] - [200, {}, 'a'] - end - - @conn.options.params_encoder = Faraday::NestedParamsEncoder - assert_equal 'a', @conn.get('http://foo.com/hello?a[b]=1').body - end - - def test_parses_params_with_flat_encoder - @stubs.get '/hello' do |env| - assert_equal '1', env[:params]['a[b]'] - [200, {}, 'a'] - end - - @conn.options.params_encoder = Faraday::FlatParamsEncoder - assert_equal 'a', @conn.get('http://foo.com/hello?a[b]=1').body - end - - def test_raises_an_error_if_no_stub_is_found_for_request - assert_raises Stubs::NotFound do - @conn.get('/invalid'){ [200, {}, []] } - end - end - - def test_raises_an_error_if_no_stub_is_found_for_request_without_this_header - @stubs.get('/yo', { 'X-HELLO' => 'hello' }) { [200, {}, 'a'] } - assert_raises Faraday::Adapter::Test::Stubs::NotFound do - @conn.get('/yo') - end - end - end -end diff --git a/.gems/gems/faraday-0.9.0/test/adapters/typhoeus_test.rb b/.gems/gems/faraday-0.9.0/test/adapters/typhoeus_test.rb deleted file mode 100644 index 5ddc50b..0000000 --- a/.gems/gems/faraday-0.9.0/test/adapters/typhoeus_test.rb +++ /dev/null @@ -1,28 +0,0 @@ -require File.expand_path('../integration', __FILE__) - -module Adapters - class TyphoeusTest < Faraday::TestCase - - def adapter() :typhoeus end - - Integration.apply(self, :Parallel) do - # https://github.com/dbalatero/typhoeus/issues/75 - undef :test_GET_with_body - - # Not a Typhoeus bug, but WEBrick inability to handle "100-continue" - # which libcurl seems to generate for this particular request: - undef :test_POST_sends_files - - # inconsistent outcomes ranging from successful response to connection error - undef :test_proxy_auth_fail if ssl_mode? - - def test_binds_local_socket - host = '1.2.3.4' - conn = create_connection :request => { :bind => { :host => host } } - assert_equal host, conn.options[:bind][:host] - end - - end unless jruby? - end -end - diff --git a/.gems/gems/faraday-0.9.0/test/authentication_middleware_test.rb b/.gems/gems/faraday-0.9.0/test/authentication_middleware_test.rb deleted file mode 100644 index 1fbad61..0000000 --- a/.gems/gems/faraday-0.9.0/test/authentication_middleware_test.rb +++ /dev/null @@ -1,65 +0,0 @@ -require File.expand_path('../helper', __FILE__) - -class AuthenticationMiddlewareTest < Faraday::TestCase - def conn - Faraday::Connection.new('http://example.net/') do |builder| - yield(builder) - builder.adapter :test do |stub| - stub.get('/auth-echo') do |env| - [200, {}, env[:request_headers]['Authorization']] - end - end - end - end - - def test_basic_middleware_adds_basic_header - response = conn { |b| b.request :basic_auth, 'aladdin', 'opensesame' }.get('/auth-echo') - assert_equal 'Basic YWxhZGRpbjpvcGVuc2VzYW1l', response.body - end - - def test_basic_middleware_adds_basic_header_correctly_with_long_values - response = conn { |b| b.request :basic_auth, 'A' * 255, '' }.get('/auth-echo') - assert_equal "Basic #{'QUFB' * 85}Og==", response.body - end - - def test_basic_middleware_does_not_interfere_with_existing_authorization - response = conn { |b| b.request :basic_auth, 'aladdin', 'opensesame' }. - get('/auth-echo', nil, :authorization => 'Token token="bar"') - assert_equal 'Token token="bar"', response.body - end - - def test_token_middleware_adds_token_header - response = conn { |b| b.request :token_auth, 'quux' }.get('/auth-echo') - assert_equal 'Token token="quux"', response.body - end - - def test_token_middleware_includes_other_values_if_provided - response = conn { |b| - b.request :token_auth, 'baz', :foo => 42 - }.get('/auth-echo') - assert_match(/^Token /, response.body) - assert_match(/token="baz"/, response.body) - assert_match(/foo="42"/, response.body) - end - - def test_token_middleware_does_not_interfere_with_existing_authorization - response = conn { |b| b.request :token_auth, 'quux' }. - get('/auth-echo', nil, :authorization => 'Token token="bar"') - assert_equal 'Token token="bar"', response.body - end - - def test_authorization_middleware_with_string - response = conn { |b| - b.request :authorization, 'custom', 'abc def' - }.get('/auth-echo') - assert_match(/^custom abc def$/, response.body) - end - - def test_authorization_middleware_with_hash - response = conn { |b| - b.request :authorization, 'baz', :foo => 42 - }.get('/auth-echo') - assert_match(/^baz /, response.body) - assert_match(/foo="42"/, response.body) - end -end diff --git a/.gems/gems/faraday-0.9.0/test/composite_read_io_test.rb b/.gems/gems/faraday-0.9.0/test/composite_read_io_test.rb deleted file mode 100644 index 0632dee..0000000 --- a/.gems/gems/faraday-0.9.0/test/composite_read_io_test.rb +++ /dev/null @@ -1,111 +0,0 @@ -require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) -require 'stringio' - -class CompositeReadIOTest < Faraday::TestCase - Part = Struct.new(:to_io) do - def length() to_io.string.length end - end - - def part(str) - Part.new StringIO.new(str) - end - - def composite_io(*parts) - Faraday::CompositeReadIO.new(*parts) - end - - def test_empty - io = composite_io - assert_equal 0, io.length - assert_equal "", io.read - end - - def test_empty_returns_nil_for_limited_read - assert_nil composite_io.read(1) - end - - def test_empty_parts_returns_nil_for_limited_read - io = composite_io(part(""), part("")) - assert_nil io.read(1) - end - - def test_multipart_read_all - io = composite_io(part("abcd"), part("1234")) - assert_equal 8, io.length - assert_equal "abcd1234", io.read - end - - def test_multipart_read_limited - io = composite_io(part("abcd"), part("1234")) - assert_equal "abc", io.read(3) - assert_equal "d12", io.read(3) - assert_equal "34", io.read(3) - assert_equal nil, io.read(3) - assert_equal nil, io.read(3) - end - - def test_multipart_read_limited_size_larger_than_part - io = composite_io(part("abcd"), part("1234")) - assert_equal "abcd12", io.read(6) - assert_equal "34", io.read(6) - assert_equal nil, io.read(6) - end - - def test_multipart_read_with_blank_parts - io = composite_io(part(""), part("abcd"), part(""), part("1234"), part("")) - assert_equal "abcd12", io.read(6) - assert_equal "34", io.read(6) - assert_equal nil, io.read(6) - end - - def test_multipart_rewind - io = composite_io(part("abcd"), part("1234")) - assert_equal "abc", io.read(3) - assert_equal "d12", io.read(3) - io.rewind - assert_equal "abc", io.read(3) - assert_equal "d1234", io.read(5) - assert_equal nil, io.read(3) - io.rewind - assert_equal "ab", io.read(2) - end - - # JRuby enforces types to copy_stream to be String or IO - if IO.respond_to?(:copy_stream) && !jruby? - def test_compatible_with_copy_stream - target_io = StringIO.new - def target_io.ensure_open_and_writable - # Rubinius compatibility - end - io = composite_io(part("abcd"), part("1234")) - - Faraday::Timer.timeout(1) do - IO.copy_stream(io, target_io) - end - assert_equal "abcd1234", target_io.string - end - end - - unless RUBY_VERSION < '1.9' - def test_read_from_multibyte - File.open(File.dirname(__FILE__) + '/multibyte.txt') do |utf8| - io = composite_io(part("\x86"), Part.new(utf8)) - assert_equal bin("\x86\xE3\x83\x95\xE3\x82\xA1\xE3\x82\xA4\xE3\x83\xAB\n"), io.read - end - end - - def test_limited_from_multibyte - File.open(File.dirname(__FILE__) + '/multibyte.txt') do |utf8| - io = composite_io(part("\x86"), Part.new(utf8)) - assert_equal bin("\x86\xE3\x83"), io.read(3) - assert_equal bin("\x95\xE3\x82"), io.read(3) - assert_equal bin("\xA1\xE3\x82\xA4\xE3\x83\xAB\n"), io.read(8) - end - end - end - - def bin(str) - str.force_encoding("BINARY") if str.respond_to?(:force_encoding) - str - end -end diff --git a/.gems/gems/faraday-0.9.0/test/connection_test.rb b/.gems/gems/faraday-0.9.0/test/connection_test.rb deleted file mode 100644 index e164736..0000000 --- a/.gems/gems/faraday-0.9.0/test/connection_test.rb +++ /dev/null @@ -1,522 +0,0 @@ -require File.expand_path('../helper', __FILE__) - -class TestConnection < Faraday::TestCase - - def with_env(key, proxy) - old_value = ENV.fetch(key, false) - ENV[key] = proxy - begin - yield - ensure - if old_value == false - ENV.delete key - else - ENV[key] = old_value - end - end - end - - def test_initialize_parses_host_out_of_given_url - conn = Faraday::Connection.new "http://sushi.com" - assert_equal 'sushi.com', conn.host - end - - def test_initialize_inherits_default_port_out_of_given_url - conn = Faraday::Connection.new "http://sushi.com" - assert_equal 80, conn.port - end - - def test_initialize_parses_scheme_out_of_given_url - conn = Faraday::Connection.new "http://sushi.com" - assert_equal 'http', conn.scheme - end - - def test_initialize_parses_port_out_of_given_url - conn = Faraday::Connection.new "http://sushi.com:815" - assert_equal 815, conn.port - end - - def test_initialize_parses_nil_path_prefix_out_of_given_url - conn = Faraday::Connection.new "http://sushi.com" - assert_equal '/', conn.path_prefix - end - - def test_initialize_parses_path_prefix_out_of_given_url - conn = Faraday::Connection.new "http://sushi.com/fish" - assert_equal '/fish', conn.path_prefix - end - - def test_initialize_parses_path_prefix_out_of_given_url_option - conn = Faraday::Connection.new :url => "http://sushi.com/fish" - assert_equal '/fish', conn.path_prefix - end - - def test_initialize_stores_default_params_from_options - conn = Faraday::Connection.new :params => {:a => 1} - assert_equal({'a' => 1}, conn.params) - end - - def test_initialize_stores_default_params_from_uri - conn = Faraday::Connection.new "http://sushi.com/fish?a=1" - assert_equal({'a' => '1'}, conn.params) - end - - def test_initialize_stores_default_params_from_uri_and_options - conn = Faraday::Connection.new "http://sushi.com/fish?a=1&b=2", :params => {'a' => 3} - assert_equal({'a' => 3, 'b' => '2'}, conn.params) - end - - def test_initialize_stores_default_headers_from_options - conn = Faraday::Connection.new :headers => {:user_agent => 'Faraday'} - assert_equal 'Faraday', conn.headers['User-agent'] - end - - def test_basic_auth_sets_header - conn = Faraday::Connection.new - assert_nil conn.headers['Authorization'] - - conn.basic_auth 'Aladdin', 'open sesame' - assert auth = conn.headers['Authorization'] - assert_equal 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==', auth - end - - def test_auto_parses_basic_auth_from_url_and_unescapes - conn = Faraday::Connection.new :url => "http://foo%40bar.com:pass%20word@sushi.com/fish" - assert auth = conn.headers['Authorization'] - assert_equal Faraday::Request::BasicAuthentication.header("foo@bar.com", "pass word"), auth - end - - def test_token_auth_sets_header - conn = Faraday::Connection.new - assert_nil conn.headers['Authorization'] - - conn.token_auth 'abcdef', :nonce => 'abc' - assert auth = conn.headers['Authorization'] - assert_match(/^Token /, auth) - assert_match(/token="abcdef"/, auth) - assert_match(/nonce="abc"/, auth) - end - - def test_build_exclusive_url_uses_connection_host_as_default_uri_host - conn = Faraday::Connection.new - conn.host = 'sushi.com' - uri = conn.build_exclusive_url("/sake.html") - assert_equal 'sushi.com', uri.host - end - - def test_build_exclusive_url_overrides_connection_port_for_absolute_urls - conn = Faraday::Connection.new - conn.port = 23 - uri = conn.build_exclusive_url("http://sushi.com") - assert_equal 80, uri.port - end - - def test_build_exclusive_url_uses_connection_scheme_as_default_uri_scheme - conn = Faraday::Connection.new 'http://sushi.com' - uri = conn.build_exclusive_url("/sake.html") - assert_equal 'http', uri.scheme - end - - def test_build_exclusive_url_uses_connection_path_prefix_to_customize_path - conn = Faraday::Connection.new - conn.path_prefix = '/fish' - uri = conn.build_exclusive_url("sake.html") - assert_equal '/fish/sake.html', uri.path - end - - def test_build_exclusive_url_uses_root_connection_path_prefix_to_customize_path - conn = Faraday::Connection.new - conn.path_prefix = '/' - uri = conn.build_exclusive_url("sake.html") - assert_equal '/sake.html', uri.path - end - - def test_build_exclusive_url_forces_connection_path_prefix_to_be_absolute - conn = Faraday::Connection.new - conn.path_prefix = 'fish' - uri = conn.build_exclusive_url("sake.html") - assert_equal '/fish/sake.html', uri.path - end - - def test_build_exclusive_url_ignores_connection_path_prefix_trailing_slash - conn = Faraday::Connection.new - conn.path_prefix = '/fish/' - uri = conn.build_exclusive_url("sake.html") - assert_equal '/fish/sake.html', uri.path - end - - def test_build_exclusive_url_allows_absolute_uri_to_ignore_connection_path_prefix - conn = Faraday::Connection.new - conn.path_prefix = '/fish' - uri = conn.build_exclusive_url("/sake.html") - assert_equal '/sake.html', uri.path - end - - def test_build_exclusive_url_parses_url_params_into_path - conn = Faraday::Connection.new - uri = conn.build_exclusive_url("http://sushi.com/sake.html") - assert_equal '/sake.html', uri.path - end - - def test_build_exclusive_url_doesnt_add_ending_slash_given_nil_url - conn = Faraday::Connection.new - conn.url_prefix = "http://sushi.com/nigiri" - uri = conn.build_exclusive_url - assert_equal "/nigiri", uri.path - end - - def test_build_exclusive_url_doesnt_add_ending_slash_given_empty_url - conn = Faraday::Connection.new - conn.url_prefix = "http://sushi.com/nigiri" - uri = conn.build_exclusive_url('') - assert_equal "/nigiri", uri.path - end - - def test_build_exclusive_url_doesnt_use_connection_params - conn = Faraday::Connection.new "http://sushi.com/nigiri" - conn.params = {:a => 1} - assert_equal "http://sushi.com/nigiri", conn.build_exclusive_url.to_s - end - - def test_build_exclusive_url_uses_argument_params - conn = Faraday::Connection.new "http://sushi.com/nigiri" - conn.params = {:a => 1} - params = Faraday::Utils::ParamsHash.new - params[:a] = 2 - url = conn.build_exclusive_url(nil, params) - assert_equal "http://sushi.com/nigiri?a=2", url.to_s - end - - def test_build_url_uses_params - conn = Faraday::Connection.new "http://sushi.com/nigiri" - conn.params = {:a => 1, :b => 1} - assert_equal "http://sushi.com/nigiri?a=1&b=1", conn.build_url.to_s - end - - def test_build_url_merges_params - conn = Faraday::Connection.new "http://sushi.com/nigiri" - conn.params = {:a => 1, :b => 1} - url = conn.build_url(nil, :b => 2, :c => 3) - assert_equal "http://sushi.com/nigiri?a=1&b=2&c=3", url.to_s - end - - def test_env_url_parses_url_params_into_query - uri = env_url("http://sushi.com/sake.html", 'a[b]' => '1 + 2') - assert_equal "a%5Bb%5D=1+%2B+2", uri.query - end - - def test_env_url_escapes_per_spec - uri = env_url('http:/', 'a' => '1+2 foo~bar.-baz') - assert_equal "a=1%2B2+foo~bar.-baz", uri.query - end - - def test_env_url_bracketizes_nested_params_in_query - url = env_url nil, 'a' => {'b' => 'c'} - assert_equal "a%5Bb%5D=c", url.query - end - - def test_env_url_bracketizes_repeated_params_in_query - uri = env_url("http://sushi.com/sake.html", 'a' => [1, 2]) - assert_equal "a%5B%5D=1&a%5B%5D=2", uri.query - end - - def test_env_url_without_braketizing_repeated_params_in_query - uri = env_url 'http://sushi.com', 'a' => [1, 2] do |conn| - conn.options.params_encoder = Faraday::FlatParamsEncoder - end - assert_equal "a=1&a=2", uri.query - end - - def test_build_exclusive_url_parses_url - conn = Faraday::Connection.new - uri = conn.build_exclusive_url("http://sushi.com/sake.html") - assert_equal "http", uri.scheme - assert_equal "sushi.com", uri.host - assert_equal '/sake.html', uri.path - end - - def test_build_exclusive_url_parses_url_and_changes_scheme - conn = Faraday::Connection.new :url => "http://sushi.com/sushi" - conn.scheme = 'https' - uri = conn.build_exclusive_url("sake.html") - assert_equal 'https://sushi.com/sushi/sake.html', uri.to_s - end - - def test_build_exclusive_url_joins_url_to_base_with_ending_slash - conn = Faraday::Connection.new :url => "http://sushi.com/sushi/" - uri = conn.build_exclusive_url("sake.html") - assert_equal 'http://sushi.com/sushi/sake.html', uri.to_s - end - - def test_build_exclusive_url_used_default_base_with_ending_slash - conn = Faraday::Connection.new :url => "http://sushi.com/sushi/" - uri = conn.build_exclusive_url - assert_equal 'http://sushi.com/sushi/', uri.to_s - end - - def test_build_exclusive_url_overrides_base - conn = Faraday::Connection.new :url => "http://sushi.com/sushi/" - uri = conn.build_exclusive_url('/sake/') - assert_equal 'http://sushi.com/sake/', uri.to_s - end - - def test_build_exclusive_url_handles_uri_instances - conn = Faraday::Connection.new - uri = conn.build_exclusive_url(URI('/sake.html')) - assert_equal '/sake.html', uri.path - end - - def test_proxy_accepts_string - with_env 'http_proxy', "http://duncan.proxy.com:80" do - conn = Faraday::Connection.new - conn.proxy 'http://proxy.com' - assert_equal 'proxy.com', conn.proxy.host - end - end - - def test_proxy_accepts_uri - with_env 'http_proxy', "http://duncan.proxy.com:80" do - conn = Faraday::Connection.new - conn.proxy URI.parse('http://proxy.com') - assert_equal 'proxy.com', conn.proxy.host - end - end - - def test_proxy_accepts_hash_with_string_uri - with_env 'http_proxy', "http://duncan.proxy.com:80" do - conn = Faraday::Connection.new - conn.proxy :uri => 'http://proxy.com', :user => 'rick' - assert_equal 'proxy.com', conn.proxy.host - assert_equal 'rick', conn.proxy.user - end - end - - def test_proxy_accepts_hash - with_env 'http_proxy', "http://duncan.proxy.com:80" do - conn = Faraday::Connection.new - conn.proxy :uri => URI.parse('http://proxy.com'), :user => 'rick' - assert_equal 'proxy.com', conn.proxy.host - assert_equal 'rick', conn.proxy.user - end - end - - def test_proxy_accepts_http_env - with_env 'http_proxy', "http://duncan.proxy.com:80" do - conn = Faraday::Connection.new - assert_equal 'duncan.proxy.com', conn.proxy.host - end - end - - def test_proxy_accepts_http_env_with_auth - with_env 'http_proxy', "http://a%40b:my%20pass@duncan.proxy.com:80" do - conn = Faraday::Connection.new - assert_equal 'a@b', conn.proxy.user - assert_equal 'my pass', conn.proxy.password - end - end - - def test_proxy_accepts_env_without_scheme - with_env 'http_proxy', "localhost:8888" do - uri = Faraday::Connection.new.proxy[:uri] - assert_equal 'localhost', uri.host - assert_equal 8888, uri.port - end - end - - def test_no_proxy_from_env - with_env 'http_proxy', nil do - conn = Faraday::Connection.new - assert_equal nil, conn.proxy - end - end - - def test_no_proxy_from_blank_env - with_env 'http_proxy', '' do - conn = Faraday::Connection.new - assert_equal nil, conn.proxy - end - end - - def test_proxy_doesnt_accept_uppercase_env - with_env 'HTTP_PROXY', "http://localhost:8888/" do - conn = Faraday::Connection.new - assert_nil conn.proxy - end - end - - def test_proxy_requires_uri - conn = Faraday::Connection.new - assert_raises ArgumentError do - conn.proxy :uri => :bad_uri, :user => 'rick' - end - end - - def test_dups_connection_object - conn = Faraday::Connection.new 'http://sushi.com/foo', - :ssl => { :verify => :none }, - :headers => {'content-type' => 'text/plain'}, - :params => {'a'=>'1'} - - other = conn.dup - - assert_equal conn.build_exclusive_url, other.build_exclusive_url - assert_equal 'text/plain', other.headers['content-type'] - assert_equal '1', other.params['a'] - - other.basic_auth('', '') - other.headers['content-length'] = 12 - other.params['b'] = '2' - - assert_equal 2, other.builder.handlers.size - assert_equal 2, conn.builder.handlers.size - assert !conn.headers.key?('content-length') - assert !conn.params.key?('b') - end - - def test_initialize_with_false_option - conn = Faraday::Connection.new :ssl => {:verify => false} - assert !conn.ssl.verify? - end - - def test_init_with_block - conn = Faraday::Connection.new { } - assert_equal 0, conn.builder.handlers.size - end - - def test_init_with_block_yields_connection - conn = Faraday::Connection.new(:params => {'a'=>'1'}) { |faraday| - faraday.adapter :net_http - faraday.url_prefix = 'http://sushi.com/omnom' - assert_equal '1', faraday.params['a'] - } - assert_equal 1, conn.builder.handlers.size - assert_equal '/omnom', conn.path_prefix - end - - def env_url(url, params) - conn = Faraday::Connection.new(url, :params => params) - yield(conn) if block_given? - req = conn.build_request(:get) - req.to_env(conn).url - end -end - -class TestRequestParams < Faraday::TestCase - def create_connection(*args) - @conn = Faraday::Connection.new(*args) do |conn| - yield(conn) if block_given? - class << conn.builder - undef app - def app() lambda { |env| env } end - end - end - end - - def assert_query_equal(expected, query) - assert_equal expected, query.split('&').sort - end - - def with_default_params_encoder(encoder) - old_encoder = Faraday::Utils.default_params_encoder - begin - Faraday::Utils.default_params_encoder = encoder - yield - ensure - Faraday::Utils.default_params_encoder = old_encoder - end - end - - def test_merges_connection_and_request_params - create_connection 'http://a.co/?token=abc', :params => {'format' => 'json'} - query = get '?page=1', :limit => 5 - assert_query_equal %w[format=json limit=5 page=1 token=abc], query - end - - def test_overrides_connection_params - create_connection 'http://a.co/?a=a&b=b&c=c', :params => {:a => 'A'} do |conn| - conn.params[:b] = 'B' - assert_equal 'c', conn.params[:c] - end - assert_query_equal %w[a=A b=B c=c], get - end - - def test_all_overrides_connection_params - create_connection 'http://a.co/?a=a', :params => {:c => 'c'} do |conn| - conn.params = {'b' => 'b'} - end - assert_query_equal %w[b=b], get - end - - def test_overrides_request_params - create_connection - query = get '?p=1&a=a', :p => 2 - assert_query_equal %w[a=a p=2], query - end - - def test_overrides_request_params_block - create_connection - query = get '?p=1&a=a', :p => 2 do |req| - req.params[:p] = 3 - end - assert_query_equal %w[a=a p=3], query - end - - def test_overrides_request_params_block_url - create_connection - query = get nil, :p => 2 do |req| - req.url '?p=1&a=a', 'p' => 3 - end - assert_query_equal %w[a=a p=3], query - end - - def test_overrides_all_request_params - create_connection :params => {:c => 'c'} - query = get '?p=1&a=a', :p => 2 do |req| - assert_equal 'a', req.params[:a] - assert_equal 'c', req.params['c'] - assert_equal 2, req.params['p'] - req.params = {:b => 'b'} - assert_equal 'b', req.params['b'] - end - assert_query_equal %w[b=b], query - end - - def test_array_params_in_url - with_default_params_encoder(nil) do - create_connection 'http://a.co/page1?color[]=red&color[]=blue' - query = get - assert_equal "color%5B%5D=red&color%5B%5D=blue", query - end - end - - def test_array_params_in_params - with_default_params_encoder(nil) do - create_connection 'http://a.co/page1', :params => {:color => ['red', 'blue']} - query = get - assert_equal "color%5B%5D=red&color%5B%5D=blue", query - end - end - - def test_array_params_in_url_with_flat_params - with_default_params_encoder(Faraday::FlatParamsEncoder) do - create_connection 'http://a.co/page1?color=red&color=blue' - query = get - assert_equal "color=red&color=blue", query - end - end - - def test_array_params_in_params_with_flat_params - with_default_params_encoder(Faraday::FlatParamsEncoder) do - create_connection 'http://a.co/page1', :params => {:color => ['red', 'blue']} - query = get - assert_equal "color=red&color=blue", query - end - end - - def get(*args) - env = @conn.get(*args) do |req| - yield(req) if block_given? - end - env[:url].query - end -end diff --git a/.gems/gems/faraday-0.9.0/test/env_test.rb b/.gems/gems/faraday-0.9.0/test/env_test.rb deleted file mode 100644 index 4cae21a..0000000 --- a/.gems/gems/faraday-0.9.0/test/env_test.rb +++ /dev/null @@ -1,210 +0,0 @@ -require File.expand_path('../helper', __FILE__) - -class EnvTest < Faraday::TestCase - def setup - @conn = Faraday.new :url => 'http://sushi.com/api', - :headers => {'Mime-Version' => '1.0'}, - :request => {:oauth => {:consumer_key => 'anonymous'}} - - @conn.options.timeout = 3 - @conn.options.open_timeout = 5 - @conn.ssl.verify = false - @conn.proxy 'http://proxy.com' - end - - def test_request_create_stores_method - env = make_env(:get) - assert_equal :get, env.method - end - - def test_request_create_stores_uri - env = make_env do |req| - req.url 'foo.json', 'a' => 1 - end - assert_equal 'http://sushi.com/api/foo.json?a=1', env.url.to_s - end - - def test_request_create_stores_headers - env = make_env do |req| - req['Server'] = 'Faraday' - end - headers = env.request_headers - assert_equal '1.0', headers['mime-version'] - assert_equal 'Faraday', headers['server'] - end - - def test_request_create_stores_body - env = make_env do |req| - req.body = 'hi' - end - assert_equal 'hi', env.body - end - - def test_global_request_options - env = make_env - assert_equal 3, env.request.timeout - assert_equal 5, env.request.open_timeout - end - - def test_per_request_options - env = make_env do |req| - req.options.timeout = 10 - req.options.boundary = 'boo' - req.options.oauth[:consumer_secret] = 'xyz' - end - assert_equal 10, env.request.timeout - assert_equal 5, env.request.open_timeout - assert_equal 'boo', env.request.boundary - - oauth_expected = {:consumer_secret => 'xyz', :consumer_key => 'anonymous'} - assert_equal oauth_expected, env.request.oauth - end - - def test_request_create_stores_ssl_options - env = make_env - assert_equal false, env.ssl.verify - end - - def test_request_create_stores_proxy_options - env = make_env - assert_equal 'proxy.com', env.request.proxy.host - end - - private - - def make_env(method = :get, connection = @conn, &block) - request = connection.build_request(method, &block) - request.to_env(connection) - end -end - -class HeadersTest < Faraday::TestCase - def setup - @headers = Faraday::Utils::Headers.new - end - - def test_normalizes_different_capitalizations - @headers['Content-Type'] = 'application/json' - assert_equal ['Content-Type'], @headers.keys - assert_equal 'application/json', @headers['Content-Type'] - assert_equal 'application/json', @headers['CONTENT-TYPE'] - assert_equal 'application/json', @headers['content-type'] - assert @headers.include?('content-type') - - @headers['content-type'] = 'application/xml' - assert_equal ['Content-Type'], @headers.keys - assert_equal 'application/xml', @headers['Content-Type'] - assert_equal 'application/xml', @headers['CONTENT-TYPE'] - assert_equal 'application/xml', @headers['content-type'] - end - - def test_fetch_key - @headers['Content-Type'] = 'application/json' - block_called = false - assert_equal 'application/json', @headers.fetch('content-type') { block_called = true } - assert_equal 'application/json', @headers.fetch('Content-Type') - assert_equal 'application/json', @headers.fetch('CONTENT-TYPE') - assert_equal 'application/json', @headers.fetch(:content_type) - assert_equal false, block_called - - assert_equal 'default', @headers.fetch('invalid', 'default') - assert_equal false, @headers.fetch('invalid', false) - assert_nil @headers.fetch('invalid', nil) - - assert_equal 'Invalid key', @headers.fetch('Invalid') { |key| "#{key} key" } - - expected_error = defined?(KeyError) ? KeyError : IndexError - assert_raises(expected_error) { @headers.fetch('invalid') } - end - - def test_delete_key - @headers['Content-Type'] = 'application/json' - assert_equal 1, @headers.size - assert @headers.include?('content-type') - assert_equal 'application/json', @headers.delete('content-type') - assert_equal 0, @headers.size - assert !@headers.include?('content-type') - assert_equal nil, @headers.delete('content-type') - end - - def test_parse_response_headers_leaves_http_status_line_out - @headers.parse("HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n") - assert_equal %w(Content-Type), @headers.keys - end - - def test_parse_response_headers_parses_lower_cased_header_name_and_value - @headers.parse("HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n") - assert_equal 'text/html', @headers['content-type'] - end - - def test_parse_response_headers_parses_lower_cased_header_name_and_value_with_colon - @headers.parse("HTTP/1.1 200 OK\r\nContent-Type: text/html\r\nLocation: http://sushi.com/\r\n\r\n") - assert_equal 'http://sushi.com/', @headers['location'] - end - - def test_parse_response_headers_parses_blank_lines - @headers.parse("HTTP/1.1 200 OK\r\n\r\nContent-Type: text/html\r\n\r\n") - assert_equal 'text/html', @headers['content-type'] - end -end - -class ResponseTest < Faraday::TestCase - def setup - @env = Faraday::Env.from \ - :status => 404, :body => 'yikes', - :response_headers => {'Content-Type' => 'text/plain'} - @response = Faraday::Response.new @env - end - - def test_finished - assert @response.finished? - end - - def test_error_on_finish - assert_raises RuntimeError do - @response.finish({}) - end - end - - def test_not_success - assert !@response.success? - end - - def test_status - assert_equal 404, @response.status - end - - def test_body - assert_equal 'yikes', @response.body - end - - def test_headers - assert_equal 'text/plain', @response.headers['Content-Type'] - assert_equal 'text/plain', @response['content-type'] - end - - def test_apply_request - @response.apply_request :body => 'a=b', :method => :post - assert_equal 'yikes', @response.body - assert_equal :post, @response.env[:method] - end - - def test_marshal - @response = Faraday::Response.new - @response.on_complete { } - @response.finish @env.merge(:params => 'moo') - - loaded = Marshal.load Marshal.dump(@response) - assert_nil loaded.env[:params] - assert_equal %w[body response_headers status], loaded.env.keys.map { |k| k.to_s }.sort - end - - def test_hash - hash = @response.to_hash - assert_kind_of Hash, hash - assert_equal @env.to_hash, hash - assert_equal hash[:status], @response.status - assert_equal hash[:response_headers], @response.headers - assert_equal hash[:body], @response.body - end -end diff --git a/.gems/gems/faraday-0.9.0/test/helper.rb b/.gems/gems/faraday-0.9.0/test/helper.rb deleted file mode 100644 index 9d3dda8..0000000 --- a/.gems/gems/faraday-0.9.0/test/helper.rb +++ /dev/null @@ -1,81 +0,0 @@ -require 'rubygems' # rubygems/version doesn't work by itself -require 'rubygems/version' # for simplecov-html -require 'simplecov' -require 'coveralls' - -SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ - SimpleCov::Formatter::HTMLFormatter, - Coveralls::SimpleCov::Formatter -] -SimpleCov.start do - add_filter '/bundle/' -end - -gem 'minitest' if defined? Bundler -require 'minitest/autorun' - -if ENV['LEFTRIGHT'] - begin - require 'leftright' - rescue LoadError - puts "Run `gem install leftright` to install leftright." - end -end - -require File.expand_path('../../lib/faraday', __FILE__) - -require 'stringio' -require 'uri' - -module Faraday - module LiveServerConfig - def live_server=(value) - @@live_server = case value - when /^http/ - URI(value) - when /./ - URI('http://127.0.0.1:4567') - end - end - - def live_server? - defined? @@live_server - end - - # Returns an object that responds to `host` and `port`. - def live_server - live_server? and @@live_server - end - end - - class TestCase < MiniTest::Test - extend LiveServerConfig - self.live_server = ENV['LIVE'] - - def test_default - assert true - end unless defined? ::MiniTest - - def capture_warnings - old, $stderr = $stderr, StringIO.new - begin - yield - $stderr.string - ensure - $stderr = old - end - end - - def self.jruby? - defined? RUBY_ENGINE and 'jruby' == RUBY_ENGINE - end - - def self.rbx? - defined? RUBY_ENGINE and 'rbx' == RUBY_ENGINE - end - - def self.ssl_mode? - ENV['SSL'] == 'yes' - end - end -end diff --git a/.gems/gems/faraday-0.9.0/test/live_server.rb b/.gems/gems/faraday-0.9.0/test/live_server.rb deleted file mode 100644 index c106b29..0000000 --- a/.gems/gems/faraday-0.9.0/test/live_server.rb +++ /dev/null @@ -1,67 +0,0 @@ -require 'sinatra/base' - -module Faraday -class LiveServer < Sinatra::Base - set :environment, :test - disable :logging - disable :protection - - [:get, :post, :put, :patch, :delete, :options].each do |method| - send(method, '/echo') do - kind = request.request_method.downcase - out = kind.dup - out << ' ?' << request.GET.inspect if request.GET.any? - out << ' ' << request.POST.inspect if request.POST.any? - - content_type 'text/plain' - return out - end - end - - get '/echo_header' do - header = "HTTP_#{params[:name].tr('-', '_').upcase}" - request.env.fetch(header) { 'NONE' } - end - - post '/file' do - if params[:uploaded_file].respond_to? :each_key - "file %s %s %d" % [ - params[:uploaded_file][:filename], - params[:uploaded_file][:type], - params[:uploaded_file][:tempfile].size - ] - else - status 400 - end - end - - get '/multi' do - [200, { 'Set-Cookie' => 'one, two' }, ''] - end - - get '/who-am-i' do - request.env['REMOTE_ADDR'] - end - - get '/slow' do - sleep 10 - [200, {}, 'ok'] - end - - get '/204' do - status 204 # no content - end - - get '/ssl' do - request.secure?.to_s - end - - error do |e| - "#{e.class}\n#{e.to_s}\n#{e.backtrace.join("\n")}" - end -end -end - -if $0 == __FILE__ - Faraday::LiveServer.run! -end diff --git a/.gems/gems/faraday-0.9.0/test/middleware/instrumentation_test.rb b/.gems/gems/faraday-0.9.0/test/middleware/instrumentation_test.rb deleted file mode 100644 index 364f13c..0000000 --- a/.gems/gems/faraday-0.9.0/test/middleware/instrumentation_test.rb +++ /dev/null @@ -1,88 +0,0 @@ -require File.expand_path("../../helper", __FILE__) - -module Middleware - class InstrumentationTest < Faraday::TestCase - def setup - @instrumenter = FakeInstrumenter.new - end - - def test_default_name - assert_equal 'request.faraday', options.name - end - - def test_default_instrumenter - begin - instrumenter = options.instrumenter - rescue NameError => err - assert_match 'ActiveSupport', err.to_s - else - assert_equal ActiveSupport::Notifications, instrumenter - end - end - - def test_name - assert_equal 'booya', options(:name => 'booya').name - end - - def test_instrumenter - assert_equal :boom, options(:instrumenter => :boom).instrumenter - end - - def test_instrumentation_with_default_name - assert_equal 0, @instrumenter.instrumentations.size - - faraday = conn - res = faraday.get '/' - assert_equal 'ok', res.body - - assert_equal 1, @instrumenter.instrumentations.size - name, env = @instrumenter.instrumentations.first - assert_equal 'request.faraday', name - assert_equal '/', env[:url].path - end - - def test_instrumentation - assert_equal 0, @instrumenter.instrumentations.size - - faraday = conn :name => 'booya' - res = faraday.get '/' - assert_equal 'ok', res.body - - assert_equal 1, @instrumenter.instrumentations.size - name, env = @instrumenter.instrumentations.first - assert_equal 'booya', name - assert_equal '/', env[:url].path - end - - class FakeInstrumenter - attr_reader :instrumentations - - def initialize - @instrumentations = [] - end - - def instrument(name, env) - @instrumentations << [name, env] - yield - end - end - - def options(hash = nil) - Faraday::Request::Instrumentation::Options.from hash - end - - def conn(hash = nil) - hash ||= {} - hash[:instrumenter] = @instrumenter - - Faraday.new do |f| - f.request :instrumentation, hash - f.adapter :test do |stub| - stub.get '/' do - [200, {}, 'ok'] - end - end - end - end - end -end diff --git a/.gems/gems/faraday-0.9.0/test/middleware/retry_test.rb b/.gems/gems/faraday-0.9.0/test/middleware/retry_test.rb deleted file mode 100644 index 7c5a119..0000000 --- a/.gems/gems/faraday-0.9.0/test/middleware/retry_test.rb +++ /dev/null @@ -1,109 +0,0 @@ -require File.expand_path("../../helper", __FILE__) - -module Middleware - class RetryTest < Faraday::TestCase - def setup - @times_called = 0 - end - - def conn(*retry_args) - Faraday.new do |b| - b.request :retry, *retry_args - b.adapter :test do |stub| - stub.post('/unstable') { - @times_called += 1 - @explode.call @times_called - } - end - end - end - - def test_unhandled_error - @explode = lambda {|n| raise "boom!" } - assert_raises(RuntimeError) { conn.post("/unstable") } - assert_equal 1, @times_called - end - - def test_handled_error - @explode = lambda {|n| raise Errno::ETIMEDOUT } - assert_raises(Errno::ETIMEDOUT) { conn.post("/unstable") } - assert_equal 3, @times_called - end - - def test_legacy_max_retries - @explode = lambda {|n| raise Errno::ETIMEDOUT } - assert_raises(Errno::ETIMEDOUT) { conn(1).post("/unstable") } - assert_equal 2, @times_called - end - - def test_new_max_retries - @explode = lambda {|n| raise Errno::ETIMEDOUT } - assert_raises(Errno::ETIMEDOUT) { conn(:max => 3).post("/unstable") } - assert_equal 4, @times_called - end - - def test_interval - @explode = lambda {|n| raise Errno::ETIMEDOUT } - started = Time.now - assert_raises(Errno::ETIMEDOUT) { - conn(:max => 2, :interval => 0.1).post("/unstable") - } - assert_in_delta 0.2, Time.now - started, 0.04 - end - - def test_calls_sleep_amount - explode_app = MiniTest::Mock.new - explode_app.expect(:call, nil, [{:body=>nil}]) - def explode_app.call(env) - raise Errno::ETIMEDOUT - end - - retry_middleware = Faraday::Request::Retry.new(explode_app) - class << retry_middleware - attr_accessor :sleep_amount_retries - - def sleep_amount(retries) - self.sleep_amount_retries.delete(retries) - 0 - end - end - retry_middleware.sleep_amount_retries = [2, 1] - - assert_raises(Errno::ETIMEDOUT) { - retry_middleware.call({}) - } - - assert_empty retry_middleware.sleep_amount_retries - end - - def test_exponential_backoff - middleware = Faraday::Request::Retry.new(nil, :max => 5, :interval => 0.1, :backoff_factor => 2) - assert_equal middleware.sleep_amount(5), 0.1 - assert_equal middleware.sleep_amount(4), 0.2 - assert_equal middleware.sleep_amount(3), 0.4 - end - - def test_random_additional_interval_amount - middleware = Faraday::Request::Retry.new(nil, :max => 2, :interval => 0.1, :interval_randomness => 1.0) - sleep_amount = middleware.sleep_amount(2) - assert_operator sleep_amount, :>=, 0.1 - assert_operator sleep_amount, :<=, 0.2 - middleware = Faraday::Request::Retry.new(nil, :max => 2, :interval => 0.1, :interval_randomness => 0.5) - sleep_amount = middleware.sleep_amount(2) - assert_operator sleep_amount, :>=, 0.1 - assert_operator sleep_amount, :<=, 0.15 - middleware = Faraday::Request::Retry.new(nil, :max => 2, :interval => 0.1, :interval_randomness => 0.25) - sleep_amount = middleware.sleep_amount(2) - assert_operator sleep_amount, :>=, 0.1 - assert_operator sleep_amount, :<=, 0.125 - end - - def test_custom_exceptions - @explode = lambda {|n| raise "boom!" } - assert_raises(RuntimeError) { - conn(:exceptions => StandardError).post("/unstable") - } - assert_equal 3, @times_called - end - end -end diff --git a/.gems/gems/faraday-0.9.0/test/middleware_stack_test.rb b/.gems/gems/faraday-0.9.0/test/middleware_stack_test.rb deleted file mode 100644 index 2f0d0d3..0000000 --- a/.gems/gems/faraday-0.9.0/test/middleware_stack_test.rb +++ /dev/null @@ -1,173 +0,0 @@ -require File.expand_path('../helper', __FILE__) - -class MiddlewareStackTest < Faraday::TestCase - # mock handler classes - class Handler < Struct.new(:app) - def call(env) - (env[:request_headers]['X-Middleware'] ||= '') << ":#{self.class.name.split('::').last}" - app.call(env) - end - end - class Apple < Handler; end - class Orange < Handler; end - class Banana < Handler; end - - class Broken < Faraday::Middleware - dependency 'zomg/i_dont/exist' - end - - def setup - @conn = Faraday::Connection.new - @builder = @conn.builder - end - - def test_sets_default_adapter_if_none_set - default_middleware = Faraday::Request.lookup_middleware :url_encoded - default_adapter_klass = Faraday::Adapter.lookup_middleware Faraday.default_adapter - assert @builder[0] == default_middleware - assert @builder[1] == default_adapter_klass - end - - def test_allows_rebuilding - build_stack Apple - build_stack Orange - assert_handlers %w[Orange] - end - - def test_allows_extending - build_stack Apple - @conn.use Orange - assert_handlers %w[Apple Orange] - end - - def test_builder_is_passed_to_new_faraday_connection - new_conn = Faraday::Connection.new :builder => @builder - assert_equal @builder, new_conn.builder - end - - def test_insert_before - build_stack Apple, Orange - @builder.insert_before Apple, Banana - assert_handlers %w[Banana Apple Orange] - end - - def test_insert_after - build_stack Apple, Orange - @builder.insert_after Apple, Banana - assert_handlers %w[Apple Banana Orange] - end - - def test_swap_handlers - build_stack Apple, Orange - @builder.swap Apple, Banana - assert_handlers %w[Banana Orange] - end - - def test_delete_handler - build_stack Apple, Orange - @builder.delete Apple - assert_handlers %w[Orange] - end - - def test_stack_is_locked_after_making_requests - build_stack Apple - assert !@builder.locked? - @conn.get('/') - assert @builder.locked? - - assert_raises Faraday::RackBuilder::StackLocked do - @conn.use Orange - end - end - - def test_duped_stack_is_unlocked - build_stack Apple - assert !@builder.locked? - @builder.lock! - assert @builder.locked? - - duped_connection = @conn.dup - assert_equal @builder, duped_connection.builder - assert !duped_connection.builder.locked? - end - - def test_handler_comparison - build_stack Apple - assert_equal @builder.handlers.first, Apple - assert_equal @builder.handlers[0,1], [Apple] - assert_equal @builder.handlers.first, Faraday::RackBuilder::Handler.new(Apple) - end - - def test_unregistered_symbol - err = assert_raises(Faraday::Error){ build_stack :apple } - assert_equal ":apple is not registered on Faraday::Middleware", err.message - end - - def test_registered_symbol - Faraday::Middleware.register_middleware :apple => Apple - begin - build_stack :apple - assert_handlers %w[Apple] - ensure - unregister_middleware Faraday::Middleware, :apple - end - end - - def test_registered_symbol_with_proc - Faraday::Middleware.register_middleware :apple => lambda { Apple } - begin - build_stack :apple - assert_handlers %w[Apple] - ensure - unregister_middleware Faraday::Middleware, :apple - end - end - - def test_registered_symbol_with_array - Faraday::Middleware.register_middleware File.expand_path("..", __FILE__), - :strawberry => [lambda { Strawberry }, 'strawberry'] - begin - build_stack :strawberry - assert_handlers %w[Strawberry] - ensure - unregister_middleware Faraday::Middleware, :strawberry - end - end - - def test_missing_dependencies - build_stack Broken - err = assert_raises RuntimeError do - @conn.get('/') - end - assert_match "missing dependency for MiddlewareStackTest::Broken: ", err.message - assert_match "zomg/i_dont/exist", err.message - end - - private - - # make a stack with test adapter that reflects the order of middleware - def build_stack(*handlers) - @builder.build do |b| - handlers.each { |handler| b.use(*handler) } - yield(b) if block_given? - - b.adapter :test do |stub| - stub.get '/' do |env| - # echo the "X-Middleware" request header in the body - [200, {}, env[:request_headers]['X-Middleware'].to_s] - end - end - end - end - - def assert_handlers(list) - echoed_list = @conn.get('/').body.to_s.split(':') - echoed_list.shift if echoed_list.first == '' - assert_equal list, echoed_list - end - - def unregister_middleware(component, key) - # TODO: unregister API? - component.instance_variable_get('@registered_middleware').delete(key) - end -end diff --git a/.gems/gems/faraday-0.9.0/test/multibyte.txt b/.gems/gems/faraday-0.9.0/test/multibyte.txt deleted file mode 100644 index 24a84b0..0000000 --- a/.gems/gems/faraday-0.9.0/test/multibyte.txt +++ /dev/null @@ -1 +0,0 @@ -ファイル diff --git a/.gems/gems/faraday-0.9.0/test/options_test.rb b/.gems/gems/faraday-0.9.0/test/options_test.rb deleted file mode 100644 index 1cacdf6..0000000 --- a/.gems/gems/faraday-0.9.0/test/options_test.rb +++ /dev/null @@ -1,252 +0,0 @@ -require File.expand_path('../helper', __FILE__) - -class OptionsTest < Faraday::TestCase - class SubOptions < Faraday::Options.new(:sub); end - class ParentOptions < Faraday::Options.new(:a, :b, :c) - options :c => SubOptions - end - - def test_clear - options = SubOptions.new(1) - assert !options.empty? - assert options.clear - assert options.empty? - end - - def test_empty - options = SubOptions.new - assert options.empty? - options.sub = 1 - assert !options.empty? - options.delete(:sub) - assert options.empty? - end - - def test_each_key - options = ParentOptions.new(1, 2, 3) - enum = options.each_key - assert_equal enum.next.to_sym, :a - assert_equal enum.next.to_sym, :b - assert_equal enum.next.to_sym, :c - end - - def test_key? - options = SubOptions.new - assert !options.key?(:sub) - options.sub = 1 - if RUBY_VERSION >= '1.9' - assert options.key?(:sub) - else - assert options.key?("sub") - end - end - - def test_each_value - options = ParentOptions.new(1, 2, 3) - enum = options.each_value - assert_equal enum.next, 1 - assert_equal enum.next, 2 - assert_equal enum.next, 3 - end - - def test_value? - options = SubOptions.new - assert !options.value?(1) - options.sub = 1 - assert options.value?(1) - end - - def test_request_proxy_setter - options = Faraday::RequestOptions.new - assert_nil options.proxy - - assert_raises NoMethodError do - options[:proxy] = {:booya => 1} - end - - options[:proxy] = {:user => 'user'} - assert_kind_of Faraday::ProxyOptions, options.proxy - assert_equal 'user', options.proxy.user - - options.proxy = nil - assert_nil options.proxy - end - - def test_proxy_options_from_string - options = Faraday::ProxyOptions.from 'http://user:pass@example.org' - assert_equal 'user', options.user - assert_equal 'pass', options.password - assert_kind_of URI, options.uri - assert_equal '', options.path - assert_equal 80, options.port - assert_equal 'example.org', options.host - assert_equal 'http', options.scheme - end - - def test_proxy_options_hash_access - proxy = Faraday::ProxyOptions.from 'http://a%40b:pw%20d@example.org' - assert_equal 'a@b', proxy[:user] - assert_equal 'a@b', proxy.user - assert_equal 'pw d', proxy[:password] - assert_equal 'pw d', proxy.password - end - - def test_proxy_options_no_auth - proxy = Faraday::ProxyOptions.from 'http://example.org' - assert_nil proxy.user - assert_nil proxy.password - end - - def test_from_options - options = ParentOptions.new(1) - - value = ParentOptions.from(options) - assert_equal 1, value.a - assert_nil value.b - end - - def test_from_options_with_sub_object - sub = SubOptions.new(1) - options = ParentOptions.from :a => 1, :c => sub - assert_kind_of ParentOptions, options - assert_equal 1, options.a - assert_nil options.b - assert_kind_of SubOptions, options.c - assert_equal 1, options.c.sub - end - - def test_from_hash - options = ParentOptions.from :a => 1 - assert_kind_of ParentOptions, options - assert_equal 1, options.a - assert_nil options.b - end - - def test_from_hash_with_sub_object - options = ParentOptions.from :a => 1, :c => {:sub => 1} - assert_kind_of ParentOptions, options - assert_equal 1, options.a - assert_nil options.b - assert_kind_of SubOptions, options.c - assert_equal 1, options.c.sub - end - - def test_inheritance - subclass = Class.new(ParentOptions) - options = subclass.from(:c => {:sub => 'hello'}) - assert_kind_of SubOptions, options.c - assert_equal 'hello', options.c.sub - end - - def test_from_deep_hash - hash = {:b => 1} - options = ParentOptions.from :a => hash - assert_equal 1, options.a[:b] - - hash[:b] = 2 - assert_equal 1, options.a[:b] - - options.a[:b] = 3 - assert_equal 2, hash[:b] - assert_equal 3, options.a[:b] - end - - def test_from_nil - options = ParentOptions.from(nil) - assert_kind_of ParentOptions, options - assert_nil options.a - assert_nil options.b - end - - def test_invalid_key - assert_raises NoMethodError do - ParentOptions.from :invalid => 1 - end - end - - def test_update - options = ParentOptions.new(1) - assert_equal 1, options.a - assert_nil options.b - - updated = options.update :a => 2, :b => 3 - assert_equal 2, options.a - assert_equal 3, options.b - assert_equal options, updated - end - - def test_delete - options = ParentOptions.new(1) - assert_equal 1, options.a - assert_equal 1, options.delete(:a) - assert_nil options.a - end - - def test_merge - options = ParentOptions.new(1) - assert_equal 1, options.a - assert_nil options.b - - dup = options.merge :a => 2, :b => 3 - assert_equal 2, dup.a - assert_equal 3, dup.b - assert_equal 1, options.a - assert_nil options.b - end - - def test_env_access_member - e = Faraday::Env.new - assert_nil e.method - e.method = :get - assert_equal :get, e.method - end - - def test_env_access_symbol_non_member - e = Faraday::Env.new - assert_nil e[:custom] - e[:custom] = :boom - assert_equal :boom, e[:custom] - end - - def test_env_access_string_non_member - e = Faraday::Env.new - assert_nil e["custom"] - e["custom"] = :boom - assert_equal :boom, e["custom"] - end - - def test_env_fetch_ignores_false - ssl = Faraday::SSLOptions.new - ssl.verify = false - assert !ssl.fetch(:verify, true) - end - - def test_fetch_grabs_value - opt = Faraday::SSLOptions.new - opt.verify = 1 - assert_equal 1, opt.fetch(:verify, false) { |k| :blah } - end - - def test_fetch_uses_falsey_default - opt = Faraday::SSLOptions.new - assert_equal false, opt.fetch(:verify, false) { |k| :blah } - end - - def test_fetch_accepts_block - opt = Faraday::SSLOptions.new - assert_equal "yo :verify", opt.fetch(:verify) { |k| "yo #{k.inspect}"} - end - - def test_fetch_needs_a_default_if_key_is_missing - opt = Faraday::SSLOptions.new - assert_raises Faraday::Options.fetch_error_class do - opt.fetch :verify - end - end - - def test_fetch_works_with_key - opt = Faraday::SSLOptions.new - opt.verify = 1 - assert_equal 1, opt.fetch(:verify) - end -end diff --git a/.gems/gems/faraday-0.9.0/test/request_middleware_test.rb b/.gems/gems/faraday-0.9.0/test/request_middleware_test.rb deleted file mode 100644 index aca011f..0000000 --- a/.gems/gems/faraday-0.9.0/test/request_middleware_test.rb +++ /dev/null @@ -1,142 +0,0 @@ -# encoding: utf-8 -require File.expand_path('../helper', __FILE__) - -Faraday::CompositeReadIO.class_eval { attr_reader :ios } - -class RequestMiddlewareTest < Faraday::TestCase - def setup - @conn = Faraday.new do |b| - b.request :multipart - b.request :url_encoded - b.adapter :test do |stub| - stub.post('/echo') do |env| - posted_as = env[:request_headers]['Content-Type'] - [200, {'Content-Type' => posted_as}, env[:body]] - end - end - end - end - - def with_utf8 - if defined?(RUBY_VERSION) && RUBY_VERSION.match(/1.8.\d/) - begin - previous_kcode = $KCODE - $KCODE = "UTF8" - yield - ensure - $KCODE = previous_kcode - end - else - yield - end - end - - def test_does_nothing_without_payload - response = @conn.post('/echo') - assert_nil response.headers['Content-Type'] - assert response.body.empty? - end - - def test_ignores_custom_content_type - response = @conn.post('/echo', { :some => 'data' }, 'content-type' => 'application/x-foo') - assert_equal 'application/x-foo', response.headers['Content-Type'] - assert_equal({ :some => 'data' }, response.body) - end - - def test_url_encoded_no_header - response = @conn.post('/echo', { :fruit => %w[apples oranges] }) - assert_equal 'application/x-www-form-urlencoded', response.headers['Content-Type'] - assert_equal 'fruit%5B%5D=apples&fruit%5B%5D=oranges', response.body - end - - def test_url_encoded_with_header - response = @conn.post('/echo', {'a'=>123}, 'content-type' => 'application/x-www-form-urlencoded') - assert_equal 'application/x-www-form-urlencoded', response.headers['Content-Type'] - assert_equal 'a=123', response.body - end - - def test_url_encoded_nested - response = @conn.post('/echo', { :user => {:name => 'Mislav', :web => 'mislav.net'} }) - assert_equal 'application/x-www-form-urlencoded', response.headers['Content-Type'] - expected = { 'user' => {'name' => 'Mislav', 'web' => 'mislav.net'} } - assert_equal expected, Faraday::Utils.parse_nested_query(response.body) - end - - def test_url_encoded_non_nested - response = @conn.post('/echo', { :dimensions => ['date', 'location']}) do |req| - req.options.params_encoder = Faraday::FlatParamsEncoder - end - assert_equal 'application/x-www-form-urlencoded', response.headers['Content-Type'] - expected = { 'dimensions' => ['date', 'location'] } - assert_equal expected, Faraday::Utils.parse_query(response.body) - assert_equal 'dimensions=date&dimensions=location', response.body - end - - def test_url_encoded_unicode - err = capture_warnings { - response = @conn.post('/echo', {:str => "eé cç aã aâ"}) - assert_equal "str=e%C3%A9+c%C3%A7+a%C3%A3+a%C3%A2", response.body - } - assert err.empty?, "stderr did include: #{err}" - end - - def test_url_encoded_unicode_with_kcode_set - with_utf8 do - err = capture_warnings { - response = @conn.post('/echo', {:str => "eé cç aã aâ"}) - assert_equal "str=e%C3%A9+c%C3%A7+a%C3%A3+a%C3%A2", response.body - } - assert err.empty?, "stderr did include: #{err}" - end - end - - def test_url_encoded_nested_keys - response = @conn.post('/echo', {'a'=>{'b'=>{'c'=>['d']}}}) - assert_equal "a%5Bb%5D%5Bc%5D%5B%5D=d", response.body - end - - def test_multipart - # assume params are out of order - regexes = [ - /name\=\"a\"/, - /name=\"b\[c\]\"\; filename\=\"request_middleware_test\.rb\"/, - /name=\"b\[d\]\"/] - - payload = {:a => 1, :b => {:c => Faraday::UploadIO.new(__FILE__, 'text/x-ruby'), :d => 2}} - response = @conn.post('/echo', payload) - - assert_kind_of Faraday::CompositeReadIO, response.body - assert_equal "multipart/form-data; boundary=%s" % Faraday::Request::Multipart::DEFAULT_BOUNDARY, - response.headers['Content-Type'] - - response.body.send(:ios).map{|io| io.read}.each do |io| - if re = regexes.detect { |r| io =~ r } - regexes.delete re - end - end - assert_equal [], regexes - end - - def test_multipart_with_arrays - # assume params are out of order - regexes = [ - /name\=\"a\"/, - /name=\"b\[\]\[c\]\"\; filename\=\"request_middleware_test\.rb\"/, - /name=\"b\[\]\[d\]\"/] - - payload = {:a => 1, :b =>[{:c => Faraday::UploadIO.new(__FILE__, 'text/x-ruby'), :d => 2}]} - response = @conn.post('/echo', payload) - - assert_kind_of Faraday::CompositeReadIO, response.body - assert_equal "multipart/form-data; boundary=%s" % Faraday::Request::Multipart::DEFAULT_BOUNDARY, - response.headers['Content-Type'] - - response.body.send(:ios).map{|io| io.read}.each do |io| - if re = regexes.detect { |r| io =~ r } - regexes.delete re - end - end - assert_equal [], regexes - end - -end diff --git a/.gems/gems/faraday-0.9.0/test/response_middleware_test.rb b/.gems/gems/faraday-0.9.0/test/response_middleware_test.rb deleted file mode 100644 index ea8aba2..0000000 --- a/.gems/gems/faraday-0.9.0/test/response_middleware_test.rb +++ /dev/null @@ -1,72 +0,0 @@ -require File.expand_path('../helper', __FILE__) - -class ResponseMiddlewareTest < Faraday::TestCase - def setup - @conn = Faraday.new do |b| - b.response :raise_error - b.adapter :test do |stub| - stub.get('ok') { [200, {'Content-Type' => 'text/html'}, ''] } - stub.get('not-found') { [404, {'X-Reason' => 'because'}, 'keep looking'] } - stub.get('error') { [500, {'X-Error' => 'bailout'}, 'fail'] } - end - end - end - - class ResponseUpcaser < Faraday::Response::Middleware - def parse(body) - body.upcase - end - end - - def test_success - assert @conn.get('ok') - end - - def test_raises_not_found - error = assert_raises Faraday::Error::ResourceNotFound do - @conn.get('not-found') - end - assert_equal 'the server responded with status 404', error.message - assert_equal 'because', error.response[:headers]['X-Reason'] - end - - def test_raises_error - error = assert_raises Faraday::Error::ClientError do - @conn.get('error') - end - assert_equal 'the server responded with status 500', error.message - assert_equal 'bailout', error.response[:headers]['X-Error'] - end - - def test_upcase - @conn.builder.insert(0, ResponseUpcaser) - assert_equal '', @conn.get('ok').body - end -end - -class ResponseNoBodyMiddleWareTest < Faraday::TestCase - def setup - @conn = Faraday.new do |b| - b.response :raise_error - b.adapter :test do |stub| - stub.get('not_modified') { [304, nil, nil] } - stub.get('no_content') { [204, nil, nil] } - end - end - @conn.builder.insert(0, NotCalled) - end - - class NotCalled < Faraday::Response::Middleware - def parse(body) - raise "this should not be called" - end - end - - def test_204 - assert_equal nil, @conn.get('no_content').body - end - - def test_304 - assert_equal nil, @conn.get('not_modified').body - end -end diff --git a/.gems/gems/faraday-0.9.0/test/strawberry.rb b/.gems/gems/faraday-0.9.0/test/strawberry.rb deleted file mode 100644 index 80c8d0b..0000000 --- a/.gems/gems/faraday-0.9.0/test/strawberry.rb +++ /dev/null @@ -1,2 +0,0 @@ -class MiddlewareStackTest::Strawberry < MiddlewareStackTest::Handler -end diff --git a/.gems/gems/faraday-0.9.0/test/utils_test.rb b/.gems/gems/faraday-0.9.0/test/utils_test.rb deleted file mode 100644 index b54f208..0000000 --- a/.gems/gems/faraday-0.9.0/test/utils_test.rb +++ /dev/null @@ -1,58 +0,0 @@ -require File.expand_path('../helper', __FILE__) - -class TestUtils < Faraday::TestCase - def setup - @url = "http://example.com/abc" - end - - # emulates ActiveSupport::SafeBuffer#gsub - FakeSafeBuffer = Struct.new(:string) do - def to_s() self end - def gsub(regex) - string.gsub(regex) { - match, = $&, '' =~ /a/ - yield(match) - } - end - end - - def test_escaping_safe_buffer - str = FakeSafeBuffer.new('$32,000.00') - assert_equal '%2432%2C000.00', Faraday::Utils.escape(str) - end - - def test_parses_with_default - with_default_uri_parser(nil) do - uri = normalize(@url) - assert_equal 'example.com', uri.host - end - end - - def test_parses_with_URI - with_default_uri_parser(::URI) do - uri = normalize(@url) - assert_equal 'example.com', uri.host - end - end - - def test_parses_with_block - with_default_uri_parser(lambda {|u| "booya#{"!" * u.size}" }) do - assert_equal 'booya!!!!!!!!!!!!!!!!!!!!!!', normalize(@url) - end - end - - def normalize(url) - Faraday::Utils::URI(url) - end - - def with_default_uri_parser(parser) - old_parser = Faraday::Utils.default_uri_parser - begin - Faraday::Utils.default_uri_parser = parser - yield - ensure - Faraday::Utils.default_uri_parser = old_parser - end - end -end - diff --git a/.gems/gems/http-0.6.2/.coveralls.yml b/.gems/gems/http-0.6.2/.coveralls.yml deleted file mode 100644 index e1da6a3..0000000 --- a/.gems/gems/http-0.6.2/.coveralls.yml +++ /dev/null @@ -1 +0,0 @@ -service-name: travis-pro diff --git a/.gems/gems/http-0.6.2/.gitignore b/.gems/gems/http-0.6.2/.gitignore deleted file mode 100644 index 79ed009..0000000 --- a/.gems/gems/http-0.6.2/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -*.gem -.bundle -.config -.rvmrc -.yardoc -Gemfile.lock -InstalledFiles -_yardoc -coverage -doc -lib/bundler/man -measurement -pkg -rdoc -spec/reports -test/tmp -test/version_tmp -tmp diff --git a/.gems/gems/http-0.6.2/.rspec b/.gems/gems/http-0.6.2/.rspec deleted file mode 100644 index 65d1e74..0000000 --- a/.gems/gems/http-0.6.2/.rspec +++ /dev/null @@ -1,5 +0,0 @@ ---backtrace ---color ---format=documentation ---order random ---warnings diff --git a/.gems/gems/http-0.6.2/.rubocop.yml b/.gems/gems/http-0.6.2/.rubocop.yml deleted file mode 100644 index 8aae49f..0000000 --- a/.gems/gems/http-0.6.2/.rubocop.yml +++ /dev/null @@ -1,116 +0,0 @@ -AllCops: - Include: - - 'Gemfile' - - 'Rakefile' - - 'http.gemspec' - -# Avoid long parameter lists -ParameterLists: - Max: 3 - CountKeywordArgs: true - -MethodLength: - CountComments: false - Max: 31 # TODO: lower to 15 - -ClassLength: - CountComments: false - Max: 100 - -CyclomaticComplexity: - Max: 13 # TODO: lower to 6 - -# Avoid more than `Max` levels of nesting. -BlockNesting: - Max: 3 - -# Do not force public/protected/private keyword to be indented at the same -# level as the def keyword. My personal preference is to outdent these keywords -# because I think when scanning code it makes it easier to identify the -# sections of code and visually separate them. When the keyword is at the same -# level I think it sort of blends in with the def keywords and makes it harder -# to scan the code and see where the sections are. -AccessModifierIndentation: - Enabled: false - -# Limit line length -LineLength: - Enabled: false - -# Disable documentation checking until a class needs to be documented once -Documentation: - Enabled: false - -# Not all trivial readers/writers can be defined with attr_* methods -TrivialAccessors: - Enabled: false - -# Enforce Ruby 1.8-compatible hash syntax -HashSyntax: - EnforcedStyle: hash_rockets - -# No spaces inside hash literals -SpaceInsideHashLiteralBraces: - EnforcedStyle: no_space - -# Allow dots at the end of lines -DotPosition: - Enabled: false - -# Don't require magic comment at the top of every file -Encoding: - Enabled: false - -# Enforce outdenting of access modifiers (i.e. public, private, protected) -AccessModifierIndentation: - EnforcedStyle: outdent - -EmptyLinesAroundAccessModifier: - Enabled: true - -# Align ends correctly -EndAlignment: - AlignWith: variable - -# Indentation of when/else -CaseIndentation: - IndentWhenRelativeTo: end - IndentOneStep: false - -# Use the old lambda literal syntax -Lambda: - Enabled: false - -DoubleNegation: - Enabled: false - -PercentLiteralDelimiters: - PreferredDelimiters: - '%': () - '%i': () - '%q': () - '%Q': () - '%r': '{}' - '%s': () - '%w': '[]' - '%W': '[]' - '%x': () - -Semicolon: - Exclude: - - 'spec/support/' - -# Do not force first argument to be separated with exactly single space. -# My (ixti) personal preference is to align code in columns when it makes -# sense: -# -# module HTTP -# module MimeType -# class JSON < Adapter -# register_adapter 'application/json', JSON -# register_alias 'application/json', :json -# end -# end -# end -SingleSpaceBeforeFirstArg: - Enabled: false diff --git a/.gems/gems/http-0.6.2/.travis.yml b/.gems/gems/http-0.6.2/.travis.yml deleted file mode 100644 index b24aba1..0000000 --- a/.gems/gems/http-0.6.2/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -bundler_args: --without development -env: - global: - - JRUBY_OPTS="$JRUBY_OPTS --debug" -language: ruby -rvm: - - 1.8.7 - - 1.9.2 - - 1.9.3 - - 2.0.0 - - 2.1 - - jruby-18mode - - jruby-19mode - - jruby-head - - rbx-2 - - ruby-head -matrix: - allow_failures: - - rvm: jruby-head - - rvm: ruby-head - fast_finish: true diff --git a/.gems/gems/http-0.6.2/CHANGES.md b/.gems/gems/http-0.6.2/CHANGES.md deleted file mode 100644 index d0f39e8..0000000 --- a/.gems/gems/http-0.6.2/CHANGES.md +++ /dev/null @@ -1,132 +0,0 @@ -0.6.2 (2014-08-06) ------------------- - -* Fix default Host header value. See #150. (@ixti) -* Deprecate BearerToken authorization header. (@ixti) -* Fix handling of chunked responses without Content-Length header. (@ixti) -* Rename `HTTP.with_follow` to `HTTP.follow` and mark former one as being - deprecated (@ixti) - -0.6.1 (2014-05-07) ------------------- - -* Fix request `Content-Length` calculation for Unicode (@challengeechallengee) -* Add `Response#flush` (@ixti) -* Fix `Response::Body#readpartial` default size (@hannesg, @ixti) -* Add missing `CRLF` for chunked bodies (@hannesg) -* Fix forgotten CGI require (@ixti) -* Improve README (@tarcieri) - -0.6.0 (2014-04-04) ------------------- - -* Rename `HTTP::Request#method` to `HTTP::Request#verb` (@krainboltgreene) -* Add `HTTP::ResponseBody` class (@tarcieri) -* Change API of response on `HTTP::Client.request` and "friends" (`#get`, `#post`, etc) (@tarcieri) -* Add `HTTP::Response#readpartial` (@tarcieri) -* Add `HTTP::Headers` class (@ixti) -* Fix and improve following redirects (@ixti) -* Add `HTTP::Request#redirect` (@ixti) -* Add `HTTP::Response#content_type` (@ixti) -* Add `HTTP::Response#mime_type` (@ixti) -* Add `HTTP::Response#charset` (@ixti) -* Improve error message upon invalid URI scheme (@ixti) -* Consolidate errors under common `HTTP::Error` namespace (@ixti) -* Add easy way of adding Authorization header (@ixti) -* Fix proxy support (@hundredwatt) -* Fix and improve query params handing (@jwinter) -* Change API of custom MIME type parsers (@ixti) -* Remove `HTTP::Chainable#with_response` (@ixti) -* Remove `HTTP::Response::BodyDelegator` (@ixti) -* Remove `HTTP::Response#parsed_body` (@ixti) -* Bump up input buffer from 4K to 16K (@tarcieri) - -``` ruby -# Main API change you will mention is that `request` method and it's -# syntax sugar helpers like `get`, `post`, etc. now returns Response -# object instead of BodyDelegator: - -response = HTTP.get "http://example.com" -raw_body = HTTP.get("http://example.com").to_s -parsed_body = HTTP.get("http://example.com/users.json").parse - -# Second major change in API is work with request/response headers -# It is now delegated to `HTTP::Headers` class, so you can check it's -# documentation for details, here we will only outline main difference. -# Duckface (`[]=`) does not appends headers anymore - -request[:content_type] = "text/plain" -request[:content_type] = "text/html" -request[:content_type] # => "text/html" - -# In order to add multiple header values, you should pass array: - -request[:cookie] = ["foo=bar", "woo=hoo"] -request[:cookie] # => ["foo=bar", "woo=hoo"] - -# or call `#add` on headers: - -request.headers.add :accept, "text/plain" -request.headers.add :accept, "text/html" -request[:accept] # => ["text/plain", "text/html"] - -# Also, you can now read body in chunks (stream): - -res = HTTP.get "http://example.com" -File.open "/tmp/dummy.bin", "wb" do |io| - while (chunk = res.readpartial) - io << chunk - end -end -``` - -[Changes discussion](https://github.com/tarcieri/http/issues/116) - -0.5.1 (2014-05-27) ------------------- - -* Backports redirector fixes from 0.6.0 (@ixti) -* EOL of 0.5.X branch. - -0.5.0 ------ -* Add query string support -* New response delegator allows HTTP.get(uri).response -* HTTP::Chainable#stream provides a shorter alias for - with_response(:object) -* Better string inspect for HTTP::Response -* Curb compatibility layer removed - -0.4.0 ------ -* Fix bug accessing https URLs -* Fix several instances of broken redirect handling -* Add default user agent -* Many additional minor bugfixes - -0.3.0 ------ -* New implementation based on tmm1's http_parser.rb instead of Net::HTTP -* Support for following redirects -* Support for request body through {:body => ...} option -* HTTP#with_response (through Chainable) - -0.2.0 ------ -* Request and response objects -* Callback system -* Internal refactoring ensuring true chainability -* Use the certified gem to ensure SSL certificate verification - -0.1.0 ------ -* Testing against WEBrick -* Curb compatibility (require 'http/compat/curb') - -0.0.1 ------ -* Initial half-baked release - -0.0.0 ------ -* Vapoware release to claim the "http" gem name >:D diff --git a/.gems/gems/http-0.6.2/Gemfile b/.gems/gems/http-0.6.2/Gemfile deleted file mode 100644 index 0cace9c..0000000 --- a/.gems/gems/http-0.6.2/Gemfile +++ /dev/null @@ -1,31 +0,0 @@ -source 'http://rubygems.org' - -gem 'rake', '~> 10.1.1' -gem 'jruby-openssl' if defined? JRUBY_VERSION - -group :development do - gem 'pry' - platforms :ruby_19, :ruby_20 do - gem 'pry-debugger' - gem 'pry-stack_explorer' - end - platforms :ruby_19, :ruby_20, :ruby_21 do - gem 'celluloid-io' - gem 'guard-rspec' - end -end - -group :test do - gem 'backports' - gem 'coveralls' - gem 'json', '>= 1.8.1', :platforms => [:jruby, :rbx, :ruby_18, :ruby_19] - gem 'mime-types', '~> 1.25', :platforms => [:jruby, :ruby_18] - gem 'rest-client', '~> 1.6.0', :platforms => [:jruby, :ruby_18] - gem 'rspec', '~> 2.14' - gem 'rubocop', '~> 0.24.0', :platforms => [:ruby_19, :ruby_20, :ruby_21] - gem 'simplecov', '>= 0.9' - gem 'yardstick' -end - -# Specify your gem's dependencies in http.gemspec -gemspec diff --git a/.gems/gems/http-0.6.2/Guardfile b/.gems/gems/http-0.6.2/Guardfile deleted file mode 100644 index 2f00b11..0000000 --- a/.gems/gems/http-0.6.2/Guardfile +++ /dev/null @@ -1,9 +0,0 @@ -# A sample Guardfile -# More info at https://github.com/guard/guard#readme - -guard :rspec do - watch(%r{^spec/.+_spec\.rb$}) - watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } - watch('spec/spec_helper.rb') { "spec" } -end - diff --git a/.gems/gems/http-0.6.2/LICENSE.txt b/.gems/gems/http-0.6.2/LICENSE.txt deleted file mode 100644 index 92021d1..0000000 --- a/.gems/gems/http-0.6.2/LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2014 Tony Arcieri, Erik Michaels-Ober - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/.gems/gems/http-0.6.2/README.md b/.gems/gems/http-0.6.2/README.md deleted file mode 100644 index fac2090..0000000 --- a/.gems/gems/http-0.6.2/README.md +++ /dev/null @@ -1,259 +0,0 @@ -![The HTTP Gem](https://raw.github.com/tarcieri/http/master/logo.png) -============== -[![Gem Version](https://badge.fury.io/rb/http.png)](http://rubygems.org/gems/http) -[![Build Status](https://secure.travis-ci.org/tarcieri/http.png?branch=master)](http://travis-ci.org/tarcieri/http) -[![Code Climate](https://codeclimate.com/github/tarcieri/http.png)](https://codeclimate.com/github/tarcieri/http) -[![Coverage Status](https://coveralls.io/repos/tarcieri/http/badge.png?branch=master)](https://coveralls.io/r/tarcieri/http) - -SEO Note --------- - -This Gem has the worst name in the history of SEO. But perhaps we can fix that if we -all refer to it as "The HTTP Gem", or even better, the "Ruby HTTP Gem". - -About ------ - -The HTTP Gem is an easy-to-use client library for making requests from Ruby. It uses -a simple method chaining system for building requests, similar to Python's [Requests] - -Under the hood, The HTTP Gem uses [http_parser.rb], a fast HTTP parsing native -extension based on the Node.js parser and a Java port thereof. - -[requests]: http://docs.python-requests.org/en/latest/ -[http_parser.rb]: https://github.com/tmm1/http_parser.rb - -Help and Discussion -------------------- - -If you need help or just want to talk about the Ruby HTTP Gem, [visit our Google -Group][googlegroup], or join by email by sending a message to: -[ruby-http-gem+subscribe@googlegroups.com][subscribe]. - -[googlegroup]: https://groups.google.com/forum/#!forum/ruby-http-gem -[subscribe]: mailto:ruby-http-gem+subscribe@googlegroups.com - -If you believe you've found a bug, please report it at: - -https://github.com/tarcieri/http/issues - -Installation ------------- - -Add this line to your application's Gemfile: - - gem 'http' - -And then execute: - - $ bundle - -Or install it yourself as: - - $ gem install http - -Inside of your Ruby program do: - - require 'http' - -...to pull it in as a dependency. - -Documentation -------------- - -[Please see the HTTP Gem Wiki](https://github.com/tarcieri/http/wiki) -for more detailed documentation and usage notes. - -Basic Usage ------------ - -Here's some simple examples to get you started: - -### GET requests - -```ruby ->> HTTP.get("http://www.google.com").to_s -=> "> HTTP.get("http://www.google.com") -=> #"text/html; charset=UTF-8", "Date"=>"Fri, ...> - => #"text/html; ...> -``` - -We can also obtain an `HTTP::ResponseBody` object for this response: - -```ruby ->> HTTP.get("http://www.google.com").body - => # -``` - -The response body can be streamed with `HTTP::ResponseBody#readpartial`: - -```ruby ->> HTTP.get("http://www.google.com").body.readpartial - => " {:foo => "42"} -``` -Making GET requests with query string parameters is as simple. - -```ruby -HTTP.get "http://example.com/resource", :params => {:foo => "bar"} -``` - -Want to POST with a specific body, JSON for instance? - -```ruby -HTTP.post "http://example.com/resource", :json => { :foo => '42' } -``` - -It's easy! - - -### Proxy Support - -Making request behind proxy is as simple as making them directly. Just specify -hostname (or IP address) of your proxy server and it's port, and here you go: - -```ruby -HTTP.via("proxy-hostname.local", 8080) - .get "http://example.com/resource" -``` - -Proxy needs authentication? No problem: - -```ruby -HTTP.via("proxy-hostname.local", 8080, "username", "password") - .get "http://example.com/resource" -``` - - -### Adding Headers - -The HTTP gem uses the concept of chaining to simplify requests. Let's say -you want to get the latest commit of this library from Github in JSON format. -One way we could do this is by tacking a filename on the end of the URL: - -```ruby -HTTP.get "https://github.com/tarcieri/http/commit/HEAD.json" -``` - -The Github API happens to support this approach, but really this is a bit of a -hack that makes it easy for people typing URLs into the address bars of -browsers to perform the act of content negotiation. Since we have access to -the full, raw power of HTTP, we can perform content negotiation the way HTTP -intends us to, by using the Accept header: - -```ruby -HTTP.with_headers(:accept => 'application/json'). - get("https://github.com/tarcieri/http/commit/HEAD") -``` - -This requests JSON from Github. Github is smart enough to understand our -request and returns a response with Content-Type: application/json. If you -happen to have a library loaded which defines the JSON constant and implements -JSON.parse, the HTTP gem will attempt to parse the JSON response. - -Shorter aliases exists for HTTP.with_headers: - -```ruby -HTTP.with(:accept => 'application/json'). - get("https://github.com/tarcieri/http/commit/HEAD") - -HTTP[:accept => 'application/json']. - get("https://github.com/tarcieri/http/commit/HEAD") -``` - -### Content Negotiation - -As important a concept as content negotiation is to HTTP, it sure should be easy, -right? But usually it's not, and so we end up adding ".json" onto the ends of -our URLs because the existing mechanisms make it too hard. It should be easy: - -```ruby -HTTP.accept(:json).get("https://github.com/tarcieri/http/commit/HEAD") -``` - -This adds the appropriate Accept header for retrieving a JSON response for the -given resource. - - -### Celluloid::IO Support - -The HTTP Gem makes it simple to make multiple concurrent HTTP requests from a -Celluloid::IO actor. Here's a parallel HTTP fetcher with the HTTP Gem and -Celluloid::IO: - -```ruby -require 'celluloid/io' -require 'http' - -class HttpFetcher - include Celluloid::IO - - def fetch(url) - HTTP.get(url, socket_class: Celluloid::IO::TCPSocket) - end -end -``` - -There's a little more to it, but that's the core idea! - -* [Full parallel HTTP fetcher example](https://github.com/tarcieri/http/wiki/Parallel-requests-with-Celluloid%3A%3AIO) -* See also: [Celluloid::IO](https://github.com/celluloid/celluloid-io) - - -Supported Ruby Versions ------------------------ - -This library aims to support and is [tested against][travis] the following Ruby -versions: - -* Ruby 1.8.7 -* Ruby 1.9.2 -* Ruby 1.9.3 -* Ruby 2.0.0 -* Ruby 2.1.0 - -If something doesn't work on one of these versions, it's a bug. - -This library may inadvertently work (or seem to work) on other Ruby versions, -however support will only be provided for the versions listed above. - -If you would like this library to support another Ruby version or -implementation, you may volunteer to be a maintainer. Being a maintainer -entails making sure all tests run and pass on that implementation. When -something breaks on your implementation, you will be responsible for providing -patches in a timely fashion. If critical issues for a particular implementation -exist at the time of a major release, support for that Ruby version may be -dropped. - -[travis]: http://travis-ci.org/tarcieri/http - - -Contributing to The HTTP Gem ----------------------------- - -* Fork the HTTP gem on github -* Make your changes and send me a pull request -* If we like them we'll merge them -* If we've accepted a patch, feel free to ask for commit access! - -Copyright ---------- - -Copyright (c) 2014 Tony Arcieri, Erik Michaels-Ober. See LICENSE.txt for further details. diff --git a/.gems/gems/http-0.6.2/Rakefile b/.gems/gems/http-0.6.2/Rakefile deleted file mode 100644 index b68f88e..0000000 --- a/.gems/gems/http-0.6.2/Rakefile +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env rake -require 'bundler/gem_tasks' - -require 'rspec/core/rake_task' -RSpec::Core::RakeTask.new - -task :test => :spec - -begin - require 'rubocop/rake_task' - RuboCop::RakeTask.new -rescue LoadError - task :rubocop do - $stderr.puts 'RuboCop is disabled' - end -end - -require 'yardstick/rake/measurement' -Yardstick::Rake::Measurement.new do |measurement| - measurement.output = 'measurement/report.txt' -end - -require 'yardstick/rake/verify' -Yardstick::Rake::Verify.new do |verify| - verify.require_exact_threshold = false - verify.threshold = 58 -end - -task :default => [:spec, :rubocop, :verify_measurements] diff --git a/.gems/gems/http-0.6.2/examples/parallel_requests_with_celluloid.rb b/.gems/gems/http-0.6.2/examples/parallel_requests_with_celluloid.rb deleted file mode 100755 index f47e2ad..0000000 --- a/.gems/gems/http-0.6.2/examples/parallel_requests_with_celluloid.rb +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env ruby -# -# Example of using the HTTP Gem with Celluloid::IO -# Make sure to 'gem install celluloid-io' before running -# -# Run as: bundle exec examples/parallel_requests_with_celluloid.rb -# - -require 'celluloid/io' -require 'http' - -class HttpFetcher - include Celluloid::IO - - def fetch(url) - # Note: For SSL support specify: - # ssl_socket_class: Celluloid::IO::SSLSocket - HTTP.get(url, :socket_class => Celluloid::IO::TCPSocket) - end -end - -fetcher = HttpFetcher.new - -urls = %w[http://ruby-lang.org/ http://rubygems.org/ http://celluloid.io/] - -# Kick off a bunch of future calls to HttpFetcher to grab the URLs in parallel -futures = urls.map { |u| [u, fetcher.future.fetch(u)] } - -# Consume the results as they come in -futures.each do |url, future| - # Wait for HttpFetcher#fetch to complete for this request - response = future.value - puts "Got #{url}: #{response.inspect}" -end - -# Suppress Celluloid's shutdown messages -# Otherwise the example is a bit noisy :| -exit! diff --git a/.gems/gems/http-0.6.2/http.gemspec b/.gems/gems/http-0.6.2/http.gemspec deleted file mode 100644 index b586e84..0000000 --- a/.gems/gems/http-0.6.2/http.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -lib = File.expand_path('../lib', __FILE__) -$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require 'http/version' - -Gem::Specification.new do |gem| - gem.authors = %w[Tony Arcieri] - gem.email = %w[tony.arcieri@gmail.com] - - gem.description = <<-DESCRIPTION.strip.gsub(/\s+/, ' ') - An easy-to-use client library for making requests from Ruby. - It uses a simple method chaining system for building requests, - similar to Python's Requests. - DESCRIPTION - - gem.summary = 'HTTP should be easy' - gem.homepage = 'https://github.com/tarcieri/http' - gem.licenses = %w[MIT] - - gem.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) } - gem.files = `git ls-files`.split("\n") - gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") - gem.name = 'http' - gem.require_paths = %w[lib] - gem.version = HTTP::VERSION - - gem.add_runtime_dependency 'http_parser.rb', '~> 0.6.0' - - gem.add_development_dependency 'bundler', '~> 1.0' -end diff --git a/.gems/gems/http-0.6.2/lib/http.rb b/.gems/gems/http-0.6.2/lib/http.rb deleted file mode 100644 index f4c8460..0000000 --- a/.gems/gems/http-0.6.2/lib/http.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'http/parser' - -require 'http/errors' -require 'http/chainable' -require 'http/client' -require 'http/options' -require 'http/request' -require 'http/request/writer' -require 'http/response' -require 'http/response/body' -require 'http/response/parser' -require 'http/backports' - -# HTTP should be easy -module HTTP - extend Chainable - - class << self - # HTTP[:accept => 'text/html'].get(...) - alias_method :[], :with_headers - end -end - -Http = HTTP unless defined?(Http) diff --git a/.gems/gems/http-0.6.2/lib/http/authorization_header.rb b/.gems/gems/http-0.6.2/lib/http/authorization_header.rb deleted file mode 100644 index d095b23..0000000 --- a/.gems/gems/http-0.6.2/lib/http/authorization_header.rb +++ /dev/null @@ -1,37 +0,0 @@ -module HTTP - # Authorization header value builders - module AuthorizationHeader - class << self - # Associate type with given builder. - # @param [#to_sym] type - # @param [Class] klass - # @return [void] - def register(type, klass) - builders[type.to_sym] = klass - end - - # Builds Authorization header value with associated builder. - # @param [#to_sym] type - # @param [Object] opts - # @return [String] - def build(type, opts) - klass = builders[type.to_sym] - - fail Error, "Unknown authorization type #{type}" unless klass - - klass.new opts - end - - private - - # :nodoc: - def builders - @builders ||= {} - end - end - end -end - -# built-in builders -require 'http/authorization_header/basic_auth' -require 'http/authorization_header/bearer_token' diff --git a/.gems/gems/http-0.6.2/lib/http/authorization_header/basic_auth.rb b/.gems/gems/http-0.6.2/lib/http/authorization_header/basic_auth.rb deleted file mode 100644 index 9f42eb7..0000000 --- a/.gems/gems/http-0.6.2/lib/http/authorization_header/basic_auth.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'base64' - -module HTTP - module AuthorizationHeader - # Basic authorization header builder - # @see http://tools.ietf.org/html/rfc2617 - class BasicAuth - # @param [#fetch] opts - # @option opts [#to_s] :user - # @option opts [#to_s] :pass - def initialize(opts) - @user = opts.fetch :user - @pass = opts.fetch :pass - end - - # :nodoc: - def to_s - 'Basic ' << Base64.strict_encode64("#{@user}:#{@pass}") - end - end - - register :basic, BasicAuth - end -end diff --git a/.gems/gems/http-0.6.2/lib/http/authorization_header/bearer_token.rb b/.gems/gems/http-0.6.2/lib/http/authorization_header/bearer_token.rb deleted file mode 100644 index ab5eed4..0000000 --- a/.gems/gems/http-0.6.2/lib/http/authorization_header/bearer_token.rb +++ /dev/null @@ -1,28 +0,0 @@ -require 'base64' - -module HTTP - module AuthorizationHeader - # OAuth2 Bearer token authorization header builder - # @see http://tools.ietf.org/html/rfc6750 - # - # @deprecated Will be remove in v0.7.0 - class BearerToken - # @param [#fetch] opts - # @option opts [#to_s] :token - # @option opts [Boolean] :encode (false) deprecated - def initialize(opts) - warn "#{Kernel.caller.first}: [DEPRECATION] BearerToken deprecated." - - @token = opts.fetch :token - @token = Base64.strict_encode64 @token if opts.fetch(:encode, false) - end - - # :nodoc: - def to_s - "Bearer #{@token}" - end - end - - register :bearer, BearerToken - end -end diff --git a/.gems/gems/http-0.6.2/lib/http/backports.rb b/.gems/gems/http-0.6.2/lib/http/backports.rb deleted file mode 100644 index 2f61bb6..0000000 --- a/.gems/gems/http-0.6.2/lib/http/backports.rb +++ /dev/null @@ -1,2 +0,0 @@ -require 'http/backports/uri' if RUBY_VERSION < '1.9.3' -require 'http/backports/base64' if RUBY_VERSION < '1.9.0' diff --git a/.gems/gems/http-0.6.2/lib/http/backports/base64.rb b/.gems/gems/http-0.6.2/lib/http/backports/base64.rb deleted file mode 100644 index 5826bd2..0000000 --- a/.gems/gems/http-0.6.2/lib/http/backports/base64.rb +++ /dev/null @@ -1,6 +0,0 @@ -module Base64 - # :nodoc: - def self.strict_encode64(data) - encode64(data).gsub(/\n/, '') - end -end diff --git a/.gems/gems/http-0.6.2/lib/http/backports/uri.rb b/.gems/gems/http-0.6.2/lib/http/backports/uri.rb deleted file mode 100644 index 9fca044..0000000 --- a/.gems/gems/http-0.6.2/lib/http/backports/uri.rb +++ /dev/null @@ -1,131 +0,0 @@ -# Taken from Ruby 1.9's uri/common.rb -# By Akira Yamada -# License: -# You can redistribute it and/or modify it under the same term as Ruby. - -require 'uri' - -# Backport Ruby 1.9's form encoding/decoding functionality -module URI - TBLENCWWWCOMP_ = {} # :nodoc: - 256.times do |i| - TBLENCWWWCOMP_[i.chr] = format('%%%02X', i) - end - TBLENCWWWCOMP_[' '] = '+' - TBLENCWWWCOMP_.freeze - TBLDECWWWCOMP_ = {} # :nodoc: - 256.times do |i| - h, l = i >> 4, i & 15 - TBLDECWWWCOMP_[format('%%%X%X', h, l)] = i.chr - TBLDECWWWCOMP_[format('%%%x%X', h, l)] = i.chr - TBLDECWWWCOMP_[format('%%%X%x', h, l)] = i.chr - TBLDECWWWCOMP_[format('%%%x%x', h, l)] = i.chr - end - TBLDECWWWCOMP_['+'] = ' ' - TBLDECWWWCOMP_.freeze - - # Encode given +str+ to URL-encoded form data. - # - # This method doesn't convert *, -, ., 0-9, A-Z, _, a-z, but does convert SP - # (ASCII space) to + and converts others to %XX. - # - # This is an implementation of - # http://www.w3.org/TR/html5/association-of-controls-and-forms.html#url-encoded-form-data - # - # See URI.decode_www_form_component, URI.encode_www_form - def self.encode_www_form_component(str) - str.to_s.gsub(/[^*\-.0-9A-Z_a-z]/) { |chr| TBLENCWWWCOMP_[chr] } - end - - # Decode given +str+ of URL-encoded form data. - # - # This decods + to SP. - # - # See URI.encode_www_form_component, URI.decode_www_form - def self.decode_www_form_component(str) - fail(ArgumentError, "invalid %-encoding (#{str})") unless /\A[^%]*(?:%\h\h[^%]*)*\z/ =~ str - str.gsub(/\+|%\h\h/) { |chr| TBLDECWWWCOMP_[chr] } - end - - # Generate URL-encoded form data from given +enum+. - # - # This generates application/x-www-form-urlencoded data defined in HTML5 - # from given an Enumerable object. - # - # This internally uses URI.encode_www_form_component(str). - # - # This method doesn't convert the encoding of given items, so convert them - # before call this method if you want to send data as other than original - # encoding or mixed encoding data. (Strings which are encoded in an HTML5 - # ASCII incompatible encoding are converted to UTF-8.) - # - # This method doesn't handle files. When you send a file, use - # multipart/form-data. - # - # This is an implementation of - # http://www.w3.org/TR/html5/forms.html#url-encoded-form-data - # - # URI.encode_www_form([["q", "ruby"], ["lang", "en"]]) - # #=> "q=ruby&lang=en" - # URI.encode_www_form("q" => "ruby", "lang" => "en") - # #=> "q=ruby&lang=en" - # URI.encode_www_form("q" => ["ruby", "perl"], "lang" => "en") - # #=> "q=ruby&q=perl&lang=en" - # URI.encode_www_form([["q", "ruby"], ["q", "perl"], ["lang", "en"]]) - # #=> "q=ruby&q=perl&lang=en" - # - # See URI.encode_www_form_component, URI.decode_www_form - def self.encode_www_form(enum) - enum.map do |k, v| - if v.nil? - encode_www_form_component(k) - elsif v.respond_to?(:to_ary) - v.to_ary.map do |w| - next unless w - - str = encode_www_form_component(k) - str << '=' - str << encode_www_form_component(w) - end.join('&') - else - str = encode_www_form_component(k) - str << '=' - str << encode_www_form_component(v) - end - end.join('&') - end - - WFKV_ = '(?:[^%#=;&]*(?:%\h\h[^%#=;&]*)*)' # :nodoc: - - # Decode URL-encoded form data from given +str+. - # - # This decodes application/x-www-form-urlencoded data - # and returns array of key-value array. - # This internally uses URI.decode_www_form_component. - # - # _charset_ hack is not supported now because the mapping from given charset - # to Ruby's encoding is not clear yet. - # see also http://www.w3.org/TR/html5/syntax.html#character-encodings-0 - # - # This refers http://www.w3.org/TR/html5/forms.html#url-encoded-form-data - # - # ary = URI.decode_www_form("a=1&a=2&b=3") - # p ary #=> [['a', '1'], ['a', '2'], ['b', '3']] - # p ary.assoc('a').last #=> '1' - # p ary.assoc('b').last #=> '3' - # p ary.rassoc('a').last #=> '2' - # p Hash[ary] # => {"a"=>"2", "b"=>"3"} - # - # See URI.decode_www_form_component, URI.encode_www_form - def self.decode_www_form(str) - return [] if str.empty? - unless /\A#{WFKV_}=#{WFKV_}(?:[;&]#{WFKV_}=#{WFKV_})*\z/o =~ str - fail(ArgumentError, "invalid data of application/x-www-form-urlencoded (#{str})") - end - ary = [] - $&.scan(/([^=;&]+)=([^;&]*)/) do - ary << [decode_www_form_component(Regexp.last_match[1]), decode_www_form_component(Regexp.last_match[2])] - end - ary - end -end diff --git a/.gems/gems/http-0.6.2/lib/http/chainable.rb b/.gems/gems/http-0.6.2/lib/http/chainable.rb deleted file mode 100644 index f223e67..0000000 --- a/.gems/gems/http-0.6.2/lib/http/chainable.rb +++ /dev/null @@ -1,143 +0,0 @@ -require 'http/authorization_header' - -module HTTP - module Chainable - # Request a get sans response body - def head(uri, options = {}) - request :head, uri, options - end - - # Get a resource - def get(uri, options = {}) - request :get, uri, options - end - - # Post to a resource - def post(uri, options = {}) - request :post, uri, options - end - - # Put to a resource - def put(uri, options = {}) - request :put, uri, options - end - - # Delete a resource - def delete(uri, options = {}) - request :delete, uri, options - end - - # Echo the request back to the client - def trace(uri, options = {}) - request :trace, uri, options - end - - # Return the methods supported on the given URI - def options(uri, options = {}) - request :options, uri, options - end - - # Convert to a transparent TCP/IP tunnel - def connect(uri, options = {}) - request :connect, uri, options - end - - # Apply partial modifications to a resource - def patch(uri, options = {}) - request :patch, uri, options - end - - # Make an HTTP request with the given verb - def request(verb, uri, options = {}) - branch(options).request verb, uri - end - - # Make a request through an HTTP proxy - def via(*proxy) - proxy_hash = {} - proxy_hash[:proxy_address] = proxy[0] if proxy[0].is_a?(String) - proxy_hash[:proxy_port] = proxy[1] if proxy[1].is_a?(Integer) - proxy_hash[:proxy_username] = proxy[2] if proxy[2].is_a?(String) - proxy_hash[:proxy_password] = proxy[3] if proxy[3].is_a?(String) - - if [2, 4].include?(proxy_hash.keys.size) - branch default_options.with_proxy(proxy_hash) - else - fail(RequestError, "invalid HTTP proxy: #{proxy_hash}") - end - end - alias_method :through, :via - - # Alias for with_response(:object) - def stream - with_response(:object) - end - - # Make client follow redirects. - # @param opts (see Redirector#initialize) - # @return [HTTP::Client] - def follow(opts = true) - branch default_options.with_follow opts - end - - # (see #follow) - # @deprecated - alias_method :with_follow, :follow - - # Make a request with the given headers - def with_headers(headers) - branch default_options.with_headers(headers) - end - alias_method :with, :with_headers - - # Accept the given MIME type(s) - def accept(type) - with :accept => MimeType.normalize(type) - end - - # Make a request with the given Authorization header - def auth(*args) - value = case args.count - when 1 then args.first - when 2 then AuthorizationHeader.build(*args) - else fail ArgumentError, "wrong number of arguments (#{args.count} for 1..2)" - end - - with :authorization => value.to_s - end - - def default_options - @default_options ||= HTTP::Options.new - end - - def default_options=(opts) - @default_options = HTTP::Options.new(opts) - end - - def default_headers - default_options.headers - end - - def default_headers=(headers) - @default_options = default_options.dup do |opts| - opts.headers = headers - end - end - - def default_callbacks - default_options.callbacks - end - - def default_callbacks=(callbacks) - @default_options = default_options.dup do |opts| - opts.callbacks = callbacks - end - end - - private - - def branch(options) - HTTP::Client.new(options) - end - end -end diff --git a/.gems/gems/http-0.6.2/lib/http/client.rb b/.gems/gems/http-0.6.2/lib/http/client.rb deleted file mode 100644 index e6e03a5..0000000 --- a/.gems/gems/http-0.6.2/lib/http/client.rb +++ /dev/null @@ -1,137 +0,0 @@ -require 'cgi' -require 'uri' -require 'http/options' -require 'http/redirector' - -module HTTP - # Clients make requests and receive responses - class Client - include Chainable - - # Input buffer size - BUFFER_SIZE = 16_384 - - attr_reader :default_options - - def initialize(default_options = {}) - @default_options = HTTP::Options.new(default_options) - @parser = HTTP::Response::Parser.new - @socket = nil - end - - # Make an HTTP request - def request(verb, uri, opts = {}) - opts = @default_options.merge(opts) - uri = make_request_uri(uri, opts) - headers = opts.headers - proxy = opts.proxy - body = make_request_body(opts, headers) - - req = HTTP::Request.new(verb, uri, headers, proxy, body) - res = perform req, opts - - if opts.follow - res = Redirector.new(opts.follow).perform req, res do |request| - perform request, opts - end - end - - res - end - - # Perform a single (no follow) HTTP request - def perform(req, options) - # finish previous response if client was re-used - # TODO: this is pretty wrong, as socket shoud be part of response - # connection, so that re-use of client will not break multiple - # chunked responses - finish_response - - uri = req.uri - - # TODO: keep-alive support - @socket = options[:socket_class].open(req.socket_host, req.socket_port) - @socket = start_tls(@socket, options) if uri.is_a?(URI::HTTPS) - - req.stream @socket - - begin - read_more BUFFER_SIZE until @parser.headers - rescue IOError, Errno::ECONNRESET, Errno::EPIPE => ex - raise IOError, "problem making HTTP request: #{ex}" - end - - body = Response::Body.new(self) - res = Response.new(@parser.status_code, @parser.http_version, @parser.headers, body, uri) - - finish_response if :head == req.verb - - res - end - - # Read a chunk of the body - def readpartial(size = BUFFER_SIZE) - return unless @socket - - read_more size - chunk = @parser.chunk - - finish_response if @parser.finished? - - chunk.to_s - end - - private - - # Initialize TLS connection - def start_tls(socket, options) - # TODO: abstract away SSLContexts so we can use other TLS libraries - context = options[:ssl_context] || OpenSSL::SSL::SSLContext.new - socket = options[:ssl_socket_class].new(socket, context) - - socket.connect - socket - end - - # Merges query params if needed - def make_request_uri(uri, options) - uri = URI uri.to_s unless uri.is_a? URI - - if options.params && !options.params.empty? - params = CGI.parse(uri.query.to_s).merge(options.params || {}) - uri.query = URI.encode_www_form params - end - - uri - end - - # Create the request body object to send - def make_request_body(opts, headers) - if opts.body - opts.body - elsif opts.form - headers['Content-Type'] ||= 'application/x-www-form-urlencoded' - URI.encode_www_form(opts.form) - elsif opts.json - headers['Content-Type'] ||= 'application/json' - MimeType[:json].encode opts.json - end - end - - # Callback for when we've reached the end of a response - def finish_response - @socket.close if @socket && !@socket.closed? - @parser.reset - - @socket = nil - end - - # Feeds some more data into parser - def read_more(size) - @parser << @socket.readpartial(size) unless @parser.finished? - true - rescue EOFError - false - end - end -end diff --git a/.gems/gems/http-0.6.2/lib/http/content_type.rb b/.gems/gems/http-0.6.2/lib/http/content_type.rb deleted file mode 100644 index 1c45d32..0000000 --- a/.gems/gems/http-0.6.2/lib/http/content_type.rb +++ /dev/null @@ -1,27 +0,0 @@ -module HTTP - ContentType = Struct.new(:mime_type, :charset) do - MIME_TYPE_RE = %r{^([^/]+/[^;]+)(?:$|;)} - CHARSET_RE = /;\s*charset=([^;]+)/i - - class << self - # Parse string and return ContentType struct - def parse(str) - new mime_type(str), charset(str) - end - - private - - # :nodoc: - def mime_type(str) - md = str.to_s.match MIME_TYPE_RE - md && md[1].to_s.strip.downcase - end - - # :nodoc: - def charset(str) - md = str.to_s.match CHARSET_RE - md && md[1].to_s.strip.gsub(/^"|"$/, '') - end - end - end -end diff --git a/.gems/gems/http-0.6.2/lib/http/errors.rb b/.gems/gems/http-0.6.2/lib/http/errors.rb deleted file mode 100644 index 18e0464..0000000 --- a/.gems/gems/http-0.6.2/lib/http/errors.rb +++ /dev/null @@ -1,13 +0,0 @@ -module HTTP - # Generic error - class Error < StandardError; end - - # Generic Request error - class RequestError < Error; end - - # Generic Response error - class ResponseError < Error; end - - # Request to do something when we're in the wrong state - class StateError < ResponseError; end -end diff --git a/.gems/gems/http-0.6.2/lib/http/headers.rb b/.gems/gems/http-0.6.2/lib/http/headers.rb deleted file mode 100644 index 4bba3b3..0000000 --- a/.gems/gems/http-0.6.2/lib/http/headers.rb +++ /dev/null @@ -1,154 +0,0 @@ -require 'forwardable' - -require 'http/headers/mixin' - -module HTTP - class Headers - extend Forwardable - include Enumerable - - # Matches HTTP header names when in "Canonical-Http-Format" - CANONICAL_HEADER = /^[A-Z][a-z]*(-[A-Z][a-z]*)*$/ - - # :nodoc: - def initialize - @pile = [] - end - - # Sets header - # - # @return [void] - def set(name, value) - delete(name) - add(name, value) - end - alias_method :[]=, :set - - # Removes header - # - # @return [void] - def delete(name) - name = canonicalize_header name.to_s - @pile.delete_if { |k, _| k == name } - end - - # Append header - # - # @return [void] - def add(name, value) - name = canonicalize_header name.to_s - Array(value).each { |v| @pile << [name, v] } - end - alias_method :append, :add - - # Return array of header values if any. - # - # @return [Array] - def get(name) - name = canonicalize_header name.to_s - @pile.select { |k, _| k == name }.map { |_, v| v } - end - - # Smart version of {#get} - # - # @return [NilClass] if header was not set - # @return [Object] if header has exactly one value - # @return [Array] if header has more than one value - def [](name) - values = get(name) - - case values.count - when 0 then nil - when 1 then values.first - else values - end - end - - # Converts headers into a Rack-compatible Hash - # - # @return [Hash] - def to_h - Hash[keys.map { |k| [k, self[k]] }] - end - - # Array of key/value pairs - # - # @return [Array<[String, String]>] - def to_a - @pile.map { |pair| pair.map(&:dup) } - end - - # :nodoc: - def inspect - "#<#{self.class} #{to_h.inspect}>" - end - - # List of header names - # - # @return [Array] - def keys - @pile.map { |k, _| k }.uniq - end - - # Compares headers to another Headers or Array of key/value pairs - # - # @return [Boolean] - def ==(other) - return false unless other.respond_to? :to_a - @pile == other.to_a - end - - def_delegators :@pile, :each, :empty?, :hash - - # :nodoc: - def initialize_copy(orig) - super - @pile = to_a - end - - # Merge in `other` headers - # - # @see #merge - # @return [void] - def merge!(other) - self.class.coerce(other).to_h.each { |name, values| set name, values } - end - - # Returns new Headers instance with `other` headers merged in. - # - # @see #merge! - # @return [Headers] - def merge(other) - dup.tap { |dupped| dupped.merge! other } - end - - # Initiates new Headers object from given object. - # - # @raise [Error] if given object can't be coerced - # @param [#to_hash, #to_h, #to_a] object - # @return [Headers] - def self.coerce(object) - unless object.is_a? self - object = case - when object.respond_to?(:to_hash) then object.to_hash - when object.respond_to?(:to_h) then object.to_h - when object.respond_to?(:to_a) then object.to_a - else fail Error, "Can't coerce #{object.inspect} to Headers" - end - end - - headers = new - object.each { |k, v| headers.add k, v } - headers - end - - private - - # Transform to canonical HTTP header capitalization - # @param [String] name - # @return [String] - def canonicalize_header(name) - name[CANONICAL_HEADER] || name.split(/[\-_]/).map(&:capitalize).join('-') - end - end -end diff --git a/.gems/gems/http-0.6.2/lib/http/headers/mixin.rb b/.gems/gems/http-0.6.2/lib/http/headers/mixin.rb deleted file mode 100644 index 7ee0080..0000000 --- a/.gems/gems/http-0.6.2/lib/http/headers/mixin.rb +++ /dev/null @@ -1,11 +0,0 @@ -require 'forwardable' - -module HTTP - class Headers - module Mixin - extend Forwardable - attr_reader :headers - def_delegators :headers, :[], :[]= - end - end -end diff --git a/.gems/gems/http-0.6.2/lib/http/mime_type.rb b/.gems/gems/http-0.6.2/lib/http/mime_type.rb deleted file mode 100644 index 826e222..0000000 --- a/.gems/gems/http-0.6.2/lib/http/mime_type.rb +++ /dev/null @@ -1,76 +0,0 @@ -module HTTP - # MIME type encode/decode adapters - module MimeType - class << self - # Associate MIME type with adapter - # - # @example - # - # module JsonAdapter - # class << self - # def encode(obj) - # # encode logic here - # end - # - # def decode(str) - # # decode logic here - # end - # end - # end - # - # HTTP::MimeType.register_adapter 'application/json', MyJsonAdapter - # - # @param [#to_s] type - # @param [#encode, #decode] adapter - # @return [void] - def register_adapter(type, adapter) - adapters[type.to_s] = adapter - end - - # Returns adapter associated with MIME type - # - # @param [#to_s] type - # @raise [Error] if no adapter found - # @return [Class] - def [](type) - adapters[normalize type] || fail(Error, "Unknown MIME type: #{type}") - end - - # Register a shortcut for MIME type - # - # @example - # - # HTTP::MimeType.register_alias 'application/json', :json - # - # @param [#to_s] type - # @param [#to_sym] shortcut - # @return [void] - def register_alias(type, shortcut) - aliases[shortcut.to_sym] = type.to_s - end - - # Resolves type by shortcut if possible - # - # @param [#to_s] type - # @return [String] - def normalize(type) - aliases.fetch type, type.to_s - end - - private - - # :nodoc: - def adapters - @adapters ||= {} - end - - # :nodoc: - def aliases - @aliases ||= {} - end - end - end -end - -# built-in mime types -require 'http/mime_type/json' diff --git a/.gems/gems/http-0.6.2/lib/http/mime_type/adapter.rb b/.gems/gems/http-0.6.2/lib/http/mime_type/adapter.rb deleted file mode 100644 index ac45b48..0000000 --- a/.gems/gems/http-0.6.2/lib/http/mime_type/adapter.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'forwardable' -require 'singleton' - -module HTTP - module MimeType - # Base encode/decode MIME type adapter - class Adapter - include Singleton - - class << self - extend Forwardable - def_delegators :instance, :encode, :decode - end - - %w[encode decode].each do |operation| - class_eval <<-RUBY, __FILE__, __LINE__ - def #{operation}(*) - fail Error, "\#{self.class} does not supports ##{operation}" - end - RUBY - end - end - end -end diff --git a/.gems/gems/http-0.6.2/lib/http/mime_type/json.rb b/.gems/gems/http-0.6.2/lib/http/mime_type/json.rb deleted file mode 100644 index b2604e7..0000000 --- a/.gems/gems/http-0.6.2/lib/http/mime_type/json.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'json' -require 'http/mime_type/adapter' - -module HTTP - module MimeType - # JSON encode/decode MIME type adapter - class JSON < Adapter - # Encodes object to JSON - def encode(obj) - return obj.to_json if obj.respond_to?(:to_json) - ::JSON.dump obj - end - - # Decodes JSON - def decode(str) - ::JSON.load str - end - end - - register_adapter 'application/json', JSON - register_alias 'application/json', :json - end -end diff --git a/.gems/gems/http-0.6.2/lib/http/options.rb b/.gems/gems/http-0.6.2/lib/http/options.rb deleted file mode 100644 index ca8f955..0000000 --- a/.gems/gems/http-0.6.2/lib/http/options.rb +++ /dev/null @@ -1,130 +0,0 @@ -require 'http/headers' -require 'openssl' -require 'socket' - -module HTTP - class Options - # How to format the response [:object, :body, :parse_body] - attr_accessor :response - - # HTTP headers to include in the request - attr_accessor :headers - - # Query string params to add to the url - attr_accessor :params - - # Form data to embed in the request - attr_accessor :form - - # JSON data to embed in the request - attr_accessor :json - - # Explicit request body of the request - attr_accessor :body - - # HTTP proxy to route request - attr_accessor :proxy - - # Socket classes - attr_accessor :socket_class, :ssl_socket_class - - # SSL context - attr_accessor :ssl_context - - # Follow redirects - attr_accessor :follow - - protected :response=, :headers=, :proxy=, :params=, :form=, :json=, :follow= - - @default_socket_class = TCPSocket - @default_ssl_socket_class = OpenSSL::SSL::SSLSocket - - class << self - attr_accessor :default_socket_class, :default_ssl_socket_class - - def new(options = {}) - return options if options.is_a?(self) - super - end - end - - def initialize(options = {}) - @response = options[:response] || :auto - @proxy = options[:proxy] || {} - @body = options[:body] - @params = options[:params] - @form = options[:form] - @json = options[:json] - @follow = options[:follow] - - @headers = HTTP::Headers.coerce(options[:headers] || {}) - - @socket_class = options[:socket_class] || self.class.default_socket_class - @ssl_socket_class = options[:ssl_socket_class] || self.class.default_ssl_socket_class - @ssl_context = options[:ssl_context] - end - - def with_headers(headers) - dup do |opts| - opts.headers = self.headers.merge(headers) - end - end - - %w[proxy params form json body follow].each do |method_name| - class_eval <<-RUBY, __FILE__, __LINE__ - def with_#{method_name}(value) - dup { |opts| opts.#{method_name} = value } - end - RUBY - end - - def [](option) - send(option) rescue nil - end - - def merge(other) - h1, h2 = to_hash, other.to_hash - merged = h1.merge(h2) do |k, v1, v2| - case k - when :headers - v1.merge(v2) - else - v2 - end - end - - self.class.new(merged) - end - - def to_hash - # FIXME: hardcoding these fields blows! We should have a declarative - # way of specifying all the options fields, and ensure they *all* - # get serialized here, rather than manually having to add them each time - { - :response => response, - :headers => headers.to_h, - :proxy => proxy, - :params => params, - :form => form, - :json => json, - :body => body, - :follow => follow, - :socket_class => socket_class, - :ssl_socket_class => ssl_socket_class, - :ssl_context => ssl_context - } - end - - def dup - dupped = super - yield(dupped) if block_given? - dupped - end - - private - - def argument_error!(message) - fail(Error, message, caller[1..-1]) - end - end -end diff --git a/.gems/gems/http-0.6.2/lib/http/redirector.rb b/.gems/gems/http-0.6.2/lib/http/redirector.rb deleted file mode 100644 index 7cb8f5e..0000000 --- a/.gems/gems/http-0.6.2/lib/http/redirector.rb +++ /dev/null @@ -1,66 +0,0 @@ -module HTTP - class Redirector - # Notifies that we reached max allowed redirect hops - class TooManyRedirectsError < ResponseError; end - - # Notifies that following redirects got into an endless loop - class EndlessRedirectError < TooManyRedirectsError; end - - # HTTP status codes which indicate redirects - REDIRECT_CODES = [300, 301, 302, 303, 307, 308].freeze - - # :nodoc: - def initialize(options = nil) - options = {:max_hops => 5} unless options.respond_to?(:fetch) - @max_hops = options.fetch(:max_hops, 5) - @max_hops = false if @max_hops && 1 > @max_hops.to_i - end - - # Follows redirects until non-redirect response found - def perform(request, response, &block) - reset(request, response) - follow(&block) - end - - private - - # Reset redirector state - def reset(request, response) - @request, @response = request, response - @visited = [] - end - - # Follow redirects - def follow - while REDIRECT_CODES.include?(@response.code) - @visited << @request.uri.to_s - - fail TooManyRedirectsError if too_many_hops? - fail EndlessRedirectError if endless_loop? - - uri = @response.headers['Location'] - fail StateError, 'no Location header in redirect' unless uri - - if 303 == @response.code - @request = @request.redirect uri, :get - else - @request = @request.redirect uri - end - - @response = yield @request - end - - @response - end - - # Check if we reached max amount of redirect hops - def too_many_hops? - @max_hops < @visited.count if @max_hops - end - - # Check if we got into an endless loop - def endless_loop? - 2 < @visited.count(@visited.last) - end - end -end diff --git a/.gems/gems/http-0.6.2/lib/http/request.rb b/.gems/gems/http-0.6.2/lib/http/request.rb deleted file mode 100644 index 5fca9e1..0000000 --- a/.gems/gems/http-0.6.2/lib/http/request.rb +++ /dev/null @@ -1,153 +0,0 @@ -require 'http/errors' -require 'http/headers' -require 'http/request/writer' -require 'http/version' -require 'base64' -require 'uri' - -module HTTP - class Request - include HTTP::Headers::Mixin - - # The method given was not understood - class UnsupportedMethodError < RequestError; end - - # The scheme of given URI was not understood - class UnsupportedSchemeError < RequestError; end - - # Default User-Agent header value - USER_AGENT = "RubyHTTPGem/#{HTTP::VERSION}".freeze - - # RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1 - METHODS = [:options, :get, :head, :post, :put, :delete, :trace, :connect] - - # RFC 2518: HTTP Extensions for Distributed Authoring -- WEBDAV - METHODS.concat [:propfind, :proppatch, :mkcol, :copy, :move, :lock, :unlock] - - # RFC 3648: WebDAV Ordered Collections Protocol - METHODS.concat [:orderpatch] - - # RFC 3744: WebDAV Access Control Protocol - METHODS.concat [:acl] - - # draft-dusseault-http-patch: PATCH Method for HTTP - METHODS.concat [:patch] - - # draft-reschke-webdav-search: WebDAV Search - METHODS.concat [:search] - - # Allowed schemes - SCHEMES = [:http, :https, :ws, :wss] - - # Default ports of supported schemes - PORTS = { - :http => 80, - :https => 443, - :ws => 80, - :wss => 443 - } - - # Method is given as a lowercase symbol e.g. :get, :post - attr_reader :verb - - # Scheme is normalized to be a lowercase symbol e.g. :http, :https - attr_reader :scheme - - # The following alias may be removed in three minor versions (0.8.0) or one - # major version (1.0.0) - alias_method :__method__, :method - - # The following method may be removed in two minor versions (0.7.0) or one - # major version (1.0.0) - def method(*) - warn "#{Kernel.caller.first}: [DEPRECATION] HTTP::Request#method is deprecated. Use #verb instead. For Object#method, use #__method__." - @verb - end - - # "Request URI" as per RFC 2616 - # http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html - attr_reader :uri - attr_reader :proxy, :body, :version - - # :nodoc: - def initialize(verb, uri, headers = {}, proxy = {}, body = nil, version = '1.1') # rubocop:disable ParameterLists - @verb = verb.to_s.downcase.to_sym - @uri = uri.is_a?(URI) ? uri : URI(uri.to_s) - @scheme = @uri.scheme.to_s.downcase.to_sym if @uri.scheme - - fail(UnsupportedMethodError, "unknown method: #{verb}") unless METHODS.include?(@verb) - fail(UnsupportedSchemeError, "unknown scheme: #{scheme}") unless SCHEMES.include?(@scheme) - - @proxy, @body, @version = proxy, body, version - - @headers = HTTP::Headers.coerce(headers || {}) - - @headers['Host'] ||= default_host - @headers['User-Agent'] ||= USER_AGENT - end - - # Returns new Request with updated uri - def redirect(uri, verb = @verb) - uri = @uri.merge uri.to_s - req = self.class.new(verb, uri, headers, proxy, body, version) - req['Host'] = req.uri.host - req - end - - # Stream the request to a socket - def stream(socket) - include_proxy_authorization_header if using_authenticated_proxy? - Request::Writer.new(socket, body, headers, request_header).stream - end - - # Is this request using a proxy? - def using_proxy? - proxy && proxy.keys.size >= 2 - end - - # Is this request using an authenticated proxy? - def using_authenticated_proxy? - proxy && proxy.keys.size == 4 - end - - # Compute and add the Proxy-Authorization header - def include_proxy_authorization_header - digest = Base64.encode64("#{proxy[:proxy_username]}:#{proxy[:proxy_password]}").chomp - headers['Proxy-Authorization'] = "Basic #{digest}" - end - - # Compute HTTP request header for direct or proxy request - def request_header - if using_proxy? - "#{verb.to_s.upcase} #{uri} HTTP/#{version}" - else - path = uri.query && !uri.query.empty? ? "#{uri.path}?#{uri.query}" : uri.path - path = '/' if path.empty? - "#{verb.to_s.upcase} #{path} HTTP/#{version}" - end - end - - # Host for tcp socket - def socket_host - using_proxy? ? proxy[:proxy_address] : uri.host - end - - # Port for tcp socket - def socket_port - using_proxy? ? proxy[:proxy_port] : uri.port - end - - private - - # Default host (with port if needed) header value. - # - # @return [String] - def default_host - if PORTS[@scheme] == @uri.port - @uri.host - else - "#{@uri.host}:#{@uri.port}" - end - end - end -end diff --git a/.gems/gems/http-0.6.2/lib/http/request/writer.rb b/.gems/gems/http-0.6.2/lib/http/request/writer.rb deleted file mode 100644 index f4044ce..0000000 --- a/.gems/gems/http-0.6.2/lib/http/request/writer.rb +++ /dev/null @@ -1,84 +0,0 @@ -module HTTP - class Request - class Writer - # CRLF is the universal HTTP delimiter - CRLF = "\r\n" - - # Types valid to be used as body source - VALID_BODY_TYPES = [String, NilClass, Enumerable] - - def initialize(socket, body, headers, headerstart) # rubocop:disable ParameterLists - @body = body - @socket = socket - @headers = headers - @request_header = [headerstart] - - validate_body_type! - end - - # Adds headers to the request header from the headers array - def add_headers - @headers.each do |field, value| - @request_header << "#{field}: #{value}" - end - end - - # Stream the request to a socket - def stream - send_request_header - send_request_body - end - - # Adds the headers to the header array for the given request body we are working - # with - def add_body_type_headers - if @body.is_a?(String) && !@headers['Content-Length'] - @request_header << "Content-Length: #{@body.bytesize}" - elsif @body.is_a?(Enumerable) - encoding = @headers['Transfer-Encoding'] - if encoding == 'chunked' - @request_header << 'Transfer-Encoding: chunked' - else - fail(RequestError, 'invalid transfer encoding') - end - end - end - - # Joins the headers specified in the request into a correctly formatted - # http request header string - def join_headers - # join the headers array with crlfs, stick two on the end because - # that ends the request header - @request_header.join(CRLF) + (CRLF) * 2 - end - - def send_request_header - add_headers - add_body_type_headers - header = join_headers - - @socket << header - end - - def send_request_body - if @body.is_a?(String) - @socket << @body - elsif @body.is_a?(Enumerable) - @body.each do |chunk| - @socket << chunk.bytesize.to_s(16) << CRLF - @socket << chunk << CRLF - end - - @socket << '0' << CRLF * 2 - end - end - - private - - def validate_body_type! - return if VALID_BODY_TYPES.any? { |type| @body.is_a? type } - fail RequestError, "body of wrong type: #{@body.class}" - end - end - end -end diff --git a/.gems/gems/http-0.6.2/lib/http/response.rb b/.gems/gems/http-0.6.2/lib/http/response.rb deleted file mode 100644 index 41ee941..0000000 --- a/.gems/gems/http-0.6.2/lib/http/response.rb +++ /dev/null @@ -1,137 +0,0 @@ -require 'delegate' -require 'http/headers' -require 'http/content_type' -require 'http/mime_type' - -module HTTP - class Response - include HTTP::Headers::Mixin - - STATUS_CODES = { - 100 => 'Continue', - 101 => 'Switching Protocols', - 102 => 'Processing', - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - 207 => 'Multi-Status', - 226 => 'IM Used', - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 306 => 'Reserved', - 307 => 'Temporary Redirect', - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Timeout', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Request Entity Too Large', - 414 => 'Request-URI Too Long', - 415 => 'Unsupported Media Type', - 416 => 'Requested Range Not Satisfiable', - 417 => 'Expectation Failed', - 418 => "I'm a Teapot", - 422 => 'Unprocessable Entity', - 423 => 'Locked', - 424 => 'Failed Dependency', - 426 => 'Upgrade Required', - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Timeout', - 505 => 'HTTP Version Not Supported', - 506 => 'Variant Also Negotiates', - 507 => 'Insufficient Storage', - 510 => 'Not Extended' - } - STATUS_CODES.freeze - - SYMBOL_TO_STATUS_CODE = Hash[STATUS_CODES.map { |code, msg| [msg.downcase.gsub(/\s|-/, '_').to_sym, code] }] - SYMBOL_TO_STATUS_CODE.freeze - - attr_reader :status - attr_reader :body - attr_reader :uri - - # Status aliases! TIMTOWTDI!!! (Want to be idiomatic? Just use status :) - alias_method :code, :status - alias_method :status_code, :status - - def initialize(status, version, headers, body, uri = nil) # rubocop:disable ParameterLists - @status, @version, @body, @uri = status, version, body, uri - @headers = HTTP::Headers.coerce(headers || {}) - end - - # Obtain the 'Reason-Phrase' for the response - def reason - STATUS_CODES[@status] - end - - # Returns an Array ala Rack: `[status, headers, body]` - def to_a - [status, headers.to_h, body.to_s] - end - - # Return the response body as a string - def to_s - body.to_s - end - alias_method :to_str, :to_s - - # Flushes body and returns self-reference - def flush - body.to_s - self - end - - # Parsed Content-Type header - # @return [HTTP::ContentType] - def content_type - @content_type ||= ContentType.parse headers['Content-Type'] - end - - # MIME type of response (if any) - # @return [String, nil] - def mime_type - @mime_type ||= content_type.mime_type - end - - # Charset of response (if any) - # @return [String, nil] - def charset - @charset ||= content_type.charset - end - - # Parse response body with corresponding MIME type adapter. - # - # @param [#to_s] as Parse as given MIME type - # instead of the one determined from headers - # @raise [Error] if adapter not found - # @return [Object] - def parse(as = nil) - MimeType[as || mime_type].decode to_s - end - - # Inspect a response - def inspect - "#<#{self.class}/#{@version} #{status} #{reason} headers=#{headers.inspect}>" - end - end -end diff --git a/.gems/gems/http-0.6.2/lib/http/response/body.rb b/.gems/gems/http-0.6.2/lib/http/response/body.rb deleted file mode 100644 index 7bb30c9..0000000 --- a/.gems/gems/http-0.6.2/lib/http/response/body.rb +++ /dev/null @@ -1,64 +0,0 @@ -require 'forwardable' -require 'http/client' - -module HTTP - class Response - # A streamable response body, also easily converted into a string - class Body - extend Forwardable - include Enumerable - def_delegator :to_s, :empty? - - def initialize(client) - @client = client - @streaming = nil - @contents = nil - end - - # Read up to length bytes, but return any data that's available - # @see HTTP::Client#readpartial - def readpartial(*args) - stream! - @client.readpartial(*args) - end - - # Iterate over the body, allowing it to be enumerable - def each - while (chunk = readpartial) - yield chunk - end - end - - # Eagerly consume the entire body as a string - def to_s - return @contents if @contents - fail StateError, 'body is being streamed' unless @streaming.nil? - - begin - @streaming = false - @contents = '' - while (chunk = @client.readpartial) - @contents << chunk - end - rescue - @contents = nil - raise - end - - @contents - end - alias_method :to_str, :to_s - - # Assert that the body is actively being streamed - def stream! - fail StateError, 'body has already been consumed' if @streaming == false - @streaming = true - end - - # Easier to interpret string inspect - def inspect - "#<#{self.class}:#{object_id.to_s(16)} @streaming=#{!!@streaming}>" - end - end - end -end diff --git a/.gems/gems/http-0.6.2/lib/http/response/parser.rb b/.gems/gems/http-0.6.2/lib/http/response/parser.rb deleted file mode 100644 index 67c3ec1..0000000 --- a/.gems/gems/http-0.6.2/lib/http/response/parser.rb +++ /dev/null @@ -1,66 +0,0 @@ -module HTTP - class Response - class Parser - attr_reader :headers - - def initialize - @parser = HTTP::Parser.new(self) - reset - end - - def add(data) - @parser << data - end - alias_method :<<, :add - - def headers? - !!@headers - end - - def http_version - @parser.http_version.join('.') - end - - def status_code - @parser.status_code - end - - # - # HTTP::Parser callbacks - # - - def on_headers_complete(headers) - @headers = headers - end - - def on_body(chunk) - if @chunk - @chunk << chunk - else - @chunk = chunk - end - end - - def chunk - chunk, @chunk = @chunk, nil - chunk - end - - def on_message_complete - @finished = true - end - - def reset - @parser.reset! - - @finished = false - @headers = nil - @chunk = nil - end - - def finished? - @finished - end - end - end -end diff --git a/.gems/gems/http-0.6.2/lib/http/version.rb b/.gems/gems/http-0.6.2/lib/http/version.rb deleted file mode 100644 index 883c90a..0000000 --- a/.gems/gems/http-0.6.2/lib/http/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module HTTP - VERSION = '0.6.2' -end diff --git a/.gems/gems/http-0.6.2/logo.png b/.gems/gems/http-0.6.2/logo.png deleted file mode 100644 index 8316879..0000000 Binary files a/.gems/gems/http-0.6.2/logo.png and /dev/null differ diff --git a/.gems/gems/http-0.6.2/spec/http/authorization_header/basic_auth_spec.rb b/.gems/gems/http-0.6.2/spec/http/authorization_header/basic_auth_spec.rb deleted file mode 100644 index 6ddbd5b..0000000 --- a/.gems/gems/http-0.6.2/spec/http/authorization_header/basic_auth_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -require 'spec_helper' - -describe HTTP::AuthorizationHeader::BasicAuth do - describe '.new' do - it 'fails when options is not a Hash' do - expect { described_class.new '[FOOBAR]' }.to raise_error - end - - it 'fails when :pass is not given' do - expect { described_class.new :user => '[USER]' }.to raise_error - end - - it 'fails when :user is not given' do - expect { described_class.new :pass => '[PASS]' }.to raise_error - end - end - - describe '#to_s' do - let(:user) { 'foo' } - let(:pass) { 'bar' * 100 } - let(:user_n_pass) { user + ':' + pass } - let(:builder) { described_class.new :user => user, :pass => pass } - - subject { builder.to_s } - - it { should eq "Basic #{Base64.strict_encode64 user_n_pass}" } - it { should match(/^Basic [^\s]+$/) } - end -end diff --git a/.gems/gems/http-0.6.2/spec/http/authorization_header/bearer_token_spec.rb b/.gems/gems/http-0.6.2/spec/http/authorization_header/bearer_token_spec.rb deleted file mode 100644 index 02bf75f..0000000 --- a/.gems/gems/http-0.6.2/spec/http/authorization_header/bearer_token_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'spec_helper' - -describe HTTP::AuthorizationHeader::BearerToken do - describe '.new' do - it 'fails when options is not a Hash' do - expect { described_class.new '[TOKEN]' }.to raise_error - end - - it 'fails when :token is not given' do - expect { described_class.new :encode => true }.to raise_error - end - end - - describe '#to_s' do - let(:token) { 'foobar' * 100 } - let(:builder) { described_class.new options.merge :token => token } - - subject { builder.to_s } - - context 'when :encode => true' do - let(:options) { {:encode => true} } - it { should eq "Bearer #{Base64.strict_encode64 token}" } - it { should match(/^Bearer [^\s]+$/) } - end - - context 'when :encode => false' do - let(:options) { {:encode => false} } - it { should eq "Bearer #{token}" } - end - - context 'when :encode not specified' do - let(:options) { {} } - it { should eq "Bearer #{token}" } - end - end -end diff --git a/.gems/gems/http-0.6.2/spec/http/authorization_header_spec.rb b/.gems/gems/http-0.6.2/spec/http/authorization_header_spec.rb deleted file mode 100644 index b91bf44..0000000 --- a/.gems/gems/http-0.6.2/spec/http/authorization_header_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -require 'spec_helper' - -describe HTTP::AuthorizationHeader do - describe '.build' do - context 'with unkown type' do - let(:type) { :foobar } - let(:opts) { {:foo => :bar} } - - it 'fails' do - expect { described_class.build type, opts }.to raise_error - end - end - - context 'with :basic type' do - let(:type) { :basic } - let(:opts) { {:user => 'user', :pass => 'pass'} } - - it 'passes options to BasicAuth' do - expect(described_class::BasicAuth).to receive(:new).with(opts) - described_class.build type, opts - end - end - - context 'with :bearer type' do - let(:type) { :bearer } - let(:opts) { {:token => 'token', :encode => true} } - - it 'passes options to BearerToken' do - expect(described_class::BearerToken).to receive(:new).with(opts) - described_class.build type, opts - end - end - end - - describe '.register' do - it 'registers given klass in builders registry' do - described_class.register :dummy, Class.new { def initialize(*); end } - expect { described_class.build(:dummy, 'foobar') }.to_not raise_error - end - end -end diff --git a/.gems/gems/http-0.6.2/spec/http/backports/base64_spec.rb b/.gems/gems/http-0.6.2/spec/http/backports/base64_spec.rb deleted file mode 100644 index 77d4968..0000000 --- a/.gems/gems/http-0.6.2/spec/http/backports/base64_spec.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'spec_helper' - -describe Base64 do - specify { expect(Base64).to respond_to :strict_encode64 } - - describe '.strict_encode64' do - let(:long_string) { (0...256).map { ('a'..'z').to_a[rand(26)] }.join } - - it 'returns a String without whitespaces' do - expect(Base64.strict_encode64 long_string).to_not match(/\s/) - end - end -end diff --git a/.gems/gems/http-0.6.2/spec/http/backports/uri_spec.rb b/.gems/gems/http-0.6.2/spec/http/backports/uri_spec.rb deleted file mode 100644 index a295cf2..0000000 --- a/.gems/gems/http-0.6.2/spec/http/backports/uri_spec.rb +++ /dev/null @@ -1,9 +0,0 @@ -require 'spec_helper' - -describe URI do - describe '.encode_www_form' do - it 'properly encodes arrays' do - expect(URI.encode_www_form :a => [:b, :c]).to eq 'a=b&a=c' - end - end -end diff --git a/.gems/gems/http-0.6.2/spec/http/client_spec.rb b/.gems/gems/http-0.6.2/spec/http/client_spec.rb deleted file mode 100644 index 814e833..0000000 --- a/.gems/gems/http-0.6.2/spec/http/client_spec.rb +++ /dev/null @@ -1,202 +0,0 @@ -require 'spec_helper' - -describe HTTP::Client do - StubbedClient = Class.new(HTTP::Client) do - def perform(request, options) - stubs.fetch(request.uri.to_s) { super(request, options) } - end - - def stubs - @stubs ||= {} - end - - def stub(stubs) - @stubs = stubs - self - end - end - - def redirect_response(location, status = 302) - HTTP::Response.new(status, '1.1', {'Location' => location}, '') - end - - def simple_response(body, status = 200) - HTTP::Response.new(status, '1.1', {}, body) - end - - describe 'following redirects' do - it 'returns response of new location' do - client = StubbedClient.new(:follow => true).stub( - 'http://example.com/' => redirect_response('http://example.com/blog'), - 'http://example.com/blog' => simple_response('OK') - ) - - expect(client.get('http://example.com/').to_s).to eq 'OK' - end - - it 'prepends previous request uri scheme and host if needed' do - client = StubbedClient.new(:follow => true).stub( - 'http://example.com/' => redirect_response('/index'), - 'http://example.com/index' => redirect_response('/index.html'), - 'http://example.com/index.html' => simple_response('OK') - ) - - expect(client.get('http://example.com/').to_s).to eq 'OK' - end - - it 'fails upon endless redirects' do - client = StubbedClient.new(:follow => true).stub( - 'http://example.com/' => redirect_response('/') - ) - - expect { client.get('http://example.com/') } \ - .to raise_error(HTTP::Redirector::EndlessRedirectError) - end - - it 'fails if max amount of hops reached' do - client = StubbedClient.new(:follow => 5).stub( - 'http://example.com/' => redirect_response('/1'), - 'http://example.com/1' => redirect_response('/2'), - 'http://example.com/2' => redirect_response('/3'), - 'http://example.com/3' => redirect_response('/4'), - 'http://example.com/4' => redirect_response('/5'), - 'http://example.com/5' => redirect_response('/6'), - 'http://example.com/6' => simple_response('OK') - ) - - expect { client.get('http://example.com/') } \ - .to raise_error(HTTP::Redirector::TooManyRedirectsError) - end - end - - describe 'parsing params' do - let(:client) { HTTP::Client.new } - before { allow(client).to receive :perform } - - it 'accepts params within the provided URL' do - expect(HTTP::Request).to receive(:new) do |_, uri| - expect(CGI.parse uri.query).to eq('foo' => %w[bar]) - end - - client.get('http://example.com/?foo=bar') - end - - it 'combines GET params from the URI with the passed in params' do - expect(HTTP::Request).to receive(:new) do |_, uri| - expect(CGI.parse uri.query).to eq('foo' => %w[bar], 'baz' => %w[quux]) - end - - client.get('http://example.com/?foo=bar', :params => {:baz => 'quux'}) - end - - it 'merges duplicate values' do - expect(HTTP::Request).to receive(:new) do |_, uri| - expect(uri.query).to match(/^(a=1&a=2|a=2&a=1)$/) - end - - client.get('http://example.com/?a=1', :params => {:a => 2}) - end - - it 'does not modifies query part if no params were given' do - expect(HTTP::Request).to receive(:new) do |_, uri| - expect(uri.query).to eq 'deadbeef' - end - - client.get('http://example.com/?deadbeef') - end - - it 'does not corrupts index-less arrays' do - expect(HTTP::Request).to receive(:new) do |_, uri| - expect(CGI.parse uri.query).to eq 'a[]' => %w[b c], 'd' => %w[e] - end - - client.get('http://example.com/?a[]=b&a[]=c', :params => {:d => 'e'}) - end - end - - describe 'passing json' do - it 'encodes given object' do - client = HTTP::Client.new - allow(client).to receive(:perform) - - expect(HTTP::Request).to receive(:new) do |*args| - expect(args.last).to eq('{"foo":"bar"}') - end - - client.get('http://example.com/', :json => {:foo => :bar}) - end - end - - describe '#request' do - context 'with explicitly given `Host` header' do - let(:headers) { {'Host' => 'another.example.com'} } - let(:client) { described_class.new :headers => headers } - - it 'keeps `Host` header as is' do - expect(client).to receive(:perform) do |req, _| - expect(req['Host']).to eq 'another.example.com' - end - - client.request(:get, 'http://example.com/') - end - end - end - - describe '#perform' do - let(:client) { described_class.new } - - it 'calls finish_response before actual performance' do - TCPSocket.stub(:open) { throw :halt } - expect(client).to receive(:finish_response) - catch(:halt) { client.head "http://127.0.0.1:#{ExampleService::PORT}/" } - end - - it 'calls finish_response once body was fully flushed' do - expect(client).to receive(:finish_response).twice.and_call_original - client.get("http://127.0.0.1:#{ExampleService::PORT}/").to_s - end - - context 'with HEAD request' do - it 'does not iterates through body' do - expect(client).to_not receive(:readpartial) - client.head("http://127.0.0.1:#{ExampleService::PORT}/") - end - - it 'finishes response after headers were received' do - expect(client).to receive(:finish_response).twice.and_call_original - client.head("http://127.0.0.1:#{ExampleService::PORT}/") - end - end - - context 'when server fully flushes response in one chunk' do - before do - socket_spy = double - - chunks = [ - <<-RESPONSE.gsub(/^\s*\| */, '').gsub(/\n/, "\r\n") - | HTTP/1.1 200 OK - | Content-Type: text/html - | Server: WEBrick/1.3.1 (Ruby/1.9.3/2013-11-22) - | Date: Mon, 24 Mar 2014 00:32:22 GMT - | Content-Length: 15 - | Connection: Keep-Alive - | - | - RESPONSE - ] - - socket_spy.stub(:close) { nil } - socket_spy.stub(:closed?) { true } - socket_spy.stub(:readpartial) { chunks.shift } - socket_spy.stub(:<<) { nil } - - TCPSocket.stub(:open) { socket_spy } - end - - it 'properly reads body' do - body = client.get("http://127.0.0.1:#{ExampleService::PORT}/").to_s - expect(body).to eq '' - end - end - end -end diff --git a/.gems/gems/http-0.6.2/spec/http/content_type_spec.rb b/.gems/gems/http-0.6.2/spec/http/content_type_spec.rb deleted file mode 100644 index b27379f..0000000 --- a/.gems/gems/http-0.6.2/spec/http/content_type_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -require 'spec_helper' - -describe HTTP::ContentType do - describe '.parse' do - context 'with text/plain' do - subject { described_class.parse 'text/plain' } - its(:mime_type) { should eq 'text/plain' } - its(:charset) { should be_nil } - end - - context 'with tEXT/plaIN' do - subject { described_class.parse 'tEXT/plaIN' } - its(:mime_type) { should eq 'text/plain' } - its(:charset) { should be_nil } - end - - context 'with text/plain; charset=utf-8' do - subject { described_class.parse 'text/plain; charset=utf-8' } - its(:mime_type) { should eq 'text/plain' } - its(:charset) { should eq 'utf-8' } - end - - context 'with text/plain; charset="utf-8"' do - subject { described_class.parse 'text/plain; charset="utf-8"' } - its(:mime_type) { should eq 'text/plain' } - its(:charset) { should eq 'utf-8' } - end - - context 'with text/plain; charSET=utf-8' do - subject { described_class.parse 'text/plain; charSET=utf-8' } - its(:mime_type) { should eq 'text/plain' } - its(:charset) { should eq 'utf-8' } - end - - context 'with text/plain; foo=bar; charset=utf-8' do - subject { described_class.parse 'text/plain; foo=bar; charset=utf-8' } - its(:mime_type) { should eq 'text/plain' } - its(:charset) { should eq 'utf-8' } - end - - context 'with text/plain;charset=utf-8;foo=bar' do - subject { described_class.parse 'text/plain;charset=utf-8;foo=bar' } - its(:mime_type) { should eq 'text/plain' } - its(:charset) { should eq 'utf-8' } - end - end -end diff --git a/.gems/gems/http-0.6.2/spec/http/headers/mixin_spec.rb b/.gems/gems/http-0.6.2/spec/http/headers/mixin_spec.rb deleted file mode 100644 index bd72c6d..0000000 --- a/.gems/gems/http-0.6.2/spec/http/headers/mixin_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'spec_helper' - -describe HTTP::Headers::Mixin do - let :dummy_class do - Class.new do - include HTTP::Headers::Mixin - - def initialize(headers) - @headers = headers - end - end - end - - let(:headers) { HTTP::Headers.new } - let(:dummy) { dummy_class.new headers } - - describe '#headers' do - it 'returns @headers instance variable' do - expect(dummy.headers).to be headers - end - end - - describe '#[]' do - it 'proxies to headers#[]' do - expect(headers).to receive(:[]).with(:accept) - dummy[:accept] - end - end - - describe '#[]=' do - it 'proxies to headers#[]' do - expect(headers).to receive(:[]=).with(:accept, 'text/plain') - dummy[:accept] = 'text/plain' - end - end -end diff --git a/.gems/gems/http-0.6.2/spec/http/headers_spec.rb b/.gems/gems/http-0.6.2/spec/http/headers_spec.rb deleted file mode 100644 index c362376..0000000 --- a/.gems/gems/http-0.6.2/spec/http/headers_spec.rb +++ /dev/null @@ -1,417 +0,0 @@ -require 'spec_helper' - -describe HTTP::Headers do - subject(:headers) { described_class.new } - - it 'is Enumerable' do - expect(headers).to be_an Enumerable - end - - describe '#set' do - it 'sets header value' do - headers.set 'Accept', 'application/json' - expect(headers['Accept']).to eq 'application/json' - end - - it 'normalizes header name' do - headers.set :content_type, 'application/json' - expect(headers['Content-Type']).to eq 'application/json' - end - - it 'overwrites previous value' do - headers.set :set_cookie, 'hoo=ray' - headers.set :set_cookie, 'woo=hoo' - expect(headers['Set-Cookie']).to eq 'woo=hoo' - end - - it 'allows set multiple values' do - headers.set :set_cookie, 'hoo=ray' - headers.set :set_cookie, %w[hoo=ray woo=hoo] - expect(headers['Set-Cookie']).to eq %w[hoo=ray woo=hoo] - end - end - - describe '#[]=' do - it 'sets header value' do - headers['Accept'] = 'application/json' - expect(headers['Accept']).to eq 'application/json' - end - - it 'normalizes header name' do - headers[:content_type] = 'application/json' - expect(headers['Content-Type']).to eq 'application/json' - end - - it 'overwrites previous value' do - headers[:set_cookie] = 'hoo=ray' - headers[:set_cookie] = 'woo=hoo' - expect(headers['Set-Cookie']).to eq 'woo=hoo' - end - - it 'allows set multiple values' do - headers[:set_cookie] = 'hoo=ray' - headers[:set_cookie] = %w[hoo=ray woo=hoo] - expect(headers['Set-Cookie']).to eq %w[hoo=ray woo=hoo] - end - end - - describe '#delete' do - before { headers.set 'Content-Type', 'application/json' } - - it 'removes given header' do - headers.delete 'Content-Type' - expect(headers['Content-Type']).to be_nil - end - - it 'normalizes header name' do - headers.delete :content_type - expect(headers['Content-Type']).to be_nil - end - end - - describe '#add' do - it 'sets header value' do - headers.add 'Accept', 'application/json' - expect(headers['Accept']).to eq 'application/json' - end - - it 'normalizes header name' do - headers.add :content_type, 'application/json' - expect(headers['Content-Type']).to eq 'application/json' - end - - it 'appends new value if header exists' do - headers.add :set_cookie, 'hoo=ray' - headers.add :set_cookie, 'woo=hoo' - expect(headers['Set-Cookie']).to eq %w[hoo=ray woo=hoo] - end - - it 'allows append multiple values' do - headers.add :set_cookie, 'hoo=ray' - headers.add :set_cookie, %w[woo=hoo yup=pie] - expect(headers['Set-Cookie']).to eq %w[hoo=ray woo=hoo yup=pie] - end - end - - describe '#get' do - before { headers.set 'Content-Type', 'application/json' } - - it 'returns array of associated values' do - expect(headers.get 'Content-Type').to eq %w[application/json] - end - - it 'normalizes header name' do - expect(headers.get :content_type).to eq %w[application/json] - end - - context 'when header does not exists' do - it 'returns empty array' do - expect(headers.get :accept).to eq [] - end - end - end - - describe '#[]' do - context 'when header does not exists' do - it 'returns nil' do - expect(headers[:accept]).to be_nil - end - end - - context 'when header has a single value' do - before { headers.set 'Content-Type', 'application/json' } - - it 'normalizes header name' do - expect(headers[:content_type]).to_not be_nil - end - - it 'returns it returns a single value' do - expect(headers[:content_type]).to eq 'application/json' - end - end - - context 'when header has a multiple values' do - before do - headers.add :set_cookie, 'hoo=ray' - headers.add :set_cookie, 'woo=hoo' - end - - it 'normalizes header name' do - expect(headers[:set_cookie]).to_not be_nil - end - - it 'returns array of associated values' do - expect(headers[:set_cookie]).to eq %w[hoo=ray woo=hoo] - end - end - end - - describe '#to_h' do - before do - headers.add :content_type, 'application/json' - headers.add :set_cookie, 'hoo=ray' - headers.add :set_cookie, 'woo=hoo' - end - - it 'returns a Hash' do - expect(headers.to_h).to be_a Hash - end - - it 'returns Hash with normalized keys' do - expect(headers.to_h.keys).to match_array %w[Content-Type Set-Cookie] - end - - context 'for a header with single value' do - it 'provides a value as is' do - expect(headers.to_h['Content-Type']).to eq 'application/json' - end - end - - context 'for a header with multiple values' do - it 'provides an array of values' do - expect(headers.to_h['Set-Cookie']).to eq %w[hoo=ray woo=hoo] - end - end - end - - describe '#to_a' do - before do - headers.add :content_type, 'application/json' - headers.add :set_cookie, 'hoo=ray' - headers.add :set_cookie, 'woo=hoo' - end - - it 'returns an Array' do - expect(headers.to_a).to be_a Array - end - - it 'returns Array of key/value pairs with normalized keys' do - expect(headers.to_a).to eq [ - %w[Content-Type application/json], - %w[Set-Cookie hoo=ray], - %w[Set-Cookie woo=hoo] - ] - end - end - - describe '#inspect' do - before { headers.set :set_cookie, %w[hoo=ray woo=hoo] } - subject { headers.inspect } - - it { should eq '#["hoo=ray", "woo=hoo"]}>' } - end - - describe '#keys' do - before do - headers.add :content_type, 'application/json' - headers.add :set_cookie, 'hoo=ray' - headers.add :set_cookie, 'woo=hoo' - end - - it 'returns uniq keys only' do - expect(headers.keys).to have_exactly(2).items - end - - it 'normalizes keys' do - expect(headers.keys).to include('Content-Type', 'Set-Cookie') - end - end - - describe '#each' do - before do - headers.add :set_cookie, 'hoo=ray' - headers.add :content_type, 'application/json' - headers.add :set_cookie, 'woo=hoo' - end - - it 'yields each key/value pair separatedly' do - expect { |b| headers.each(&b) }.to yield_control.exactly(3).times - end - - it 'yields headers in the same order they were added' do - expect { |b| headers.each(&b) }.to yield_successive_args( - %w[Set-Cookie hoo=ray], - %w[Content-Type application/json], - %w[Set-Cookie woo=hoo] - ) - end - end - - describe '.empty?' do - subject { headers.empty? } - - context 'initially' do - it { should be_true } - end - - context 'when header exists' do - before { headers.add :accept, 'text/plain' } - it { should be_false } - end - - context 'when last header was removed' do - before do - headers.add :accept, 'text/plain' - headers.delete :accept - end - - it { should be_true } - end - end - - describe '#hash' do - let(:left) { described_class.new } - let(:right) { described_class.new } - - it 'equals if two headers equals' do - left.add :accept, 'text/plain' - right.add :accept, 'text/plain' - - expect(left.hash).to eq right.hash - end - end - - describe '#==' do - let(:left) { described_class.new } - let(:right) { described_class.new } - - it 'compares header keys and values' do - left.add :accept, 'text/plain' - right.add :accept, 'text/plain' - - expect(left).to eq right - end - - it 'allows comparison with Array of key/value pairs' do - left.add :accept, 'text/plain' - expect(left).to eq [%w[Accept text/plain]] - end - - it 'sensitive to headers order' do - left.add :accept, 'text/plain' - left.add :cookie, 'woo=hoo' - right.add :cookie, 'woo=hoo' - right.add :accept, 'text/plain' - - expect(left).to_not eq right - end - - it 'sensitive to header values order' do - left.add :cookie, 'hoo=ray' - left.add :cookie, 'woo=hoo' - right.add :cookie, 'woo=hoo' - right.add :cookie, 'hoo=ray' - - expect(left).to_not eq right - end - end - - describe '#dup' do - before { headers.set :content_type, 'application/json' } - - subject(:dupped) { headers.dup } - - it { should be_a described_class } - it { should_not be headers } - - it 'has headers copied' do - expect(dupped[:content_type]).to eq 'application/json' - end - - context 'modifying a copy' do - before { dupped.set :content_type, 'text/plain' } - - it 'modifies dupped copy' do - expect(dupped[:content_type]).to eq 'text/plain' - end - - it 'does not affects original headers' do - expect(headers[:content_type]).to eq 'application/json' - end - end - end - - describe '#merge!' do - before do - headers.set :host, 'example.com' - headers.set :accept, 'application/json' - headers.merge! :accept => 'plain/text', :cookie => %w[hoo=ray woo=hoo] - end - - it 'leaves headers not presented in other as is' do - expect(headers[:host]).to eq 'example.com' - end - - it 'overwrites existing values' do - expect(headers[:accept]).to eq 'plain/text' - end - - it 'appends other headers, not presented in base' do - expect(headers[:cookie]).to eq %w[hoo=ray woo=hoo] - end - end - - describe '#merge' do - before do - headers.set :host, 'example.com' - headers.set :accept, 'application/json' - end - - subject(:merged) do - headers.merge :accept => 'plain/text', :cookie => %w[hoo=ray woo=hoo] - end - - it { should be_a described_class } - it { should_not be headers } - - it 'does not affects original headers' do - expect(merged.to_h).to_not eq headers.to_h - end - - it 'leaves headers not presented in other as is' do - expect(merged[:host]).to eq 'example.com' - end - - it 'overwrites existing values' do - expect(merged[:accept]).to eq 'plain/text' - end - - it 'appends other headers, not presented in base' do - expect(merged[:cookie]).to eq %w[hoo=ray woo=hoo] - end - end - - describe '.coerce' do - let(:dummyClass) { Class.new { def respond_to?(*); end } } - - it 'accepts any object that respond to #to_hash' do - hashie = double :to_hash => {'accept' => 'json'} - expect(described_class.coerce(hashie)['accept']).to eq 'json' - end - - it 'accepts any object that respond to #to_h' do - hashie = double :to_h => {'accept' => 'json'} - expect(described_class.coerce(hashie)['accept']).to eq 'json' - end - - it 'accepts any object that respond to #to_a' do - hashie = double :to_a => [%w[accept json]] - expect(described_class.coerce(hashie)['accept']).to eq 'json' - end - - it 'fails if given object cannot be coerced' do - expect { described_class.coerce dummyClass.new }.to raise_error HTTP::Error - end - - context 'with duplicate header keys (mixed case)' do - let(:headers) { {'Set-Cookie' => 'hoo=ray', 'set-cookie' => 'woo=hoo'} } - - it 'adds all headers' do - expect(described_class.coerce(headers).to_a).to match_array([ - %w[Set-Cookie hoo=ray], - %w[Set-Cookie woo=hoo] - ]) - end - end - end -end diff --git a/.gems/gems/http-0.6.2/spec/http/options/body_spec.rb b/.gems/gems/http-0.6.2/spec/http/options/body_spec.rb deleted file mode 100644 index f25c8bb..0000000 --- a/.gems/gems/http-0.6.2/spec/http/options/body_spec.rb +++ /dev/null @@ -1,17 +0,0 @@ -require 'spec_helper' - -describe HTTP::Options, 'body' do - - let(:opts) { HTTP::Options.new } - - it 'defaults to nil' do - expect(opts.body).to be nil - end - - it 'may be specified with with_body' do - opts2 = opts.with_body('foo') - expect(opts.body).to be nil - expect(opts2.body).to eq('foo') - end - -end diff --git a/.gems/gems/http-0.6.2/spec/http/options/form_spec.rb b/.gems/gems/http-0.6.2/spec/http/options/form_spec.rb deleted file mode 100644 index 61d1de5..0000000 --- a/.gems/gems/http-0.6.2/spec/http/options/form_spec.rb +++ /dev/null @@ -1,17 +0,0 @@ -require 'spec_helper' - -describe HTTP::Options, 'form' do - - let(:opts) { HTTP::Options.new } - - it 'defaults to nil' do - expect(opts.form).to be nil - end - - it 'may be specified with with_form_data' do - opts2 = opts.with_form(:foo => 42) - expect(opts.form).to be nil - expect(opts2.form).to eq(:foo => 42) - end - -end diff --git a/.gems/gems/http-0.6.2/spec/http/options/headers_spec.rb b/.gems/gems/http-0.6.2/spec/http/options/headers_spec.rb deleted file mode 100644 index 5996445..0000000 --- a/.gems/gems/http-0.6.2/spec/http/options/headers_spec.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'spec_helper' - -describe HTTP::Options, 'headers' do - - let(:opts) { HTTP::Options.new } - - it 'defaults to be empty' do - expect(opts.headers).to be_empty - end - - it 'may be specified with with_headers' do - opts2 = opts.with_headers('accept' => 'json') - expect(opts.headers).to be_empty - expect(opts2.headers).to eq([%w[Accept json]]) - end - - it 'accepts any object that respond to :to_hash' do - x = Struct.new(:to_hash).new('accept' => 'json') - expect(opts.with_headers(x).headers['accept']).to eq('json') - end - -end diff --git a/.gems/gems/http-0.6.2/spec/http/options/json_spec.rb b/.gems/gems/http-0.6.2/spec/http/options/json_spec.rb deleted file mode 100644 index 54f4776..0000000 --- a/.gems/gems/http-0.6.2/spec/http/options/json_spec.rb +++ /dev/null @@ -1,17 +0,0 @@ -require 'spec_helper' - -describe HTTP::Options, 'json' do - - let(:opts) { HTTP::Options.new } - - it 'defaults to nil' do - expect(opts.json).to be nil - end - - it 'may be specified with with_json data' do - opts2 = opts.with_json(:foo => 42) - expect(opts.json).to be nil - expect(opts2.json).to eq(:foo => 42) - end - -end diff --git a/.gems/gems/http-0.6.2/spec/http/options/merge_spec.rb b/.gems/gems/http-0.6.2/spec/http/options/merge_spec.rb deleted file mode 100644 index a721f4f..0000000 --- a/.gems/gems/http-0.6.2/spec/http/options/merge_spec.rb +++ /dev/null @@ -1,51 +0,0 @@ -require 'spec_helper' - -describe HTTP::Options, 'merge' do - let(:opts) { HTTP::Options.new } - - it 'supports a Hash' do - old_response = opts.response - expect(opts.merge(:response => :body).response).to eq(:body) - expect(opts.response).to eq(old_response) - end - - it 'supports another Options' do - merged = opts.merge(HTTP::Options.new(:response => :body)) - expect(merged.response).to eq(:body) - end - - it 'merges as excepted in complex cases' do - # FIXME: yuck :( - - foo = HTTP::Options.new( - :response => :body, - :params => {:baz => 'bar'}, - :form => {:foo => 'foo'}, - :body => 'body-foo', - :json => {:foo => 'foo'}, - :headers => {:accept => 'json', :foo => 'foo'}, - :proxy => {}) - - bar = HTTP::Options.new( - :response => :parsed_body, - :params => {:plop => 'plip'}, - :form => {:bar => 'bar'}, - :body => 'body-bar', - :json => {:bar => 'bar'}, - :headers => {:accept => 'xml', :bar => 'bar'}, - :proxy => {:proxy_address => '127.0.0.1', :proxy_port => 8080}) - - expect(foo.merge(bar).to_hash).to eq( - :response => :parsed_body, - :params => {:plop => 'plip'}, - :form => {:bar => 'bar'}, - :body => 'body-bar', - :json => {:bar => 'bar'}, - :headers => {'Accept' => 'xml', 'Foo' => 'foo', 'Bar' => 'bar'}, - :proxy => {:proxy_address => '127.0.0.1', :proxy_port => 8080}, - :follow => nil, - :socket_class => described_class.default_socket_class, - :ssl_socket_class => described_class.default_ssl_socket_class, - :ssl_context => nil) - end -end diff --git a/.gems/gems/http-0.6.2/spec/http/options/new_spec.rb b/.gems/gems/http-0.6.2/spec/http/options/new_spec.rb deleted file mode 100644 index 845b447..0000000 --- a/.gems/gems/http-0.6.2/spec/http/options/new_spec.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'spec_helper' - -describe HTTP::Options, 'new' do - it 'supports a Options instance' do - opts = HTTP::Options.new - expect(HTTP::Options.new(opts)).to eq(opts) - end - - context 'with a Hash' do - it 'coerces :response correctly' do - opts = HTTP::Options.new(:response => :object) - expect(opts.response).to eq(:object) - end - - it 'coerces :headers correctly' do - opts = HTTP::Options.new(:headers => {:accept => 'json'}) - expect(opts.headers).to eq([%w[Accept json]]) - end - - it 'coerces :proxy correctly' do - opts = HTTP::Options.new(:proxy => {:proxy_address => '127.0.0.1', :proxy_port => 8080}) - expect(opts.proxy).to eq(:proxy_address => '127.0.0.1', :proxy_port => 8080) - end - - it 'coerces :form correctly' do - opts = HTTP::Options.new(:form => {:foo => 42}) - expect(opts.form).to eq(:foo => 42) - end - end -end diff --git a/.gems/gems/http-0.6.2/spec/http/options/proxy_spec.rb b/.gems/gems/http-0.6.2/spec/http/options/proxy_spec.rb deleted file mode 100644 index b1c9e37..0000000 --- a/.gems/gems/http-0.6.2/spec/http/options/proxy_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -require 'spec_helper' - -describe HTTP::Options, 'proxy' do - - let(:opts) { HTTP::Options.new } - - it 'defaults to {}' do - expect(opts.proxy).to eq({}) - end - - it 'may be specified with with_proxy' do - opts2 = opts.with_proxy(:proxy_address => '127.0.0.1', :proxy_port => 8080) - expect(opts.proxy).to eq({}) - expect(opts2.proxy).to eq(:proxy_address => '127.0.0.1', :proxy_port => 8080) - end - - it 'accepts proxy address, port, username, and password' do - opts2 = opts.with_proxy(:proxy_address => '127.0.0.1', :proxy_port => 8080, :proxy_username => 'username', :proxy_password => 'password') - expect(opts2.proxy).to eq(:proxy_address => '127.0.0.1', :proxy_port => 8080, :proxy_username => 'username', :proxy_password => 'password') - end -end diff --git a/.gems/gems/http-0.6.2/spec/http/options_spec.rb b/.gems/gems/http-0.6.2/spec/http/options_spec.rb deleted file mode 100644 index f2bf76b..0000000 --- a/.gems/gems/http-0.6.2/spec/http/options_spec.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'spec_helper' - -describe HTTP::Options do - subject { described_class.new(:response => :body) } - - it 'behaves like a Hash for reading' do - expect(subject[:response]).to eq(:body) - expect(subject[:nosuchone]).to be nil - end - - it 'coerces to a Hash' do - expect(subject.to_hash).to be_a(Hash) - end -end diff --git a/.gems/gems/http-0.6.2/spec/http/redirector_spec.rb b/.gems/gems/http-0.6.2/spec/http/redirector_spec.rb deleted file mode 100644 index b40018b..0000000 --- a/.gems/gems/http-0.6.2/spec/http/redirector_spec.rb +++ /dev/null @@ -1,100 +0,0 @@ -require 'spec_helper' - -describe HTTP::Redirector do - def simple_response(status, body = '', headers = {}) - HTTP::Response.new(status, '1.1', headers, body) - end - - def redirect_response(location, status) - simple_response status, '', 'Location' => location - end - - let(:max_hops) { 5 } - subject(:redirector) { described_class.new max_hops } - - context 'following 300 redirect' do - let(:orig_request) { HTTP::Request.new :post, 'http://www.example.com/' } - let(:orig_response) { redirect_response 'http://example.com/', 300 } - - it 'follows without changing verb' do - redirector.perform(orig_request, orig_response) do |request| - expect(request.verb).to be orig_request.verb - simple_response 200 - end - end - end - - context 'following 301 redirect' do - let(:orig_request) { HTTP::Request.new :post, 'http://www.example.com/' } - let(:orig_response) { redirect_response 'http://example.com/', 301 } - - it 'follows without changing verb' do - redirector.perform(orig_request, orig_response) do |request| - expect(request.verb).to be orig_request.verb - simple_response 200 - end - end - end - - context 'following 302 redirect' do - let(:orig_request) { HTTP::Request.new :post, 'http://www.example.com/' } - let(:orig_response) { redirect_response 'http://example.com/', 302 } - - it 'follows without changing verb' do - redirector.perform(orig_request, orig_response) do |request| - expect(request.verb).to be orig_request.verb - simple_response 200 - end - end - end - - context 'following 303 redirect' do - context 'upon POST request' do - let(:orig_request) { HTTP::Request.new :post, 'http://www.example.com/' } - let(:orig_response) { redirect_response 'http://example.com/', 303 } - - it 'follows without changing verb' do - redirector.perform(orig_request, orig_response) do |request| - expect(request.verb).to be :get - simple_response 200 - end - end - end - - context 'upon HEAD request' do - let(:orig_request) { HTTP::Request.new :head, 'http://www.example.com/' } - let(:orig_response) { redirect_response 'http://example.com/', 303 } - - it 'follows without changing verb' do - redirector.perform(orig_request, orig_response) do |request| - expect(request.verb).to be :get - simple_response 200 - end - end - end - end - - context 'following 307 redirect' do - let(:orig_request) { HTTP::Request.new :post, 'http://www.example.com/' } - let(:orig_response) { redirect_response 'http://example.com/', 307 } - - it 'follows without changing verb' do - redirector.perform(orig_request, orig_response) do |request| - expect(request.verb).to be orig_request.verb - simple_response 200 - end - end - end - - context 'following 308 redirect' do - let(:orig_request) { HTTP::Request.new :post, 'http://www.example.com/' } - let(:orig_response) { redirect_response 'http://example.com/', 308 } - - it 'follows without changing verb' do - redirector.perform(orig_request, orig_response) do |request| - expect(request.verb).to be orig_request.verb - simple_response 200 - end - end - end -end diff --git a/.gems/gems/http-0.6.2/spec/http/request/writer_spec.rb b/.gems/gems/http-0.6.2/spec/http/request/writer_spec.rb deleted file mode 100644 index 026dbdd..0000000 --- a/.gems/gems/http-0.6.2/spec/http/request/writer_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -require 'spec_helper' - -describe HTTP::Request::Writer do - describe '#initalize' do - def construct(body) - HTTP::Request::Writer.new(nil, body, [], '') - end - - it "doesn't throw on a nil body" do - expect { construct nil }.not_to raise_error - end - - it "doesn't throw on a String body" do - expect { construct 'string body' }.not_to raise_error - end - - it "doesn't throw on an Enumerable body" do - expect { construct %w[bees cows] }.not_to raise_error - end - - it "does throw on a body that isn't string, enumerable or nil" do - expect { construct true }.to raise_error - end - - it 'writes a chunked request from an Enumerable correctly' do - io = StringIO.new - writer = HTTP::Request::Writer.new(io, %w[bees cows], [], '') - writer.send_request_body - io.rewind - expect(io.string).to eq "4\r\nbees\r\n4\r\ncows\r\n0\r\n\r\n" - end - end - - describe '#add_body_type_headers' do - it 'properly calculates length of unicode string' do - writer = HTTP::Request::Writer.new(nil, 'Привет, мир!', {}, '') - writer.add_body_type_headers - expect(writer.join_headers).to match(/\r\nContent-Length: 21\r\n/) - end - end -end diff --git a/.gems/gems/http-0.6.2/spec/http/request_spec.rb b/.gems/gems/http-0.6.2/spec/http/request_spec.rb deleted file mode 100644 index 4963f18..0000000 --- a/.gems/gems/http-0.6.2/spec/http/request_spec.rb +++ /dev/null @@ -1,147 +0,0 @@ -require 'spec_helper' - -describe HTTP::Request do - let(:headers) { {:accept => 'text/html'} } - let(:request_uri) { 'http://example.com/' } - - subject(:request) { HTTP::Request.new(:get, request_uri, headers) } - - it 'includes HTTP::Headers::Mixin' do - expect(described_class).to include HTTP::Headers::Mixin - end - - it 'requires URI to have scheme part' do - expect { HTTP::Request.new(:get, 'example.com/') }.to \ - raise_error(HTTP::Request::UnsupportedSchemeError) - end - - it 'provides a #scheme accessor' do - expect(request.scheme).to eq(:http) - end - - it 'sets given headers' do - expect(subject['Accept']).to eq('text/html') - end - - describe 'Host header' do - subject { request['Host'] } - - context 'was not given' do - it { is_expected.to eq 'example.com' } - - context 'and request URI has non-standard port' do - let(:request_uri) { 'http://example.com:3000/' } - it { is_expected.to eq 'example.com:3000' } - end - end - - context 'was explicitly given' do - before { headers[:host] = 'github.com' } - it { is_expected.to eq 'github.com' } - end - end - - describe 'User-Agent header' do - subject { request['User-Agent'] } - - context 'was not given' do - it { is_expected.to eq HTTP::Request::USER_AGENT } - end - - context 'was explicitly given' do - before { headers[:user_agent] = 'MrCrawly/123' } - it { is_expected.to eq 'MrCrawly/123' } - end - end - - it 'provides a #verb accessor' do - expect(subject.verb).to eq(:get) - end - - it 'provides a #method accessor that outputs a deprecation warning and returns the verb' do - warning = capture_warning do - expect(subject.method).to eq(subject.verb) - end - expect(warning).to match(/\[DEPRECATION\] HTTP::Request#method is deprecated\. Use #verb instead\. For Object#method, use #__method__\.$/) - end - - it 'provides a #__method__ method that delegates to Object#method' do - expect(subject.__method__(:verb)).to be_a(Method) - end - - describe '#redirect' do - let(:headers) { {:accept => 'text/html'} } - let(:proxy) { {:proxy_username => 'douglas', :proxy_password => 'adams'} } - let(:body) { 'The Ultimate Question' } - let(:request) { HTTP::Request.new(:post, 'http://example.com/', headers, proxy, body) } - - subject(:redirected) { request.redirect 'http://blog.example.com/' } - - its(:uri) { should eq URI.parse 'http://blog.example.com/' } - - its(:verb) { should eq request.verb } - its(:body) { should eq request.body } - its(:proxy) { should eq request.proxy } - - it 'presets new Host header' do - expect(redirected['Host']).to eq 'blog.example.com' - end - - context 'with schema-less absolute URL given' do - subject(:redirected) { request.redirect '//another.example.com/blog' } - - its(:uri) { should eq URI.parse 'http://another.example.com/blog' } - - its(:verb) { should eq request.verb } - its(:body) { should eq request.body } - its(:proxy) { should eq request.proxy } - - it 'presets new Host header' do - expect(redirected['Host']).to eq 'another.example.com' - end - end - - context 'with relative URL given' do - subject(:redirected) { request.redirect '/blog' } - - its(:uri) { should eq URI.parse 'http://example.com/blog' } - - its(:verb) { should eq request.verb } - its(:body) { should eq request.body } - its(:proxy) { should eq request.proxy } - - it 'keeps Host header' do - expect(redirected['Host']).to eq 'example.com' - end - - context 'with original URI having non-standard port' do - let(:request) { HTTP::Request.new(:post, 'http://example.com:8080/', headers, proxy, body) } - its(:uri) { should eq URI.parse 'http://example.com:8080/blog' } - end - end - - context 'with relative URL that misses leading slash given' do - subject(:redirected) { request.redirect 'blog' } - - its(:uri) { should eq URI.parse 'http://example.com/blog' } - - its(:verb) { should eq request.verb } - its(:body) { should eq request.body } - its(:proxy) { should eq request.proxy } - - it 'keeps Host header' do - expect(redirected['Host']).to eq 'example.com' - end - - context 'with original URI having non-standard port' do - let(:request) { HTTP::Request.new(:post, 'http://example.com:8080/', headers, proxy, body) } - its(:uri) { should eq URI.parse 'http://example.com:8080/blog' } - end - end - - context 'with new verb given' do - subject { request.redirect 'http://blog.example.com/', :get } - its(:verb) { should be :get } - end - end -end diff --git a/.gems/gems/http-0.6.2/spec/http/response/body_spec.rb b/.gems/gems/http-0.6.2/spec/http/response/body_spec.rb deleted file mode 100644 index fb5989c..0000000 --- a/.gems/gems/http-0.6.2/spec/http/response/body_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -require 'spec_helper' - -describe HTTP::Response::Body do - let(:client) { double } - let(:chunks) { ['Hello, ', 'World!'] } - - before { allow(client).to receive(:readpartial) { chunks.shift } } - - subject(:body) { described_class.new client } - - it 'streams bodies from responses' do - expect(subject.to_s).to eq 'Hello, World!' - end - - context 'when body empty' do - let(:chunks) { [''] } - - it 'returns responds to empty? with true' do - expect(subject).to be_empty - end - end - - describe '#readpartial' do - context 'with size given' do - it 'passes value to underlying client' do - expect(client).to receive(:readpartial).with(42) - body.readpartial 42 - end - end - - context 'without size given' do - it 'does not blows up' do - expect { body.readpartial }.to_not raise_error - end - - it 'calls underlying client readpartial without specific size' do - expect(client).to receive(:readpartial).with no_args - body.readpartial - end - end - end -end diff --git a/.gems/gems/http-0.6.2/spec/http/response_spec.rb b/.gems/gems/http-0.6.2/spec/http/response_spec.rb deleted file mode 100644 index c554cc1..0000000 --- a/.gems/gems/http-0.6.2/spec/http/response_spec.rb +++ /dev/null @@ -1,100 +0,0 @@ -require 'spec_helper' - -describe HTTP::Response do - it 'includes HTTP::Headers::Mixin' do - expect(described_class).to include HTTP::Headers::Mixin - end - - describe 'to_a' do - let(:body) { 'Hello world' } - let(:content_type) { 'text/plain' } - subject { HTTP::Response.new(200, '1.1', {'Content-Type' => content_type}, body) } - - it 'returns a Rack-like array' do - expect(subject.to_a).to eq([200, {'Content-Type' => content_type}, body]) - end - end - - describe 'mime_type' do - subject { HTTP::Response.new(200, '1.1', headers, '').mime_type } - - context 'without Content-Type header' do - let(:headers) { {} } - it { should be_nil } - end - - context 'with Content-Type: text/html' do - let(:headers) { {'Content-Type' => 'text/html'} } - it { should eq 'text/html' } - end - - context 'with Content-Type: text/html; charset=utf-8' do - let(:headers) { {'Content-Type' => 'text/html; charset=utf-8'} } - it { should eq 'text/html' } - end - end - - describe 'charset' do - subject { HTTP::Response.new(200, '1.1', headers, '').charset } - - context 'without Content-Type header' do - let(:headers) { {} } - it { should be_nil } - end - - context 'with Content-Type: text/html' do - let(:headers) { {'Content-Type' => 'text/html'} } - it { should be_nil } - end - - context 'with Content-Type: text/html; charset=utf-8' do - let(:headers) { {'Content-Type' => 'text/html; charset=utf-8'} } - it { should eq 'utf-8' } - end - end - - describe '#parse' do - let(:headers) { {'Content-Type' => content_type} } - let(:body) { '{"foo":"bar"}' } - let(:response) { HTTP::Response.new 200, '1.1', headers, body } - - context 'with known content type' do - let(:content_type) { 'application/json' } - it 'returns parsed body' do - expect(response.parse).to eq 'foo' => 'bar' - end - end - - context 'with unknown content type' do - let(:content_type) { 'application/deadbeef' } - it 'raises HTTP::Error' do - expect { response.parse }.to raise_error HTTP::Error - end - end - - context 'with explicitly given mime type' do - let(:content_type) { 'application/deadbeef' } - it 'ignores mime_type of response' do - expect(response.parse 'application/json').to eq 'foo' => 'bar' - end - - it 'supports MIME type aliases' do - expect(response.parse :json).to eq 'foo' => 'bar' - end - end - end - - describe '#flush' do - let(:body) { double :to_s => '' } - let(:response) { HTTP::Response.new 200, '1.1', {}, body } - - it 'returns response self-reference' do - expect(response.flush).to be response - end - - it 'flushes body' do - expect(body).to receive :to_s - response.flush - end - end -end diff --git a/.gems/gems/http-0.6.2/spec/http_spec.rb b/.gems/gems/http-0.6.2/spec/http_spec.rb deleted file mode 100644 index 43ace3d..0000000 --- a/.gems/gems/http-0.6.2/spec/http_spec.rb +++ /dev/null @@ -1,136 +0,0 @@ -require 'spec_helper' -require 'json' - -describe HTTP do - let(:test_endpoint) { "http://127.0.0.1:#{ExampleService::PORT}/" } - - context 'getting resources' do - it 'should be easy' do - response = HTTP.get test_endpoint - expect(response.to_s).to match(//) - end - - context 'with URI instance' do - it 'should be easy' do - response = HTTP.get URI(test_endpoint) - expect(response.to_s).to match(//) - end - end - - context 'with query string parameters' do - it 'is easy' do - response = HTTP.get "#{test_endpoint}params", :params => {:foo => 'bar'} - expect(response.to_s).to match(/Params!/) - end - end - - context 'with query string parameters in the URI and opts hash' do - it 'includes both' do - response = HTTP.get "#{test_endpoint}multiple-params?foo=bar", :params => {:baz => 'quux'} - expect(response.to_s).to match(/More Params!/) - end - end - - context 'with headers' do - it 'should be easy' do - response = HTTP.accept('application/json').get test_endpoint - expect(response.to_s.include?('json')).to be true - end - end - end - - context 'with http proxy address and port' do - it 'should proxy the request' do - response = HTTP.via('127.0.0.1', 8080).get test_endpoint - expect(response.headers['X-Proxied']).to eq 'true' - end - end - - context 'with http proxy address, port username and password' do - it 'should proxy the request' do - response = HTTP.via('127.0.0.1', 8081, 'username', 'password').get test_endpoint - expect(response.headers['X-Proxied']).to eq 'true' - end - - it 'responds with the endpoint\'s body' do - response = HTTP.via('127.0.0.1', 8081, 'username', 'password').get test_endpoint - expect(response.to_s).to match(//) - end - end - - context 'with http proxy address, port, with wrong username and password' do - it 'responds with 407' do - response = HTTP.via('127.0.0.1', 8081, 'user', 'pass').get test_endpoint - expect(response.status).to eq(407) - end - end - - context 'without proxy port' do - it 'should raise an argument error' do - expect { HTTP.via('127.0.0.1') }.to raise_error HTTP::RequestError - end - end - - context 'posting to resources' do - it 'should be easy to post forms' do - response = HTTP.post "#{test_endpoint}form", :form => {:example => 'testing-form'} - expect(response.to_s).to eq('passed :)') - end - end - - context 'posting with an explicit body' do - it 'should be easy to post' do - response = HTTP.post "#{test_endpoint}body", :body => 'testing-body' - expect(response.to_s).to eq('passed :)') - end - end - - context 'with redirects' do - it 'should be easy for 301' do - response = HTTP.with_follow(true).get("#{test_endpoint}redirect-301") - expect(response.to_s).to match(//) - end - - it 'should be easy for 302' do - response = HTTP.with_follow(true).get("#{test_endpoint}redirect-302") - expect(response.to_s).to match(//) - end - - end - - context 'head requests' do - it 'should be easy' do - response = HTTP.head test_endpoint - expect(response.status).to eq(200) - expect(response['content-type']).to match(/html/) - end - end - - describe '.auth' do - context 'with no arguments' do - specify { expect { HTTP.auth }.to raise_error } - end - - context 'with one argument' do - it 'returns branch with Authorization header as is' do - expect(HTTP).to receive(:with) \ - .with :authorization => 'foobar' - - HTTP.auth :foobar - end - end - - context 'with two arguments' do - it 'builds value with AuthorizationHeader builder' do - expect(HTTP::AuthorizationHeader).to receive(:build) \ - .with(:bearer, :token => 'token') - - HTTP.auth :bearer, :token => 'token' - end - end - - context 'with more than two arguments' do - specify { expect { HTTP.auth 1, 2, 3 }.to raise_error } - end - end -end diff --git a/.gems/gems/http-0.6.2/spec/spec_helper.rb b/.gems/gems/http-0.6.2/spec/spec_helper.rb deleted file mode 100644 index d4fc208..0000000 --- a/.gems/gems/http-0.6.2/spec/spec_helper.rb +++ /dev/null @@ -1,33 +0,0 @@ -if RUBY_VERSION >= '1.9' - require 'simplecov' - require 'coveralls' - - SimpleCov.formatters = [SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter] - - SimpleCov.start do - add_filter '/spec/' - minimum_coverage(80) - end -end - -require 'http' -require 'support/example_server' -require 'support/proxy_server' - -RSpec.configure do |config| - config.expect_with :rspec do |c| - c.syntax = :expect - end -end - -def capture_warning - begin - old_stderr = $stderr - $stderr = StringIO.new - yield - result = $stderr.string - ensure - $stderr = old_stderr - end - result -end diff --git a/.gems/gems/http-0.6.2/spec/support/example_server.rb b/.gems/gems/http-0.6.2/spec/support/example_server.rb deleted file mode 100644 index 77b4d96..0000000 --- a/.gems/gems/http-0.6.2/spec/support/example_server.rb +++ /dev/null @@ -1,102 +0,0 @@ -require 'webrick' - -class ExampleService < WEBrick::HTTPServlet::AbstractServlet - PORT = 65432 # rubocop:disable NumericLiterals - - def do_GET(request, response) # rubocop:disable MethodName - case request.path - when '/' - handle_root(request, response) - when '/params' - handle_params(request, response) - when '/multiple-params' - handle_multiple_params(request, response) - when '/proxy' - response.status = 200 - response.body = 'Proxy!' - when '/not-found' - response.body = 'not found' - response.status = 404 - when '/redirect-301' - response.status = 301 - response['Location'] = "http://127.0.0.1:#{PORT}/" - when '/redirect-302' - response.status = 302 - response['Location'] = "http://127.0.0.1:#{PORT}/" - else - response.status = 404 - end - end - - def handle_root(request, response) - response.status = 200 - case request['Accept'] - when 'application/json' - response['Content-Type'] = 'application/json' - response.body = '{"json": true}' - else - response['Content-Type'] = 'text/html' - response.body = '' - end - end - - def handle_params(request, response) - return unless request.query_string == 'foo=bar' - - response.status = 200 - response.body = 'Params!' - end - - def handle_multiple_params(request, response) - params = CGI.parse(request.query_string) - - return unless params == {'foo' => ['bar'], 'baz' => ['quux']} - - response.status = 200 - response.body = 'More Params!' - end - - def do_POST(request, response) # rubocop:disable MethodName - case request.path - when '/form' - if request.query['example'] == 'testing-form' - response.status = 200 - response.body = 'passed :)' - else - response.status = 400 - response.body = 'invalid! >:E' - end - when '/body' - if request.body == 'testing-body' - response.status = 200 - response.body = 'passed :)' - else - response.status = 400 - response.body = 'invalid! >:E' - end - else - response.status = 404 - end - end - - def do_HEAD(request, response) # rubocop:disable MethodName - case request.path - when '/' - response.status = 200 - response['Content-Type'] = 'text/html' - else - response.status = 404 - end - end -end - -ExampleServer = WEBrick::HTTPServer.new(:Port => ExampleService::PORT, :AccessLog => []) -ExampleServer.mount '/', ExampleService - -t = Thread.new { ExampleServer.start } -trap('INT') do - ExampleServer.shutdown - exit -end - -Thread.pass while t.status && t.status != 'sleep' diff --git a/.gems/gems/http-0.6.2/spec/support/proxy_server.rb b/.gems/gems/http-0.6.2/spec/support/proxy_server.rb deleted file mode 100644 index d990926..0000000 --- a/.gems/gems/http-0.6.2/spec/support/proxy_server.rb +++ /dev/null @@ -1,31 +0,0 @@ -require 'webrick/httpproxy' - -handler = proc { |_, res| res['X-PROXIED'] = true } - -ProxyServer = WEBrick::HTTPProxyServer.new( - :Port => 8080, - :AccessLog => [], - :RequestCallback => handler -) - -AuthenticatedProxyServer = WEBrick::HTTPProxyServer.new( - :Port => 8081, - :ProxyAuthProc => proc do | req, res | - WEBrick::HTTPAuth.proxy_basic_auth(req, res, 'proxy') do | user, pass | - user == 'username' && pass == 'password' - end - end, - :RequestCallback => handler -) - -Thread.new { ProxyServer.start } -trap('INT') do - ProxyServer.shutdown - exit -end - -Thread.new { AuthenticatedProxyServer.start } -trap('INT') do - AuthenticatedProxyServer.shutdown - exit -end diff --git a/.gems/gems/http_parser.rb-0.6.0/.gitignore b/.gems/gems/http_parser.rb-0.6.0/.gitignore deleted file mode 100644 index d20f94b..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -tmp -*.bundle -*.gem -*.o -*.so -*.bundle -*.jar -*.swp -Makefile -tags -*.rbc diff --git a/.gems/gems/http_parser.rb-0.6.0/.gitmodules b/.gems/gems/http_parser.rb-0.6.0/.gitmodules deleted file mode 100644 index 6c289a3..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "http-parser"] - path = ext/ruby_http_parser/vendor/http-parser - url = git://github.com/joyent/http-parser.git -[submodule "http-parser-java"] - path = ext/ruby_http_parser/vendor/http-parser-java - url = git://github.com/tmm1/http-parser.java diff --git a/.gems/gems/http_parser.rb-0.6.0/Gemfile b/.gems/gems/http_parser.rb-0.6.0/Gemfile deleted file mode 100644 index 851fabc..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/Gemfile +++ /dev/null @@ -1,2 +0,0 @@ -source 'https://rubygems.org' -gemspec diff --git a/.gems/gems/http_parser.rb-0.6.0/Gemfile.lock b/.gems/gems/http_parser.rb-0.6.0/Gemfile.lock deleted file mode 100644 index c880187..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/Gemfile.lock +++ /dev/null @@ -1,39 +0,0 @@ -PATH - remote: . - specs: - http_parser.rb (0.6.0.beta.2) - -GEM - remote: https://rubygems.org/ - specs: - benchmark_suite (0.8.0) - diff-lcs (1.1.2) - ffi (1.0.11) - ffi (1.0.11-java) - json (1.8.0) - json (1.8.0-java) - rake (0.9.2) - rake-compiler (0.7.9) - rake - rspec (2.4.0) - rspec-core (~> 2.4.0) - rspec-expectations (~> 2.4.0) - rspec-mocks (~> 2.4.0) - rspec-core (2.4.0) - rspec-expectations (2.4.0) - diff-lcs (~> 1.1.2) - rspec-mocks (2.4.0) - yajl-ruby (1.1.0) - -PLATFORMS - java - ruby - -DEPENDENCIES - benchmark_suite - ffi - http_parser.rb! - json (>= 1.4.6) - rake-compiler (>= 0.7.9) - rspec (>= 2.0.1) - yajl-ruby (>= 0.8.1) diff --git a/.gems/gems/http_parser.rb-0.6.0/LICENSE-MIT b/.gems/gems/http_parser.rb-0.6.0/LICENSE-MIT deleted file mode 100644 index 35f0bf0..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/LICENSE-MIT +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2009,2010 Marc-André Cournoyer -Copyright 2010,2011 Aman Gupta - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/.gems/gems/http_parser.rb-0.6.0/README.md b/.gems/gems/http_parser.rb-0.6.0/README.md deleted file mode 100644 index 35dad45..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# http_parser.rb - -A simple callback-based HTTP request/response parser for writing http -servers, clients and proxies. - -This gem is built on top of [joyent/http-parser](http://github.com/joyent/http-parser) and its java port [http-parser/http-parser.java](http://github.com/http-parser/http-parser.java). - -## Supported Platforms - -This gem aims to work on all major Ruby platforms, including: - -- MRI 1.8 and 1.9 -- Rubinius -- JRuby -- win32 - -## Usage - -```ruby -require "http/parser" - -parser = Http::Parser.new - -parser.on_headers_complete = proc do - p parser.http_version - - p parser.http_method # for requests - p parser.request_url - - p parser.status_code # for responses - - p parser.headers -end - -parser.on_body = proc do |chunk| - # One chunk of the body - p chunk -end - -parser.on_message_complete = proc do |env| - # Headers and body is all parsed - puts "Done!" -end -``` - -# Feed raw data from the socket to the parser -`parser << raw_data` - -## Advanced Usage - -### Accept callbacks on an object - -```ruby -module MyHttpConnection - def connection_completed - @parser = Http::Parser.new(self) - end - - def receive_data(data) - @parser << data - end - - def on_message_begin - @headers = nil - @body = '' - end - - def on_headers_complete(headers) - @headers = headers - end - - def on_body(chunk) - @body << chunk - end - - def on_message_complete - p [@headers, @body] - end -end -``` - -### Stop parsing after headers - -```ruby -parser = Http::Parser.new -parser.on_headers_complete = proc{ :stop } - -offset = parser << request_data -body = request_data[offset..-1] -``` diff --git a/.gems/gems/http_parser.rb-0.6.0/Rakefile b/.gems/gems/http_parser.rb-0.6.0/Rakefile deleted file mode 100644 index 150f652..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/Rakefile +++ /dev/null @@ -1,6 +0,0 @@ -# load tasks -Dir['tasks/*.rake'].sort.each { |f| load f } - -# default task -task :compile => :submodules -task :default => [:compile, :spec] diff --git a/.gems/gems/http_parser.rb-0.6.0/bench/standalone.rb b/.gems/gems/http_parser.rb-0.6.0/bench/standalone.rb deleted file mode 100755 index 6b4dcb6..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/bench/standalone.rb +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env ruby -$:.unshift File.dirname(__FILE__) + "/../lib" -require "rubygems" -require "http/parser" -require "benchmark/ips" - -request = <<-REQUEST -GET / HTTP/1.1 -Host: www.example.com -Connection: keep-alive -User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.78 S -Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 -Accept-Encoding: gzip,deflate,sdch -Accept-Language: en-US,en;q=0.8 -Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 - -REQUEST -request.gsub!(/\n/m, "\r\n") - -Benchmark.ips do |ips| - ips.report("instance") { Http::Parser.new } - ips.report("parsing") { Http::Parser.new << request } -end diff --git a/.gems/gems/http_parser.rb-0.6.0/bench/thin.rb b/.gems/gems/http_parser.rb-0.6.0/bench/thin.rb deleted file mode 100644 index fe0dd6d..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/bench/thin.rb +++ /dev/null @@ -1,58 +0,0 @@ -$:.unshift File.dirname(__FILE__) + "/../lib" -require "rubygems" -require "thin_parser" -require "http_parser" -require "benchmark" -require "stringio" - -data = "POST /postit HTTP/1.1\r\n" + - "Host: localhost:3000\r\n" + - "User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9\r\n" + - "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\n" + - "Accept-Language: en-us,en;q=0.5\r\n" + - "Accept-Encoding: gzip,deflate\r\n" + - "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n" + - "Keep-Alive: 300\r\n" + - "Connection: keep-alive\r\n" + - "Content-Type: text/html\r\n" + - "Content-Length: 37\r\n" + - "\r\n" + - "name=marc&email=macournoyer@gmail.com" - -def thin(data) - env = {"rack.input" => StringIO.new} - Thin::HttpParser.new.execute(env, data, 0) - env -end - -def http_parser(data) - body = StringIO.new - env = nil - - parser = HTTP::RequestParser.new - parser.on_headers_complete = proc { |e| env = e } - parser.on_body = proc { |c| body << c } - parser << data - - env["rack-input"] = body - env -end - -# p thin(data) -# p http_parser(data) - -TESTS = 30_000 -Benchmark.bmbm do |results| - results.report("thin:") { TESTS.times { thin data } } - results.report("http-parser:") { TESTS.times { http_parser data } } -end - -# On my MBP core duo 2.2Ghz -# Rehearsal ------------------------------------------------ -# thin: 1.470000 0.000000 1.470000 ( 1.474737) -# http-parser: 1.270000 0.020000 1.290000 ( 1.292758) -# --------------------------------------- total: 2.760000sec -# -# user system total real -# thin: 1.150000 0.030000 1.180000 ( 1.173767) -# http-parser: 1.250000 0.010000 1.260000 ( 1.263796) diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/.RUBYARCHDIR.time b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/.RUBYARCHDIR.time deleted file mode 100644 index e69de29..0000000 diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/.gitignore b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/.gitignore deleted file mode 100644 index cb899d1..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/.gitignore +++ /dev/null @@ -1 +0,0 @@ -ryah_http_parser.* diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/RubyHttpParserService.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/RubyHttpParserService.java deleted file mode 100644 index 2ea3e8e..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/RubyHttpParserService.java +++ /dev/null @@ -1,18 +0,0 @@ -import java.io.IOException; - -import org.jruby.Ruby; -import org.jruby.RubyClass; -import org.jruby.RubyModule; -import org.jruby.runtime.load.BasicLibraryService; - -import org.ruby_http_parser.*; - -public class RubyHttpParserService implements BasicLibraryService { - public boolean basicLoad(final Ruby runtime) throws IOException { - RubyModule mHTTP = runtime.defineModule("HTTP"); - RubyClass cParser = mHTTP.defineClassUnder("Parser", runtime.getObject(), RubyHttpParser.ALLOCATOR); - cParser.defineAnnotatedMethods(RubyHttpParser.class); - cParser.defineClassUnder("Error", runtime.getClass("IOError"),runtime.getClass("IOError").getAllocator()); - return true; - } -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/ext_help.h b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/ext_help.h deleted file mode 100644 index a919dff..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/ext_help.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef ext_help_h -#define ext_help_h - -#define RAISE_NOT_NULL(T) if(T == NULL) rb_raise(rb_eArgError, "NULL found for " # T " when shouldn't be."); -#define DATA_GET(from,type,name) Data_Get_Struct(from,type,name); RAISE_NOT_NULL(name); -#define REQUIRE_TYPE(V, T) if(TYPE(V) != T) rb_raise(rb_eTypeError, "Wrong argument type for " # V " required " # T); - -/* for compatibility with Ruby 1.8.5, which doesn't declare RSTRING_PTR */ -#ifndef RSTRING_PTR -#define RSTRING_PTR(s) (RSTRING(s)->ptr) -#endif - -/* for compatibility with Ruby 1.8.5, which doesn't declare RSTRING_LEN */ -#ifndef RSTRING_LEN -#define RSTRING_LEN(s) (RSTRING(s)->len) -#endif - -#endif diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/extconf.rb b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/extconf.rb deleted file mode 100644 index d2f6e51..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/extconf.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'mkmf' - -# check out code if it hasn't been already -if Dir[File.expand_path('../vendor/http-parser/*', __FILE__)].empty? - Dir.chdir(File.expand_path('../../../', __FILE__)) do - xsystem 'git submodule init' - xsystem 'git submodule update' - end -end - -# mongrel and http-parser both define http_parser_(init|execute), so we -# rename functions in http-parser before using them. -vendor_dir = File.expand_path('../vendor/http-parser/', __FILE__) -src_dir = File.expand_path('../', __FILE__) -%w[ http_parser.c http_parser.h ].each do |file| - File.open(File.join(src_dir, "ryah_#{file}"), 'w'){ |f| - f.write File.read(File.join(vendor_dir, file)).gsub('http_parser', 'ryah_http_parser') - } -end - -$CFLAGS << " -I#{src_dir}" - -dir_config("ruby_http_parser") -create_makefile("ruby_http_parser") diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/org/ruby_http_parser/RubyHttpParser.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/org/ruby_http_parser/RubyHttpParser.java deleted file mode 100644 index ac586a9..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/org/ruby_http_parser/RubyHttpParser.java +++ /dev/null @@ -1,495 +0,0 @@ -package org.ruby_http_parser; - -import http_parser.HTTPException; -import http_parser.HTTPMethod; -import http_parser.HTTPParser; -import http_parser.lolevel.HTTPCallback; -import http_parser.lolevel.HTTPDataCallback; -import http_parser.lolevel.ParserSettings; - -import java.nio.ByteBuffer; - -import org.jcodings.Encoding; -import org.jcodings.specific.UTF8Encoding; -import org.jruby.Ruby; -import org.jruby.RubyArray; -import org.jruby.RubyClass; -import org.jruby.RubyHash; -import org.jruby.RubyNumeric; -import org.jruby.RubyObject; -import org.jruby.RubyString; -import org.jruby.RubySymbol; -import org.jruby.anno.JRubyMethod; -import org.jruby.exceptions.RaiseException; -import org.jruby.runtime.ObjectAllocator; -import org.jruby.runtime.ThreadContext; -import org.jruby.runtime.builtin.IRubyObject; -import org.jruby.util.ByteList; - -public class RubyHttpParser extends RubyObject { - - @JRubyMethod(name = "strict?", module = true) - public static IRubyObject strict(IRubyObject recv) { - return recv.getRuntime().newBoolean(true); - } - - public static ObjectAllocator ALLOCATOR = new ObjectAllocator() { - public IRubyObject allocate(Ruby runtime, RubyClass klass) { - return new RubyHttpParser(runtime, klass); - } - }; - - byte[] fetchBytes(ByteBuffer b, int pos, int len) { - byte[] by = new byte[len]; - int saved = b.position(); - b.position(pos); - b.get(by); - b.position(saved); - return by; - } - - public class StopException extends RuntimeException { - } - - private Ruby runtime; - private HTTPParser parser; - private ParserSettings settings; - - private RubyClass eParserError; - - private RubyHash headers; - - private IRubyObject on_message_begin; - private IRubyObject on_headers_complete; - private IRubyObject on_body; - private IRubyObject on_message_complete; - - private IRubyObject requestUrl; - private IRubyObject requestPath; - private IRubyObject queryString; - private IRubyObject fragment; - - private IRubyObject header_value_type; - private IRubyObject upgradeData; - - private IRubyObject callback_object; - - private boolean completed; - - private byte[] _current_header; - private byte[] _last_header; - - private static final Encoding UTF8 = UTF8Encoding.INSTANCE; - - public RubyHttpParser(final Ruby runtime, RubyClass clazz) { - super(runtime, clazz); - - this.runtime = runtime; - this.eParserError = (RubyClass) runtime.getModule("HTTP").getClass("Parser").getConstant("Error"); - - this.on_message_begin = null; - this.on_headers_complete = null; - this.on_body = null; - this.on_message_complete = null; - - this.callback_object = null; - - this.completed = false; - - this.header_value_type = runtime.getModule("HTTP").getClass("Parser") - .getInstanceVariable("@default_header_value_type"); - - initSettings(); - init(); - } - - private void initSettings() { - this.settings = new ParserSettings(); - - this.settings.on_url = new HTTPDataCallback() { - public int cb(http_parser.lolevel.HTTPParser p, ByteBuffer buf, int pos, int len) { - byte[] data = fetchBytes(buf, pos, len); - if (runtime.is1_9() || runtime.is2_0()) { - ((RubyString) requestUrl).cat(data, 0, data.length, UTF8); - } else { - ((RubyString) requestUrl).cat(data); - } - return 0; - } - }; - - this.settings.on_header_field = new HTTPDataCallback() { - public int cb(http_parser.lolevel.HTTPParser p, ByteBuffer buf, int pos, int len) { - byte[] data = fetchBytes(buf, pos, len); - - if (_current_header == null) - _current_header = data; - else { - byte[] tmp = new byte[_current_header.length + data.length]; - System.arraycopy(_current_header, 0, tmp, 0, _current_header.length); - System.arraycopy(data, 0, tmp, _current_header.length, data.length); - _current_header = tmp; - } - - return 0; - } - }; - final RubySymbol arraysSym = runtime.newSymbol("arrays"); - final RubySymbol mixedSym = runtime.newSymbol("mixed"); - final RubySymbol stopSym = runtime.newSymbol("stop"); - final RubySymbol resetSym = runtime.newSymbol("reset"); - this.settings.on_header_value = new HTTPDataCallback() { - public int cb(http_parser.lolevel.HTTPParser p, ByteBuffer buf, int pos, int len) { - byte[] data = fetchBytes(buf, pos, len); - ThreadContext context = headers.getRuntime().getCurrentContext(); - IRubyObject key, val; - int new_field = 0; - - if (_current_header != null) { - new_field = 1; - _last_header = _current_header; - _current_header = null; - } - - key = RubyString.newString(runtime, new ByteList(_last_header, UTF8, false)); - val = headers.op_aref(context, key); - - if (new_field == 1) { - if (val.isNil()) { - if (header_value_type == arraysSym) { - headers.op_aset(context, key, - RubyArray.newArrayLight(runtime, RubyString.newStringLight(runtime, 10, UTF8))); - } else { - headers.op_aset(context, key, RubyString.newStringLight(runtime, 10, UTF8)); - } - } else { - if (header_value_type == mixedSym) { - if (val instanceof RubyString) { - headers.op_aset(context, key, - RubyArray.newArrayLight(runtime, val, RubyString.newStringLight(runtime, 10, UTF8))); - } else { - ((RubyArray) val).add(RubyString.newStringLight(runtime, 10, UTF8)); - } - } else if (header_value_type == arraysSym) { - ((RubyArray) val).add(RubyString.newStringLight(runtime, 10, UTF8)); - } else { - if (runtime.is1_9() || runtime.is2_0()) { - ((RubyString) val).cat(',', UTF8).cat(' ', UTF8); - } else { - ((RubyString) val).cat(',').cat(' '); - } - } - } - val = headers.op_aref(context, key); - } - - if (val instanceof RubyArray) { - val = ((RubyArray) val).entry(-1); - } - - if (runtime.is1_9() || runtime.is2_0()) { - ((RubyString) val).cat(data, 0, data.length, UTF8); - } else { - ((RubyString) val).cat(data); - } - - return 0; - } - }; - - this.settings.on_message_begin = new HTTPCallback() { - public int cb(http_parser.lolevel.HTTPParser p) { - headers = new RubyHash(runtime); - - if (runtime.is1_9() || runtime.is2_0()) { - requestUrl = RubyString.newEmptyString(runtime, UTF8); - requestPath = RubyString.newEmptyString(runtime, UTF8); - queryString = RubyString.newEmptyString(runtime, UTF8); - fragment = RubyString.newEmptyString(runtime, UTF8); - upgradeData = RubyString.newEmptyString(runtime, UTF8); - } else { - requestUrl = RubyString.newEmptyString(runtime); - requestPath = RubyString.newEmptyString(runtime); - queryString = RubyString.newEmptyString(runtime); - fragment = RubyString.newEmptyString(runtime); - upgradeData = RubyString.newEmptyString(runtime); - } - - IRubyObject ret = runtime.getNil(); - - if (callback_object != null) { - if (((RubyObject) callback_object).respondsTo("on_message_begin")) { - ThreadContext context = callback_object.getRuntime().getCurrentContext(); - ret = callback_object.callMethod(context, "on_message_begin"); - } - } else if (on_message_begin != null) { - ThreadContext context = on_message_begin.getRuntime().getCurrentContext(); - ret = on_message_begin.callMethod(context, "call"); - } - - if (ret == stopSym) { - throw new StopException(); - } else { - return 0; - } - } - }; - this.settings.on_message_complete = new HTTPCallback() { - public int cb(http_parser.lolevel.HTTPParser p) { - IRubyObject ret = runtime.getNil(); - - completed = true; - - if (callback_object != null) { - if (((RubyObject) callback_object).respondsTo("on_message_complete")) { - ThreadContext context = callback_object.getRuntime().getCurrentContext(); - ret = callback_object.callMethod(context, "on_message_complete"); - } - } else if (on_message_complete != null) { - ThreadContext context = on_message_complete.getRuntime().getCurrentContext(); - ret = on_message_complete.callMethod(context, "call"); - } - - if (ret == stopSym) { - throw new StopException(); - } else { - return 0; - } - } - }; - this.settings.on_headers_complete = new HTTPCallback() { - public int cb(http_parser.lolevel.HTTPParser p) { - IRubyObject ret = runtime.getNil(); - - if (callback_object != null) { - if (((RubyObject) callback_object).respondsTo("on_headers_complete")) { - ThreadContext context = callback_object.getRuntime().getCurrentContext(); - ret = callback_object.callMethod(context, "on_headers_complete", headers); - } - } else if (on_headers_complete != null) { - ThreadContext context = on_headers_complete.getRuntime().getCurrentContext(); - ret = on_headers_complete.callMethod(context, "call", headers); - } - - if (ret == stopSym) { - throw new StopException(); - } else if (ret == resetSym) { - return 1; - } else { - return 0; - } - } - }; - this.settings.on_body = new HTTPDataCallback() { - public int cb(http_parser.lolevel.HTTPParser p, ByteBuffer buf, int pos, int len) { - IRubyObject ret = runtime.getNil(); - byte[] data = fetchBytes(buf, pos, len); - - if (callback_object != null) { - if (((RubyObject) callback_object).respondsTo("on_body")) { - ThreadContext context = callback_object.getRuntime().getCurrentContext(); - ret = callback_object.callMethod(context, "on_body", - RubyString.newString(runtime, new ByteList(data, UTF8, false))); - } - } else if (on_body != null) { - ThreadContext context = on_body.getRuntime().getCurrentContext(); - ret = on_body.callMethod(context, "call", RubyString.newString(runtime, new ByteList(data, UTF8, false))); - } - - if (ret == stopSym) { - throw new StopException(); - } else { - return 0; - } - } - }; - } - - private void init() { - this.parser = new HTTPParser(); - this.parser.HTTP_PARSER_STRICT = true; - this.headers = null; - - this.requestUrl = runtime.getNil(); - this.requestPath = runtime.getNil(); - this.queryString = runtime.getNil(); - this.fragment = runtime.getNil(); - - this.upgradeData = runtime.getNil(); - } - - @JRubyMethod(name = "initialize") - public IRubyObject initialize() { - return this; - } - - @JRubyMethod(name = "initialize") - public IRubyObject initialize(IRubyObject arg) { - callback_object = arg; - return initialize(); - } - - @JRubyMethod(name = "initialize") - public IRubyObject initialize(IRubyObject arg, IRubyObject arg2) { - header_value_type = arg2; - return initialize(arg); - } - - @JRubyMethod(name = "on_message_begin=") - public IRubyObject set_on_message_begin(IRubyObject cb) { - on_message_begin = cb; - return cb; - } - - @JRubyMethod(name = "on_headers_complete=") - public IRubyObject set_on_headers_complete(IRubyObject cb) { - on_headers_complete = cb; - return cb; - } - - @JRubyMethod(name = "on_body=") - public IRubyObject set_on_body(IRubyObject cb) { - on_body = cb; - return cb; - } - - @JRubyMethod(name = "on_message_complete=") - public IRubyObject set_on_message_complete(IRubyObject cb) { - on_message_complete = cb; - return cb; - } - - @JRubyMethod(name = "<<") - public IRubyObject execute(IRubyObject data) { - RubyString str = (RubyString) data; - ByteList byteList = str.getByteList(); - ByteBuffer buf = ByteBuffer.wrap(byteList.getUnsafeBytes(), byteList.getBegin(), byteList.getRealSize()); - boolean stopped = false; - - try { - this.parser.execute(this.settings, buf); - } catch (HTTPException e) { - throw new RaiseException(runtime, eParserError, e.getMessage(), true); - } catch (StopException e) { - stopped = true; - } - - if (parser.getUpgrade()) { - byte[] upData = fetchBytes(buf, buf.position(), buf.limit() - buf.position()); - if (runtime.is1_9() || runtime.is2_0()) { - ((RubyString) upgradeData).cat(upData, 0, upData.length, UTF8); - } else { - ((RubyString) upgradeData).cat(upData); - } - } else if (buf.hasRemaining() && !completed) { - if (!stopped) - throw new RaiseException(runtime, eParserError, "Could not parse data entirely", true); - } - - return RubyNumeric.int2fix(runtime, buf.position()); - } - - @JRubyMethod(name = "keep_alive?") - public IRubyObject shouldKeepAlive() { - return runtime.newBoolean(parser.shouldKeepAlive()); - } - - @JRubyMethod(name = "upgrade?") - public IRubyObject shouldUpgrade() { - return runtime.newBoolean(parser.getUpgrade()); - } - - @JRubyMethod(name = "http_major") - public IRubyObject httpMajor() { - if (parser.getMajor() == 0 && parser.getMinor() == 0) - return runtime.getNil(); - else - return RubyNumeric.int2fix(runtime, parser.getMajor()); - } - - @JRubyMethod(name = "http_minor") - public IRubyObject httpMinor() { - if (parser.getMajor() == 0 && parser.getMinor() == 0) - return runtime.getNil(); - else - return RubyNumeric.int2fix(runtime, parser.getMinor()); - } - - @JRubyMethod(name = "http_version") - public IRubyObject httpVersion() { - if (parser.getMajor() == 0 && parser.getMinor() == 0) - return runtime.getNil(); - else - return runtime.newArray(httpMajor(), httpMinor()); - } - - @JRubyMethod(name = "http_method") - public IRubyObject httpMethod() { - HTTPMethod method = parser.getHTTPMethod(); - if (method != null) - return runtime.newString(new String(method.bytes)); - else - return runtime.getNil(); - } - - @JRubyMethod(name = "status_code") - public IRubyObject statusCode() { - int code = parser.getStatusCode(); - if (code != 0) - return RubyNumeric.int2fix(runtime, code); - else - return runtime.getNil(); - } - - @JRubyMethod(name = "headers") - public IRubyObject getHeaders() { - return headers == null ? runtime.getNil() : headers; - } - - @JRubyMethod(name = "request_url") - public IRubyObject getRequestUrl() { - return requestUrl == null ? runtime.getNil() : requestUrl; - } - - @JRubyMethod(name = "request_path") - public IRubyObject getRequestPath() { - return requestPath == null ? runtime.getNil() : requestPath; - } - - @JRubyMethod(name = "query_string") - public IRubyObject getQueryString() { - return queryString == null ? runtime.getNil() : queryString; - } - - @JRubyMethod(name = "fragment") - public IRubyObject getFragment() { - return fragment == null ? runtime.getNil() : fragment; - } - - @JRubyMethod(name = "header_value_type") - public IRubyObject getHeaderValueType() { - return header_value_type == null ? runtime.getNil() : header_value_type; - } - - @JRubyMethod(name = "header_value_type=") - public IRubyObject set_header_value_type(IRubyObject val) { - String valString = val.toString(); - if (valString != "mixed" && valString != "arrays" && valString != "strings") { - throw runtime.newArgumentError("Invalid header value type"); - } - header_value_type = val; - return val; - } - - @JRubyMethod(name = "upgrade_data") - public IRubyObject upgradeData() { - return upgradeData == null ? runtime.getNil() : upgradeData; - } - - @JRubyMethod(name = "reset!") - public IRubyObject reset() { - init(); - return runtime.getTrue(); - } - -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/ruby_http_parser.c b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/ruby_http_parser.c deleted file mode 100644 index 5650652..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/ruby_http_parser.c +++ /dev/null @@ -1,515 +0,0 @@ -#include "ruby.h" -#include "ext_help.h" -#include "ryah_http_parser.h" - -#define GET_WRAPPER(N, from) ParserWrapper *N = (ParserWrapper *)(from)->data; -#define HASH_CAT(h, k, ptr, len) \ - do { \ - VALUE __v = rb_hash_aref(h, k); \ - if (__v != Qnil) { \ - rb_str_cat(__v, ptr, len); \ - } else { \ - rb_hash_aset(h, k, rb_str_new(ptr, len)); \ - } \ - } while(0) - -typedef struct ParserWrapper { - ryah_http_parser parser; - - VALUE request_url; - - VALUE headers; - - VALUE upgrade_data; - - VALUE on_message_begin; - VALUE on_headers_complete; - VALUE on_body; - VALUE on_message_complete; - - VALUE callback_object; - VALUE stopped; - VALUE completed; - - VALUE header_value_type; - - VALUE last_field_name; - VALUE curr_field_name; - - enum ryah_http_parser_type type; -} ParserWrapper; - -void ParserWrapper_init(ParserWrapper *wrapper) { - ryah_http_parser_init(&wrapper->parser, wrapper->type); - wrapper->parser.status_code = 0; - wrapper->parser.http_major = 0; - wrapper->parser.http_minor = 0; - - wrapper->request_url = Qnil; - - wrapper->upgrade_data = Qnil; - - wrapper->headers = Qnil; - wrapper->completed = Qfalse; - - wrapper->last_field_name = Qnil; - wrapper->curr_field_name = Qnil; -} - -void ParserWrapper_mark(void *data) { - if(data) { - ParserWrapper *wrapper = (ParserWrapper *) data; - rb_gc_mark_maybe(wrapper->request_url); - rb_gc_mark_maybe(wrapper->upgrade_data); - rb_gc_mark_maybe(wrapper->headers); - rb_gc_mark_maybe(wrapper->on_message_begin); - rb_gc_mark_maybe(wrapper->on_headers_complete); - rb_gc_mark_maybe(wrapper->on_body); - rb_gc_mark_maybe(wrapper->on_message_complete); - rb_gc_mark_maybe(wrapper->callback_object); - rb_gc_mark_maybe(wrapper->last_field_name); - rb_gc_mark_maybe(wrapper->curr_field_name); - } -} - -void ParserWrapper_free(void *data) { - if(data) { - free(data); - } -} - -static VALUE cParser; -static VALUE cRequestParser; -static VALUE cResponseParser; - -static VALUE eParserError; - -static ID Icall; -static ID Ion_message_begin; -static ID Ion_headers_complete; -static ID Ion_body; -static ID Ion_message_complete; - -static VALUE Sstop; -static VALUE Sreset; -static VALUE Sarrays; -static VALUE Sstrings; -static VALUE Smixed; - -/** Callbacks **/ - -int on_message_begin(ryah_http_parser *parser) { - GET_WRAPPER(wrapper, parser); - - wrapper->request_url = rb_str_new2(""); - wrapper->headers = rb_hash_new(); - wrapper->upgrade_data = rb_str_new2(""); - - VALUE ret = Qnil; - - if (wrapper->callback_object != Qnil && rb_respond_to(wrapper->callback_object, Ion_message_begin)) { - ret = rb_funcall(wrapper->callback_object, Ion_message_begin, 0); - } else if (wrapper->on_message_begin != Qnil) { - ret = rb_funcall(wrapper->on_message_begin, Icall, 0); - } - - if (ret == Sstop) { - wrapper->stopped = Qtrue; - return -1; - } else { - return 0; - } -} - -int on_url(ryah_http_parser *parser, const char *at, size_t length) { - GET_WRAPPER(wrapper, parser); - rb_str_cat(wrapper->request_url, at, length); - return 0; -} - -int on_header_field(ryah_http_parser *parser, const char *at, size_t length) { - GET_WRAPPER(wrapper, parser); - - if (wrapper->curr_field_name == Qnil) { - wrapper->last_field_name = Qnil; - wrapper->curr_field_name = rb_str_new(at, length); - } else { - rb_str_cat(wrapper->curr_field_name, at, length); - } - - return 0; -} - -int on_header_value(ryah_http_parser *parser, const char *at, size_t length) { - GET_WRAPPER(wrapper, parser); - - int new_field = 0; - VALUE current_value; - - if (wrapper->last_field_name == Qnil) { - new_field = 1; - wrapper->last_field_name = wrapper->curr_field_name; - wrapper->curr_field_name = Qnil; - } - - current_value = rb_hash_aref(wrapper->headers, wrapper->last_field_name); - - if (new_field == 1) { - if (current_value == Qnil) { - if (wrapper->header_value_type == Sarrays) { - rb_hash_aset(wrapper->headers, wrapper->last_field_name, rb_ary_new3(1, rb_str_new2(""))); - } else { - rb_hash_aset(wrapper->headers, wrapper->last_field_name, rb_str_new2("")); - } - } else { - if (wrapper->header_value_type == Smixed) { - if (TYPE(current_value) == T_STRING) { - rb_hash_aset(wrapper->headers, wrapper->last_field_name, rb_ary_new3(2, current_value, rb_str_new2(""))); - } else { - rb_ary_push(current_value, rb_str_new2("")); - } - } else if (wrapper->header_value_type == Sarrays) { - rb_ary_push(current_value, rb_str_new2("")); - } else { - rb_str_cat(current_value, ", ", 2); - } - } - current_value = rb_hash_aref(wrapper->headers, wrapper->last_field_name); - } - - if (TYPE(current_value) == T_ARRAY) { - current_value = rb_ary_entry(current_value, -1); - } - - rb_str_cat(current_value, at, length); - - return 0; -} - -int on_headers_complete(ryah_http_parser *parser) { - GET_WRAPPER(wrapper, parser); - - VALUE ret = Qnil; - - if (wrapper->callback_object != Qnil && rb_respond_to(wrapper->callback_object, Ion_headers_complete)) { - ret = rb_funcall(wrapper->callback_object, Ion_headers_complete, 1, wrapper->headers); - } else if (wrapper->on_headers_complete != Qnil) { - ret = rb_funcall(wrapper->on_headers_complete, Icall, 1, wrapper->headers); - } - - if (ret == Sstop) { - wrapper->stopped = Qtrue; - return -1; - } else if (ret == Sreset){ - return 1; - } else { - return 0; - } -} - -int on_body(ryah_http_parser *parser, const char *at, size_t length) { - GET_WRAPPER(wrapper, parser); - - VALUE ret = Qnil; - - if (wrapper->callback_object != Qnil && rb_respond_to(wrapper->callback_object, Ion_body)) { - ret = rb_funcall(wrapper->callback_object, Ion_body, 1, rb_str_new(at, length)); - } else if (wrapper->on_body != Qnil) { - ret = rb_funcall(wrapper->on_body, Icall, 1, rb_str_new(at, length)); - } - - if (ret == Sstop) { - wrapper->stopped = Qtrue; - return -1; - } else { - return 0; - } -} - -int on_message_complete(ryah_http_parser *parser) { - GET_WRAPPER(wrapper, parser); - - VALUE ret = Qnil; - wrapper->completed = Qtrue; - - if (wrapper->callback_object != Qnil && rb_respond_to(wrapper->callback_object, Ion_message_complete)) { - ret = rb_funcall(wrapper->callback_object, Ion_message_complete, 0); - } else if (wrapper->on_message_complete != Qnil) { - ret = rb_funcall(wrapper->on_message_complete, Icall, 0); - } - - if (ret == Sstop) { - wrapper->stopped = Qtrue; - return -1; - } else { - return 0; - } -} - -static ryah_http_parser_settings settings = { - .on_message_begin = on_message_begin, - .on_url = on_url, - .on_header_field = on_header_field, - .on_header_value = on_header_value, - .on_headers_complete = on_headers_complete, - .on_body = on_body, - .on_message_complete = on_message_complete -}; - -VALUE Parser_alloc_by_type(VALUE klass, enum ryah_http_parser_type type) { - ParserWrapper *wrapper = ALLOC_N(ParserWrapper, 1); - wrapper->type = type; - wrapper->parser.data = wrapper; - - wrapper->on_message_begin = Qnil; - wrapper->on_headers_complete = Qnil; - wrapper->on_body = Qnil; - wrapper->on_message_complete = Qnil; - - wrapper->callback_object = Qnil; - - ParserWrapper_init(wrapper); - - return Data_Wrap_Struct(klass, ParserWrapper_mark, ParserWrapper_free, wrapper); -} - -VALUE Parser_alloc(VALUE klass) { - return Parser_alloc_by_type(klass, HTTP_BOTH); -} - -VALUE RequestParser_alloc(VALUE klass) { - return Parser_alloc_by_type(klass, HTTP_REQUEST); -} - -VALUE ResponseParser_alloc(VALUE klass) { - return Parser_alloc_by_type(klass, HTTP_RESPONSE); -} - -VALUE Parser_strict_p(VALUE klass) { - return HTTP_PARSER_STRICT == 1 ? Qtrue : Qfalse; -} - -VALUE Parser_initialize(int argc, VALUE *argv, VALUE self) { - ParserWrapper *wrapper = NULL; - DATA_GET(self, ParserWrapper, wrapper); - - wrapper->header_value_type = rb_iv_get(CLASS_OF(self), "@default_header_value_type"); - - if (argc == 1) { - wrapper->callback_object = argv[0]; - } - - if (argc == 2) { - wrapper->callback_object = argv[0]; - wrapper->header_value_type = argv[1]; - } - - return self; -} - -VALUE Parser_execute(VALUE self, VALUE data) { - ParserWrapper *wrapper = NULL; - - Check_Type(data, T_STRING); - char *ptr = RSTRING_PTR(data); - long len = RSTRING_LEN(data); - - DATA_GET(self, ParserWrapper, wrapper); - - wrapper->stopped = Qfalse; - size_t nparsed = ryah_http_parser_execute(&wrapper->parser, &settings, ptr, len); - - if (wrapper->parser.upgrade) { - if (RTEST(wrapper->stopped)) - nparsed += 1; - - rb_str_cat(wrapper->upgrade_data, ptr + nparsed, len - nparsed); - - } else if (nparsed != (size_t)len) { - if (!RTEST(wrapper->stopped) && !RTEST(wrapper->completed)) - rb_raise(eParserError, "Could not parse data entirely (%zu != %zu)", nparsed, len); - else - nparsed += 1; // error states fail on the current character - } - - return INT2FIX(nparsed); -} - -VALUE Parser_set_on_message_begin(VALUE self, VALUE callback) { - ParserWrapper *wrapper = NULL; - DATA_GET(self, ParserWrapper, wrapper); - - wrapper->on_message_begin = callback; - return callback; -} - -VALUE Parser_set_on_headers_complete(VALUE self, VALUE callback) { - ParserWrapper *wrapper = NULL; - DATA_GET(self, ParserWrapper, wrapper); - - wrapper->on_headers_complete = callback; - return callback; -} - -VALUE Parser_set_on_body(VALUE self, VALUE callback) { - ParserWrapper *wrapper = NULL; - DATA_GET(self, ParserWrapper, wrapper); - - wrapper->on_body = callback; - return callback; -} - -VALUE Parser_set_on_message_complete(VALUE self, VALUE callback) { - ParserWrapper *wrapper = NULL; - DATA_GET(self, ParserWrapper, wrapper); - - wrapper->on_message_complete = callback; - return callback; -} - -VALUE Parser_keep_alive_p(VALUE self) { - ParserWrapper *wrapper = NULL; - DATA_GET(self, ParserWrapper, wrapper); - - return http_should_keep_alive(&wrapper->parser) == 1 ? Qtrue : Qfalse; -} - -VALUE Parser_upgrade_p(VALUE self) { - ParserWrapper *wrapper = NULL; - DATA_GET(self, ParserWrapper, wrapper); - - return wrapper->parser.upgrade ? Qtrue : Qfalse; -} - -VALUE Parser_http_version(VALUE self) { - ParserWrapper *wrapper = NULL; - DATA_GET(self, ParserWrapper, wrapper); - - if (wrapper->parser.http_major == 0 && wrapper->parser.http_minor == 0) - return Qnil; - else - return rb_ary_new3(2, INT2FIX(wrapper->parser.http_major), INT2FIX(wrapper->parser.http_minor)); -} - -VALUE Parser_http_major(VALUE self) { - ParserWrapper *wrapper = NULL; - DATA_GET(self, ParserWrapper, wrapper); - - if (wrapper->parser.http_major == 0 && wrapper->parser.http_minor == 0) - return Qnil; - else - return INT2FIX(wrapper->parser.http_major); -} - -VALUE Parser_http_minor(VALUE self) { - ParserWrapper *wrapper = NULL; - DATA_GET(self, ParserWrapper, wrapper); - - if (wrapper->parser.http_major == 0 && wrapper->parser.http_minor == 0) - return Qnil; - else - return INT2FIX(wrapper->parser.http_minor); -} - -VALUE Parser_http_method(VALUE self) { - ParserWrapper *wrapper = NULL; - DATA_GET(self, ParserWrapper, wrapper); - - if (wrapper->parser.type == HTTP_REQUEST) - return rb_str_new2(http_method_str(wrapper->parser.method)); - else - return Qnil; -} - -VALUE Parser_status_code(VALUE self) { - ParserWrapper *wrapper = NULL; - DATA_GET(self, ParserWrapper, wrapper); - - if (wrapper->parser.status_code) - return INT2FIX(wrapper->parser.status_code); - else - return Qnil; -} - -#define DEFINE_GETTER(name) \ - VALUE Parser_##name(VALUE self) { \ - ParserWrapper *wrapper = NULL; \ - DATA_GET(self, ParserWrapper, wrapper); \ - return wrapper->name; \ - } - -DEFINE_GETTER(request_url); -DEFINE_GETTER(headers); -DEFINE_GETTER(upgrade_data); -DEFINE_GETTER(header_value_type); - -VALUE Parser_set_header_value_type(VALUE self, VALUE val) { - if (val != Sarrays && val != Sstrings && val != Smixed) { - rb_raise(rb_eArgError, "Invalid header value type"); - } - - ParserWrapper *wrapper = NULL; - DATA_GET(self, ParserWrapper, wrapper); - wrapper->header_value_type = val; - return wrapper->header_value_type; -} - -VALUE Parser_reset(VALUE self) { - ParserWrapper *wrapper = NULL; - DATA_GET(self, ParserWrapper, wrapper); - - ParserWrapper_init(wrapper); - - return Qtrue; -} - -void Init_ruby_http_parser() { - VALUE mHTTP = rb_define_module("HTTP"); - cParser = rb_define_class_under(mHTTP, "Parser", rb_cObject); - cRequestParser = rb_define_class_under(mHTTP, "RequestParser", cParser); - cResponseParser = rb_define_class_under(mHTTP, "ResponseParser", cParser); - - eParserError = rb_define_class_under(cParser, "Error", rb_eIOError); - Icall = rb_intern("call"); - Ion_message_begin = rb_intern("on_message_begin"); - Ion_headers_complete = rb_intern("on_headers_complete"); - Ion_body = rb_intern("on_body"); - Ion_message_complete = rb_intern("on_message_complete"); - Sstop = ID2SYM(rb_intern("stop")); - Sreset = ID2SYM(rb_intern("reset")); - - Sarrays = ID2SYM(rb_intern("arrays")); - Sstrings = ID2SYM(rb_intern("strings")); - Smixed = ID2SYM(rb_intern("mixed")); - - rb_define_alloc_func(cParser, Parser_alloc); - rb_define_alloc_func(cRequestParser, RequestParser_alloc); - rb_define_alloc_func(cResponseParser, ResponseParser_alloc); - - rb_define_singleton_method(cParser, "strict?", Parser_strict_p, 0); - rb_define_method(cParser, "initialize", Parser_initialize, -1); - - rb_define_method(cParser, "on_message_begin=", Parser_set_on_message_begin, 1); - rb_define_method(cParser, "on_headers_complete=", Parser_set_on_headers_complete, 1); - rb_define_method(cParser, "on_body=", Parser_set_on_body, 1); - rb_define_method(cParser, "on_message_complete=", Parser_set_on_message_complete, 1); - rb_define_method(cParser, "<<", Parser_execute, 1); - - rb_define_method(cParser, "keep_alive?", Parser_keep_alive_p, 0); - rb_define_method(cParser, "upgrade?", Parser_upgrade_p, 0); - - rb_define_method(cParser, "http_version", Parser_http_version, 0); - rb_define_method(cParser, "http_major", Parser_http_major, 0); - rb_define_method(cParser, "http_minor", Parser_http_minor, 0); - - rb_define_method(cParser, "http_method", Parser_http_method, 0); - rb_define_method(cParser, "status_code", Parser_status_code, 0); - - rb_define_method(cParser, "request_url", Parser_request_url, 0); - rb_define_method(cParser, "headers", Parser_headers, 0); - rb_define_method(cParser, "upgrade_data", Parser_upgrade_data, 0); - rb_define_method(cParser, "header_value_type", Parser_header_value_type, 0); - rb_define_method(cParser, "header_value_type=", Parser_set_header_value_type, 1); - - rb_define_method(cParser, "reset!", Parser_reset, 0); -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/.gitkeep b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/AUTHORS b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/AUTHORS deleted file mode 100644 index abe99de..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/AUTHORS +++ /dev/null @@ -1,32 +0,0 @@ -# Authors ordered by first contribution. -Ryan Dahl -Jeremy Hinegardner -Sergey Shepelev -Joe Damato -tomika -Phoenix Sol -Cliff Frey -Ewen Cheslack-Postava -Santiago Gala -Tim Becker -Jeff Terrace -Ben Noordhuis -Nathan Rajlich -Mark Nottingham -Aman Gupta -Tim Becker -Sean Cunningham -Peter Griess -Salman Haq -Cliff Frey -Jon Kolb -Fouad Mardini -Paul Querna -Felix Geisendörfer -koichik -Andre Caron -Ivo Raisr -James McLaughlin -David Gwynne -LE ROUX Thomas -Randy Rizun diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/LICENSE-MIT b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/LICENSE-MIT deleted file mode 100644 index a0ae8dc..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/LICENSE-MIT +++ /dev/null @@ -1,48 +0,0 @@ -Copyright 2010 Tim Becker - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. - ---- END OF LICENSE - -This code mainly based on code with the following license: - - -http_parser.c is based on src/http/ngx_http_parse.c from NGINX copyright -Igor Sysoev. - -Additional changes are licensed under the same terms as NGINX and -copyright Joyent, Inc. and other Node contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/README.md b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/README.md deleted file mode 100644 index 0a6a432..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/README.md +++ /dev/null @@ -1,183 +0,0 @@ -HTTP Parser -=========== - -This is a parser for HTTP written in Java, based quite heavily on -the Ryan Dahl's C Version: `http-parser` available here: - - http://github.com/ry/http-parser - -It parses both requests and responses. The parser is designed to be used -in performance HTTP applications. - -Features: - - * No dependencies (probably won't be able to keep it up) - * Handles persistent streams (keep-alive). - * Decodes chunked encoding. - * Upgrade support - -The parser extracts the following information from HTTP messages: - - * Header fields and values - * Content-Length - * Request method - * Response status code - * Transfer-Encoding - * HTTP version - * Request URL - * Message body - -Building --------- - -use `ant compile|test|jar` - -Usage ------ - - TODO: in the present form, usage of the Java version of the parser - shouldn't be too difficult to figure out for someone familiar with the - C version. - - More documentation will follow shortly, in case you're looking for an - easy to use http library, this lib is probably not what you are - looking for anyway ... - - All text after this paragraph (and most of the text above it) are from - the original C version of the README and are currently only here for - reference. In case you encounter any difficulties, find bugs, need - help or have suggestions, feel free to contact me at - (tim.becker@kuriositaet.de). - - -One `http_parser` object is used per TCP connection. Initialize the struct -using `http_parser_init()` and set the callbacks. That might look something -like this for a request parser: - - http_parser_settings settings; - settings.on_path = my_path_callback; - settings.on_header_field = my_header_field_callback; - /* ... */ - - http_parser *parser = malloc(sizeof(http_parser)); - http_parser_init(parser, HTTP_REQUEST); - parser->data = my_socket; - -When data is received on the socket execute the parser and check for errors. - - size_t len = 80*1024, nparsed; - char buf[len]; - ssize_t recved; - - recved = recv(fd, buf, len, 0); - - if (recved < 0) { - /* Handle error. */ - } - - /* Start up / continue the parser. - * Note we pass recved==0 to signal that EOF has been recieved. - */ - nparsed = http_parser_execute(parser, &settings, buf, recved); - - if (parser->upgrade) { - /* handle new protocol */ - } else if (nparsed != recved) { - /* Handle error. Usually just close the connection. */ - } - -HTTP needs to know where the end of the stream is. For example, sometimes -servers send responses without Content-Length and expect the client to -consume input (for the body) until EOF. To tell http_parser about EOF, give -`0` as the forth parameter to `http_parser_execute()`. Callbacks and errors -can still be encountered during an EOF, so one must still be prepared -to receive them. - -Scalar valued message information such as `status_code`, `method`, and the -HTTP version are stored in the parser structure. This data is only -temporally stored in `http_parser` and gets reset on each new message. If -this information is needed later, copy it out of the structure during the -`headers_complete` callback. - -The parser decodes the transfer-encoding for both requests and responses -transparently. That is, a chunked encoding is decoded before being sent to -the on_body callback. - - -The Special Problem of Upgrade ------------------------------- - -HTTP supports upgrading the connection to a different protocol. An -increasingly common example of this is the Web Socket protocol which sends -a request like - - GET /demo HTTP/1.1 - Upgrade: WebSocket - Connection: Upgrade - Host: example.com - Origin: http://example.com - WebSocket-Protocol: sample - -followed by non-HTTP data. - -(See http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75 for more -information the Web Socket protocol.) - -To support this, the parser will treat this as a normal HTTP message without a -body. Issuing both on_headers_complete and on_message_complete callbacks. However -http_parser_execute() will stop parsing at the end of the headers and return. - -The user is expected to check if `parser->upgrade` has been set to 1 after -`http_parser_execute()` returns. Non-HTTP data begins at the buffer supplied -offset by the return value of `http_parser_execute()`. - - -Callbacks ---------- - -During the `http_parser_execute()` call, the callbacks set in -`http_parser_settings` will be executed. The parser maintains state and -never looks behind, so buffering the data is not necessary. If you need to -save certain data for later usage, you can do that from the callbacks. - -There are two types of callbacks: - -* notification `typedef int (*http_cb) (http_parser*);` - Callbacks: on_message_begin, on_headers_complete, on_message_complete. -* data `typedef int (*http_data_cb) (http_parser*, const char *at, size_t length);` - Callbacks: (requests only) on_uri, - (common) on_header_field, on_header_value, on_body; - -Callbacks must return 0 on success. Returning a non-zero value indicates -error to the parser, making it exit immediately. - -In case you parse HTTP message in chunks (i.e. `read()` request line -from socket, parse, read half headers, parse, etc) your data callbacks -may be called more than once. Http-parser guarantees that data pointer is only -valid for the lifetime of callback. You can also `read()` into a heap allocated -buffer to avoid copying memory around if this fits your application. - -Reading headers may be a tricky task if you read/parse headers partially. -Basically, you need to remember whether last header callback was field or value -and apply following logic: - - (on_header_field and on_header_value shortened to on_h_*) - ------------------------ ------------ -------------------------------------------- - | State (prev. callback) | Callback | Description/action | - ------------------------ ------------ -------------------------------------------- - | nothing (first call) | on_h_field | Allocate new buffer and copy callback data | - | | | into it | - ------------------------ ------------ -------------------------------------------- - | value | on_h_field | New header started. | - | | | Copy current name,value buffers to headers | - | | | list and allocate new buffer for new name | - ------------------------ ------------ -------------------------------------------- - | field | on_h_field | Previous name continues. Reallocate name | - | | | buffer and append callback data to it | - ------------------------ ------------ -------------------------------------------- - | field | on_h_value | Value for current header started. Allocate | - | | | new buffer and copy callback data to it | - ------------------------ ------------ -------------------------------------------- - | value | on_h_value | Value continues. Reallocate value buffer | - | | | and append callback data to it | - ------------------------ ------------ -------------------------------------------- diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/TODO b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/TODO deleted file mode 100644 index eb46a08..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/TODO +++ /dev/null @@ -1,28 +0,0 @@ -decide how to handle errs per default: - - ry: "set state to dead", return `read` - - current: call on_error w/ details, if no on_error handler set, - throw Exception, else call on_error and behave like orig... - -some tests from test.c left to port - (scan ...) -documentation - -hi level callback interface -eventloop -state() as a function (?) - - perhaps, the idea being to be able to log/debug better... -more tests - - in particular, port available c tests -impl bits of servlet api. - -DONE - -Sun Jul 18 12:19:18 CEST 2010 - -error handling - - consider callback based error handling and the current highlevel - "nice" logging moved to high level http impl. - - use Exceptions "ProtocolException"? - -better testing - - no junit to avoid dependencies diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/build.xml b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/build.xml deleted file mode 100755 index d2c6af4..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/build.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/http_parser.c b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/http_parser.c deleted file mode 100644 index e961ae8..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/http_parser.c +++ /dev/null @@ -1,2175 +0,0 @@ -/* Based on src/http/ngx_http_parse.c from NGINX copyright Igor Sysoev - * - * Additional changes are licensed under the same terms as NGINX and - * copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ -#include "http_parser.h" -#include -#include -#include -#include -#include -#include - -#ifndef ULLONG_MAX -# define ULLONG_MAX ((uint64_t) -1) /* 2^64-1 */ -#endif - -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - -#ifndef ARRAY_SIZE -# define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) -#endif - -#ifndef BIT_AT -# define BIT_AT(a, i) \ - (!!((unsigned int) (a)[(unsigned int) (i) >> 3] & \ - (1 << ((unsigned int) (i) & 7)))) -#endif - -#ifndef ELEM_AT -# define ELEM_AT(a, i, v) ((unsigned int) (i) < ARRAY_SIZE(a) ? (a)[(i)] : (v)) -#endif - -#define SET_ERRNO(e) \ -do { \ - parser->http_errno = (e); \ -} while(0) - - -/* Run the notify callback FOR, returning ER if it fails */ -#define CALLBACK_NOTIFY_(FOR, ER) \ -do { \ - assert(HTTP_PARSER_ERRNO(parser) == HPE_OK); \ - \ - if (settings->on_##FOR) { \ - if (0 != settings->on_##FOR(parser)) { \ - SET_ERRNO(HPE_CB_##FOR); \ - } \ - \ - /* We either errored above or got paused; get out */ \ - if (HTTP_PARSER_ERRNO(parser) != HPE_OK) { \ - return (ER); \ - } \ - } \ -} while (0) - -/* Run the notify callback FOR and consume the current byte */ -#define CALLBACK_NOTIFY(FOR) CALLBACK_NOTIFY_(FOR, p - data + 1) - -/* Run the notify callback FOR and don't consume the current byte */ -#define CALLBACK_NOTIFY_NOADVANCE(FOR) CALLBACK_NOTIFY_(FOR, p - data) - -/* Run data callback FOR with LEN bytes, returning ER if it fails */ -#define CALLBACK_DATA_(FOR, LEN, ER) \ -do { \ - assert(HTTP_PARSER_ERRNO(parser) == HPE_OK); \ - \ - if (FOR##_mark) { \ - if (settings->on_##FOR) { \ - if (0 != settings->on_##FOR(parser, FOR##_mark, (LEN))) { \ - SET_ERRNO(HPE_CB_##FOR); \ - } \ - \ - /* We either errored above or got paused; get out */ \ - if (HTTP_PARSER_ERRNO(parser) != HPE_OK) { \ - return (ER); \ - } \ - } \ - FOR##_mark = NULL; \ - } \ -} while (0) - -/* Run the data callback FOR and consume the current byte */ -#define CALLBACK_DATA(FOR) \ - CALLBACK_DATA_(FOR, p - FOR##_mark, p - data + 1) - -/* Run the data callback FOR and don't consume the current byte */ -#define CALLBACK_DATA_NOADVANCE(FOR) \ - CALLBACK_DATA_(FOR, p - FOR##_mark, p - data) - -/* Set the mark FOR; non-destructive if mark is already set */ -#define MARK(FOR) \ -do { \ - if (!FOR##_mark) { \ - FOR##_mark = p; \ - } \ -} while (0) - - -#define PROXY_CONNECTION "proxy-connection" -#define CONNECTION "connection" -#define CONTENT_LENGTH "content-length" -#define TRANSFER_ENCODING "transfer-encoding" -#define UPGRADE "upgrade" -#define CHUNKED "chunked" -#define KEEP_ALIVE "keep-alive" -#define CLOSE "close" - - -static const char *method_strings[] = - { -#define XX(num, name, string) #string, - HTTP_METHOD_MAP(XX) -#undef XX - }; - - -/* Tokens as defined by rfc 2616. Also lowercases them. - * token = 1* - * separators = "(" | ")" | "<" | ">" | "@" - * | "," | ";" | ":" | "\" | <"> - * | "/" | "[" | "]" | "?" | "=" - * | "{" | "}" | SP | HT - */ -static const char tokens[256] = { -/* 0 nul 1 soh 2 stx 3 etx 4 eot 5 enq 6 ack 7 bel */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 8 bs 9 ht 10 nl 11 vt 12 np 13 cr 14 so 15 si */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 16 dle 17 dc1 18 dc2 19 dc3 20 dc4 21 nak 22 syn 23 etb */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 24 can 25 em 26 sub 27 esc 28 fs 29 gs 30 rs 31 us */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 32 sp 33 ! 34 " 35 # 36 $ 37 % 38 & 39 ' */ - 0, '!', 0, '#', '$', '%', '&', '\'', -/* 40 ( 41 ) 42 * 43 + 44 , 45 - 46 . 47 / */ - 0, 0, '*', '+', 0, '-', '.', 0, -/* 48 0 49 1 50 2 51 3 52 4 53 5 54 6 55 7 */ - '0', '1', '2', '3', '4', '5', '6', '7', -/* 56 8 57 9 58 : 59 ; 60 < 61 = 62 > 63 ? */ - '8', '9', 0, 0, 0, 0, 0, 0, -/* 64 @ 65 A 66 B 67 C 68 D 69 E 70 F 71 G */ - 0, 'a', 'b', 'c', 'd', 'e', 'f', 'g', -/* 72 H 73 I 74 J 75 K 76 L 77 M 78 N 79 O */ - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', -/* 80 P 81 Q 82 R 83 S 84 T 85 U 86 V 87 W */ - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', -/* 88 X 89 Y 90 Z 91 [ 92 \ 93 ] 94 ^ 95 _ */ - 'x', 'y', 'z', 0, 0, 0, '^', '_', -/* 96 ` 97 a 98 b 99 c 100 d 101 e 102 f 103 g */ - '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', -/* 104 h 105 i 106 j 107 k 108 l 109 m 110 n 111 o */ - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', -/* 112 p 113 q 114 r 115 s 116 t 117 u 118 v 119 w */ - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', -/* 120 x 121 y 122 z 123 { 124 | 125 } 126 ~ 127 del */ - 'x', 'y', 'z', 0, '|', 0, '~', 0 }; - - -static const int8_t unhex[256] = - {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - , 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1 - ,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - }; - - -#if HTTP_PARSER_STRICT -# define T(v) 0 -#else -# define T(v) v -#endif - - -static const uint8_t normal_url_char[32] = { -/* 0 nul 1 soh 2 stx 3 etx 4 eot 5 enq 6 ack 7 bel */ - 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0, -/* 8 bs 9 ht 10 nl 11 vt 12 np 13 cr 14 so 15 si */ - 0 | T(2) | 0 | 0 | T(16) | 0 | 0 | 0, -/* 16 dle 17 dc1 18 dc2 19 dc3 20 dc4 21 nak 22 syn 23 etb */ - 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0, -/* 24 can 25 em 26 sub 27 esc 28 fs 29 gs 30 rs 31 us */ - 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0, -/* 32 sp 33 ! 34 " 35 # 36 $ 37 % 38 & 39 ' */ - 0 | 2 | 4 | 0 | 16 | 32 | 64 | 128, -/* 40 ( 41 ) 42 * 43 + 44 , 45 - 46 . 47 / */ - 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128, -/* 48 0 49 1 50 2 51 3 52 4 53 5 54 6 55 7 */ - 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128, -/* 56 8 57 9 58 : 59 ; 60 < 61 = 62 > 63 ? */ - 1 | 2 | 4 | 8 | 16 | 32 | 64 | 0, -/* 64 @ 65 A 66 B 67 C 68 D 69 E 70 F 71 G */ - 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128, -/* 72 H 73 I 74 J 75 K 76 L 77 M 78 N 79 O */ - 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128, -/* 80 P 81 Q 82 R 83 S 84 T 85 U 86 V 87 W */ - 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128, -/* 88 X 89 Y 90 Z 91 [ 92 \ 93 ] 94 ^ 95 _ */ - 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128, -/* 96 ` 97 a 98 b 99 c 100 d 101 e 102 f 103 g */ - 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128, -/* 104 h 105 i 106 j 107 k 108 l 109 m 110 n 111 o */ - 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128, -/* 112 p 113 q 114 r 115 s 116 t 117 u 118 v 119 w */ - 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128, -/* 120 x 121 y 122 z 123 { 124 | 125 } 126 ~ 127 del */ - 1 | 2 | 4 | 8 | 16 | 32 | 64 | 0, }; - -#undef T - -enum state - { s_dead = 1 /* important that this is > 0 */ - - , s_start_req_or_res - , s_res_or_resp_H - , s_start_res - , s_res_H - , s_res_HT - , s_res_HTT - , s_res_HTTP - , s_res_first_http_major - , s_res_http_major - , s_res_first_http_minor - , s_res_http_minor - , s_res_first_status_code - , s_res_status_code - , s_res_status - , s_res_line_almost_done - - , s_start_req - - , s_req_method - , s_req_spaces_before_url - , s_req_schema - , s_req_schema_slash - , s_req_schema_slash_slash - , s_req_server_start - , s_req_server - , s_req_server_with_at - , s_req_path - , s_req_query_string_start - , s_req_query_string - , s_req_fragment_start - , s_req_fragment - , s_req_http_start - , s_req_http_H - , s_req_http_HT - , s_req_http_HTT - , s_req_http_HTTP - , s_req_first_http_major - , s_req_http_major - , s_req_first_http_minor - , s_req_http_minor - , s_req_line_almost_done - - , s_header_field_start - , s_header_field - , s_header_value_start - , s_header_value - , s_header_value_lws - - , s_header_almost_done - - , s_chunk_size_start - , s_chunk_size - , s_chunk_parameters - , s_chunk_size_almost_done - - , s_headers_almost_done - , s_headers_done - - /* Important: 's_headers_done' must be the last 'header' state. All - * states beyond this must be 'body' states. It is used for overflow - * checking. See the PARSING_HEADER() macro. - */ - - , s_chunk_data - , s_chunk_data_almost_done - , s_chunk_data_done - - , s_body_identity - , s_body_identity_eof - - , s_message_done - }; - - -#define PARSING_HEADER(state) (state <= s_headers_done) - - -enum header_states - { h_general = 0 - , h_C - , h_CO - , h_CON - - , h_matching_connection - , h_matching_proxy_connection - , h_matching_content_length - , h_matching_transfer_encoding - , h_matching_upgrade - - , h_connection - , h_content_length - , h_transfer_encoding - , h_upgrade - - , h_matching_transfer_encoding_chunked - , h_matching_connection_keep_alive - , h_matching_connection_close - - , h_transfer_encoding_chunked - , h_connection_keep_alive - , h_connection_close - }; - -enum http_host_state - { - s_http_host_dead = 1 - , s_http_userinfo_start - , s_http_userinfo - , s_http_host_start - , s_http_host_v6_start - , s_http_host - , s_http_host_v6 - , s_http_host_v6_end - , s_http_host_port_start - , s_http_host_port -}; - -/* Macros for character classes; depends on strict-mode */ -#define CR '\r' -#define LF '\n' -#define LOWER(c) (unsigned char)(c | 0x20) -#define IS_ALPHA(c) (LOWER(c) >= 'a' && LOWER(c) <= 'z') -#define IS_NUM(c) ((c) >= '0' && (c) <= '9') -#define IS_ALPHANUM(c) (IS_ALPHA(c) || IS_NUM(c)) -#define IS_HEX(c) (IS_NUM(c) || (LOWER(c) >= 'a' && LOWER(c) <= 'f')) -#define IS_MARK(c) ((c) == '-' || (c) == '_' || (c) == '.' || \ - (c) == '!' || (c) == '~' || (c) == '*' || (c) == '\'' || (c) == '(' || \ - (c) == ')') -#define IS_USERINFO_CHAR(c) (IS_ALPHANUM(c) || IS_MARK(c) || (c) == '%' || \ - (c) == ';' || (c) == ':' || (c) == '&' || (c) == '=' || (c) == '+' || \ - (c) == '$' || (c) == ',') - -#if HTTP_PARSER_STRICT -#define TOKEN(c) (tokens[(unsigned char)c]) -#define IS_URL_CHAR(c) (BIT_AT(normal_url_char, (unsigned char)c)) -#define IS_HOST_CHAR(c) (IS_ALPHANUM(c) || (c) == '.' || (c) == '-') -#else -#define TOKEN(c) ((c == ' ') ? ' ' : tokens[(unsigned char)c]) -#define IS_URL_CHAR(c) \ - (BIT_AT(normal_url_char, (unsigned char)c) || ((c) & 0x80)) -#define IS_HOST_CHAR(c) \ - (IS_ALPHANUM(c) || (c) == '.' || (c) == '-' || (c) == '_') -#endif - - -#define start_state (parser->type == HTTP_REQUEST ? s_start_req : s_start_res) - - -#if HTTP_PARSER_STRICT -# define STRICT_CHECK(cond) \ -do { \ - if (cond) { \ - SET_ERRNO(HPE_STRICT); \ - goto error; \ - } \ -} while (0) -# define NEW_MESSAGE() (http_should_keep_alive(parser) ? start_state : s_dead) -#else -# define STRICT_CHECK(cond) -# define NEW_MESSAGE() start_state -#endif - - -/* Map errno values to strings for human-readable output */ -#define HTTP_STRERROR_GEN(n, s) { "HPE_" #n, s }, -static struct { - const char *name; - const char *description; -} http_strerror_tab[] = { - HTTP_ERRNO_MAP(HTTP_STRERROR_GEN) -}; -#undef HTTP_STRERROR_GEN - -int http_message_needs_eof(const http_parser *parser); - -/* Our URL parser. - * - * This is designed to be shared by http_parser_execute() for URL validation, - * hence it has a state transition + byte-for-byte interface. In addition, it - * is meant to be embedded in http_parser_parse_url(), which does the dirty - * work of turning state transitions URL components for its API. - * - * This function should only be invoked with non-space characters. It is - * assumed that the caller cares about (and can detect) the transition between - * URL and non-URL states by looking for these. - */ -static enum state -parse_url_char(enum state s, const char ch) -{ - if (ch == ' ' || ch == '\r' || ch == '\n') { - return s_dead; - } - -#if HTTP_PARSER_STRICT - if (ch == '\t' || ch == '\f') { - return s_dead; - } -#endif - - switch (s) { - case s_req_spaces_before_url: - /* Proxied requests are followed by scheme of an absolute URI (alpha). - * All methods except CONNECT are followed by '/' or '*'. - */ - - if (ch == '/' || ch == '*') { - return s_req_path; - } - - if (IS_ALPHA(ch)) { - return s_req_schema; - } - - break; - - case s_req_schema: - if (IS_ALPHA(ch)) { - return s; - } - - if (ch == ':') { - return s_req_schema_slash; - } - - break; - - case s_req_schema_slash: - if (ch == '/') { - return s_req_schema_slash_slash; - } - - break; - - case s_req_schema_slash_slash: - if (ch == '/') { - return s_req_server_start; - } - - break; - - case s_req_server_with_at: - if (ch == '@') { - return s_dead; - } - - /* FALLTHROUGH */ - case s_req_server_start: - case s_req_server: - if (ch == '/') { - return s_req_path; - } - - if (ch == '?') { - return s_req_query_string_start; - } - - if (ch == '@') { - return s_req_server_with_at; - } - - if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') { - return s_req_server; - } - - break; - - case s_req_path: - if (IS_URL_CHAR(ch)) { - return s; - } - - switch (ch) { - case '?': - return s_req_query_string_start; - - case '#': - return s_req_fragment_start; - } - - break; - - case s_req_query_string_start: - case s_req_query_string: - if (IS_URL_CHAR(ch)) { - return s_req_query_string; - } - - switch (ch) { - case '?': - /* allow extra '?' in query string */ - return s_req_query_string; - - case '#': - return s_req_fragment_start; - } - - break; - - case s_req_fragment_start: - if (IS_URL_CHAR(ch)) { - return s_req_fragment; - } - - switch (ch) { - case '?': - return s_req_fragment; - - case '#': - return s; - } - - break; - - case s_req_fragment: - if (IS_URL_CHAR(ch)) { - return s; - } - - switch (ch) { - case '?': - case '#': - return s; - } - - break; - - default: - break; - } - - /* We should never fall out of the switch above unless there's an error */ - return s_dead; -} - -size_t http_parser_execute (http_parser *parser, - const http_parser_settings *settings, - const char *data, - size_t len) -{ - char c, ch; - int8_t unhex_val; - const char *p = data; - const char *header_field_mark = 0; - const char *header_value_mark = 0; - const char *url_mark = 0; - const char *body_mark = 0; - - /* We're in an error state. Don't bother doing anything. */ - if (HTTP_PARSER_ERRNO(parser) != HPE_OK) { - return 0; - } - - if (len == 0) { - switch (parser->state) { - case s_body_identity_eof: - /* Use of CALLBACK_NOTIFY() here would erroneously return 1 byte read if - * we got paused. - */ - CALLBACK_NOTIFY_NOADVANCE(message_complete); - return 0; - - case s_dead: - case s_start_req_or_res: - case s_start_res: - case s_start_req: - return 0; - - default: - SET_ERRNO(HPE_INVALID_EOF_STATE); - return 1; - } - } - - - if (parser->state == s_header_field) - header_field_mark = data; - if (parser->state == s_header_value) - header_value_mark = data; - switch (parser->state) { - case s_req_path: - case s_req_schema: - case s_req_schema_slash: - case s_req_schema_slash_slash: - case s_req_server_start: - case s_req_server: - case s_req_server_with_at: - case s_req_query_string_start: - case s_req_query_string: - case s_req_fragment_start: - case s_req_fragment: - url_mark = data; - break; - } - - for (p=data; p != data + len; p++) { - ch = *p; - - if (PARSING_HEADER(parser->state)) { - ++parser->nread; - /* Buffer overflow attack */ - if (parser->nread > HTTP_MAX_HEADER_SIZE) { - SET_ERRNO(HPE_HEADER_OVERFLOW); - goto error; - } - } - - reexecute_byte: - switch (parser->state) { - - case s_dead: - /* this state is used after a 'Connection: close' message - * the parser will error out if it reads another message - */ - if (ch == CR || ch == LF) - break; - - SET_ERRNO(HPE_CLOSED_CONNECTION); - goto error; - - case s_start_req_or_res: - { - if (ch == CR || ch == LF) - break; - parser->flags = 0; - parser->content_length = ULLONG_MAX; - - if (ch == 'H') { - parser->state = s_res_or_resp_H; - - CALLBACK_NOTIFY(message_begin); - } else { - parser->type = HTTP_REQUEST; - parser->state = s_start_req; - goto reexecute_byte; - } - - break; - } - - case s_res_or_resp_H: - if (ch == 'T') { - parser->type = HTTP_RESPONSE; - parser->state = s_res_HT; - } else { - if (ch != 'E') { - SET_ERRNO(HPE_INVALID_CONSTANT); - goto error; - } - - parser->type = HTTP_REQUEST; - parser->method = HTTP_HEAD; - parser->index = 2; - parser->state = s_req_method; - } - break; - - case s_start_res: - { - parser->flags = 0; - parser->content_length = ULLONG_MAX; - - switch (ch) { - case 'H': - parser->state = s_res_H; - break; - - case CR: - case LF: - break; - - default: - SET_ERRNO(HPE_INVALID_CONSTANT); - goto error; - } - - CALLBACK_NOTIFY(message_begin); - break; - } - - case s_res_H: - STRICT_CHECK(ch != 'T'); - parser->state = s_res_HT; - break; - - case s_res_HT: - STRICT_CHECK(ch != 'T'); - parser->state = s_res_HTT; - break; - - case s_res_HTT: - STRICT_CHECK(ch != 'P'); - parser->state = s_res_HTTP; - break; - - case s_res_HTTP: - STRICT_CHECK(ch != '/'); - parser->state = s_res_first_http_major; - break; - - case s_res_first_http_major: - if (ch < '0' || ch > '9') { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_major = ch - '0'; - parser->state = s_res_http_major; - break; - - /* major HTTP version or dot */ - case s_res_http_major: - { - if (ch == '.') { - parser->state = s_res_first_http_minor; - break; - } - - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_major *= 10; - parser->http_major += ch - '0'; - - if (parser->http_major > 999) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - break; - } - - /* first digit of minor HTTP version */ - case s_res_first_http_minor: - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_minor = ch - '0'; - parser->state = s_res_http_minor; - break; - - /* minor HTTP version or end of request line */ - case s_res_http_minor: - { - if (ch == ' ') { - parser->state = s_res_first_status_code; - break; - } - - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_minor *= 10; - parser->http_minor += ch - '0'; - - if (parser->http_minor > 999) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - break; - } - - case s_res_first_status_code: - { - if (!IS_NUM(ch)) { - if (ch == ' ') { - break; - } - - SET_ERRNO(HPE_INVALID_STATUS); - goto error; - } - parser->status_code = ch - '0'; - parser->state = s_res_status_code; - break; - } - - case s_res_status_code: - { - if (!IS_NUM(ch)) { - switch (ch) { - case ' ': - parser->state = s_res_status; - break; - case CR: - parser->state = s_res_line_almost_done; - break; - case LF: - parser->state = s_header_field_start; - break; - default: - SET_ERRNO(HPE_INVALID_STATUS); - goto error; - } - break; - } - - parser->status_code *= 10; - parser->status_code += ch - '0'; - - if (parser->status_code > 999) { - SET_ERRNO(HPE_INVALID_STATUS); - goto error; - } - - break; - } - - case s_res_status: - /* the human readable status. e.g. "NOT FOUND" - * we are not humans so just ignore this */ - if (ch == CR) { - parser->state = s_res_line_almost_done; - break; - } - - if (ch == LF) { - parser->state = s_header_field_start; - break; - } - break; - - case s_res_line_almost_done: - STRICT_CHECK(ch != LF); - parser->state = s_header_field_start; - CALLBACK_NOTIFY(status_complete); - break; - - case s_start_req: - { - if (ch == CR || ch == LF) - break; - parser->flags = 0; - parser->content_length = ULLONG_MAX; - - if (!IS_ALPHA(ch)) { - SET_ERRNO(HPE_INVALID_METHOD); - goto error; - } - - parser->method = (enum http_method) 0; - parser->index = 1; - switch (ch) { - case 'C': parser->method = HTTP_CONNECT; /* or COPY, CHECKOUT */ break; - case 'D': parser->method = HTTP_DELETE; break; - case 'G': parser->method = HTTP_GET; break; - case 'H': parser->method = HTTP_HEAD; break; - case 'L': parser->method = HTTP_LOCK; break; - case 'M': parser->method = HTTP_MKCOL; /* or MOVE, MKACTIVITY, MERGE, M-SEARCH */ break; - case 'N': parser->method = HTTP_NOTIFY; break; - case 'O': parser->method = HTTP_OPTIONS; break; - case 'P': parser->method = HTTP_POST; - /* or PROPFIND|PROPPATCH|PUT|PATCH|PURGE */ - break; - case 'R': parser->method = HTTP_REPORT; break; - case 'S': parser->method = HTTP_SUBSCRIBE; /* or SEARCH */ break; - case 'T': parser->method = HTTP_TRACE; break; - case 'U': parser->method = HTTP_UNLOCK; /* or UNSUBSCRIBE */ break; - default: - SET_ERRNO(HPE_INVALID_METHOD); - goto error; - } - parser->state = s_req_method; - - CALLBACK_NOTIFY(message_begin); - - break; - } - - case s_req_method: - { - const char *matcher; - if (ch == '\0') { - SET_ERRNO(HPE_INVALID_METHOD); - goto error; - } - - matcher = method_strings[parser->method]; - if (ch == ' ' && matcher[parser->index] == '\0') { - parser->state = s_req_spaces_before_url; - } else if (ch == matcher[parser->index]) { - ; /* nada */ - } else if (parser->method == HTTP_CONNECT) { - if (parser->index == 1 && ch == 'H') { - parser->method = HTTP_CHECKOUT; - } else if (parser->index == 2 && ch == 'P') { - parser->method = HTTP_COPY; - } else { - goto error; - } - } else if (parser->method == HTTP_MKCOL) { - if (parser->index == 1 && ch == 'O') { - parser->method = HTTP_MOVE; - } else if (parser->index == 1 && ch == 'E') { - parser->method = HTTP_MERGE; - } else if (parser->index == 1 && ch == '-') { - parser->method = HTTP_MSEARCH; - } else if (parser->index == 2 && ch == 'A') { - parser->method = HTTP_MKACTIVITY; - } else { - goto error; - } - } else if (parser->method == HTTP_SUBSCRIBE) { - if (parser->index == 1 && ch == 'E') { - parser->method = HTTP_SEARCH; - } else { - goto error; - } - } else if (parser->index == 1 && parser->method == HTTP_POST) { - if (ch == 'R') { - parser->method = HTTP_PROPFIND; /* or HTTP_PROPPATCH */ - } else if (ch == 'U') { - parser->method = HTTP_PUT; /* or HTTP_PURGE */ - } else if (ch == 'A') { - parser->method = HTTP_PATCH; - } else { - goto error; - } - } else if (parser->index == 2) { - if (parser->method == HTTP_PUT) { - if (ch == 'R') parser->method = HTTP_PURGE; - } else if (parser->method == HTTP_UNLOCK) { - if (ch == 'S') parser->method = HTTP_UNSUBSCRIBE; - } - } else if (parser->index == 4 && parser->method == HTTP_PROPFIND && ch == 'P') { - parser->method = HTTP_PROPPATCH; - } else { - SET_ERRNO(HPE_INVALID_METHOD); - goto error; - } - - ++parser->index; - break; - } - - case s_req_spaces_before_url: - { - if (ch == ' ') break; - - MARK(url); - if (parser->method == HTTP_CONNECT) { - parser->state = s_req_server_start; - } - - parser->state = parse_url_char((enum state)parser->state, ch); - if (parser->state == s_dead) { - SET_ERRNO(HPE_INVALID_URL); - goto error; - } - - break; - } - - case s_req_schema: - case s_req_schema_slash: - case s_req_schema_slash_slash: - case s_req_server_start: - { - switch (ch) { - /* No whitespace allowed here */ - case ' ': - case CR: - case LF: - SET_ERRNO(HPE_INVALID_URL); - goto error; - default: - parser->state = parse_url_char((enum state)parser->state, ch); - if (parser->state == s_dead) { - SET_ERRNO(HPE_INVALID_URL); - goto error; - } - } - - break; - } - - case s_req_server: - case s_req_server_with_at: - case s_req_path: - case s_req_query_string_start: - case s_req_query_string: - case s_req_fragment_start: - case s_req_fragment: - { - switch (ch) { - case ' ': - parser->state = s_req_http_start; - CALLBACK_DATA(url); - break; - case CR: - case LF: - parser->http_major = 0; - parser->http_minor = 9; - parser->state = (ch == CR) ? - s_req_line_almost_done : - s_header_field_start; - CALLBACK_DATA(url); - break; - default: - parser->state = parse_url_char((enum state)parser->state, ch); - if (parser->state == s_dead) { - SET_ERRNO(HPE_INVALID_URL); - goto error; - } - } - break; - } - - case s_req_http_start: - switch (ch) { - case 'H': - parser->state = s_req_http_H; - break; - case ' ': - break; - default: - SET_ERRNO(HPE_INVALID_CONSTANT); - goto error; - } - break; - - case s_req_http_H: - STRICT_CHECK(ch != 'T'); - parser->state = s_req_http_HT; - break; - - case s_req_http_HT: - STRICT_CHECK(ch != 'T'); - parser->state = s_req_http_HTT; - break; - - case s_req_http_HTT: - STRICT_CHECK(ch != 'P'); - parser->state = s_req_http_HTTP; - break; - - case s_req_http_HTTP: - STRICT_CHECK(ch != '/'); - parser->state = s_req_first_http_major; - break; - - /* first digit of major HTTP version */ - case s_req_first_http_major: - if (ch < '1' || ch > '9') { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_major = ch - '0'; - parser->state = s_req_http_major; - break; - - /* major HTTP version or dot */ - case s_req_http_major: - { - if (ch == '.') { - parser->state = s_req_first_http_minor; - break; - } - - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_major *= 10; - parser->http_major += ch - '0'; - - if (parser->http_major > 999) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - break; - } - - /* first digit of minor HTTP version */ - case s_req_first_http_minor: - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_minor = ch - '0'; - parser->state = s_req_http_minor; - break; - - /* minor HTTP version or end of request line */ - case s_req_http_minor: - { - if (ch == CR) { - parser->state = s_req_line_almost_done; - break; - } - - if (ch == LF) { - parser->state = s_header_field_start; - break; - } - - /* XXX allow spaces after digit? */ - - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_minor *= 10; - parser->http_minor += ch - '0'; - - if (parser->http_minor > 999) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - break; - } - - /* end of request line */ - case s_req_line_almost_done: - { - if (ch != LF) { - SET_ERRNO(HPE_LF_EXPECTED); - goto error; - } - - parser->state = s_header_field_start; - break; - } - - case s_header_field_start: - { - if (ch == CR) { - parser->state = s_headers_almost_done; - break; - } - - if (ch == LF) { - /* they might be just sending \n instead of \r\n so this would be - * the second \n to denote the end of headers*/ - parser->state = s_headers_almost_done; - goto reexecute_byte; - } - - c = TOKEN(ch); - - if (!c) { - SET_ERRNO(HPE_INVALID_HEADER_TOKEN); - goto error; - } - - MARK(header_field); - - parser->index = 0; - parser->state = s_header_field; - - switch (c) { - case 'c': - parser->header_state = h_C; - break; - - case 'p': - parser->header_state = h_matching_proxy_connection; - break; - - case 't': - parser->header_state = h_matching_transfer_encoding; - break; - - case 'u': - parser->header_state = h_matching_upgrade; - break; - - default: - parser->header_state = h_general; - break; - } - break; - } - - case s_header_field: - { - c = TOKEN(ch); - - if (c) { - switch (parser->header_state) { - case h_general: - break; - - case h_C: - parser->index++; - parser->header_state = (c == 'o' ? h_CO : h_general); - break; - - case h_CO: - parser->index++; - parser->header_state = (c == 'n' ? h_CON : h_general); - break; - - case h_CON: - parser->index++; - switch (c) { - case 'n': - parser->header_state = h_matching_connection; - break; - case 't': - parser->header_state = h_matching_content_length; - break; - default: - parser->header_state = h_general; - break; - } - break; - - /* connection */ - - case h_matching_connection: - parser->index++; - if (parser->index > sizeof(CONNECTION)-1 - || c != CONNECTION[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(CONNECTION)-2) { - parser->header_state = h_connection; - } - break; - - /* proxy-connection */ - - case h_matching_proxy_connection: - parser->index++; - if (parser->index > sizeof(PROXY_CONNECTION)-1 - || c != PROXY_CONNECTION[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(PROXY_CONNECTION)-2) { - parser->header_state = h_connection; - } - break; - - /* content-length */ - - case h_matching_content_length: - parser->index++; - if (parser->index > sizeof(CONTENT_LENGTH)-1 - || c != CONTENT_LENGTH[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(CONTENT_LENGTH)-2) { - parser->header_state = h_content_length; - } - break; - - /* transfer-encoding */ - - case h_matching_transfer_encoding: - parser->index++; - if (parser->index > sizeof(TRANSFER_ENCODING)-1 - || c != TRANSFER_ENCODING[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(TRANSFER_ENCODING)-2) { - parser->header_state = h_transfer_encoding; - } - break; - - /* upgrade */ - - case h_matching_upgrade: - parser->index++; - if (parser->index > sizeof(UPGRADE)-1 - || c != UPGRADE[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(UPGRADE)-2) { - parser->header_state = h_upgrade; - } - break; - - case h_connection: - case h_content_length: - case h_transfer_encoding: - case h_upgrade: - if (ch != ' ') parser->header_state = h_general; - break; - - default: - assert(0 && "Unknown header_state"); - break; - } - break; - } - - if (ch == ':') { - parser->state = s_header_value_start; - CALLBACK_DATA(header_field); - break; - } - - if (ch == CR) { - parser->state = s_header_almost_done; - CALLBACK_DATA(header_field); - break; - } - - if (ch == LF) { - parser->state = s_header_field_start; - CALLBACK_DATA(header_field); - break; - } - - SET_ERRNO(HPE_INVALID_HEADER_TOKEN); - goto error; - } - - case s_header_value_start: - { - if (ch == ' ' || ch == '\t') break; - - MARK(header_value); - - parser->state = s_header_value; - parser->index = 0; - - if (ch == CR) { - parser->header_state = h_general; - parser->state = s_header_almost_done; - CALLBACK_DATA(header_value); - break; - } - - if (ch == LF) { - parser->state = s_header_field_start; - CALLBACK_DATA(header_value); - break; - } - - c = LOWER(ch); - - switch (parser->header_state) { - case h_upgrade: - parser->flags |= F_UPGRADE; - parser->header_state = h_general; - break; - - case h_transfer_encoding: - /* looking for 'Transfer-Encoding: chunked' */ - if ('c' == c) { - parser->header_state = h_matching_transfer_encoding_chunked; - } else { - parser->header_state = h_general; - } - break; - - case h_content_length: - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_CONTENT_LENGTH); - goto error; - } - - parser->content_length = ch - '0'; - break; - - case h_connection: - /* looking for 'Connection: keep-alive' */ - if (c == 'k') { - parser->header_state = h_matching_connection_keep_alive; - /* looking for 'Connection: close' */ - } else if (c == 'c') { - parser->header_state = h_matching_connection_close; - } else { - parser->header_state = h_general; - } - break; - - default: - parser->header_state = h_general; - break; - } - break; - } - - case s_header_value: - { - - if (ch == CR) { - parser->state = s_header_almost_done; - CALLBACK_DATA(header_value); - break; - } - - if (ch == LF) { - parser->state = s_header_almost_done; - CALLBACK_DATA_NOADVANCE(header_value); - goto reexecute_byte; - } - - c = LOWER(ch); - - switch (parser->header_state) { - case h_general: - break; - - case h_connection: - case h_transfer_encoding: - assert(0 && "Shouldn't get here."); - break; - - case h_content_length: - { - uint64_t t; - - if (ch == ' ') break; - - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_CONTENT_LENGTH); - goto error; - } - - t = parser->content_length; - t *= 10; - t += ch - '0'; - - /* Overflow? */ - if (t < parser->content_length || t == ULLONG_MAX) { - SET_ERRNO(HPE_INVALID_CONTENT_LENGTH); - goto error; - } - - parser->content_length = t; - break; - } - - /* Transfer-Encoding: chunked */ - case h_matching_transfer_encoding_chunked: - parser->index++; - if (parser->index > sizeof(CHUNKED)-1 - || c != CHUNKED[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(CHUNKED)-2) { - parser->header_state = h_transfer_encoding_chunked; - } - break; - - /* looking for 'Connection: keep-alive' */ - case h_matching_connection_keep_alive: - parser->index++; - if (parser->index > sizeof(KEEP_ALIVE)-1 - || c != KEEP_ALIVE[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(KEEP_ALIVE)-2) { - parser->header_state = h_connection_keep_alive; - } - break; - - /* looking for 'Connection: close' */ - case h_matching_connection_close: - parser->index++; - if (parser->index > sizeof(CLOSE)-1 || c != CLOSE[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(CLOSE)-2) { - parser->header_state = h_connection_close; - } - break; - - case h_transfer_encoding_chunked: - case h_connection_keep_alive: - case h_connection_close: - if (ch != ' ') parser->header_state = h_general; - break; - - default: - parser->state = s_header_value; - parser->header_state = h_general; - break; - } - break; - } - - case s_header_almost_done: - { - STRICT_CHECK(ch != LF); - - parser->state = s_header_value_lws; - - switch (parser->header_state) { - case h_connection_keep_alive: - parser->flags |= F_CONNECTION_KEEP_ALIVE; - break; - case h_connection_close: - parser->flags |= F_CONNECTION_CLOSE; - break; - case h_transfer_encoding_chunked: - parser->flags |= F_CHUNKED; - break; - default: - break; - } - - break; - } - - case s_header_value_lws: - { - if (ch == ' ' || ch == '\t') - parser->state = s_header_value_start; - else - { - parser->state = s_header_field_start; - goto reexecute_byte; - } - break; - } - - case s_headers_almost_done: - { - STRICT_CHECK(ch != LF); - - if (parser->flags & F_TRAILING) { - /* End of a chunked request */ - parser->state = NEW_MESSAGE(); - CALLBACK_NOTIFY(message_complete); - break; - } - - parser->state = s_headers_done; - - /* Set this here so that on_headers_complete() callbacks can see it */ - parser->upgrade = - (parser->flags & F_UPGRADE || parser->method == HTTP_CONNECT); - - /* Here we call the headers_complete callback. This is somewhat - * different than other callbacks because if the user returns 1, we - * will interpret that as saying that this message has no body. This - * is needed for the annoying case of recieving a response to a HEAD - * request. - * - * We'd like to use CALLBACK_NOTIFY_NOADVANCE() here but we cannot, so - * we have to simulate it by handling a change in errno below. - */ - if (settings->on_headers_complete) { - switch (settings->on_headers_complete(parser)) { - case 0: - break; - - case 1: - parser->flags |= F_SKIPBODY; - break; - - default: - SET_ERRNO(HPE_CB_headers_complete); - return p - data; /* Error */ - } - } - - if (HTTP_PARSER_ERRNO(parser) != HPE_OK) { - return p - data; - } - - goto reexecute_byte; - } - - case s_headers_done: - { - STRICT_CHECK(ch != LF); - - parser->nread = 0; - - /* Exit, the rest of the connect is in a different protocol. */ - if (parser->upgrade) { - parser->state = NEW_MESSAGE(); - CALLBACK_NOTIFY(message_complete); - return (p - data) + 1; - } - - if (parser->flags & F_SKIPBODY) { - parser->state = NEW_MESSAGE(); - CALLBACK_NOTIFY(message_complete); - } else if (parser->flags & F_CHUNKED) { - /* chunked encoding - ignore Content-Length header */ - parser->state = s_chunk_size_start; - } else { - if (parser->content_length == 0) { - /* Content-Length header given but zero: Content-Length: 0\r\n */ - parser->state = NEW_MESSAGE(); - CALLBACK_NOTIFY(message_complete); - } else if (parser->content_length != ULLONG_MAX) { - /* Content-Length header given and non-zero */ - parser->state = s_body_identity; - } else { - if (parser->type == HTTP_REQUEST || - !http_message_needs_eof(parser)) { - /* Assume content-length 0 - read the next */ - parser->state = NEW_MESSAGE(); - CALLBACK_NOTIFY(message_complete); - } else { - /* Read body until EOF */ - parser->state = s_body_identity_eof; - } - } - } - - break; - } - - case s_body_identity: - { - uint64_t to_read = MIN(parser->content_length, - (uint64_t) ((data + len) - p)); - - assert(parser->content_length != 0 - && parser->content_length != ULLONG_MAX); - - /* The difference between advancing content_length and p is because - * the latter will automaticaly advance on the next loop iteration. - * Further, if content_length ends up at 0, we want to see the last - * byte again for our message complete callback. - */ - MARK(body); - parser->content_length -= to_read; - p += to_read - 1; - - if (parser->content_length == 0) { - parser->state = s_message_done; - - /* Mimic CALLBACK_DATA_NOADVANCE() but with one extra byte. - * - * The alternative to doing this is to wait for the next byte to - * trigger the data callback, just as in every other case. The - * problem with this is that this makes it difficult for the test - * harness to distinguish between complete-on-EOF and - * complete-on-length. It's not clear that this distinction is - * important for applications, but let's keep it for now. - */ - CALLBACK_DATA_(body, p - body_mark + 1, p - data); - goto reexecute_byte; - } - - break; - } - - /* read until EOF */ - case s_body_identity_eof: - MARK(body); - p = data + len - 1; - - break; - - case s_message_done: - parser->state = NEW_MESSAGE(); - CALLBACK_NOTIFY(message_complete); - break; - - case s_chunk_size_start: - { - assert(parser->nread == 1); - assert(parser->flags & F_CHUNKED); - - unhex_val = unhex[(unsigned char)ch]; - if (unhex_val == -1) { - SET_ERRNO(HPE_INVALID_CHUNK_SIZE); - goto error; - } - - parser->content_length = unhex_val; - parser->state = s_chunk_size; - break; - } - - case s_chunk_size: - { - uint64_t t; - - assert(parser->flags & F_CHUNKED); - - if (ch == CR) { - parser->state = s_chunk_size_almost_done; - break; - } - - unhex_val = unhex[(unsigned char)ch]; - - if (unhex_val == -1) { - if (ch == ';' || ch == ' ') { - parser->state = s_chunk_parameters; - break; - } - - SET_ERRNO(HPE_INVALID_CHUNK_SIZE); - goto error; - } - - t = parser->content_length; - t *= 16; - t += unhex_val; - - /* Overflow? */ - if (t < parser->content_length || t == ULLONG_MAX) { - SET_ERRNO(HPE_INVALID_CONTENT_LENGTH); - goto error; - } - - parser->content_length = t; - break; - } - - case s_chunk_parameters: - { - assert(parser->flags & F_CHUNKED); - /* just ignore this shit. TODO check for overflow */ - if (ch == CR) { - parser->state = s_chunk_size_almost_done; - break; - } - break; - } - - case s_chunk_size_almost_done: - { - assert(parser->flags & F_CHUNKED); - STRICT_CHECK(ch != LF); - - parser->nread = 0; - - if (parser->content_length == 0) { - parser->flags |= F_TRAILING; - parser->state = s_header_field_start; - } else { - parser->state = s_chunk_data; - } - break; - } - - case s_chunk_data: - { - uint64_t to_read = MIN(parser->content_length, - (uint64_t) ((data + len) - p)); - - assert(parser->flags & F_CHUNKED); - assert(parser->content_length != 0 - && parser->content_length != ULLONG_MAX); - - /* See the explanation in s_body_identity for why the content - * length and data pointers are managed this way. - */ - MARK(body); - parser->content_length -= to_read; - p += to_read - 1; - - if (parser->content_length == 0) { - parser->state = s_chunk_data_almost_done; - } - - break; - } - - case s_chunk_data_almost_done: - assert(parser->flags & F_CHUNKED); - assert(parser->content_length == 0); - STRICT_CHECK(ch != CR); - parser->state = s_chunk_data_done; - CALLBACK_DATA(body); - break; - - case s_chunk_data_done: - assert(parser->flags & F_CHUNKED); - STRICT_CHECK(ch != LF); - parser->nread = 0; - parser->state = s_chunk_size_start; - break; - - default: - assert(0 && "unhandled state"); - SET_ERRNO(HPE_INVALID_INTERNAL_STATE); - goto error; - } - } - - /* Run callbacks for any marks that we have leftover after we ran our of - * bytes. There should be at most one of these set, so it's OK to invoke - * them in series (unset marks will not result in callbacks). - * - * We use the NOADVANCE() variety of callbacks here because 'p' has already - * overflowed 'data' and this allows us to correct for the off-by-one that - * we'd otherwise have (since CALLBACK_DATA() is meant to be run with a 'p' - * value that's in-bounds). - */ - - assert(((header_field_mark ? 1 : 0) + - (header_value_mark ? 1 : 0) + - (url_mark ? 1 : 0) + - (body_mark ? 1 : 0)) <= 1); - - CALLBACK_DATA_NOADVANCE(header_field); - CALLBACK_DATA_NOADVANCE(header_value); - CALLBACK_DATA_NOADVANCE(url); - CALLBACK_DATA_NOADVANCE(body); - - return len; - -error: - if (HTTP_PARSER_ERRNO(parser) == HPE_OK) { - SET_ERRNO(HPE_UNKNOWN); - } - - return (p - data); -} - - -/* Does the parser need to see an EOF to find the end of the message? */ -int -http_message_needs_eof (const http_parser *parser) -{ - if (parser->type == HTTP_REQUEST) { - return 0; - } - - /* See RFC 2616 section 4.4 */ - if (parser->status_code / 100 == 1 || /* 1xx e.g. Continue */ - parser->status_code == 204 || /* No Content */ - parser->status_code == 304 || /* Not Modified */ - parser->flags & F_SKIPBODY) { /* response to a HEAD request */ - return 0; - } - - if ((parser->flags & F_CHUNKED) || parser->content_length != ULLONG_MAX) { - return 0; - } - - return 1; -} - - -int -http_should_keep_alive (const http_parser *parser) -{ - if (parser->http_major > 0 && parser->http_minor > 0) { - /* HTTP/1.1 */ - if (parser->flags & F_CONNECTION_CLOSE) { - return 0; - } - } else { - /* HTTP/1.0 or earlier */ - if (!(parser->flags & F_CONNECTION_KEEP_ALIVE)) { - return 0; - } - } - - return !http_message_needs_eof(parser); -} - - -const char * -http_method_str (enum http_method m) -{ - return ELEM_AT(method_strings, m, ""); -} - - -void -http_parser_init (http_parser *parser, enum http_parser_type t) -{ - void *data = parser->data; /* preserve application data */ - memset(parser, 0, sizeof(*parser)); - parser->data = data; - parser->type = t; - parser->state = (t == HTTP_REQUEST ? s_start_req : (t == HTTP_RESPONSE ? s_start_res : s_start_req_or_res)); - parser->http_errno = HPE_OK; -} - -const char * -http_errno_name(enum http_errno err) { - assert(err < (sizeof(http_strerror_tab)/sizeof(http_strerror_tab[0]))); - return http_strerror_tab[err].name; -} - -const char * -http_errno_description(enum http_errno err) { - assert(err < (sizeof(http_strerror_tab)/sizeof(http_strerror_tab[0]))); - return http_strerror_tab[err].description; -} - -static enum http_host_state -http_parse_host_char(enum http_host_state s, const char ch) { - switch(s) { - case s_http_userinfo: - case s_http_userinfo_start: - if (ch == '@') { - return s_http_host_start; - } - - if (IS_USERINFO_CHAR(ch)) { - return s_http_userinfo; - } - break; - - case s_http_host_start: - if (ch == '[') { - return s_http_host_v6_start; - } - - if (IS_HOST_CHAR(ch)) { - return s_http_host; - } - - break; - - case s_http_host: - if (IS_HOST_CHAR(ch)) { - return s_http_host; - } - - /* FALLTHROUGH */ - case s_http_host_v6_end: - if (ch == ':') { - return s_http_host_port_start; - } - - break; - - case s_http_host_v6: - if (ch == ']') { - return s_http_host_v6_end; - } - - /* FALLTHROUGH */ - case s_http_host_v6_start: - if (IS_HEX(ch) || ch == ':' || ch == '.') { - return s_http_host_v6; - } - - break; - - case s_http_host_port: - case s_http_host_port_start: - if (IS_NUM(ch)) { - return s_http_host_port; - } - - break; - - default: - break; - } - return s_http_host_dead; -} - -static int -http_parse_host(const char * buf, struct http_parser_url *u, int found_at) { - enum http_host_state s; - - const char *p; - size_t buflen = u->field_data[UF_HOST].off + u->field_data[UF_HOST].len; - - u->field_data[UF_HOST].len = 0; - - s = found_at ? s_http_userinfo_start : s_http_host_start; - - for (p = buf + u->field_data[UF_HOST].off; p < buf + buflen; p++) { - enum http_host_state new_s = http_parse_host_char(s, *p); - - if (new_s == s_http_host_dead) { - return 1; - } - - switch(new_s) { - case s_http_host: - if (s != s_http_host) { - u->field_data[UF_HOST].off = p - buf; - } - u->field_data[UF_HOST].len++; - break; - - case s_http_host_v6: - if (s != s_http_host_v6) { - u->field_data[UF_HOST].off = p - buf; - } - u->field_data[UF_HOST].len++; - break; - - case s_http_host_port: - if (s != s_http_host_port) { - u->field_data[UF_PORT].off = p - buf; - u->field_data[UF_PORT].len = 0; - u->field_set |= (1 << UF_PORT); - } - u->field_data[UF_PORT].len++; - break; - - case s_http_userinfo: - if (s != s_http_userinfo) { - u->field_data[UF_USERINFO].off = p - buf ; - u->field_data[UF_USERINFO].len = 0; - u->field_set |= (1 << UF_USERINFO); - } - u->field_data[UF_USERINFO].len++; - break; - - default: - break; - } - s = new_s; - } - - /* Make sure we don't end somewhere unexpected */ - switch (s) { - case s_http_host_start: - case s_http_host_v6_start: - case s_http_host_v6: - case s_http_host_port_start: - case s_http_userinfo: - case s_http_userinfo_start: - return 1; - default: - break; - } - - return 0; -} - -int -http_parser_parse_url(const char *buf, size_t buflen, int is_connect, - struct http_parser_url *u) -{ - enum state s; - const char *p; - enum http_parser_url_fields uf, old_uf; - int found_at = 0; - - u->port = u->field_set = 0; - s = is_connect ? s_req_server_start : s_req_spaces_before_url; - uf = old_uf = UF_MAX; - - for (p = buf; p < buf + buflen; p++) { - s = parse_url_char(s, *p); - - /* Figure out the next field that we're operating on */ - switch (s) { - case s_dead: - return 1; - - /* Skip delimeters */ - case s_req_schema_slash: - case s_req_schema_slash_slash: - case s_req_server_start: - case s_req_query_string_start: - case s_req_fragment_start: - continue; - - case s_req_schema: - uf = UF_SCHEMA; - break; - - case s_req_server_with_at: - found_at = 1; - - /* FALLTROUGH */ - case s_req_server: - uf = UF_HOST; - break; - - case s_req_path: - uf = UF_PATH; - break; - - case s_req_query_string: - uf = UF_QUERY; - break; - - case s_req_fragment: - uf = UF_FRAGMENT; - break; - - default: - assert(!"Unexpected state"); - return 1; - } - - /* Nothing's changed; soldier on */ - if (uf == old_uf) { - u->field_data[uf].len++; - continue; - } - - u->field_data[uf].off = p - buf; - u->field_data[uf].len = 1; - - u->field_set |= (1 << uf); - old_uf = uf; - } - - /* host must be present if there is a schema */ - /* parsing http:///toto will fail */ - if ((u->field_set & ((1 << UF_SCHEMA) | (1 << UF_HOST))) != 0) { - if (http_parse_host(buf, u, found_at) != 0) { - return 1; - } - } - - /* CONNECT requests can only contain "hostname:port" */ - if (is_connect && u->field_set != ((1 << UF_HOST)|(1 << UF_PORT))) { - return 1; - } - - if (u->field_set & (1 << UF_PORT)) { - /* Don't bother with endp; we've already validated the string */ - unsigned long v = strtoul(buf + u->field_data[UF_PORT].off, NULL, 10); - - /* Ports have a max value of 2^16 */ - if (v > 0xffff) { - return 1; - } - - u->port = (uint16_t) v; - } - - return 0; -} - -void -http_parser_pause(http_parser *parser, int paused) { - /* Users should only be pausing/unpausing a parser that is not in an error - * state. In non-debug builds, there's not much that we can do about this - * other than ignore it. - */ - if (HTTP_PARSER_ERRNO(parser) == HPE_OK || - HTTP_PARSER_ERRNO(parser) == HPE_PAUSED) { - SET_ERRNO((paused) ? HPE_PAUSED : HPE_OK); - } else { - assert(0 && "Attempting to pause parser in error state"); - } -} - -int -http_body_is_final(const struct http_parser *parser) { - return parser->state == s_message_done; -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/http_parser.gyp b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/http_parser.gyp deleted file mode 100644 index c6eada7..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/http_parser.gyp +++ /dev/null @@ -1,79 +0,0 @@ -# This file is used with the GYP meta build system. -# http://code.google.com/p/gyp/ -# To build try this: -# svn co http://gyp.googlecode.com/svn/trunk gyp -# ./gyp/gyp -f make --depth=`pwd` http_parser.gyp -# ./out/Debug/test -{ - 'target_defaults': { - 'default_configuration': 'Debug', - 'configurations': { - # TODO: hoist these out and put them somewhere common, because - # RuntimeLibrary MUST MATCH across the entire project - 'Debug': { - 'defines': [ 'DEBUG', '_DEBUG' ], - 'msvs_settings': { - 'VCCLCompilerTool': { - 'RuntimeLibrary': 1, # static debug - }, - }, - }, - 'Release': { - 'defines': [ 'NDEBUG' ], - 'msvs_settings': { - 'VCCLCompilerTool': { - 'RuntimeLibrary': 0, # static release - }, - }, - } - }, - 'msvs_settings': { - 'VCCLCompilerTool': { - }, - 'VCLibrarianTool': { - }, - 'VCLinkerTool': { - 'GenerateDebugInformation': 'true', - }, - }, - 'conditions': [ - ['OS == "win"', { - 'defines': [ - 'WIN32' - ], - }] - ], - }, - - 'targets': [ - { - 'target_name': 'http_parser', - 'type': 'static_library', - 'include_dirs': [ '.' ], - 'direct_dependent_settings': { - 'include_dirs': [ '.' ], - }, - 'defines': [ 'HTTP_PARSER_STRICT=0' ], - 'sources': [ './http_parser.c', ], - 'conditions': [ - ['OS=="win"', { - 'msvs_settings': { - 'VCCLCompilerTool': { - # Compile as C++. http_parser.c is actually C99, but C++ is - # close enough in this case. - 'CompileAs': 2, - }, - }, - }] - ], - }, - - { - 'target_name': 'test', - 'type': 'executable', - 'dependencies': [ 'http_parser' ], - 'sources': [ 'test.c' ] - } - ] -} - diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/http_parser.h b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/http_parser.h deleted file mode 100644 index 2fff4bd..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/http_parser.h +++ /dev/null @@ -1,304 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ -#ifndef http_parser_h -#define http_parser_h -#ifdef __cplusplus -extern "C" { -#endif - -#define HTTP_PARSER_VERSION_MAJOR 2 -#define HTTP_PARSER_VERSION_MINOR 0 - -#include -#if defined(_WIN32) && !defined(__MINGW32__) && (!defined(_MSC_VER) || _MSC_VER<1600) -#include -#include -typedef __int8 int8_t; -typedef unsigned __int8 uint8_t; -typedef __int16 int16_t; -typedef unsigned __int16 uint16_t; -typedef __int32 int32_t; -typedef unsigned __int32 uint32_t; -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; -#else -#include -#endif - -/* Compile with -DHTTP_PARSER_STRICT=0 to make less checks, but run - * faster - */ -#ifndef HTTP_PARSER_STRICT -# define HTTP_PARSER_STRICT 1 -#endif - -/* Maximium header size allowed */ -#define HTTP_MAX_HEADER_SIZE (80*1024) - - -typedef struct http_parser http_parser; -typedef struct http_parser_settings http_parser_settings; - - -/* Callbacks should return non-zero to indicate an error. The parser will - * then halt execution. - * - * The one exception is on_headers_complete. In a HTTP_RESPONSE parser - * returning '1' from on_headers_complete will tell the parser that it - * should not expect a body. This is used when receiving a response to a - * HEAD request which may contain 'Content-Length' or 'Transfer-Encoding: - * chunked' headers that indicate the presence of a body. - * - * http_data_cb does not return data chunks. It will be call arbitrarally - * many times for each string. E.G. you might get 10 callbacks for "on_url" - * each providing just a few characters more data. - */ -typedef int (*http_data_cb) (http_parser*, const char *at, size_t length); -typedef int (*http_cb) (http_parser*); - - -/* Request Methods */ -#define HTTP_METHOD_MAP(XX) \ - XX(0, DELETE, DELETE) \ - XX(1, GET, GET) \ - XX(2, HEAD, HEAD) \ - XX(3, POST, POST) \ - XX(4, PUT, PUT) \ - /* pathological */ \ - XX(5, CONNECT, CONNECT) \ - XX(6, OPTIONS, OPTIONS) \ - XX(7, TRACE, TRACE) \ - /* webdav */ \ - XX(8, COPY, COPY) \ - XX(9, LOCK, LOCK) \ - XX(10, MKCOL, MKCOL) \ - XX(11, MOVE, MOVE) \ - XX(12, PROPFIND, PROPFIND) \ - XX(13, PROPPATCH, PROPPATCH) \ - XX(14, SEARCH, SEARCH) \ - XX(15, UNLOCK, UNLOCK) \ - /* subversion */ \ - XX(16, REPORT, REPORT) \ - XX(17, MKACTIVITY, MKACTIVITY) \ - XX(18, CHECKOUT, CHECKOUT) \ - XX(19, MERGE, MERGE) \ - /* upnp */ \ - XX(20, MSEARCH, M-SEARCH) \ - XX(21, NOTIFY, NOTIFY) \ - XX(22, SUBSCRIBE, SUBSCRIBE) \ - XX(23, UNSUBSCRIBE, UNSUBSCRIBE) \ - /* RFC-5789 */ \ - XX(24, PATCH, PATCH) \ - XX(25, PURGE, PURGE) \ - -enum http_method - { -#define XX(num, name, string) HTTP_##name = num, - HTTP_METHOD_MAP(XX) -#undef XX - }; - - -enum http_parser_type { HTTP_REQUEST, HTTP_RESPONSE, HTTP_BOTH }; - - -/* Flag values for http_parser.flags field */ -enum flags - { F_CHUNKED = 1 << 0 - , F_CONNECTION_KEEP_ALIVE = 1 << 1 - , F_CONNECTION_CLOSE = 1 << 2 - , F_TRAILING = 1 << 3 - , F_UPGRADE = 1 << 4 - , F_SKIPBODY = 1 << 5 - }; - - -/* Map for errno-related constants - * - * The provided argument should be a macro that takes 2 arguments. - */ -#define HTTP_ERRNO_MAP(XX) \ - /* No error */ \ - XX(OK, "success") \ - \ - /* Callback-related errors */ \ - XX(CB_message_begin, "the on_message_begin callback failed") \ - XX(CB_status_complete, "the on_status_complete callback failed") \ - XX(CB_url, "the on_url callback failed") \ - XX(CB_header_field, "the on_header_field callback failed") \ - XX(CB_header_value, "the on_header_value callback failed") \ - XX(CB_headers_complete, "the on_headers_complete callback failed") \ - XX(CB_body, "the on_body callback failed") \ - XX(CB_message_complete, "the on_message_complete callback failed") \ - \ - /* Parsing-related errors */ \ - XX(INVALID_EOF_STATE, "stream ended at an unexpected time") \ - XX(HEADER_OVERFLOW, \ - "too many header bytes seen; overflow detected") \ - XX(CLOSED_CONNECTION, \ - "data received after completed connection: close message") \ - XX(INVALID_VERSION, "invalid HTTP version") \ - XX(INVALID_STATUS, "invalid HTTP status code") \ - XX(INVALID_METHOD, "invalid HTTP method") \ - XX(INVALID_URL, "invalid URL") \ - XX(INVALID_HOST, "invalid host") \ - XX(INVALID_PORT, "invalid port") \ - XX(INVALID_PATH, "invalid path") \ - XX(INVALID_QUERY_STRING, "invalid query string") \ - XX(INVALID_FRAGMENT, "invalid fragment") \ - XX(LF_EXPECTED, "LF character expected") \ - XX(INVALID_HEADER_TOKEN, "invalid character in header") \ - XX(INVALID_CONTENT_LENGTH, \ - "invalid character in content-length header") \ - XX(INVALID_CHUNK_SIZE, \ - "invalid character in chunk size header") \ - XX(INVALID_CONSTANT, "invalid constant string") \ - XX(INVALID_INTERNAL_STATE, "encountered unexpected internal state")\ - XX(STRICT, "strict mode assertion failed") \ - XX(PAUSED, "parser is paused") \ - XX(UNKNOWN, "an unknown error occurred") - - -/* Define HPE_* values for each errno value above */ -#define HTTP_ERRNO_GEN(n, s) HPE_##n, -enum http_errno { - HTTP_ERRNO_MAP(HTTP_ERRNO_GEN) -}; -#undef HTTP_ERRNO_GEN - - -/* Get an http_errno value from an http_parser */ -#define HTTP_PARSER_ERRNO(p) ((enum http_errno) (p)->http_errno) - - -struct http_parser { - /** PRIVATE **/ - unsigned char type : 2; /* enum http_parser_type */ - unsigned char flags : 6; /* F_* values from 'flags' enum; semi-public */ - unsigned char state; /* enum state from http_parser.c */ - unsigned char header_state; /* enum header_state from http_parser.c */ - unsigned char index; /* index into current matcher */ - - uint32_t nread; /* # bytes read in various scenarios */ - uint64_t content_length; /* # bytes in body (0 if no Content-Length header) */ - - /** READ-ONLY **/ - unsigned short http_major; - unsigned short http_minor; - unsigned short status_code; /* responses only */ - unsigned char method; /* requests only */ - unsigned char http_errno : 7; - - /* 1 = Upgrade header was present and the parser has exited because of that. - * 0 = No upgrade header present. - * Should be checked when http_parser_execute() returns in addition to - * error checking. - */ - unsigned char upgrade : 1; - - /** PUBLIC **/ - void *data; /* A pointer to get hook to the "connection" or "socket" object */ -}; - - -struct http_parser_settings { - http_cb on_message_begin; - http_data_cb on_url; - http_cb on_status_complete; - http_data_cb on_header_field; - http_data_cb on_header_value; - http_cb on_headers_complete; - http_data_cb on_body; - http_cb on_message_complete; -}; - - -enum http_parser_url_fields - { UF_SCHEMA = 0 - , UF_HOST = 1 - , UF_PORT = 2 - , UF_PATH = 3 - , UF_QUERY = 4 - , UF_FRAGMENT = 5 - , UF_USERINFO = 6 - , UF_MAX = 7 - }; - - -/* Result structure for http_parser_parse_url(). - * - * Callers should index into field_data[] with UF_* values iff field_set - * has the relevant (1 << UF_*) bit set. As a courtesy to clients (and - * because we probably have padding left over), we convert any port to - * a uint16_t. - */ -struct http_parser_url { - uint16_t field_set; /* Bitmask of (1 << UF_*) values */ - uint16_t port; /* Converted UF_PORT string */ - - struct { - uint16_t off; /* Offset into buffer in which field starts */ - uint16_t len; /* Length of run in buffer */ - } field_data[UF_MAX]; -}; - - -void http_parser_init(http_parser *parser, enum http_parser_type type); - - -size_t http_parser_execute(http_parser *parser, - const http_parser_settings *settings, - const char *data, - size_t len); - - -/* If http_should_keep_alive() in the on_headers_complete or - * on_message_complete callback returns 0, then this should be - * the last message on the connection. - * If you are the server, respond with the "Connection: close" header. - * If you are the client, close the connection. - */ -int http_should_keep_alive(const http_parser *parser); - -/* Returns a string version of the HTTP method. */ -const char *http_method_str(enum http_method m); - -/* Return a string name of the given error */ -const char *http_errno_name(enum http_errno err); - -/* Return a string description of the given error */ -const char *http_errno_description(enum http_errno err); - -/* Parse a URL; return nonzero on failure */ -int http_parser_parse_url(const char *buf, size_t buflen, - int is_connect, - struct http_parser_url *u); - -/* Pause or un-pause the parser; a nonzero value pauses */ -void http_parser_pause(http_parser *parser, int paused); - -/* Checks if this is the final chunk of the body. */ -int http_body_is_final(const http_parser *parser); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/Http-parser.java.iml b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/Http-parser.java.iml deleted file mode 100644 index 741121a..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/Http-parser.java.iml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/FieldData.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/FieldData.java deleted file mode 100644 index 774179f..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/FieldData.java +++ /dev/null @@ -1,41 +0,0 @@ -package http_parser; - -public class FieldData { - public int off; - public int len; - - public FieldData(){} - - public FieldData(int off, int len){ - this.off = off; - this.len = len; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - FieldData fieldData = (FieldData) o; - - if (len != fieldData.len) return false; - if (off != fieldData.off) return false; - - return true; - } - - @Override - public int hashCode() { - int result = off; - result = 31 * result + len; - return result; - } - - @Override - public String toString() { - return "FieldData{" + - "off=" + off + - ", len=" + len + - '}'; - } -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPCallback.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPCallback.java deleted file mode 100644 index 5380b0f..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPCallback.java +++ /dev/null @@ -1,8 +0,0 @@ -package http_parser; - -public abstract class HTTPCallback implements http_parser.lolevel.HTTPCallback{ - public int cb (http_parser.lolevel.HTTPParser parser) { - return this.cb((HTTPParser)parser); - } - public abstract int cb (HTTPParser parser); -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPDataCallback.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPDataCallback.java deleted file mode 100644 index bfe576f..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPDataCallback.java +++ /dev/null @@ -1,34 +0,0 @@ -package http_parser; - -import java.nio.ByteBuffer; - -public abstract class HTTPDataCallback implements http_parser.lolevel.HTTPDataCallback{ - /* - Very raw and extremly foolhardy! DANGER! - The whole Buffer concept is difficult enough to grasp as it is, - we pass in a buffer with an arbitrary position. - - The interesting data is located at position pos and is len - bytes long. - - The contract of this callback is that the buffer is - returned in the state that it was passed in, so implementing - this require good citizenship, you'll need to remember the current - position, change the position to get at the data you're interested - in and then set the position back to how you found it... - - Therefore: there is an abstract implementation that implements - cb as described above, and provides a new callback - with signature @see cb(byte[], int, int) - */ - public int cb(http_parser.lolevel.HTTPParser p, ByteBuffer buf, int pos, int len) { - byte [] by = new byte[len]; - int saved = buf.position(); - buf.position(pos); - buf.get(by); - buf.position(saved); - return cb((HTTPParser)p, by, 0, len); - } - - public abstract int cb(HTTPParser p, byte[] by, int pos, int len); -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPErrorCallback.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPErrorCallback.java deleted file mode 100644 index a74206e..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPErrorCallback.java +++ /dev/null @@ -1,12 +0,0 @@ -package http_parser; - - -import java.nio.ByteBuffer; - -public abstract class HTTPErrorCallback implements http_parser.lolevel.HTTPErrorCallback{ - public void cb (http_parser.lolevel.HTTPParser parser, String mes, ByteBuffer buf, int initial_position) { - this.cb((HTTPParser)parser, Util.error(mes, buf, initial_position)); - } - - public abstract void cb(HTTPParser parser, String error); -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPException.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPException.java deleted file mode 100644 index 9ccaf14..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPException.java +++ /dev/null @@ -1,9 +0,0 @@ -package http_parser; - -@SuppressWarnings("serial") -public class HTTPException extends RuntimeException { - -public HTTPException(String mes) { - super(mes); - } -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPMethod.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPMethod.java deleted file mode 100644 index 7c080c1..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPMethod.java +++ /dev/null @@ -1,107 +0,0 @@ -package http_parser; - -import java.nio.charset.Charset; - -public enum HTTPMethod { - HTTP_DELETE("DELETE")// = 0 - , HTTP_GET("GET") - , HTTP_HEAD("HEAD") - , HTTP_POST("POST") - , HTTP_PUT("PUT") - , HTTP_PATCH("PATCH") - /* pathological */ - , HTTP_CONNECT("CONNECT") - , HTTP_OPTIONS("OPTIONS") - , HTTP_TRACE("TRACE") - /* webdav */ - , HTTP_COPY("COPY") - , HTTP_LOCK("LOCK") - , HTTP_MKCOL("MKCOL") - , HTTP_MOVE("MOVE") - , HTTP_PROPFIND("PROPFIND") - , HTTP_PROPPATCH("PROPPATCH") - , HTTP_UNLOCK("UNLOCK") - , HTTP_REPORT("REPORT") - , HTTP_MKACTIVITY("MKACTIVITY") - , HTTP_CHECKOUT("CHECKOUT") - , HTTP_MERGE("MERGE") - , HTTP_MSEARCH("M-SEARCH") - , HTTP_NOTIFY("NOTIFY") - , HTTP_SUBSCRIBE("SUBSCRIBE") - , HTTP_UNSUBSCRIBE("UNSUBSCRIBE") - , HTTP_PURGE("PURGE") - ; - - private static Charset ASCII; - static { - ASCII = Charset.forName("US-ASCII");; - } - public byte[] bytes; - - HTTPMethod(String name) { - // good grief, Charlie Brown, the following is necessary because - // java is retarded: - // illegal reference to static field from initializer - // this.bytes = name.getBytes(ASCII); - // yet it's not illegal to reference static fields from - // methods called from initializer. - init(name); - } - public static HTTPMethod parse(String s) { - if ("HTTP_DELETE".equalsIgnoreCase(s)) {return HTTP_DELETE;} - else if ("DELETE".equalsIgnoreCase(s)) {return HTTP_DELETE;} - else if ("HTTP_GET".equalsIgnoreCase(s)) {return HTTP_GET;} - else if ("GET".equalsIgnoreCase(s)) {return HTTP_GET;} - else if ("HTTP_HEAD".equalsIgnoreCase(s)) {return HTTP_HEAD;} - else if ("HEAD".equalsIgnoreCase(s)) {return HTTP_HEAD;} - else if ("HTTP_POST".equalsIgnoreCase(s)) {return HTTP_POST;} - else if ("POST".equalsIgnoreCase(s)) {return HTTP_POST;} - else if ("HTTP_PUT".equalsIgnoreCase(s)) {return HTTP_PUT;} - else if ("PUT".equalsIgnoreCase(s)) {return HTTP_PUT;} - else if ("HTTP_PATCH".equalsIgnoreCase(s)) {return HTTP_PATCH;} - else if ("PATCH".equalsIgnoreCase(s)) {return HTTP_PATCH;} - else if ("HTTP_CONNECT".equalsIgnoreCase(s)) {return HTTP_CONNECT;} - else if ("CONNECT".equalsIgnoreCase(s)) {return HTTP_CONNECT;} - else if ("HTTP_OPTIONS".equalsIgnoreCase(s)) {return HTTP_OPTIONS;} - else if ("OPTIONS".equalsIgnoreCase(s)) {return HTTP_OPTIONS;} - else if ("HTTP_TRACE".equalsIgnoreCase(s)) {return HTTP_TRACE;} - else if ("TRACE".equalsIgnoreCase(s)) {return HTTP_TRACE;} - else if ("HTTP_COPY".equalsIgnoreCase(s)) {return HTTP_COPY;} - else if ("COPY".equalsIgnoreCase(s)) {return HTTP_COPY;} - else if ("HTTP_LOCK".equalsIgnoreCase(s)) {return HTTP_LOCK;} - else if ("LOCK".equalsIgnoreCase(s)) {return HTTP_LOCK;} - else if ("HTTP_MKCOL".equalsIgnoreCase(s)) {return HTTP_MKCOL;} - else if ("MKCOL".equalsIgnoreCase(s)) {return HTTP_MKCOL;} - else if ("HTTP_MOVE".equalsIgnoreCase(s)) {return HTTP_MOVE;} - else if ("MOVE".equalsIgnoreCase(s)) {return HTTP_MOVE;} - else if ("HTTP_PROPFIND".equalsIgnoreCase(s)){return HTTP_PROPFIND;} - else if ("PROPFIND".equalsIgnoreCase(s)) {return HTTP_PROPFIND;} - else if ("HTTP_PROPPATCH".equalsIgnoreCase(s)){return HTTP_PROPPATCH;} - else if ("PROPPATCH".equalsIgnoreCase(s)) {return HTTP_PROPPATCH;} - else if ("HTTP_UNLOCK".equalsIgnoreCase(s)) {return HTTP_UNLOCK;} - else if ("UNLOCK".equalsIgnoreCase(s)) {return HTTP_UNLOCK;} - else if ("HTTP_REPORT".equalsIgnoreCase(s)) {return HTTP_REPORT;} - else if ("REPORT".equalsIgnoreCase(s)){return HTTP_REPORT;} - else if ("HTTP_MKACTIVITY".equalsIgnoreCase(s)) {return HTTP_MKACTIVITY;} - else if ("MKACTIVITY".equalsIgnoreCase(s)){return HTTP_MKACTIVITY;} - else if ("HTTP_CHECKOUT".equalsIgnoreCase(s)) {return HTTP_CHECKOUT;} - else if ("CHECKOUT".equalsIgnoreCase(s)){return HTTP_CHECKOUT;} - else if ("HTTP_MERGE".equalsIgnoreCase(s)) {return HTTP_MERGE;} - else if ("MERGE".equalsIgnoreCase(s)){return HTTP_MERGE;} - else if ("HTTP_MSEARCH".equalsIgnoreCase(s)) {return HTTP_MSEARCH;} - else if ("M-SEARCH".equalsIgnoreCase(s)) {return HTTP_MSEARCH;} - else if ("HTTP_NOTIFY".equalsIgnoreCase(s)) {return HTTP_NOTIFY;} - else if ("NOTIFY".equalsIgnoreCase(s)) {return HTTP_NOTIFY;} - else if ("HTTP_SUBSCRIBE".equalsIgnoreCase(s)) {return HTTP_SUBSCRIBE;} - else if ("SUBSCRIBE".equalsIgnoreCase(s)) {return HTTP_SUBSCRIBE;} - else if ("HTTP_UNSUBSCRIBE".equalsIgnoreCase(s)) {return HTTP_UNSUBSCRIBE;} - else if ("UNSUBSCRIBE".equalsIgnoreCase(s)) {return HTTP_UNSUBSCRIBE;} - else if ("PATCH".equalsIgnoreCase(s)) {return HTTP_PATCH;} - else if ("PURGE".equalsIgnoreCase(s)) {return HTTP_PURGE;} - else {return null;} - } - void init (String name) { - ASCII = null == ASCII ? Charset.forName("US-ASCII") : ASCII; - this.bytes = name.getBytes(ASCII); - } -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPParser.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPParser.java deleted file mode 100644 index 7ab4fb4..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPParser.java +++ /dev/null @@ -1,36 +0,0 @@ -package http_parser; - -import java.nio.ByteBuffer; - -public class HTTPParser extends http_parser.lolevel.HTTPParser { - - public HTTPParser() { super(); } - public HTTPParser(ParserType type) { super(type); } - - public int getMajor() { - return super.http_major; - } - - public int getMinor() { - return super.http_minor; - } - - public int getStatusCode() { - return super.status_code; - } - - public HTTPMethod getHTTPMethod() { - return super.method; - } - - public boolean getUpgrade() { - return super.upgrade; - } - - public boolean shouldKeepAlive() { - return super.http_should_keep_alive(); - } - public void execute(ParserSettings settings, ByteBuffer data) { - this.execute(settings.getLoLevelSettings(), data); - } -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPParserUrl.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPParserUrl.java deleted file mode 100644 index d371634..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/HTTPParserUrl.java +++ /dev/null @@ -1,76 +0,0 @@ -package http_parser; - -import http_parser.lolevel.*; -import http_parser.lolevel.HTTPParser; - -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.Arrays; - -/** - */ -public class HTTPParserUrl { - - public int field_set; - public int port; - - public FieldData[] field_data = new FieldData[]{ - new FieldData(0,0), - new FieldData(0,0), - new FieldData(0,0), - new FieldData(0,0), - new FieldData(0,0), - new FieldData(0,0) - }; //UF_MAX - - public HTTPParserUrl(){} - - public HTTPParserUrl(int field_set, int port, FieldData[] field_data){ - this.field_set = field_set; - this.port = port; - this.field_data = field_data; - } - - public String getFieldValue(HTTPParser.UrlFields field, ByteBuffer data) throws UnsupportedEncodingException { - FieldData fd = this.field_data[field.getIndex()]; - if(fd.off == 0 & fd.len == 0) return ""; - byte[] dst = new byte[fd.len]; - int current_pos = data.position(); - data.position(fd.off); - data.get(dst,0,fd.len); - data.position(current_pos); - String v = new String(dst, "UTF8"); - return v; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - HTTPParserUrl that = (HTTPParserUrl) o; - - if (field_set != that.field_set) return false; - if (port != that.port) return false; - if (!Arrays.equals(field_data, that.field_data)) return false; - - return true; - } - - @Override - public int hashCode() { - int result = field_set; - result = 31 * result + port; - result = 31 * result + Arrays.hashCode(field_data); - return result; - } - - @Override - public String toString() { - return "HTTPParserUrl{" + - "field_set=" + field_set + - ", port=" + port + - ", field_data=" + (field_data == null ? null : Arrays.asList(field_data)) + - '}'; - } -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/ParserSettings.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/ParserSettings.java deleted file mode 100644 index 9a5e6e9..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/ParserSettings.java +++ /dev/null @@ -1,256 +0,0 @@ -package http_parser; - - - -import primitive.collection.ByteList; - -public class ParserSettings extends http_parser.lolevel.ParserSettings { - - public HTTPCallback on_message_begin; - public HTTPDataCallback on_path; - public HTTPDataCallback on_query_string; - public HTTPDataCallback on_url; - public HTTPDataCallback on_fragment; - public HTTPCallback on_status_complete; - public HTTPDataCallback on_header_field; - public HTTPDataCallback on_header_value; - - public HTTPCallback on_headers_complete; - public HTTPDataCallback on_body; - public HTTPCallback on_message_complete; - - public HTTPErrorCallback on_error; - - private HTTPCallback _on_message_begin; - private HTTPDataCallback _on_path; - private HTTPDataCallback _on_query_string; - private HTTPDataCallback _on_url; - private HTTPDataCallback _on_fragment; - private HTTPCallback _on_status_complete; - private HTTPDataCallback _on_header_field; - private HTTPDataCallback _on_header_value; - private HTTPCallback _on_headers_complete; - private HTTPDataCallback _on_body; - private HTTPCallback _on_message_complete; - private HTTPErrorCallback _on_error; - - private http_parser.lolevel.ParserSettings settings; - - protected ByteList field = new ByteList(); - protected ByteList value = new ByteList(); - protected ByteList body = new ByteList(); - - public ParserSettings() { - this.settings = new http_parser.lolevel.ParserSettings(); - createMirrorCallbacks(); - attachCallbacks(); - } - - protected http_parser.lolevel.ParserSettings getLoLevelSettings() { - return this.settings; - } - - private void createMirrorCallbacks() { - this._on_message_begin = new HTTPCallback() { - public int cb(HTTPParser p) { - if (null != ParserSettings.this.on_message_begin) { - return ParserSettings.this.on_message_begin.cb(p); - } - return 0; - } - }; - this._on_path = new HTTPDataCallback() { - @Override - public int cb(HTTPParser p, byte[] by, int pos, int len) { - if (null != ParserSettings.this.on_path) { - return ParserSettings.this.on_path.cb(p, by, pos, len); - } - return 0; - } - }; - this._on_query_string = new HTTPDataCallback() { - @Override - public int cb(HTTPParser p, byte[] by, int pos, int len) { - if (null != ParserSettings.this.on_query_string) { - return ParserSettings.this.on_query_string.cb(p, by, pos, len); - } - return 0; - } - }; - this._on_url = new HTTPDataCallback() { - @Override - public int cb(HTTPParser p, byte[] by, int pos, int len) { - if (null != ParserSettings.this.on_url) { - return ParserSettings.this.on_url.cb(p, by, pos, len); - } - return 0; - } - }; - this._on_fragment = new HTTPDataCallback() { - @Override - public int cb(HTTPParser p, byte[] by, int pos, int len) { - if (null != ParserSettings.this.on_fragment) { - return ParserSettings.this.on_fragment.cb(p, by, pos, len); - } - return 0; - } - }; - this._on_status_complete = new HTTPCallback() { - @Override - public int cb(HTTPParser p) { - if (null != ParserSettings.this.on_status_complete) { - return ParserSettings.this.on_status_complete.cb(p); - } - return 0; - } - }; - this._on_error = new HTTPErrorCallback() { - @Override - public void cb(HTTPParser parser, String error) { - if (null != ParserSettings.this.on_error) { - ParserSettings.this.on_error.cb(parser, error); - } else { - throw new HTTPException(error); - } - - } - }; - - - -// (on_header_field and on_header_value shortened to on_h_*) -// ------------------------ ------------ -------------------------------------------- -// | State (prev. callback) | Callback | Description/action | -// ------------------------ ------------ -------------------------------------------- -// | nothing (first call) | on_h_field | Allocate new buffer and copy callback data | -// | | | into it | -// ------------------------ ------------ -------------------------------------------- -// | value | on_h_field | New header started. | -// | | | Copy current name,value buffers to headers | -// | | | list and allocate new buffer for new name | -// ------------------------ ------------ -------------------------------------------- -// | field | on_h_field | Previous name continues. Reallocate name | -// | | | buffer and append callback data to it | -// ------------------------ ------------ -------------------------------------------- -// | field | on_h_value | Value for current header started. Allocate | -// | | | new buffer and copy callback data to it | -// ------------------------ ------------ -------------------------------------------- -// | value | on_h_value | Value continues. Reallocate value buffer | -// | | | and append callback data to it | -// ------------------------ ------------ -------------------------------------------- - this._on_header_field = new HTTPDataCallback() { - @Override - public int cb(HTTPParser p, byte[] by, int pos, int len) { - // previous value complete, call on_value with full value, reset value. - if (0 != ParserSettings.this.value.size()) { - // check we're even interested... - if (null != ParserSettings.this.on_header_value) { - byte [] valueArr = ParserSettings.this.value.toArray(); - int ret = ParserSettings.this.on_header_value.cb(p, valueArr, 0, valueArr.length); - if (0 != ret) { - return ret; - } - ParserSettings.this.value.clear(); - } - } - - if (null == ParserSettings.this.on_header_field) { - return 0; - } - - ParserSettings.this.field.addAll(by); - return 0; - } - }; - this._on_header_value = new HTTPDataCallback() { - @Override - public int cb(HTTPParser p, byte[] by, int pos, int len) { - - // previous field complete, call on_field with full field value, reset field. - if (0 != ParserSettings.this.field.size()) { - // check we're even interested... - if (null != ParserSettings.this.on_header_field) { - byte [] fieldArr = ParserSettings.this.field.toArray(); - int ret = ParserSettings.this.on_header_field.cb(p, fieldArr, 0, fieldArr.length); - if (0 != ret) { - return ret; - } - ParserSettings.this.field.clear(); - } - } - - if (null == ParserSettings.this.on_header_value) { - return 0; - } - ParserSettings.this.value.addAll(by); - return 0; - } - }; - this._on_headers_complete = new HTTPCallback() { - @Override - public int cb(HTTPParser parser) { - // is there an uncompleted value ... ? - if (0 != ParserSettings.this.value.size()) { - // check we're even interested... - if (null != ParserSettings.this.on_header_value) { - byte [] valueArr = ParserSettings.this.value.toArray(); - int ret = ParserSettings.this.on_header_value.cb(parser, valueArr, 0, valueArr.length); - if (0 != ret) { - return ret; - } - ParserSettings.this.value.clear(); - } - } - if (null != ParserSettings.this.on_headers_complete) { - return ParserSettings.this.on_headers_complete.cb(parser); - } - return 0; - } - - }; - this._on_body = new HTTPDataCallback() { - @Override - public int cb(HTTPParser p, byte[] by, int pos, int len) { - if (null != ParserSettings.this.on_body) { - ParserSettings.this.body.addAll(by, pos, len); - } - return 0; - } - }; - - this._on_message_complete = new HTTPCallback() { - @Override - public int cb(HTTPParser parser) { - if (null != ParserSettings.this.on_body) { - byte [] body = ParserSettings.this.body.toArray(); - int ret = ParserSettings.this.on_body.cb(parser, body, 0, body.length); - if (0!=ret) { - return ret; - } - ParserSettings.this.body.clear(); - } - if (null != ParserSettings.this.on_message_complete) { - return ParserSettings.this.on_message_complete.cb(parser); - } - return 0; - } - }; - - } - - private void attachCallbacks() { - // these are certainly set, because we mirror them ... - this.settings.on_message_begin = this._on_message_begin; - this.settings.on_path = this._on_path; - this.settings.on_query_string = this._on_query_string; - this.settings.on_url = this._on_url; - this.settings.on_fragment = this._on_fragment; - this.settings.on_status_complete = this._on_status_complete; - this.settings.on_header_field = this._on_header_field; - this.settings.on_header_value = this._on_header_value; - this.settings.on_headers_complete = this._on_headers_complete; - this.settings.on_body = this._on_body; - this.settings.on_message_complete = this._on_message_complete; - this.settings.on_error = this._on_error; - } -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/ParserType.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/ParserType.java deleted file mode 100644 index a51f5b4..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/ParserType.java +++ /dev/null @@ -1,13 +0,0 @@ -package http_parser; - -public enum ParserType { -HTTP_REQUEST, HTTP_RESPONSE, HTTP_BOTH; - - public static ParserType parse(String s) { - if ("HTTP_REQUEST".equalsIgnoreCase(s)) { return HTTP_REQUEST; } - else if ("HTTP_RESPONSE".equalsIgnoreCase(s)) { return HTTP_RESPONSE; } - else if ("HTTP_BOTH".equalsIgnoreCase(s)) { return HTTP_BOTH; } - else { return null; } - } -} - diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/Util.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/Util.java deleted file mode 100644 index 575003a..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/Util.java +++ /dev/null @@ -1,111 +0,0 @@ -package http_parser; - -import java.nio.ByteBuffer; - -public class Util { -// public static String toString(http_parser.lolevel.HTTPParser p) { -// StringBuilder builder = new StringBuilder(); -// -// // the stuff up to the break is ephermeral and only meaningful -// // while the parser is parsing. In general, this method is -// // probably only useful during debugging. -// -// builder.append("state :"); builder.append(p.state); builder.append("\n"); -// builder.append("header_state :"); builder.append(p.header_state); builder.append("\n"); -// builder.append("strict :"); builder.append(p.strict); builder.append("\n"); -// builder.append("index :"); builder.append(p.index); builder.append("\n"); -// builder.append("flags :"); builder.append(p.flags); builder.append("\n"); -// builder.append("nread :"); builder.append(p.nread); builder.append("\n"); -// builder.append("content_length :"); builder.append(p.content_length); builder.append("\n"); -// -// -// builder.append("type :"); builder.append(p.type); builder.append("\n"); -// builder.append("http_major :"); builder.append(p.http_major); builder.append("\n"); -// builder.append("http_minor :"); builder.append(p.http_minor); builder.append("\n"); -// builder.append("status_code :"); builder.append(p.status_code); builder.append("\n"); -// builder.append("method :"); builder.append(p.method); builder.append("\n"); -// builder.append("upgrade :"); builder.append(p.upgrade); builder.append("\n"); -// -// return builder.toString(); -// -// } - - public static String error (String mes, ByteBuffer b, int beginning) { - // the error message should look like this: - // - // Bla expected something, but it's not there (mes) - // GEt / HTTP 1_1 - // ............^. - // - // |----------------- 72 -------------------------| - - // This is ridiculously complicated and probably riddled with - // off-by-one errors, should be moved into high level interface. - // TODO. - - // also: need to keep track of the initial buffer position in - // execute so that we don't screw up any `mark()` that may have - // been set outside of our control to be nice. - - final int mes_width = 72; - int p = b.position(); // error position - int end = b.limit(); // this is the end - int m = end - beginning; // max mes length - - StringBuilder builder = new StringBuilder(); - int p_adj = p; - - byte [] orig = new byte[0]; - if (m <= mes_width) { - orig = new byte[m]; - b.position(beginning); - b.get(orig, 0, m); - p_adj = p-beginning; - - - } else { - // we'll need to trim bit off the beginning and/or end - orig = new byte[mes_width]; - // three possibilities: - // a.) plenty of stuff around p - // b.) plenty of stuff in front of p - // c.) plenty of stuff behind p - // CAN'T be not enough stuff aorund p in total, because - // m>meswidth (see if to this else) - - int before = p-beginning; - int after = end - p; - if ( (before > mes_width/2) && (after > mes_width/2)) { - // plenty of stuff in front of and behind error - p_adj = mes_width/2; - b.position(p - mes_width/2); - b.get(orig, 0, mes_width); - } else if (before <= mes_width/2) { - // take all of the begining. - b.position(beginning); - // and as much of the rest as possible - - b.get(orig, 0, mes_width); - - } else { - // plenty of stuff before - before = end-mes_width; - b.position(before); - p_adj = p - before; - b.get(orig, 0, mes_width); - } - } - - builder.append(new String(orig)); - builder.append("\n"); - for (int i = 0; i!= p_adj; ++i) { - builder.append("."); - } - builder.append("^"); - - - b.position(p); // restore position - return builder.toString(); - - } -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/lolevel/HTTPCallback.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/lolevel/HTTPCallback.java deleted file mode 100644 index 95c29b3..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/lolevel/HTTPCallback.java +++ /dev/null @@ -1,5 +0,0 @@ -package http_parser.lolevel; - -public interface HTTPCallback { - public int cb (HTTPParser parser); -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/lolevel/HTTPDataCallback.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/lolevel/HTTPDataCallback.java deleted file mode 100644 index 6cad156..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/lolevel/HTTPDataCallback.java +++ /dev/null @@ -1,25 +0,0 @@ -package http_parser.lolevel; - -import java.nio.ByteBuffer; - -public interface HTTPDataCallback { - /* - very raw and extremly foolhardy! DANGER! - The whole Buffer concept is difficult enough to grasp as it is, - we pass in a buffer with an arbitrary position. - - The interesting data is located at position pos and is len - bytes long. - - The contract of this callback is that the buffer is - returned in the state that it was passed in, so implementing - this require good citizenship, you'll need to remember the current - position, change the position to get at the data you're interested - in and then set the position back to how you found it... - - //TODO: there should be an abstract implementation that implements - cb as described above, marks it final an provides a new callback - with signature cb(byte[], int, int) - */ - public int cb(HTTPParser p, ByteBuffer buf, int pos, int len); -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/lolevel/HTTPErrorCallback.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/lolevel/HTTPErrorCallback.java deleted file mode 100644 index d38d9d4..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/lolevel/HTTPErrorCallback.java +++ /dev/null @@ -1,7 +0,0 @@ -package http_parser.lolevel; - -import java.nio.ByteBuffer; - -public interface HTTPErrorCallback { - public void cb (HTTPParser parser, String mes, ByteBuffer buf, int initial_position); -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/lolevel/HTTPParser.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/lolevel/HTTPParser.java deleted file mode 100644 index 42022ec..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/lolevel/HTTPParser.java +++ /dev/null @@ -1,2161 +0,0 @@ -package http_parser.lolevel; - -import java.nio.ByteBuffer; -import http_parser.HTTPException; -import http_parser.HTTPMethod; -import http_parser.HTTPParserUrl; -import http_parser.ParserType; -import static http_parser.lolevel.HTTPParser.C.*; -import static http_parser.lolevel.HTTPParser.State.*; - -public class HTTPParser { - /* lots of unsigned chars here, not sure what - to about them, `bytes` in java suck... */ - - ParserType type; - State state; - HState header_state; - boolean strict; - - int index; - int flags; // TODO - - int nread; - long content_length; - - int p_start; // updated each call to execute to indicate where the buffer was before we began calling it. - - /** READ-ONLY **/ - public int http_major; - public int http_minor; - public int status_code; /* responses only */ - public HTTPMethod method; /* requests only */ - - /* true = Upgrade header was present and the parser has exited because of that. - * false = No upgrade header present. - * Should be checked when http_parser_execute() returns in addition to - * error checking. - */ - public boolean upgrade; - - /** PUBLIC **/ - // TODO : this is used in c to maintain application state. - // is this even necessary? we have state in java ? - // consider - // Object data; /* A pointer to get hook to the "connection" or "socket" object */ - - - /* - * technically we could combine all of these (except for url_mark) into one - * variable, saving stack space, but it seems more clear to have them - * separated. - */ - int header_field_mark = -1; - int header_value_mark = -1; - int url_mark = -1; - int body_mark = -1; - - /** - * Construct a Parser for ParserType.HTTP_BOTH, meaning it - * determines whether it's parsing a request or a response. - */ - public HTTPParser() { - this(ParserType.HTTP_BOTH); - } - - /** - * Construct a Parser and initialise it to parse either - * requests or responses. - */ - public HTTPParser(ParserType type) { - this.type = type; - switch(type) { - case HTTP_REQUEST: - this.state = State.start_req; - break; - case HTTP_RESPONSE: - this.state = State.start_res; - break; - case HTTP_BOTH: - this.state = State.start_req_or_res; - break; - default: - throw new HTTPException("can't happen, invalid ParserType enum"); - } - } - - /* - * Utility to facilitate System.out.println style debugging (the way god intended) - */ - static void p(Object o) {System.out.println(o);} - - /** Comment from C version follows - * - * Our URL parser. - * - * This is designed to be shared by http_parser_execute() for URL validation, - * hence it has a state transition + byte-for-byte interface. In addition, it - * is meant to be embedded in http_parser_parse_url(), which does the dirty - * work of turning state transitions URL components for its API. - * - * This function should only be invoked with non-space characters. It is - * assumed that the caller cares about (and can detect) the transition between - * URL and non-URL states by looking for these. - */ - public State parse_url_char(byte ch) { - - int chi = ch & 0xff; // utility, ch without signedness for table lookups. - - if(SPACE == ch){ - throw new HTTPException("space as url char"); - } - - switch(state) { - case req_spaces_before_url: - /* Proxied requests are followed by scheme of an absolute URI (alpha). - * All methods except CONNECT are followed by '/' or '*'. - */ - if(SLASH == ch || STAR == ch){ - return req_path; - } - if(isAtoZ(ch)){ - return req_schema; - } - break; - case req_schema: - if(isAtoZ(ch)){ - return req_schema; - } - if(COLON == ch){ - return req_schema_slash; - } - break; - case req_schema_slash: - if(SLASH == ch){ - return req_schema_slash_slash; - } - break; - case req_schema_slash_slash: - if(SLASH == ch){ - return req_host_start; - } - break; - case req_host_start: - if (ch == (byte)'[') { - return req_host_v6_start; - } - if (isHostChar(ch)) { - return req_host; - } - break; - - case req_host: - if (isHostChar(ch)) { - return req_host; - } - - /* FALLTHROUGH */ - case req_host_v6_end: - switch (ch) { - case ':': - return req_port_start; - case '/': - return req_path; - case '?': - return req_query_string_start; - } - break; - - case req_host_v6: - if (ch == ']') { - return req_host_v6_end; - } - - /* FALLTHROUGH */ - case req_host_v6_start: - if (isHex(ch) || ch == ':') { - return req_host_v6; - } - break; - - case req_port: - switch (ch) { - case '/': - return req_path; - case '?': - return req_query_string_start; - } - - /* FALLTHROUGH */ - case req_port_start: - if (isDigit(ch)) { - return req_port; - } - break; - - case req_path: - if (isNormalUrlChar(chi)) { - return req_path; - } - switch (ch) { - case '?': - return req_query_string_start; - case '#': - return req_fragment_start; - } - - break; - - case req_query_string_start: - case req_query_string: - if (isNormalUrlChar(chi)) { - return req_query_string; - } - - switch (ch) { - case '?': - /* allow extra '?' in query string */ - return req_query_string; - - case '#': - return req_fragment_start; - } - - break; - - case req_fragment_start: - if (isNormalUrlChar(chi)) { - return req_fragment; - } - switch (ch) { - case '?': - return req_fragment; - - case '#': - return req_fragment_start; - } - break; - - case req_fragment: - if (isNormalUrlChar(ch)) { - return req_fragment; - } - - switch (ch) { - case '?': - case '#': - return req_fragment; - } - - break; - default: - break; - } - - /* We should never fall out of the switch above unless there's an error */ - return dead; - } - - /** Execute the parser with the currently available data contained in - * the buffer. The buffers position() and limit() need to be set - * correctly (obviously) and a will be updated approriately when the - * method returns to reflect the consumed data. - */ - public int execute(ParserSettings settings, ByteBuffer data) { - - int p = data.position(); - this.p_start = p; // this is used for pretty printing errors. - // and returning the amount of processed bytes. - - - // In case the headers don't provide information about the content - // length, `execute` needs to be called with an empty buffer to - // indicate that all the data has been send be the client/server, - // else there is no way of knowing the message is complete. - int len = (data.limit() - data.position()); - if (0 == len) { -// if (State.body_identity_eof == state) { -// settings.call_on_message_complete(this); -// } - switch (state) { - case body_identity_eof: - settings.call_on_message_complete(this); - return data.position() - this.p_start; - - case dead: - case start_req_or_res: - case start_res: - case start_req: - return data.position() - this.p_start; - - default: - // should we really consider this an error!? - throw new HTTPException("empty bytes! "+state); // error - } - } - - - // in case the _previous_ call to the parser only has data to get to - // the middle of certain fields, we need to update marks to point at - // the beginning of the current buffer. - switch (state) { - case header_field: - header_field_mark = p; - break; - case header_value: - header_value_mark = p; - break; - case req_path: - case req_schema: - case req_schema_slash: - case req_schema_slash_slash: - case req_host_start: - case req_host_v6_start: - case req_host_v6: - case req_host_v6_end: - case req_host: - case req_port_start: - case req_port: - case req_query_string_start: - case req_query_string: - case req_fragment_start: - case req_fragment: - url_mark = p; - break; - } - boolean reexecute = false; - int pe = 0; - byte ch = 0; - int chi = 0; - byte c = -1; - int to_read = 0; - - // this is where the work gets done, traverse the available data... - while (data.position() != data.limit() || reexecute) { -// p(state + ": r: " + reexecute + " :: " +p ); - - if(!reexecute){ - p = data.position(); - pe = data.limit(); - ch = data.get(); // the current character to process. - chi = ch & 0xff; // utility, ch without signedness for table lookups. - c = -1; // utility variably used for up- and downcasing etc. - to_read = 0; // used to keep track of how much of body, etc. is left to read - - if (parsing_header(state)) { - ++nread; - if (nread > HTTP_MAX_HEADER_SIZE) { - return error(settings, "possible buffer overflow", data); - } - } - } - reexecute = false; -// p(state + " ::: " + ch + " : " + (((CR == ch) || (LF == ch)) ? ch : ("'" + (char)ch + "'")) +": "+p ); - - switch (state) { - /* - * this state is used after a 'Connection: close' message - * the parser will error out if it reads another message - */ - case dead: - if (CR == ch || LF == ch){ - break; - } - return error(settings, "Connection already closed", data); - - - - case start_req_or_res: - if (CR == ch || LF == ch){ - break; - } - flags = 0; - content_length = -1; - - if (H == ch) { - state = State.res_or_resp_H; - } else { - type = ParserType.HTTP_REQUEST; - method = start_req_method_assign(ch); - if (null == method) { - return error(settings, "invalid method", data); - } - index = 1; - state = State.req_method; - } - settings.call_on_message_begin(this); - break; - - - - case res_or_resp_H: - if (T == ch) { - type = ParserType.HTTP_RESPONSE; - state = State.res_HT; - } else { - if (E != ch) { - return error(settings, "not E", data); - } - type = ParserType.HTTP_REQUEST; - method = HTTPMethod.HTTP_HEAD; - index = 2; - state = State.req_method; - } - break; - - - - case start_res: - flags = 0; - content_length = -1; - - switch(ch) { - case H: - state = State.res_H; - break; - case CR: - case LF: - break; - default: - return error(settings, "Not H or CR/LF", data); - } - - settings.call_on_message_begin(this); - break; - - - - case res_H: - if (strict && T != ch) { - return error(settings, "Not T", data); - } - state = State.res_HT; - break; - case res_HT: - if (strict && T != ch) { -return error(settings, "Not T2", data); - } - state = State.res_HTT; - break; - case res_HTT: - if (strict && P != ch) { -return error(settings, "Not P", data); - } - state = State.res_HTTP; - break; - case res_HTTP: - if (strict && SLASH != ch) { -return error(settings, "Not '/'", data); - } - state = State.res_first_http_major; - break; - - - - case res_first_http_major: - if (!isDigit(ch)) { -return error(settings, "Not a digit", data); - } - http_major = (int) ch - 0x30; - state = State.res_http_major; - break; - - /* major HTTP version or dot */ - case res_http_major: - if (DOT == ch) { - state = State.res_first_http_minor; - break; - } - if (!isDigit(ch)) { -return error(settings, "Not a digit", data); - } - http_major *= 10; - http_major += (ch - 0x30); - - if (http_major > 999) { -return error(settings, "invalid http major version: ", data); - } - break; - - /* first digit of minor HTTP version */ - case res_first_http_minor: - if (!isDigit(ch)) { -return error(settings, "Not a digit", data); - } - http_minor = (int)ch - 0x30; - state = State.res_http_minor; - break; - - /* minor HTTP version or end of request line */ - case res_http_minor: - if (SPACE == ch) { - state = State.res_first_status_code; - break; - } - if (!isDigit(ch)) { -return error(settings, "Not a digit", data); - } - http_minor *= 10; - http_minor += (ch - 0x30); - if (http_minor > 999) { -return error(settings, "invalid http minor version: ", data); - } - break; - - - - case res_first_status_code: - if (!isDigit(ch)) { - if (SPACE == ch) { - break; - } -return error(settings, "Not a digit (status code)", data); - } - status_code = (int)ch - 0x30; - state = State.res_status_code; - break; - - case res_status_code: - if (!isDigit(ch)) { - switch(ch) { - case SPACE: - state = State.res_status; - break; - case CR: - state = State.res_line_almost_done; - break; - case LF: - state = State.header_field_start; - break; - default: -return error(settings, "not a valid status code", data); - } - break; - } - status_code *= 10; - status_code += (int)ch - 0x30; - if (status_code > 999) { -return error(settings, "ridiculous status code:", data); - } - - if (status_code > 99) { - settings.call_on_status_complete(this); - } - break; - - case res_status: - /* the human readable status. e.g. "NOT FOUND" - * we are not humans so just ignore this - * we are not men, we are devo. */ - - if (CR == ch) { - state = State.res_line_almost_done; - break; - } - if (LF == ch) { - state = State.header_field_start; - break; - } - break; - - case res_line_almost_done: - if (strict && LF != ch) { -return error(settings, "not LF", data); - } - state = State.header_field_start; - break; - - - - case start_req: - if (CR==ch || LF == ch) { - break; - } - flags = 0; - content_length = -1; - - if(!isAtoZ(ch)){ - return error(settings, "invalid method", data); - } - - method = start_req_method_assign(ch); - if (null == method) { - return error(settings, "invalid method", data); - } - index = 1; - state = State.req_method; - - settings.call_on_message_begin(this); - break; - - - - case req_method: - if (0 == ch) { - return error(settings, "NULL in method", data); - } - - byte [] arr = method.bytes; - - if (SPACE == ch && index == arr.length) { - state = State.req_spaces_before_url; - } else if (arr[index] == ch) { - // wuhu! - } else if (HTTPMethod.HTTP_CONNECT == method) { - if (1 == index && H == ch) { - method = HTTPMethod.HTTP_CHECKOUT; - } else if (2 == index && P == ch) { - method = HTTPMethod.HTTP_COPY; - } - } else if (HTTPMethod.HTTP_MKCOL == method) { - if (1 == index && O == ch) { - method = HTTPMethod.HTTP_MOVE; - } else if (1 == index && E == ch) { - method = HTTPMethod.HTTP_MERGE; - } else if (1 == index && DASH == ch) { /* M-SEARCH */ - method = HTTPMethod.HTTP_MSEARCH; - } else if (2 == index && A == ch) { - method = HTTPMethod.HTTP_MKACTIVITY; - } - } else if (1 == index && HTTPMethod.HTTP_POST == method) { - if(R == ch) { - method = HTTPMethod.HTTP_PROPFIND; /* or HTTP_PROPPATCH */ - }else if(U == ch){ - method = HTTPMethod.HTTP_PUT; /* or HTTP_PURGE */ - }else if(A == ch){ - method = HTTPMethod.HTTP_PATCH; - } - } else if (2 == index) { - if(HTTPMethod.HTTP_PUT == method) { - if(R == ch){ - method = HTTPMethod.HTTP_PURGE; - } - }else if(HTTPMethod.HTTP_UNLOCK == method){ - if(S == ch){ - method = HTTPMethod.HTTP_UNSUBSCRIBE; - } - } - }else if(4 == index && HTTPMethod.HTTP_PROPFIND == method && P == ch){ - method = HTTPMethod.HTTP_PROPPATCH; - } else { - return error(settings, "Invalid HTTP method", data); - } - - ++index; - break; - - - - /******************* URL *******************/ - case req_spaces_before_url: - if (SPACE == ch) { - break; - } - url_mark = p; - if(HTTPMethod.HTTP_CONNECT == method){ - state = req_host_start; - } - - state = parse_url_char(ch); - if(state == dead){ - return error(settings, "Invalid something", data); - } - break; - - - case req_schema: - case req_schema_slash: - case req_schema_slash_slash: - case req_host_start: - case req_host_v6_start: - case req_host_v6: - case req_port_start: - switch (ch) { - /* No whitespace allowed here */ - case SPACE: - case CR: - case LF: - return error(settings, "unexpected char in path", data); - default: - state = parse_url_char(ch); - if(dead == state){ - return error(settings, "unexpected char in path", data); - } - } - break; - - case req_host: - case req_host_v6_end: - case req_port: - case req_path: - case req_query_string_start: - case req_query_string: - case req_fragment_start: - case req_fragment: - switch (ch) { - case SPACE: - settings.call_on_url(this, data, url_mark, p-url_mark); - settings.call_on_path(this, data, url_mark, p - url_mark); - url_mark = -1; - state = State.req_http_start; - break; - case CR: - case LF: - http_major = 0; - http_minor = 9; - state = (CR == ch) ? req_line_almost_done : header_field_start; - settings.call_on_url(this, data, url_mark, p-url_mark); //TODO check params!!! - settings.call_on_path(this, data, url_mark, p-url_mark); - url_mark = -1; - break; - default: - state = parse_url_char(ch); - if(dead == state){ - return error(settings, "unexpected char in path", data); - } - } - break; - /******************* URL *******************/ - - - - /******************* HTTP 1.1 *******************/ - case req_http_start: - switch (ch) { - case H: - state = State.req_http_H; - break; - case SPACE: - break; - default: - return error(settings, "error in req_http_H", data); - } - break; - - case req_http_H: - if (strict && T != ch) { - return error(settings, "unexpected char", data); - } - state = State.req_http_HT; - break; - - case req_http_HT: - if (strict && T != ch) { - return error(settings, "unexpected char", data); - } - state = State.req_http_HTT; - break; - - case req_http_HTT: - if (strict && P != ch) { - return error(settings, "unexpected char", data); - } - state = State.req_http_HTTP; - break; - - case req_http_HTTP: - if (strict && SLASH != ch) { - return error(settings, "unexpected char", data); - } - state = req_first_http_major; - break; - - /* first digit of major HTTP version */ - case req_first_http_major: - if (!isDigit(ch)) { -return error(settings, "non digit in http major", data); - } - http_major = (int)ch - 0x30; - state = State.req_http_major; - break; - - /* major HTTP version or dot */ - case req_http_major: - if (DOT == ch) { - state = State.req_first_http_minor; - break; - } - - if (!isDigit(ch)) { -return error(settings, "non digit in http major", data); - } - - http_major *= 10; - http_major += (int)ch - 0x30; - - if (http_major > 999) { -return error(settings, "ridiculous http major", data); - }; - break; - - /* first digit of minor HTTP version */ - case req_first_http_minor: - if (!isDigit(ch)) { -return error(settings, "non digit in http minor", data); - } - http_minor = (int)ch - 0x30; - state = State.req_http_minor; - break; - - case req_http_minor: - if (ch == CR) { - state = State.req_line_almost_done; - break; - } - - if (ch == LF) { - state = State.header_field_start; - break; - } - - /* XXX allow spaces after digit? */ - - if (!isDigit(ch)) { -return error(settings, "non digit in http minor", data); - } - - http_minor *= 10; - http_minor += (int)ch - 0x30; - - - if (http_minor > 999) { -return error(settings, "ridiculous http minor", data); - }; - - break; - - /* end of request line */ - case req_line_almost_done: - { - if (ch != LF) { -return error(settings, "missing LF after request line", data); - } - state = header_field_start; - break; - } - - /******************* HTTP 1.1 *******************/ - - - - /******************* Header *******************/ - case header_field_start: - { - if (ch == CR) { - state = headers_almost_done; - break; - } - - if (ch == LF) { - /* they might be just sending \n instead of \r\n so this would be - * the second \n to denote the end of headers*/ - state = State.headers_almost_done; - reexecute = true; - break; - } - - c = token(ch); - - if (0 == c) { - return error(settings, "invalid char in header:", data); - } - - header_field_mark = p; - - index = 0; - state = State.header_field; - - switch (c) { - case C: - header_state = HState.C; - break; - - case P: - header_state = HState.matching_proxy_connection; - break; - - case T: - header_state = HState.matching_transfer_encoding; - break; - - case U: - header_state = HState.matching_upgrade; - break; - - default: - header_state = HState.general; - break; - } - break; - } - - - - case header_field: - { - c = token(ch); - if (0 != c) { - switch (header_state) { - case general: - break; - - case C: - index++; - header_state = (O == c ? HState.CO : HState.general); - break; - - case CO: - index++; - header_state = (N == c ? HState.CON : HState.general); - break; - - case CON: - index++; - switch (c) { - case N: - header_state = HState.matching_connection; - break; - case T: - header_state = HState.matching_content_length; - break; - default: - header_state = HState.general; - break; - } - break; - - /* connection */ - - case matching_connection: - index++; - if (index > CONNECTION.length || c != CONNECTION[index]) { - header_state = HState.general; - } else if (index == CONNECTION.length-1) { - header_state = HState.connection; - } - break; - - /* proxy-connection */ - - case matching_proxy_connection: - index++; - if (index > PROXY_CONNECTION.length || c != PROXY_CONNECTION[index]) { - header_state = HState.general; - } else if (index == PROXY_CONNECTION.length-1) { - header_state = HState.connection; - } - break; - - /* content-length */ - - case matching_content_length: - index++; - if (index > CONTENT_LENGTH.length || c != CONTENT_LENGTH[index]) { - header_state = HState.general; - } else if (index == CONTENT_LENGTH.length-1) { - header_state = HState.content_length; - } - break; - - /* transfer-encoding */ - - case matching_transfer_encoding: - index++; - if (index > TRANSFER_ENCODING.length || c != TRANSFER_ENCODING[index]) { - header_state = HState.general; - } else if (index == TRANSFER_ENCODING.length-1) { - header_state = HState.transfer_encoding; - } - break; - - /* upgrade */ - - case matching_upgrade: - index++; - if (index > UPGRADE.length || c != UPGRADE[index]) { - header_state = HState.general; - } else if (index == UPGRADE.length-1) { - header_state = HState.upgrade; - } - break; - - case connection: - case content_length: - case transfer_encoding: - case upgrade: - if (SPACE != ch) header_state = HState.general; - break; - - default: -return error(settings, "Unknown Header State", data); - } // switch: header_state - break; - } // 0 != c - - if (COLON == ch) { - settings.call_on_header_field(this, data, header_field_mark, p-header_field_mark); - header_field_mark = -1; - - state = State.header_value_start; - break; - } - - if (CR == ch) { - state = State.header_almost_done; - settings.call_on_header_field(this, data, header_field_mark, p-header_field_mark); - - header_field_mark = -1; - break; - } - - if (ch == LF) { - settings.call_on_header_field(this, data, header_field_mark, p-header_field_mark); - header_field_mark = -1; - - state = State.header_field_start; - break; - } - -return error(settings, "invalid header field", data); - } - - - - case header_value_start: - { - if ((SPACE == ch) || (TAB == ch)) break; - - header_value_mark = p; - - state = State.header_value; - index = 0; - - - if (CR == ch) { - settings.call_on_header_value(this, data, header_value_mark, p-header_value_mark); - header_value_mark = -1; - - header_state = HState.general; - state = State.header_almost_done; - break; - } - - if (LF == ch) { - settings.call_on_header_value(this, data, header_value_mark, p-header_value_mark); - header_value_mark = -1; - - state = State.header_field_start; - break; - } - - - c = upper(ch); - - switch (header_state) { - case upgrade: - flags |= F_UPGRADE; - header_state = HState.general; - break; - - case transfer_encoding: - /* looking for 'Transfer-Encoding: chunked' */ - if (C == c) { - header_state = HState.matching_transfer_encoding_chunked; - } else { - header_state = HState.general; - } - break; - - case content_length: - if (!isDigit(ch)) { -return error(settings, "Content-Length not numeric", data); - } - content_length = (int)ch - 0x30; - break; - - case connection: - /* looking for 'Connection: keep-alive' */ - if (K == c) { - header_state = HState.matching_connection_keep_alive; - /* looking for 'Connection: close' */ - } else if (C == c) { - header_state = HState.matching_connection_close; - } else { - header_state = HState.general; - } - break; - - default: - header_state = HState.general; - break; - } - break; - } // header value start - - - - case header_value: - { - - if (CR == ch) { - settings.call_on_header_value(this, data, header_value_mark, p-header_value_mark); - header_value_mark = -1; - - state = State.header_almost_done; - break; - } - - if (LF == ch) { - settings.call_on_header_value(this, data, header_value_mark, p-header_value_mark); - header_value_mark = -1; - state = header_almost_done; - reexecute = true; - break; - } - - c = upper(ch); - switch (header_state) { - case general: - break; - - case connection: - case transfer_encoding: -return error(settings, "Shouldn't be here", data); - - case content_length: - if (SPACE == ch) { - break; - } - if (!isDigit(ch)) { -return error(settings, "Content-Length not numeric", data); - } - - long t = content_length; - t *= 10; - t += (long)ch - 0x30; - - /* Overflow? */ - // t will wrap and become negative ... - if (t < content_length) { - return error(settings, "Invalid content length", data); - } - content_length = t; - break; - - /* Transfer-Encoding: chunked */ - case matching_transfer_encoding_chunked: - index++; - if (index > CHUNKED.length || c != CHUNKED[index]) { - header_state = HState.general; - } else if (index == CHUNKED.length-1) { - header_state = HState.transfer_encoding_chunked; - } - break; - - /* looking for 'Connection: keep-alive' */ - case matching_connection_keep_alive: - index++; - if (index > KEEP_ALIVE.length || c != KEEP_ALIVE[index]) { - header_state = HState.general; - } else if (index == KEEP_ALIVE.length-1) { - header_state = HState.connection_keep_alive; - } - break; - - /* looking for 'Connection: close' */ - case matching_connection_close: - index++; - if (index > CLOSE.length || c != CLOSE[index]) { - header_state = HState.general; - } else if (index == CLOSE.length-1) { - header_state = HState.connection_close; - } - break; - - case transfer_encoding_chunked: - case connection_keep_alive: - case connection_close: - if (SPACE != ch) header_state = HState.general; - break; - - default: - state = State.header_value; - header_state = HState.general; - break; - } - break; - } // header_value - - - - case header_almost_done: - if (!header_almost_done(ch)) { - return error(settings, "incorrect header ending, expecting LF", data); - } - break; - - case header_value_lws: - if (SPACE == ch || TAB == ch ){ - state = header_value_start; - } else { - state = header_field_start; - reexecute = true; - } - break; - - case headers_almost_done: - if (LF != ch) { - return error(settings, "header not properly completed", data); - } - if (0 != (flags & F_TRAILING)) { - /* End of a chunked request */ - state = new_message(); - settings.call_on_headers_complete(this); - settings.call_on_message_complete(this); - break; - } - - state = headers_done; - - if (0 != (flags & F_UPGRADE) || HTTPMethod.HTTP_CONNECT == method) { - upgrade = true; - } - - /* Here we call the headers_complete callback. This is somewhat - * different than other callbacks because if the user returns 1, we - * will interpret that as saying that this message has no body. This - * is needed for the annoying case of recieving a response to a HEAD - * request. - */ - - /* (responses to HEAD request contain a CONTENT-LENGTH header - * but no content) - * - * Consider what to do here: I don't like the idea of the callback - * interface having a different contract in the case of HEAD - * responses. The alternatives would be either to: - * - * a.) require the header_complete callback to implement a different - * interface or - * - * b.) provide an overridden execute(bla, bla, boolean - * parsingHeader) implementation ... - */ - - /*TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO */ - if (null != settings.on_headers_complete) { - settings.call_on_headers_complete(this); - //return; - } - - // if (null != settings.on_headers_complete) { - // switch (settings.on_headers_complete.cb(parser)) { - // case 0: - // break; - // - // case 1: - // flags |= F_SKIPBODY; - // break; - // - // default: - // return p - data; /* Error */ // TODO // RuntimeException ? - // } - // } - reexecute = true; - break; - - case headers_done: - if (strict && (LF != ch)) { - return error(settings, "STRICT CHECK", data); //TODO correct error msg - } - - nread = 0; - - // Exit, the rest of the connect is in a different protocol. - if (upgrade) { - state = new_message(); - settings.call_on_message_complete(this); - return data.position()-this.p_start; - } - - if (0 != (flags & F_SKIPBODY)) { - state = new_message(); - settings.call_on_message_complete(this); - } else if (0 != (flags & F_CHUNKED)) { - /* chunked encoding - ignore Content-Length header */ - state = State.chunk_size_start; - } else { - if (content_length == 0) { - /* Content-Length header given but zero: Content-Length: 0\r\n */ - state = new_message(); - settings.call_on_message_complete(this); - } else if (content_length != -1) { - /* Content-Length header given and non-zero */ - state = State.body_identity; - } else { - if (type == ParserType.HTTP_REQUEST || !http_message_needs_eof()) { - /* Assume content-length 0 - read the next */ - state = new_message(); - settings.call_on_message_complete(this); - } else { - /* Read body until EOF */ - state = State.body_identity_eof; - } - } - } - - break; - /******************* Header *******************/ - - - - - /******************* Body *******************/ - case body_identity: - to_read = min(pe - p, content_length); //TODO change to use buffer? - body_mark = p; - - if (to_read > 0) { - settings.call_on_body(this, data, p, to_read); - data.position(p+to_read); - content_length -= to_read; - - if (content_length == 0) { - state = message_done; - reexecute = true; - } - } - break; - - - - case body_identity_eof: - to_read = pe - p; // TODO change to use buffer ? - if (to_read > 0) { - settings.call_on_body(this, data, p, to_read); - data.position(p+to_read); - } - break; - - case message_done: - state = new_message(); - settings.call_on_message_complete(this); - break; - /******************* Body *******************/ - - - - /******************* Chunk *******************/ - case chunk_size_start: - if (1 != this.nread) { -return error(settings, "nread != 1 (chunking)", data); - - } - if (0 == (flags & F_CHUNKED)) { -return error(settings, "not chunked", data); - } - - c = UNHEX[chi]; - if (c == -1) { -return error(settings, "invalid hex char in chunk content length", data); - } - content_length = c; - state = State.chunk_size; - break; - - - - case chunk_size: - if (0 == (flags & F_CHUNKED)) { - return error(settings, "not chunked", data); - } - - if (CR == ch) { - state = State.chunk_size_almost_done; - break; - } - - c = UNHEX[chi]; - - if (c == -1) { - if (SEMI == ch || SPACE == ch) { - state = State.chunk_parameters; - break; - } - return error(settings, "invalid hex char in chunk content length", data); - } - long t = content_length; - - t *= 16; - t += c; - if(t < content_length){ - return error(settings, "invalid content length", data); - } - content_length = t; - break; - - - - case chunk_parameters: - if (0 == (flags & F_CHUNKED)) { -return error(settings, "not chunked", data); - } - /* just ignore this shit. TODO check for overflow */ - if (CR == ch) { - state = State.chunk_size_almost_done; - break; - } - break; - - - - case chunk_size_almost_done: - if (0 == (flags & F_CHUNKED)) { -return error(settings, "not chunked", data); - } - if (strict && LF != ch) { -return error(settings, "expected LF at end of chunk size", data); - } - - this.nread = 0; - - if (0 == content_length) { - flags |= F_TRAILING; - state = State.header_field_start; - } else { - state = State.chunk_data; - } - break; - - - - case chunk_data: - //TODO Apply changes from C version for s_chunk_data - if (0 == (flags & F_CHUNKED)) { - return error(settings, "not chunked", data); - } - - to_read = min(pe-p, content_length); - if (to_read > 0) { - settings.call_on_body(this, data, p, to_read); - data.position(p+to_read); - } - - if (to_read == content_length) { - state = State.chunk_data_almost_done; - } - - content_length -= to_read; - break; - - - - case chunk_data_almost_done: - if (0 == (flags & F_CHUNKED)) { -return error(settings, "not chunked", data); - } - if (strict && CR != ch) { -return error(settings, "chunk data terminated incorrectly, expected CR", data); - } - state = State.chunk_data_done; - //TODO CALLBACK_DATA(body) - // settings.call_on_body(this, data,p,?); - break; - - - - case chunk_data_done: - if (0 == (flags & F_CHUNKED)) { -return error(settings, "not chunked", data); - } - if (strict && LF != ch) { -return error(settings, "chunk data terminated incorrectly, expected LF", data); - } - state = State.chunk_size_start; - break; - /******************* Chunk *******************/ - - - - default: -return error(settings, "unhandled state", data); - - } // switch - } // while - - p = data.position(); - - - /* Reaching this point assumes that we only received part of a - * message, inform the callbacks about the progress made so far*/ - - settings.call_on_header_field(this, data, header_field_mark, p-header_field_mark); - settings.call_on_header_value(this, data, header_value_mark, p-header_value_mark); - settings.call_on_url (this, data, url_mark, p-url_mark); - settings.call_on_path (this, data, url_mark, p-url_mark); - - return data.position()-this.p_start; - } // execute - - int error (ParserSettings settings, String mes, ByteBuffer data) { - settings.call_on_error(this, mes, data, this.p_start); - this.state = State.dead; - return data.position()-this.p_start; - } - - public boolean http_message_needs_eof() { - if(type == ParserType.HTTP_REQUEST){ - return false; - } - /* See RFC 2616 section 4.4 */ - if ((status_code / 100 == 1) || /* 1xx e.g. Continue */ - (status_code == 204) || /* No Content */ - (status_code == 304) || /* Not Modified */ - (flags & F_SKIPBODY) != 0) { /* response to a HEAD request */ - return false; - } - if ((flags & F_CHUNKED) != 0 || content_length != -1) { - return false; - } - - return true; - } - - /* If http_should_keep_alive() in the on_headers_complete or - * on_message_complete callback returns true, then this will be should be - * the last message on the connection. - * If you are the server, respond with the "Connection: close" header. - * If you are the client, close the connection. - */ - public boolean http_should_keep_alive() { - if (http_major > 0 && http_minor > 0) { - /* HTTP/1.1 */ - if ( 0 != (flags & F_CONNECTION_CLOSE) ) { - return false; - } - } else { - /* HTTP/1.0 or earlier */ - if ( 0 == (flags & F_CONNECTION_KEEP_ALIVE) ) { - return false; - } - } - return !http_message_needs_eof(); - } - - public int parse_url(ByteBuffer data, boolean is_connect, HTTPParserUrl u) { - - UrlFields uf = UrlFields.UF_MAX; - UrlFields old_uf = UrlFields.UF_MAX; - u.port = 0; - u.field_set = 0; - state = (is_connect ? State.req_host_start : State.req_spaces_before_url); - int p_init = data.position(); - int p = 0; - byte ch = 0; - while (data.position() != data.limit()) { - p = data.position(); - ch = data.get(); - state = parse_url_char(ch); - switch(state) { - case dead: - return 1; - - /* Skip delimeters */ - case req_schema_slash: - case req_schema_slash_slash: - case req_host_start: - case req_host_v6_start: - case req_host_v6_end: - case req_port_start: - case req_query_string_start: - case req_fragment_start: - continue; - - case req_schema: - uf = UrlFields.UF_SCHEMA; - break; - - case req_host: - case req_host_v6: - uf = UrlFields.UF_HOST; - break; - - case req_port: - uf = UrlFields.UF_PORT; - break; - - case req_path: - uf = UrlFields.UF_PATH; - break; - - case req_query_string: - uf = UrlFields.UF_QUERY; - break; - - case req_fragment: - uf = UrlFields.UF_FRAGMENT; - break; - - default: - return 1; - } - /* Nothing's changed; soldier on */ - if (uf == old_uf) { - u.field_data[uf.getIndex()].len++; - continue; - } - - u.field_data[uf.getIndex()].off = p - p_init; - u.field_data[uf.getIndex()].len = 1; - - u.field_set |= (1 << uf.getIndex()); - old_uf = uf; - - } - - /* CONNECT requests can only contain "hostname:port" */ - if (is_connect && u.field_set != ((1 << UrlFields.UF_HOST.getIndex())|(1 << UrlFields.UF_PORT.getIndex()))) { - return 1; - } - - /* Make sure we don't end somewhere unexpected */ - switch (state) { - case req_host_v6_start: - case req_host_v6: - case req_host_v6_end: - case req_host: - case req_port_start: - return 1; - default: - break; - } - - if (0 != (u.field_set & (1 << UrlFields.UF_PORT.getIndex()))) { - /* Don't bother with endp; we've already validated the string */ - int v = strtoi(data, p_init + u.field_data[UrlFields.UF_PORT.getIndex()].off); - - /* Ports have a max value of 2^16 */ - if (v > 0xffff) { - return 1; - } - - u.port = v; - } - - return 0; - } - - //hacky reimplementation of srttoul, tailored for our simple needs - //we only need to parse port val, so no negative values etc - int strtoi(ByteBuffer data, int start_pos) { - data.position(start_pos); - byte ch; - String str = ""; - while(data.position() < data.limit()) { - ch = data.get(); - if(Character.isWhitespace((char)ch)){ - continue; - } - if(isDigit(ch)){ - str = str + (char)ch; //TODO replace with something less hacky - }else{ - break; - } - } - return Integer.parseInt(str); - } - - boolean isDigit(byte b) { - if (b >= 0x30 && b <=0x39) { - return true; - } - return false; - } - - boolean isHex(byte b) { - return isDigit(b) || (lower(b) >= 0x61 /*a*/ && lower(b) <= 0x66 /*f*/); - } - - boolean isAtoZ(byte b) { - byte c = lower(b); - return (c>= 0x61 /*a*/ && c <= 0x7a /*z*/); - } - - - byte lower (byte b) { - return (byte)(b|0x20); - } - - byte upper(byte b) { - char c = (char)(b); - return (byte)Character.toUpperCase(c); - } - - byte token(byte b) { - if(!strict){ - return (b == (byte)' ') ? (byte)' ' : (byte)tokens[b] ; - }else{ - return (byte)tokens[b]; - } - } - - boolean isHostChar(byte ch){ - if(!strict){ - return (isAtoZ(ch)) || isDigit(ch) || DOT == ch || DASH == ch || UNDER == ch ; - }else{ - return (isAtoZ(ch)) || isDigit(ch) || DOT == ch || DASH == ch; - } - } - - boolean isNormalUrlChar(int chi) { - if(!strict){ - return (chi > 0x80) || normal_url_char[chi]; - }else{ - return normal_url_char[chi]; - } - } - - HTTPMethod start_req_method_assign(byte c){ - switch (c) { - case C: return HTTPMethod.HTTP_CONNECT; /* or COPY, CHECKOUT */ - case D: return HTTPMethod.HTTP_DELETE; - case G: return HTTPMethod.HTTP_GET; - case H: return HTTPMethod.HTTP_HEAD; - case L: return HTTPMethod.HTTP_LOCK; - case M: return HTTPMethod.HTTP_MKCOL; /* or MOVE, MKACTIVITY, MERGE, M-SEARCH */ - case N: return HTTPMethod.HTTP_NOTIFY; - case O: return HTTPMethod.HTTP_OPTIONS; - case P: return HTTPMethod.HTTP_POST; /* or PROPFIND|PROPPATCH|PUT|PATCH|PURGE */ - case R: return HTTPMethod.HTTP_REPORT; - case S: return HTTPMethod.HTTP_SUBSCRIBE; - case T: return HTTPMethod.HTTP_TRACE; - case U: return HTTPMethod.HTTP_UNLOCK; /* or UNSUBSCRIBE */ - } - return null; // ugh. - } - - boolean header_almost_done(byte ch) { - if (strict && LF != ch) { - return false; - } - - state = State.header_value_lws; - // TODO java enums support some sort of bitflag mechanism !? - switch (header_state) { - case connection_keep_alive: - flags |= F_CONNECTION_KEEP_ALIVE; - break; - case connection_close: - flags |= F_CONNECTION_CLOSE; - break; - case transfer_encoding_chunked: - flags |= F_CHUNKED; - break; - default: - break; - } - return true; - } - -// boolean headers_almost_done (byte ch, ParserSettings settings) { -// } // headers_almost_done - - - final int min (int a, int b) { - return a < b ? a : b; - } - - final int min (int a, long b) { - return a < b ? a : (int)b; - } - - /* probably not the best place to hide this ... */ - public boolean HTTP_PARSER_STRICT; - State new_message() { - if (HTTP_PARSER_STRICT){ - return http_should_keep_alive() ? start_state() : State.dead; - } else { - return start_state(); - } - - } - - State start_state() { - return type == ParserType.HTTP_REQUEST ? State.start_req : State.start_res; - } - - - boolean parsing_header(State state) { - - switch (state) { - case chunk_data : - case chunk_data_almost_done : - case chunk_data_done : - case body_identity : - case body_identity_eof : - case message_done : - return false; - - } - return true; - } - - /* "Dial C for Constants" */ - static class C { - static final int HTTP_MAX_HEADER_SIZE = 80 * 1024; - - static final int F_CHUNKED = 1 << 0; - static final int F_CONNECTION_KEEP_ALIVE = 1 << 1; - static final int F_CONNECTION_CLOSE = 1 << 2; - static final int F_TRAILING = 1 << 3; - static final int F_UPGRADE = 1 << 4; - static final int F_SKIPBODY = 1 << 5; - - static final byte [] UPCASE = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x2d,0x00,0x2f, - 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37, 0x38,0x39,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x41,0x42,0x43,0x44,0x45,0x46,0x47, 0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f, - 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57, 0x58,0x59,0x5a,0x00,0x00,0x00,0x00,0x5f, - 0x00,0x41,0x42,0x43,0x44,0x45,0x46,0x47, 0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f, - 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57, 0x58,0x59,0x5a,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - }; - static final byte [] CONNECTION = { - 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, - }; - static final byte [] PROXY_CONNECTION = { - 0x50, 0x52, 0x4f, 0x58, 0x59, 0x2d, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, - }; - static final byte [] CONTENT_LENGTH = { - 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x2d, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, - }; - static final byte [] TRANSFER_ENCODING = { - 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x2d, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, - }; - static final byte [] UPGRADE = { - 0x55, 0x50, 0x47, 0x52, 0x41, 0x44, 0x45, - }; - static final byte [] CHUNKED = { - 0x43, 0x48, 0x55, 0x4e, 0x4b, 0x45, 0x44, - }; - static final byte [] KEEP_ALIVE = { - 0x4b, 0x45, 0x45, 0x50, 0x2d, 0x41, 0x4c, 0x49, 0x56, 0x45, - }; - static final byte [] CLOSE = { - 0x43, 0x4c, 0x4f, 0x53, 0x45, - }; - - /* Tokens as defined by rfc 2616. Also lowercases them. - * token = 1* - * separators = "(" | ")" | "<" | ">" | "@" - * | "," | ";" | ":" | "\" | <"> - * | "/" | "[" | "]" | "?" | "=" - * | "{" | "}" | SP | HT - */ - - static final char [] tokens = { -/* 0 nul 1 soh 2 stx 3 etx 4 eot 5 enq 6 ack 7 bel */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 8 bs 9 ht 10 nl 11 vt 12 np 13 cr 14 so 15 si */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 16 dle 17 dc1 18 dc2 19 dc3 20 dc4 21 nak 22 syn 23 etb */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 24 can 25 em 26 sub 27 esc 28 fs 29 gs 30 rs 31 us */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 32 sp 33 ! 34 " 35 # 36 $ 37 % 38 & 39 ' */ - 0, '!', 0, '#', '$', '%', '&', '\'', -/* 40 ( 41 ) 42 * 43 + 44 , 45 - 46 . 47 / */ - 0, 0, '*', '+', 0, '-', '.', 0 , -/* 48 0 49 1 50 2 51 3 52 4 53 5 54 6 55 7 */ - '0', '1', '2', '3', '4', '5', '6', '7', -/* 56 8 57 9 58 : 59 ; 60 < 61 = 62 > 63 ? */ - '8', '9', 0, 0, 0, 0, 0, 0, -/* 64 @ 65 A 66 B 67 C 68 D 69 E 70 F 71 G */ - 0, 'A', 'B', 'C', 'D', 'E', 'F', 'G', -/* 72 H 73 I 74 J 75 K 76 L 77 M 78 N 79 O */ - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', -/* 80 P 81 Q 82 R 83 S 84 T 85 U 86 V 87 W */ - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', -/* 88 X 89 Y 90 Z 91 [ 92 \ 93 ] 94 ^ 95 _ */ - 'X', 'Y', 'Z', 0, 0, 0, 0, '_', -/* 96 ` 97 a 98 b 99 c 100 d 101 e 102 f 103 g */ - 0, 'A', 'B', 'C', 'D', 'E', 'F', 'G', -/* 104 h 105 i 106 j 107 k 108 l 109 m 110 n 111 o */ - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', -/* 112 p 113 q 114 r 115 s 116 t 117 u 118 v 119 w */ - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', -/* 120 x 121 y 122 z 123 { 124 | 125 } 126 ~ 127 del */ - 'X', 'Y', 'Z', 0, '|', 0, '~', 0, -/* hi bit set, not ascii */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, }; - - static final byte [] UNHEX = - { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - , 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1 - ,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - }; - - static final boolean [] normal_url_char = { -/* 0 nul 1 soh 2 stx 3 etx 4 eot 5 enq 6 ack 7 bel */ - false, false, false, false, false, false, false, false, -/* 8 bs 9 ht 10 nl 11 vt 12 np 13 cr 14 so 15 si */ - false, false, false, false, false, false, false, false, -/* 16 dle 17 dc1 18 dc2 19 dc3 20 dc4 21 nak 22 syn 23 etb */ - false, false, false, false, false, false, false, false, -/* 24 can 25 em 26 sub 27 esc 28 fs 29 gs 30 rs 31 us */ - false, false, false, false, false, false, false, false, -/* 32 sp 33 ! 34 " 35 # 36 $ 37 % 38 & 39 ' */ - false, true, true, false, true, true, true, true, -/* 40 ( 41 ) 42 * 43 + 44 , 45 - 46 . 47 / */ - true, true, true, true, true, true, true, true, -/* 48 0 49 1 50 2 51 3 52 4 53 5 54 6 55 7 */ - true, true, true, true, true, true, true, true, -/* 56 8 57 9 58 : 59 ; 60 < 61 = 62 > 63 ? */ - true, true, true, true, true, true, true, false, -/* 64 @ 65 A 66 B 67 C 68 D 69 E 70 F 71 G */ - true, true, true, true, true, true, true, true, -/* 72 H 73 I 74 J 75 K 76 L 77 M 78 N 79 O */ - true, true, true, true, true, true, true, true, -/* 80 P 81 Q 82 R 83 S 84 T 85 U 86 V 87 W */ - true, true, true, true, true, true, true, true, -/* 88 X 89 Y 90 Z 91 [ 92 \ 93 ] 94 ^ 95 _ */ - true, true, true, true, true, true, true, true, -/* 96 ` 97 a 98 b 99 c 100 d 101 e 102 f 103 g */ - true, true, true, true, true, true, true, true, -/* 104 h 105 i 106 j 107 k 108 l 109 m 110 n 111 o */ - true, true, true, true, true, true, true, true, -/* 112 p 113 q 114 r 115 s 116 t 117 u 118 v 119 w */ - true, true, true, true, true, true, true, true, -/* 120 x 121 y 122 z 123 { 124 | 125 } 126 ~ 127 del */ - true, true, true, true, true, true, true, false, - -/* hi bit set, not ascii */ -/* Remainder of non-ASCII range are accepted as-is to support implicitly UTF-8 - * encoded paths. This is out of spec, but clients generate this and most other - * HTTP servers support it. We should, too. */ - - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - - }; - - public static final byte A = 0x41; - public static final byte B = 0x42; - public static final byte C = 0x43; - public static final byte D = 0x44; - public static final byte E = 0x45; - public static final byte F = 0x46; - public static final byte G = 0x47; - public static final byte H = 0x48; - public static final byte I = 0x49; - public static final byte J = 0x4a; - public static final byte K = 0x4b; - public static final byte L = 0x4c; - public static final byte M = 0x4d; - public static final byte N = 0x4e; - public static final byte O = 0x4f; - public static final byte P = 0x50; - public static final byte Q = 0x51; - public static final byte R = 0x52; - public static final byte S = 0x53; - public static final byte T = 0x54; - public static final byte U = 0x55; - public static final byte V = 0x56; - public static final byte W = 0x57; - public static final byte X = 0x58; - public static final byte Y = 0x59; - public static final byte Z = 0x5a; - public static final byte UNDER = 0x5f; - public static final byte CR = 0x0d; - public static final byte LF = 0x0a; - public static final byte DOT = 0x2e; - public static final byte SPACE = 0x20; - public static final byte TAB = 0x09; - public static final byte SEMI = 0x3b; - public static final byte COLON = 0x3a; - public static final byte HASH = 0x23; - public static final byte QMARK = 0x3f; - public static final byte SLASH = 0x2f; - public static final byte DASH = 0x2d; - public static final byte STAR = 0x2a; - public static final byte NULL = 0x00; - } - - enum State { - - dead - - , start_req_or_res - , res_or_resp_H - , start_res - , res_H - , res_HT - , res_HTT - , res_HTTP - , res_first_http_major - , res_http_major - , res_first_http_minor - , res_http_minor - , res_first_status_code - , res_status_code - , res_status - , res_line_almost_done - - , start_req - - , req_method - , req_spaces_before_url - , req_schema - , req_schema_slash - , req_schema_slash_slash - , req_host_start - , req_host_v6_start - , req_host_v6 - , req_host_v6_end - , req_host - , req_port_start - , req_port - , req_path - , req_query_string_start - , req_query_string - , req_fragment_start - , req_fragment - , req_http_start - , req_http_H - , req_http_HT - , req_http_HTT - , req_http_HTTP - , req_first_http_major - , req_http_major - , req_first_http_minor - , req_http_minor - , req_line_almost_done - - , header_field_start - , header_field - , header_value_start - , header_value - , header_value_lws - - , header_almost_done - - , chunk_size_start - , chunk_size - , chunk_parameters - , chunk_size_almost_done - - , headers_almost_done - , headers_done -// This space intentionally not left blank, comment from c, for orientation... -// the c version uses <= s_header_almost_done in java, we list the states explicitly -// in `parsing_header()` -/* Important: 's_headers_done' must be the last 'header' state. All - * states beyond this must be 'body' states. It is used for overflow - * checking. See the PARSING_HEADER() macro. - */ - , chunk_data - , chunk_data_almost_done - , chunk_data_done - - , body_identity - , body_identity_eof - , message_done - - } - enum HState { - general - , C - , CO - , CON - - , matching_connection - , matching_proxy_connection - , matching_content_length - , matching_transfer_encoding - , matching_upgrade - - , connection - , content_length - , transfer_encoding - , upgrade - - , matching_transfer_encoding_chunked - , matching_connection_keep_alive - , matching_connection_close - - , transfer_encoding_chunked - , connection_keep_alive - , connection_close - } - public enum UrlFields { - UF_SCHEMA(0) - , UF_HOST(1) - , UF_PORT(2) - , UF_PATH(3) - , UF_QUERY(4) - , UF_FRAGMENT(5) - , UF_MAX(6); - - - private final int index; - - private UrlFields(int index) { - this.index = index; - } - public int getIndex() { - return index; - } - - } -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/lolevel/ParserSettings.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/lolevel/ParserSettings.java deleted file mode 100644 index 1ebdd4f..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/impl/http_parser/lolevel/ParserSettings.java +++ /dev/null @@ -1,83 +0,0 @@ -package http_parser.lolevel; -import java.nio.ByteBuffer; -import http_parser.HTTPException; -public class ParserSettings { - - public HTTPCallback on_message_begin; - public HTTPDataCallback on_path; - public HTTPDataCallback on_query_string; - public HTTPDataCallback on_url; - public HTTPDataCallback on_fragment; - public HTTPCallback on_status_complete; - public HTTPDataCallback on_header_field; - public HTTPDataCallback on_header_value; - public HTTPCallback on_headers_complete; - public HTTPDataCallback on_body; - public HTTPCallback on_message_complete; - public HTTPErrorCallback on_error; - - void call_on_message_begin (HTTPParser p) { - call_on(on_message_begin, p); - } - - void call_on_message_complete (HTTPParser p) { - call_on(on_message_complete, p); - } - - // this one is a little bit different: - // the current `position` of the buffer is the location of the - // error, `ini_pos` indicates where the position of - // the buffer when it was passed to the `execute` method of the parser, i.e. - // using this information and `limit` we'll know all the valid data - // in the buffer around the error we can use to print pretty error - // messages. - void call_on_error (HTTPParser p, String mes, ByteBuffer buf, int ini_pos) { - if (null != on_error) { - on_error.cb(p, mes, buf, ini_pos); - return; - } - // if on_error gets called it MUST throw an exception, else the parser - // will attempt to continue parsing, which it can't because it's - // in an invalid state. - throw new HTTPException(mes); - } - - void call_on_header_field (HTTPParser p, ByteBuffer buf, int pos, int len) { - call_on(on_header_field, p, buf, pos, len); - } - void call_on_query_string (HTTPParser p, ByteBuffer buf, int pos, int len) { - call_on(on_query_string, p, buf, pos, len); - } - void call_on_fragment (HTTPParser p, ByteBuffer buf, int pos, int len) { - call_on(on_fragment, p, buf, pos, len); - } - void call_on_status_complete(HTTPParser p) { - call_on(on_status_complete, p); - } - void call_on_path (HTTPParser p, ByteBuffer buf, int pos, int len) { - call_on(on_path, p, buf, pos, len); - } - void call_on_header_value (HTTPParser p, ByteBuffer buf, int pos, int len) { - call_on(on_header_value, p, buf, pos, len); - } - void call_on_url (HTTPParser p, ByteBuffer buf, int pos, int len) { - call_on(on_url, p, buf, pos, len); - } - void call_on_body(HTTPParser p, ByteBuffer buf, int pos, int len) { - call_on(on_body, p, buf, pos, len); - } - void call_on_headers_complete(HTTPParser p) { - call_on(on_headers_complete, p); - } - void call_on (HTTPCallback cb, HTTPParser p) { - // cf. CALLBACK2 macro - if (null != cb) { - cb.cb(p); - } - } - void call_on (HTTPDataCallback cb, HTTPParser p, ByteBuffer buf, int pos, int len) { - if (null != cb && -1 != pos) { - cb.cb(p,buf,pos,len); - } - } -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Message.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Message.java deleted file mode 100644 index 62f0a0e..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Message.java +++ /dev/null @@ -1,374 +0,0 @@ -package http_parser.lolevel; - -import java.nio.*; -import java.io.*; -import java.util.*; - -import http_parser.HTTPMethod; -import http_parser.HTTPParserUrl; -import http_parser.ParserType; -import http_parser.lolevel.TestLoaderNG.Header; -import http_parser.lolevel.TestLoaderNG.LastHeader; - -import primitive.collection.ByteList; - -import static http_parser.lolevel.Util.str; - -public class Message { - String name; - byte [] raw; - ParserType type; - HTTPMethod method; - int status_code; - String request_path; // byte [] ? - String request_url; - String fragment ; - String query_string; - byte [] body; - int body_size; - int num_headers; - LastHeader last_header_element; - Map header; - List
headers; - boolean should_keep_alive; - - byte[] upgrade; - boolean upgrade() { - return null != upgrade; - } - - int http_major; - int http_minor; - - boolean message_begin_called; - boolean headers_complete_called; - boolean message_complete_called; - boolean message_complete_on_eof; - - - Map parsed_header; - String currHField; - String currHValue; - byte [] pbody; - int num_called; - - public String toString() { - StringBuilder b = new StringBuilder(); - b.append("NAME: "); b.append(name);b.append("\n"); - b.append("type: "); b.append(type);b.append("\n"); - b.append("method: "); b.append(method);b.append("\n"); - b.append("status_code: "); b.append(status_code);b.append("\n"); - b.append("request_path: "); b.append(request_path);b.append("\n"); - b.append("request_url: "); b.append(request_url);b.append("\n"); - b.append("fragment: "); b.append(fragment);b.append("\n"); - b.append("query_string: "); b.append(query_string);b.append("\n"); - b.append("body:\n"); b.append(new String(body));b.append("\n"); - b.append("should_keep_alive: "); b.append(should_keep_alive);b.append("\n"); - b.append("upgrade: "); b.append(upgrade);b.append("\n"); - b.append("http_major: "); b.append(http_major);b.append("\n"); - b.append("http_minor: "); b.append(http_minor);b.append("\n"); - b.append("message_complete_called: "); b.append(message_complete_called);b.append("\n"); - return b.toString(); - } - - Message () { - this.header = new HashMap(); - this.headers = new LinkedList
(); - reset(); - } - /* - *prepare this Test Instance for reuse. - * */ - void reset () { - this.parsed_header = new HashMap(); - this.pbody = null; - this.num_called = 0; - - } - void check (boolean val, String mes) { - if (!val) { - //p(name+" : "+mes); - throw new RuntimeException(name+" : "+mes); - } - } - - - HTTPDataCallback getCB (final String value, final String mes, final TestSettings settings) { - return new HTTPDataCallback() { - public int cb (HTTPParser p, ByteBuffer b, int pos, int len){ - // if ("url".equals(mes)){ - // p("pos"+pos); - // p("len"+len); - // if (8==pos && 5 == len && "connect request".equals(name)) { - // //throw new RuntimeException(name); - // } - // } - //String str = str(b, pos, len); - ByteList list = settings.map.get(mes); - for (int i=0; i!=len; ++i) { - list.add(b.get(pos+i)); - } - //settings.map.put(mes, prev_val + str); - //check(value.equals(str), "incorrect "+mes+": "+str); - if (-1 == pos) { - throw new RuntimeException("he?"); - } - return 0; - } - }; - } - - void execute () { - p(name); - ByteBuffer buf = ByteBuffer.wrap(raw); - HTTPParser p = new HTTPParser(); - TestSettings s = settings(); - - - - p.execute(s, buf); - if (!p.upgrade) { - // call execute again, else parser can't know message is done - // if no content length is set. - p.execute(s, buf); - } - if (!s.success) { - throw new RuntimeException("Test: "+name+" failed"); - } - } // execute - - void execute_permutations() { - /* - |-|---------------| - |--|--------------| - |---|-------------| - (...) - |---------------|-| - |-----------------| - */ - p(name); - for (int i = 2; i != raw.length; ++i) { - // p(i); - HTTPParser p = new HTTPParser(); - TestSettings s = settings(); - ByteBuffer buf = ByteBuffer.wrap(raw); - int olimit = buf.limit(); - buf.limit(i); - - parse(p,s,buf); - if (!p.upgrade) { - buf.position(i); - buf.limit(olimit); - - parse(p,s,buf); - if (!p.upgrade) { - parse(p,s,buf); - } else { - if (!upgrade()) { - throw new RuntimeException("Test:"+name+"parsed as upgrade, is not"); - } - } - - } else { - if (!upgrade()) { - throw new RuntimeException("Test:"+name+"parsed as upgrade, is not"); - } - } - if (!s.success) { - p(this); - throw new RuntimeException("Test: "+name+" failed"); - } - reset(); - } - //System.exit(0); - } // execute_permutations - void parse(HTTPParser p, ParserSettings s, ByteBuffer b) { - //p("About to parse: "+b.position() + "->" + b.limit()); - p.execute(s, b); - } - - TestSettings settings() { - final TestSettings s = new TestSettings(); - s.on_url = getCB(request_url, "url", s); - s.on_message_begin = new HTTPCallback() { - public int cb (HTTPParser p) { - message_begin_called = true; - return -1; - } - }; - s.on_header_field = new HTTPDataCallback() { - public int cb (HTTPParser p, ByteBuffer b, int pos, int len){ - if (null != currHValue && null == currHField) { - throw new RuntimeException(name+": shouldn't happen"); - } - if (null != currHField) { - if (null == currHValue) { - currHField += str(b,pos,len); - return 0; - } else { - parsed_header.put(currHField, currHValue); - currHField = null; - currHValue = null; - } - } - currHField = str(b,pos,len); - return 0; - } - }; - s.on_header_value = new HTTPDataCallback() { - public int cb (HTTPParser p, ByteBuffer b, int pos, int len){ - if (null == currHField) { - throw new RuntimeException(name+" :shouldn't happen field"); - } - if (null == currHValue) { - currHValue = str(b,pos,len); - } else { - currHValue += str(b, pos, len); - } - return 0; - } - }; - s.on_headers_complete = new HTTPCallback() { - public int cb (HTTPParser p) { - headers_complete_called = true; - String parsed_path = null; - String parsed_query = null; - String parsed_url = null; - String parsed_frag = null; - - try { - parsed_url = new String(s.map.get("url").toArray(), "UTF8"); - - HTTPParserUrl u = new HTTPParserUrl(); - HTTPParser pp = new HTTPParser(); - ByteBuffer data = Util.buffer(parsed_url); - pp.parse_url(data,false, u); - - parsed_path = u.getFieldValue(HTTPParser.UrlFields.UF_PATH, data); - parsed_query = u.getFieldValue(HTTPParser.UrlFields.UF_QUERY, data); - parsed_frag = u.getFieldValue(HTTPParser.UrlFields.UF_FRAGMENT, data); - - } catch (java.io.UnsupportedEncodingException uee) { - throw new RuntimeException(uee); - } - - if (!request_path.equals(parsed_path)) { - throw new RuntimeException(name+": invalid path: "+parsed_path+" should be: "+request_path); - } - if (!query_string.equals(parsed_query)) { - throw new RuntimeException(name+": invalid query: "+parsed_query+" should be: "+query_string); - } - if (!request_url.equals(parsed_url)) { - throw new RuntimeException(">"+name+"<: invalid url: >"+parsed_url+"< should be: >"+request_url+"<"); - } - if (!fragment.equals(parsed_frag)) { - throw new RuntimeException(name+": invalid fragement: "+parsed_frag+" should be: "+fragment); - } - if (null != currHValue || null != currHField) { - if (null == currHField || null == currHValue) { - throw new RuntimeException("shouldn't happen"); - } - } - if (null != currHField) { - //p(currHField); - //p(">"+currHValue+"<"); - parsed_header.put(currHField, currHValue); - currHField = null; - currHValue = null; - } - - - return 0; - } - }; - // s.on_headers_complete = new HTTPCallback() { - // public int cb (HTTPParser p) { - // p("Complete:"+name); - // return 0; - // } - // }; - - s.on_body = new HTTPDataCallback() { - public int cb (HTTPParser p, ByteBuffer b, int pos, int len){ - int l = pbody == null ? len : len + pbody.length; - int off = pbody == null ? 0 : pbody.length; - byte [] nbody = new byte[l]; - - if (null != pbody) { - System.arraycopy(pbody, 0, nbody, 0, pbody.length); - } - - int saved = b.position(); - b.position(pos); - b.get(nbody, off, len); - b.position(saved); - pbody = nbody; - return 0; - } - }; - - s.on_message_complete = new HTTPCallback() { - public int cb(HTTPParser p) { - message_complete_called = true; - num_called += 1; - if ( p.http_minor != http_minor - || p.http_major != http_major - || p.status_code != status_code ) { - - throw new RuntimeException("major/minor/status_code mismatch"); - } - - //check headers - - if (header.keySet().size() != parsed_header.keySet().size()) { - p(parsed_header); - throw new RuntimeException(name+": different amount of headers"); - } - for (String key : header.keySet()) { - String pvalue = parsed_header.get(key); - if (!header.get(key).equals(pvalue)) { - throw new RuntimeException(name+" : different values for :"+key+" is >"+pvalue+"< should: >"+header.get(key)+"<"); - } - } - //check body - if (null == pbody && (null == body || body.length == 0 || body.length == 1)) { - s.success = true; - return 0; - } - if (null == pbody) { - throw new RuntimeException(name+": no body, should be: "+new String(body)); - } - if (pbody.length != body.length) { - p(pbody.length); - p(body.length); - p(new String(pbody)); - p(new String(body)); - throw new RuntimeException(name+": incorrect body length"); - } - for (int i = 0 ; i!= body.length; ++i) { - if (pbody[i] != body[i]) { - throw new RuntimeException("different body"); - } - } - s.success = true; - return 0; - } - }; - return s; - } // settings - static void p(Object o) { - System.out.println(o); - } - - static class TestSettings extends ParserSettings { - public boolean success; - Map map; - TestSettings () { - map = new HashMap(); - map.put("path", new ByteList()); - map.put("query_string", new ByteList()); - map.put("url", new ByteList()); - map.put("fragment", new ByteList()); - } - } -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java deleted file mode 100644 index 0e74021..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java +++ /dev/null @@ -1,51 +0,0 @@ -package http_parser.lolevel; - -import http_parser.HTTPParserUrl; -import static http_parser.lolevel.Util.*; - -public class ParseUrl { - public static void test(int i) { - HTTPParserUrl u = new HTTPParserUrl(); - HTTPParser p = new HTTPParser(); - Url test = Url.URL_TESTS[i]; -// System.out.println(":: " + test.name); - int rv = p.parse_url(Util.buffer(test.url),test.is_connect,u); - UnitTest.check_equals(rv, test.rv); - if(test.rv == 0){ - UnitTest.check_equals(u, test.u); - } - - } - public static void test() { - p(ParseUrl.class); - - for (int i = 0; i < Url.URL_TESTS.length; i++) { - test(i); - } - } - - static void usage() { - p("usage: [jre] http_parser.lolevel.ParseUrl [i]"); - p(" i : optional test case id"); - p("---------------------------------------------"); - p("Test Cases:"); - for (int i =0; i!= Url.URL_TESTS.length; ++i) { - p(" "+i+": "+Url.URL_TESTS[i].name); - } - } - - public static void main (String [] args) { - if (0 == args.length) { - test(); - } else { - try { - int i = Integer.parseInt(args[0]); - test(i); - } catch (Throwable t) { - t.printStackTrace(); - usage(); - } - - } - } -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Requests.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Requests.java deleted file mode 100644 index 4367bbb..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Requests.java +++ /dev/null @@ -1,69 +0,0 @@ -package http_parser.lolevel; - -import java.nio.*; -import java.util.*; - -import static http_parser.lolevel.Util.*; -import http_parser.*; - -import primitive.collection.ByteList; - -public class Requests { - - static void test_simple(String req, boolean should_pass) { - HTTPParser parser = new HTTPParser(ParserType.HTTP_REQUEST); - ByteBuffer buf = buffer(req); - boolean passed = false; - int read = 0; - try { - parser.execute(Util.SETTINGS_NULL, buf); - passed = (read == req.length()); - read = parser.execute(Util.SETTINGS_NULL, Util.empty()); - passed &= (0 == read); - } catch (Throwable t) { - passed = false; - } - check(passed == should_pass); - } - static void simple_tests() { - test_simple("hello world", false); - test_simple("GET / HTP/1.1\r\n\r\n", false); - - test_simple("ASDF / HTTP/1.1\r\n\r\n", false); - test_simple("PROPPATCHA / HTTP/1.1\r\n\r\n", false); - test_simple("GETA / HTTP/1.1\r\n\r\n", false); - } - - public static void test () { - p(Requests.class); - simple_tests(); - - List all = TestLoaderNG.load("tests.dumped"); - List requests = new LinkedList(); - for (Message m : all) { - if (ParserType.HTTP_REQUEST == m.type) { - requests.add(m); - } - } - for (Message m : requests) { - test_message(m); - } - - for (int i = 0; i!= requests.size(); ++i) { - if (!requests.get(i).should_keep_alive) continue; - for (int j = 0; j!=requests.size(); ++j) { - if (!requests.get(j).should_keep_alive) continue; - for (int k = 0; k!= requests.size(); ++k) { - test_multiple3(requests.get(i), requests.get(j), requests.get(k)); - } - } - } - - // postpone test_scan - - } - - - - -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java deleted file mode 100644 index 1cb71dc..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java +++ /dev/null @@ -1,52 +0,0 @@ -package http_parser.lolevel; - -import java.nio.*; -import java.util.*; - -import static http_parser.lolevel.Util.*; -import http_parser.*; - -import primitive.collection.ByteList; - -public class Responses { - - - - public static void test () { - p(Responses.class); - List all = TestLoaderNG.load("tests.dumped"); - List responses = new LinkedList(); - for (Message m : all) { - if (ParserType.HTTP_RESPONSE == m.type) { - responses.add(m); - } - } - for (Message m : responses) { - test_message(m); - } - - for (int i = 0; i!= responses.size(); ++i) { - if (!responses.get(i).should_keep_alive) continue; - for (int j = 0; j!=responses.size(); ++j) { - if (!responses.get(j).should_keep_alive) continue; - for (int k = 0; k!= responses.size(); ++k) { - test_multiple3(responses.get(i), responses.get(j), responses.get(k)); - } - } - } - - // not sure what test_message_count_body does that test_message doesn't... - // Message m = find(responses, "404 no headers no body"); - // test_message_count_body(m); - // m = find(responses, "200 trailing space on chunked body"); - // test_message_count_body(m); - - // TODO test very large chunked response - - // test_scan is more or less the same as test_permutations, will implement later... - } - - - - -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Test.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Test.java deleted file mode 100644 index 6c35898..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Test.java +++ /dev/null @@ -1,16 +0,0 @@ -package http_parser.lolevel; - - -public class Test { - public static void main (String [] args) { - UnitTest.test(); - TestHeaderOverflowError.test(); - TestNoOverflowLongBody.test(); - Responses.test(); - ParseUrl.test(); - Requests.test(); - Upgrade.test(); - WrongContentLength.test(); - } - -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/TestHeaderOverflowError.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/TestHeaderOverflowError.java deleted file mode 100644 index ee47903..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/TestHeaderOverflowError.java +++ /dev/null @@ -1,48 +0,0 @@ -package http_parser.lolevel; - -import java.nio.*; - -import static http_parser.lolevel.Util.*; - -public class TestHeaderOverflowError { - - public static void test (http_parser.ParserType type) { - HTTPParser parser = new HTTPParser(type); - ByteBuffer buf = getBytes(type); - - int numbytes = buf.limit(); - - parser.execute(Util.SETTINGS_NULL, buf); - - check(numbytes == buf.position()); - - buf = buffer("header-key: header-value\r\n"); - numbytes = buf.limit(); - for (int i = 0; i!= 1000; ++i) { - parser.execute(Util.SETTINGS_NULL, buf); - check(numbytes == buf.position()); - - buf.rewind(); - - } - } - - static ByteBuffer getBytes (http_parser.ParserType type) { - if (http_parser.ParserType.HTTP_BOTH == type) { - throw new RuntimeException("only HTTP_REQUEST and HTTP_RESPONSE"); - } - - if (http_parser.ParserType.HTTP_REQUEST == type) { - return buffer("GET / HTTP/1.1\r\n"); - } - return buffer("HTTP/1.0 200 OK\r\n"); - } - - public static void test () { - p(TestHeaderOverflowError.class); - test(http_parser.ParserType.HTTP_REQUEST); - test(http_parser.ParserType.HTTP_RESPONSE); - } - - -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/TestLoaderNG.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/TestLoaderNG.java deleted file mode 100644 index 329485d..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/TestLoaderNG.java +++ /dev/null @@ -1,212 +0,0 @@ -package http_parser.lolevel; -// name : 200 trailing space on chunked body -// raw : "HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nTransfer-Encoding: chunked\r\n\r\n25 \r\nThis is the data in the first chunk\r\n\r\n1C\r\nand this is the second one\r\n\r\n0 \r\n\r\n" -// type : HTTP_RESPONSE -// method: HTTP_DELETE -// status code :200 -// request_path: -// request_url : -// fragment : -// query_string: -// body :"This is the data in the first chunk\r\nand this is the second one\r\n" -// body_size :65 -// header_0 :{ "Content-Type": "text/plain"} -// header_1 :{ "Transfer-Encoding": "chunked"} -// should_keep_alive :1 -// upgrade :0 -// http_major :1 -// http_minor :1 - - -import java.io.FileReader; -import java.io.BufferedReader; -import java.io.StringReader; -import java.io.Reader; -import java.io.Reader; -import java.io.IOException; - -import java.util.*; -import java.util.regex.*; - -import java.nio.ByteBuffer; - -import http_parser.HTTPMethod; -import http_parser.ParserType; - -public class TestLoaderNG { - String fn; - public TestLoaderNG(String filename) { - this.fn = filename; - } - static void p(Object o) { - System.out.println(o); - } - public static List load (String fn) { - List list = null; - try { - BufferedReader buf = new BufferedReader(new FileReader(fn)); - list = load(buf); - } catch (Throwable t) { - throw new RuntimeException(t); - } - return list; - - } - public static Message parse (String message) { - List list = load(new BufferedReader(new StringReader(message))); - if (null == list || 0 == list.size() ) { - return null; - } - return list.get(0); - } - - public static List load (BufferedReader buf) { - List list = new LinkedList(); - String line = null; - Message curr = new Message(); - Pattern pattern = Pattern.compile("(\\S+)\\s*:(.*)"); - try { - while (null != (line = buf.readLine()) ){ - if ("".equals(line.trim())) { - list.add (curr); - curr = new Message(); - continue; - } - Matcher m = pattern.matcher(line); - if (m.matches()) { - // you can not be fucking serious!? - // this has got to be the most retarded regex - // interface in the history of the world ... - // (though I'm sure there's worse c++ regexp libs...) - MatchResult r = m.toMatchResult(); - String key = r.group(1).trim(); - String value = r.group(2).trim(); - if ("name".equals(key)) {curr.name = value;} - else if ("raw".equals(key)) {curr.raw = toByteArray(value);} //! - else if ("type".equals(key)) {curr.type = ParserType.parse(value);} - else if ("method".equals(key)) {curr.method = HTTPMethod.parse(value);} - else if ("status_code".equals(key)) {curr.status_code = Integer.parseInt(value);} - else if ("request_path".equals(key)) {curr.request_path = value;} - else if ("request_url".equals(key)) {curr.request_url = value;} - - else if ("fragment".equals(key)) {curr.fragment = value;} - else if ("query_string".equals(key)) {curr.query_string = value;} - else if ("body".equals(key)) {curr.body = toByteArray(value);} //! - else if ("body_size".equals(key)) {curr.body_size = Integer.parseInt(value);} - else if (key.startsWith("header")) { - String [] h = getHeader(value); - curr.header.put(h[0], h[1]); - } - else if ("should_keep_alive".equals(key)) - {curr.should_keep_alive = (1 == Integer.parseInt(value));} - else if ("upgrade".equals(key)) { curr.upgrade = toByteArray(value);} - else if ("http_major".equals(key)) {curr.http_major = Integer.parseInt(value);} - else if ("http_minor".equals(key)) {curr.http_minor = Integer.parseInt(value);} - } else { - p("WTF?"+line); - } - - } - } catch (Throwable t) { - throw new RuntimeException(t); - } - return list; - } - - static String [] getHeader(String value) { - // { "Host": "0.0.0.0=5000"} - Pattern p = Pattern.compile("\\{ ?\"([^\"]*)\": ?\"(.*)\"}"); - Matcher m = p.matcher(value); - if (!m.matches()) { - p(value); - throw new RuntimeException("something wrong"); - } - String [] result = new String[2]; - MatchResult r = m.toMatchResult(); - result[0] = r.group(1).trim(); - result[1] = r.group(2); //.trim(); - return result; - } - - static final byte BSLASH = 0x5c; - static final byte QUOT = 0x22; - static final byte CR = 0x0d; - static final byte LF = 0x0a; - static final byte n = 0x6e; - static final byte r = 0x72; - - static final Byte[] JAVA_GENERICS_ROCK_HARD = new Byte[0]; - - - static byte [] toByteArray (String quotedString) { - ArrayList bytes = new ArrayList(); - String s = quotedString.substring(1, quotedString.length()-1); - byte [] byts = s.getBytes(java.nio.charset.Charset.forName("UTF8")); - boolean escaped = false; - for (byte b : byts) { - switch (b) { - case BSLASH: - escaped = true; - break; - case n: - if (escaped) { - bytes.add(LF); - escaped = false; - } else { - bytes.add(b); - } - break; - case r: - if (escaped) { - escaped = false; - bytes.add(CR); - } else { - bytes.add(b); - } - break; - case QUOT: - escaped = false; - bytes.add(QUOT); - break; - default: - bytes.add(b); - } - - } - - byts = new byte[bytes.size()]; - int i = 0; - for (Byte b : bytes) { - byts[i++]=b; - } - return byts; - } - - public static void main(String [] args) throws Throwable { - //TestLoaderNG l = new TestLoaderNG(args[0]); - List ts = load(args[0]); - for (Message t : ts) { -// for (int i =0; i!= t.raw.length; ++i) { -// p(i+":"+t.raw[i]); -// } -// try { - t.execute_permutations(); -// } catch (Throwable th) { -// p("failed: "+t.name); -// } - t.execute(); - // System.exit(0); - } - } - - class Header { - String field; - String value; - } - enum LastHeader { - NONE - ,FIELD - ,VALUE - } - -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/TestNoOverflowLongBody.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/TestNoOverflowLongBody.java deleted file mode 100644 index 13d8ea0..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/TestNoOverflowLongBody.java +++ /dev/null @@ -1,62 +0,0 @@ -package http_parser.lolevel; - -import java.nio.*; - -import static http_parser.lolevel.Util.*; - -public class TestNoOverflowLongBody { - - public static void test (http_parser.ParserType type, int len) { - HTTPParser parser = new HTTPParser(type); - ByteBuffer buf = getBytes(type, len); - - int buflen = buf.limit(); - - parser.execute(Util.SETTINGS_NULL, buf); - - check(buflen == buf.position()); - - buf = buffer("a"); - buflen = buf.limit(); - - for (int i = 0; i!= len; ++i) { - parser.execute(Util.SETTINGS_NULL, buf); - check(buflen == buf.position()); - buf.rewind(); - } - - buf = getBytes(type, len); - buflen = buf.limit(); - - parser.execute(Util.SETTINGS_NULL, buf); - - check(buflen == buf.position()); - - } - - static ByteBuffer getBytes (http_parser.ParserType type, int length) { - if (http_parser.ParserType.HTTP_BOTH == type) { - throw new RuntimeException("only HTTP_REQUEST and HTTP_RESPONSE"); - } - - String template = "%s\r\nConnection: Keep-Alive\r\nContent-Length: %d\r\n\r\n"; - String str = null; - if (http_parser.ParserType.HTTP_REQUEST == type) { - str = String.format(template, "GET / HTTP/1.1", length); - } else { - str = String.format(template, "HTTP/1.0 200 OK", length); - } - return buffer(str); - } - - public static void test () { - p(TestNoOverflowLongBody.class); - test(http_parser.ParserType.HTTP_REQUEST, 1000); - test(http_parser.ParserType.HTTP_REQUEST, 100000); - test(http_parser.ParserType.HTTP_RESPONSE, 1000); - test(http_parser.ParserType.HTTP_RESPONSE, 100000); - } - - - -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/UnitTest.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/UnitTest.java deleted file mode 100644 index 4159980..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/UnitTest.java +++ /dev/null @@ -1,117 +0,0 @@ -package http_parser.lolevel; - -import java.nio.ByteBuffer; -import http_parser.HTTPException; -import http_parser.Util; - -public class UnitTest { - - static void p(Object o) {System.out.println(o);} - - public static void testErrorFormat() { - String bla = "This has an error in position 10 (the n in 'an')"; - ByteBuffer buf = ByteBuffer.wrap(bla.getBytes()); - buf.position(10); - - String mes = -"This has an error in position 10 (the n in 'an')\n" + -"..........^"; - - check_equals(mes, Util.error ("test error", buf, 0)); - - - bla = "123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J"; - buf = ByteBuffer.wrap(bla.getBytes()); - buf.position(50); - mes = -"56789B123456789C123456789D123456789E123456789F123456789G123456789H123456\n"+ -"....................................^"; - check_equals(mes, Util.error("test trim right and left", buf, 0)); - - - buf.position(5); - mes = -"123456789A123456789B123456789C123456789D123456789E123456789F123456789G12\n"+ -".....^"; - check_equals(mes, Util.error("test trim right", buf, 0)); - - - int limit = buf.limit(); - buf.limit(10); - mes = -"123456789A\n"+ -".....^"; - check_equals(mes, Util.error("all before, not enough after", buf, 0)); - - - - buf.limit(limit); - buf.position(90); - mes = -"9C123456789D123456789E123456789F123456789G123456789H123456789I123456789J\n"+ -"..............................................................^"; - check_equals(mes, Util.error("test trim left", buf, 10)); - } - - - // Test that the error callbacks are properly called. - public static void testErrorCallback () { - String nothttp = "THis is certainly not valid HTTP"; - ByteBuffer buf = ByteBuffer.wrap(nothttp.getBytes()); - - ParserSettings s = new ParserSettings(); - s.on_error = new HTTPErrorCallback() { - public void cb (HTTPParser p, String mes, ByteBuffer buf, int pos) { - throw new HTTPException(mes); - } - }; // err callback - - - HTTPParser p = new HTTPParser(); - try { - p.execute(s, buf); - } catch (HTTPException e) { - check_equals("Invalid HTTP method", e.getMessage()); - } - - buf = ByteBuffer.wrap("GET / HTTP 1.10000".getBytes()); - p = new HTTPParser(); - try { - p.execute(s, buf); - } catch (HTTPException e) { - check_equals("ridiculous http minor", e.getMessage()); - } - - // if no error handler is defined, behave just like the above... - ParserSettings s0 = new ParserSettings(); - - buf = ByteBuffer.wrap("THis is certainly not valid HTTP".getBytes()); - p = new HTTPParser(); - try { - p.execute(s0, buf); - } catch (HTTPException e) { - check_equals("Invalid HTTP method", e.getMessage()); - } - - buf = ByteBuffer.wrap("GET / HTTP 1.10000".getBytes()); - p = new HTTPParser(); - try { - p.execute(s0, buf); - } catch (HTTPException e) { - check_equals("ridiculous http minor", e.getMessage()); - } - } - - static void check_equals(Object supposed2be, Object is) { - if (!supposed2be.equals(is)) { - throw new RuntimeException(is + " is supposed to be "+supposed2be); - } - } - - - public static void test () { - p(UnitTest.class); - testErrorFormat(); - testErrorCallback(); - } -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Upgrade.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Upgrade.java deleted file mode 100644 index 9af3d4a..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Upgrade.java +++ /dev/null @@ -1,27 +0,0 @@ -package http_parser.lolevel; - -import java.nio.*; -import java.util.*; - -import http_parser.ParserType; - -import static http_parser.lolevel.Util.*; - -public class Upgrade { - static final String upgrade = "GET /demo HTTP/1.1\r\n" + - "Connection: Upgrade\r\n" + - "Upgrade: WebSocket\r\n\r\n" + - "third key data"; - static void test () { - p(Upgrade.class); - HTTPParser parser = new HTTPParser(ParserType.HTTP_REQUEST); - ByteBuffer buf = buffer(upgrade); - - int read = parser.execute(Util.SETTINGS_NULL, buf); - check (63 == read); - String s = str(buf); - check ("third key data".equals(str(buf))); - - } - -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Url.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Url.java deleted file mode 100644 index 35469d1..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Url.java +++ /dev/null @@ -1,127 +0,0 @@ -package http_parser.lolevel; - -import http_parser.FieldData; -import http_parser.HTTPParserUrl; - -import static http_parser.HTTPParserUrl.*; -import static http_parser.lolevel.HTTPParser.*; - -/** - */ -public class Url { - - public static Url[] URL_TESTS = new Url[]{ - new Url("proxy request", "http://hostname/", false, - new HTTPParserUrl( - (1 << UrlFields.UF_SCHEMA.getIndex()) | (1 << UrlFields.UF_HOST.getIndex()) | (1 << UrlFields.UF_PATH.getIndex()), - 0, - new FieldData[]{ - new FieldData(0,4), - new FieldData(7,8), - new FieldData(0,0), - new FieldData(15,1), - new FieldData(0,0), - new FieldData(0,0) - }), - 0), - new Url("CONNECT request", "hostname:443", true, - new HTTPParserUrl( - (1 << UrlFields.UF_HOST.getIndex()) | (1 << UrlFields.UF_PORT.getIndex()), - 443, - new FieldData[]{ - new FieldData(0,0), - new FieldData(0,8), - new FieldData(9,3), - new FieldData(0,0), - new FieldData(0,0), - new FieldData(0,0) - }), - 0), - new Url("proxy ipv6 request", "http://[1:2::3:4]/", false, - new HTTPParserUrl( - (1 << UrlFields.UF_SCHEMA.getIndex()) | (1 << UrlFields.UF_HOST.getIndex()) | (1 << UrlFields.UF_PATH.getIndex()), - 0, - new FieldData[]{ - new FieldData(0,4), - new FieldData(8,8), - new FieldData(0,0), - new FieldData(17,1), - new FieldData(0,0), - new FieldData(0,0) - }), - 0), - new Url("CONNECT ipv6 address", "[1:2::3:4]:443", true, - new HTTPParserUrl( - (1 << UrlFields.UF_HOST.getIndex()) | (1 << UrlFields.UF_PORT.getIndex()), - 443, - new FieldData[]{ - new FieldData(0,0), - new FieldData(1,8), - new FieldData(11,3), - new FieldData(0,0), - new FieldData(0,0), - new FieldData(0,0) - }), - 0), - new Url("extra ? in query string", - "http://a.tbcdn.cn/p/fp/2010c/??fp-header-min.css,fp-base-min.css,fp-channel-min.css,fp-product-min.css,fp-mall-min.css,fp-category-min.css,fp-sub-min.css,fp-gdp4p-min.css,fp-css3-min.css,fp-misc-min.css?t=20101022.css", - false, - new HTTPParserUrl( - (1 << UrlFields.UF_SCHEMA.getIndex()) | - (1 << UrlFields.UF_HOST.getIndex()) | - (1 << UrlFields.UF_PATH.getIndex()) | - (1 << UrlFields.UF_QUERY.getIndex()), - 0, - new FieldData[]{ - new FieldData(0,4), - new FieldData(7,10), - new FieldData(0,0), - new FieldData(17,12), - new FieldData(30,187), - new FieldData(0,0) - }), - 0), - new Url("proxy empty host", - "http://:443/", - false, - null, - 1), - new Url("proxy empty port", - "http://hostname:/", - false, - null, - 1), - new Url("CONNECT empty host", - ":443", - true, - null, - 1), - new Url("CONNECT empty port", - "hostname:", - true, - null, - 1), - new Url("CONNECT with extra bits", - "hostname:443/", - true, - null, - 1), - - }; - - String name; - String url; - boolean is_connect; - HTTPParserUrl u; - int rv; - - public Url(String name, String url, boolean is_connect, HTTPParserUrl u, int rv) { - this.name = name; - this.url = url; - this.is_connect = is_connect; - this.u = u; - this.rv = rv; - } - - -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Util.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Util.java deleted file mode 100644 index c73d9e6..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Util.java +++ /dev/null @@ -1,236 +0,0 @@ -package http_parser.lolevel; - -import java.nio.*; -import java.util.*; - -import primitive.collection.ByteList; - -import http_parser.*; - -public class Util { - - static final ParserSettings SETTINGS_NULL = new ParserSettings(); - - static String str (ByteBuffer b, int pos, int len) { - byte [] by = new byte[len]; - int saved = b.position(); - b.position(pos); - b.get(by); - b.position(saved); - return new String(by); - } - static String str (ByteBuffer b) { - int len = b.limit() - b.position(); - byte [] by = new byte[len]; - int saved = b.position(); - b.get(by); - b.position(saved); - return new String(by); - } - - static ByteBuffer buffer(String str) { - return ByteBuffer.wrap(str.getBytes()); - } - - static ByteBuffer empty() { - return ByteBuffer.wrap(new byte[0]); - } - - static void check(boolean betterBtrue) { - if (!betterBtrue) { - throw new RuntimeException("!"); - } - } - static void check (int should, int is) { - if (should != is) { - throw new RuntimeException("should be: "+should+" is:"+is); - } - } - - static void test_message(Message mes) { - int raw_len = mes.raw.length; - for (int msg1len = 0; msg1len != raw_len; ++msg1len) { - mes.reset(); - ByteBuffer msg1 = ByteBuffer.wrap(mes.raw, 0, msg1len); - ByteBuffer msg2 = ByteBuffer.wrap(mes.raw, msg1len, mes.raw.length - msg1len); - - HTTPParser parser = new HTTPParser(mes.type); - ParserSettings settings = mes.settings(); - - int read = 0; - if (msg1len !=0) { - read = parser.execute(settings, msg1); - if (mes.upgrade() && parser.upgrade) { - // Messages have a settings() that checks itself... - check(1 == mes.num_called); - continue; - } - check(read == msg1len); - } - - read = parser.execute(settings, msg2); - if (mes.upgrade() && parser.upgrade) { - check(1 == mes.num_called); - continue; - } - - check( mes.raw.length - msg1len, read); - - ByteBuffer empty = Util.empty(); - read = parser.execute(settings, empty); - - if (mes.upgrade() && parser.upgrade) { - check(1 == mes.num_called); - continue; - } - check(empty.position() == empty.limit()); - check(0 == read); - check(1 == mes.num_called); - - } - } - - static void test_multiple3(Message r1, Message r2, Message r3) { - int message_count = 1; - if (!r1.upgrade()) { - message_count++; - if (!r2.upgrade()) { - message_count++; - } - } - boolean has_upgrade = (message_count < 3 || r3.upgrade()); - - ByteList blist = new ByteList(); - blist.addAll(r1.raw); - blist.addAll(r2.raw); - blist.addAll(r3.raw); - - byte [] raw = blist.toArray(); - ByteBuffer buf = ByteBuffer.wrap(raw); - - Util.Settings settings = Util.settings(); - HTTPParser parser = new HTTPParser(r1.type); - - int read = parser.execute(settings, buf); - if (has_upgrade && parser.upgrade) { - raw = upgrade_message_fix(raw, read, r1,r2,r3); - check(settings.numCalled == message_count); - return; - } - - check(read == raw.length); - - buf = Util.empty(); - read = parser.execute(settings, buf); - if (has_upgrade && parser.upgrade) { - check(settings.numCalled == message_count); - return; - } - - check(0 == read); - check(settings.numCalled == message_count); - } - - /* Given a sequence of bytes and the number of these that we were able to - * parse, verify that upgrade bodies are correct. - */ - static byte [] upgrade_message_fix(byte[] body, int nread, Message... msgs) { - int off = 0; - for (Message m : msgs) { - off += m.raw.length; - if (m.upgrade()) { - off -= m.upgrade.length; - // Original C: - // Check the portion of the response after its specified upgrade - // if (!check_str_eq(m, "upgrade", body + off, body + nread)) { - // abort(); - // } - // to me, this seems to be equivalent to comparing off and nread ... - check (off, nread); - - // Original C: - // Fix up the response so that message_eq() will verify the beginning - // of the upgrade */ - // - // *(body + nread + strlen(m->upgrade)) = '\0'; - // This only shortens body so the strlen check passes. - return new byte[off]; - - } - } - return null; - } -//upgrade_message_fix(char *body, const size_t nread, const size_t nmsgs, ...) { -// va_list ap; -// size_t i; -// size_t off = 0; -// -// va_start(ap, nmsgs); -// -// for (i = 0; i < nmsgs; i++) { -// struct message *m = va_arg(ap, struct message *); -// -// off += strlen(m->raw); -// -// if (m->upgrade) { -// off -= strlen(m->upgrade); -// -// /* Check the portion of the response after its specified upgrade */ -// if (!check_str_eq(m, "upgrade", body + off, body + nread)) { -// abort(); -// } -// -// /* Fix up the response so that message_eq() will verify the beginning -// * of the upgrade */ -// *(body + nread + strlen(m->upgrade)) = '\0'; -// messages[num_messages -1 ].upgrade = body + nread; -// -// va_end(ap); -// return; -// } -// } -// -// va_end(ap); -// printf("\n\n*** Error: expected a message with upgrade ***\n"); -// -// abort(); -//} - static void p (Object o) { - System.out.println(o); - } - - static Settings settings() { - return new Settings(); - } - static Message find(List list, String name) { - for (Message m : list) { - if (name.equals(m.name)) { - return m; - } - } - return null; - } - - static class Settings extends ParserSettings { - public int numCalled; - public int bodyCount; - Settings() { - this.on_message_complete = new HTTPCallback() { - public int cb (HTTPParser parser) { - numCalled++; - return 0; - } - }; - this.on_body = new HTTPDataCallback() { - public int cb (HTTPParser p, ByteBuffer b, int pos, int len) { - bodyCount += len; - return 0; - } - }; - } - - int numCalled () { - return this.numCalled; - } - } -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/WrongContentLength.java b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/WrongContentLength.java deleted file mode 100644 index fc8f081..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/WrongContentLength.java +++ /dev/null @@ -1,59 +0,0 @@ -package http_parser.lolevel; - -import java.nio.*; -import java.util.*; - -import http_parser.ParserType; - -import static http_parser.lolevel.Util.*; - -public class WrongContentLength { - static final String contentLength = "GET / HTTP/1.0\r\n" + - "Content-Length: 5\r\n" + - "\r\n" + - "hello" + - "hello_again"; - static void test () { - p(WrongContentLength.class); - HTTPParser parser = new HTTPParser(ParserType.HTTP_REQUEST); - ByteBuffer buf = buffer(contentLength); - - Settings settings = new Settings(); - - int read = parser.execute(settings, buf); - check (settings.msg_cmplt_called); - check ("invalid method".equals(settings.err)); - - } - public static void main(String [] args) { - test(); - } - - static class Settings extends ParserSettings { - public int bodyCount; - public boolean msg_cmplt_called; - public String err; - Settings () { - this.on_message_complete = new HTTPCallback () { - public int cb (HTTPParser p) { - check (5 == bodyCount); - msg_cmplt_called = true; - return 0; - } - }; - this.on_body = new HTTPDataCallback() { - public int cb (HTTPParser p, ByteBuffer b, int pos, int len) { - bodyCount += len; - check ("hello".equals(str(b, pos, len))); - return 0; - } - }; - this.on_error = new HTTPErrorCallback() { - public void cb (HTTPParser p, String mes, ByteBuffer b, int i) { - err = mes; - } - }; - } - } - -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/test.c b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/test.c deleted file mode 100644 index 3840747..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/test.c +++ /dev/null @@ -1,3425 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ -#include "http_parser.h" -#include -#include -#include -#include /* rand */ -#include -#include - -#undef TRUE -#define TRUE 1 -#undef FALSE -#define FALSE 0 - -#define MAX_HEADERS 13 -#define MAX_ELEMENT_SIZE 2048 - -#define MIN(a,b) ((a) < (b) ? (a) : (b)) - -static http_parser *parser; - -struct message { - const char *name; // for debugging purposes - const char *raw; - enum http_parser_type type; - enum http_method method; - int status_code; - char request_path[MAX_ELEMENT_SIZE]; - char request_url[MAX_ELEMENT_SIZE]; - char fragment[MAX_ELEMENT_SIZE]; - char query_string[MAX_ELEMENT_SIZE]; - char body[MAX_ELEMENT_SIZE]; - size_t body_size; - const char *host; - const char *userinfo; - uint16_t port; - int num_headers; - enum { NONE=0, FIELD, VALUE } last_header_element; - char headers [MAX_HEADERS][2][MAX_ELEMENT_SIZE]; - int should_keep_alive; - - const char *upgrade; // upgraded body - - unsigned short http_major; - unsigned short http_minor; - - int message_begin_cb_called; - int headers_complete_cb_called; - int message_complete_cb_called; - int message_complete_on_eof; - int body_is_final; -}; - -static int currently_parsing_eof; - -static struct message messages[5]; -static int num_messages; -static http_parser_settings *current_pause_parser; - -/* * R E Q U E S T S * */ -const struct message requests[] = -#define CURL_GET 0 -{ {.name= "curl get" - ,.type= HTTP_REQUEST - ,.raw= "GET /test HTTP/1.1\r\n" - "User-Agent: curl/7.18.0 (i486-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.1\r\n" - "Host: 0.0.0.0=5000\r\n" - "Accept: */*\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/test" - ,.request_url= "/test" - ,.num_headers= 3 - ,.headers= - { { "User-Agent", "curl/7.18.0 (i486-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.1" } - , { "Host", "0.0.0.0=5000" } - , { "Accept", "*/*" } - } - ,.body= "" - } - -#define FIREFOX_GET 1 -, {.name= "firefox get" - ,.type= HTTP_REQUEST - ,.raw= "GET /favicon.ico HTTP/1.1\r\n" - "Host: 0.0.0.0=5000\r\n" - "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008061015 Firefox/3.0\r\n" - "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n" - "Accept-Language: en-us,en;q=0.5\r\n" - "Accept-Encoding: gzip,deflate\r\n" - "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n" - "Keep-Alive: 300\r\n" - "Connection: keep-alive\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/favicon.ico" - ,.request_url= "/favicon.ico" - ,.num_headers= 8 - ,.headers= - { { "Host", "0.0.0.0=5000" } - , { "User-Agent", "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008061015 Firefox/3.0" } - , { "Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" } - , { "Accept-Language", "en-us,en;q=0.5" } - , { "Accept-Encoding", "gzip,deflate" } - , { "Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.7" } - , { "Keep-Alive", "300" } - , { "Connection", "keep-alive" } - } - ,.body= "" - } - -#define DUMBFUCK 2 -, {.name= "dumbfuck" - ,.type= HTTP_REQUEST - ,.raw= "GET /dumbfuck HTTP/1.1\r\n" - "aaaaaaaaaaaaa:++++++++++\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/dumbfuck" - ,.request_url= "/dumbfuck" - ,.num_headers= 1 - ,.headers= - { { "aaaaaaaaaaaaa", "++++++++++" } - } - ,.body= "" - } - -#define FRAGMENT_IN_URI 3 -, {.name= "fragment in url" - ,.type= HTTP_REQUEST - ,.raw= "GET /forums/1/topics/2375?page=1#posts-17408 HTTP/1.1\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "page=1" - ,.fragment= "posts-17408" - ,.request_path= "/forums/1/topics/2375" - /* XXX request url does include fragment? */ - ,.request_url= "/forums/1/topics/2375?page=1#posts-17408" - ,.num_headers= 0 - ,.body= "" - } - -#define GET_NO_HEADERS_NO_BODY 4 -, {.name= "get no headers no body" - ,.type= HTTP_REQUEST - ,.raw= "GET /get_no_headers_no_body/world HTTP/1.1\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE /* would need Connection: close */ - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/get_no_headers_no_body/world" - ,.request_url= "/get_no_headers_no_body/world" - ,.num_headers= 0 - ,.body= "" - } - -#define GET_ONE_HEADER_NO_BODY 5 -, {.name= "get one header no body" - ,.type= HTTP_REQUEST - ,.raw= "GET /get_one_header_no_body HTTP/1.1\r\n" - "Accept: */*\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE /* would need Connection: close */ - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/get_one_header_no_body" - ,.request_url= "/get_one_header_no_body" - ,.num_headers= 1 - ,.headers= - { { "Accept" , "*/*" } - } - ,.body= "" - } - -#define GET_FUNKY_CONTENT_LENGTH 6 -, {.name= "get funky content length body hello" - ,.type= HTTP_REQUEST - ,.raw= "GET /get_funky_content_length_body_hello HTTP/1.0\r\n" - "conTENT-Length: 5\r\n" - "\r\n" - "HELLO" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 0 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/get_funky_content_length_body_hello" - ,.request_url= "/get_funky_content_length_body_hello" - ,.num_headers= 1 - ,.headers= - { { "conTENT-Length" , "5" } - } - ,.body= "HELLO" - } - -#define POST_IDENTITY_BODY_WORLD 7 -, {.name= "post identity body world" - ,.type= HTTP_REQUEST - ,.raw= "POST /post_identity_body_world?q=search#hey HTTP/1.1\r\n" - "Accept: */*\r\n" - "Transfer-Encoding: identity\r\n" - "Content-Length: 5\r\n" - "\r\n" - "World" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_POST - ,.query_string= "q=search" - ,.fragment= "hey" - ,.request_path= "/post_identity_body_world" - ,.request_url= "/post_identity_body_world?q=search#hey" - ,.num_headers= 3 - ,.headers= - { { "Accept", "*/*" } - , { "Transfer-Encoding", "identity" } - , { "Content-Length", "5" } - } - ,.body= "World" - } - -#define POST_CHUNKED_ALL_YOUR_BASE 8 -, {.name= "post - chunked body: all your base are belong to us" - ,.type= HTTP_REQUEST - ,.raw= "POST /post_chunked_all_your_base HTTP/1.1\r\n" - "Transfer-Encoding: chunked\r\n" - "\r\n" - "1e\r\nall your base are belong to us\r\n" - "0\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_POST - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/post_chunked_all_your_base" - ,.request_url= "/post_chunked_all_your_base" - ,.num_headers= 1 - ,.headers= - { { "Transfer-Encoding" , "chunked" } - } - ,.body= "all your base are belong to us" - } - -#define TWO_CHUNKS_MULT_ZERO_END 9 -, {.name= "two chunks ; triple zero ending" - ,.type= HTTP_REQUEST - ,.raw= "POST /two_chunks_mult_zero_end HTTP/1.1\r\n" - "Transfer-Encoding: chunked\r\n" - "\r\n" - "5\r\nhello\r\n" - "6\r\n world\r\n" - "000\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_POST - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/two_chunks_mult_zero_end" - ,.request_url= "/two_chunks_mult_zero_end" - ,.num_headers= 1 - ,.headers= - { { "Transfer-Encoding", "chunked" } - } - ,.body= "hello world" - } - -#define CHUNKED_W_TRAILING_HEADERS 10 -, {.name= "chunked with trailing headers. blech." - ,.type= HTTP_REQUEST - ,.raw= "POST /chunked_w_trailing_headers HTTP/1.1\r\n" - "Transfer-Encoding: chunked\r\n" - "\r\n" - "5\r\nhello\r\n" - "6\r\n world\r\n" - "0\r\n" - "Vary: *\r\n" - "Content-Type: text/plain\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_POST - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/chunked_w_trailing_headers" - ,.request_url= "/chunked_w_trailing_headers" - ,.num_headers= 3 - ,.headers= - { { "Transfer-Encoding", "chunked" } - , { "Vary", "*" } - , { "Content-Type", "text/plain" } - } - ,.body= "hello world" - } - -#define CHUNKED_W_BULLSHIT_AFTER_LENGTH 11 -, {.name= "with bullshit after the length" - ,.type= HTTP_REQUEST - ,.raw= "POST /chunked_w_bullshit_after_length HTTP/1.1\r\n" - "Transfer-Encoding: chunked\r\n" - "\r\n" - "5; ihatew3;whatthefuck=aretheseparametersfor\r\nhello\r\n" - "6; blahblah; blah\r\n world\r\n" - "0\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_POST - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/chunked_w_bullshit_after_length" - ,.request_url= "/chunked_w_bullshit_after_length" - ,.num_headers= 1 - ,.headers= - { { "Transfer-Encoding", "chunked" } - } - ,.body= "hello world" - } - -#define WITH_QUOTES 12 -, {.name= "with quotes" - ,.type= HTTP_REQUEST - ,.raw= "GET /with_\"stupid\"_quotes?foo=\"bar\" HTTP/1.1\r\n\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "foo=\"bar\"" - ,.fragment= "" - ,.request_path= "/with_\"stupid\"_quotes" - ,.request_url= "/with_\"stupid\"_quotes?foo=\"bar\"" - ,.num_headers= 0 - ,.headers= { } - ,.body= "" - } - -#define APACHEBENCH_GET 13 -/* The server receiving this request SHOULD NOT wait for EOF - * to know that content-length == 0. - * How to represent this in a unit test? message_complete_on_eof - * Compare with NO_CONTENT_LENGTH_RESPONSE. - */ -, {.name = "apachebench get" - ,.type= HTTP_REQUEST - ,.raw= "GET /test HTTP/1.0\r\n" - "Host: 0.0.0.0:5000\r\n" - "User-Agent: ApacheBench/2.3\r\n" - "Accept: */*\r\n\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 0 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/test" - ,.request_url= "/test" - ,.num_headers= 3 - ,.headers= { { "Host", "0.0.0.0:5000" } - , { "User-Agent", "ApacheBench/2.3" } - , { "Accept", "*/*" } - } - ,.body= "" - } - -#define QUERY_URL_WITH_QUESTION_MARK_GET 14 -/* Some clients include '?' characters in query strings. - */ -, {.name = "query url with question mark" - ,.type= HTTP_REQUEST - ,.raw= "GET /test.cgi?foo=bar?baz HTTP/1.1\r\n\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "foo=bar?baz" - ,.fragment= "" - ,.request_path= "/test.cgi" - ,.request_url= "/test.cgi?foo=bar?baz" - ,.num_headers= 0 - ,.headers= {} - ,.body= "" - } - -#define PREFIX_NEWLINE_GET 15 -/* Some clients, especially after a POST in a keep-alive connection, - * will send an extra CRLF before the next request - */ -, {.name = "newline prefix get" - ,.type= HTTP_REQUEST - ,.raw= "\r\nGET /test HTTP/1.1\r\n\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/test" - ,.request_url= "/test" - ,.num_headers= 0 - ,.headers= { } - ,.body= "" - } - -#define UPGRADE_REQUEST 16 -, {.name = "upgrade request" - ,.type= HTTP_REQUEST - ,.raw= "GET /demo HTTP/1.1\r\n" - "Host: example.com\r\n" - "Connection: Upgrade\r\n" - "Sec-WebSocket-Key2: 12998 5 Y3 1 .P00\r\n" - "Sec-WebSocket-Protocol: sample\r\n" - "Upgrade: WebSocket\r\n" - "Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5\r\n" - "Origin: http://example.com\r\n" - "\r\n" - "Hot diggity dogg" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/demo" - ,.request_url= "/demo" - ,.num_headers= 7 - ,.upgrade="Hot diggity dogg" - ,.headers= { { "Host", "example.com" } - , { "Connection", "Upgrade" } - , { "Sec-WebSocket-Key2", "12998 5 Y3 1 .P00" } - , { "Sec-WebSocket-Protocol", "sample" } - , { "Upgrade", "WebSocket" } - , { "Sec-WebSocket-Key1", "4 @1 46546xW%0l 1 5" } - , { "Origin", "http://example.com" } - } - ,.body= "" - } - -#define CONNECT_REQUEST 17 -, {.name = "connect request" - ,.type= HTTP_REQUEST - ,.raw= "CONNECT 0-home0.netscape.com:443 HTTP/1.0\r\n" - "User-agent: Mozilla/1.1N\r\n" - "Proxy-authorization: basic aGVsbG86d29ybGQ=\r\n" - "\r\n" - "some data\r\n" - "and yet even more data" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 0 - ,.method= HTTP_CONNECT - ,.query_string= "" - ,.fragment= "" - ,.request_path= "" - ,.request_url= "0-home0.netscape.com:443" - ,.num_headers= 2 - ,.upgrade="some data\r\nand yet even more data" - ,.headers= { { "User-agent", "Mozilla/1.1N" } - , { "Proxy-authorization", "basic aGVsbG86d29ybGQ=" } - } - ,.body= "" - } - -#define REPORT_REQ 18 -, {.name= "report request" - ,.type= HTTP_REQUEST - ,.raw= "REPORT /test HTTP/1.1\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_REPORT - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/test" - ,.request_url= "/test" - ,.num_headers= 0 - ,.headers= {} - ,.body= "" - } - -#define NO_HTTP_VERSION 19 -, {.name= "request with no http version" - ,.type= HTTP_REQUEST - ,.raw= "GET /\r\n" - "\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 0 - ,.http_minor= 9 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/" - ,.request_url= "/" - ,.num_headers= 0 - ,.headers= {} - ,.body= "" - } - -#define MSEARCH_REQ 20 -, {.name= "m-search request" - ,.type= HTTP_REQUEST - ,.raw= "M-SEARCH * HTTP/1.1\r\n" - "HOST: 239.255.255.250:1900\r\n" - "MAN: \"ssdp:discover\"\r\n" - "ST: \"ssdp:all\"\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_MSEARCH - ,.query_string= "" - ,.fragment= "" - ,.request_path= "*" - ,.request_url= "*" - ,.num_headers= 3 - ,.headers= { { "HOST", "239.255.255.250:1900" } - , { "MAN", "\"ssdp:discover\"" } - , { "ST", "\"ssdp:all\"" } - } - ,.body= "" - } - -#define LINE_FOLDING_IN_HEADER 21 -, {.name= "line folding in header value" - ,.type= HTTP_REQUEST - ,.raw= "GET / HTTP/1.1\r\n" - "Line1: abc\r\n" - "\tdef\r\n" - " ghi\r\n" - "\t\tjkl\r\n" - " mno \r\n" - "\t \tqrs\r\n" - "Line2: \t line2\t\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/" - ,.request_url= "/" - ,.num_headers= 2 - ,.headers= { { "Line1", "abcdefghijklmno qrs" } - , { "Line2", "line2\t" } - } - ,.body= "" - } - - -#define QUERY_TERMINATED_HOST 22 -, {.name= "host terminated by a query string" - ,.type= HTTP_REQUEST - ,.raw= "GET http://hypnotoad.org?hail=all HTTP/1.1\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "hail=all" - ,.fragment= "" - ,.request_path= "" - ,.request_url= "http://hypnotoad.org?hail=all" - ,.host= "hypnotoad.org" - ,.num_headers= 0 - ,.headers= { } - ,.body= "" - } - -#define QUERY_TERMINATED_HOSTPORT 23 -, {.name= "host:port terminated by a query string" - ,.type= HTTP_REQUEST - ,.raw= "GET http://hypnotoad.org:1234?hail=all HTTP/1.1\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "hail=all" - ,.fragment= "" - ,.request_path= "" - ,.request_url= "http://hypnotoad.org:1234?hail=all" - ,.host= "hypnotoad.org" - ,.port= 1234 - ,.num_headers= 0 - ,.headers= { } - ,.body= "" - } - -#define SPACE_TERMINATED_HOSTPORT 24 -, {.name= "host:port terminated by a space" - ,.type= HTTP_REQUEST - ,.raw= "GET http://hypnotoad.org:1234 HTTP/1.1\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "" - ,.request_url= "http://hypnotoad.org:1234" - ,.host= "hypnotoad.org" - ,.port= 1234 - ,.num_headers= 0 - ,.headers= { } - ,.body= "" - } - -#define PATCH_REQ 25 -, {.name = "PATCH request" - ,.type= HTTP_REQUEST - ,.raw= "PATCH /file.txt HTTP/1.1\r\n" - "Host: www.example.com\r\n" - "Content-Type: application/example\r\n" - "If-Match: \"e0023aa4e\"\r\n" - "Content-Length: 10\r\n" - "\r\n" - "cccccccccc" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_PATCH - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/file.txt" - ,.request_url= "/file.txt" - ,.num_headers= 4 - ,.headers= { { "Host", "www.example.com" } - , { "Content-Type", "application/example" } - , { "If-Match", "\"e0023aa4e\"" } - , { "Content-Length", "10" } - } - ,.body= "cccccccccc" - } - -#define CONNECT_CAPS_REQUEST 26 -, {.name = "connect caps request" - ,.type= HTTP_REQUEST - ,.raw= "CONNECT HOME0.NETSCAPE.COM:443 HTTP/1.0\r\n" - "User-agent: Mozilla/1.1N\r\n" - "Proxy-authorization: basic aGVsbG86d29ybGQ=\r\n" - "\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 0 - ,.method= HTTP_CONNECT - ,.query_string= "" - ,.fragment= "" - ,.request_path= "" - ,.request_url= "HOME0.NETSCAPE.COM:443" - ,.num_headers= 2 - ,.upgrade="" - ,.headers= { { "User-agent", "Mozilla/1.1N" } - , { "Proxy-authorization", "basic aGVsbG86d29ybGQ=" } - } - ,.body= "" - } - -#if !HTTP_PARSER_STRICT -#define UTF8_PATH_REQ 27 -, {.name= "utf-8 path request" - ,.type= HTTP_REQUEST - ,.raw= "GET /δ¶/δt/pope?q=1#narf HTTP/1.1\r\n" - "Host: github.com\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "q=1" - ,.fragment= "narf" - ,.request_path= "/δ¶/δt/pope" - ,.request_url= "/δ¶/δt/pope?q=1#narf" - ,.num_headers= 1 - ,.headers= { {"Host", "github.com" } - } - ,.body= "" - } - -#define HOSTNAME_UNDERSCORE 28 -, {.name = "hostname underscore" - ,.type= HTTP_REQUEST - ,.raw= "CONNECT home_0.netscape.com:443 HTTP/1.0\r\n" - "User-agent: Mozilla/1.1N\r\n" - "Proxy-authorization: basic aGVsbG86d29ybGQ=\r\n" - "\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 0 - ,.method= HTTP_CONNECT - ,.query_string= "" - ,.fragment= "" - ,.request_path= "" - ,.request_url= "home_0.netscape.com:443" - ,.num_headers= 2 - ,.upgrade="" - ,.headers= { { "User-agent", "Mozilla/1.1N" } - , { "Proxy-authorization", "basic aGVsbG86d29ybGQ=" } - } - ,.body= "" - } -#endif /* !HTTP_PARSER_STRICT */ - -/* see https://github.com/ry/http-parser/issues/47 */ -#define EAT_TRAILING_CRLF_NO_CONNECTION_CLOSE 29 -, {.name = "eat CRLF between requests, no \"Connection: close\" header" - ,.raw= "POST / HTTP/1.1\r\n" - "Host: www.example.com\r\n" - "Content-Type: application/x-www-form-urlencoded\r\n" - "Content-Length: 4\r\n" - "\r\n" - "q=42\r\n" /* note the trailing CRLF */ - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_POST - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/" - ,.request_url= "/" - ,.num_headers= 3 - ,.upgrade= 0 - ,.headers= { { "Host", "www.example.com" } - , { "Content-Type", "application/x-www-form-urlencoded" } - , { "Content-Length", "4" } - } - ,.body= "q=42" - } - -/* see https://github.com/ry/http-parser/issues/47 */ -#define EAT_TRAILING_CRLF_WITH_CONNECTION_CLOSE 30 -, {.name = "eat CRLF between requests even if \"Connection: close\" is set" - ,.raw= "POST / HTTP/1.1\r\n" - "Host: www.example.com\r\n" - "Content-Type: application/x-www-form-urlencoded\r\n" - "Content-Length: 4\r\n" - "Connection: close\r\n" - "\r\n" - "q=42\r\n" /* note the trailing CRLF */ - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE /* input buffer isn't empty when on_message_complete is called */ - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_POST - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/" - ,.request_url= "/" - ,.num_headers= 4 - ,.upgrade= 0 - ,.headers= { { "Host", "www.example.com" } - , { "Content-Type", "application/x-www-form-urlencoded" } - , { "Content-Length", "4" } - , { "Connection", "close" } - } - ,.body= "q=42" - } - -#define PURGE_REQ 31 -, {.name = "PURGE request" - ,.type= HTTP_REQUEST - ,.raw= "PURGE /file.txt HTTP/1.1\r\n" - "Host: www.example.com\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_PURGE - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/file.txt" - ,.request_url= "/file.txt" - ,.num_headers= 1 - ,.headers= { { "Host", "www.example.com" } } - ,.body= "" - } - -#define SEARCH_REQ 32 -, {.name = "SEARCH request" - ,.type= HTTP_REQUEST - ,.raw= "SEARCH / HTTP/1.1\r\n" - "Host: www.example.com\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_SEARCH - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/" - ,.request_url= "/" - ,.num_headers= 1 - ,.headers= { { "Host", "www.example.com" } } - ,.body= "" - } - -#define PROXY_WITH_BASIC_AUTH 33 -, {.name= "host:port and basic_auth" - ,.type= HTTP_REQUEST - ,.raw= "GET http://a%12:b!&*$@hypnotoad.org:1234/toto HTTP/1.1\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.fragment= "" - ,.request_path= "/toto" - ,.request_url= "http://a%12:b!&*$@hypnotoad.org:1234/toto" - ,.host= "hypnotoad.org" - ,.userinfo= "a%12:b!&*$" - ,.port= 1234 - ,.num_headers= 0 - ,.headers= { } - ,.body= "" - } - - -, {.name= NULL } /* sentinel */ -}; - -/* * R E S P O N S E S * */ -const struct message responses[] = -#define GOOGLE_301 0 -{ {.name= "google 301" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 301 Moved Permanently\r\n" - "Location: http://www.google.com/\r\n" - "Content-Type: text/html; charset=UTF-8\r\n" - "Date: Sun, 26 Apr 2009 11:11:49 GMT\r\n" - "Expires: Tue, 26 May 2009 11:11:49 GMT\r\n" - "X-$PrototypeBI-Version: 1.6.0.3\r\n" /* $ char in header field */ - "Cache-Control: public, max-age=2592000\r\n" - "Server: gws\r\n" - "Content-Length: 219 \r\n" - "\r\n" - "\n" - "301 Moved\n" - "

301 Moved

\n" - "The document has moved\n" - "here.\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 301 - ,.num_headers= 8 - ,.headers= - { { "Location", "http://www.google.com/" } - , { "Content-Type", "text/html; charset=UTF-8" } - , { "Date", "Sun, 26 Apr 2009 11:11:49 GMT" } - , { "Expires", "Tue, 26 May 2009 11:11:49 GMT" } - , { "X-$PrototypeBI-Version", "1.6.0.3" } - , { "Cache-Control", "public, max-age=2592000" } - , { "Server", "gws" } - , { "Content-Length", "219 " } - } - ,.body= "\n" - "301 Moved\n" - "

301 Moved

\n" - "The document has moved\n" - "here.\r\n" - "\r\n" - } - -#define NO_CONTENT_LENGTH_RESPONSE 1 -/* The client should wait for the server's EOF. That is, when content-length - * is not specified, and "Connection: close", the end of body is specified - * by the EOF. - * Compare with APACHEBENCH_GET - */ -, {.name= "no content-length response" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 200 OK\r\n" - "Date: Tue, 04 Aug 2009 07:59:32 GMT\r\n" - "Server: Apache\r\n" - "X-Powered-By: Servlet/2.5 JSP/2.1\r\n" - "Content-Type: text/xml; charset=utf-8\r\n" - "Connection: close\r\n" - "\r\n" - "\n" - "\n" - " \n" - " \n" - " SOAP-ENV:Client\n" - " Client Error\n" - " \n" - " \n" - "" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= TRUE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 200 - ,.num_headers= 5 - ,.headers= - { { "Date", "Tue, 04 Aug 2009 07:59:32 GMT" } - , { "Server", "Apache" } - , { "X-Powered-By", "Servlet/2.5 JSP/2.1" } - , { "Content-Type", "text/xml; charset=utf-8" } - , { "Connection", "close" } - } - ,.body= "\n" - "\n" - " \n" - " \n" - " SOAP-ENV:Client\n" - " Client Error\n" - " \n" - " \n" - "" - } - -#define NO_HEADERS_NO_BODY_404 2 -, {.name= "404 no headers no body" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 404 Not Found\r\n\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= TRUE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 404 - ,.num_headers= 0 - ,.headers= {} - ,.body_size= 0 - ,.body= "" - } - -#define NO_REASON_PHRASE 3 -, {.name= "301 no response phrase" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 301\r\n\r\n" - ,.should_keep_alive = FALSE - ,.message_complete_on_eof= TRUE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 301 - ,.num_headers= 0 - ,.headers= {} - ,.body= "" - } - -#define TRAILING_SPACE_ON_CHUNKED_BODY 4 -, {.name="200 trailing space on chunked body" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 200 OK\r\n" - "Content-Type: text/plain\r\n" - "Transfer-Encoding: chunked\r\n" - "\r\n" - "25 \r\n" - "This is the data in the first chunk\r\n" - "\r\n" - "1C\r\n" - "and this is the second one\r\n" - "\r\n" - "0 \r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 200 - ,.num_headers= 2 - ,.headers= - { {"Content-Type", "text/plain" } - , {"Transfer-Encoding", "chunked" } - } - ,.body_size = 37+28 - ,.body = - "This is the data in the first chunk\r\n" - "and this is the second one\r\n" - - } - -#define NO_CARRIAGE_RET 5 -, {.name="no carriage ret" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 200 OK\n" - "Content-Type: text/html; charset=utf-8\n" - "Connection: close\n" - "\n" - "these headers are from http://news.ycombinator.com/" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= TRUE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 200 - ,.num_headers= 2 - ,.headers= - { {"Content-Type", "text/html; charset=utf-8" } - , {"Connection", "close" } - } - ,.body= "these headers are from http://news.ycombinator.com/" - } - -#define PROXY_CONNECTION 6 -, {.name="proxy connection" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 200 OK\r\n" - "Content-Type: text/html; charset=UTF-8\r\n" - "Content-Length: 11\r\n" - "Proxy-Connection: close\r\n" - "Date: Thu, 31 Dec 2009 20:55:48 +0000\r\n" - "\r\n" - "hello world" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 200 - ,.num_headers= 4 - ,.headers= - { {"Content-Type", "text/html; charset=UTF-8" } - , {"Content-Length", "11" } - , {"Proxy-Connection", "close" } - , {"Date", "Thu, 31 Dec 2009 20:55:48 +0000"} - } - ,.body= "hello world" - } - -#define UNDERSTORE_HEADER_KEY 7 - // shown by - // curl -o /dev/null -v "http://ad.doubleclick.net/pfadx/DARTSHELLCONFIGXML;dcmt=text/xml;" -, {.name="underscore header key" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 200 OK\r\n" - "Server: DCLK-AdSvr\r\n" - "Content-Type: text/xml\r\n" - "Content-Length: 0\r\n" - "DCLK_imp: v7;x;114750856;0-0;0;17820020;0/0;21603567/21621457/1;;~okv=;dcmt=text/xml;;~cs=o\r\n\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 200 - ,.num_headers= 4 - ,.headers= - { {"Server", "DCLK-AdSvr" } - , {"Content-Type", "text/xml" } - , {"Content-Length", "0" } - , {"DCLK_imp", "v7;x;114750856;0-0;0;17820020;0/0;21603567/21621457/1;;~okv=;dcmt=text/xml;;~cs=o" } - } - ,.body= "" - } - -#define BONJOUR_MADAME_FR 8 -/* The client should not merge two headers fields when the first one doesn't - * have a value. - */ -, {.name= "bonjourmadame.fr" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.0 301 Moved Permanently\r\n" - "Date: Thu, 03 Jun 2010 09:56:32 GMT\r\n" - "Server: Apache/2.2.3 (Red Hat)\r\n" - "Cache-Control: public\r\n" - "Pragma: \r\n" - "Location: http://www.bonjourmadame.fr/\r\n" - "Vary: Accept-Encoding\r\n" - "Content-Length: 0\r\n" - "Content-Type: text/html; charset=UTF-8\r\n" - "Connection: keep-alive\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 0 - ,.status_code= 301 - ,.num_headers= 9 - ,.headers= - { { "Date", "Thu, 03 Jun 2010 09:56:32 GMT" } - , { "Server", "Apache/2.2.3 (Red Hat)" } - , { "Cache-Control", "public" } - , { "Pragma", "" } - , { "Location", "http://www.bonjourmadame.fr/" } - , { "Vary", "Accept-Encoding" } - , { "Content-Length", "0" } - , { "Content-Type", "text/html; charset=UTF-8" } - , { "Connection", "keep-alive" } - } - ,.body= "" - } - -#define RES_FIELD_UNDERSCORE 9 -/* Should handle spaces in header fields */ -, {.name= "field underscore" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 200 OK\r\n" - "Date: Tue, 28 Sep 2010 01:14:13 GMT\r\n" - "Server: Apache\r\n" - "Cache-Control: no-cache, must-revalidate\r\n" - "Expires: Mon, 26 Jul 1997 05:00:00 GMT\r\n" - ".et-Cookie: PlaxoCS=1274804622353690521; path=/; domain=.plaxo.com\r\n" - "Vary: Accept-Encoding\r\n" - "_eep-Alive: timeout=45\r\n" /* semantic value ignored */ - "_onnection: Keep-Alive\r\n" /* semantic value ignored */ - "Transfer-Encoding: chunked\r\n" - "Content-Type: text/html\r\n" - "Connection: close\r\n" - "\r\n" - "0\r\n\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 200 - ,.num_headers= 11 - ,.headers= - { { "Date", "Tue, 28 Sep 2010 01:14:13 GMT" } - , { "Server", "Apache" } - , { "Cache-Control", "no-cache, must-revalidate" } - , { "Expires", "Mon, 26 Jul 1997 05:00:00 GMT" } - , { ".et-Cookie", "PlaxoCS=1274804622353690521; path=/; domain=.plaxo.com" } - , { "Vary", "Accept-Encoding" } - , { "_eep-Alive", "timeout=45" } - , { "_onnection", "Keep-Alive" } - , { "Transfer-Encoding", "chunked" } - , { "Content-Type", "text/html" } - , { "Connection", "close" } - } - ,.body= "" - } - -#define NON_ASCII_IN_STATUS_LINE 10 -/* Should handle non-ASCII in status line */ -, {.name= "non-ASCII in status line" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 500 Oriëntatieprobleem\r\n" - "Date: Fri, 5 Nov 2010 23:07:12 GMT+2\r\n" - "Content-Length: 0\r\n" - "Connection: close\r\n" - "\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 500 - ,.num_headers= 3 - ,.headers= - { { "Date", "Fri, 5 Nov 2010 23:07:12 GMT+2" } - , { "Content-Length", "0" } - , { "Connection", "close" } - } - ,.body= "" - } - -#define HTTP_VERSION_0_9 11 -/* Should handle HTTP/0.9 */ -, {.name= "http version 0.9" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/0.9 200 OK\r\n" - "\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= TRUE - ,.http_major= 0 - ,.http_minor= 9 - ,.status_code= 200 - ,.num_headers= 0 - ,.headers= - {} - ,.body= "" - } - -#define NO_CONTENT_LENGTH_NO_TRANSFER_ENCODING_RESPONSE 12 -/* The client should wait for the server's EOF. That is, when neither - * content-length nor transfer-encoding is specified, the end of body - * is specified by the EOF. - */ -, {.name= "neither content-length nor transfer-encoding response" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 200 OK\r\n" - "Content-Type: text/plain\r\n" - "\r\n" - "hello world" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= TRUE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 200 - ,.num_headers= 1 - ,.headers= - { { "Content-Type", "text/plain" } - } - ,.body= "hello world" - } - -#define NO_BODY_HTTP10_KA_200 13 -, {.name= "HTTP/1.0 with keep-alive and EOF-terminated 200 status" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.0 200 OK\r\n" - "Connection: keep-alive\r\n" - "\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= TRUE - ,.http_major= 1 - ,.http_minor= 0 - ,.status_code= 200 - ,.num_headers= 1 - ,.headers= - { { "Connection", "keep-alive" } - } - ,.body_size= 0 - ,.body= "" - } - -#define NO_BODY_HTTP10_KA_204 14 -, {.name= "HTTP/1.0 with keep-alive and a 204 status" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.0 204 No content\r\n" - "Connection: keep-alive\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 0 - ,.status_code= 204 - ,.num_headers= 1 - ,.headers= - { { "Connection", "keep-alive" } - } - ,.body_size= 0 - ,.body= "" - } - -#define NO_BODY_HTTP11_KA_200 15 -, {.name= "HTTP/1.1 with an EOF-terminated 200 status" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 200 OK\r\n" - "\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= TRUE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 200 - ,.num_headers= 0 - ,.headers={} - ,.body_size= 0 - ,.body= "" - } - -#define NO_BODY_HTTP11_KA_204 16 -, {.name= "HTTP/1.1 with a 204 status" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 204 No content\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 204 - ,.num_headers= 0 - ,.headers={} - ,.body_size= 0 - ,.body= "" - } - -#define NO_BODY_HTTP11_NOKA_204 17 -, {.name= "HTTP/1.1 with a 204 status and keep-alive disabled" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 204 No content\r\n" - "Connection: close\r\n" - "\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 204 - ,.num_headers= 1 - ,.headers= - { { "Connection", "close" } - } - ,.body_size= 0 - ,.body= "" - } - -#define NO_BODY_HTTP11_KA_CHUNKED_200 18 -, {.name= "HTTP/1.1 with chunked endocing and a 200 response" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 200 OK\r\n" - "Transfer-Encoding: chunked\r\n" - "\r\n" - "0\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 200 - ,.num_headers= 1 - ,.headers= - { { "Transfer-Encoding", "chunked" } - } - ,.body_size= 0 - ,.body= "" - } - -#if !HTTP_PARSER_STRICT -#define SPACE_IN_FIELD_RES 19 -/* Should handle spaces in header fields */ -, {.name= "field space" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 200 OK\r\n" - "Server: Microsoft-IIS/6.0\r\n" - "X-Powered-By: ASP.NET\r\n" - "en-US Content-Type: text/xml\r\n" /* this is the problem */ - "Content-Type: text/xml\r\n" - "Content-Length: 16\r\n" - "Date: Fri, 23 Jul 2010 18:45:38 GMT\r\n" - "Connection: keep-alive\r\n" - "\r\n" - "hello" /* fake body */ - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 200 - ,.num_headers= 7 - ,.headers= - { { "Server", "Microsoft-IIS/6.0" } - , { "X-Powered-By", "ASP.NET" } - , { "en-US Content-Type", "text/xml" } - , { "Content-Type", "text/xml" } - , { "Content-Length", "16" } - , { "Date", "Fri, 23 Jul 2010 18:45:38 GMT" } - , { "Connection", "keep-alive" } - } - ,.body= "hello" - } -#endif /* !HTTP_PARSER_STRICT */ - -, {.name= NULL } /* sentinel */ -}; - -/* strnlen() is a POSIX.2008 addition. Can't rely on it being available so - * define it ourselves. - */ -size_t -strnlen(const char *s, size_t maxlen) -{ - const char *p; - - p = memchr(s, '\0', maxlen); - if (p == NULL) - return maxlen; - - return p - s; -} - -size_t -strlncat(char *dst, size_t len, const char *src, size_t n) -{ - size_t slen; - size_t dlen; - size_t rlen; - size_t ncpy; - - slen = strnlen(src, n); - dlen = strnlen(dst, len); - - if (dlen < len) { - rlen = len - dlen; - ncpy = slen < rlen ? slen : (rlen - 1); - memcpy(dst + dlen, src, ncpy); - dst[dlen + ncpy] = '\0'; - } - - assert(len > slen + dlen); - return slen + dlen; -} - -size_t -strlcat(char *dst, const char *src, size_t len) -{ - return strlncat(dst, len, src, (size_t) -1); -} - -size_t -strlncpy(char *dst, size_t len, const char *src, size_t n) -{ - size_t slen; - size_t ncpy; - - slen = strnlen(src, n); - - if (len > 0) { - ncpy = slen < len ? slen : (len - 1); - memcpy(dst, src, ncpy); - dst[ncpy] = '\0'; - } - - assert(len > slen); - return slen; -} - -size_t -strlcpy(char *dst, const char *src, size_t len) -{ - return strlncpy(dst, len, src, (size_t) -1); -} - -int -request_url_cb (http_parser *p, const char *buf, size_t len) -{ - assert(p == parser); - strlncat(messages[num_messages].request_url, - sizeof(messages[num_messages].request_url), - buf, - len); - return 0; -} - -int -status_complete_cb (http_parser *p) { - assert(p == parser); - p->data++; - return 0; -} - -int -header_field_cb (http_parser *p, const char *buf, size_t len) -{ - assert(p == parser); - struct message *m = &messages[num_messages]; - - if (m->last_header_element != FIELD) - m->num_headers++; - - strlncat(m->headers[m->num_headers-1][0], - sizeof(m->headers[m->num_headers-1][0]), - buf, - len); - - m->last_header_element = FIELD; - - return 0; -} - -int -header_value_cb (http_parser *p, const char *buf, size_t len) -{ - assert(p == parser); - struct message *m = &messages[num_messages]; - - strlncat(m->headers[m->num_headers-1][1], - sizeof(m->headers[m->num_headers-1][1]), - buf, - len); - - m->last_header_element = VALUE; - - return 0; -} - -void -check_body_is_final (const http_parser *p) -{ - if (messages[num_messages].body_is_final) { - fprintf(stderr, "\n\n *** Error http_body_is_final() should return 1 " - "on last on_body callback call " - "but it doesn't! ***\n\n"); - assert(0); - abort(); - } - messages[num_messages].body_is_final = http_body_is_final(p); -} - -int -body_cb (http_parser *p, const char *buf, size_t len) -{ - assert(p == parser); - strlncat(messages[num_messages].body, - sizeof(messages[num_messages].body), - buf, - len); - messages[num_messages].body_size += len; - check_body_is_final(p); - // printf("body_cb: '%s'\n", requests[num_messages].body); - return 0; -} - -int -count_body_cb (http_parser *p, const char *buf, size_t len) -{ - assert(p == parser); - assert(buf); - messages[num_messages].body_size += len; - check_body_is_final(p); - return 0; -} - -int -message_begin_cb (http_parser *p) -{ - assert(p == parser); - messages[num_messages].message_begin_cb_called = TRUE; - return 0; -} - -int -headers_complete_cb (http_parser *p) -{ - assert(p == parser); - messages[num_messages].method = parser->method; - messages[num_messages].status_code = parser->status_code; - messages[num_messages].http_major = parser->http_major; - messages[num_messages].http_minor = parser->http_minor; - messages[num_messages].headers_complete_cb_called = TRUE; - messages[num_messages].should_keep_alive = http_should_keep_alive(parser); - return 0; -} - -int -message_complete_cb (http_parser *p) -{ - assert(p == parser); - if (messages[num_messages].should_keep_alive != http_should_keep_alive(parser)) - { - fprintf(stderr, "\n\n *** Error http_should_keep_alive() should have same " - "value in both on_message_complete and on_headers_complete " - "but it doesn't! ***\n\n"); - assert(0); - abort(); - } - - if (messages[num_messages].body_size && - http_body_is_final(p) && - !messages[num_messages].body_is_final) - { - fprintf(stderr, "\n\n *** Error http_body_is_final() should return 1 " - "on last on_body callback call " - "but it doesn't! ***\n\n"); - assert(0); - abort(); - } - - messages[num_messages].message_complete_cb_called = TRUE; - - messages[num_messages].message_complete_on_eof = currently_parsing_eof; - - num_messages++; - return 0; -} - -/* These dontcall_* callbacks exist so that we can verify that when we're - * paused, no additional callbacks are invoked */ -int -dontcall_message_begin_cb (http_parser *p) -{ - if (p) { } // gcc - fprintf(stderr, "\n\n*** on_message_begin() called on paused parser ***\n\n"); - abort(); -} - -int -dontcall_header_field_cb (http_parser *p, const char *buf, size_t len) -{ - if (p || buf || len) { } // gcc - fprintf(stderr, "\n\n*** on_header_field() called on paused parser ***\n\n"); - abort(); -} - -int -dontcall_header_value_cb (http_parser *p, const char *buf, size_t len) -{ - if (p || buf || len) { } // gcc - fprintf(stderr, "\n\n*** on_header_value() called on paused parser ***\n\n"); - abort(); -} - -int -dontcall_request_url_cb (http_parser *p, const char *buf, size_t len) -{ - if (p || buf || len) { } // gcc - fprintf(stderr, "\n\n*** on_request_url() called on paused parser ***\n\n"); - abort(); -} - -int -dontcall_body_cb (http_parser *p, const char *buf, size_t len) -{ - if (p || buf || len) { } // gcc - fprintf(stderr, "\n\n*** on_body_cb() called on paused parser ***\n\n"); - abort(); -} - -int -dontcall_headers_complete_cb (http_parser *p) -{ - if (p) { } // gcc - fprintf(stderr, "\n\n*** on_headers_complete() called on paused " - "parser ***\n\n"); - abort(); -} - -int -dontcall_message_complete_cb (http_parser *p) -{ - if (p) { } // gcc - fprintf(stderr, "\n\n*** on_message_complete() called on paused " - "parser ***\n\n"); - abort(); -} - -static http_parser_settings settings_dontcall = - {.on_message_begin = dontcall_message_begin_cb - ,.on_header_field = dontcall_header_field_cb - ,.on_header_value = dontcall_header_value_cb - ,.on_url = dontcall_request_url_cb - ,.on_body = dontcall_body_cb - ,.on_headers_complete = dontcall_headers_complete_cb - ,.on_message_complete = dontcall_message_complete_cb - }; - -/* These pause_* callbacks always pause the parser and just invoke the regular - * callback that tracks content. Before returning, we overwrite the parser - * settings to point to the _dontcall variety so that we can verify that - * the pause actually did, you know, pause. */ -int -pause_message_begin_cb (http_parser *p) -{ - http_parser_pause(p, 1); - *current_pause_parser = settings_dontcall; - return message_begin_cb(p); -} - -int -pause_header_field_cb (http_parser *p, const char *buf, size_t len) -{ - http_parser_pause(p, 1); - *current_pause_parser = settings_dontcall; - return header_field_cb(p, buf, len); -} - -int -pause_header_value_cb (http_parser *p, const char *buf, size_t len) -{ - http_parser_pause(p, 1); - *current_pause_parser = settings_dontcall; - return header_value_cb(p, buf, len); -} - -int -pause_request_url_cb (http_parser *p, const char *buf, size_t len) -{ - http_parser_pause(p, 1); - *current_pause_parser = settings_dontcall; - return request_url_cb(p, buf, len); -} - -int -pause_body_cb (http_parser *p, const char *buf, size_t len) -{ - http_parser_pause(p, 1); - *current_pause_parser = settings_dontcall; - return body_cb(p, buf, len); -} - -int -pause_headers_complete_cb (http_parser *p) -{ - http_parser_pause(p, 1); - *current_pause_parser = settings_dontcall; - return headers_complete_cb(p); -} - -int -pause_message_complete_cb (http_parser *p) -{ - http_parser_pause(p, 1); - *current_pause_parser = settings_dontcall; - return message_complete_cb(p); -} - -static http_parser_settings settings_pause = - {.on_message_begin = pause_message_begin_cb - ,.on_header_field = pause_header_field_cb - ,.on_header_value = pause_header_value_cb - ,.on_url = pause_request_url_cb - ,.on_body = pause_body_cb - ,.on_headers_complete = pause_headers_complete_cb - ,.on_message_complete = pause_message_complete_cb - }; - -static http_parser_settings settings = - {.on_message_begin = message_begin_cb - ,.on_header_field = header_field_cb - ,.on_header_value = header_value_cb - ,.on_url = request_url_cb - ,.on_body = body_cb - ,.on_headers_complete = headers_complete_cb - ,.on_message_complete = message_complete_cb - }; - -static http_parser_settings settings_count_body = - {.on_message_begin = message_begin_cb - ,.on_header_field = header_field_cb - ,.on_header_value = header_value_cb - ,.on_url = request_url_cb - ,.on_body = count_body_cb - ,.on_headers_complete = headers_complete_cb - ,.on_message_complete = message_complete_cb - }; - -static http_parser_settings settings_null = - {.on_message_begin = 0 - ,.on_header_field = 0 - ,.on_header_value = 0 - ,.on_url = 0 - ,.on_body = 0 - ,.on_headers_complete = 0 - ,.on_message_complete = 0 - }; - -void -parser_init (enum http_parser_type type) -{ - num_messages = 0; - - assert(parser == NULL); - - parser = malloc(sizeof(http_parser)); - - http_parser_init(parser, type); - - memset(&messages, 0, sizeof messages); - -} - -void -parser_free () -{ - assert(parser); - free(parser); - parser = NULL; -} - -size_t parse (const char *buf, size_t len) -{ - size_t nparsed; - currently_parsing_eof = (len == 0); - nparsed = http_parser_execute(parser, &settings, buf, len); - return nparsed; -} - -size_t parse_count_body (const char *buf, size_t len) -{ - size_t nparsed; - currently_parsing_eof = (len == 0); - nparsed = http_parser_execute(parser, &settings_count_body, buf, len); - return nparsed; -} - -size_t parse_pause (const char *buf, size_t len) -{ - size_t nparsed; - http_parser_settings s = settings_pause; - - currently_parsing_eof = (len == 0); - current_pause_parser = &s; - nparsed = http_parser_execute(parser, current_pause_parser, buf, len); - return nparsed; -} - -static inline int -check_str_eq (const struct message *m, - const char *prop, - const char *expected, - const char *found) { - if ((expected == NULL) != (found == NULL)) { - printf("\n*** Error: %s in '%s' ***\n\n", prop, m->name); - printf("expected %s\n", (expected == NULL) ? "NULL" : expected); - printf(" found %s\n", (found == NULL) ? "NULL" : found); - return 0; - } - if (expected != NULL && 0 != strcmp(expected, found)) { - printf("\n*** Error: %s in '%s' ***\n\n", prop, m->name); - printf("expected '%s'\n", expected); - printf(" found '%s'\n", found); - return 0; - } - return 1; -} - -static inline int -check_num_eq (const struct message *m, - const char *prop, - int expected, - int found) { - if (expected != found) { - printf("\n*** Error: %s in '%s' ***\n\n", prop, m->name); - printf("expected %d\n", expected); - printf(" found %d\n", found); - return 0; - } - return 1; -} - -#define MESSAGE_CHECK_STR_EQ(expected, found, prop) \ - if (!check_str_eq(expected, #prop, expected->prop, found->prop)) return 0 - -#define MESSAGE_CHECK_NUM_EQ(expected, found, prop) \ - if (!check_num_eq(expected, #prop, expected->prop, found->prop)) return 0 - -#define MESSAGE_CHECK_URL_EQ(u, expected, found, prop, fn) \ -do { \ - char ubuf[256]; \ - \ - if ((u)->field_set & (1 << (fn))) { \ - memcpy(ubuf, (found)->request_url + (u)->field_data[(fn)].off, \ - (u)->field_data[(fn)].len); \ - ubuf[(u)->field_data[(fn)].len] = '\0'; \ - } else { \ - ubuf[0] = '\0'; \ - } \ - \ - check_str_eq(expected, #prop, expected->prop, ubuf); \ -} while(0) - -int -message_eq (int index, const struct message *expected) -{ - int i; - struct message *m = &messages[index]; - - MESSAGE_CHECK_NUM_EQ(expected, m, http_major); - MESSAGE_CHECK_NUM_EQ(expected, m, http_minor); - - if (expected->type == HTTP_REQUEST) { - MESSAGE_CHECK_NUM_EQ(expected, m, method); - } else { - MESSAGE_CHECK_NUM_EQ(expected, m, status_code); - } - - MESSAGE_CHECK_NUM_EQ(expected, m, should_keep_alive); - MESSAGE_CHECK_NUM_EQ(expected, m, message_complete_on_eof); - - assert(m->message_begin_cb_called); - assert(m->headers_complete_cb_called); - assert(m->message_complete_cb_called); - - - MESSAGE_CHECK_STR_EQ(expected, m, request_url); - - /* Check URL components; we can't do this w/ CONNECT since it doesn't - * send us a well-formed URL. - */ - if (*m->request_url && m->method != HTTP_CONNECT) { - struct http_parser_url u; - - if (http_parser_parse_url(m->request_url, strlen(m->request_url), 0, &u)) { - fprintf(stderr, "\n\n*** failed to parse URL %s ***\n\n", - m->request_url); - abort(); - } - - if (expected->host) { - MESSAGE_CHECK_URL_EQ(&u, expected, m, host, UF_HOST); - } - - if (expected->userinfo) { - MESSAGE_CHECK_URL_EQ(&u, expected, m, userinfo, UF_USERINFO); - } - - m->port = (u.field_set & (1 << UF_PORT)) ? - u.port : 0; - - MESSAGE_CHECK_URL_EQ(&u, expected, m, query_string, UF_QUERY); - MESSAGE_CHECK_URL_EQ(&u, expected, m, fragment, UF_FRAGMENT); - MESSAGE_CHECK_URL_EQ(&u, expected, m, request_path, UF_PATH); - MESSAGE_CHECK_NUM_EQ(expected, m, port); - } - - if (expected->body_size) { - MESSAGE_CHECK_NUM_EQ(expected, m, body_size); - } else { - MESSAGE_CHECK_STR_EQ(expected, m, body); - } - - MESSAGE_CHECK_NUM_EQ(expected, m, num_headers); - - int r; - for (i = 0; i < m->num_headers; i++) { - r = check_str_eq(expected, "header field", expected->headers[i][0], m->headers[i][0]); - if (!r) return 0; - r = check_str_eq(expected, "header value", expected->headers[i][1], m->headers[i][1]); - if (!r) return 0; - } - - MESSAGE_CHECK_STR_EQ(expected, m, upgrade); - - return 1; -} - -/* Given a sequence of varargs messages, return the number of them that the - * parser should successfully parse, taking into account that upgraded - * messages prevent all subsequent messages from being parsed. - */ -size_t -count_parsed_messages(const size_t nmsgs, ...) { - size_t i; - va_list ap; - - va_start(ap, nmsgs); - - for (i = 0; i < nmsgs; i++) { - struct message *m = va_arg(ap, struct message *); - - if (m->upgrade) { - va_end(ap); - return i + 1; - } - } - - va_end(ap); - return nmsgs; -} - -/* Given a sequence of bytes and the number of these that we were able to - * parse, verify that upgrade bodies are correct. - */ -void -upgrade_message_fix(char *body, const size_t nread, const size_t nmsgs, ...) { - va_list ap; - size_t i; - size_t off = 0; - - va_start(ap, nmsgs); - - for (i = 0; i < nmsgs; i++) { - struct message *m = va_arg(ap, struct message *); - - off += strlen(m->raw); - - if (m->upgrade) { - off -= strlen(m->upgrade); - - /* Check the portion of the response after its specified upgrade */ - if (!check_str_eq(m, "upgrade", body + off, body + nread)) { - abort(); - } - - /* Fix up the response so that message_eq() will verify the beginning - * of the upgrade */ - *(body + nread + strlen(m->upgrade)) = '\0'; - messages[num_messages -1 ].upgrade = body + nread; - - va_end(ap); - return; - } - } - - va_end(ap); - printf("\n\n*** Error: expected a message with upgrade ***\n"); - - abort(); -} - -static void -print_error (const char *raw, size_t error_location) -{ - fprintf(stderr, "\n*** %s ***\n\n", - http_errno_description(HTTP_PARSER_ERRNO(parser))); - - int this_line = 0, char_len = 0; - size_t i, j, len = strlen(raw), error_location_line = 0; - for (i = 0; i < len; i++) { - if (i == error_location) this_line = 1; - switch (raw[i]) { - case '\r': - char_len = 2; - fprintf(stderr, "\\r"); - break; - - case '\n': - char_len = 2; - fprintf(stderr, "\\n\n"); - - if (this_line) goto print; - - error_location_line = 0; - continue; - - default: - char_len = 1; - fputc(raw[i], stderr); - break; - } - if (!this_line) error_location_line += char_len; - } - - fprintf(stderr, "[eof]\n"); - - print: - for (j = 0; j < error_location_line; j++) { - fputc(' ', stderr); - } - fprintf(stderr, "^\n\nerror location: %u\n", (unsigned int)error_location); -} - -void -test_preserve_data (void) -{ - char my_data[] = "application-specific data"; - http_parser parser; - parser.data = my_data; - http_parser_init(&parser, HTTP_REQUEST); - if (parser.data != my_data) { - printf("\n*** parser.data not preserved accross http_parser_init ***\n\n"); - abort(); - } -} - -struct url_test { - const char *name; - const char *url; - int is_connect; - struct http_parser_url u; - int rv; -}; - -const struct url_test url_tests[] = -{ {.name="proxy request" - ,.url="http://hostname/" - ,.is_connect=0 - ,.u= - {.field_set=(1 << UF_SCHEMA) | (1 << UF_HOST) | (1 << UF_PATH) - ,.port=0 - ,.field_data= - {{ 0, 4 } /* UF_SCHEMA */ - ,{ 7, 8 } /* UF_HOST */ - ,{ 0, 0 } /* UF_PORT */ - ,{ 15, 1 } /* UF_PATH */ - ,{ 0, 0 } /* UF_QUERY */ - ,{ 0, 0 } /* UF_FRAGMENT */ - ,{ 0, 0 } /* UF_USERINFO */ - } - } - ,.rv=0 - } - -, {.name="proxy request with port" - ,.url="http://hostname:444/" - ,.is_connect=0 - ,.u= - {.field_set=(1 << UF_SCHEMA) | (1 << UF_HOST) | (1 << UF_PORT) | (1 << UF_PATH) - ,.port=444 - ,.field_data= - {{ 0, 4 } /* UF_SCHEMA */ - ,{ 7, 8 } /* UF_HOST */ - ,{ 16, 3 } /* UF_PORT */ - ,{ 19, 1 } /* UF_PATH */ - ,{ 0, 0 } /* UF_QUERY */ - ,{ 0, 0 } /* UF_FRAGMENT */ - ,{ 0, 0 } /* UF_USERINFO */ - } - } - ,.rv=0 - } - -, {.name="CONNECT request" - ,.url="hostname:443" - ,.is_connect=1 - ,.u= - {.field_set=(1 << UF_HOST) | (1 << UF_PORT) - ,.port=443 - ,.field_data= - {{ 0, 0 } /* UF_SCHEMA */ - ,{ 0, 8 } /* UF_HOST */ - ,{ 9, 3 } /* UF_PORT */ - ,{ 0, 0 } /* UF_PATH */ - ,{ 0, 0 } /* UF_QUERY */ - ,{ 0, 0 } /* UF_FRAGMENT */ - ,{ 0, 0 } /* UF_USERINFO */ - } - } - ,.rv=0 - } - -, {.name="CONNECT request but not connect" - ,.url="hostname:443" - ,.is_connect=0 - ,.rv=1 - } - -, {.name="proxy ipv6 request" - ,.url="http://[1:2::3:4]/" - ,.is_connect=0 - ,.u= - {.field_set=(1 << UF_SCHEMA) | (1 << UF_HOST) | (1 << UF_PATH) - ,.port=0 - ,.field_data= - {{ 0, 4 } /* UF_SCHEMA */ - ,{ 8, 8 } /* UF_HOST */ - ,{ 0, 0 } /* UF_PORT */ - ,{ 17, 1 } /* UF_PATH */ - ,{ 0, 0 } /* UF_QUERY */ - ,{ 0, 0 } /* UF_FRAGMENT */ - ,{ 0, 0 } /* UF_USERINFO */ - } - } - ,.rv=0 - } - -, {.name="proxy ipv6 request with port" - ,.url="http://[1:2::3:4]:67/" - ,.is_connect=0 - ,.u= - {.field_set=(1 << UF_SCHEMA) | (1 << UF_HOST) | (1 << UF_PORT) | (1 << UF_PATH) - ,.port=67 - ,.field_data= - {{ 0, 4 } /* UF_SCHEMA */ - ,{ 8, 8 } /* UF_HOST */ - ,{ 18, 2 } /* UF_PORT */ - ,{ 20, 1 } /* UF_PATH */ - ,{ 0, 0 } /* UF_QUERY */ - ,{ 0, 0 } /* UF_FRAGMENT */ - ,{ 0, 0 } /* UF_USERINFO */ - } - } - ,.rv=0 - } - -, {.name="CONNECT ipv6 address" - ,.url="[1:2::3:4]:443" - ,.is_connect=1 - ,.u= - {.field_set=(1 << UF_HOST) | (1 << UF_PORT) - ,.port=443 - ,.field_data= - {{ 0, 0 } /* UF_SCHEMA */ - ,{ 1, 8 } /* UF_HOST */ - ,{ 11, 3 } /* UF_PORT */ - ,{ 0, 0 } /* UF_PATH */ - ,{ 0, 0 } /* UF_QUERY */ - ,{ 0, 0 } /* UF_FRAGMENT */ - ,{ 0, 0 } /* UF_USERINFO */ - } - } - ,.rv=0 - } - -, {.name="ipv4 in ipv6 address" - ,.url="http://[2001:0000:0000:0000:0000:0000:1.9.1.1]/" - ,.is_connect=0 - ,.u= - {.field_set=(1 << UF_SCHEMA) | (1 << UF_HOST) | (1 << UF_PATH) - ,.port=0 - ,.field_data= - {{ 0, 4 } /* UF_SCHEMA */ - ,{ 8, 37 } /* UF_HOST */ - ,{ 0, 0 } /* UF_PORT */ - ,{ 46, 1 } /* UF_PATH */ - ,{ 0, 0 } /* UF_QUERY */ - ,{ 0, 0 } /* UF_FRAGMENT */ - ,{ 0, 0 } /* UF_USERINFO */ - } - } - ,.rv=0 - } - -, {.name="extra ? in query string" - ,.url="http://a.tbcdn.cn/p/fp/2010c/??fp-header-min.css,fp-base-min.css," - "fp-channel-min.css,fp-product-min.css,fp-mall-min.css,fp-category-min.css," - "fp-sub-min.css,fp-gdp4p-min.css,fp-css3-min.css,fp-misc-min.css?t=20101022.css" - ,.is_connect=0 - ,.u= - {.field_set=(1<field_set, u->port); - for (i = 0; i < UF_MAX; i++) { - if ((u->field_set & (1 << i)) == 0) { - printf("\tfield_data[%u]: unset\n", i); - continue; - } - - printf("\tfield_data[%u]: off: %u len: %u part: \"%.*s\n\"", - i, - u->field_data[i].off, - u->field_data[i].len, - u->field_data[i].len, - url + u->field_data[i].off); - } -} - -void -test_parse_url (void) -{ - struct http_parser_url u; - const struct url_test *test; - unsigned int i; - int rv; - - for (i = 0; i < (sizeof(url_tests) / sizeof(url_tests[0])); i++) { - test = &url_tests[i]; - memset(&u, 0, sizeof(u)); - - rv = http_parser_parse_url(test->url, - strlen(test->url), - test->is_connect, - &u); - - if (test->rv == 0) { - if (rv != 0) { - printf("\n*** http_parser_parse_url(\"%s\") \"%s\" test failed, " - "unexpected rv %d ***\n\n", test->url, test->name, rv); - abort(); - } - - if (memcmp(&u, &test->u, sizeof(u)) != 0) { - printf("\n*** http_parser_parse_url(\"%s\") \"%s\" failed ***\n", - test->url, test->name); - - printf("target http_parser_url:\n"); - dump_url(test->url, &test->u); - printf("result http_parser_url:\n"); - dump_url(test->url, &u); - - abort(); - } - } else { - /* test->rv != 0 */ - if (rv == 0) { - printf("\n*** http_parser_parse_url(\"%s\") \"%s\" test failed, " - "unexpected rv %d ***\n\n", test->url, test->name, rv); - abort(); - } - } - } -} - -void -test_method_str (void) -{ - assert(0 == strcmp("GET", http_method_str(HTTP_GET))); - assert(0 == strcmp("", http_method_str(1337))); -} - -void -test_message (const struct message *message) -{ - size_t raw_len = strlen(message->raw); - size_t msg1len; - for (msg1len = 0; msg1len < raw_len; msg1len++) { - parser_init(message->type); - - size_t read; - const char *msg1 = message->raw; - const char *msg2 = msg1 + msg1len; - size_t msg2len = raw_len - msg1len; - - if (msg1len) { - read = parse(msg1, msg1len); - - if (message->upgrade && parser->upgrade) { - messages[num_messages - 1].upgrade = msg1 + read; - goto test; - } - - if (read != msg1len) { - print_error(msg1, read); - abort(); - } - } - - - read = parse(msg2, msg2len); - - if (message->upgrade && parser->upgrade) { - messages[num_messages - 1].upgrade = msg2 + read; - goto test; - } - - if (read != msg2len) { - print_error(msg2, read); - abort(); - } - - read = parse(NULL, 0); - - if (read != 0) { - print_error(message->raw, read); - abort(); - } - - test: - - if (num_messages != 1) { - printf("\n*** num_messages != 1 after testing '%s' ***\n\n", message->name); - abort(); - } - - if(!message_eq(0, message)) abort(); - - parser_free(); - } -} - -void -test_message_count_body (const struct message *message) -{ - parser_init(message->type); - - size_t read; - size_t l = strlen(message->raw); - size_t i, toread; - size_t chunk = 4024; - - for (i = 0; i < l; i+= chunk) { - toread = MIN(l-i, chunk); - read = parse_count_body(message->raw + i, toread); - if (read != toread) { - print_error(message->raw, read); - abort(); - } - } - - - read = parse_count_body(NULL, 0); - if (read != 0) { - print_error(message->raw, read); - abort(); - } - - if (num_messages != 1) { - printf("\n*** num_messages != 1 after testing '%s' ***\n\n", message->name); - abort(); - } - - if(!message_eq(0, message)) abort(); - - parser_free(); -} - -void -test_simple (const char *buf, enum http_errno err_expected) -{ - parser_init(HTTP_REQUEST); - - size_t parsed; - int pass; - enum http_errno err; - - parsed = parse(buf, strlen(buf)); - pass = (parsed == strlen(buf)); - err = HTTP_PARSER_ERRNO(parser); - parsed = parse(NULL, 0); - pass &= (parsed == 0); - - parser_free(); - - /* In strict mode, allow us to pass with an unexpected HPE_STRICT as - * long as the caller isn't expecting success. - */ -#if HTTP_PARSER_STRICT - if (err_expected != err && err_expected != HPE_OK && err != HPE_STRICT) { -#else - if (err_expected != err) { -#endif - fprintf(stderr, "\n*** test_simple expected %s, but saw %s ***\n\n%s\n", - http_errno_name(err_expected), http_errno_name(err), buf); - abort(); - } -} - -void -test_header_overflow_error (int req) -{ - http_parser parser; - http_parser_init(&parser, req ? HTTP_REQUEST : HTTP_RESPONSE); - size_t parsed; - const char *buf; - buf = req ? "GET / HTTP/1.1\r\n" : "HTTP/1.0 200 OK\r\n"; - parsed = http_parser_execute(&parser, &settings_null, buf, strlen(buf)); - assert(parsed == strlen(buf)); - - buf = "header-key: header-value\r\n"; - size_t buflen = strlen(buf); - - int i; - for (i = 0; i < 10000; i++) { - parsed = http_parser_execute(&parser, &settings_null, buf, buflen); - if (parsed != buflen) { - //fprintf(stderr, "error found on iter %d\n", i); - assert(HTTP_PARSER_ERRNO(&parser) == HPE_HEADER_OVERFLOW); - return; - } - } - - fprintf(stderr, "\n*** Error expected but none in header overflow test ***\n"); - abort(); -} - -static void -test_content_length_overflow (const char *buf, size_t buflen, int expect_ok) -{ - http_parser parser; - http_parser_init(&parser, HTTP_RESPONSE); - http_parser_execute(&parser, &settings_null, buf, buflen); - - if (expect_ok) - assert(HTTP_PARSER_ERRNO(&parser) == HPE_OK); - else - assert(HTTP_PARSER_ERRNO(&parser) == HPE_INVALID_CONTENT_LENGTH); -} - -void -test_header_content_length_overflow_error (void) -{ -#define X(size) \ - "HTTP/1.1 200 OK\r\n" \ - "Content-Length: " #size "\r\n" \ - "\r\n" - const char a[] = X(18446744073709551614); /* 2^64-2 */ - const char b[] = X(18446744073709551615); /* 2^64-1 */ - const char c[] = X(18446744073709551616); /* 2^64 */ -#undef X - test_content_length_overflow(a, sizeof(a) - 1, 1); /* expect ok */ - test_content_length_overflow(b, sizeof(b) - 1, 0); /* expect failure */ - test_content_length_overflow(c, sizeof(c) - 1, 0); /* expect failure */ -} - -void -test_chunk_content_length_overflow_error (void) -{ -#define X(size) \ - "HTTP/1.1 200 OK\r\n" \ - "Transfer-Encoding: chunked\r\n" \ - "\r\n" \ - #size "\r\n" \ - "..." - const char a[] = X(FFFFFFFFFFFFFFFE); /* 2^64-2 */ - const char b[] = X(FFFFFFFFFFFFFFFF); /* 2^64-1 */ - const char c[] = X(10000000000000000); /* 2^64 */ -#undef X - test_content_length_overflow(a, sizeof(a) - 1, 1); /* expect ok */ - test_content_length_overflow(b, sizeof(b) - 1, 0); /* expect failure */ - test_content_length_overflow(c, sizeof(c) - 1, 0); /* expect failure */ -} - -void -test_no_overflow_long_body (int req, size_t length) -{ - http_parser parser; - http_parser_init(&parser, req ? HTTP_REQUEST : HTTP_RESPONSE); - size_t parsed; - size_t i; - char buf1[3000]; - size_t buf1len = sprintf(buf1, "%s\r\nConnection: Keep-Alive\r\nContent-Length: %lu\r\n\r\n", - req ? "POST / HTTP/1.0" : "HTTP/1.0 200 OK", (unsigned long)length); - parsed = http_parser_execute(&parser, &settings_null, buf1, buf1len); - if (parsed != buf1len) - goto err; - - for (i = 0; i < length; i++) { - char foo = 'a'; - parsed = http_parser_execute(&parser, &settings_null, &foo, 1); - if (parsed != 1) - goto err; - } - - parsed = http_parser_execute(&parser, &settings_null, buf1, buf1len); - if (parsed != buf1len) goto err; - return; - - err: - fprintf(stderr, - "\n*** error in test_no_overflow_long_body %s of length %lu ***\n", - req ? "REQUEST" : "RESPONSE", - (unsigned long)length); - abort(); -} - -void -test_multiple3 (const struct message *r1, const struct message *r2, const struct message *r3) -{ - int message_count = count_parsed_messages(3, r1, r2, r3); - - char total[ strlen(r1->raw) - + strlen(r2->raw) - + strlen(r3->raw) - + 1 - ]; - total[0] = '\0'; - - strcat(total, r1->raw); - strcat(total, r2->raw); - strcat(total, r3->raw); - - parser_init(r1->type); - - size_t read; - - read = parse(total, strlen(total)); - - if (parser->upgrade) { - upgrade_message_fix(total, read, 3, r1, r2, r3); - goto test; - } - - if (read != strlen(total)) { - print_error(total, read); - abort(); - } - - read = parse(NULL, 0); - - if (read != 0) { - print_error(total, read); - abort(); - } - -test: - - if (message_count != num_messages) { - fprintf(stderr, "\n\n*** Parser didn't see 3 messages only %d *** \n", num_messages); - abort(); - } - - if (!message_eq(0, r1)) abort(); - if (message_count > 1 && !message_eq(1, r2)) abort(); - if (message_count > 2 && !message_eq(2, r3)) abort(); - - parser_free(); -} - -/* SCAN through every possible breaking to make sure the - * parser can handle getting the content in any chunks that - * might come from the socket - */ -void -test_scan (const struct message *r1, const struct message *r2, const struct message *r3) -{ - char total[80*1024] = "\0"; - char buf1[80*1024] = "\0"; - char buf2[80*1024] = "\0"; - char buf3[80*1024] = "\0"; - - strcat(total, r1->raw); - strcat(total, r2->raw); - strcat(total, r3->raw); - - size_t read; - - int total_len = strlen(total); - - int total_ops = 2 * (total_len - 1) * (total_len - 2) / 2; - int ops = 0 ; - - size_t buf1_len, buf2_len, buf3_len; - int message_count = count_parsed_messages(3, r1, r2, r3); - - int i,j,type_both; - for (type_both = 0; type_both < 2; type_both ++ ) { - for (j = 2; j < total_len; j ++ ) { - for (i = 1; i < j; i ++ ) { - - if (ops % 1000 == 0) { - printf("\b\b\b\b%3.0f%%", 100 * (float)ops /(float)total_ops); - fflush(stdout); - } - ops += 1; - - parser_init(type_both ? HTTP_BOTH : r1->type); - - buf1_len = i; - strlncpy(buf1, sizeof(buf1), total, buf1_len); - buf1[buf1_len] = 0; - - buf2_len = j - i; - strlncpy(buf2, sizeof(buf1), total+i, buf2_len); - buf2[buf2_len] = 0; - - buf3_len = total_len - j; - strlncpy(buf3, sizeof(buf1), total+j, buf3_len); - buf3[buf3_len] = 0; - - read = parse(buf1, buf1_len); - - if (parser->upgrade) goto test; - - if (read != buf1_len) { - print_error(buf1, read); - goto error; - } - - read += parse(buf2, buf2_len); - - if (parser->upgrade) goto test; - - if (read != buf1_len + buf2_len) { - print_error(buf2, read); - goto error; - } - - read += parse(buf3, buf3_len); - - if (parser->upgrade) goto test; - - if (read != buf1_len + buf2_len + buf3_len) { - print_error(buf3, read); - goto error; - } - - parse(NULL, 0); - -test: - if (parser->upgrade) { - upgrade_message_fix(total, read, 3, r1, r2, r3); - } - - if (message_count != num_messages) { - fprintf(stderr, "\n\nParser didn't see %d messages only %d\n", - message_count, num_messages); - goto error; - } - - if (!message_eq(0, r1)) { - fprintf(stderr, "\n\nError matching messages[0] in test_scan.\n"); - goto error; - } - - if (message_count > 1 && !message_eq(1, r2)) { - fprintf(stderr, "\n\nError matching messages[1] in test_scan.\n"); - goto error; - } - - if (message_count > 2 && !message_eq(2, r3)) { - fprintf(stderr, "\n\nError matching messages[2] in test_scan.\n"); - goto error; - } - - parser_free(); - } - } - } - puts("\b\b\b\b100%"); - return; - - error: - fprintf(stderr, "i=%d j=%d\n", i, j); - fprintf(stderr, "buf1 (%u) %s\n\n", (unsigned int)buf1_len, buf1); - fprintf(stderr, "buf2 (%u) %s\n\n", (unsigned int)buf2_len , buf2); - fprintf(stderr, "buf3 (%u) %s\n", (unsigned int)buf3_len, buf3); - abort(); -} - -// user required to free the result -// string terminated by \0 -char * -create_large_chunked_message (int body_size_in_kb, const char* headers) -{ - int i; - size_t wrote = 0; - size_t headers_len = strlen(headers); - size_t bufsize = headers_len + (5+1024+2)*body_size_in_kb + 6; - char * buf = malloc(bufsize); - - memcpy(buf, headers, headers_len); - wrote += headers_len; - - for (i = 0; i < body_size_in_kb; i++) { - // write 1kb chunk into the body. - memcpy(buf + wrote, "400\r\n", 5); - wrote += 5; - memset(buf + wrote, 'C', 1024); - wrote += 1024; - strcpy(buf + wrote, "\r\n"); - wrote += 2; - } - - memcpy(buf + wrote, "0\r\n\r\n", 6); - wrote += 6; - assert(wrote == bufsize); - - return buf; -} - -void -test_status_complete (void) -{ - parser_init(HTTP_RESPONSE); - parser->data = 0; - http_parser_settings settings = settings_null; - settings.on_status_complete = status_complete_cb; - - char *response = "don't mind me, just a simple response"; - http_parser_execute(parser, &settings, response, strlen(response)); - assert(parser->data == (void*)0); // the status_complete callback was never called - assert(parser->http_errno == HPE_INVALID_CONSTANT); // the errno for an invalid status line -} - -/* Verify that we can pause parsing at any of the bytes in the - * message and still get the result that we're expecting. */ -void -test_message_pause (const struct message *msg) -{ - char *buf = (char*) msg->raw; - size_t buflen = strlen(msg->raw); - size_t nread; - - parser_init(msg->type); - - do { - nread = parse_pause(buf, buflen); - - // We can only set the upgrade buffer once we've gotten our message - // completion callback. - if (messages[0].message_complete_cb_called && - msg->upgrade && - parser->upgrade) { - messages[0].upgrade = buf + nread; - goto test; - } - - if (nread < buflen) { - - // Not much do to if we failed a strict-mode check - if (HTTP_PARSER_ERRNO(parser) == HPE_STRICT) { - parser_free(); - return; - } - - assert (HTTP_PARSER_ERRNO(parser) == HPE_PAUSED); - } - - buf += nread; - buflen -= nread; - http_parser_pause(parser, 0); - } while (buflen > 0); - - nread = parse_pause(NULL, 0); - assert (nread == 0); - -test: - if (num_messages != 1) { - printf("\n*** num_messages != 1 after testing '%s' ***\n\n", msg->name); - abort(); - } - - if(!message_eq(0, msg)) abort(); - - parser_free(); -} - -int -main (void) -{ - parser = NULL; - int i, j, k; - int request_count; - int response_count; - - printf("sizeof(http_parser) = %u\n", (unsigned int)sizeof(http_parser)); - - for (request_count = 0; requests[request_count].name; request_count++); - for (response_count = 0; responses[response_count].name; response_count++); - - //// API - test_preserve_data(); - test_parse_url(); - test_method_str(); - - //// OVERFLOW CONDITIONS - - test_header_overflow_error(HTTP_REQUEST); - test_no_overflow_long_body(HTTP_REQUEST, 1000); - test_no_overflow_long_body(HTTP_REQUEST, 100000); - - test_header_overflow_error(HTTP_RESPONSE); - test_no_overflow_long_body(HTTP_RESPONSE, 1000); - test_no_overflow_long_body(HTTP_RESPONSE, 100000); - - test_header_content_length_overflow_error(); - test_chunk_content_length_overflow_error(); - - //// RESPONSES - - for (i = 0; i < response_count; i++) { - test_message(&responses[i]); - } - - for (i = 0; i < response_count; i++) { - test_message_pause(&responses[i]); - } - - for (i = 0; i < response_count; i++) { - if (!responses[i].should_keep_alive) continue; - for (j = 0; j < response_count; j++) { - if (!responses[j].should_keep_alive) continue; - for (k = 0; k < response_count; k++) { - test_multiple3(&responses[i], &responses[j], &responses[k]); - } - } - } - - test_message_count_body(&responses[NO_HEADERS_NO_BODY_404]); - test_message_count_body(&responses[TRAILING_SPACE_ON_CHUNKED_BODY]); - - // test very large chunked response - { - char * msg = create_large_chunked_message(31337, - "HTTP/1.0 200 OK\r\n" - "Transfer-Encoding: chunked\r\n" - "Content-Type: text/plain\r\n" - "\r\n"); - struct message large_chunked = - {.name= "large chunked" - ,.type= HTTP_RESPONSE - ,.raw= msg - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 0 - ,.status_code= 200 - ,.num_headers= 2 - ,.headers= - { { "Transfer-Encoding", "chunked" } - , { "Content-Type", "text/plain" } - } - ,.body_size= 31337*1024 - }; - test_message_count_body(&large_chunked); - free(msg); - } - - - - printf("response scan 1/2 "); - test_scan( &responses[TRAILING_SPACE_ON_CHUNKED_BODY] - , &responses[NO_BODY_HTTP10_KA_204] - , &responses[NO_REASON_PHRASE] - ); - - printf("response scan 2/2 "); - test_scan( &responses[BONJOUR_MADAME_FR] - , &responses[UNDERSTORE_HEADER_KEY] - , &responses[NO_CARRIAGE_RET] - ); - - puts("responses okay"); - - - /// REQUESTS - - test_simple("hello world", HPE_INVALID_METHOD); - test_simple("GET / HTP/1.1\r\n\r\n", HPE_INVALID_VERSION); - - - test_simple("ASDF / HTTP/1.1\r\n\r\n", HPE_INVALID_METHOD); - test_simple("PROPPATCHA / HTTP/1.1\r\n\r\n", HPE_INVALID_METHOD); - test_simple("GETA / HTTP/1.1\r\n\r\n", HPE_INVALID_METHOD); - - // Well-formed but incomplete - test_simple("GET / HTTP/1.1\r\n" - "Content-Type: text/plain\r\n" - "Content-Length: 6\r\n" - "\r\n" - "fooba", - HPE_OK); - - static const char *all_methods[] = { - "DELETE", - "GET", - "HEAD", - "POST", - "PUT", - //"CONNECT", //CONNECT can't be tested like other methods, it's a tunnel - "OPTIONS", - "TRACE", - "COPY", - "LOCK", - "MKCOL", - "MOVE", - "PROPFIND", - "PROPPATCH", - "UNLOCK", - "REPORT", - "MKACTIVITY", - "CHECKOUT", - "MERGE", - "M-SEARCH", - "NOTIFY", - "SUBSCRIBE", - "UNSUBSCRIBE", - "PATCH", - 0 }; - const char **this_method; - for (this_method = all_methods; *this_method; this_method++) { - char buf[200]; - sprintf(buf, "%s / HTTP/1.1\r\n\r\n", *this_method); - test_simple(buf, HPE_OK); - } - - static const char *bad_methods[] = { - "C******", - "M****", - 0 }; - for (this_method = bad_methods; *this_method; this_method++) { - char buf[200]; - sprintf(buf, "%s / HTTP/1.1\r\n\r\n", *this_method); - test_simple(buf, HPE_UNKNOWN); - } - - const char *dumbfuck2 = - "GET / HTTP/1.1\r\n" - "X-SSL-Bullshit: -----BEGIN CERTIFICATE-----\r\n" - "\tMIIFbTCCBFWgAwIBAgICH4cwDQYJKoZIhvcNAQEFBQAwcDELMAkGA1UEBhMCVUsx\r\n" - "\tETAPBgNVBAoTCGVTY2llbmNlMRIwEAYDVQQLEwlBdXRob3JpdHkxCzAJBgNVBAMT\r\n" - "\tAkNBMS0wKwYJKoZIhvcNAQkBFh5jYS1vcGVyYXRvckBncmlkLXN1cHBvcnQuYWMu\r\n" - "\tdWswHhcNMDYwNzI3MTQxMzI4WhcNMDcwNzI3MTQxMzI4WjBbMQswCQYDVQQGEwJV\r\n" - "\tSzERMA8GA1UEChMIZVNjaWVuY2UxEzARBgNVBAsTCk1hbmNoZXN0ZXIxCzAJBgNV\r\n" - "\tBAcTmrsogriqMWLAk1DMRcwFQYDVQQDEw5taWNoYWVsIHBhcmQYJKoZIhvcNAQEB\r\n" - "\tBQADggEPADCCAQoCggEBANPEQBgl1IaKdSS1TbhF3hEXSl72G9J+WC/1R64fAcEF\r\n" - "\tW51rEyFYiIeZGx/BVzwXbeBoNUK41OK65sxGuflMo5gLflbwJtHBRIEKAfVVp3YR\r\n" - "\tgW7cMA/s/XKgL1GEC7rQw8lIZT8RApukCGqOVHSi/F1SiFlPDxuDfmdiNzL31+sL\r\n" - "\t0iwHDdNkGjy5pyBSB8Y79dsSJtCW/iaLB0/n8Sj7HgvvZJ7x0fr+RQjYOUUfrePP\r\n" - "\tu2MSpFyf+9BbC/aXgaZuiCvSR+8Snv3xApQY+fULK/xY8h8Ua51iXoQ5jrgu2SqR\r\n" - "\twgA7BUi3G8LFzMBl8FRCDYGUDy7M6QaHXx1ZWIPWNKsCAwEAAaOCAiQwggIgMAwG\r\n" - "\tA1UdEwEB/wQCMAAwEQYJYIZIAYb4QgHTTPAQDAgWgMA4GA1UdDwEB/wQEAwID6DAs\r\n" - "\tBglghkgBhvhCAQ0EHxYdVUsgZS1TY2llbmNlIFVzZXIgQ2VydGlmaWNhdGUwHQYD\r\n" - "\tVR0OBBYEFDTt/sf9PeMaZDHkUIldrDYMNTBZMIGaBgNVHSMEgZIwgY+AFAI4qxGj\r\n" - "\tloCLDdMVKwiljjDastqooXSkcjBwMQswCQYDVQQGEwJVSzERMA8GA1UEChMIZVNj\r\n" - "\taWVuY2UxEjAQBgNVBAsTCUF1dGhvcml0eTELMAkGA1UEAxMCQ0ExLTArBgkqhkiG\r\n" - "\t9w0BCQEWHmNhLW9wZXJhdG9yQGdyaWQtc3VwcG9ydC5hYy51a4IBADApBgNVHRIE\r\n" - "\tIjAggR5jYS1vcGVyYXRvckBncmlkLXN1cHBvcnQuYWMudWswGQYDVR0gBBIwEDAO\r\n" - "\tBgwrBgEEAdkvAQEBAQYwPQYJYIZIAYb4QgEEBDAWLmh0dHA6Ly9jYS5ncmlkLXN1\r\n" - "\tcHBvcnQuYWMudmT4sopwqlBWsvcHViL2NybC9jYWNybC5jcmwwPQYJYIZIAYb4QgEDBDAWLmh0\r\n" - "\tdHA6Ly9jYS5ncmlkLXN1cHBvcnQuYWMudWsvcHViL2NybC9jYWNybC5jcmwwPwYD\r\n" - "\tVR0fBDgwNjA0oDKgMIYuaHR0cDovL2NhLmdyaWQt5hYy51ay9wdWIv\r\n" - "\tY3JsL2NhY3JsLmNybDANBgkqhkiG9w0BAQUFAAOCAQEAS/U4iiooBENGW/Hwmmd3\r\n" - "\tXCy6Zrt08YjKCzGNjorT98g8uGsqYjSxv/hmi0qlnlHs+k/3Iobc3LjS5AMYr5L8\r\n" - "\tUO7OSkgFFlLHQyC9JzPfmLCAugvzEbyv4Olnsr8hbxF1MbKZoQxUZtMVu29wjfXk\r\n" - "\thTeApBv7eaKCWpSp7MCbvgzm74izKhu3vlDk9w6qVrxePfGgpKPqfHiOoGhFnbTK\r\n" - "\twTC6o2xq5y0qZ03JonF7OJspEd3I5zKY3E+ov7/ZhW6DqT8UFvsAdjvQbXyhV8Eu\r\n" - "\tYhixw1aKEPzNjNowuIseVogKOLXxWI5vAi5HgXdS0/ES5gDGsABo4fqovUKlgop3\r\n" - "\tRA==\r\n" - "\t-----END CERTIFICATE-----\r\n" - "\r\n"; - test_simple(dumbfuck2, HPE_OK); - -#if 0 - // NOTE(Wed Nov 18 11:57:27 CET 2009) this seems okay. we just read body - // until EOF. - // - // no content-length - // error if there is a body without content length - const char *bad_get_no_headers_no_body = "GET /bad_get_no_headers_no_body/world HTTP/1.1\r\n" - "Accept: */*\r\n" - "\r\n" - "HELLO"; - test_simple(bad_get_no_headers_no_body, 0); -#endif - /* TODO sending junk and large headers gets rejected */ - - - /* check to make sure our predefined requests are okay */ - for (i = 0; requests[i].name; i++) { - test_message(&requests[i]); - } - - for (i = 0; i < request_count; i++) { - test_message_pause(&requests[i]); - } - - for (i = 0; i < request_count; i++) { - if (!requests[i].should_keep_alive) continue; - for (j = 0; j < request_count; j++) { - if (!requests[j].should_keep_alive) continue; - for (k = 0; k < request_count; k++) { - test_multiple3(&requests[i], &requests[j], &requests[k]); - } - } - } - - printf("request scan 1/4 "); - test_scan( &requests[GET_NO_HEADERS_NO_BODY] - , &requests[GET_ONE_HEADER_NO_BODY] - , &requests[GET_NO_HEADERS_NO_BODY] - ); - - printf("request scan 2/4 "); - test_scan( &requests[POST_CHUNKED_ALL_YOUR_BASE] - , &requests[POST_IDENTITY_BODY_WORLD] - , &requests[GET_FUNKY_CONTENT_LENGTH] - ); - - printf("request scan 3/4 "); - test_scan( &requests[TWO_CHUNKS_MULT_ZERO_END] - , &requests[CHUNKED_W_TRAILING_HEADERS] - , &requests[CHUNKED_W_BULLSHIT_AFTER_LENGTH] - ); - - printf("request scan 4/4 "); - test_scan( &requests[QUERY_URL_WITH_QUESTION_MARK_GET] - , &requests[PREFIX_NEWLINE_GET ] - , &requests[CONNECT_REQUEST] - ); - - test_status_complete(); - - puts("requests okay"); - - return 0; -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/tests.dumped b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/tests.dumped deleted file mode 100644 index 038bb52..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/tests.dumped +++ /dev/null @@ -1,845 +0,0 @@ -name :curl get -raw :"GET /test HTTP/1.1\r\nUser-Agent: curl/7.18.0 (i486-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.1\r\nHost: 0.0.0.0=5000\r\nAccept: */*\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_GET -status_code :0 -request_path:/test -request_url :/test -fragment : -query_string: -body :"" -body_size :0 -header_0 :{ "User-Agent": "curl/7.18.0 (i486-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.1"} -header_1 :{ "Host": "0.0.0.0=5000"} -header_2 :{ "Accept": "*/*"} -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :firefox get -raw :"GET /favicon.ico HTTP/1.1\r\nHost: 0.0.0.0=5000\r\nUser-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008061015 Firefox/3.0\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nAccept-Encoding: gzip,deflate\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nKeep-Alive: 300\r\nConnection: keep-alive\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_GET -status_code :0 -request_path:/favicon.ico -request_url :/favicon.ico -fragment : -query_string: -body :"" -body_size :0 -header_0 :{ "Host": "0.0.0.0=5000"} -header_1 :{ "User-Agent": "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008061015 Firefox/3.0"} -header_2 :{ "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"} -header_3 :{ "Accept-Language": "en-us,en;q=0.5"} -header_4 :{ "Accept-Encoding": "gzip,deflate"} -header_5 :{ "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7"} -header_6 :{ "Keep-Alive": "300"} -header_7 :{ "Connection": "keep-alive"} -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :dumbfuck -raw :"GET /dumbfuck HTTP/1.1\r\naaaaaaaaaaaaa:++++++++++\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_GET -status_code :0 -request_path:/dumbfuck -request_url :/dumbfuck -fragment : -query_string: -body :"" -body_size :0 -header_0 :{ "aaaaaaaaaaaaa": "++++++++++"} -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :fragment in url -raw :"GET /forums/1/topics/2375?page=1#posts-17408 HTTP/1.1\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_GET -status_code :0 -request_path:/forums/1/topics/2375 -request_url :/forums/1/topics/2375?page=1#posts-17408 -fragment :posts-17408 -query_string:page=1 -body :"" -body_size :0 -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :get no headers no body -raw :"GET /get_no_headers_no_body/world HTTP/1.1\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_GET -status_code :0 -request_path:/get_no_headers_no_body/world -request_url :/get_no_headers_no_body/world -fragment : -query_string: -body :"" -body_size :0 -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :get one header no body -raw :"GET /get_one_header_no_body HTTP/1.1\r\nAccept: */*\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_GET -status_code :0 -request_path:/get_one_header_no_body -request_url :/get_one_header_no_body -fragment : -query_string: -body :"" -body_size :0 -header_0 :{ "Accept": "*/*"} -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :get funky content length body hello -raw :"GET /get_funky_content_length_body_hello HTTP/1.0\r\nconTENT-Length: 5\r\n\r\nHELLO" -type :HTTP_REQUEST -method: HTTP_GET -status_code :0 -request_path:/get_funky_content_length_body_hello -request_url :/get_funky_content_length_body_hello -fragment : -query_string: -body :"HELLO" -body_size :0 -header_0 :{ "conTENT-Length": "5"} -should_keep_alive :0 -http_major :1 -http_minor :0 - -name :post identity body world -raw :"POST /post_identity_body_world?q=search#hey HTTP/1.1\r\nAccept: */*\r\nTransfer-Encoding: identity\r\nContent-Length: 5\r\n\r\nWorld" -type :HTTP_REQUEST -method: HTTP_POST -status_code :0 -request_path:/post_identity_body_world -request_url :/post_identity_body_world?q=search#hey -fragment :hey -query_string:q=search -body :"World" -body_size :0 -header_0 :{ "Accept": "*/*"} -header_1 :{ "Transfer-Encoding": "identity"} -header_2 :{ "Content-Length": "5"} -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :post - chunked body: all your base are belong to us -raw :"POST /post_chunked_all_your_base HTTP/1.1\r\nTransfer-Encoding: chunked\r\n\r\n1e\r\nall your base are belong to us\r\n0\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_POST -status_code :0 -request_path:/post_chunked_all_your_base -request_url :/post_chunked_all_your_base -fragment : -query_string: -body :"all your base are belong to us" -body_size :0 -header_0 :{ "Transfer-Encoding": "chunked"} -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :two chunks ; triple zero ending -raw :"POST /two_chunks_mult_zero_end HTTP/1.1\r\nTransfer-Encoding: chunked\r\n\r\n5\r\nhello\r\n6\r\n world\r\n000\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_POST -status_code :0 -request_path:/two_chunks_mult_zero_end -request_url :/two_chunks_mult_zero_end -fragment : -query_string: -body :"hello world" -body_size :0 -header_0 :{ "Transfer-Encoding": "chunked"} -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :chunked with trailing headers. blech. -raw :"POST /chunked_w_trailing_headers HTTP/1.1\r\nTransfer-Encoding: chunked\r\n\r\n5\r\nhello\r\n6\r\n world\r\n0\r\nVary: *\r\nContent-Type: text/plain\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_POST -status_code :0 -request_path:/chunked_w_trailing_headers -request_url :/chunked_w_trailing_headers -fragment : -query_string: -body :"hello world" -body_size :0 -header_0 :{ "Transfer-Encoding": "chunked"} -header_1 :{ "Vary": "*"} -header_2 :{ "Content-Type": "text/plain"} -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :with bullshit after the length -raw :"POST /chunked_w_bullshit_after_length HTTP/1.1\r\nTransfer-Encoding: chunked\r\n\r\n5; ihatew3;whatthefuck=aretheseparametersfor\r\nhello\r\n6; blahblah; blah\r\n world\r\n0\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_POST -status_code :0 -request_path:/chunked_w_bullshit_after_length -request_url :/chunked_w_bullshit_after_length -fragment : -query_string: -body :"hello world" -body_size :0 -header_0 :{ "Transfer-Encoding": "chunked"} -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :with quotes -raw :"GET /with_\"stupid\"_quotes?foo=\"bar\" HTTP/1.1\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_GET -status_code :0 -request_path:/with_"stupid"_quotes -request_url :/with_"stupid"_quotes?foo="bar" -fragment : -query_string:foo="bar" -body :"" -body_size :0 -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :apachebench get -raw :"GET /test HTTP/1.0\r\nHost: 0.0.0.0:5000\r\nUser-Agent: ApacheBench/2.3\r\nAccept: */*\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_GET -status_code :0 -request_path:/test -request_url :/test -fragment : -query_string: -body :"" -body_size :0 -header_0 :{ "Host": "0.0.0.0:5000"} -header_1 :{ "User-Agent": "ApacheBench/2.3"} -header_2 :{ "Accept": "*/*"} -should_keep_alive :0 -http_major :1 -http_minor :0 - -name :query url with question mark -raw :"GET /test.cgi?foo=bar?baz HTTP/1.1\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_GET -status_code :0 -request_path:/test.cgi -request_url :/test.cgi?foo=bar?baz -fragment : -query_string:foo=bar?baz -body :"" -body_size :0 -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :newline prefix get -raw :"\r\nGET /test HTTP/1.1\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_GET -status_code :0 -request_path:/test -request_url :/test -fragment : -query_string: -body :"" -body_size :0 -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :upgrade request -raw :"GET /demo HTTP/1.1\r\nHost: example.com\r\nConnection: Upgrade\r\nSec-WebSocket-Key2: 12998 5 Y3 1 .P00\r\nSec-WebSocket-Protocol: sample\r\nUpgrade: WebSocket\r\nSec-WebSocket-Key1: 4 @1 46546xW%0l 1 5\r\nOrigin: http://example.com\r\n\r\nHot diggity dogg" -type :HTTP_REQUEST -method: HTTP_GET -status_code :0 -request_path:/demo -request_url :/demo -fragment : -query_string: -body :"" -body_size :0 -header_0 :{ "Host": "example.com"} -header_1 :{ "Connection": "Upgrade"} -header_2 :{ "Sec-WebSocket-Key2": "12998 5 Y3 1 .P00"} -header_3 :{ "Sec-WebSocket-Protocol": "sample"} -header_4 :{ "Upgrade": "WebSocket"} -header_5 :{ "Sec-WebSocket-Key1": "4 @1 46546xW%0l 1 5"} -header_6 :{ "Origin": "http://example.com"} -should_keep_alive :1 -upgrade :"Hot diggity dogg" -http_major :1 -http_minor :1 - -name :connect request -raw :"CONNECT 0-home0.netscape.com:443 HTTP/1.0\r\nUser-agent: Mozilla/1.1N\r\nProxy-authorization: basic aGVsbG86d29ybGQ=\r\n\r\nsome data\r\nand yet even more data" -type :HTTP_REQUEST -method: HTTP_CONNECT -status_code :0 -request_path: -request_url :0-home0.netscape.com:443 -fragment : -query_string: -body :"" -body_size :0 -header_0 :{ "User-agent": "Mozilla/1.1N"} -header_1 :{ "Proxy-authorization": "basic aGVsbG86d29ybGQ="} -should_keep_alive :0 -upgrade :"some data\r\nand yet even more data" -http_major :1 -http_minor :0 - -name :report request -raw :"REPORT /test HTTP/1.1\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_REPORT -status_code :0 -request_path:/test -request_url :/test -fragment : -query_string: -body :"" -body_size :0 -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :request with no http version -raw :"GET /\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_GET -status_code :0 -request_path:/ -request_url :/ -fragment : -query_string: -body :"" -body_size :0 -should_keep_alive :0 -http_major :0 -http_minor :9 - -name :m-search request -raw :"M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nMAN: \"ssdp:discover\"\r\nST: \"ssdp:all\"\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_MSEARCH -status_code :0 -request_path:* -request_url :* -fragment : -query_string: -body :"" -body_size :0 -header_0 :{ "HOST": "239.255.255.250:1900"} -header_1 :{ "MAN": ""ssdp:discover""} -header_2 :{ "ST": ""ssdp:all""} -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :line folding in header value -raw :"GET / HTTP/1.1\r\nLine1: abc\r\n def\r\n ghi\r\n jkl\r\n mno \r\n qrs\r\nLine2: line2 \r\n\r\n" -type :HTTP_REQUEST -method: HTTP_GET -status_code :0 -request_path:/ -request_url :/ -fragment : -query_string: -body :"" -body_size :0 -header_0 :{ "Line1": "abcdefghijklmno qrs"} -header_1 :{ "Line2": "line2 "} -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :host terminated by a query string -raw :"GET http://hypnotoad.org?hail=all HTTP/1.1\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_GET -status_code :0 -request_path: -request_url :http://hypnotoad.org?hail=all -fragment : -query_string:hail=all -body :"" -body_size :0 -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :host:port terminated by a query string -raw :"GET http://hypnotoad.org:1234?hail=all HTTP/1.1\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_GET -status_code :0 -request_path: -request_url :http://hypnotoad.org:1234?hail=all -fragment : -query_string:hail=all -body :"" -body_size :0 -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :host:port terminated by a space -raw :"GET http://hypnotoad.org:1234 HTTP/1.1\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_GET -status_code :0 -request_path: -request_url :http://hypnotoad.org:1234 -fragment : -query_string: -body :"" -body_size :0 -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :PATCH request -raw :"PATCH /file.txt HTTP/1.1\r\nHost: www.example.com\r\nContent-Type: application/example\r\nIf-Match: \"e0023aa4e\"\r\nContent-Length: 10\r\n\r\ncccccccccc" -type :HTTP_REQUEST -method: UNKNOWN -status_code :0 -request_path:/file.txt -request_url :/file.txt -fragment : -query_string: -body :"cccccccccc" -body_size :0 -header_0 :{ "Host": "www.example.com"} -header_1 :{ "Content-Type": "application/example"} -header_2 :{ "If-Match": ""e0023aa4e""} -header_3 :{ "Content-Length": "10"} -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :connect caps request -raw :"CONNECT HOME0.NETSCAPE.COM:443 HTTP/1.0\r\nUser-agent: Mozilla/1.1N\r\nProxy-authorization: basic aGVsbG86d29ybGQ=\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_CONNECT -status_code :0 -request_path: -request_url :HOME0.NETSCAPE.COM:443 -fragment : -query_string: -body :"" -body_size :0 -header_0 :{ "User-agent": "Mozilla/1.1N"} -header_1 :{ "Proxy-authorization": "basic aGVsbG86d29ybGQ="} -should_keep_alive :0 -upgrade :"" -http_major :1 -http_minor :0 - -name :eat CRLF between requests, no "Connection: close" header -raw :"POST / HTTP/1.1\r\nHost: www.example.com\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 4\r\n\r\nq=42\r\n" -type :HTTP_REQUEST -method: HTTP_POST -status_code :0 -request_path:/ -request_url :/ -fragment : -query_string: -body :"q=42" -body_size :0 -header_0 :{ "Host": "www.example.com"} -header_1 :{ "Content-Type": "application/x-www-form-urlencoded"} -header_2 :{ "Content-Length": "4"} -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :eat CRLF between requests even if "Connection: close" is set -raw :"POST / HTTP/1.1\r\nHost: www.example.com\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 4\r\nConnection: close\r\n\r\nq=42\r\n" -type :HTTP_REQUEST -method: HTTP_POST -status_code :0 -request_path:/ -request_url :/ -fragment : -query_string: -body :"q=42" -body_size :0 -header_0 :{ "Host": "www.example.com"} -header_1 :{ "Content-Type": "application/x-www-form-urlencoded"} -header_2 :{ "Content-Length": "4"} -header_3 :{ "Connection": "close"} -should_keep_alive :0 -http_major :1 -http_minor :1 - -name :PURGE request -raw :"PURGE /file.txt HTTP/1.1\r\nHost: www.example.com\r\n\r\n" -type :HTTP_REQUEST -method: UNKNOWN -status_code :0 -request_path:/file.txt -request_url :/file.txt -fragment : -query_string: -body :"" -body_size :0 -header_0 :{ "Host": "www.example.com"} -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :google 301 -raw :"HTTP/1.1 301 Moved Permanently\r\nLocation: http://www.google.com/\r\nContent-Type: text/html; charset=UTF-8\r\nDate: Sun, 26 Apr 2009 11:11:49 GMT\r\nExpires: Tue, 26 May 2009 11:11:49 GMT\r\nX-$PrototypeBI-Version: 1.6.0.3\r\nCache-Control: public, max-age=2592000\r\nServer: gws\r\nContent-Length: 219 \r\n\r\n\n301 Moved\n

301 Moved

\nThe document has moved\nhere.\r\n\r\n" -type :HTTP_RESPONSE -method: HTTP_DELETE -status_code :301 -request_path: -request_url : -fragment : -query_string: -body :"\n301 Moved\n

301 Moved

\nThe document has moved\nhere.\r\n\r\n" -body_size :0 -header_0 :{ "Location": "http://www.google.com/"} -header_1 :{ "Content-Type": "text/html; charset=UTF-8"} -header_2 :{ "Date": "Sun, 26 Apr 2009 11:11:49 GMT"} -header_3 :{ "Expires": "Tue, 26 May 2009 11:11:49 GMT"} -header_4 :{ "X-$PrototypeBI-Version": "1.6.0.3"} -header_5 :{ "Cache-Control": "public, max-age=2592000"} -header_6 :{ "Server": "gws"} -header_7 :{ "Content-Length": "219 "} -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :no content-length response -raw :"HTTP/1.1 200 OK\r\nDate: Tue, 04 Aug 2009 07:59:32 GMT\r\nServer: Apache\r\nX-Powered-By: Servlet/2.5 JSP/2.1\r\nContent-Type: text/xml; charset=utf-8\r\nConnection: close\r\n\r\n\n\n \n \n SOAP-ENV:Client\n Client Error\n \n \n" -type :HTTP_RESPONSE -method: HTTP_DELETE -status_code :200 -request_path: -request_url : -fragment : -query_string: -body :"\n\n \n \n SOAP-ENV:Client\n Client Error\n \n \n" -body_size :0 -header_0 :{ "Date": "Tue, 04 Aug 2009 07:59:32 GMT"} -header_1 :{ "Server": "Apache"} -header_2 :{ "X-Powered-By": "Servlet/2.5 JSP/2.1"} -header_3 :{ "Content-Type": "text/xml; charset=utf-8"} -header_4 :{ "Connection": "close"} -should_keep_alive :0 -http_major :1 -http_minor :1 - -name :404 no headers no body -raw :"HTTP/1.1 404 Not Found\r\n\r\n" -type :HTTP_RESPONSE -method: HTTP_DELETE -status_code :404 -request_path: -request_url : -fragment : -query_string: -body :"" -body_size :0 -should_keep_alive :0 -http_major :1 -http_minor :1 - -name :301 no response phrase -raw :"HTTP/1.1 301\r\n\r\n" -type :HTTP_RESPONSE -method: HTTP_DELETE -status_code :301 -request_path: -request_url : -fragment : -query_string: -body :"" -body_size :0 -should_keep_alive :0 -http_major :1 -http_minor :1 - -name :200 trailing space on chunked body -raw :"HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nTransfer-Encoding: chunked\r\n\r\n25 \r\nThis is the data in the first chunk\r\n\r\n1C\r\nand this is the second one\r\n\r\n0 \r\n\r\n" -type :HTTP_RESPONSE -method: HTTP_DELETE -status_code :200 -request_path: -request_url : -fragment : -query_string: -body :"This is the data in the first chunk\r\nand this is the second one\r\n" -body_size :65 -header_0 :{ "Content-Type": "text/plain"} -header_1 :{ "Transfer-Encoding": "chunked"} -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :no carriage ret -raw :"HTTP/1.1 200 OK\nContent-Type: text/html; charset=utf-8\nConnection: close\n\nthese headers are from http://news.ycombinator.com/" -type :HTTP_RESPONSE -method: HTTP_DELETE -status_code :200 -request_path: -request_url : -fragment : -query_string: -body :"these headers are from http://news.ycombinator.com/" -body_size :0 -header_0 :{ "Content-Type": "text/html; charset=utf-8"} -header_1 :{ "Connection": "close"} -should_keep_alive :0 -http_major :1 -http_minor :1 - -name :proxy connection -raw :"HTTP/1.1 200 OK\r\nContent-Type: text/html; charset=UTF-8\r\nContent-Length: 11\r\nProxy-Connection: close\r\nDate: Thu, 31 Dec 2009 20:55:48 +0000\r\n\r\nhello world" -type :HTTP_RESPONSE -method: HTTP_DELETE -status_code :200 -request_path: -request_url : -fragment : -query_string: -body :"hello world" -body_size :0 -header_0 :{ "Content-Type": "text/html; charset=UTF-8"} -header_1 :{ "Content-Length": "11"} -header_2 :{ "Proxy-Connection": "close"} -header_3 :{ "Date": "Thu, 31 Dec 2009 20:55:48 +0000"} -should_keep_alive :0 -http_major :1 -http_minor :1 - -name :underscore header key -raw :"HTTP/1.1 200 OK\r\nServer: DCLK-AdSvr\r\nContent-Type: text/xml\r\nContent-Length: 0\r\nDCLK_imp: v7;x;114750856;0-0;0;17820020;0/0;21603567/21621457/1;;~okv=;dcmt=text/xml;;~cs=o\r\n\r\n" -type :HTTP_RESPONSE -method: HTTP_DELETE -status_code :200 -request_path: -request_url : -fragment : -query_string: -body :"" -body_size :0 -header_0 :{ "Server": "DCLK-AdSvr"} -header_1 :{ "Content-Type": "text/xml"} -header_2 :{ "Content-Length": "0"} -header_3 :{ "DCLK_imp": "v7;x;114750856;0-0;0;17820020;0/0;21603567/21621457/1;;~okv=;dcmt=text/xml;;~cs=o"} -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :bonjourmadame.fr -raw :"HTTP/1.0 301 Moved Permanently\r\nDate: Thu, 03 Jun 2010 09:56:32 GMT\r\nServer: Apache/2.2.3 (Red Hat)\r\nCache-Control: public\r\nPragma: \r\nLocation: http://www.bonjourmadame.fr/\r\nVary: Accept-Encoding\r\nContent-Length: 0\r\nContent-Type: text/html; charset=UTF-8\r\nConnection: keep-alive\r\n\r\n" -type :HTTP_RESPONSE -method: HTTP_DELETE -status_code :301 -request_path: -request_url : -fragment : -query_string: -body :"" -body_size :0 -header_0 :{ "Date": "Thu, 03 Jun 2010 09:56:32 GMT"} -header_1 :{ "Server": "Apache/2.2.3 (Red Hat)"} -header_2 :{ "Cache-Control": "public"} -header_3 :{ "Pragma": ""} -header_4 :{ "Location": "http://www.bonjourmadame.fr/"} -header_5 :{ "Vary": "Accept-Encoding"} -header_6 :{ "Content-Length": "0"} -header_7 :{ "Content-Type": "text/html; charset=UTF-8"} -header_8 :{ "Connection": "keep-alive"} -should_keep_alive :1 -http_major :1 -http_minor :0 - -name :field underscore -raw :"HTTP/1.1 200 OK\r\nDate: Tue, 28 Sep 2010 01:14:13 GMT\r\nServer: Apache\r\nCache-Control: no-cache, must-revalidate\r\nExpires: Mon, 26 Jul 1997 05:00:00 GMT\r\n.et-Cookie: PlaxoCS=1274804622353690521; path=/; domain=.plaxo.com\r\nVary: Accept-Encoding\r\n_eep-Alive: timeout=45\r\n_onnection: Keep-Alive\r\nTransfer-Encoding: chunked\r\nContent-Type: text/html\r\nConnection: close\r\n\r\n0\r\n\r\n" -type :HTTP_RESPONSE -method: HTTP_DELETE -status_code :200 -request_path: -request_url : -fragment : -query_string: -body :"" -body_size :0 -header_0 :{ "Date": "Tue, 28 Sep 2010 01:14:13 GMT"} -header_1 :{ "Server": "Apache"} -header_2 :{ "Cache-Control": "no-cache, must-revalidate"} -header_3 :{ "Expires": "Mon, 26 Jul 1997 05:00:00 GMT"} -header_4 :{ ".et-Cookie": "PlaxoCS=1274804622353690521; path=/; domain=.plaxo.com"} -header_5 :{ "Vary": "Accept-Encoding"} -header_6 :{ "_eep-Alive": "timeout=45"} -header_7 :{ "_onnection": "Keep-Alive"} -header_8 :{ "Transfer-Encoding": "chunked"} -header_9 :{ "Content-Type": "text/html"} -header_10 :{ "Connection": "close"} -should_keep_alive :0 -http_major :1 -http_minor :1 - -name :non-ASCII in status line -raw :"HTTP/1.1 500 Oriëntatieprobleem\r\nDate: Fri, 5 Nov 2010 23:07:12 GMT+2\r\nContent-Length: 0\r\nConnection: close\r\n\r\n" -type :HTTP_RESPONSE -method: HTTP_DELETE -status_code :500 -request_path: -request_url : -fragment : -query_string: -body :"" -body_size :0 -header_0 :{ "Date": "Fri, 5 Nov 2010 23:07:12 GMT+2"} -header_1 :{ "Content-Length": "0"} -header_2 :{ "Connection": "close"} -should_keep_alive :0 -http_major :1 -http_minor :1 - -name :http version 0.9 -raw :"HTTP/0.9 200 OK\r\n\r\n" -type :HTTP_RESPONSE -method: HTTP_DELETE -status_code :200 -request_path: -request_url : -fragment : -query_string: -body :"" -body_size :0 -should_keep_alive :0 -http_major :0 -http_minor :9 - -name :neither content-length nor transfer-encoding response -raw :"HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\n\r\nhello world" -type :HTTP_RESPONSE -method: HTTP_DELETE -status_code :200 -request_path: -request_url : -fragment : -query_string: -body :"hello world" -body_size :0 -header_0 :{ "Content-Type": "text/plain"} -should_keep_alive :0 -http_major :1 -http_minor :1 - -name :HTTP/1.0 with keep-alive and EOF-terminated 200 status -raw :"HTTP/1.0 200 OK\r\nConnection: keep-alive\r\n\r\n" -type :HTTP_RESPONSE -method: HTTP_DELETE -status_code :200 -request_path: -request_url : -fragment : -query_string: -body :"" -body_size :0 -header_0 :{ "Connection": "keep-alive"} -should_keep_alive :0 -http_major :1 -http_minor :0 - -name :HTTP/1.0 with keep-alive and a 204 status -raw :"HTTP/1.0 204 No content\r\nConnection: keep-alive\r\n\r\n" -type :HTTP_RESPONSE -method: HTTP_DELETE -status_code :204 -request_path: -request_url : -fragment : -query_string: -body :"" -body_size :0 -header_0 :{ "Connection": "keep-alive"} -should_keep_alive :1 -http_major :1 -http_minor :0 - -name :HTTP/1.1 with an EOF-terminated 200 status -raw :"HTTP/1.1 200 OK\r\n\r\n" -type :HTTP_RESPONSE -method: HTTP_DELETE -status_code :200 -request_path: -request_url : -fragment : -query_string: -body :"" -body_size :0 -should_keep_alive :0 -http_major :1 -http_minor :1 - -name :HTTP/1.1 with a 204 status -raw :"HTTP/1.1 204 No content\r\n\r\n" -type :HTTP_RESPONSE -method: HTTP_DELETE -status_code :204 -request_path: -request_url : -fragment : -query_string: -body :"" -body_size :0 -should_keep_alive :1 -http_major :1 -http_minor :1 - -name :HTTP/1.1 with a 204 status and keep-alive disabled -raw :"HTTP/1.1 204 No content\r\nConnection: close\r\n\r\n" -type :HTTP_RESPONSE -method: HTTP_DELETE -status_code :204 -request_path: -request_url : -fragment : -query_string: -body :"" -body_size :0 -header_0 :{ "Connection": "close"} -should_keep_alive :0 -http_major :1 -http_minor :1 - -name :HTTP/1.1 with chunked endocing and a 200 response -raw :"HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\n0\r\n\r\n" -type :HTTP_RESPONSE -method: HTTP_DELETE -status_code :200 -request_path: -request_url : -fragment : -query_string: -body :"" -body_size :0 -header_0 :{ "Transfer-Encoding": "chunked"} -should_keep_alive :1 -http_major :1 -http_minor :1 - diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/tests.utf8 b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/tests.utf8 deleted file mode 100644 index 5266159..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/tests.utf8 +++ /dev/null @@ -1,17 +0,0 @@ -name :utf-8 path request -raw :"GET /δ¶/δt/pope?q=1#narf HTTP/1.1\r\nHost: github.com\r\n\r\n" -type :HTTP_REQUEST -method: HTTP_GET -status_code :0 -request_path:/δ¶/δt/pope -request_url :/δ¶/δt/pope?q=1#narf -fragment :narf -query_string:q=1 -body :"" -body_size :0 -header_0 :{ "Host": "github.com"} -should_keep_alive :1 -upgrade :0 -http_major :1 -http_minor :1 - diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/tools/byte_constants.rb b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/tools/byte_constants.rb deleted file mode 100644 index 1604890..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/tools/byte_constants.rb +++ /dev/null @@ -1,6 +0,0 @@ - -"A".upto("Z") {|c| - puts "public static final byte #{c} = 0x#{c[0].to_s(16)};" -} - - diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/tools/const_char.rb b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/tools/const_char.rb deleted file mode 100644 index 84f9699..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/tools/const_char.rb +++ /dev/null @@ -1,13 +0,0 @@ - - -def printbytes str -str.each_byte { |b| - print "0x#{b.to_s(16)}, " -} -end - -if $0 == __FILE__ - printf "static final byte [] #{ARGV[0]} = {\n" - printbytes ARGV[0] - printf "\n};\n" -end diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/tools/lowcase.rb b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/tools/lowcase.rb deleted file mode 100644 index 13960cb..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/tools/lowcase.rb +++ /dev/null @@ -1,15 +0,0 @@ - - -0.upto(255) { |i| - printf "\n" if i%16 == 0 - printf " " if i%8 == 0 - s = ("" << i) - if s =~ /[A-Z0-9\-_\/ ]/ - print "0x#{i.to_s(16)}," - elsif s =~ /[a-z]/ - print "0x#{s.upcase[0].to_s(16)}," - else - print "0x00," - end - -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/tools/parse_tests.rb b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/tools/parse_tests.rb deleted file mode 100644 index 683adb9..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/tools/parse_tests.rb +++ /dev/null @@ -1,33 +0,0 @@ - - - - -# name : 200 trailing space on chunked body -# raw : "HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nTransfer-Encoding: chunked\r\n\r\n25 \r\nThis is the data in the first chunk\r\n\r\n1C\r\nand this is the second one\r\n\r\n0 \r\n\r\n" -# type : HTTP_RESPONSE -# method: HTTP_DELETE -# status code :200 -# request_path: -# request_url : -# fragment : -# query_string: -# body :"This is the data in the first chunk\r\nand this is the second one\r\n" -# body_size :65 -# header_0 :{ "Content-Type": "text/plain"} -# header_1 :{ "Transfer-Encoding": "chunked"} -# should_keep_alive :1 -# upgrade :0 -# http_major :1 -# http_minor :1 - - -class ParserTest - attr_accessor :name - attr_accessor :raw - attr_accessor :type - attr_accessor :method - attr_accessor :status_code - attr_accessor :request_path - attr_accessor :method -end - diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/AUTHORS b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/AUTHORS deleted file mode 100644 index abe99de..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/AUTHORS +++ /dev/null @@ -1,32 +0,0 @@ -# Authors ordered by first contribution. -Ryan Dahl -Jeremy Hinegardner -Sergey Shepelev -Joe Damato -tomika -Phoenix Sol -Cliff Frey -Ewen Cheslack-Postava -Santiago Gala -Tim Becker -Jeff Terrace -Ben Noordhuis -Nathan Rajlich -Mark Nottingham -Aman Gupta -Tim Becker -Sean Cunningham -Peter Griess -Salman Haq -Cliff Frey -Jon Kolb -Fouad Mardini -Paul Querna -Felix Geisendörfer -koichik -Andre Caron -Ivo Raisr -James McLaughlin -David Gwynne -LE ROUX Thomas -Randy Rizun diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/CONTRIBUTIONS b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/CONTRIBUTIONS deleted file mode 100644 index 11ba31e..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/CONTRIBUTIONS +++ /dev/null @@ -1,4 +0,0 @@ -Contributors must agree to the Contributor License Agreement before patches -can be accepted. - -http://spreadsheets2.google.com/viewform?hl=en&formkey=dDJXOGUwbzlYaWM4cHN1MERwQS1CSnc6MQ diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/LICENSE-MIT b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/LICENSE-MIT deleted file mode 100644 index 58010b3..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/LICENSE-MIT +++ /dev/null @@ -1,23 +0,0 @@ -http_parser.c is based on src/http/ngx_http_parse.c from NGINX copyright -Igor Sysoev. - -Additional changes are licensed under the same terms as NGINX and -copyright Joyent, Inc. and other Node contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/README.md b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/README.md deleted file mode 100644 index 700c3ac..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/README.md +++ /dev/null @@ -1,178 +0,0 @@ -HTTP Parser -=========== - -This is a parser for HTTP messages written in C. It parses both requests and -responses. The parser is designed to be used in performance HTTP -applications. It does not make any syscalls nor allocations, it does not -buffer data, it can be interrupted at anytime. Depending on your -architecture, it only requires about 40 bytes of data per message -stream (in a web server that is per connection). - -Features: - - * No dependencies - * Handles persistent streams (keep-alive). - * Decodes chunked encoding. - * Upgrade support - * Defends against buffer overflow attacks. - -The parser extracts the following information from HTTP messages: - - * Header fields and values - * Content-Length - * Request method - * Response status code - * Transfer-Encoding - * HTTP version - * Request URL - * Message body - - -Usage ------ - -One `http_parser` object is used per TCP connection. Initialize the struct -using `http_parser_init()` and set the callbacks. That might look something -like this for a request parser: - - http_parser_settings settings; - settings.on_path = my_path_callback; - settings.on_header_field = my_header_field_callback; - /* ... */ - - http_parser *parser = malloc(sizeof(http_parser)); - http_parser_init(parser, HTTP_REQUEST); - parser->data = my_socket; - -When data is received on the socket execute the parser and check for errors. - - size_t len = 80*1024, nparsed; - char buf[len]; - ssize_t recved; - - recved = recv(fd, buf, len, 0); - - if (recved < 0) { - /* Handle error. */ - } - - /* Start up / continue the parser. - * Note we pass recved==0 to signal that EOF has been recieved. - */ - nparsed = http_parser_execute(parser, &settings, buf, recved); - - if (parser->upgrade) { - /* handle new protocol */ - } else if (nparsed != recved) { - /* Handle error. Usually just close the connection. */ - } - -HTTP needs to know where the end of the stream is. For example, sometimes -servers send responses without Content-Length and expect the client to -consume input (for the body) until EOF. To tell http_parser about EOF, give -`0` as the forth parameter to `http_parser_execute()`. Callbacks and errors -can still be encountered during an EOF, so one must still be prepared -to receive them. - -Scalar valued message information such as `status_code`, `method`, and the -HTTP version are stored in the parser structure. This data is only -temporally stored in `http_parser` and gets reset on each new message. If -this information is needed later, copy it out of the structure during the -`headers_complete` callback. - -The parser decodes the transfer-encoding for both requests and responses -transparently. That is, a chunked encoding is decoded before being sent to -the on_body callback. - - -The Special Problem of Upgrade ------------------------------- - -HTTP supports upgrading the connection to a different protocol. An -increasingly common example of this is the Web Socket protocol which sends -a request like - - GET /demo HTTP/1.1 - Upgrade: WebSocket - Connection: Upgrade - Host: example.com - Origin: http://example.com - WebSocket-Protocol: sample - -followed by non-HTTP data. - -(See http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75 for more -information the Web Socket protocol.) - -To support this, the parser will treat this as a normal HTTP message without a -body. Issuing both on_headers_complete and on_message_complete callbacks. However -http_parser_execute() will stop parsing at the end of the headers and return. - -The user is expected to check if `parser->upgrade` has been set to 1 after -`http_parser_execute()` returns. Non-HTTP data begins at the buffer supplied -offset by the return value of `http_parser_execute()`. - - -Callbacks ---------- - -During the `http_parser_execute()` call, the callbacks set in -`http_parser_settings` will be executed. The parser maintains state and -never looks behind, so buffering the data is not necessary. If you need to -save certain data for later usage, you can do that from the callbacks. - -There are two types of callbacks: - -* notification `typedef int (*http_cb) (http_parser*);` - Callbacks: on_message_begin, on_headers_complete, on_message_complete. -* data `typedef int (*http_data_cb) (http_parser*, const char *at, size_t length);` - Callbacks: (requests only) on_uri, - (common) on_header_field, on_header_value, on_body; - -Callbacks must return 0 on success. Returning a non-zero value indicates -error to the parser, making it exit immediately. - -In case you parse HTTP message in chunks (i.e. `read()` request line -from socket, parse, read half headers, parse, etc) your data callbacks -may be called more than once. Http-parser guarantees that data pointer is only -valid for the lifetime of callback. You can also `read()` into a heap allocated -buffer to avoid copying memory around if this fits your application. - -Reading headers may be a tricky task if you read/parse headers partially. -Basically, you need to remember whether last header callback was field or value -and apply following logic: - - (on_header_field and on_header_value shortened to on_h_*) - ------------------------ ------------ -------------------------------------------- - | State (prev. callback) | Callback | Description/action | - ------------------------ ------------ -------------------------------------------- - | nothing (first call) | on_h_field | Allocate new buffer and copy callback data | - | | | into it | - ------------------------ ------------ -------------------------------------------- - | value | on_h_field | New header started. | - | | | Copy current name,value buffers to headers | - | | | list and allocate new buffer for new name | - ------------------------ ------------ -------------------------------------------- - | field | on_h_field | Previous name continues. Reallocate name | - | | | buffer and append callback data to it | - ------------------------ ------------ -------------------------------------------- - | field | on_h_value | Value for current header started. Allocate | - | | | new buffer and copy callback data to it | - ------------------------ ------------ -------------------------------------------- - | value | on_h_value | Value continues. Reallocate value buffer | - | | | and append callback data to it | - ------------------------ ------------ -------------------------------------------- - - -Parsing URLs ------------- - -A simplistic zero-copy URL parser is provided as `http_parser_parse_url()`. -Users of this library may wish to use it to parse URLs constructed from -consecutive `on_url` callbacks. - -See examples of reading in headers: - -* [partial example](http://gist.github.com/155877) in C -* [from http-parser tests](http://github.com/ry/http-parser/blob/37a0ff8928fb0d83cec0d0d8909c5a4abcd221af/test.c#L403) in C -* [from Node library](http://github.com/ry/node/blob/842eaf446d2fdcb33b296c67c911c32a0dabc747/src/http.js#L284) in Javascript diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/http_parser.c b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/http_parser.c deleted file mode 100644 index f2ca661..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/http_parser.c +++ /dev/null @@ -1,2058 +0,0 @@ -/* Based on src/http/ngx_http_parse.c from NGINX copyright Igor Sysoev - * - * Additional changes are licensed under the same terms as NGINX and - * copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ -#include "http_parser.h" -#include -#include -#include -#include -#include -#include - -#ifndef ULLONG_MAX -# define ULLONG_MAX ((uint64_t) -1) /* 2^64-1 */ -#endif - -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - - -#if HTTP_PARSER_DEBUG -#define SET_ERRNO(e) \ -do { \ - parser->http_errno = (e); \ - parser->error_lineno = __LINE__; \ -} while (0) -#else -#define SET_ERRNO(e) \ -do { \ - parser->http_errno = (e); \ -} while(0) -#endif - - -/* Run the notify callback FOR, returning ER if it fails */ -#define CALLBACK_NOTIFY_(FOR, ER) \ -do { \ - assert(HTTP_PARSER_ERRNO(parser) == HPE_OK); \ - \ - if (settings->on_##FOR) { \ - if (0 != settings->on_##FOR(parser)) { \ - SET_ERRNO(HPE_CB_##FOR); \ - } \ - \ - /* We either errored above or got paused; get out */ \ - if (HTTP_PARSER_ERRNO(parser) != HPE_OK) { \ - return (ER); \ - } \ - } \ -} while (0) - -/* Run the notify callback FOR and consume the current byte */ -#define CALLBACK_NOTIFY(FOR) CALLBACK_NOTIFY_(FOR, p - data + 1) - -/* Run the notify callback FOR and don't consume the current byte */ -#define CALLBACK_NOTIFY_NOADVANCE(FOR) CALLBACK_NOTIFY_(FOR, p - data) - -/* Run data callback FOR with LEN bytes, returning ER if it fails */ -#define CALLBACK_DATA_(FOR, LEN, ER) \ -do { \ - assert(HTTP_PARSER_ERRNO(parser) == HPE_OK); \ - \ - if (FOR##_mark) { \ - if (settings->on_##FOR) { \ - if (0 != settings->on_##FOR(parser, FOR##_mark, (LEN))) { \ - SET_ERRNO(HPE_CB_##FOR); \ - } \ - \ - /* We either errored above or got paused; get out */ \ - if (HTTP_PARSER_ERRNO(parser) != HPE_OK) { \ - return (ER); \ - } \ - } \ - FOR##_mark = NULL; \ - } \ -} while (0) - -/* Run the data callback FOR and consume the current byte */ -#define CALLBACK_DATA(FOR) \ - CALLBACK_DATA_(FOR, p - FOR##_mark, p - data + 1) - -/* Run the data callback FOR and don't consume the current byte */ -#define CALLBACK_DATA_NOADVANCE(FOR) \ - CALLBACK_DATA_(FOR, p - FOR##_mark, p - data) - -/* Set the mark FOR; non-destructive if mark is already set */ -#define MARK(FOR) \ -do { \ - if (!FOR##_mark) { \ - FOR##_mark = p; \ - } \ -} while (0) - - -#define PROXY_CONNECTION "proxy-connection" -#define CONNECTION "connection" -#define CONTENT_LENGTH "content-length" -#define TRANSFER_ENCODING "transfer-encoding" -#define UPGRADE "upgrade" -#define CHUNKED "chunked" -#define KEEP_ALIVE "keep-alive" -#define CLOSE "close" - - -static const char *method_strings[] = - { "DELETE" - , "GET" - , "HEAD" - , "POST" - , "PUT" - , "CONNECT" - , "OPTIONS" - , "TRACE" - , "COPY" - , "LOCK" - , "MKCOL" - , "MOVE" - , "PROPFIND" - , "PROPPATCH" - , "UNLOCK" - , "REPORT" - , "MKACTIVITY" - , "CHECKOUT" - , "MERGE" - , "M-SEARCH" - , "NOTIFY" - , "SUBSCRIBE" - , "UNSUBSCRIBE" - , "PATCH" - , "PURGE" - }; - - -/* Tokens as defined by rfc 2616. Also lowercases them. - * token = 1* - * separators = "(" | ")" | "<" | ">" | "@" - * | "," | ";" | ":" | "\" | <"> - * | "/" | "[" | "]" | "?" | "=" - * | "{" | "}" | SP | HT - */ -static const char tokens[256] = { -/* 0 nul 1 soh 2 stx 3 etx 4 eot 5 enq 6 ack 7 bel */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 8 bs 9 ht 10 nl 11 vt 12 np 13 cr 14 so 15 si */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 16 dle 17 dc1 18 dc2 19 dc3 20 dc4 21 nak 22 syn 23 etb */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 24 can 25 em 26 sub 27 esc 28 fs 29 gs 30 rs 31 us */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 32 sp 33 ! 34 " 35 # 36 $ 37 % 38 & 39 ' */ - 0, '!', 0, '#', '$', '%', '&', '\'', -/* 40 ( 41 ) 42 * 43 + 44 , 45 - 46 . 47 / */ - 0, 0, '*', '+', 0, '-', '.', 0, -/* 48 0 49 1 50 2 51 3 52 4 53 5 54 6 55 7 */ - '0', '1', '2', '3', '4', '5', '6', '7', -/* 56 8 57 9 58 : 59 ; 60 < 61 = 62 > 63 ? */ - '8', '9', 0, 0, 0, 0, 0, 0, -/* 64 @ 65 A 66 B 67 C 68 D 69 E 70 F 71 G */ - 0, 'a', 'b', 'c', 'd', 'e', 'f', 'g', -/* 72 H 73 I 74 J 75 K 76 L 77 M 78 N 79 O */ - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', -/* 80 P 81 Q 82 R 83 S 84 T 85 U 86 V 87 W */ - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', -/* 88 X 89 Y 90 Z 91 [ 92 \ 93 ] 94 ^ 95 _ */ - 'x', 'y', 'z', 0, 0, 0, '^', '_', -/* 96 ` 97 a 98 b 99 c 100 d 101 e 102 f 103 g */ - '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', -/* 104 h 105 i 106 j 107 k 108 l 109 m 110 n 111 o */ - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', -/* 112 p 113 q 114 r 115 s 116 t 117 u 118 v 119 w */ - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', -/* 120 x 121 y 122 z 123 { 124 | 125 } 126 ~ 127 del */ - 'x', 'y', 'z', 0, '|', 0, '~', 0 }; - - -static const int8_t unhex[256] = - {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - , 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1 - ,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - }; - - -static const uint8_t normal_url_char[256] = { -/* 0 nul 1 soh 2 stx 3 etx 4 eot 5 enq 6 ack 7 bel */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 8 bs 9 ht 10 nl 11 vt 12 np 13 cr 14 so 15 si */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 16 dle 17 dc1 18 dc2 19 dc3 20 dc4 21 nak 22 syn 23 etb */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 24 can 25 em 26 sub 27 esc 28 fs 29 gs 30 rs 31 us */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 32 sp 33 ! 34 " 35 # 36 $ 37 % 38 & 39 ' */ - 0, 1, 1, 0, 1, 1, 1, 1, -/* 40 ( 41 ) 42 * 43 + 44 , 45 - 46 . 47 / */ - 1, 1, 1, 1, 1, 1, 1, 1, -/* 48 0 49 1 50 2 51 3 52 4 53 5 54 6 55 7 */ - 1, 1, 1, 1, 1, 1, 1, 1, -/* 56 8 57 9 58 : 59 ; 60 < 61 = 62 > 63 ? */ - 1, 1, 1, 1, 1, 1, 1, 0, -/* 64 @ 65 A 66 B 67 C 68 D 69 E 70 F 71 G */ - 1, 1, 1, 1, 1, 1, 1, 1, -/* 72 H 73 I 74 J 75 K 76 L 77 M 78 N 79 O */ - 1, 1, 1, 1, 1, 1, 1, 1, -/* 80 P 81 Q 82 R 83 S 84 T 85 U 86 V 87 W */ - 1, 1, 1, 1, 1, 1, 1, 1, -/* 88 X 89 Y 90 Z 91 [ 92 \ 93 ] 94 ^ 95 _ */ - 1, 1, 1, 1, 1, 1, 1, 1, -/* 96 ` 97 a 98 b 99 c 100 d 101 e 102 f 103 g */ - 1, 1, 1, 1, 1, 1, 1, 1, -/* 104 h 105 i 106 j 107 k 108 l 109 m 110 n 111 o */ - 1, 1, 1, 1, 1, 1, 1, 1, -/* 112 p 113 q 114 r 115 s 116 t 117 u 118 v 119 w */ - 1, 1, 1, 1, 1, 1, 1, 1, -/* 120 x 121 y 122 z 123 { 124 | 125 } 126 ~ 127 del */ - 1, 1, 1, 1, 1, 1, 1, 0, }; - - -enum state - { s_dead = 1 /* important that this is > 0 */ - - , s_start_req_or_res - , s_res_or_resp_H - , s_start_res - , s_res_H - , s_res_HT - , s_res_HTT - , s_res_HTTP - , s_res_first_http_major - , s_res_http_major - , s_res_first_http_minor - , s_res_http_minor - , s_res_first_status_code - , s_res_status_code - , s_res_status - , s_res_line_almost_done - - , s_start_req - - , s_req_method - , s_req_spaces_before_url - , s_req_schema - , s_req_schema_slash - , s_req_schema_slash_slash - , s_req_host_start - , s_req_host_v6_start - , s_req_host_v6 - , s_req_host_v6_end - , s_req_host - , s_req_port_start - , s_req_port - , s_req_path - , s_req_query_string_start - , s_req_query_string - , s_req_fragment_start - , s_req_fragment - , s_req_http_start - , s_req_http_H - , s_req_http_HT - , s_req_http_HTT - , s_req_http_HTTP - , s_req_first_http_major - , s_req_http_major - , s_req_first_http_minor - , s_req_http_minor - , s_req_line_almost_done - - , s_header_field_start - , s_header_field - , s_header_value_start - , s_header_value - , s_header_value_lws - - , s_header_almost_done - - , s_chunk_size_start - , s_chunk_size - , s_chunk_parameters - , s_chunk_size_almost_done - - , s_headers_almost_done - , s_headers_done - - /* Important: 's_headers_done' must be the last 'header' state. All - * states beyond this must be 'body' states. It is used for overflow - * checking. See the PARSING_HEADER() macro. - */ - - , s_chunk_data - , s_chunk_data_almost_done - , s_chunk_data_done - - , s_body_identity - , s_body_identity_eof - - , s_message_done - }; - - -#define PARSING_HEADER(state) (state <= s_headers_done) - - -enum header_states - { h_general = 0 - , h_C - , h_CO - , h_CON - - , h_matching_connection - , h_matching_proxy_connection - , h_matching_content_length - , h_matching_transfer_encoding - , h_matching_upgrade - - , h_connection - , h_content_length - , h_transfer_encoding - , h_upgrade - - , h_matching_transfer_encoding_chunked - , h_matching_connection_keep_alive - , h_matching_connection_close - - , h_transfer_encoding_chunked - , h_connection_keep_alive - , h_connection_close - }; - - -/* Macros for character classes; depends on strict-mode */ -#define CR '\r' -#define LF '\n' -#define LOWER(c) (unsigned char)(c | 0x20) -#define IS_ALPHA(c) (LOWER(c) >= 'a' && LOWER(c) <= 'z') -#define IS_NUM(c) ((c) >= '0' && (c) <= '9') -#define IS_ALPHANUM(c) (IS_ALPHA(c) || IS_NUM(c)) -#define IS_HEX(c) (IS_NUM(c) || (LOWER(c) >= 'a' && LOWER(c) <= 'f')) - -#if HTTP_PARSER_STRICT -#define TOKEN(c) (tokens[(unsigned char)c]) -#define IS_URL_CHAR(c) (normal_url_char[(unsigned char) (c)]) -#define IS_HOST_CHAR(c) (IS_ALPHANUM(c) || (c) == '.' || (c) == '-') -#else -#define TOKEN(c) ((c == ' ') ? ' ' : tokens[(unsigned char)c]) -#define IS_URL_CHAR(c) \ - (normal_url_char[(unsigned char) (c)] || ((c) & 0x80)) -#define IS_HOST_CHAR(c) \ - (IS_ALPHANUM(c) || (c) == '.' || (c) == '-' || (c) == '_') -#endif - - -#define start_state (parser->type == HTTP_REQUEST ? s_start_req : s_start_res) - - -#if HTTP_PARSER_STRICT -# define STRICT_CHECK(cond) \ -do { \ - if (cond) { \ - SET_ERRNO(HPE_STRICT); \ - goto error; \ - } \ -} while (0) -# define NEW_MESSAGE() (http_should_keep_alive(parser) ? start_state : s_dead) -#else -# define STRICT_CHECK(cond) -# define NEW_MESSAGE() start_state -#endif - - -/* Map errno values to strings for human-readable output */ -#define HTTP_STRERROR_GEN(n, s) { "HPE_" #n, s }, -static struct { - const char *name; - const char *description; -} http_strerror_tab[] = { - HTTP_ERRNO_MAP(HTTP_STRERROR_GEN) -}; -#undef HTTP_STRERROR_GEN - -int http_message_needs_eof(http_parser *parser); - -/* Our URL parser. - * - * This is designed to be shared by http_parser_execute() for URL validation, - * hence it has a state transition + byte-for-byte interface. In addition, it - * is meant to be embedded in http_parser_parse_url(), which does the dirty - * work of turning state transitions URL components for its API. - * - * This function should only be invoked with non-space characters. It is - * assumed that the caller cares about (and can detect) the transition between - * URL and non-URL states by looking for these. - */ -static enum state -parse_url_char(enum state s, const char ch) -{ - assert(!isspace(ch)); - - switch (s) { - case s_req_spaces_before_url: - /* Proxied requests are followed by scheme of an absolute URI (alpha). - * All methods except CONNECT are followed by '/' or '*'. - */ - - if (ch == '/' || ch == '*') { - return s_req_path; - } - - if (IS_ALPHA(ch)) { - return s_req_schema; - } - - break; - - case s_req_schema: - if (IS_ALPHA(ch)) { - return s; - } - - if (ch == ':') { - return s_req_schema_slash; - } - - break; - - case s_req_schema_slash: - if (ch == '/') { - return s_req_schema_slash_slash; - } - - break; - - case s_req_schema_slash_slash: - if (ch == '/') { - return s_req_host_start; - } - - break; - - case s_req_host_start: - if (ch == '[') { - return s_req_host_v6_start; - } - - if (IS_HOST_CHAR(ch)) { - return s_req_host; - } - - break; - - case s_req_host: - if (IS_HOST_CHAR(ch)) { - return s_req_host; - } - - /* FALLTHROUGH */ - case s_req_host_v6_end: - switch (ch) { - case ':': - return s_req_port_start; - - case '/': - return s_req_path; - - case '?': - return s_req_query_string_start; - } - - break; - - case s_req_host_v6: - if (ch == ']') { - return s_req_host_v6_end; - } - - /* FALLTHROUGH */ - case s_req_host_v6_start: - if (IS_HEX(ch) || ch == ':') { - return s_req_host_v6; - } - break; - - case s_req_port: - switch (ch) { - case '/': - return s_req_path; - - case '?': - return s_req_query_string_start; - } - - /* FALLTHROUGH */ - case s_req_port_start: - if (IS_NUM(ch)) { - return s_req_port; - } - - break; - - case s_req_path: - if (IS_URL_CHAR(ch)) { - return s; - } - - switch (ch) { - case '?': - return s_req_query_string_start; - - case '#': - return s_req_fragment_start; - } - - break; - - case s_req_query_string_start: - case s_req_query_string: - if (IS_URL_CHAR(ch)) { - return s_req_query_string; - } - - switch (ch) { - case '?': - /* allow extra '?' in query string */ - return s_req_query_string; - - case '#': - return s_req_fragment_start; - } - - break; - - case s_req_fragment_start: - if (IS_URL_CHAR(ch)) { - return s_req_fragment; - } - - switch (ch) { - case '?': - return s_req_fragment; - - case '#': - return s; - } - - break; - - case s_req_fragment: - if (IS_URL_CHAR(ch)) { - return s; - } - - switch (ch) { - case '?': - case '#': - return s; - } - - break; - - default: - break; - } - - /* We should never fall out of the switch above unless there's an error */ - return s_dead; -} - -size_t http_parser_execute (http_parser *parser, - const http_parser_settings *settings, - const char *data, - size_t len) -{ - char c, ch; - int8_t unhex_val; - const char *p = data; - const char *header_field_mark = 0; - const char *header_value_mark = 0; - const char *url_mark = 0; - const char *body_mark = 0; - - /* We're in an error state. Don't bother doing anything. */ - if (HTTP_PARSER_ERRNO(parser) != HPE_OK) { - return 0; - } - - if (len == 0) { - switch (parser->state) { - case s_body_identity_eof: - /* Use of CALLBACK_NOTIFY() here would erroneously return 1 byte read if - * we got paused. - */ - CALLBACK_NOTIFY_NOADVANCE(message_complete); - return 0; - - case s_dead: - case s_start_req_or_res: - case s_start_res: - case s_start_req: - return 0; - - default: - SET_ERRNO(HPE_INVALID_EOF_STATE); - return 1; - } - } - - - if (parser->state == s_header_field) - header_field_mark = data; - if (parser->state == s_header_value) - header_value_mark = data; - switch (parser->state) { - case s_req_path: - case s_req_schema: - case s_req_schema_slash: - case s_req_schema_slash_slash: - case s_req_host_start: - case s_req_host_v6_start: - case s_req_host_v6: - case s_req_host_v6_end: - case s_req_host: - case s_req_port_start: - case s_req_port: - case s_req_query_string_start: - case s_req_query_string: - case s_req_fragment_start: - case s_req_fragment: - url_mark = data; - break; - } - - for (p=data; p != data + len; p++) { - ch = *p; - - if (PARSING_HEADER(parser->state)) { - ++parser->nread; - /* Buffer overflow attack */ - if (parser->nread > HTTP_MAX_HEADER_SIZE) { - SET_ERRNO(HPE_HEADER_OVERFLOW); - goto error; - } - } - - reexecute_byte: - switch (parser->state) { - - case s_dead: - /* this state is used after a 'Connection: close' message - * the parser will error out if it reads another message - */ - if (ch == CR || ch == LF) - break; - - SET_ERRNO(HPE_CLOSED_CONNECTION); - goto error; - - case s_start_req_or_res: - { - if (ch == CR || ch == LF) - break; - parser->flags = 0; - parser->content_length = ULLONG_MAX; - - if (ch == 'H') { - parser->state = s_res_or_resp_H; - - CALLBACK_NOTIFY(message_begin); - } else { - parser->type = HTTP_REQUEST; - parser->state = s_start_req; - goto reexecute_byte; - } - - break; - } - - case s_res_or_resp_H: - if (ch == 'T') { - parser->type = HTTP_RESPONSE; - parser->state = s_res_HT; - } else { - if (ch != 'E') { - SET_ERRNO(HPE_INVALID_CONSTANT); - goto error; - } - - parser->type = HTTP_REQUEST; - parser->method = HTTP_HEAD; - parser->index = 2; - parser->state = s_req_method; - } - break; - - case s_start_res: - { - parser->flags = 0; - parser->content_length = ULLONG_MAX; - - switch (ch) { - case 'H': - parser->state = s_res_H; - break; - - case CR: - case LF: - break; - - default: - SET_ERRNO(HPE_INVALID_CONSTANT); - goto error; - } - - CALLBACK_NOTIFY(message_begin); - break; - } - - case s_res_H: - STRICT_CHECK(ch != 'T'); - parser->state = s_res_HT; - break; - - case s_res_HT: - STRICT_CHECK(ch != 'T'); - parser->state = s_res_HTT; - break; - - case s_res_HTT: - STRICT_CHECK(ch != 'P'); - parser->state = s_res_HTTP; - break; - - case s_res_HTTP: - STRICT_CHECK(ch != '/'); - parser->state = s_res_first_http_major; - break; - - case s_res_first_http_major: - if (ch < '0' || ch > '9') { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_major = ch - '0'; - parser->state = s_res_http_major; - break; - - /* major HTTP version or dot */ - case s_res_http_major: - { - if (ch == '.') { - parser->state = s_res_first_http_minor; - break; - } - - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_major *= 10; - parser->http_major += ch - '0'; - - if (parser->http_major > 999) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - break; - } - - /* first digit of minor HTTP version */ - case s_res_first_http_minor: - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_minor = ch - '0'; - parser->state = s_res_http_minor; - break; - - /* minor HTTP version or end of request line */ - case s_res_http_minor: - { - if (ch == ' ') { - parser->state = s_res_first_status_code; - break; - } - - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_minor *= 10; - parser->http_minor += ch - '0'; - - if (parser->http_minor > 999) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - break; - } - - case s_res_first_status_code: - { - if (!IS_NUM(ch)) { - if (ch == ' ') { - break; - } - - SET_ERRNO(HPE_INVALID_STATUS); - goto error; - } - parser->status_code = ch - '0'; - parser->state = s_res_status_code; - break; - } - - case s_res_status_code: - { - if (!IS_NUM(ch)) { - switch (ch) { - case ' ': - parser->state = s_res_status; - break; - case CR: - parser->state = s_res_line_almost_done; - break; - case LF: - parser->state = s_header_field_start; - break; - default: - SET_ERRNO(HPE_INVALID_STATUS); - goto error; - } - break; - } - - parser->status_code *= 10; - parser->status_code += ch - '0'; - - if (parser->status_code > 999) { - SET_ERRNO(HPE_INVALID_STATUS); - goto error; - } - - break; - } - - case s_res_status: - /* the human readable status. e.g. "NOT FOUND" - * we are not humans so just ignore this */ - if (ch == CR) { - parser->state = s_res_line_almost_done; - break; - } - - if (ch == LF) { - parser->state = s_header_field_start; - break; - } - break; - - case s_res_line_almost_done: - STRICT_CHECK(ch != LF); - parser->state = s_header_field_start; - break; - - case s_start_req: - { - if (ch == CR || ch == LF) - break; - parser->flags = 0; - parser->content_length = ULLONG_MAX; - - if (!IS_ALPHA(ch)) { - SET_ERRNO(HPE_INVALID_METHOD); - goto error; - } - - parser->method = (enum http_method) 0; - parser->index = 1; - switch (ch) { - case 'C': parser->method = HTTP_CONNECT; /* or COPY, CHECKOUT */ break; - case 'D': parser->method = HTTP_DELETE; break; - case 'G': parser->method = HTTP_GET; break; - case 'H': parser->method = HTTP_HEAD; break; - case 'L': parser->method = HTTP_LOCK; break; - case 'M': parser->method = HTTP_MKCOL; /* or MOVE, MKACTIVITY, MERGE, M-SEARCH */ break; - case 'N': parser->method = HTTP_NOTIFY; break; - case 'O': parser->method = HTTP_OPTIONS; break; - case 'P': parser->method = HTTP_POST; - /* or PROPFIND|PROPPATCH|PUT|PATCH|PURGE */ - break; - case 'R': parser->method = HTTP_REPORT; break; - case 'S': parser->method = HTTP_SUBSCRIBE; break; - case 'T': parser->method = HTTP_TRACE; break; - case 'U': parser->method = HTTP_UNLOCK; /* or UNSUBSCRIBE */ break; - default: - SET_ERRNO(HPE_INVALID_METHOD); - goto error; - } - parser->state = s_req_method; - - CALLBACK_NOTIFY(message_begin); - - break; - } - - case s_req_method: - { - const char *matcher; - if (ch == '\0') { - SET_ERRNO(HPE_INVALID_METHOD); - goto error; - } - - matcher = method_strings[parser->method]; - if (ch == ' ' && matcher[parser->index] == '\0') { - parser->state = s_req_spaces_before_url; - } else if (ch == matcher[parser->index]) { - ; /* nada */ - } else if (parser->method == HTTP_CONNECT) { - if (parser->index == 1 && ch == 'H') { - parser->method = HTTP_CHECKOUT; - } else if (parser->index == 2 && ch == 'P') { - parser->method = HTTP_COPY; - } else { - goto error; - } - } else if (parser->method == HTTP_MKCOL) { - if (parser->index == 1 && ch == 'O') { - parser->method = HTTP_MOVE; - } else if (parser->index == 1 && ch == 'E') { - parser->method = HTTP_MERGE; - } else if (parser->index == 1 && ch == '-') { - parser->method = HTTP_MSEARCH; - } else if (parser->index == 2 && ch == 'A') { - parser->method = HTTP_MKACTIVITY; - } else { - goto error; - } - } else if (parser->index == 1 && parser->method == HTTP_POST) { - if (ch == 'R') { - parser->method = HTTP_PROPFIND; /* or HTTP_PROPPATCH */ - } else if (ch == 'U') { - parser->method = HTTP_PUT; /* or HTTP_PURGE */ - } else if (ch == 'A') { - parser->method = HTTP_PATCH; - } else { - goto error; - } - } else if (parser->index == 2) { - if (parser->method == HTTP_PUT) { - if (ch == 'R') parser->method = HTTP_PURGE; - } else if (parser->method == HTTP_UNLOCK) { - if (ch == 'S') parser->method = HTTP_UNSUBSCRIBE; - } - } else if (parser->index == 4 && parser->method == HTTP_PROPFIND && ch == 'P') { - parser->method = HTTP_PROPPATCH; - } else { - SET_ERRNO(HPE_INVALID_METHOD); - goto error; - } - - ++parser->index; - break; - } - - case s_req_spaces_before_url: - { - if (ch == ' ') break; - - MARK(url); - if (parser->method == HTTP_CONNECT) { - parser->state = s_req_host_start; - } - - parser->state = parse_url_char((enum state)parser->state, ch); - if (parser->state == s_dead) { - SET_ERRNO(HPE_INVALID_URL); - goto error; - } - - break; - } - - case s_req_schema: - case s_req_schema_slash: - case s_req_schema_slash_slash: - case s_req_host_start: - case s_req_host_v6_start: - case s_req_host_v6: - case s_req_port_start: - { - switch (ch) { - /* No whitespace allowed here */ - case ' ': - case CR: - case LF: - SET_ERRNO(HPE_INVALID_URL); - goto error; - default: - parser->state = parse_url_char((enum state)parser->state, ch); - if (parser->state == s_dead) { - SET_ERRNO(HPE_INVALID_URL); - goto error; - } - } - - break; - } - - case s_req_host: - case s_req_host_v6_end: - case s_req_port: - case s_req_path: - case s_req_query_string_start: - case s_req_query_string: - case s_req_fragment_start: - case s_req_fragment: - { - switch (ch) { - case ' ': - parser->state = s_req_http_start; - CALLBACK_DATA(url); - break; - case CR: - case LF: - parser->http_major = 0; - parser->http_minor = 9; - parser->state = (ch == CR) ? - s_req_line_almost_done : - s_header_field_start; - CALLBACK_DATA(url); - break; - default: - parser->state = parse_url_char((enum state)parser->state, ch); - if (parser->state == s_dead) { - SET_ERRNO(HPE_INVALID_URL); - goto error; - } - } - break; - } - - case s_req_http_start: - switch (ch) { - case 'H': - parser->state = s_req_http_H; - break; - case ' ': - break; - default: - SET_ERRNO(HPE_INVALID_CONSTANT); - goto error; - } - break; - - case s_req_http_H: - STRICT_CHECK(ch != 'T'); - parser->state = s_req_http_HT; - break; - - case s_req_http_HT: - STRICT_CHECK(ch != 'T'); - parser->state = s_req_http_HTT; - break; - - case s_req_http_HTT: - STRICT_CHECK(ch != 'P'); - parser->state = s_req_http_HTTP; - break; - - case s_req_http_HTTP: - STRICT_CHECK(ch != '/'); - parser->state = s_req_first_http_major; - break; - - /* first digit of major HTTP version */ - case s_req_first_http_major: - if (ch < '1' || ch > '9') { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_major = ch - '0'; - parser->state = s_req_http_major; - break; - - /* major HTTP version or dot */ - case s_req_http_major: - { - if (ch == '.') { - parser->state = s_req_first_http_minor; - break; - } - - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_major *= 10; - parser->http_major += ch - '0'; - - if (parser->http_major > 999) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - break; - } - - /* first digit of minor HTTP version */ - case s_req_first_http_minor: - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_minor = ch - '0'; - parser->state = s_req_http_minor; - break; - - /* minor HTTP version or end of request line */ - case s_req_http_minor: - { - if (ch == CR) { - parser->state = s_req_line_almost_done; - break; - } - - if (ch == LF) { - parser->state = s_header_field_start; - break; - } - - /* XXX allow spaces after digit? */ - - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_minor *= 10; - parser->http_minor += ch - '0'; - - if (parser->http_minor > 999) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - break; - } - - /* end of request line */ - case s_req_line_almost_done: - { - if (ch != LF) { - SET_ERRNO(HPE_LF_EXPECTED); - goto error; - } - - parser->state = s_header_field_start; - break; - } - - case s_header_field_start: - { - if (ch == CR) { - parser->state = s_headers_almost_done; - break; - } - - if (ch == LF) { - /* they might be just sending \n instead of \r\n so this would be - * the second \n to denote the end of headers*/ - parser->state = s_headers_almost_done; - goto reexecute_byte; - } - - c = TOKEN(ch); - - if (!c) { - SET_ERRNO(HPE_INVALID_HEADER_TOKEN); - goto error; - } - - MARK(header_field); - - parser->index = 0; - parser->state = s_header_field; - - switch (c) { - case 'c': - parser->header_state = h_C; - break; - - case 'p': - parser->header_state = h_matching_proxy_connection; - break; - - case 't': - parser->header_state = h_matching_transfer_encoding; - break; - - case 'u': - parser->header_state = h_matching_upgrade; - break; - - default: - parser->header_state = h_general; - break; - } - break; - } - - case s_header_field: - { - c = TOKEN(ch); - - if (c) { - switch (parser->header_state) { - case h_general: - break; - - case h_C: - parser->index++; - parser->header_state = (c == 'o' ? h_CO : h_general); - break; - - case h_CO: - parser->index++; - parser->header_state = (c == 'n' ? h_CON : h_general); - break; - - case h_CON: - parser->index++; - switch (c) { - case 'n': - parser->header_state = h_matching_connection; - break; - case 't': - parser->header_state = h_matching_content_length; - break; - default: - parser->header_state = h_general; - break; - } - break; - - /* connection */ - - case h_matching_connection: - parser->index++; - if (parser->index > sizeof(CONNECTION)-1 - || c != CONNECTION[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(CONNECTION)-2) { - parser->header_state = h_connection; - } - break; - - /* proxy-connection */ - - case h_matching_proxy_connection: - parser->index++; - if (parser->index > sizeof(PROXY_CONNECTION)-1 - || c != PROXY_CONNECTION[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(PROXY_CONNECTION)-2) { - parser->header_state = h_connection; - } - break; - - /* content-length */ - - case h_matching_content_length: - parser->index++; - if (parser->index > sizeof(CONTENT_LENGTH)-1 - || c != CONTENT_LENGTH[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(CONTENT_LENGTH)-2) { - parser->header_state = h_content_length; - } - break; - - /* transfer-encoding */ - - case h_matching_transfer_encoding: - parser->index++; - if (parser->index > sizeof(TRANSFER_ENCODING)-1 - || c != TRANSFER_ENCODING[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(TRANSFER_ENCODING)-2) { - parser->header_state = h_transfer_encoding; - } - break; - - /* upgrade */ - - case h_matching_upgrade: - parser->index++; - if (parser->index > sizeof(UPGRADE)-1 - || c != UPGRADE[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(UPGRADE)-2) { - parser->header_state = h_upgrade; - } - break; - - case h_connection: - case h_content_length: - case h_transfer_encoding: - case h_upgrade: - if (ch != ' ') parser->header_state = h_general; - break; - - default: - assert(0 && "Unknown header_state"); - break; - } - break; - } - - if (ch == ':') { - parser->state = s_header_value_start; - CALLBACK_DATA(header_field); - break; - } - - if (ch == CR) { - parser->state = s_header_almost_done; - CALLBACK_DATA(header_field); - break; - } - - if (ch == LF) { - parser->state = s_header_field_start; - CALLBACK_DATA(header_field); - break; - } - - SET_ERRNO(HPE_INVALID_HEADER_TOKEN); - goto error; - } - - case s_header_value_start: - { - if (ch == ' ' || ch == '\t') break; - - MARK(header_value); - - parser->state = s_header_value; - parser->index = 0; - - if (ch == CR) { - parser->header_state = h_general; - parser->state = s_header_almost_done; - CALLBACK_DATA(header_value); - break; - } - - if (ch == LF) { - parser->state = s_header_field_start; - CALLBACK_DATA(header_value); - break; - } - - c = LOWER(ch); - - switch (parser->header_state) { - case h_upgrade: - parser->flags |= F_UPGRADE; - parser->header_state = h_general; - break; - - case h_transfer_encoding: - /* looking for 'Transfer-Encoding: chunked' */ - if ('c' == c) { - parser->header_state = h_matching_transfer_encoding_chunked; - } else { - parser->header_state = h_general; - } - break; - - case h_content_length: - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_CONTENT_LENGTH); - goto error; - } - - parser->content_length = ch - '0'; - break; - - case h_connection: - /* looking for 'Connection: keep-alive' */ - if (c == 'k') { - parser->header_state = h_matching_connection_keep_alive; - /* looking for 'Connection: close' */ - } else if (c == 'c') { - parser->header_state = h_matching_connection_close; - } else { - parser->header_state = h_general; - } - break; - - default: - parser->header_state = h_general; - break; - } - break; - } - - case s_header_value: - { - - if (ch == CR) { - parser->state = s_header_almost_done; - CALLBACK_DATA(header_value); - break; - } - - if (ch == LF) { - parser->state = s_header_almost_done; - CALLBACK_DATA_NOADVANCE(header_value); - goto reexecute_byte; - } - - c = LOWER(ch); - - switch (parser->header_state) { - case h_general: - break; - - case h_connection: - case h_transfer_encoding: - assert(0 && "Shouldn't get here."); - break; - - case h_content_length: - { - uint64_t t; - - if (ch == ' ') break; - - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_CONTENT_LENGTH); - goto error; - } - - t = parser->content_length; - t *= 10; - t += ch - '0'; - - /* Overflow? */ - if (t < parser->content_length || t == ULLONG_MAX) { - SET_ERRNO(HPE_INVALID_CONTENT_LENGTH); - goto error; - } - - parser->content_length = t; - break; - } - - /* Transfer-Encoding: chunked */ - case h_matching_transfer_encoding_chunked: - parser->index++; - if (parser->index > sizeof(CHUNKED)-1 - || c != CHUNKED[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(CHUNKED)-2) { - parser->header_state = h_transfer_encoding_chunked; - } - break; - - /* looking for 'Connection: keep-alive' */ - case h_matching_connection_keep_alive: - parser->index++; - if (parser->index > sizeof(KEEP_ALIVE)-1 - || c != KEEP_ALIVE[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(KEEP_ALIVE)-2) { - parser->header_state = h_connection_keep_alive; - } - break; - - /* looking for 'Connection: close' */ - case h_matching_connection_close: - parser->index++; - if (parser->index > sizeof(CLOSE)-1 || c != CLOSE[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(CLOSE)-2) { - parser->header_state = h_connection_close; - } - break; - - case h_transfer_encoding_chunked: - case h_connection_keep_alive: - case h_connection_close: - if (ch != ' ') parser->header_state = h_general; - break; - - default: - parser->state = s_header_value; - parser->header_state = h_general; - break; - } - break; - } - - case s_header_almost_done: - { - STRICT_CHECK(ch != LF); - - parser->state = s_header_value_lws; - - switch (parser->header_state) { - case h_connection_keep_alive: - parser->flags |= F_CONNECTION_KEEP_ALIVE; - break; - case h_connection_close: - parser->flags |= F_CONNECTION_CLOSE; - break; - case h_transfer_encoding_chunked: - parser->flags |= F_CHUNKED; - break; - default: - break; - } - - break; - } - - case s_header_value_lws: - { - if (ch == ' ' || ch == '\t') - parser->state = s_header_value_start; - else - { - parser->state = s_header_field_start; - goto reexecute_byte; - } - break; - } - - case s_headers_almost_done: - { - STRICT_CHECK(ch != LF); - - if (parser->flags & F_TRAILING) { - /* End of a chunked request */ - parser->state = NEW_MESSAGE(); - CALLBACK_NOTIFY(message_complete); - break; - } - - parser->state = s_headers_done; - - /* Set this here so that on_headers_complete() callbacks can see it */ - parser->upgrade = - (parser->flags & F_UPGRADE || parser->method == HTTP_CONNECT); - - /* Here we call the headers_complete callback. This is somewhat - * different than other callbacks because if the user returns 1, we - * will interpret that as saying that this message has no body. This - * is needed for the annoying case of recieving a response to a HEAD - * request. - * - * We'd like to use CALLBACK_NOTIFY_NOADVANCE() here but we cannot, so - * we have to simulate it by handling a change in errno below. - */ - if (settings->on_headers_complete) { - switch (settings->on_headers_complete(parser)) { - case 0: - break; - - case 1: - parser->flags |= F_SKIPBODY; - break; - - default: - SET_ERRNO(HPE_CB_headers_complete); - return p - data; /* Error */ - } - } - - if (HTTP_PARSER_ERRNO(parser) != HPE_OK) { - return p - data; - } - - goto reexecute_byte; - } - - case s_headers_done: - { - STRICT_CHECK(ch != LF); - - parser->nread = 0; - - /* Exit, the rest of the connect is in a different protocol. */ - if (parser->upgrade) { - parser->state = NEW_MESSAGE(); - CALLBACK_NOTIFY(message_complete); - return (p - data) + 1; - } - - if (parser->flags & F_SKIPBODY) { - parser->state = NEW_MESSAGE(); - CALLBACK_NOTIFY(message_complete); - } else if (parser->flags & F_CHUNKED) { - /* chunked encoding - ignore Content-Length header */ - parser->state = s_chunk_size_start; - } else { - if (parser->content_length == 0) { - /* Content-Length header given but zero: Content-Length: 0\r\n */ - parser->state = NEW_MESSAGE(); - CALLBACK_NOTIFY(message_complete); - } else if (parser->content_length != ULLONG_MAX) { - /* Content-Length header given and non-zero */ - parser->state = s_body_identity; - } else { - if (parser->type == HTTP_REQUEST || - !http_message_needs_eof(parser)) { - /* Assume content-length 0 - read the next */ - parser->state = NEW_MESSAGE(); - CALLBACK_NOTIFY(message_complete); - } else { - /* Read body until EOF */ - parser->state = s_body_identity_eof; - } - } - } - - break; - } - - case s_body_identity: - { - uint64_t to_read = MIN(parser->content_length, - (uint64_t) ((data + len) - p)); - - assert(parser->content_length != 0 - && parser->content_length != ULLONG_MAX); - - /* The difference between advancing content_length and p is because - * the latter will automaticaly advance on the next loop iteration. - * Further, if content_length ends up at 0, we want to see the last - * byte again for our message complete callback. - */ - MARK(body); - parser->content_length -= to_read; - p += to_read - 1; - - if (parser->content_length == 0) { - parser->state = s_message_done; - - /* Mimic CALLBACK_DATA_NOADVANCE() but with one extra byte. - * - * The alternative to doing this is to wait for the next byte to - * trigger the data callback, just as in every other case. The - * problem with this is that this makes it difficult for the test - * harness to distinguish between complete-on-EOF and - * complete-on-length. It's not clear that this distinction is - * important for applications, but let's keep it for now. - */ - CALLBACK_DATA_(body, p - body_mark + 1, p - data); - goto reexecute_byte; - } - - break; - } - - /* read until EOF */ - case s_body_identity_eof: - MARK(body); - p = data + len - 1; - - break; - - case s_message_done: - parser->state = NEW_MESSAGE(); - CALLBACK_NOTIFY(message_complete); - break; - - case s_chunk_size_start: - { - assert(parser->nread == 1); - assert(parser->flags & F_CHUNKED); - - unhex_val = unhex[(unsigned char)ch]; - if (unhex_val == -1) { - SET_ERRNO(HPE_INVALID_CHUNK_SIZE); - goto error; - } - - parser->content_length = unhex_val; - parser->state = s_chunk_size; - break; - } - - case s_chunk_size: - { - uint64_t t; - - assert(parser->flags & F_CHUNKED); - - if (ch == CR) { - parser->state = s_chunk_size_almost_done; - break; - } - - unhex_val = unhex[(unsigned char)ch]; - - if (unhex_val == -1) { - if (ch == ';' || ch == ' ') { - parser->state = s_chunk_parameters; - break; - } - - SET_ERRNO(HPE_INVALID_CHUNK_SIZE); - goto error; - } - - t = parser->content_length; - t *= 16; - t += unhex_val; - - /* Overflow? */ - if (t < parser->content_length || t == ULLONG_MAX) { - SET_ERRNO(HPE_INVALID_CONTENT_LENGTH); - goto error; - } - - parser->content_length = t; - break; - } - - case s_chunk_parameters: - { - assert(parser->flags & F_CHUNKED); - /* just ignore this shit. TODO check for overflow */ - if (ch == CR) { - parser->state = s_chunk_size_almost_done; - break; - } - break; - } - - case s_chunk_size_almost_done: - { - assert(parser->flags & F_CHUNKED); - STRICT_CHECK(ch != LF); - - parser->nread = 0; - - if (parser->content_length == 0) { - parser->flags |= F_TRAILING; - parser->state = s_header_field_start; - } else { - parser->state = s_chunk_data; - } - break; - } - - case s_chunk_data: - { - uint64_t to_read = MIN(parser->content_length, - (uint64_t) ((data + len) - p)); - - assert(parser->flags & F_CHUNKED); - assert(parser->content_length != 0 - && parser->content_length != ULLONG_MAX); - - /* See the explanation in s_body_identity for why the content - * length and data pointers are managed this way. - */ - MARK(body); - parser->content_length -= to_read; - p += to_read - 1; - - if (parser->content_length == 0) { - parser->state = s_chunk_data_almost_done; - } - - break; - } - - case s_chunk_data_almost_done: - assert(parser->flags & F_CHUNKED); - assert(parser->content_length == 0); - STRICT_CHECK(ch != CR); - parser->state = s_chunk_data_done; - CALLBACK_DATA(body); - break; - - case s_chunk_data_done: - assert(parser->flags & F_CHUNKED); - STRICT_CHECK(ch != LF); - parser->nread = 0; - parser->state = s_chunk_size_start; - break; - - default: - assert(0 && "unhandled state"); - SET_ERRNO(HPE_INVALID_INTERNAL_STATE); - goto error; - } - } - - /* Run callbacks for any marks that we have leftover after we ran our of - * bytes. There should be at most one of these set, so it's OK to invoke - * them in series (unset marks will not result in callbacks). - * - * We use the NOADVANCE() variety of callbacks here because 'p' has already - * overflowed 'data' and this allows us to correct for the off-by-one that - * we'd otherwise have (since CALLBACK_DATA() is meant to be run with a 'p' - * value that's in-bounds). - */ - - assert(((header_field_mark ? 1 : 0) + - (header_value_mark ? 1 : 0) + - (url_mark ? 1 : 0) + - (body_mark ? 1 : 0)) <= 1); - - CALLBACK_DATA_NOADVANCE(header_field); - CALLBACK_DATA_NOADVANCE(header_value); - CALLBACK_DATA_NOADVANCE(url); - CALLBACK_DATA_NOADVANCE(body); - - return len; - -error: - if (HTTP_PARSER_ERRNO(parser) == HPE_OK) { - SET_ERRNO(HPE_UNKNOWN); - } - - return (p - data); -} - - -/* Does the parser need to see an EOF to find the end of the message? */ -int -http_message_needs_eof (http_parser *parser) -{ - if (parser->type == HTTP_REQUEST) { - return 0; - } - - /* See RFC 2616 section 4.4 */ - if (parser->status_code / 100 == 1 || /* 1xx e.g. Continue */ - parser->status_code == 204 || /* No Content */ - parser->status_code == 304 || /* Not Modified */ - parser->flags & F_SKIPBODY) { /* response to a HEAD request */ - return 0; - } - - if ((parser->flags & F_CHUNKED) || parser->content_length != ULLONG_MAX) { - return 0; - } - - return 1; -} - - -int -http_should_keep_alive (http_parser *parser) -{ - if (parser->http_major > 0 && parser->http_minor > 0) { - /* HTTP/1.1 */ - if (parser->flags & F_CONNECTION_CLOSE) { - return 0; - } - } else { - /* HTTP/1.0 or earlier */ - if (!(parser->flags & F_CONNECTION_KEEP_ALIVE)) { - return 0; - } - } - - return !http_message_needs_eof(parser); -} - - -const char * http_method_str (enum http_method m) -{ - return method_strings[m]; -} - - -void -http_parser_init (http_parser *parser, enum http_parser_type t) -{ - void *data = parser->data; /* preserve application data */ - memset(parser, 0, sizeof(*parser)); - parser->data = data; - parser->type = t; - parser->state = (t == HTTP_REQUEST ? s_start_req : (t == HTTP_RESPONSE ? s_start_res : s_start_req_or_res)); - parser->http_errno = HPE_OK; -} - -const char * -http_errno_name(enum http_errno err) { - assert(err < (sizeof(http_strerror_tab)/sizeof(http_strerror_tab[0]))); - return http_strerror_tab[err].name; -} - -const char * -http_errno_description(enum http_errno err) { - assert(err < (sizeof(http_strerror_tab)/sizeof(http_strerror_tab[0]))); - return http_strerror_tab[err].description; -} - -int -http_parser_parse_url(const char *buf, size_t buflen, int is_connect, - struct http_parser_url *u) -{ - enum state s; - const char *p; - enum http_parser_url_fields uf, old_uf; - - u->port = u->field_set = 0; - s = is_connect ? s_req_host_start : s_req_spaces_before_url; - uf = old_uf = UF_MAX; - - for (p = buf; p < buf + buflen; p++) { - s = parse_url_char(s, *p); - - /* Figure out the next field that we're operating on */ - switch (s) { - case s_dead: - return 1; - - /* Skip delimeters */ - case s_req_schema_slash: - case s_req_schema_slash_slash: - case s_req_host_start: - case s_req_host_v6_start: - case s_req_host_v6_end: - case s_req_port_start: - case s_req_query_string_start: - case s_req_fragment_start: - continue; - - case s_req_schema: - uf = UF_SCHEMA; - break; - - case s_req_host: - case s_req_host_v6: - uf = UF_HOST; - break; - - case s_req_port: - uf = UF_PORT; - break; - - case s_req_path: - uf = UF_PATH; - break; - - case s_req_query_string: - uf = UF_QUERY; - break; - - case s_req_fragment: - uf = UF_FRAGMENT; - break; - - default: - assert(!"Unexpected state"); - return 1; - } - - /* Nothing's changed; soldier on */ - if (uf == old_uf) { - u->field_data[uf].len++; - continue; - } - - u->field_data[uf].off = p - buf; - u->field_data[uf].len = 1; - - u->field_set |= (1 << uf); - old_uf = uf; - } - - /* CONNECT requests can only contain "hostname:port" */ - if (is_connect && u->field_set != ((1 << UF_HOST)|(1 << UF_PORT))) { - return 1; - } - - /* Make sure we don't end somewhere unexpected */ - switch (s) { - case s_req_host_v6_start: - case s_req_host_v6: - case s_req_host_v6_end: - case s_req_host: - case s_req_port_start: - return 1; - default: - break; - } - - if (u->field_set & (1 << UF_PORT)) { - /* Don't bother with endp; we've already validated the string */ - unsigned long v = strtoul(buf + u->field_data[UF_PORT].off, NULL, 10); - - /* Ports have a max value of 2^16 */ - if (v > 0xffff) { - return 1; - } - - u->port = (uint16_t) v; - } - - return 0; -} - -void -http_parser_pause(http_parser *parser, int paused) { - /* Users should only be pausing/unpausing a parser that is not in an error - * state. In non-debug builds, there's not much that we can do about this - * other than ignore it. - */ - if (HTTP_PARSER_ERRNO(parser) == HPE_OK || - HTTP_PARSER_ERRNO(parser) == HPE_PAUSED) { - SET_ERRNO((paused) ? HPE_PAUSED : HPE_OK); - } else { - assert(0 && "Attempting to pause parser in error state"); - } -} diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/http_parser.gyp b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/http_parser.gyp deleted file mode 100644 index c6eada7..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/http_parser.gyp +++ /dev/null @@ -1,79 +0,0 @@ -# This file is used with the GYP meta build system. -# http://code.google.com/p/gyp/ -# To build try this: -# svn co http://gyp.googlecode.com/svn/trunk gyp -# ./gyp/gyp -f make --depth=`pwd` http_parser.gyp -# ./out/Debug/test -{ - 'target_defaults': { - 'default_configuration': 'Debug', - 'configurations': { - # TODO: hoist these out and put them somewhere common, because - # RuntimeLibrary MUST MATCH across the entire project - 'Debug': { - 'defines': [ 'DEBUG', '_DEBUG' ], - 'msvs_settings': { - 'VCCLCompilerTool': { - 'RuntimeLibrary': 1, # static debug - }, - }, - }, - 'Release': { - 'defines': [ 'NDEBUG' ], - 'msvs_settings': { - 'VCCLCompilerTool': { - 'RuntimeLibrary': 0, # static release - }, - }, - } - }, - 'msvs_settings': { - 'VCCLCompilerTool': { - }, - 'VCLibrarianTool': { - }, - 'VCLinkerTool': { - 'GenerateDebugInformation': 'true', - }, - }, - 'conditions': [ - ['OS == "win"', { - 'defines': [ - 'WIN32' - ], - }] - ], - }, - - 'targets': [ - { - 'target_name': 'http_parser', - 'type': 'static_library', - 'include_dirs': [ '.' ], - 'direct_dependent_settings': { - 'include_dirs': [ '.' ], - }, - 'defines': [ 'HTTP_PARSER_STRICT=0' ], - 'sources': [ './http_parser.c', ], - 'conditions': [ - ['OS=="win"', { - 'msvs_settings': { - 'VCCLCompilerTool': { - # Compile as C++. http_parser.c is actually C99, but C++ is - # close enough in this case. - 'CompileAs': 2, - }, - }, - }] - ], - }, - - { - 'target_name': 'test', - 'type': 'executable', - 'dependencies': [ 'http_parser' ], - 'sources': [ 'test.c' ] - } - ] -} - diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/http_parser.h b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/http_parser.h deleted file mode 100644 index 78b3701..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/http_parser.h +++ /dev/null @@ -1,312 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ -#ifndef http_parser_h -#define http_parser_h -#ifdef __cplusplus -extern "C" { -#endif - -#define HTTP_PARSER_VERSION_MAJOR 1 -#define HTTP_PARSER_VERSION_MINOR 0 - -#include -#if defined(_WIN32) && !defined(__MINGW32__) && (!defined(_MSC_VER) || _MSC_VER<1600) -typedef __int8 int8_t; -typedef unsigned __int8 uint8_t; -typedef __int16 int16_t; -typedef unsigned __int16 uint16_t; -typedef __int32 int32_t; -typedef unsigned __int32 uint32_t; -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; - -typedef unsigned int size_t; -typedef int ssize_t; -#else -#include -#endif - -/* Compile with -DHTTP_PARSER_STRICT=0 to make less checks, but run - * faster - */ -#ifndef HTTP_PARSER_STRICT -# define HTTP_PARSER_STRICT 1 -#endif - -/* Compile with -DHTTP_PARSER_DEBUG=1 to add extra debugging information to - * the error reporting facility. - */ -#ifndef HTTP_PARSER_DEBUG -# define HTTP_PARSER_DEBUG 0 -#endif - - -/* Maximium header size allowed */ -#define HTTP_MAX_HEADER_SIZE (80*1024) - - -typedef struct http_parser http_parser; -typedef struct http_parser_settings http_parser_settings; -typedef struct http_parser_result http_parser_result; - - -/* Callbacks should return non-zero to indicate an error. The parser will - * then halt execution. - * - * The one exception is on_headers_complete. In a HTTP_RESPONSE parser - * returning '1' from on_headers_complete will tell the parser that it - * should not expect a body. This is used when receiving a response to a - * HEAD request which may contain 'Content-Length' or 'Transfer-Encoding: - * chunked' headers that indicate the presence of a body. - * - * http_data_cb does not return data chunks. It will be call arbitrarally - * many times for each string. E.G. you might get 10 callbacks for "on_path" - * each providing just a few characters more data. - */ -typedef int (*http_data_cb) (http_parser*, const char *at, size_t length); -typedef int (*http_cb) (http_parser*); - - -/* Request Methods */ -enum http_method - { HTTP_DELETE = 0 - , HTTP_GET - , HTTP_HEAD - , HTTP_POST - , HTTP_PUT - /* pathological */ - , HTTP_CONNECT - , HTTP_OPTIONS - , HTTP_TRACE - /* webdav */ - , HTTP_COPY - , HTTP_LOCK - , HTTP_MKCOL - , HTTP_MOVE - , HTTP_PROPFIND - , HTTP_PROPPATCH - , HTTP_UNLOCK - /* subversion */ - , HTTP_REPORT - , HTTP_MKACTIVITY - , HTTP_CHECKOUT - , HTTP_MERGE - /* upnp */ - , HTTP_MSEARCH - , HTTP_NOTIFY - , HTTP_SUBSCRIBE - , HTTP_UNSUBSCRIBE - /* RFC-5789 */ - , HTTP_PATCH - , HTTP_PURGE - }; - - -enum http_parser_type { HTTP_REQUEST, HTTP_RESPONSE, HTTP_BOTH }; - - -/* Flag values for http_parser.flags field */ -enum flags - { F_CHUNKED = 1 << 0 - , F_CONNECTION_KEEP_ALIVE = 1 << 1 - , F_CONNECTION_CLOSE = 1 << 2 - , F_TRAILING = 1 << 3 - , F_UPGRADE = 1 << 4 - , F_SKIPBODY = 1 << 5 - }; - - -/* Map for errno-related constants - * - * The provided argument should be a macro that takes 2 arguments. - */ -#define HTTP_ERRNO_MAP(XX) \ - /* No error */ \ - XX(OK, "success") \ - \ - /* Callback-related errors */ \ - XX(CB_message_begin, "the on_message_begin callback failed") \ - XX(CB_url, "the on_url callback failed") \ - XX(CB_header_field, "the on_header_field callback failed") \ - XX(CB_header_value, "the on_header_value callback failed") \ - XX(CB_headers_complete, "the on_headers_complete callback failed") \ - XX(CB_body, "the on_body callback failed") \ - XX(CB_message_complete, "the on_message_complete callback failed") \ - \ - /* Parsing-related errors */ \ - XX(INVALID_EOF_STATE, "stream ended at an unexpected time") \ - XX(HEADER_OVERFLOW, \ - "too many header bytes seen; overflow detected") \ - XX(CLOSED_CONNECTION, \ - "data received after completed connection: close message") \ - XX(INVALID_VERSION, "invalid HTTP version") \ - XX(INVALID_STATUS, "invalid HTTP status code") \ - XX(INVALID_METHOD, "invalid HTTP method") \ - XX(INVALID_URL, "invalid URL") \ - XX(INVALID_HOST, "invalid host") \ - XX(INVALID_PORT, "invalid port") \ - XX(INVALID_PATH, "invalid path") \ - XX(INVALID_QUERY_STRING, "invalid query string") \ - XX(INVALID_FRAGMENT, "invalid fragment") \ - XX(LF_EXPECTED, "LF character expected") \ - XX(INVALID_HEADER_TOKEN, "invalid character in header") \ - XX(INVALID_CONTENT_LENGTH, \ - "invalid character in content-length header") \ - XX(INVALID_CHUNK_SIZE, \ - "invalid character in chunk size header") \ - XX(INVALID_CONSTANT, "invalid constant string") \ - XX(INVALID_INTERNAL_STATE, "encountered unexpected internal state")\ - XX(STRICT, "strict mode assertion failed") \ - XX(PAUSED, "parser is paused") \ - XX(UNKNOWN, "an unknown error occurred") - - -/* Define HPE_* values for each errno value above */ -#define HTTP_ERRNO_GEN(n, s) HPE_##n, -enum http_errno { - HTTP_ERRNO_MAP(HTTP_ERRNO_GEN) -}; -#undef HTTP_ERRNO_GEN - - -/* Get an http_errno value from an http_parser */ -#define HTTP_PARSER_ERRNO(p) ((enum http_errno) (p)->http_errno) - -/* Get the line number that generated the current error */ -#if HTTP_PARSER_DEBUG -#define HTTP_PARSER_ERRNO_LINE(p) ((p)->error_lineno) -#else -#define HTTP_PARSER_ERRNO_LINE(p) 0 -#endif - - -struct http_parser { - /** PRIVATE **/ - unsigned char type : 2; /* enum http_parser_type */ - unsigned char flags : 6; /* F_* values from 'flags' enum; semi-public */ - unsigned char state; /* enum state from http_parser.c */ - unsigned char header_state; /* enum header_state from http_parser.c */ - unsigned char index; /* index into current matcher */ - - uint32_t nread; /* # bytes read in various scenarios */ - uint64_t content_length; /* # bytes in body (0 if no Content-Length header) */ - - /** READ-ONLY **/ - unsigned short http_major; - unsigned short http_minor; - unsigned short status_code; /* responses only */ - unsigned char method; /* requests only */ - unsigned char http_errno : 7; - - /* 1 = Upgrade header was present and the parser has exited because of that. - * 0 = No upgrade header present. - * Should be checked when http_parser_execute() returns in addition to - * error checking. - */ - unsigned char upgrade : 1; - -#if HTTP_PARSER_DEBUG - uint32_t error_lineno; -#endif - - /** PUBLIC **/ - void *data; /* A pointer to get hook to the "connection" or "socket" object */ -}; - - -struct http_parser_settings { - http_cb on_message_begin; - http_data_cb on_url; - http_data_cb on_header_field; - http_data_cb on_header_value; - http_cb on_headers_complete; - http_data_cb on_body; - http_cb on_message_complete; -}; - - -enum http_parser_url_fields - { UF_SCHEMA = 0 - , UF_HOST = 1 - , UF_PORT = 2 - , UF_PATH = 3 - , UF_QUERY = 4 - , UF_FRAGMENT = 5 - , UF_MAX = 6 - }; - - -/* Result structure for http_parser_parse_url(). - * - * Callers should index into field_data[] with UF_* values iff field_set - * has the relevant (1 << UF_*) bit set. As a courtesy to clients (and - * because we probably have padding left over), we convert any port to - * a uint16_t. - */ -struct http_parser_url { - uint16_t field_set; /* Bitmask of (1 << UF_*) values */ - uint16_t port; /* Converted UF_PORT string */ - - struct { - uint16_t off; /* Offset into buffer in which field starts */ - uint16_t len; /* Length of run in buffer */ - } field_data[UF_MAX]; -}; - - -void http_parser_init(http_parser *parser, enum http_parser_type type); - - -size_t http_parser_execute(http_parser *parser, - const http_parser_settings *settings, - const char *data, - size_t len); - - -/* If http_should_keep_alive() in the on_headers_complete or - * on_message_complete callback returns true, then this will be should be - * the last message on the connection. - * If you are the server, respond with the "Connection: close" header. - * If you are the client, close the connection. - */ -int http_should_keep_alive(http_parser *parser); - -/* Returns a string version of the HTTP method. */ -const char *http_method_str(enum http_method m); - -/* Return a string name of the given error */ -const char *http_errno_name(enum http_errno err); - -/* Return a string description of the given error */ -const char *http_errno_description(enum http_errno err); - -/* Parse a URL; return nonzero on failure */ -int http_parser_parse_url(const char *buf, size_t buflen, - int is_connect, - struct http_parser_url *u); - -/* Pause or un-pause the parser; a nonzero value pauses */ -void http_parser_pause(http_parser *parser, int paused); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/test.c b/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/test.c deleted file mode 100644 index 184ba24..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/test.c +++ /dev/null @@ -1,2876 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ -#include "http_parser.h" -#include -#include -#include -#include /* rand */ -#include -#include - -#undef TRUE -#define TRUE 1 -#undef FALSE -#define FALSE 0 - -#define MAX_HEADERS 13 -#define MAX_ELEMENT_SIZE 500 - -#define MIN(a,b) ((a) < (b) ? (a) : (b)) - -static http_parser *parser; - -struct message { - const char *name; // for debugging purposes - const char *raw; - enum http_parser_type type; - enum http_method method; - int status_code; - char request_path[MAX_ELEMENT_SIZE]; - char request_url[MAX_ELEMENT_SIZE]; - char fragment[MAX_ELEMENT_SIZE]; - char query_string[MAX_ELEMENT_SIZE]; - char body[MAX_ELEMENT_SIZE]; - size_t body_size; - uint16_t port; - int num_headers; - enum { NONE=0, FIELD, VALUE } last_header_element; - char headers [MAX_HEADERS][2][MAX_ELEMENT_SIZE]; - int should_keep_alive; - - const char *upgrade; // upgraded body - - unsigned short http_major; - unsigned short http_minor; - - int message_begin_cb_called; - int headers_complete_cb_called; - int message_complete_cb_called; - int message_complete_on_eof; -}; - -static int currently_parsing_eof; - -static struct message messages[5]; -static int num_messages; -static http_parser_settings *current_pause_parser; - -/* * R E Q U E S T S * */ -const struct message requests[] = -#define CURL_GET 0 -{ {.name= "curl get" - ,.type= HTTP_REQUEST - ,.raw= "GET /test HTTP/1.1\r\n" - "User-Agent: curl/7.18.0 (i486-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.1\r\n" - "Host: 0.0.0.0=5000\r\n" - "Accept: */*\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/test" - ,.request_url= "/test" - ,.num_headers= 3 - ,.headers= - { { "User-Agent", "curl/7.18.0 (i486-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.1" } - , { "Host", "0.0.0.0=5000" } - , { "Accept", "*/*" } - } - ,.body= "" - } - -#define FIREFOX_GET 1 -, {.name= "firefox get" - ,.type= HTTP_REQUEST - ,.raw= "GET /favicon.ico HTTP/1.1\r\n" - "Host: 0.0.0.0=5000\r\n" - "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008061015 Firefox/3.0\r\n" - "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n" - "Accept-Language: en-us,en;q=0.5\r\n" - "Accept-Encoding: gzip,deflate\r\n" - "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n" - "Keep-Alive: 300\r\n" - "Connection: keep-alive\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/favicon.ico" - ,.request_url= "/favicon.ico" - ,.num_headers= 8 - ,.headers= - { { "Host", "0.0.0.0=5000" } - , { "User-Agent", "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008061015 Firefox/3.0" } - , { "Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" } - , { "Accept-Language", "en-us,en;q=0.5" } - , { "Accept-Encoding", "gzip,deflate" } - , { "Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.7" } - , { "Keep-Alive", "300" } - , { "Connection", "keep-alive" } - } - ,.body= "" - } - -#define DUMBFUCK 2 -, {.name= "dumbfuck" - ,.type= HTTP_REQUEST - ,.raw= "GET /dumbfuck HTTP/1.1\r\n" - "aaaaaaaaaaaaa:++++++++++\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/dumbfuck" - ,.request_url= "/dumbfuck" - ,.num_headers= 1 - ,.headers= - { { "aaaaaaaaaaaaa", "++++++++++" } - } - ,.body= "" - } - -#define FRAGMENT_IN_URI 3 -, {.name= "fragment in url" - ,.type= HTTP_REQUEST - ,.raw= "GET /forums/1/topics/2375?page=1#posts-17408 HTTP/1.1\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "page=1" - ,.fragment= "posts-17408" - ,.request_path= "/forums/1/topics/2375" - /* XXX request url does include fragment? */ - ,.request_url= "/forums/1/topics/2375?page=1#posts-17408" - ,.num_headers= 0 - ,.body= "" - } - -#define GET_NO_HEADERS_NO_BODY 4 -, {.name= "get no headers no body" - ,.type= HTTP_REQUEST - ,.raw= "GET /get_no_headers_no_body/world HTTP/1.1\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE /* would need Connection: close */ - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/get_no_headers_no_body/world" - ,.request_url= "/get_no_headers_no_body/world" - ,.num_headers= 0 - ,.body= "" - } - -#define GET_ONE_HEADER_NO_BODY 5 -, {.name= "get one header no body" - ,.type= HTTP_REQUEST - ,.raw= "GET /get_one_header_no_body HTTP/1.1\r\n" - "Accept: */*\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE /* would need Connection: close */ - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/get_one_header_no_body" - ,.request_url= "/get_one_header_no_body" - ,.num_headers= 1 - ,.headers= - { { "Accept" , "*/*" } - } - ,.body= "" - } - -#define GET_FUNKY_CONTENT_LENGTH 6 -, {.name= "get funky content length body hello" - ,.type= HTTP_REQUEST - ,.raw= "GET /get_funky_content_length_body_hello HTTP/1.0\r\n" - "conTENT-Length: 5\r\n" - "\r\n" - "HELLO" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 0 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/get_funky_content_length_body_hello" - ,.request_url= "/get_funky_content_length_body_hello" - ,.num_headers= 1 - ,.headers= - { { "conTENT-Length" , "5" } - } - ,.body= "HELLO" - } - -#define POST_IDENTITY_BODY_WORLD 7 -, {.name= "post identity body world" - ,.type= HTTP_REQUEST - ,.raw= "POST /post_identity_body_world?q=search#hey HTTP/1.1\r\n" - "Accept: */*\r\n" - "Transfer-Encoding: identity\r\n" - "Content-Length: 5\r\n" - "\r\n" - "World" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_POST - ,.query_string= "q=search" - ,.fragment= "hey" - ,.request_path= "/post_identity_body_world" - ,.request_url= "/post_identity_body_world?q=search#hey" - ,.num_headers= 3 - ,.headers= - { { "Accept", "*/*" } - , { "Transfer-Encoding", "identity" } - , { "Content-Length", "5" } - } - ,.body= "World" - } - -#define POST_CHUNKED_ALL_YOUR_BASE 8 -, {.name= "post - chunked body: all your base are belong to us" - ,.type= HTTP_REQUEST - ,.raw= "POST /post_chunked_all_your_base HTTP/1.1\r\n" - "Transfer-Encoding: chunked\r\n" - "\r\n" - "1e\r\nall your base are belong to us\r\n" - "0\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_POST - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/post_chunked_all_your_base" - ,.request_url= "/post_chunked_all_your_base" - ,.num_headers= 1 - ,.headers= - { { "Transfer-Encoding" , "chunked" } - } - ,.body= "all your base are belong to us" - } - -#define TWO_CHUNKS_MULT_ZERO_END 9 -, {.name= "two chunks ; triple zero ending" - ,.type= HTTP_REQUEST - ,.raw= "POST /two_chunks_mult_zero_end HTTP/1.1\r\n" - "Transfer-Encoding: chunked\r\n" - "\r\n" - "5\r\nhello\r\n" - "6\r\n world\r\n" - "000\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_POST - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/two_chunks_mult_zero_end" - ,.request_url= "/two_chunks_mult_zero_end" - ,.num_headers= 1 - ,.headers= - { { "Transfer-Encoding", "chunked" } - } - ,.body= "hello world" - } - -#define CHUNKED_W_TRAILING_HEADERS 10 -, {.name= "chunked with trailing headers. blech." - ,.type= HTTP_REQUEST - ,.raw= "POST /chunked_w_trailing_headers HTTP/1.1\r\n" - "Transfer-Encoding: chunked\r\n" - "\r\n" - "5\r\nhello\r\n" - "6\r\n world\r\n" - "0\r\n" - "Vary: *\r\n" - "Content-Type: text/plain\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_POST - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/chunked_w_trailing_headers" - ,.request_url= "/chunked_w_trailing_headers" - ,.num_headers= 3 - ,.headers= - { { "Transfer-Encoding", "chunked" } - , { "Vary", "*" } - , { "Content-Type", "text/plain" } - } - ,.body= "hello world" - } - -#define CHUNKED_W_BULLSHIT_AFTER_LENGTH 11 -, {.name= "with bullshit after the length" - ,.type= HTTP_REQUEST - ,.raw= "POST /chunked_w_bullshit_after_length HTTP/1.1\r\n" - "Transfer-Encoding: chunked\r\n" - "\r\n" - "5; ihatew3;whatthefuck=aretheseparametersfor\r\nhello\r\n" - "6; blahblah; blah\r\n world\r\n" - "0\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_POST - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/chunked_w_bullshit_after_length" - ,.request_url= "/chunked_w_bullshit_after_length" - ,.num_headers= 1 - ,.headers= - { { "Transfer-Encoding", "chunked" } - } - ,.body= "hello world" - } - -#define WITH_QUOTES 12 -, {.name= "with quotes" - ,.type= HTTP_REQUEST - ,.raw= "GET /with_\"stupid\"_quotes?foo=\"bar\" HTTP/1.1\r\n\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "foo=\"bar\"" - ,.fragment= "" - ,.request_path= "/with_\"stupid\"_quotes" - ,.request_url= "/with_\"stupid\"_quotes?foo=\"bar\"" - ,.num_headers= 0 - ,.headers= { } - ,.body= "" - } - -#define APACHEBENCH_GET 13 -/* The server receiving this request SHOULD NOT wait for EOF - * to know that content-length == 0. - * How to represent this in a unit test? message_complete_on_eof - * Compare with NO_CONTENT_LENGTH_RESPONSE. - */ -, {.name = "apachebench get" - ,.type= HTTP_REQUEST - ,.raw= "GET /test HTTP/1.0\r\n" - "Host: 0.0.0.0:5000\r\n" - "User-Agent: ApacheBench/2.3\r\n" - "Accept: */*\r\n\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 0 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/test" - ,.request_url= "/test" - ,.num_headers= 3 - ,.headers= { { "Host", "0.0.0.0:5000" } - , { "User-Agent", "ApacheBench/2.3" } - , { "Accept", "*/*" } - } - ,.body= "" - } - -#define QUERY_URL_WITH_QUESTION_MARK_GET 14 -/* Some clients include '?' characters in query strings. - */ -, {.name = "query url with question mark" - ,.type= HTTP_REQUEST - ,.raw= "GET /test.cgi?foo=bar?baz HTTP/1.1\r\n\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "foo=bar?baz" - ,.fragment= "" - ,.request_path= "/test.cgi" - ,.request_url= "/test.cgi?foo=bar?baz" - ,.num_headers= 0 - ,.headers= {} - ,.body= "" - } - -#define PREFIX_NEWLINE_GET 15 -/* Some clients, especially after a POST in a keep-alive connection, - * will send an extra CRLF before the next request - */ -, {.name = "newline prefix get" - ,.type= HTTP_REQUEST - ,.raw= "\r\nGET /test HTTP/1.1\r\n\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/test" - ,.request_url= "/test" - ,.num_headers= 0 - ,.headers= { } - ,.body= "" - } - -#define UPGRADE_REQUEST 16 -, {.name = "upgrade request" - ,.type= HTTP_REQUEST - ,.raw= "GET /demo HTTP/1.1\r\n" - "Host: example.com\r\n" - "Connection: Upgrade\r\n" - "Sec-WebSocket-Key2: 12998 5 Y3 1 .P00\r\n" - "Sec-WebSocket-Protocol: sample\r\n" - "Upgrade: WebSocket\r\n" - "Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5\r\n" - "Origin: http://example.com\r\n" - "\r\n" - "Hot diggity dogg" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/demo" - ,.request_url= "/demo" - ,.num_headers= 7 - ,.upgrade="Hot diggity dogg" - ,.headers= { { "Host", "example.com" } - , { "Connection", "Upgrade" } - , { "Sec-WebSocket-Key2", "12998 5 Y3 1 .P00" } - , { "Sec-WebSocket-Protocol", "sample" } - , { "Upgrade", "WebSocket" } - , { "Sec-WebSocket-Key1", "4 @1 46546xW%0l 1 5" } - , { "Origin", "http://example.com" } - } - ,.body= "" - } - -#define CONNECT_REQUEST 17 -, {.name = "connect request" - ,.type= HTTP_REQUEST - ,.raw= "CONNECT 0-home0.netscape.com:443 HTTP/1.0\r\n" - "User-agent: Mozilla/1.1N\r\n" - "Proxy-authorization: basic aGVsbG86d29ybGQ=\r\n" - "\r\n" - "some data\r\n" - "and yet even more data" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 0 - ,.method= HTTP_CONNECT - ,.query_string= "" - ,.fragment= "" - ,.request_path= "" - ,.request_url= "0-home0.netscape.com:443" - ,.num_headers= 2 - ,.upgrade="some data\r\nand yet even more data" - ,.headers= { { "User-agent", "Mozilla/1.1N" } - , { "Proxy-authorization", "basic aGVsbG86d29ybGQ=" } - } - ,.body= "" - } - -#define REPORT_REQ 18 -, {.name= "report request" - ,.type= HTTP_REQUEST - ,.raw= "REPORT /test HTTP/1.1\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_REPORT - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/test" - ,.request_url= "/test" - ,.num_headers= 0 - ,.headers= {} - ,.body= "" - } - -#define NO_HTTP_VERSION 19 -, {.name= "request with no http version" - ,.type= HTTP_REQUEST - ,.raw= "GET /\r\n" - "\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 0 - ,.http_minor= 9 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/" - ,.request_url= "/" - ,.num_headers= 0 - ,.headers= {} - ,.body= "" - } - -#define MSEARCH_REQ 20 -, {.name= "m-search request" - ,.type= HTTP_REQUEST - ,.raw= "M-SEARCH * HTTP/1.1\r\n" - "HOST: 239.255.255.250:1900\r\n" - "MAN: \"ssdp:discover\"\r\n" - "ST: \"ssdp:all\"\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_MSEARCH - ,.query_string= "" - ,.fragment= "" - ,.request_path= "*" - ,.request_url= "*" - ,.num_headers= 3 - ,.headers= { { "HOST", "239.255.255.250:1900" } - , { "MAN", "\"ssdp:discover\"" } - , { "ST", "\"ssdp:all\"" } - } - ,.body= "" - } - -#define LINE_FOLDING_IN_HEADER 20 -, {.name= "line folding in header value" - ,.type= HTTP_REQUEST - ,.raw= "GET / HTTP/1.1\r\n" - "Line1: abc\r\n" - "\tdef\r\n" - " ghi\r\n" - "\t\tjkl\r\n" - " mno \r\n" - "\t \tqrs\r\n" - "Line2: \t line2\t\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/" - ,.request_url= "/" - ,.num_headers= 2 - ,.headers= { { "Line1", "abcdefghijklmno qrs" } - , { "Line2", "line2\t" } - } - ,.body= "" - } - - -#define QUERY_TERMINATED_HOST 21 -, {.name= "host terminated by a query string" - ,.type= HTTP_REQUEST - ,.raw= "GET http://hypnotoad.org?hail=all HTTP/1.1\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "hail=all" - ,.fragment= "" - ,.request_path= "" - ,.request_url= "http://hypnotoad.org?hail=all" - ,.num_headers= 0 - ,.headers= { } - ,.body= "" - } - -#define QUERY_TERMINATED_HOSTPORT 22 -, {.name= "host:port terminated by a query string" - ,.type= HTTP_REQUEST - ,.raw= "GET http://hypnotoad.org:1234?hail=all HTTP/1.1\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "hail=all" - ,.fragment= "" - ,.request_path= "" - ,.request_url= "http://hypnotoad.org:1234?hail=all" - ,.port= 1234 - ,.num_headers= 0 - ,.headers= { } - ,.body= "" - } - -#define SPACE_TERMINATED_HOSTPORT 23 -, {.name= "host:port terminated by a space" - ,.type= HTTP_REQUEST - ,.raw= "GET http://hypnotoad.org:1234 HTTP/1.1\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "" - ,.fragment= "" - ,.request_path= "" - ,.request_url= "http://hypnotoad.org:1234" - ,.port= 1234 - ,.num_headers= 0 - ,.headers= { } - ,.body= "" - } - -#define PATCH_REQ 24 -, {.name = "PATCH request" - ,.type= HTTP_REQUEST - ,.raw= "PATCH /file.txt HTTP/1.1\r\n" - "Host: www.example.com\r\n" - "Content-Type: application/example\r\n" - "If-Match: \"e0023aa4e\"\r\n" - "Content-Length: 10\r\n" - "\r\n" - "cccccccccc" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_PATCH - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/file.txt" - ,.request_url= "/file.txt" - ,.num_headers= 4 - ,.headers= { { "Host", "www.example.com" } - , { "Content-Type", "application/example" } - , { "If-Match", "\"e0023aa4e\"" } - , { "Content-Length", "10" } - } - ,.body= "cccccccccc" - } - -#define CONNECT_CAPS_REQUEST 25 -, {.name = "connect caps request" - ,.type= HTTP_REQUEST - ,.raw= "CONNECT HOME0.NETSCAPE.COM:443 HTTP/1.0\r\n" - "User-agent: Mozilla/1.1N\r\n" - "Proxy-authorization: basic aGVsbG86d29ybGQ=\r\n" - "\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 0 - ,.method= HTTP_CONNECT - ,.query_string= "" - ,.fragment= "" - ,.request_path= "" - ,.request_url= "HOME0.NETSCAPE.COM:443" - ,.num_headers= 2 - ,.upgrade="" - ,.headers= { { "User-agent", "Mozilla/1.1N" } - , { "Proxy-authorization", "basic aGVsbG86d29ybGQ=" } - } - ,.body= "" - } - -#if !HTTP_PARSER_STRICT -#define UTF8_PATH_REQ 26 -, {.name= "utf-8 path request" - ,.type= HTTP_REQUEST - ,.raw= "GET /δ¶/δt/pope?q=1#narf HTTP/1.1\r\n" - "Host: github.com\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_GET - ,.query_string= "q=1" - ,.fragment= "narf" - ,.request_path= "/δ¶/δt/pope" - ,.request_url= "/δ¶/δt/pope?q=1#narf" - ,.num_headers= 1 - ,.headers= { {"Host", "github.com" } - } - ,.body= "" - } - -#define HOSTNAME_UNDERSCORE 27 -, {.name = "hostname underscore" - ,.type= HTTP_REQUEST - ,.raw= "CONNECT home_0.netscape.com:443 HTTP/1.0\r\n" - "User-agent: Mozilla/1.1N\r\n" - "Proxy-authorization: basic aGVsbG86d29ybGQ=\r\n" - "\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 0 - ,.method= HTTP_CONNECT - ,.query_string= "" - ,.fragment= "" - ,.request_path= "" - ,.request_url= "home_0.netscape.com:443" - ,.num_headers= 2 - ,.upgrade="" - ,.headers= { { "User-agent", "Mozilla/1.1N" } - , { "Proxy-authorization", "basic aGVsbG86d29ybGQ=" } - } - ,.body= "" - } -#endif /* !HTTP_PARSER_STRICT */ - -/* see https://github.com/ry/http-parser/issues/47 */ -#define EAT_TRAILING_CRLF_NO_CONNECTION_CLOSE 28 -, {.name = "eat CRLF between requests, no \"Connection: close\" header" - ,.raw= "POST / HTTP/1.1\r\n" - "Host: www.example.com\r\n" - "Content-Type: application/x-www-form-urlencoded\r\n" - "Content-Length: 4\r\n" - "\r\n" - "q=42\r\n" /* note the trailing CRLF */ - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_POST - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/" - ,.request_url= "/" - ,.num_headers= 3 - ,.upgrade= 0 - ,.headers= { { "Host", "www.example.com" } - , { "Content-Type", "application/x-www-form-urlencoded" } - , { "Content-Length", "4" } - } - ,.body= "q=42" - } - -/* see https://github.com/ry/http-parser/issues/47 */ -#define EAT_TRAILING_CRLF_WITH_CONNECTION_CLOSE 29 -, {.name = "eat CRLF between requests even if \"Connection: close\" is set" - ,.raw= "POST / HTTP/1.1\r\n" - "Host: www.example.com\r\n" - "Content-Type: application/x-www-form-urlencoded\r\n" - "Content-Length: 4\r\n" - "Connection: close\r\n" - "\r\n" - "q=42\r\n" /* note the trailing CRLF */ - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE /* input buffer isn't empty when on_message_complete is called */ - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_POST - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/" - ,.request_url= "/" - ,.num_headers= 4 - ,.upgrade= 0 - ,.headers= { { "Host", "www.example.com" } - , { "Content-Type", "application/x-www-form-urlencoded" } - , { "Content-Length", "4" } - , { "Connection", "close" } - } - ,.body= "q=42" - } - -#define PURGE_REQ 30 -, {.name = "PURGE request" - ,.type= HTTP_REQUEST - ,.raw= "PURGE /file.txt HTTP/1.1\r\n" - "Host: www.example.com\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.method= HTTP_PURGE - ,.query_string= "" - ,.fragment= "" - ,.request_path= "/file.txt" - ,.request_url= "/file.txt" - ,.num_headers= 1 - ,.headers= { { "Host", "www.example.com" } } - ,.body= "" - } - -, {.name= NULL } /* sentinel */ -}; - -/* * R E S P O N S E S * */ -const struct message responses[] = -#define GOOGLE_301 0 -{ {.name= "google 301" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 301 Moved Permanently\r\n" - "Location: http://www.google.com/\r\n" - "Content-Type: text/html; charset=UTF-8\r\n" - "Date: Sun, 26 Apr 2009 11:11:49 GMT\r\n" - "Expires: Tue, 26 May 2009 11:11:49 GMT\r\n" - "X-$PrototypeBI-Version: 1.6.0.3\r\n" /* $ char in header field */ - "Cache-Control: public, max-age=2592000\r\n" - "Server: gws\r\n" - "Content-Length: 219 \r\n" - "\r\n" - "\n" - "301 Moved\n" - "

301 Moved

\n" - "The document has moved\n" - "here.\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 301 - ,.num_headers= 8 - ,.headers= - { { "Location", "http://www.google.com/" } - , { "Content-Type", "text/html; charset=UTF-8" } - , { "Date", "Sun, 26 Apr 2009 11:11:49 GMT" } - , { "Expires", "Tue, 26 May 2009 11:11:49 GMT" } - , { "X-$PrototypeBI-Version", "1.6.0.3" } - , { "Cache-Control", "public, max-age=2592000" } - , { "Server", "gws" } - , { "Content-Length", "219 " } - } - ,.body= "\n" - "301 Moved\n" - "

301 Moved

\n" - "The document has moved\n" - "here.\r\n" - "\r\n" - } - -#define NO_CONTENT_LENGTH_RESPONSE 1 -/* The client should wait for the server's EOF. That is, when content-length - * is not specified, and "Connection: close", the end of body is specified - * by the EOF. - * Compare with APACHEBENCH_GET - */ -, {.name= "no content-length response" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 200 OK\r\n" - "Date: Tue, 04 Aug 2009 07:59:32 GMT\r\n" - "Server: Apache\r\n" - "X-Powered-By: Servlet/2.5 JSP/2.1\r\n" - "Content-Type: text/xml; charset=utf-8\r\n" - "Connection: close\r\n" - "\r\n" - "\n" - "\n" - " \n" - " \n" - " SOAP-ENV:Client\n" - " Client Error\n" - " \n" - " \n" - "" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= TRUE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 200 - ,.num_headers= 5 - ,.headers= - { { "Date", "Tue, 04 Aug 2009 07:59:32 GMT" } - , { "Server", "Apache" } - , { "X-Powered-By", "Servlet/2.5 JSP/2.1" } - , { "Content-Type", "text/xml; charset=utf-8" } - , { "Connection", "close" } - } - ,.body= "\n" - "\n" - " \n" - " \n" - " SOAP-ENV:Client\n" - " Client Error\n" - " \n" - " \n" - "" - } - -#define NO_HEADERS_NO_BODY_404 2 -, {.name= "404 no headers no body" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 404 Not Found\r\n\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= TRUE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 404 - ,.num_headers= 0 - ,.headers= {} - ,.body_size= 0 - ,.body= "" - } - -#define NO_REASON_PHRASE 3 -, {.name= "301 no response phrase" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 301\r\n\r\n" - ,.should_keep_alive = FALSE - ,.message_complete_on_eof= TRUE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 301 - ,.num_headers= 0 - ,.headers= {} - ,.body= "" - } - -#define TRAILING_SPACE_ON_CHUNKED_BODY 4 -, {.name="200 trailing space on chunked body" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 200 OK\r\n" - "Content-Type: text/plain\r\n" - "Transfer-Encoding: chunked\r\n" - "\r\n" - "25 \r\n" - "This is the data in the first chunk\r\n" - "\r\n" - "1C\r\n" - "and this is the second one\r\n" - "\r\n" - "0 \r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 200 - ,.num_headers= 2 - ,.headers= - { {"Content-Type", "text/plain" } - , {"Transfer-Encoding", "chunked" } - } - ,.body_size = 37+28 - ,.body = - "This is the data in the first chunk\r\n" - "and this is the second one\r\n" - - } - -#define NO_CARRIAGE_RET 5 -, {.name="no carriage ret" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 200 OK\n" - "Content-Type: text/html; charset=utf-8\n" - "Connection: close\n" - "\n" - "these headers are from http://news.ycombinator.com/" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= TRUE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 200 - ,.num_headers= 2 - ,.headers= - { {"Content-Type", "text/html; charset=utf-8" } - , {"Connection", "close" } - } - ,.body= "these headers are from http://news.ycombinator.com/" - } - -#define PROXY_CONNECTION 6 -, {.name="proxy connection" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 200 OK\r\n" - "Content-Type: text/html; charset=UTF-8\r\n" - "Content-Length: 11\r\n" - "Proxy-Connection: close\r\n" - "Date: Thu, 31 Dec 2009 20:55:48 +0000\r\n" - "\r\n" - "hello world" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 200 - ,.num_headers= 4 - ,.headers= - { {"Content-Type", "text/html; charset=UTF-8" } - , {"Content-Length", "11" } - , {"Proxy-Connection", "close" } - , {"Date", "Thu, 31 Dec 2009 20:55:48 +0000"} - } - ,.body= "hello world" - } - -#define UNDERSTORE_HEADER_KEY 7 - // shown by - // curl -o /dev/null -v "http://ad.doubleclick.net/pfadx/DARTSHELLCONFIGXML;dcmt=text/xml;" -, {.name="underscore header key" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 200 OK\r\n" - "Server: DCLK-AdSvr\r\n" - "Content-Type: text/xml\r\n" - "Content-Length: 0\r\n" - "DCLK_imp: v7;x;114750856;0-0;0;17820020;0/0;21603567/21621457/1;;~okv=;dcmt=text/xml;;~cs=o\r\n\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 200 - ,.num_headers= 4 - ,.headers= - { {"Server", "DCLK-AdSvr" } - , {"Content-Type", "text/xml" } - , {"Content-Length", "0" } - , {"DCLK_imp", "v7;x;114750856;0-0;0;17820020;0/0;21603567/21621457/1;;~okv=;dcmt=text/xml;;~cs=o" } - } - ,.body= "" - } - -#define BONJOUR_MADAME_FR 8 -/* The client should not merge two headers fields when the first one doesn't - * have a value. - */ -, {.name= "bonjourmadame.fr" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.0 301 Moved Permanently\r\n" - "Date: Thu, 03 Jun 2010 09:56:32 GMT\r\n" - "Server: Apache/2.2.3 (Red Hat)\r\n" - "Cache-Control: public\r\n" - "Pragma: \r\n" - "Location: http://www.bonjourmadame.fr/\r\n" - "Vary: Accept-Encoding\r\n" - "Content-Length: 0\r\n" - "Content-Type: text/html; charset=UTF-8\r\n" - "Connection: keep-alive\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 0 - ,.status_code= 301 - ,.num_headers= 9 - ,.headers= - { { "Date", "Thu, 03 Jun 2010 09:56:32 GMT" } - , { "Server", "Apache/2.2.3 (Red Hat)" } - , { "Cache-Control", "public" } - , { "Pragma", "" } - , { "Location", "http://www.bonjourmadame.fr/" } - , { "Vary", "Accept-Encoding" } - , { "Content-Length", "0" } - , { "Content-Type", "text/html; charset=UTF-8" } - , { "Connection", "keep-alive" } - } - ,.body= "" - } - -#define RES_FIELD_UNDERSCORE 9 -/* Should handle spaces in header fields */ -, {.name= "field underscore" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 200 OK\r\n" - "Date: Tue, 28 Sep 2010 01:14:13 GMT\r\n" - "Server: Apache\r\n" - "Cache-Control: no-cache, must-revalidate\r\n" - "Expires: Mon, 26 Jul 1997 05:00:00 GMT\r\n" - ".et-Cookie: PlaxoCS=1274804622353690521; path=/; domain=.plaxo.com\r\n" - "Vary: Accept-Encoding\r\n" - "_eep-Alive: timeout=45\r\n" /* semantic value ignored */ - "_onnection: Keep-Alive\r\n" /* semantic value ignored */ - "Transfer-Encoding: chunked\r\n" - "Content-Type: text/html\r\n" - "Connection: close\r\n" - "\r\n" - "0\r\n\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 200 - ,.num_headers= 11 - ,.headers= - { { "Date", "Tue, 28 Sep 2010 01:14:13 GMT" } - , { "Server", "Apache" } - , { "Cache-Control", "no-cache, must-revalidate" } - , { "Expires", "Mon, 26 Jul 1997 05:00:00 GMT" } - , { ".et-Cookie", "PlaxoCS=1274804622353690521; path=/; domain=.plaxo.com" } - , { "Vary", "Accept-Encoding" } - , { "_eep-Alive", "timeout=45" } - , { "_onnection", "Keep-Alive" } - , { "Transfer-Encoding", "chunked" } - , { "Content-Type", "text/html" } - , { "Connection", "close" } - } - ,.body= "" - } - -#define NON_ASCII_IN_STATUS_LINE 10 -/* Should handle non-ASCII in status line */ -, {.name= "non-ASCII in status line" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 500 Oriëntatieprobleem\r\n" - "Date: Fri, 5 Nov 2010 23:07:12 GMT+2\r\n" - "Content-Length: 0\r\n" - "Connection: close\r\n" - "\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 500 - ,.num_headers= 3 - ,.headers= - { { "Date", "Fri, 5 Nov 2010 23:07:12 GMT+2" } - , { "Content-Length", "0" } - , { "Connection", "close" } - } - ,.body= "" - } - -#define HTTP_VERSION_0_9 11 -/* Should handle HTTP/0.9 */ -, {.name= "http version 0.9" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/0.9 200 OK\r\n" - "\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= TRUE - ,.http_major= 0 - ,.http_minor= 9 - ,.status_code= 200 - ,.num_headers= 0 - ,.headers= - {} - ,.body= "" - } - -#define NO_CONTENT_LENGTH_NO_TRANSFER_ENCODING_RESPONSE 12 -/* The client should wait for the server's EOF. That is, when neither - * content-length nor transfer-encoding is specified, the end of body - * is specified by the EOF. - */ -, {.name= "neither content-length nor transfer-encoding response" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 200 OK\r\n" - "Content-Type: text/plain\r\n" - "\r\n" - "hello world" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= TRUE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 200 - ,.num_headers= 1 - ,.headers= - { { "Content-Type", "text/plain" } - } - ,.body= "hello world" - } - -#define NO_BODY_HTTP10_KA_200 13 -, {.name= "HTTP/1.0 with keep-alive and EOF-terminated 200 status" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.0 200 OK\r\n" - "Connection: keep-alive\r\n" - "\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= TRUE - ,.http_major= 1 - ,.http_minor= 0 - ,.status_code= 200 - ,.num_headers= 1 - ,.headers= - { { "Connection", "keep-alive" } - } - ,.body_size= 0 - ,.body= "" - } - -#define NO_BODY_HTTP10_KA_204 14 -, {.name= "HTTP/1.0 with keep-alive and a 204 status" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.0 204 No content\r\n" - "Connection: keep-alive\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 0 - ,.status_code= 204 - ,.num_headers= 1 - ,.headers= - { { "Connection", "keep-alive" } - } - ,.body_size= 0 - ,.body= "" - } - -#define NO_BODY_HTTP11_KA_200 15 -, {.name= "HTTP/1.1 with an EOF-terminated 200 status" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 200 OK\r\n" - "\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= TRUE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 200 - ,.num_headers= 0 - ,.headers={} - ,.body_size= 0 - ,.body= "" - } - -#define NO_BODY_HTTP11_KA_204 16 -, {.name= "HTTP/1.1 with a 204 status" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 204 No content\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 204 - ,.num_headers= 0 - ,.headers={} - ,.body_size= 0 - ,.body= "" - } - -#define NO_BODY_HTTP11_NOKA_204 17 -, {.name= "HTTP/1.1 with a 204 status and keep-alive disabled" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 204 No content\r\n" - "Connection: close\r\n" - "\r\n" - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 204 - ,.num_headers= 1 - ,.headers= - { { "Connection", "close" } - } - ,.body_size= 0 - ,.body= "" - } - -#define NO_BODY_HTTP11_KA_CHUNKED_200 18 -, {.name= "HTTP/1.1 with chunked endocing and a 200 response" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 200 OK\r\n" - "Transfer-Encoding: chunked\r\n" - "\r\n" - "0\r\n" - "\r\n" - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 200 - ,.num_headers= 1 - ,.headers= - { { "Transfer-Encoding", "chunked" } - } - ,.body_size= 0 - ,.body= "" - } - -#if !HTTP_PARSER_STRICT -#define SPACE_IN_FIELD_RES 19 -/* Should handle spaces in header fields */ -, {.name= "field space" - ,.type= HTTP_RESPONSE - ,.raw= "HTTP/1.1 200 OK\r\n" - "Server: Microsoft-IIS/6.0\r\n" - "X-Powered-By: ASP.NET\r\n" - "en-US Content-Type: text/xml\r\n" /* this is the problem */ - "Content-Type: text/xml\r\n" - "Content-Length: 16\r\n" - "Date: Fri, 23 Jul 2010 18:45:38 GMT\r\n" - "Connection: keep-alive\r\n" - "\r\n" - "hello" /* fake body */ - ,.should_keep_alive= TRUE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 1 - ,.status_code= 200 - ,.num_headers= 7 - ,.headers= - { { "Server", "Microsoft-IIS/6.0" } - , { "X-Powered-By", "ASP.NET" } - , { "en-US Content-Type", "text/xml" } - , { "Content-Type", "text/xml" } - , { "Content-Length", "16" } - , { "Date", "Fri, 23 Jul 2010 18:45:38 GMT" } - , { "Connection", "keep-alive" } - } - ,.body= "hello" - } -#endif /* !HTTP_PARSER_STRICT */ - -, {.name= NULL } /* sentinel */ -}; - -int -request_url_cb (http_parser *p, const char *buf, size_t len) -{ - assert(p == parser); - strncat(messages[num_messages].request_url, buf, len); - return 0; -} - -int -header_field_cb (http_parser *p, const char *buf, size_t len) -{ - assert(p == parser); - struct message *m = &messages[num_messages]; - - if (m->last_header_element != FIELD) - m->num_headers++; - - strncat(m->headers[m->num_headers-1][0], buf, len); - - m->last_header_element = FIELD; - - return 0; -} - -int -header_value_cb (http_parser *p, const char *buf, size_t len) -{ - assert(p == parser); - struct message *m = &messages[num_messages]; - - strncat(m->headers[m->num_headers-1][1], buf, len); - - m->last_header_element = VALUE; - - return 0; -} - -int -body_cb (http_parser *p, const char *buf, size_t len) -{ - assert(p == parser); - strncat(messages[num_messages].body, buf, len); - messages[num_messages].body_size += len; - // printf("body_cb: '%s'\n", requests[num_messages].body); - return 0; -} - -int -count_body_cb (http_parser *p, const char *buf, size_t len) -{ - assert(p == parser); - assert(buf); - messages[num_messages].body_size += len; - return 0; -} - -int -message_begin_cb (http_parser *p) -{ - assert(p == parser); - messages[num_messages].message_begin_cb_called = TRUE; - return 0; -} - -int -headers_complete_cb (http_parser *p) -{ - assert(p == parser); - messages[num_messages].method = parser->method; - messages[num_messages].status_code = parser->status_code; - messages[num_messages].http_major = parser->http_major; - messages[num_messages].http_minor = parser->http_minor; - messages[num_messages].headers_complete_cb_called = TRUE; - messages[num_messages].should_keep_alive = http_should_keep_alive(parser); - return 0; -} - -int -message_complete_cb (http_parser *p) -{ - assert(p == parser); - if (messages[num_messages].should_keep_alive != http_should_keep_alive(parser)) - { - fprintf(stderr, "\n\n *** Error http_should_keep_alive() should have same " - "value in both on_message_complete and on_headers_complete " - "but it doesn't! ***\n\n"); - assert(0); - exit(1); - } - messages[num_messages].message_complete_cb_called = TRUE; - - messages[num_messages].message_complete_on_eof = currently_parsing_eof; - - num_messages++; - return 0; -} - -/* These dontcall_* callbacks exist so that we can verify that when we're - * paused, no additional callbacks are invoked */ -int -dontcall_message_begin_cb (http_parser *p) -{ - if (p) { } // gcc - fprintf(stderr, "\n\n*** on_message_begin() called on paused parser ***\n\n"); - exit(1); -} - -int -dontcall_header_field_cb (http_parser *p, const char *buf, size_t len) -{ - if (p || buf || len) { } // gcc - fprintf(stderr, "\n\n*** on_header_field() called on paused parser ***\n\n"); - exit(1); -} - -int -dontcall_header_value_cb (http_parser *p, const char *buf, size_t len) -{ - if (p || buf || len) { } // gcc - fprintf(stderr, "\n\n*** on_header_value() called on paused parser ***\n\n"); - exit(1); -} - -int -dontcall_request_url_cb (http_parser *p, const char *buf, size_t len) -{ - if (p || buf || len) { } // gcc - fprintf(stderr, "\n\n*** on_request_url() called on paused parser ***\n\n"); - exit(1); -} - -int -dontcall_body_cb (http_parser *p, const char *buf, size_t len) -{ - if (p || buf || len) { } // gcc - fprintf(stderr, "\n\n*** on_body_cb() called on paused parser ***\n\n"); - exit(1); -} - -int -dontcall_headers_complete_cb (http_parser *p) -{ - if (p) { } // gcc - fprintf(stderr, "\n\n*** on_headers_complete() called on paused " - "parser ***\n\n"); - exit(1); -} - -int -dontcall_message_complete_cb (http_parser *p) -{ - if (p) { } // gcc - fprintf(stderr, "\n\n*** on_message_complete() called on paused " - "parser ***\n\n"); - exit(1); -} - -static http_parser_settings settings_dontcall = - {.on_message_begin = dontcall_message_begin_cb - ,.on_header_field = dontcall_header_field_cb - ,.on_header_value = dontcall_header_value_cb - ,.on_url = dontcall_request_url_cb - ,.on_body = dontcall_body_cb - ,.on_headers_complete = dontcall_headers_complete_cb - ,.on_message_complete = dontcall_message_complete_cb - }; - -/* These pause_* callbacks always pause the parser and just invoke the regular - * callback that tracks content. Before returning, we overwrite the parser - * settings to point to the _dontcall variety so that we can verify that - * the pause actually did, you know, pause. */ -int -pause_message_begin_cb (http_parser *p) -{ - http_parser_pause(p, 1); - *current_pause_parser = settings_dontcall; - return message_begin_cb(p); -} - -int -pause_header_field_cb (http_parser *p, const char *buf, size_t len) -{ - http_parser_pause(p, 1); - *current_pause_parser = settings_dontcall; - return header_field_cb(p, buf, len); -} - -int -pause_header_value_cb (http_parser *p, const char *buf, size_t len) -{ - http_parser_pause(p, 1); - *current_pause_parser = settings_dontcall; - return header_value_cb(p, buf, len); -} - -int -pause_request_url_cb (http_parser *p, const char *buf, size_t len) -{ - http_parser_pause(p, 1); - *current_pause_parser = settings_dontcall; - return request_url_cb(p, buf, len); -} - -int -pause_body_cb (http_parser *p, const char *buf, size_t len) -{ - http_parser_pause(p, 1); - *current_pause_parser = settings_dontcall; - return body_cb(p, buf, len); -} - -int -pause_headers_complete_cb (http_parser *p) -{ - http_parser_pause(p, 1); - *current_pause_parser = settings_dontcall; - return headers_complete_cb(p); -} - -int -pause_message_complete_cb (http_parser *p) -{ - http_parser_pause(p, 1); - *current_pause_parser = settings_dontcall; - return message_complete_cb(p); -} - -static http_parser_settings settings_pause = - {.on_message_begin = pause_message_begin_cb - ,.on_header_field = pause_header_field_cb - ,.on_header_value = pause_header_value_cb - ,.on_url = pause_request_url_cb - ,.on_body = pause_body_cb - ,.on_headers_complete = pause_headers_complete_cb - ,.on_message_complete = pause_message_complete_cb - }; - -static http_parser_settings settings = - {.on_message_begin = message_begin_cb - ,.on_header_field = header_field_cb - ,.on_header_value = header_value_cb - ,.on_url = request_url_cb - ,.on_body = body_cb - ,.on_headers_complete = headers_complete_cb - ,.on_message_complete = message_complete_cb - }; - -static http_parser_settings settings_count_body = - {.on_message_begin = message_begin_cb - ,.on_header_field = header_field_cb - ,.on_header_value = header_value_cb - ,.on_url = request_url_cb - ,.on_body = count_body_cb - ,.on_headers_complete = headers_complete_cb - ,.on_message_complete = message_complete_cb - }; - -static http_parser_settings settings_null = - {.on_message_begin = 0 - ,.on_header_field = 0 - ,.on_header_value = 0 - ,.on_url = 0 - ,.on_body = 0 - ,.on_headers_complete = 0 - ,.on_message_complete = 0 - }; - -void -parser_init (enum http_parser_type type) -{ - num_messages = 0; - - assert(parser == NULL); - - parser = malloc(sizeof(http_parser)); - - http_parser_init(parser, type); - - memset(&messages, 0, sizeof messages); - -} - -void -parser_free () -{ - assert(parser); - free(parser); - parser = NULL; -} - -size_t parse (const char *buf, size_t len) -{ - size_t nparsed; - currently_parsing_eof = (len == 0); - nparsed = http_parser_execute(parser, &settings, buf, len); - return nparsed; -} - -size_t parse_count_body (const char *buf, size_t len) -{ - size_t nparsed; - currently_parsing_eof = (len == 0); - nparsed = http_parser_execute(parser, &settings_count_body, buf, len); - return nparsed; -} - -size_t parse_pause (const char *buf, size_t len) -{ - size_t nparsed; - http_parser_settings s = settings_pause; - - currently_parsing_eof = (len == 0); - current_pause_parser = &s; - nparsed = http_parser_execute(parser, current_pause_parser, buf, len); - return nparsed; -} - -static inline int -check_str_eq (const struct message *m, - const char *prop, - const char *expected, - const char *found) { - if ((expected == NULL) != (found == NULL)) { - printf("\n*** Error: %s in '%s' ***\n\n", prop, m->name); - printf("expected %s\n", (expected == NULL) ? "NULL" : expected); - printf(" found %s\n", (found == NULL) ? "NULL" : found); - return 0; - } - if (expected != NULL && 0 != strcmp(expected, found)) { - printf("\n*** Error: %s in '%s' ***\n\n", prop, m->name); - printf("expected '%s'\n", expected); - printf(" found '%s'\n", found); - return 0; - } - return 1; -} - -static inline int -check_num_eq (const struct message *m, - const char *prop, - int expected, - int found) { - if (expected != found) { - printf("\n*** Error: %s in '%s' ***\n\n", prop, m->name); - printf("expected %d\n", expected); - printf(" found %d\n", found); - return 0; - } - return 1; -} - -#define MESSAGE_CHECK_STR_EQ(expected, found, prop) \ - if (!check_str_eq(expected, #prop, expected->prop, found->prop)) return 0 - -#define MESSAGE_CHECK_NUM_EQ(expected, found, prop) \ - if (!check_num_eq(expected, #prop, expected->prop, found->prop)) return 0 - -#define MESSAGE_CHECK_URL_EQ(u, expected, found, prop, fn) \ -do { \ - char ubuf[256]; \ - \ - if ((u)->field_set & (1 << (fn))) { \ - memcpy(ubuf, (found)->request_url + (u)->field_data[(fn)].off, \ - (u)->field_data[(fn)].len); \ - ubuf[(u)->field_data[(fn)].len] = '\0'; \ - } else { \ - ubuf[0] = '\0'; \ - } \ - \ - check_str_eq(expected, #prop, expected->prop, ubuf); \ -} while(0) - -int -message_eq (int index, const struct message *expected) -{ - int i; - struct message *m = &messages[index]; - - MESSAGE_CHECK_NUM_EQ(expected, m, http_major); - MESSAGE_CHECK_NUM_EQ(expected, m, http_minor); - - if (expected->type == HTTP_REQUEST) { - MESSAGE_CHECK_NUM_EQ(expected, m, method); - } else { - MESSAGE_CHECK_NUM_EQ(expected, m, status_code); - } - - MESSAGE_CHECK_NUM_EQ(expected, m, should_keep_alive); - MESSAGE_CHECK_NUM_EQ(expected, m, message_complete_on_eof); - - assert(m->message_begin_cb_called); - assert(m->headers_complete_cb_called); - assert(m->message_complete_cb_called); - - - MESSAGE_CHECK_STR_EQ(expected, m, request_url); - - /* Check URL components; we can't do this w/ CONNECT since it doesn't - * send us a well-formed URL. - */ - if (*m->request_url && m->method != HTTP_CONNECT) { - struct http_parser_url u; - - if (http_parser_parse_url(m->request_url, strlen(m->request_url), 0, &u)) { - fprintf(stderr, "\n\n*** failed to parse URL %s ***\n\n", - m->request_url); - exit(1); - } - - m->port = (u.field_set & (1 << UF_PORT)) ? - u.port : 0; - - MESSAGE_CHECK_URL_EQ(&u, expected, m, query_string, UF_QUERY); - MESSAGE_CHECK_URL_EQ(&u, expected, m, fragment, UF_FRAGMENT); - MESSAGE_CHECK_URL_EQ(&u, expected, m, request_path, UF_PATH); - MESSAGE_CHECK_NUM_EQ(expected, m, port); - } - - if (expected->body_size) { - MESSAGE_CHECK_NUM_EQ(expected, m, body_size); - } else { - MESSAGE_CHECK_STR_EQ(expected, m, body); - } - - MESSAGE_CHECK_NUM_EQ(expected, m, num_headers); - - int r; - for (i = 0; i < m->num_headers; i++) { - r = check_str_eq(expected, "header field", expected->headers[i][0], m->headers[i][0]); - if (!r) return 0; - r = check_str_eq(expected, "header value", expected->headers[i][1], m->headers[i][1]); - if (!r) return 0; - } - - MESSAGE_CHECK_STR_EQ(expected, m, upgrade); - - return 1; -} - -/* Given a sequence of varargs messages, return the number of them that the - * parser should successfully parse, taking into account that upgraded - * messages prevent all subsequent messages from being parsed. - */ -size_t -count_parsed_messages(const size_t nmsgs, ...) { - size_t i; - va_list ap; - - va_start(ap, nmsgs); - - for (i = 0; i < nmsgs; i++) { - struct message *m = va_arg(ap, struct message *); - - if (m->upgrade) { - va_end(ap); - return i + 1; - } - } - - va_end(ap); - return nmsgs; -} - -/* Given a sequence of bytes and the number of these that we were able to - * parse, verify that upgrade bodies are correct. - */ -void -upgrade_message_fix(char *body, const size_t nread, const size_t nmsgs, ...) { - va_list ap; - size_t i; - size_t off = 0; - - va_start(ap, nmsgs); - - for (i = 0; i < nmsgs; i++) { - struct message *m = va_arg(ap, struct message *); - - off += strlen(m->raw); - - if (m->upgrade) { - off -= strlen(m->upgrade); - - /* Check the portion of the response after its specified upgrade */ - if (!check_str_eq(m, "upgrade", body + off, body + nread)) { - exit(1); - } - - /* Fix up the response so that message_eq() will verify the beginning - * of the upgrade */ - *(body + nread + strlen(m->upgrade)) = '\0'; - messages[num_messages -1 ].upgrade = body + nread; - - va_end(ap); - return; - } - } - - va_end(ap); - printf("\n\n*** Error: expected a message with upgrade ***\n"); - - exit(1); -} - -static void -print_error (const char *raw, size_t error_location) -{ - fprintf(stderr, "\n*** %s:%d -- %s ***\n\n", - "http_parser.c", HTTP_PARSER_ERRNO_LINE(parser), - http_errno_description(HTTP_PARSER_ERRNO(parser))); - - int this_line = 0, char_len = 0; - size_t i, j, len = strlen(raw), error_location_line = 0; - for (i = 0; i < len; i++) { - if (i == error_location) this_line = 1; - switch (raw[i]) { - case '\r': - char_len = 2; - fprintf(stderr, "\\r"); - break; - - case '\n': - char_len = 2; - fprintf(stderr, "\\n\n"); - - if (this_line) goto print; - - error_location_line = 0; - continue; - - default: - char_len = 1; - fputc(raw[i], stderr); - break; - } - if (!this_line) error_location_line += char_len; - } - - fprintf(stderr, "[eof]\n"); - - print: - for (j = 0; j < error_location_line; j++) { - fputc(' ', stderr); - } - fprintf(stderr, "^\n\nerror location: %u\n", (unsigned int)error_location); -} - -void -test_preserve_data (void) -{ - char my_data[] = "application-specific data"; - http_parser parser; - parser.data = my_data; - http_parser_init(&parser, HTTP_REQUEST); - if (parser.data != my_data) { - printf("\n*** parser.data not preserved accross http_parser_init ***\n\n"); - exit(1); - } -} - -struct url_test { - const char *name; - const char *url; - int is_connect; - struct http_parser_url u; - int rv; -}; - -const struct url_test url_tests[] = -{ {.name="proxy request" - ,.url="http://hostname/" - ,.is_connect=0 - ,.u= - {.field_set=(1 << UF_SCHEMA) | (1 << UF_HOST) | (1 << UF_PATH) - ,.port=0 - ,.field_data= - {{ 0, 4 } /* UF_SCHEMA */ - ,{ 7, 8 } /* UF_HOST */ - ,{ 0, 0 } /* UF_PORT */ - ,{ 15, 1 } /* UF_PATH */ - ,{ 0, 0 } /* UF_QUERY */ - ,{ 0, 0 } /* UF_FRAGMENT */ - } - } - ,.rv=0 - } - -, {.name="CONNECT request" - ,.url="hostname:443" - ,.is_connect=1 - ,.u= - {.field_set=(1 << UF_HOST) | (1 << UF_PORT) - ,.port=443 - ,.field_data= - {{ 0, 0 } /* UF_SCHEMA */ - ,{ 0, 8 } /* UF_HOST */ - ,{ 9, 3 } /* UF_PORT */ - ,{ 0, 0 } /* UF_PATH */ - ,{ 0, 0 } /* UF_QUERY */ - ,{ 0, 0 } /* UF_FRAGMENT */ - } - } - ,.rv=0 - } - -, {.name="proxy ipv6 request" - ,.url="http://[1:2::3:4]/" - ,.is_connect=0 - ,.u= - {.field_set=(1 << UF_SCHEMA) | (1 << UF_HOST) | (1 << UF_PATH) - ,.port=0 - ,.field_data= - {{ 0, 4 } /* UF_SCHEMA */ - ,{ 8, 8 } /* UF_HOST */ - ,{ 0, 0 } /* UF_PORT */ - ,{ 17, 1 } /* UF_PATH */ - ,{ 0, 0 } /* UF_QUERY */ - ,{ 0, 0 } /* UF_FRAGMENT */ - } - } - ,.rv=0 - } - -, {.name="CONNECT ipv6 address" - ,.url="[1:2::3:4]:443" - ,.is_connect=1 - ,.u= - {.field_set=(1 << UF_HOST) | (1 << UF_PORT) - ,.port=443 - ,.field_data= - {{ 0, 0 } /* UF_SCHEMA */ - ,{ 1, 8 } /* UF_HOST */ - ,{ 11, 3 } /* UF_PORT */ - ,{ 0, 0 } /* UF_PATH */ - ,{ 0, 0 } /* UF_QUERY */ - ,{ 0, 0 } /* UF_FRAGMENT */ - } - } - ,.rv=0 - } - -, {.name="extra ? in query string" - ,.url="http://a.tbcdn.cn/p/fp/2010c/??fp-header-min.css,fp-base-min.css,fp-channel-min.css,fp-product-min.css,fp-mall-min.css,fp-category-min.css,fp-sub-min.css,fp-gdp4p-min.css,fp-css3-min.css,fp-misc-min.css?t=20101022.css" - ,.is_connect=0 - ,.u= - {.field_set=(1<field_set, u->port); - for (i = 0; i < UF_MAX; i++) { - if ((u->field_set & (1 << i)) == 0) { - printf("\tfield_data[%u]: unset\n", i); - continue; - } - - memcpy(part, url + u->field_data[i].off, u->field_data[i].len); - part[u->field_data[i].len] = '\0'; - - printf("\tfield_data[%u]: off: %u len: %u part: \"%s\"\n", - i, - u->field_data[i].off, - u->field_data[i].len, - part); - } -} - -void -test_parse_url (void) -{ - struct http_parser_url u; - const struct url_test *test; - unsigned int i; - int rv; - - for (i = 0; i < (sizeof(url_tests) / sizeof(url_tests[0])); i++) { - test = &url_tests[i]; - memset(&u, 0, sizeof(u)); - - rv = http_parser_parse_url(test->url, - strlen(test->url), - test->is_connect, - &u); - - if (test->rv == 0) { - if (rv != 0) { - printf("\n*** http_parser_parse_url(\"%s\") \"%s\" test failed, " - "unexpected rv %d ***\n\n", test->url, test->name, rv); - exit(1); - } - - if (memcmp(&u, &test->u, sizeof(u)) != 0) { - printf("\n*** http_parser_parse_url(\"%s\") \"%s\" failed ***\n", - test->url, test->name); - - printf("target http_parser_url:\n"); - dump_url(test->url, &test->u); - printf("result http_parser_url:\n"); - dump_url(test->url, &u); - - exit(1); - } - } else { - /* test->rv != 0 */ - if (rv == 0) { - printf("\n*** http_parser_parse_url(\"%s\") \"%s\" test failed, " - "unexpected rv %d ***\n\n", test->url, test->name, rv); - exit(1); - } - } - } -} - -void -test_message (const struct message *message) -{ - size_t raw_len = strlen(message->raw); - size_t msg1len; - for (msg1len = 0; msg1len < raw_len; msg1len++) { - parser_init(message->type); - - size_t read; - const char *msg1 = message->raw; - const char *msg2 = msg1 + msg1len; - size_t msg2len = raw_len - msg1len; - - if (msg1len) { - read = parse(msg1, msg1len); - - if (message->upgrade && parser->upgrade) { - messages[num_messages - 1].upgrade = msg1 + read; - goto test; - } - - if (read != msg1len) { - print_error(msg1, read); - exit(1); - } - } - - - read = parse(msg2, msg2len); - - if (message->upgrade && parser->upgrade) { - messages[num_messages - 1].upgrade = msg2 + read; - goto test; - } - - if (read != msg2len) { - print_error(msg2, read); - exit(1); - } - - read = parse(NULL, 0); - - if (read != 0) { - print_error(message->raw, read); - exit(1); - } - - test: - - if (num_messages != 1) { - printf("\n*** num_messages != 1 after testing '%s' ***\n\n", message->name); - exit(1); - } - - if(!message_eq(0, message)) exit(1); - - parser_free(); - } -} - -void -test_message_count_body (const struct message *message) -{ - parser_init(message->type); - - size_t read; - size_t l = strlen(message->raw); - size_t i, toread; - size_t chunk = 4024; - - for (i = 0; i < l; i+= chunk) { - toread = MIN(l-i, chunk); - read = parse_count_body(message->raw + i, toread); - if (read != toread) { - print_error(message->raw, read); - exit(1); - } - } - - - read = parse_count_body(NULL, 0); - if (read != 0) { - print_error(message->raw, read); - exit(1); - } - - if (num_messages != 1) { - printf("\n*** num_messages != 1 after testing '%s' ***\n\n", message->name); - exit(1); - } - - if(!message_eq(0, message)) exit(1); - - parser_free(); -} - -void -test_simple (const char *buf, enum http_errno err_expected) -{ - parser_init(HTTP_REQUEST); - - size_t parsed; - int pass; - enum http_errno err; - - parsed = parse(buf, strlen(buf)); - pass = (parsed == strlen(buf)); - err = HTTP_PARSER_ERRNO(parser); - parsed = parse(NULL, 0); - pass &= (parsed == 0); - - parser_free(); - - /* In strict mode, allow us to pass with an unexpected HPE_STRICT as - * long as the caller isn't expecting success. - */ -#if HTTP_PARSER_STRICT - if (err_expected != err && err_expected != HPE_OK && err != HPE_STRICT) { -#else - if (err_expected != err) { -#endif - fprintf(stderr, "\n*** test_simple expected %s, but saw %s ***\n\n%s\n", - http_errno_name(err_expected), http_errno_name(err), buf); - exit(1); - } -} - -void -test_header_overflow_error (int req) -{ - http_parser parser; - http_parser_init(&parser, req ? HTTP_REQUEST : HTTP_RESPONSE); - size_t parsed; - const char *buf; - buf = req ? "GET / HTTP/1.1\r\n" : "HTTP/1.0 200 OK\r\n"; - parsed = http_parser_execute(&parser, &settings_null, buf, strlen(buf)); - assert(parsed == strlen(buf)); - - buf = "header-key: header-value\r\n"; - size_t buflen = strlen(buf); - - int i; - for (i = 0; i < 10000; i++) { - parsed = http_parser_execute(&parser, &settings_null, buf, buflen); - if (parsed != buflen) { - //fprintf(stderr, "error found on iter %d\n", i); - assert(HTTP_PARSER_ERRNO(&parser) == HPE_HEADER_OVERFLOW); - return; - } - } - - fprintf(stderr, "\n*** Error expected but none in header overflow test ***\n"); - exit(1); -} - -static void -test_content_length_overflow (const char *buf, size_t buflen, int expect_ok) -{ - http_parser parser; - http_parser_init(&parser, HTTP_RESPONSE); - http_parser_execute(&parser, &settings_null, buf, buflen); - - if (expect_ok) - assert(HTTP_PARSER_ERRNO(&parser) == HPE_OK); - else - assert(HTTP_PARSER_ERRNO(&parser) == HPE_INVALID_CONTENT_LENGTH); -} - -void -test_header_content_length_overflow_error (void) -{ -#define X(size) \ - "HTTP/1.1 200 OK\r\n" \ - "Content-Length: " #size "\r\n" \ - "\r\n" - const char a[] = X(18446744073709551614); /* 2^64-2 */ - const char b[] = X(18446744073709551615); /* 2^64-1 */ - const char c[] = X(18446744073709551616); /* 2^64 */ -#undef X - test_content_length_overflow(a, sizeof(a) - 1, 1); /* expect ok */ - test_content_length_overflow(b, sizeof(b) - 1, 0); /* expect failure */ - test_content_length_overflow(c, sizeof(c) - 1, 0); /* expect failure */ -} - -void -test_chunk_content_length_overflow_error (void) -{ -#define X(size) \ - "HTTP/1.1 200 OK\r\n" \ - "Transfer-Encoding: chunked\r\n" \ - "\r\n" \ - #size "\r\n" \ - "..." - const char a[] = X(FFFFFFFFFFFFFFFE); /* 2^64-2 */ - const char b[] = X(FFFFFFFFFFFFFFFF); /* 2^64-1 */ - const char c[] = X(10000000000000000); /* 2^64 */ -#undef X - test_content_length_overflow(a, sizeof(a) - 1, 1); /* expect ok */ - test_content_length_overflow(b, sizeof(b) - 1, 0); /* expect failure */ - test_content_length_overflow(c, sizeof(c) - 1, 0); /* expect failure */ -} - -void -test_no_overflow_long_body (int req, size_t length) -{ - http_parser parser; - http_parser_init(&parser, req ? HTTP_REQUEST : HTTP_RESPONSE); - size_t parsed; - size_t i; - char buf1[3000]; - size_t buf1len = sprintf(buf1, "%s\r\nConnection: Keep-Alive\r\nContent-Length: %zu\r\n\r\n", - req ? "POST / HTTP/1.0" : "HTTP/1.0 200 OK", length); - parsed = http_parser_execute(&parser, &settings_null, buf1, buf1len); - if (parsed != buf1len) - goto err; - - for (i = 0; i < length; i++) { - char foo = 'a'; - parsed = http_parser_execute(&parser, &settings_null, &foo, 1); - if (parsed != 1) - goto err; - } - - parsed = http_parser_execute(&parser, &settings_null, buf1, buf1len); - if (parsed != buf1len) goto err; - return; - - err: - fprintf(stderr, - "\n*** error in test_no_overflow_long_body %s of length %zu ***\n", - req ? "REQUEST" : "RESPONSE", - length); - exit(1); -} - -void -test_multiple3 (const struct message *r1, const struct message *r2, const struct message *r3) -{ - int message_count = count_parsed_messages(3, r1, r2, r3); - - char total[ strlen(r1->raw) - + strlen(r2->raw) - + strlen(r3->raw) - + 1 - ]; - total[0] = '\0'; - - strcat(total, r1->raw); - strcat(total, r2->raw); - strcat(total, r3->raw); - - parser_init(r1->type); - - size_t read; - - read = parse(total, strlen(total)); - - if (parser->upgrade) { - upgrade_message_fix(total, read, 3, r1, r2, r3); - goto test; - } - - if (read != strlen(total)) { - print_error(total, read); - exit(1); - } - - read = parse(NULL, 0); - - if (read != 0) { - print_error(total, read); - exit(1); - } - -test: - - if (message_count != num_messages) { - fprintf(stderr, "\n\n*** Parser didn't see 3 messages only %d *** \n", num_messages); - exit(1); - } - - if (!message_eq(0, r1)) exit(1); - if (message_count > 1 && !message_eq(1, r2)) exit(1); - if (message_count > 2 && !message_eq(2, r3)) exit(1); - - parser_free(); -} - -/* SCAN through every possible breaking to make sure the - * parser can handle getting the content in any chunks that - * might come from the socket - */ -void -test_scan (const struct message *r1, const struct message *r2, const struct message *r3) -{ - char total[80*1024] = "\0"; - char buf1[80*1024] = "\0"; - char buf2[80*1024] = "\0"; - char buf3[80*1024] = "\0"; - - strcat(total, r1->raw); - strcat(total, r2->raw); - strcat(total, r3->raw); - - size_t read; - - int total_len = strlen(total); - - int total_ops = 2 * (total_len - 1) * (total_len - 2) / 2; - int ops = 0 ; - - size_t buf1_len, buf2_len, buf3_len; - int message_count = count_parsed_messages(3, r1, r2, r3); - - int i,j,type_both; - for (type_both = 0; type_both < 2; type_both ++ ) { - for (j = 2; j < total_len; j ++ ) { - for (i = 1; i < j; i ++ ) { - - if (ops % 1000 == 0) { - printf("\b\b\b\b%3.0f%%", 100 * (float)ops /(float)total_ops); - fflush(stdout); - } - ops += 1; - - parser_init(type_both ? HTTP_BOTH : r1->type); - - buf1_len = i; - strncpy(buf1, total, buf1_len); - buf1[buf1_len] = 0; - - buf2_len = j - i; - strncpy(buf2, total+i, buf2_len); - buf2[buf2_len] = 0; - - buf3_len = total_len - j; - strncpy(buf3, total+j, buf3_len); - buf3[buf3_len] = 0; - - read = parse(buf1, buf1_len); - - if (parser->upgrade) goto test; - - if (read != buf1_len) { - print_error(buf1, read); - goto error; - } - - read += parse(buf2, buf2_len); - - if (parser->upgrade) goto test; - - if (read != buf1_len + buf2_len) { - print_error(buf2, read); - goto error; - } - - read += parse(buf3, buf3_len); - - if (parser->upgrade) goto test; - - if (read != buf1_len + buf2_len + buf3_len) { - print_error(buf3, read); - goto error; - } - - parse(NULL, 0); - -test: - if (parser->upgrade) { - upgrade_message_fix(total, read, 3, r1, r2, r3); - } - - if (message_count != num_messages) { - fprintf(stderr, "\n\nParser didn't see %d messages only %d\n", - message_count, num_messages); - goto error; - } - - if (!message_eq(0, r1)) { - fprintf(stderr, "\n\nError matching messages[0] in test_scan.\n"); - goto error; - } - - if (message_count > 1 && !message_eq(1, r2)) { - fprintf(stderr, "\n\nError matching messages[1] in test_scan.\n"); - goto error; - } - - if (message_count > 2 && !message_eq(2, r3)) { - fprintf(stderr, "\n\nError matching messages[2] in test_scan.\n"); - goto error; - } - - parser_free(); - } - } - } - puts("\b\b\b\b100%"); - return; - - error: - fprintf(stderr, "i=%d j=%d\n", i, j); - fprintf(stderr, "buf1 (%u) %s\n\n", (unsigned int)buf1_len, buf1); - fprintf(stderr, "buf2 (%u) %s\n\n", (unsigned int)buf2_len , buf2); - fprintf(stderr, "buf3 (%u) %s\n", (unsigned int)buf3_len, buf3); - exit(1); -} - -// user required to free the result -// string terminated by \0 -char * -create_large_chunked_message (int body_size_in_kb, const char* headers) -{ - int i; - size_t wrote = 0; - size_t headers_len = strlen(headers); - size_t bufsize = headers_len + (5+1024+2)*body_size_in_kb + 6; - char * buf = malloc(bufsize); - - memcpy(buf, headers, headers_len); - wrote += headers_len; - - for (i = 0; i < body_size_in_kb; i++) { - // write 1kb chunk into the body. - memcpy(buf + wrote, "400\r\n", 5); - wrote += 5; - memset(buf + wrote, 'C', 1024); - wrote += 1024; - strcpy(buf + wrote, "\r\n"); - wrote += 2; - } - - memcpy(buf + wrote, "0\r\n\r\n", 6); - wrote += 6; - assert(wrote == bufsize); - - return buf; -} - -/* Verify that we can pause parsing at any of the bytes in the - * message and still get the result that we're expecting. */ -void -test_message_pause (const struct message *msg) -{ - char *buf = (char*) msg->raw; - size_t buflen = strlen(msg->raw); - size_t nread; - - parser_init(msg->type); - - do { - nread = parse_pause(buf, buflen); - - // We can only set the upgrade buffer once we've gotten our message - // completion callback. - if (messages[0].message_complete_cb_called && - msg->upgrade && - parser->upgrade) { - messages[0].upgrade = buf + nread; - goto test; - } - - if (nread < buflen) { - - // Not much do to if we failed a strict-mode check - if (HTTP_PARSER_ERRNO(parser) == HPE_STRICT) { - parser_free(); - return; - } - - assert (HTTP_PARSER_ERRNO(parser) == HPE_PAUSED); - } - - buf += nread; - buflen -= nread; - http_parser_pause(parser, 0); - } while (buflen > 0); - - nread = parse_pause(NULL, 0); - assert (nread == 0); - -test: - if (num_messages != 1) { - printf("\n*** num_messages != 1 after testing '%s' ***\n\n", msg->name); - exit(1); - } - - if(!message_eq(0, msg)) exit(1); - - parser_free(); -} - -int -main (void) -{ - parser = NULL; - int i, j, k; - int request_count; - int response_count; - - printf("sizeof(http_parser) = %u\n", (unsigned int)sizeof(http_parser)); - - for (request_count = 0; requests[request_count].name; request_count++); - for (response_count = 0; responses[response_count].name; response_count++); - - //// API - test_preserve_data(); - test_parse_url(); - - //// OVERFLOW CONDITIONS - - test_header_overflow_error(HTTP_REQUEST); - test_no_overflow_long_body(HTTP_REQUEST, 1000); - test_no_overflow_long_body(HTTP_REQUEST, 100000); - - test_header_overflow_error(HTTP_RESPONSE); - test_no_overflow_long_body(HTTP_RESPONSE, 1000); - test_no_overflow_long_body(HTTP_RESPONSE, 100000); - - test_header_content_length_overflow_error(); - test_chunk_content_length_overflow_error(); - - //// RESPONSES - - for (i = 0; i < response_count; i++) { - test_message(&responses[i]); - } - - for (i = 0; i < response_count; i++) { - test_message_pause(&responses[i]); - } - - for (i = 0; i < response_count; i++) { - if (!responses[i].should_keep_alive) continue; - for (j = 0; j < response_count; j++) { - if (!responses[j].should_keep_alive) continue; - for (k = 0; k < response_count; k++) { - test_multiple3(&responses[i], &responses[j], &responses[k]); - } - } - } - - test_message_count_body(&responses[NO_HEADERS_NO_BODY_404]); - test_message_count_body(&responses[TRAILING_SPACE_ON_CHUNKED_BODY]); - - // test very large chunked response - { - char * msg = create_large_chunked_message(31337, - "HTTP/1.0 200 OK\r\n" - "Transfer-Encoding: chunked\r\n" - "Content-Type: text/plain\r\n" - "\r\n"); - struct message large_chunked = - {.name= "large chunked" - ,.type= HTTP_RESPONSE - ,.raw= msg - ,.should_keep_alive= FALSE - ,.message_complete_on_eof= FALSE - ,.http_major= 1 - ,.http_minor= 0 - ,.status_code= 200 - ,.num_headers= 2 - ,.headers= - { { "Transfer-Encoding", "chunked" } - , { "Content-Type", "text/plain" } - } - ,.body_size= 31337*1024 - }; - test_message_count_body(&large_chunked); - free(msg); - } - - - - printf("response scan 1/2 "); - test_scan( &responses[TRAILING_SPACE_ON_CHUNKED_BODY] - , &responses[NO_BODY_HTTP10_KA_204] - , &responses[NO_REASON_PHRASE] - ); - - printf("response scan 2/2 "); - test_scan( &responses[BONJOUR_MADAME_FR] - , &responses[UNDERSTORE_HEADER_KEY] - , &responses[NO_CARRIAGE_RET] - ); - - puts("responses okay"); - - - /// REQUESTS - - test_simple("hello world", HPE_INVALID_METHOD); - test_simple("GET / HTP/1.1\r\n\r\n", HPE_INVALID_VERSION); - - - test_simple("ASDF / HTTP/1.1\r\n\r\n", HPE_INVALID_METHOD); - test_simple("PROPPATCHA / HTTP/1.1\r\n\r\n", HPE_INVALID_METHOD); - test_simple("GETA / HTTP/1.1\r\n\r\n", HPE_INVALID_METHOD); - - // Well-formed but incomplete - test_simple("GET / HTTP/1.1\r\n" - "Content-Type: text/plain\r\n" - "Content-Length: 6\r\n" - "\r\n" - "fooba", - HPE_OK); - - static const char *all_methods[] = { - "DELETE", - "GET", - "HEAD", - "POST", - "PUT", - //"CONNECT", //CONNECT can't be tested like other methods, it's a tunnel - "OPTIONS", - "TRACE", - "COPY", - "LOCK", - "MKCOL", - "MOVE", - "PROPFIND", - "PROPPATCH", - "UNLOCK", - "REPORT", - "MKACTIVITY", - "CHECKOUT", - "MERGE", - "M-SEARCH", - "NOTIFY", - "SUBSCRIBE", - "UNSUBSCRIBE", - "PATCH", - 0 }; - const char **this_method; - for (this_method = all_methods; *this_method; this_method++) { - char buf[200]; - sprintf(buf, "%s / HTTP/1.1\r\n\r\n", *this_method); - test_simple(buf, HPE_OK); - } - - static const char *bad_methods[] = { - "C******", - "M****", - 0 }; - for (this_method = bad_methods; *this_method; this_method++) { - char buf[200]; - sprintf(buf, "%s / HTTP/1.1\r\n\r\n", *this_method); - test_simple(buf, HPE_UNKNOWN); - } - - const char *dumbfuck2 = - "GET / HTTP/1.1\r\n" - "X-SSL-Bullshit: -----BEGIN CERTIFICATE-----\r\n" - "\tMIIFbTCCBFWgAwIBAgICH4cwDQYJKoZIhvcNAQEFBQAwcDELMAkGA1UEBhMCVUsx\r\n" - "\tETAPBgNVBAoTCGVTY2llbmNlMRIwEAYDVQQLEwlBdXRob3JpdHkxCzAJBgNVBAMT\r\n" - "\tAkNBMS0wKwYJKoZIhvcNAQkBFh5jYS1vcGVyYXRvckBncmlkLXN1cHBvcnQuYWMu\r\n" - "\tdWswHhcNMDYwNzI3MTQxMzI4WhcNMDcwNzI3MTQxMzI4WjBbMQswCQYDVQQGEwJV\r\n" - "\tSzERMA8GA1UEChMIZVNjaWVuY2UxEzARBgNVBAsTCk1hbmNoZXN0ZXIxCzAJBgNV\r\n" - "\tBAcTmrsogriqMWLAk1DMRcwFQYDVQQDEw5taWNoYWVsIHBhcmQYJKoZIhvcNAQEB\r\n" - "\tBQADggEPADCCAQoCggEBANPEQBgl1IaKdSS1TbhF3hEXSl72G9J+WC/1R64fAcEF\r\n" - "\tW51rEyFYiIeZGx/BVzwXbeBoNUK41OK65sxGuflMo5gLflbwJtHBRIEKAfVVp3YR\r\n" - "\tgW7cMA/s/XKgL1GEC7rQw8lIZT8RApukCGqOVHSi/F1SiFlPDxuDfmdiNzL31+sL\r\n" - "\t0iwHDdNkGjy5pyBSB8Y79dsSJtCW/iaLB0/n8Sj7HgvvZJ7x0fr+RQjYOUUfrePP\r\n" - "\tu2MSpFyf+9BbC/aXgaZuiCvSR+8Snv3xApQY+fULK/xY8h8Ua51iXoQ5jrgu2SqR\r\n" - "\twgA7BUi3G8LFzMBl8FRCDYGUDy7M6QaHXx1ZWIPWNKsCAwEAAaOCAiQwggIgMAwG\r\n" - "\tA1UdEwEB/wQCMAAwEQYJYIZIAYb4QgHTTPAQDAgWgMA4GA1UdDwEB/wQEAwID6DAs\r\n" - "\tBglghkgBhvhCAQ0EHxYdVUsgZS1TY2llbmNlIFVzZXIgQ2VydGlmaWNhdGUwHQYD\r\n" - "\tVR0OBBYEFDTt/sf9PeMaZDHkUIldrDYMNTBZMIGaBgNVHSMEgZIwgY+AFAI4qxGj\r\n" - "\tloCLDdMVKwiljjDastqooXSkcjBwMQswCQYDVQQGEwJVSzERMA8GA1UEChMIZVNj\r\n" - "\taWVuY2UxEjAQBgNVBAsTCUF1dGhvcml0eTELMAkGA1UEAxMCQ0ExLTArBgkqhkiG\r\n" - "\t9w0BCQEWHmNhLW9wZXJhdG9yQGdyaWQtc3VwcG9ydC5hYy51a4IBADApBgNVHRIE\r\n" - "\tIjAggR5jYS1vcGVyYXRvckBncmlkLXN1cHBvcnQuYWMudWswGQYDVR0gBBIwEDAO\r\n" - "\tBgwrBgEEAdkvAQEBAQYwPQYJYIZIAYb4QgEEBDAWLmh0dHA6Ly9jYS5ncmlkLXN1\r\n" - "\tcHBvcnQuYWMudmT4sopwqlBWsvcHViL2NybC9jYWNybC5jcmwwPQYJYIZIAYb4QgEDBDAWLmh0\r\n" - "\tdHA6Ly9jYS5ncmlkLXN1cHBvcnQuYWMudWsvcHViL2NybC9jYWNybC5jcmwwPwYD\r\n" - "\tVR0fBDgwNjA0oDKgMIYuaHR0cDovL2NhLmdyaWQt5hYy51ay9wdWIv\r\n" - "\tY3JsL2NhY3JsLmNybDANBgkqhkiG9w0BAQUFAAOCAQEAS/U4iiooBENGW/Hwmmd3\r\n" - "\tXCy6Zrt08YjKCzGNjorT98g8uGsqYjSxv/hmi0qlnlHs+k/3Iobc3LjS5AMYr5L8\r\n" - "\tUO7OSkgFFlLHQyC9JzPfmLCAugvzEbyv4Olnsr8hbxF1MbKZoQxUZtMVu29wjfXk\r\n" - "\thTeApBv7eaKCWpSp7MCbvgzm74izKhu3vlDk9w6qVrxePfGgpKPqfHiOoGhFnbTK\r\n" - "\twTC6o2xq5y0qZ03JonF7OJspEd3I5zKY3E+ov7/ZhW6DqT8UFvsAdjvQbXyhV8Eu\r\n" - "\tYhixw1aKEPzNjNowuIseVogKOLXxWI5vAi5HgXdS0/ES5gDGsABo4fqovUKlgop3\r\n" - "\tRA==\r\n" - "\t-----END CERTIFICATE-----\r\n" - "\r\n"; - test_simple(dumbfuck2, HPE_OK); - -#if 0 - // NOTE(Wed Nov 18 11:57:27 CET 2009) this seems okay. we just read body - // until EOF. - // - // no content-length - // error if there is a body without content length - const char *bad_get_no_headers_no_body = "GET /bad_get_no_headers_no_body/world HTTP/1.1\r\n" - "Accept: */*\r\n" - "\r\n" - "HELLO"; - test_simple(bad_get_no_headers_no_body, 0); -#endif - /* TODO sending junk and large headers gets rejected */ - - - /* check to make sure our predefined requests are okay */ - for (i = 0; requests[i].name; i++) { - test_message(&requests[i]); - } - - for (i = 0; i < request_count; i++) { - test_message_pause(&requests[i]); - } - - for (i = 0; i < request_count; i++) { - if (!requests[i].should_keep_alive) continue; - for (j = 0; j < request_count; j++) { - if (!requests[j].should_keep_alive) continue; - for (k = 0; k < request_count; k++) { - test_multiple3(&requests[i], &requests[j], &requests[k]); - } - } - } - - printf("request scan 1/4 "); - test_scan( &requests[GET_NO_HEADERS_NO_BODY] - , &requests[GET_ONE_HEADER_NO_BODY] - , &requests[GET_NO_HEADERS_NO_BODY] - ); - - printf("request scan 2/4 "); - test_scan( &requests[POST_CHUNKED_ALL_YOUR_BASE] - , &requests[POST_IDENTITY_BODY_WORLD] - , &requests[GET_FUNKY_CONTENT_LENGTH] - ); - - printf("request scan 3/4 "); - test_scan( &requests[TWO_CHUNKS_MULT_ZERO_END] - , &requests[CHUNKED_W_TRAILING_HEADERS] - , &requests[CHUNKED_W_BULLSHIT_AFTER_LENGTH] - ); - - printf("request scan 4/4 "); - test_scan( &requests[QUERY_URL_WITH_QUESTION_MARK_GET] - , &requests[PREFIX_NEWLINE_GET ] - , &requests[CONNECT_REQUEST] - ); - - puts("requests okay"); - - return 0; -} diff --git a/.gems/gems/http_parser.rb-0.6.0/http_parser.rb.gemspec b/.gems/gems/http_parser.rb-0.6.0/http_parser.rb.gemspec deleted file mode 100644 index 9a406f8..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/http_parser.rb.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -Gem::Specification.new do |s| - s.name = "http_parser.rb" - s.version = "0.6.0" - s.summary = "Simple callback-based HTTP request/response parser" - s.description = "Ruby bindings to http://github.com/ry/http-parser and http://github.com/a2800276/http-parser.java" - - s.authors = ["Marc-Andre Cournoyer", "Aman Gupta"] - s.email = ["macournoyer@gmail.com", "aman@tmm1.net"] - s.license = 'MIT' - - s.homepage = "http://github.com/tmm1/http_parser.rb" - s.files = `git ls-files`.split("\n") + Dir['ext/ruby_http_parser/vendor/**/*'] - - s.require_paths = ["lib"] - s.extensions = ["ext/ruby_http_parser/extconf.rb"] - - s.add_development_dependency 'rake-compiler', '>= 0.7.9' - s.add_development_dependency 'rspec', '>= 2.0.1' - s.add_development_dependency 'json', '>= 1.4.6' - s.add_development_dependency 'benchmark_suite' - s.add_development_dependency 'ffi' - - if RUBY_PLATFORM =~ /java/ - s.add_development_dependency 'jruby-openssl' - else - s.add_development_dependency 'yajl-ruby', '>= 0.8.1' - end -end diff --git a/.gems/gems/http_parser.rb-0.6.0/lib/http/parser.rb b/.gems/gems/http_parser.rb-0.6.0/lib/http/parser.rb deleted file mode 100644 index 4881b03..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/lib/http/parser.rb +++ /dev/null @@ -1 +0,0 @@ -require 'http_parser' diff --git a/.gems/gems/http_parser.rb-0.6.0/lib/http_parser.rb b/.gems/gems/http_parser.rb-0.6.0/lib/http_parser.rb deleted file mode 100644 index c69f7a0..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/lib/http_parser.rb +++ /dev/null @@ -1,21 +0,0 @@ -$:.unshift File.expand_path('../', __FILE__) -require 'ruby_http_parser' - -Http = HTTP - -module HTTP - class Parser - class << self - attr_reader :default_header_value_type - - def default_header_value_type=(val) - if (val != :mixed && val != :strings && val != :arrays) - raise ArgumentError, "Invalid header value type" - end - @default_header_value_type = val - end - end - end -end - -HTTP::Parser.default_header_value_type = :mixed diff --git a/.gems/gems/http_parser.rb-0.6.0/spec/parser_spec.rb b/.gems/gems/http_parser.rb-0.6.0/spec/parser_spec.rb deleted file mode 100644 index 7134476..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/spec/parser_spec.rb +++ /dev/null @@ -1,350 +0,0 @@ -require "spec_helper" -require "json" - -describe HTTP::Parser do - before do - @parser = HTTP::Parser.new - - @headers = nil - @body = "" - @started = false - @done = false - - @parser.on_message_begin = proc{ @started = true } - @parser.on_headers_complete = proc { |e| @headers = e } - @parser.on_body = proc { |chunk| @body << chunk } - @parser.on_message_complete = proc{ @done = true } - end - - it "should have initial state" do - @parser.headers.should be_nil - - @parser.http_version.should be_nil - @parser.http_method.should be_nil - @parser.status_code.should be_nil - - @parser.request_url.should be_nil - - @parser.header_value_type.should == :mixed - end - - it "should allow us to set the header value type" do - [:mixed, :arrays, :strings].each do |type| - @parser.header_value_type = type - @parser.header_value_type.should == type - - parser_tmp = HTTP::Parser.new(nil, type) - parser_tmp.header_value_type.should == type - end - end - - it "should allow us to set the default header value type" do - [:mixed, :arrays, :strings].each do |type| - HTTP::Parser.default_header_value_type = type - - parser = HTTP::Parser.new - parser.header_value_type.should == type - end - end - - it "should throw an Argument Error if header value type is invalid" do - proc{ @parser.header_value_type = 'bob' }.should raise_error(ArgumentError) - end - - it "should throw an Argument Error if default header value type is invalid" do - proc{ HTTP::Parser.default_header_value_type = 'bob' }.should raise_error(ArgumentError) - end - - it "should implement basic api" do - @parser << - "GET /test?ok=1 HTTP/1.1\r\n" + - "User-Agent: curl/7.18.0\r\n" + - "Host: 0.0.0.0:5000\r\n" + - "Accept: */*\r\n" + - "Content-Length: 5\r\n" + - "\r\n" + - "World" - - @started.should be_true - @done.should be_true - - @parser.http_major.should == 1 - @parser.http_minor.should == 1 - @parser.http_version.should == [1,1] - @parser.http_method.should == 'GET' - @parser.status_code.should be_nil - - @parser.request_url.should == '/test?ok=1' - - @parser.headers.should == @headers - @parser.headers['User-Agent'].should == 'curl/7.18.0' - @parser.headers['Host'].should == '0.0.0.0:5000' - - @body.should == "World" - end - - it "should raise errors on invalid data" do - proc{ @parser << "BLAH" }.should raise_error(HTTP::Parser::Error) - end - - it "should abort parser via callback" do - @parser.on_headers_complete = proc { |e| @headers = e; :stop } - - data = - "GET / HTTP/1.0\r\n" + - "Content-Length: 5\r\n" + - "\r\n" + - "World" - - bytes = @parser << data - - bytes.should == 37 - data[bytes..-1].should == 'World' - - @headers.should == {'Content-Length' => '5'} - @body.should be_empty - @done.should be_false - end - - it "should reset to initial state" do - @parser << "GET / HTTP/1.0\r\n\r\n" - - @parser.http_method.should == 'GET' - @parser.http_version.should == [1,0] - - @parser.request_url.should == '/' - - @parser.reset!.should be_true - - @parser.http_version.should be_nil - @parser.http_method.should be_nil - @parser.status_code.should be_nil - - @parser.request_url.should be_nil - end - - it "should optionally reset parser state on no-body responses" do - @parser.reset!.should be_true - - @head, @complete = 0, 0 - @parser.on_headers_complete = proc {|h| @head += 1; :reset } - @parser.on_message_complete = proc { @complete += 1 } - @parser.on_body = proc {|b| fail } - - head_response = "HTTP/1.1 200 OK\r\nContent-Length:10\r\n\r\n" - - @parser << head_response - @head.should == 1 - @complete.should == 1 - - @parser << head_response - @head.should == 2 - @complete.should == 2 - end - - it "should retain callbacks after reset" do - @parser.reset!.should be_true - - @parser << "GET / HTTP/1.0\r\n\r\n" - @started.should be_true - @headers.should == {} - @done.should be_true - end - - it "should parse headers incrementally" do - request = - "GET / HTTP/1.0\r\n" + - "Header1: value 1\r\n" + - "Header2: value 2\r\n" + - "\r\n" - - while chunk = request.slice!(0,2) and !chunk.empty? - @parser << chunk - end - - @parser.headers.should == { - 'Header1' => 'value 1', - 'Header2' => 'value 2' - } - end - - it "should handle multiple headers using strings" do - @parser.header_value_type = :strings - - @parser << - "GET / HTTP/1.0\r\n" + - "Set-Cookie: PREF=ID=a7d2c98; expires=Fri, 05-Apr-2013 05:00:45 GMT; path=/; domain=.bob.com\r\n" + - "Set-Cookie: NID=46jSHxPM; path=/; domain=.bob.com; HttpOnly\r\n" + - "\r\n" - - @parser.headers["Set-Cookie"].should == "PREF=ID=a7d2c98; expires=Fri, 05-Apr-2013 05:00:45 GMT; path=/; domain=.bob.com, NID=46jSHxPM; path=/; domain=.bob.com; HttpOnly" - end - - it "should handle multiple headers using strings" do - @parser.header_value_type = :arrays - - @parser << - "GET / HTTP/1.0\r\n" + - "Set-Cookie: PREF=ID=a7d2c98; expires=Fri, 05-Apr-2013 05:00:45 GMT; path=/; domain=.bob.com\r\n" + - "Set-Cookie: NID=46jSHxPM; path=/; domain=.bob.com; HttpOnly\r\n" + - "\r\n" - - @parser.headers["Set-Cookie"].should == [ - "PREF=ID=a7d2c98; expires=Fri, 05-Apr-2013 05:00:45 GMT; path=/; domain=.bob.com", - "NID=46jSHxPM; path=/; domain=.bob.com; HttpOnly" - ] - end - - it "should handle multiple headers using mixed" do - @parser.header_value_type = :mixed - - @parser << - "GET / HTTP/1.0\r\n" + - "Set-Cookie: PREF=ID=a7d2c98; expires=Fri, 05-Apr-2013 05:00:45 GMT; path=/; domain=.bob.com\r\n" + - "Set-Cookie: NID=46jSHxPM; path=/; domain=.bob.com; HttpOnly\r\n" + - "\r\n" - - @parser.headers["Set-Cookie"].should == [ - "PREF=ID=a7d2c98; expires=Fri, 05-Apr-2013 05:00:45 GMT; path=/; domain=.bob.com", - "NID=46jSHxPM; path=/; domain=.bob.com; HttpOnly" - ] - end - - it "should handle a single cookie using mixed" do - @parser.header_value_type = :mixed - - @parser << - "GET / HTTP/1.0\r\n" + - "Set-Cookie: PREF=ID=a7d2c98; expires=Fri, 05-Apr-2013 05:00:45 GMT; path=/; domain=.bob.com\r\n" + - "\r\n" - - @parser.headers["Set-Cookie"].should == "PREF=ID=a7d2c98; expires=Fri, 05-Apr-2013 05:00:45 GMT; path=/; domain=.bob.com" - end - - it "should support alternative api" do - callbacks = double('callbacks') - callbacks.stub(:on_message_begin){ @started = true } - callbacks.stub(:on_headers_complete){ |e| @headers = e } - callbacks.stub(:on_body){ |chunk| @body << chunk } - callbacks.stub(:on_message_complete){ @done = true } - - @parser = HTTP::Parser.new(callbacks) - @parser << "GET / HTTP/1.0\r\n\r\n" - - @started.should be_true - @headers.should == {} - @body.should == '' - @done.should be_true - end - - it "should ignore extra content beyond specified length" do - @parser << - "GET / HTTP/1.0\r\n" + - "Content-Length: 5\r\n" + - "\r\n" + - "hello" + - " \n" - - @body.should == 'hello' - @done.should be_true - end - - it 'sets upgrade_data if available' do - @parser << - "GET /demo HTTP/1.1\r\n" + - "Connection: Upgrade\r\n" + - "Upgrade: WebSocket\r\n\r\n" + - "third key data" - - @parser.upgrade?.should be_true - @parser.upgrade_data.should == 'third key data' - end - - it 'sets upgrade_data to blank if un-available' do - @parser << - "GET /demo HTTP/1.1\r\n" + - "Connection: Upgrade\r\n" + - "Upgrade: WebSocket\r\n\r\n" - - @parser.upgrade?.should be_true - @parser.upgrade_data.should == '' - end - - it 'should stop parsing headers when instructed' do - request = "GET /websocket HTTP/1.1\r\n" + - "host: localhost\r\n" + - "connection: Upgrade\r\n" + - "upgrade: websocket\r\n" + - "sec-websocket-key: SD6/hpYbKjQ6Sown7pBbWQ==\r\n" + - "sec-websocket-version: 13\r\n" + - "\r\n" - - @parser.on_headers_complete = proc { |e| :stop } - offset = (@parser << request) - @parser.upgrade?.should be_true - @parser.upgrade_data.should == '' - offset.should == request.length - end - - it "should execute on_body on requests with no content-length" do - @parser.reset!.should be_true - - @head, @complete, @body = 0, 0, 0 - @parser.on_headers_complete = proc {|h| @head += 1 } - @parser.on_message_complete = proc { @complete += 1 } - @parser.on_body = proc {|b| @body += 1 } - - head_response = "HTTP/1.1 200 OK\r\n\r\nstuff" - - @parser << head_response - @parser << '' - @head.should == 1 - @complete.should == 1 - @body.should == 1 - end - - - %w[ request response ].each do |type| - JSON.parse(File.read(File.expand_path("../support/#{type}s.json", __FILE__))).each do |test| - test['headers'] ||= {} - next if !defined?(JRUBY_VERSION) and HTTP::Parser.strict? != test['strict'] - - it "should parse #{type}: #{test['name']}" do - @parser << test['raw'] - - @parser.http_method.should == test['method'] - @parser.keep_alive?.should == test['should_keep_alive'] - - if test.has_key?('upgrade') and test['upgrade'] != 0 - @parser.upgrade?.should be_true - @parser.upgrade_data.should == test['upgrade'] - end - - fields = %w[ - http_major - http_minor - ] - - if test['type'] == 'HTTP_REQUEST' - fields += %w[ - request_url - ] - else - fields += %w[ - status_code - ] - end - - fields.each do |field| - @parser.send(field).should == test[field] - end - - @headers.size.should == test['num_headers'] - @headers.should == test['headers'] - - @body.should == test['body'] - @body.size.should == test['body_size'] if test['body_size'] - end - end - end -end diff --git a/.gems/gems/http_parser.rb-0.6.0/spec/spec_helper.rb b/.gems/gems/http_parser.rb-0.6.0/spec/spec_helper.rb deleted file mode 100644 index a4295f9..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/spec/spec_helper.rb +++ /dev/null @@ -1 +0,0 @@ -require "http_parser" diff --git a/.gems/gems/http_parser.rb-0.6.0/spec/support/requests.json b/.gems/gems/http_parser.rb-0.6.0/spec/support/requests.json deleted file mode 100644 index dbb6e98..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/spec/support/requests.json +++ /dev/null @@ -1,612 +0,0 @@ -[ - { - "name": "curl get", - "type": "HTTP_REQUEST", - "raw": "GET /test HTTP/1.1\r\nUser-Agent: curl/7.18.0 (i486-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.1\r\nHost: 0.0.0.0=5000\r\nAccept: */*\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "GET", - "query_string": "", - "fragment": "", - "request_path": "/test", - "request_url": "/test", - "num_headers": 3, - "headers": { - "User-Agent": "curl/7.18.0 (i486-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.1", - "Host": "0.0.0.0=5000", - "Accept": "*/*" - }, - "body": "", - "strict": true - }, - { - "name": "firefox get", - "type": "HTTP_REQUEST", - "raw": "GET /favicon.ico HTTP/1.1\r\nHost: 0.0.0.0=5000\r\nUser-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008061015 Firefox/3.0\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nAccept-Encoding: gzip,deflate\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nKeep-Alive: 300\r\nConnection: keep-alive\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "GET", - "query_string": "", - "fragment": "", - "request_path": "/favicon.ico", - "request_url": "/favicon.ico", - "num_headers": 8, - "headers": { - "Host": "0.0.0.0=5000", - "User-Agent": "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008061015 Firefox/3.0", - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", - "Accept-Language": "en-us,en;q=0.5", - "Accept-Encoding": "gzip,deflate", - "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", - "Keep-Alive": "300", - "Connection": "keep-alive" - }, - "body": "", - "strict": true - }, - { - "name": "dumbfuck", - "type": "HTTP_REQUEST", - "raw": "GET /dumbfuck HTTP/1.1\r\naaaaaaaaaaaaa:++++++++++\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "GET", - "query_string": "", - "fragment": "", - "request_path": "/dumbfuck", - "request_url": "/dumbfuck", - "num_headers": 1, - "headers": { - "aaaaaaaaaaaaa": "++++++++++" - }, - "body": "", - "strict": true - }, - { - "name": "fragment in url", - "type": "HTTP_REQUEST", - "raw": "GET /forums/1/topics/2375?page=1#posts-17408 HTTP/1.1\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "GET", - "query_string": "page=1", - "fragment": "posts-17408", - "request_path": "/forums/1/topics/2375", - "request_url": "/forums/1/topics/2375?page=1#posts-17408", - "num_headers": 0, - "body": "", - "strict": true - }, - { - "name": "get no headers no body", - "type": "HTTP_REQUEST", - "raw": "GET /get_no_headers_no_body/world HTTP/1.1\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "GET", - "query_string": "", - "fragment": "", - "request_path": "/get_no_headers_no_body/world", - "request_url": "/get_no_headers_no_body/world", - "num_headers": 0, - "body": "", - "strict": true - }, - { - "name": "get one header no body", - "type": "HTTP_REQUEST", - "raw": "GET /get_one_header_no_body HTTP/1.1\r\nAccept: */*\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "GET", - "query_string": "", - "fragment": "", - "request_path": "/get_one_header_no_body", - "request_url": "/get_one_header_no_body", - "num_headers": 1, - "headers": { - "Accept": "*/*" - }, - "body": "", - "strict": true - }, - { - "name": "get funky content length body hello", - "type": "HTTP_REQUEST", - "raw": "GET /get_funky_content_length_body_hello HTTP/1.0\r\nconTENT-Length: 5\r\n\r\nHELLO", - "should_keep_alive": false, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 0, - "method": "GET", - "query_string": "", - "fragment": "", - "request_path": "/get_funky_content_length_body_hello", - "request_url": "/get_funky_content_length_body_hello", - "num_headers": 1, - "headers": { - "conTENT-Length": "5" - }, - "body": "HELLO", - "strict": true - }, - { - "name": "post identity body world", - "type": "HTTP_REQUEST", - "raw": "POST /post_identity_body_world?q=search#hey HTTP/1.1\r\nAccept: */*\r\nTransfer-Encoding: identity\r\nContent-Length: 5\r\n\r\nWorld", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "POST", - "query_string": "q=search", - "fragment": "hey", - "request_path": "/post_identity_body_world", - "request_url": "/post_identity_body_world?q=search#hey", - "num_headers": 3, - "headers": { - "Accept": "*/*", - "Transfer-Encoding": "identity", - "Content-Length": "5" - }, - "body": "World", - "strict": true - }, - { - "name": "post - chunked body: all your base are belong to us", - "type": "HTTP_REQUEST", - "raw": "POST /post_chunked_all_your_base HTTP/1.1\r\nTransfer-Encoding: chunked\r\n\r\n1e\r\nall your base are belong to us\r\n0\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "POST", - "query_string": "", - "fragment": "", - "request_path": "/post_chunked_all_your_base", - "request_url": "/post_chunked_all_your_base", - "num_headers": 1, - "headers": { - "Transfer-Encoding": "chunked" - }, - "body": "all your base are belong to us", - "strict": true - }, - { - "name": "two chunks ; triple zero ending", - "type": "HTTP_REQUEST", - "raw": "POST /two_chunks_mult_zero_end HTTP/1.1\r\nTransfer-Encoding: chunked\r\n\r\n5\r\nhello\r\n6\r\n world\r\n000\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "POST", - "query_string": "", - "fragment": "", - "request_path": "/two_chunks_mult_zero_end", - "request_url": "/two_chunks_mult_zero_end", - "num_headers": 1, - "headers": { - "Transfer-Encoding": "chunked" - }, - "body": "hello world", - "strict": true - }, - { - "name": "chunked with trailing headers. blech.", - "type": "HTTP_REQUEST", - "raw": "POST /chunked_w_trailing_headers HTTP/1.1\r\nTransfer-Encoding: chunked\r\n\r\n5\r\nhello\r\n6\r\n world\r\n0\r\nVary: *\r\nContent-Type: text/plain\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "POST", - "query_string": "", - "fragment": "", - "request_path": "/chunked_w_trailing_headers", - "request_url": "/chunked_w_trailing_headers", - "num_headers": 3, - "headers": { - "Transfer-Encoding": "chunked", - "Vary": "*", - "Content-Type": "text/plain" - }, - "body": "hello world", - "strict": true - }, - { - "name": "with bullshit after the length", - "type": "HTTP_REQUEST", - "raw": "POST /chunked_w_bullshit_after_length HTTP/1.1\r\nTransfer-Encoding: chunked\r\n\r\n5; ihatew3;whatthefuck=aretheseparametersfor\r\nhello\r\n6; blahblah; blah\r\n world\r\n0\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "POST", - "query_string": "", - "fragment": "", - "request_path": "/chunked_w_bullshit_after_length", - "request_url": "/chunked_w_bullshit_after_length", - "num_headers": 1, - "headers": { - "Transfer-Encoding": "chunked" - }, - "body": "hello world", - "strict": true - }, - { - "name": "with quotes", - "type": "HTTP_REQUEST", - "raw": "GET /with_\"stupid\"_quotes?foo=\"bar\" HTTP/1.1\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "GET", - "query_string": "foo=\"bar\"", - "fragment": "", - "request_path": "/with_\"stupid\"_quotes", - "request_url": "/with_\"stupid\"_quotes?foo=\"bar\"", - "num_headers": 0, - "headers": { - - }, - "body": "", - "strict": true - }, - { - "name": "apachebench get", - "type": "HTTP_REQUEST", - "raw": "GET /test HTTP/1.0\r\nHost: 0.0.0.0:5000\r\nUser-Agent: ApacheBench/2.3\r\nAccept: */*\r\n\r\n", - "should_keep_alive": false, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 0, - "method": "GET", - "query_string": "", - "fragment": "", - "request_path": "/test", - "request_url": "/test", - "num_headers": 3, - "headers": { - "Host": "0.0.0.0:5000", - "User-Agent": "ApacheBench/2.3", - "Accept": "*/*" - }, - "body": "", - "strict": true - }, - { - "name": "query url with question mark", - "type": "HTTP_REQUEST", - "raw": "GET /test.cgi?foo=bar?baz HTTP/1.1\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "GET", - "query_string": "foo=bar?baz", - "fragment": "", - "request_path": "/test.cgi", - "request_url": "/test.cgi?foo=bar?baz", - "num_headers": 0, - "headers": { - - }, - "body": "", - "strict": true - }, - { - "name": "newline prefix get", - "type": "HTTP_REQUEST", - "raw": "\r\nGET /test HTTP/1.1\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "GET", - "query_string": "", - "fragment": "", - "request_path": "/test", - "request_url": "/test", - "num_headers": 0, - "headers": { - - }, - "body": "", - "strict": true - }, - { - "name": "upgrade request", - "type": "HTTP_REQUEST", - "raw": "GET /demo HTTP/1.1\r\nHost: example.com\r\nConnection: Upgrade\r\nSec-WebSocket-Key2: 12998 5 Y3 1 .P00\r\nSec-WebSocket-Protocol: sample\r\nUpgrade: WebSocket\r\nSec-WebSocket-Key1: 4 @1 46546xW%0l 1 5\r\nOrigin: http://example.com\r\n\r\nHot diggity dogg", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "GET", - "query_string": "", - "fragment": "", - "request_path": "/demo", - "request_url": "/demo", - "num_headers": 7, - "upgrade": "Hot diggity dogg", - "headers": { - "Host": "example.com", - "Connection": "Upgrade", - "Sec-WebSocket-Key2": "12998 5 Y3 1 .P00", - "Sec-WebSocket-Protocol": "sample", - "Upgrade": "WebSocket", - "Sec-WebSocket-Key1": "4 @1 46546xW%0l 1 5", - "Origin": "http://example.com" - }, - "body": "", - "strict": true - }, - { - "name": "connect request", - "type": "HTTP_REQUEST", - "raw": "CONNECT 0-home0.netscape.com:443 HTTP/1.0\r\nUser-agent: Mozilla/1.1N\r\nProxy-authorization: basic aGVsbG86d29ybGQ=\r\n\r\nsome data\r\nand yet even more data", - "should_keep_alive": false, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 0, - "method": "CONNECT", - "query_string": "", - "fragment": "", - "request_path": "", - "request_url": "0-home0.netscape.com:443", - "num_headers": 2, - "upgrade": "some data\r\nand yet even more data", - "headers": { - "User-agent": "Mozilla/1.1N", - "Proxy-authorization": "basic aGVsbG86d29ybGQ=" - }, - "body": "", - "strict": true - }, - { - "name": "report request", - "type": "HTTP_REQUEST", - "raw": "REPORT /test HTTP/1.1\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "REPORT", - "query_string": "", - "fragment": "", - "request_path": "/test", - "request_url": "/test", - "num_headers": 0, - "headers": { - - }, - "body": "", - "strict": true - }, - { - "name": "request with no http version", - "type": "HTTP_REQUEST", - "raw": "GET /\r\n\r\n", - "should_keep_alive": false, - "message_complete_on_eof": false, - "http_major": 0, - "http_minor": 9, - "method": "GET", - "query_string": "", - "fragment": "", - "request_path": "/", - "request_url": "/", - "num_headers": 0, - "headers": { - - }, - "body": "", - "strict": true - }, - { - "name": "m-search request", - "type": "HTTP_REQUEST", - "raw": "M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nMAN: \"ssdp:discover\"\r\nST: \"ssdp:all\"\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "M-SEARCH", - "query_string": "", - "fragment": "", - "request_path": "*", - "request_url": "*", - "num_headers": 3, - "headers": { - "HOST": "239.255.255.250:1900", - "MAN": "\"ssdp:discover\"", - "ST": "\"ssdp:all\"" - }, - "body": "", - "strict": true - }, - { - "name": "line folding in header value", - "type": "HTTP_REQUEST", - "raw": "GET / HTTP/1.1\r\nLine1: abc\r\n\tdef\r\n ghi\r\n\t\tjkl\r\n mno \r\n\t \tqrs\r\nLine2: \t line2\t\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "GET", - "query_string": "", - "fragment": "", - "request_path": "/", - "request_url": "/", - "num_headers": 2, - "headers": { - "Line1": "abcdefghijklmno qrs", - "Line2": "line2\t" - }, - "body": "", - "strict": true - }, - { - "name": "host terminated by a query string", - "type": "HTTP_REQUEST", - "raw": "GET http://hypnotoad.org?hail=all HTTP/1.1\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "GET", - "query_string": "hail=all", - "fragment": "", - "request_path": "", - "request_url": "http://hypnotoad.org?hail=all", - "num_headers": 0, - "headers": { - - }, - "body": "", - "strict": true - }, - { - "name": "host:port terminated by a query string", - "type": "HTTP_REQUEST", - "raw": "GET http://hypnotoad.org:1234?hail=all HTTP/1.1\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "GET", - "query_string": "hail=all", - "fragment": "", - "request_path": "", - "request_url": "http://hypnotoad.org:1234?hail=all", - "port": 1234, - "num_headers": 0, - "headers": { - - }, - "body": "", - "strict": true - }, - { - "name": "host:port terminated by a space", - "type": "HTTP_REQUEST", - "raw": "GET http://hypnotoad.org:1234 HTTP/1.1\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "GET", - "query_string": "", - "fragment": "", - "request_path": "", - "request_url": "http://hypnotoad.org:1234", - "port": 1234, - "num_headers": 0, - "headers": { - - }, - "body": "", - "strict": true - }, - { - "name": "PATCH request", - "type": "HTTP_REQUEST", - "raw": "PATCH /file.txt HTTP/1.1\r\nHost: www.example.com\r\nContent-Type: application/example\r\nIf-Match: \"e0023aa4e\"\r\nContent-Length: 10\r\n\r\ncccccccccc", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "PATCH", - "query_string": "", - "fragment": "", - "request_path": "/file.txt", - "request_url": "/file.txt", - "num_headers": 4, - "headers": { - "Host": "www.example.com", - "Content-Type": "application/example", - "If-Match": "\"e0023aa4e\"", - "Content-Length": "10" - }, - "body": "cccccccccc", - "strict": true - }, - { - "name": "connect caps request", - "type": "HTTP_REQUEST", - "raw": "CONNECT HOME0.NETSCAPE.COM:443 HTTP/1.0\r\nUser-agent: Mozilla/1.1N\r\nProxy-authorization: basic aGVsbG86d29ybGQ=\r\n\r\n", - "should_keep_alive": false, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 0, - "method": "CONNECT", - "query_string": "", - "fragment": "", - "request_path": "", - "request_url": "HOME0.NETSCAPE.COM:443", - "num_headers": 2, - "upgrade": "", - "headers": { - "User-agent": "Mozilla/1.1N", - "Proxy-authorization": "basic aGVsbG86d29ybGQ=" - }, - "body": "", - "strict": true - }, - { - "name": "utf-8 path request", - "type": "HTTP_REQUEST", - "strict": false, - "raw": "GET /δ¶/δt/pope?q=1#narf HTTP/1.1\r\nHost: github.com\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "method": "GET", - "query_string": "q=1", - "fragment": "narf", - "request_path": "/δ¶/δt/pope", - "request_url": "/δ¶/δt/pope?q=1#narf", - "num_headers": 1, - "headers": { - "Host": "github.com" - }, - "body": "" - }, - { - "name": "hostname underscore", - "type": "HTTP_REQUEST", - "strict": false, - "raw": "CONNECT home_0.netscape.com:443 HTTP/1.0\r\nUser-agent: Mozilla/1.1N\r\nProxy-authorization: basic aGVsbG86d29ybGQ=\r\n\r\n", - "should_keep_alive": false, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 0, - "method": "CONNECT", - "query_string": "", - "fragment": "", - "request_path": "", - "request_url": "home_0.netscape.com:443", - "num_headers": 2, - "upgrade": "", - "headers": { - "User-agent": "Mozilla/1.1N", - "Proxy-authorization": "basic aGVsbG86d29ybGQ=" - }, - "body": "" - } -] \ No newline at end of file diff --git a/.gems/gems/http_parser.rb-0.6.0/spec/support/responses.json b/.gems/gems/http_parser.rb-0.6.0/spec/support/responses.json deleted file mode 100644 index 6dde20b..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/spec/support/responses.json +++ /dev/null @@ -1,375 +0,0 @@ -[ - { - "name": "google 301", - "type": "HTTP_RESPONSE", - "raw": "HTTP/1.1 301 Moved Permanently\r\nLocation: http://www.google.com/\r\nContent-Type: text/html; charset=UTF-8\r\nDate: Sun, 26 Apr 2009 11:11:49 GMT\r\nExpires: Tue, 26 May 2009 11:11:49 GMT\r\nX-$PrototypeBI-Version: 1.6.0.3\r\nCache-Control: public, max-age=2592000\r\nServer: gws\r\nContent-Length: 219 \r\n\r\n\n301 Moved\n

301 Moved

\nThe document has moved\nhere.\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "status_code": 301, - "num_headers": 8, - "headers": { - "Location": "http://www.google.com/", - "Content-Type": "text/html; charset=UTF-8", - "Date": "Sun, 26 Apr 2009 11:11:49 GMT", - "Expires": "Tue, 26 May 2009 11:11:49 GMT", - "X-$PrototypeBI-Version": "1.6.0.3", - "Cache-Control": "public, max-age=2592000", - "Server": "gws", - "Content-Length": "219 " - }, - "body": "\n301 Moved\n

301 Moved

\nThe document has moved\nhere.\r\n\r\n", - "strict": true - }, - { - "name": "no content-length response", - "type": "HTTP_RESPONSE", - "raw": "HTTP/1.1 200 OK\r\nDate: Tue, 04 Aug 2009 07:59:32 GMT\r\nServer: Apache\r\nX-Powered-By: Servlet/2.5 JSP/2.1\r\nContent-Type: text/xml; charset=utf-8\r\nConnection: close\r\n\r\n\n\n \n \n SOAP-ENV:Client\n Client Error\n \n \n", - "should_keep_alive": false, - "message_complete_on_eof": true, - "http_major": 1, - "http_minor": 1, - "status_code": 200, - "num_headers": 5, - "headers": { - "Date": "Tue, 04 Aug 2009 07:59:32 GMT", - "Server": "Apache", - "X-Powered-By": "Servlet/2.5 JSP/2.1", - "Content-Type": "text/xml; charset=utf-8", - "Connection": "close" - }, - "body": "\n\n \n \n SOAP-ENV:Client\n Client Error\n \n \n", - "strict": true - }, - { - "name": "404 no headers no body", - "type": "HTTP_RESPONSE", - "raw": "HTTP/1.1 404 Not Found\r\n\r\n", - "should_keep_alive": false, - "message_complete_on_eof": true, - "http_major": 1, - "http_minor": 1, - "status_code": 404, - "num_headers": 0, - "headers": { - - }, - "body_size": 0, - "body": "", - "strict": true - }, - { - "name": "301 no response phrase", - "type": "HTTP_RESPONSE", - "raw": "HTTP/1.1 301\r\n\r\n", - "should_keep_alive": false, - "message_complete_on_eof": true, - "http_major": 1, - "http_minor": 1, - "status_code": 301, - "num_headers": 0, - "headers": { - - }, - "body": "", - "strict": true - }, - { - "name": "200 trailing space on chunked body", - "type": "HTTP_RESPONSE", - "raw": "HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nTransfer-Encoding: chunked\r\n\r\n25 \r\nThis is the data in the first chunk\r\n\r\n1C\r\nand this is the second one\r\n\r\n0 \r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "status_code": 200, - "num_headers": 2, - "headers": { - "Content-Type": "text/plain", - "Transfer-Encoding": "chunked" - }, - "body_size": 65, - "body": "This is the data in the first chunk\r\nand this is the second one\r\n", - "strict": true - }, - { - "name": "no carriage ret", - "type": "HTTP_RESPONSE", - "raw": "HTTP/1.1 200 OK\nContent-Type: text/html; charset=utf-8\nConnection: close\n\nthese headers are from http://news.ycombinator.com/", - "should_keep_alive": false, - "message_complete_on_eof": true, - "http_major": 1, - "http_minor": 1, - "status_code": 200, - "num_headers": 2, - "headers": { - "Content-Type": "text/html; charset=utf-8", - "Connection": "close" - }, - "body": "these headers are from http://news.ycombinator.com/", - "strict": true - }, - { - "name": "proxy connection", - "type": "HTTP_RESPONSE", - "raw": "HTTP/1.1 200 OK\r\nContent-Type: text/html; charset=UTF-8\r\nContent-Length: 11\r\nProxy-Connection: close\r\nDate: Thu, 31 Dec 2009 20:55:48 +0000\r\n\r\nhello world", - "should_keep_alive": false, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "status_code": 200, - "num_headers": 4, - "headers": { - "Content-Type": "text/html; charset=UTF-8", - "Content-Length": "11", - "Proxy-Connection": "close", - "Date": "Thu, 31 Dec 2009 20:55:48 +0000" - }, - "body": "hello world", - "strict": true - }, - { - "name": "underscore header key", - "type": "HTTP_RESPONSE", - "raw": "HTTP/1.1 200 OK\r\nServer: DCLK-AdSvr\r\nContent-Type: text/xml\r\nContent-Length: 0\r\nDCLK_imp: v7;x;114750856;0-0;0;17820020;0/0;21603567/21621457/1;;~okv=;dcmt=text/xml;;~cs=o\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "status_code": 200, - "num_headers": 4, - "headers": { - "Server": "DCLK-AdSvr", - "Content-Type": "text/xml", - "Content-Length": "0", - "DCLK_imp": "v7;x;114750856;0-0;0;17820020;0/0;21603567/21621457/1;;~okv=;dcmt=text/xml;;~cs=o" - }, - "body": "", - "strict": true - }, - { - "name": "bonjourmadame.fr", - "type": "HTTP_RESPONSE", - "raw": "HTTP/1.0 301 Moved Permanently\r\nDate: Thu, 03 Jun 2010 09:56:32 GMT\r\nServer: Apache/2.2.3 (Red Hat)\r\nCache-Control: public\r\nPragma: \r\nLocation: http://www.bonjourmadame.fr/\r\nVary: Accept-Encoding\r\nContent-Length: 0\r\nContent-Type: text/html; charset=UTF-8\r\nConnection: keep-alive\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 0, - "status_code": 301, - "num_headers": 9, - "headers": { - "Date": "Thu, 03 Jun 2010 09:56:32 GMT", - "Server": "Apache/2.2.3 (Red Hat)", - "Cache-Control": "public", - "Pragma": "", - "Location": "http://www.bonjourmadame.fr/", - "Vary": "Accept-Encoding", - "Content-Length": "0", - "Content-Type": "text/html; charset=UTF-8", - "Connection": "keep-alive" - }, - "body": "", - "strict": true - }, - { - "name": "field underscore", - "type": "HTTP_RESPONSE", - "raw": "HTTP/1.1 200 OK\r\nDate: Tue, 28 Sep 2010 01:14:13 GMT\r\nServer: Apache\r\nCache-Control: no-cache, must-revalidate\r\nExpires: Mon, 26 Jul 1997 05:00:00 GMT\r\n.et-Cookie: PlaxoCS=1274804622353690521; path=/; domain=.plaxo.com\r\nVary: Accept-Encoding\r\n_eep-Alive: timeout=45\r\n_onnection: Keep-Alive\r\nTransfer-Encoding: chunked\r\nContent-Type: text/html\r\nConnection: close\r\n\r\n0\r\n\r\n", - "should_keep_alive": false, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "status_code": 200, - "num_headers": 11, - "headers": { - "Date": "Tue, 28 Sep 2010 01:14:13 GMT", - "Server": "Apache", - "Cache-Control": "no-cache, must-revalidate", - "Expires": "Mon, 26 Jul 1997 05:00:00 GMT", - ".et-Cookie": "PlaxoCS=1274804622353690521; path=/; domain=.plaxo.com", - "Vary": "Accept-Encoding", - "_eep-Alive": "timeout=45", - "_onnection": "Keep-Alive", - "Transfer-Encoding": "chunked", - "Content-Type": "text/html", - "Connection": "close" - }, - "body": "", - "strict": true - }, - { - "name": "non-ASCII in status line", - "type": "HTTP_RESPONSE", - "raw": "HTTP/1.1 500 Oriëntatieprobleem\r\nDate: Fri, 5 Nov 2010 23:07:12 GMT+2\r\nContent-Length: 0\r\nConnection: close\r\n\r\n", - "should_keep_alive": false, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "status_code": 500, - "num_headers": 3, - "headers": { - "Date": "Fri, 5 Nov 2010 23:07:12 GMT+2", - "Content-Length": "0", - "Connection": "close" - }, - "body": "", - "strict": true - }, - { - "name": "http version 0.9", - "type": "HTTP_RESPONSE", - "raw": "HTTP/0.9 200 OK\r\n\r\n", - "should_keep_alive": false, - "message_complete_on_eof": true, - "http_major": 0, - "http_minor": 9, - "status_code": 200, - "num_headers": 0, - "headers": { - - }, - "body": "", - "strict": true - }, - { - "name": "neither content-length nor transfer-encoding response", - "type": "HTTP_RESPONSE", - "raw": "HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\n\r\nhello world", - "should_keep_alive": false, - "message_complete_on_eof": true, - "http_major": 1, - "http_minor": 1, - "status_code": 200, - "num_headers": 1, - "headers": { - "Content-Type": "text/plain" - }, - "body": "hello world", - "strict": true - }, - { - "name": "HTTP/1.0 with keep-alive and EOF-terminated 200 status", - "type": "HTTP_RESPONSE", - "raw": "HTTP/1.0 200 OK\r\nConnection: keep-alive\r\n\r\n", - "should_keep_alive": false, - "message_complete_on_eof": true, - "http_major": 1, - "http_minor": 0, - "status_code": 200, - "num_headers": 1, - "headers": { - "Connection": "keep-alive" - }, - "body_size": 0, - "body": "", - "strict": true - }, - { - "name": "HTTP/1.0 with keep-alive and a 204 status", - "type": "HTTP_RESPONSE", - "raw": "HTTP/1.0 204 No content\r\nConnection: keep-alive\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 0, - "status_code": 204, - "num_headers": 1, - "headers": { - "Connection": "keep-alive" - }, - "body_size": 0, - "body": "", - "strict": true - }, - { - "name": "HTTP/1.1 with an EOF-terminated 200 status", - "type": "HTTP_RESPONSE", - "raw": "HTTP/1.1 200 OK\r\n\r\n", - "should_keep_alive": false, - "message_complete_on_eof": true, - "http_major": 1, - "http_minor": 1, - "status_code": 200, - "num_headers": 0, - "headers": { - - }, - "body_size": 0, - "body": "", - "strict": true - }, - { - "name": "HTTP/1.1 with a 204 status", - "type": "HTTP_RESPONSE", - "raw": "HTTP/1.1 204 No content\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "status_code": 204, - "num_headers": 0, - "headers": { - - }, - "body_size": 0, - "body": "", - "strict": true - }, - { - "name": "HTTP/1.1 with a 204 status and keep-alive disabled", - "type": "HTTP_RESPONSE", - "raw": "HTTP/1.1 204 No content\r\nConnection: close\r\n\r\n", - "should_keep_alive": false, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "status_code": 204, - "num_headers": 1, - "headers": { - "Connection": "close" - }, - "body_size": 0, - "body": "", - "strict": true - }, - { - "name": "HTTP/1.1 with chunked endocing and a 200 response", - "type": "HTTP_RESPONSE", - "raw": "HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\n0\r\n\r\n", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "status_code": 200, - "num_headers": 1, - "headers": { - "Transfer-Encoding": "chunked" - }, - "body_size": 0, - "body": "", - "strict": true - }, - { - "name": "field space", - "type": "HTTP_RESPONSE", - "strict": false, - "raw": "HTTP/1.1 200 OK\r\nServer: Microsoft-IIS/6.0\r\nX-Powered-By: ASP.NET\r\nen-US Content-Type: text/xml\r\nContent-Type: text/xml\r\nContent-Length: 16\r\nDate: Fri, 23 Jul 2010 18:45:38 GMT\r\nConnection: keep-alive\r\n\r\nhello", - "should_keep_alive": true, - "message_complete_on_eof": false, - "http_major": 1, - "http_minor": 1, - "status_code": 200, - "num_headers": 7, - "headers": { - "Server": "Microsoft-IIS/6.0", - "X-Powered-By": "ASP.NET", - "en-US Content-Type": "text/xml", - "Content-Type": "text/xml", - "Content-Length": "16", - "Date": "Fri, 23 Jul 2010 18:45:38 GMT", - "Connection": "keep-alive" - }, - "body": "hello" - } -] \ No newline at end of file diff --git a/.gems/gems/http_parser.rb-0.6.0/tasks/compile.rake b/.gems/gems/http_parser.rb-0.6.0/tasks/compile.rake deleted file mode 100644 index 22d6f6d..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/tasks/compile.rake +++ /dev/null @@ -1,42 +0,0 @@ -require 'rubygems/package_task' -require 'rake/extensiontask' -require 'rake/javaextensiontask' - -def gemspec - @clean_gemspec ||= eval(File.read(File.expand_path('../../http_parser.rb.gemspec', __FILE__))) -end - -Gem::PackageTask.new(gemspec) do |pkg| -end - -if RUBY_PLATFORM =~ /java/ - Rake::JavaExtensionTask.new("ruby_http_parser", gemspec) do |ext| - ext.classpath = File.expand_path('../../ext/ruby_http_parser/vendor/http-parser-java/ext/primitives.jar', __FILE__) - end -else - Rake::ExtensionTask.new("ruby_http_parser", gemspec) do |ext| - unless RUBY_PLATFORM =~ /mswin|mingw/ - ext.cross_compile = true - ext.cross_platform = ['x86-mingw32', 'x86-mswin32-60'] - - # inject 1.8/1.9 pure-ruby entry point - ext.cross_compiling do |spec| - spec.files += ['lib/ruby_http_parser.rb'] - end - end - end -end - -file 'lib/ruby_http_parser.rb' do |t| - File.open(t.name, 'wb') do |f| - f.write <<-eoruby -RUBY_VERSION =~ /(\\d+.\\d+)/ -require "\#{$1}/ruby_http_parser" - eoruby - end - at_exit{ FileUtils.rm t.name if File.exists?(t.name) } -end - -if Rake::Task.task_defined?(:cross) - task :cross => 'lib/ruby_http_parser.rb' -end diff --git a/.gems/gems/http_parser.rb-0.6.0/tasks/fixtures.rake b/.gems/gems/http_parser.rb-0.6.0/tasks/fixtures.rake deleted file mode 100644 index b5d36ef..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/tasks/fixtures.rake +++ /dev/null @@ -1,71 +0,0 @@ -desc "Generate test fixtures" -task :fixtures => :submodules do - require 'yajl' - data = File.read File.expand_path('../../ext/ruby_http_parser/vendor/http-parser/test.c', __FILE__) - - %w[ requests responses ].each do |type| - # find test definitions in between requests/responses[]= and .name=NULL - tmp = data[/#{type}\[\]\s*=(.+?),\s*\{\s*\.name=\s*NULL/m, 1] - - # replace first { with a [ (parsing an array of test cases) - tmp.sub!('{','[') - - # replace booleans - tmp.gsub!('TRUE', 'true') - tmp.gsub!('FALSE', 'false') - - # mark strict mode tests - tmp.gsub!(%r|#if\s+!HTTP_PARSER_STRICT(.+?)#endif\s*/\*\s*!HTTP_PARSER_STRICT.+\n|m){ - $1.gsub(/^(.+,\.type= .+)$/, "\\1\n, .strict= false") - } - - # remove macros and comments - tmp.gsub!(/^#(if|elif|endif|define).+$/,'') - tmp.gsub!(/\/\*(.+?)\*\/$/,'') - - # HTTP_* enums become strings - tmp.gsub!(/(= )(HTTP_\w+)/){ - "#{$1}#{$2.sub('MSEARCH','M-SEARCH').dump}" - } - - # join multiline strings for body and raw data - tmp.gsub!(/((body|raw)\s*=)(.+?)(\n\s+[\},])/m){ - before, after = $1, $4 - raw = $3.split("\n").map{ |l| l.strip[1..-2] }.join('') - "#{before} \"#{raw}\" #{after}" - } - - # make headers an array of array tuples - tmp.gsub!(/(\.headers\s*=)(.+?)(\s*,\.)/m){ - before, after = $1, $3 - raw = $2.gsub('{', '[').gsub('}', ']') - "#{before} #{raw} #{after}" - } - - # .name= becomes "name": - tmp.gsub!(/^(.{2,5})\.(\w+)\s*=/){ - "#{$1}#{$2.dump}: " - } - - # evaluate addition expressions - tmp.gsub!(/(body_size\":\s*)(\d+)\+(\d+)/){ - "#{$1}#{$2.to_i+$3.to_i}" - } - - # end result array - tmp << ']' - - # normalize data - results = Yajl.load(tmp, :symbolize_keys => true) - results.map{ |res| - res[:headers] and res[:headers] = Hash[*res[:headers].flatten] - res[:method] and res[:method].gsub!(/^HTTP_/, '') - res[:strict] = true unless res.has_key?(:strict) - } - - # write to a file - File.open("spec/support/#{type}.json", 'w'){ |f| - f.write Yajl.dump(results, :pretty => true) - } - end -end diff --git a/.gems/gems/http_parser.rb-0.6.0/tasks/spec.rake b/.gems/gems/http_parser.rb-0.6.0/tasks/spec.rake deleted file mode 100644 index 8f5d9ea..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/tasks/spec.rake +++ /dev/null @@ -1,5 +0,0 @@ -require "rspec/core/rake_task" - -RSpec::Core::RakeTask.new do |t| - t.rspec_opts = %w(-fs -c) -end diff --git a/.gems/gems/http_parser.rb-0.6.0/tasks/submodules.rake b/.gems/gems/http_parser.rb-0.6.0/tasks/submodules.rake deleted file mode 100644 index d978e9f..0000000 --- a/.gems/gems/http_parser.rb-0.6.0/tasks/submodules.rake +++ /dev/null @@ -1,7 +0,0 @@ -desc "Fetch upstream submodules" -task :submodules do - if Dir['ext/ruby_http_parser/vendor/http-parser/*'].empty? - sh 'git submodule init' - sh 'git submodule update' - end -end diff --git a/.gems/gems/json-1.8.1/.gitignore b/.gems/gems/json-1.8.1/.gitignore deleted file mode 100644 index 297633e..0000000 --- a/.gems/gems/json-1.8.1/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -.*.sw[pon] -coverage -tags -pkg -.nfs.* -.idea -java/Json.iml -Gemfile.lock -.rvmrc -*.rbc -.rbx -.AppleDouble -.DS_Store diff --git a/.gems/gems/json-1.8.1/.travis.yml b/.gems/gems/json-1.8.1/.travis.yml deleted file mode 100644 index f5b49d0..0000000 --- a/.gems/gems/json-1.8.1/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -# Passes arguments to bundle install (http://gembundler.com/man/bundle-install.1.html) -bundler_args: --binstubs - -# Specify which ruby versions you wish to run your tests on, each version will be used -rvm: - - 1.8.7 - - 1.9.2 - - 1.9.3 - - 2.0.0 - - ree - - rbx-18mode - - rbx-19mode - - jruby-18mode - - jruby-19mode - - ruby-head -matrix: - allow_failures: - - rvm: rbx-18mode - - rvm: rbx-19mode -script: "bundle exec rake" diff --git a/.gems/gems/json-1.8.1/CHANGES b/.gems/gems/json-1.8.1/CHANGES deleted file mode 100644 index 6a67cfc..0000000 --- a/.gems/gems/json-1.8.1/CHANGES +++ /dev/null @@ -1,284 +0,0 @@ -2013-05-13 (1.8.1) - * Remove Rubinius exception since transcoding should be working now. -2013-05-13 (1.8.0) - * Fix https://github.com/flori/json/issues/162 reported by Marc-Andre - Lafortune . Thanks! - * Applied patches by Yui NARUSE to suppress warning with - -Wchar-subscripts and better validate UTF-8 strings. - * Applied patch by ginriki@github to remove unnecessary if. - * Add load/dump interface to JSON::GenericObject to make - serialize :some_attribute, JSON::GenericObject - work in Rails active models for convenient SomeModel#some_attribute.foo.bar - access to serialised JSON data. -2013-02-04 (1.7.7) - * Security fix for JSON create_additions default value and - JSON::GenericObject. It should not be possible to create additions unless - explicitely requested by setting the create_additions argument to true or - using the JSON.load/dump interface. If JSON::GenericObject is supposed to - be automatically deserialised, this has to be explicitely enabled by - setting - JSON::GenericObject.json_creatable = true - as well. - * Remove useless assert in fbuffer implementation. - * Apply patch attached to https://github.com/flori/json/issues#issue/155 - provided by John Shahid , Thx! - * Add license information to rubygems spec data, reported by Jordi Massaguer Pla . - * Improve documentation, thx to Zachary Scott . -2012-11-29 (1.7.6) - * Add GeneratorState#merge alias for JRuby, fix state accessor methods. Thx to - jvshahid@github. - * Increase hash likeness of state objects. -2012-08-17 (1.7.5) - * Fix compilation of extension on older rubies. -2012-07-26 (1.7.4) - * Fix compilation problem on AIX, see https://github.com/flori/json/issues/142 -2012-05-12 (1.7.3) - * Work around Rubinius encoding issues using iconv for conversion instead. -2012-05-11 (1.7.2) - * Fix some encoding issues, that cause problems for the pure and the - extension variant in jruby 1.9 mode. -2012-04-28 (1.7.1) - * Some small fixes for building -2012-04-28 (1.7.0) - * Add JSON::GenericObject for method access to objects transmitted via JSON. -2012-04-27 (1.6.7) - * Fix possible crash when trying to parse nil value. -2012-02-11 (1.6.6) - * Propagate src encoding to values made from it (fixes 1.9 mode converting - everything to ascii-8bit; harmless for 1.8 mode too) (Thomas E. Enebo - ), should fix - https://github.com/flori/json/issues#issue/119. - * Fix https://github.com/flori/json/issues#issue/124 Thx to Jason Hutchens. - * Fix https://github.com/flori/json/issues#issue/117 -2012-01-15 (1.6.5) - * Vit Ondruch reported a bug that shows up when using - optimisation under GCC 4.7. Thx to him, Bohuslav Kabrda - and Yui NARUSE for debugging and - developing a patch fix. -2011-12-24 (1.6.4) - * Patches that improve speed on JRuby contributed by Charles Oliver Nutter - . - * Support object_class/array_class with duck typed hash/array. -2011-12-01 (1.6.3) - * Let JSON.load('') return nil as well to make mysql text columns (default to - '') work better for serialization. -2011-11-21 (1.6.2) - * Add support for OpenStruct and BigDecimal. - * Fix bug when parsing nil in quirks_mode. - * Make JSON.dump and JSON.load methods better cooperate with Rails' serialize - method. Just use: serialize :value, JSON - * Fix bug with time serialization concerning nanoseconds. Thanks for the - patch go to Josh Partlow (jpartlow@github). - * Improve parsing speed for JSON numbers (integers and floats) in a similar way to - what Evan Phoenix suggested in: - https://github.com/flori/json/pull/103 -2011-09-18 (1.6.1) - * Using -target 1.5 to force Java bits to compile with 1.5. -2011-09-12 (1.6.0) - * Extract utilities (prettifier and GUI-editor) in its own gem json-utils. - * Split json/add/core into different files for classes to be serialised. -2011-08-31 (1.5.4) - * Fix memory leak when used from multiple JRuby. (Patch by - jfirebaugh@github). - * Apply patch by Eric Wong that fixes garbage collection problem - reported in https://github.com/flori/json/issues/46. - * Add :quirks_mode option to parser and generator. - * Add support for Rational and Complex number additions via json/add/complex - and json/add/rational requires. -2011-06-20 (1.5.3) - * Alias State#configure method as State#merge to increase duck type synonymy with Hash. - * Add as_json methods in json/add/core, so rails can create its json objects - the new way. -2011-05-11 (1.5.2) - * Apply documentation patch by Cory Monty . - * Add gemspecs for json and json_pure. - * Fix bug in jruby pretty printing. - * Fix bug in object_class and array_class when inheriting from Hash or Array. -2011-01-24 (1.5.1) - * Made rake-compiler build a fat binary gem. This should fix issue - https://github.com/flori/json/issues#issue/54. -2011-01-22 (1.5.0) - * Included Java source codes for the Jruby extension made by Daniel Luz - . - * Output full exception message of deep_const_get to aid debugging. - * Fixed an issue with ruby 1.9 Module#const_defined? method, that was - reported by Riley Goodside. -2010-08-09 (1.4.6) - * Fixed oversight reported in http://github.com/flori/json/issues/closed#issue/23, - always create a new object from the state prototype. - * Made pure and ext api more similar again. -2010-08-07 (1.4.5) - * Manage data structure nesting depth in state object during generation. This - should reduce problems with to_json method definіtions that only have one - argument. - * Some fixes in the state objects and additional tests. -2010-08-06 (1.4.4) - * Fixes build problem for rubinius under OS X, http://github.com/flori/json/issues/closed#issue/25 - * Fixes crashes described in http://github.com/flori/json/issues/closed#issue/21 and - http://github.com/flori/json/issues/closed#issue/23 -2010-05-05 (1.4.3) - * Fixed some test assertions, from Ruby r27587 and r27590, patch by nobu. - * Fixed issue http://github.com/flori/json/issues/#issue/20 reported by - electronicwhisper@github. Thx! -2010-04-26 (1.4.2) - * Applied patch from naruse Yui NARUSE to make building with - Microsoft Visual C possible again. - * Applied patch from devrandom in order to allow building of - json_pure if extensiontask is not present. - * Thanks to Dustin Schneider , who reported a memory - leak, which is fixed in this release. - * Applied 993f261ccb8f911d2ae57e9db48ec7acd0187283 patch from josh@github. -2010-04-25 (1.4.1) - * Fix for a bug reported by Dan DeLeo , caused by T_FIXNUM - being different on 32bit/64bit architectures. -2010-04-23 (1.4.0) - * Major speed improvements and building with simplified - directory/file-structure. - * Extension should at least be comapatible with MRI, YARV and Rubinius. -2010-04-07 (1.2.4) - * Triger const_missing callback to make Rails' dynamic class loading work. -2010-03-11 (1.2.3) - * Added a State#[] method which returns an attribute's value in order to - increase duck type compatibility to Hash. -2010-02-27 (1.2.2) - * Made some changes to make the building of the parser/generator compatible - to Rubinius. -2009-11-25 (1.2.1) - * Added :symbolize_names option to Parser, which returns symbols instead of - strings in object names/keys. -2009-10-01 (1.2.0) - * fast_generate now raises an exeception for nan and infinite floats. - * On Ruby 1.8 json supports parsing of UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, - and UTF-32LE JSON documents now. Under Ruby 1.9 the M17n conversion - functions are used to convert from all supported encodings. ASCII-8BIT - encoded strings are handled like all strings under Ruby 1.8 were. - * Better documentation -2009-08-23 (1.1.9) - * Added forgotten main doc file extra_rdoc_files. -2009-08-23 (1.1.8) - * Applied a patch by OZAWA Sakuro to make json/pure - work in environments that don't provide iconv. - * Applied patch by okkez_ in order to fix Ruby Bug #1768: - http://redmine.ruby-lang.org/issues/show/1768. - * Finally got around to avoid the rather paranoid escaping of ?/ characters - in the generator's output. The parsers aren't affected by this change. - Thanks to Rich Apodaca for the suggestion. -2009-06-29 (1.1.7) - * Security Fix for JSON::Pure::Parser. A specially designed string could - cause catastrophic backtracking in one of the parser's regular expressions - in earlier 1.1.x versions. JSON::Ext::Parser isn't affected by this issue. - Thanks to Bartosz Blimke for reporting this - problem. - * This release also uses a less strict ruby version requirement for the - creation of the mswin32 native gem. -2009-05-10 (1.1.6) - * No changes. І tested native linux gems in the last release and they don't - play well with different ruby versions other than the one the gem was built - with. This release is just to bump the version number in order to skip the - native gem on rubyforge. -2009-05-10 (1.1.5) - * Started to build gems with rake-compiler gem. - * Applied patch object/array class patch from Brian Candler - and fixes. -2009-04-01 (1.1.4) - * Fixed a bug in the creation of serialized generic rails objects reported by - Friedrich Graeter . - * Deleted tests/runner.rb, we're using testrb instead. - * Editor supports Infinity in numbers now. - * Made some changes in order to get the library to compile/run under Ruby - 1.9. - * Improved speed of the code path for the fast_generate method in the pure - variant. -2008-07-10 (1.1.3) - * Wesley Beary reported a bug in json/add/core's DateTime - handling: If the nominator and denominator of the offset were divisible by - each other Ruby's Rational#to_s returns them as an integer not a fraction - with '/'. This caused a ZeroDivisionError during parsing. - * Use Date#start and DateTime#start instead of sg method, while - remaining backwards compatible. - * Supports ragel >= 6.0 now. - * Corrected some tests. - * Some minor changes. -2007-11-27 (1.1.2) - * Remember default dir (last used directory) in editor. - * JSON::Editor.edit method added, the editor can now receive json texts from - the clipboard via C-v. - * Load json texts from an URL pasted via middle button press. - * Added :create_additions option to Parser. This makes it possible to disable - the creation of additions by force, in order to treat json texts as data - while having additions loaded. - * Jacob Maine reported, that JSON(:foo) outputs a JSON - object if the rails addition is enabled, which is wrong. It now outputs a - JSON string "foo" instead, like suggested by Jacob Maine. - * Discovered a bug in the Ruby Bugs Tracker on rubyforge, that was reported - by John Evans lgastako@gmail.com. He could produce a crash in the JSON - generator by returning something other than a String instance from a - to_json method. I now guard against this by doing a rather crude type - check, which raises an exception instead of crashing. -2007-07-06 (1.1.1) - * Yui NARUSE sent some patches to fix tests for Ruby - 1.9. I applied them and adapted some of them a bit to run both on 1.8 and - 1.9. - * Introduced a JSON.parse! method without depth checking for people who like - danger. - * Made generate and pretty_generate methods configurable by an options hash. - * Added :allow_nan option to parser and generator in order to handle NaN, - Infinity, and -Infinity correctly - if requested. Floats, which aren't numbers, - aren't valid JSON according to RFC4627, so by default an exception will be - raised if any of these symbols are encountered. Thanks to Andrea Censi - for his hint about this. - * Fixed some more tests for Ruby 1.9. - * Implemented dump/load interface of Marshal as suggested in ruby-core:11405 - by murphy . - * Implemented the max_nesting feature for generate methods, too. - * Added some implementations for ruby core's custom objects for - serialisation/deserialisation purposes. -2007-05-21 (1.1.0) - * Implemented max_nesting feature for parser to avoid stack overflows for - data from untrusted sources. If you trust the source, you can disable it - with the option max_nesting => false. - * Piers Cawley reported a bug, that not every - character can be escaped by ?\ as required by RFC4627. There's a - contradiction between David Crockford's JSON checker test vectors (in - tests/fixtures) and RFC4627, though. I decided to stick to the RFC, because - the JSON checker seems to be a bit older than the RFC. - * Extended license to Ruby License, which includes the GPL. - * Added keyboard shortcuts, and 'Open location' menu item to edit_json.rb. -2007-05-09 (1.0.4) - * Applied a patch from Yui NARUSE to make JSON compile - under Ruby 1.9. Thank you very much for mailing it to me! - * Made binary variants of JSON fail early, instead of falling back to the - pure version. This should avoid overshadowing of eventual problems while - loading of the binary. -2007-03-24 (1.0.3) - * Improved performance of pure variant a bit. - * The ext variant of this release supports the mswin32 platform. Ugh! -2007-03-24 (1.0.2) - * Ext Parser didn't parse 0e0 correctly into 0.0: Fixed! -2007-03-24 (1.0.1) - * Forgot some object files in the build dir. I really like that - not! -2007-03-24 (1.0.0) - * Added C implementations for the JSON generator and a ragel based JSON - parser in C. - * Much more tests, especially fixtures from json.org. - * Further improved conformance to RFC4627. -2007-02-09 (0.4.3) - * Conform more to RFC4627 for JSON: This means JSON strings - now always must contain exactly one object "{ ... }" or array "[ ... ]" in - order to be parsed without raising an exception. The definition of what - constitutes a whitespace is narrower in JSON than in Ruby ([ \t\r\n]), and - there are differences in floats and integers (no octals or hexadecimals) as - well. - * Added aliases generate and pretty_generate of unparse and pretty_unparse. - * Fixed a test case. - * Catch an Iconv::InvalidEncoding exception, that seems to occur on some Sun - boxes with SunOS 5.8, if iconv doesn't support utf16 conversions. This was - reported by Andrew R Jackson , thanks a bunch! -2006-08-25 (0.4.2) - * Fixed a bug in handling solidi (/-characters), that was reported by - Kevin Gilpin . -2006-02-06 (0.4.1) - * Fixed a bug related to escaping with backslashes. Thanks for the report go - to Florian Munz . -2005-09-23 (0.4.0) - * Initial Rubyforge Version diff --git a/.gems/gems/json-1.8.1/COPYING b/.gems/gems/json-1.8.1/COPYING deleted file mode 100644 index c3a2126..0000000 --- a/.gems/gems/json-1.8.1/COPYING +++ /dev/null @@ -1,58 +0,0 @@ -Ruby is copyrighted free software by Yukihiro Matsumoto . -You can redistribute it and/or modify it under either the terms of the GPL -(see GPL file), or the conditions below: - - 1. You may make and give away verbatim copies of the source form of the - software without restriction, provided that you duplicate all of the - original copyright notices and associated disclaimers. - - 2. You may modify your copy of the software in any way, provided that - you do at least ONE of the following: - - a) place your modifications in the Public Domain or otherwise - make them Freely Available, such as by posting said - modifications to Usenet or an equivalent medium, or by allowing - the author to include your modifications in the software. - - b) use the modified software only within your corporation or - organization. - - c) rename any non-standard executables so the names do not conflict - with standard executables, which must also be provided. - - d) make other distribution arrangements with the author. - - 3. You may distribute the software in object code or executable - form, provided that you do at least ONE of the following: - - a) distribute the executables and library files of the software, - together with instructions (in the manual page or equivalent) - on where to get the original distribution. - - b) accompany the distribution with the machine-readable source of - the software. - - c) give non-standard executables non-standard names, with - instructions on where to get the original software distribution. - - d) make other distribution arrangements with the author. - - 4. You may modify and include the part of the software into any other - software (possibly commercial). But some files in the distribution - are not written by the author, so that they are not under this terms. - - They are gc.c(partly), utils.c(partly), regex.[ch], st.[ch] and some - files under the ./missing directory. See each file for the copying - condition. - - 5. The scripts and library files supplied as input to or produced as - output from the software do not automatically fall under the - copyright of the software, but belong to whomever generated them, - and may be sold commercially, and may be aggregated with this - software. - - 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE. - diff --git a/.gems/gems/json-1.8.1/COPYING-json-jruby b/.gems/gems/json-1.8.1/COPYING-json-jruby deleted file mode 100644 index 137a3da..0000000 --- a/.gems/gems/json-1.8.1/COPYING-json-jruby +++ /dev/null @@ -1,57 +0,0 @@ -JSON-JRuby is copyrighted free software by Daniel Luz , -and is a derivative work of Florian Frank's json library . -You can redistribute it and/or modify it under either the terms of the GPL -version 2 (see the file GPL), or the conditions below: - - 1. You may make and give away verbatim copies of the source form of the - software without restriction, provided that you duplicate all of the - original copyright notices and associated disclaimers. - - 2. You may modify your copy of the software in any way, provided that - you do at least ONE of the following: - - a) place your modifications in the Public Domain or otherwise - make them Freely Available, such as by posting said - modifications to Usenet or an equivalent medium, or by allowing - the author to include your modifications in the software. - - b) use the modified software only within your corporation or - organization. - - c) give non-standard binaries non-standard names, with - instructions on where to get the original software distribution. - - d) make other distribution arrangements with the author. - - 3. You may distribute the software in object code or binary form, - provided that you do at least ONE of the following: - - a) distribute the binaries and library files of the software, - together with instructions (in the manual page or equivalent) - on where to get the original distribution. - - b) accompany the distribution with the machine-readable source of - the software. - - c) give non-standard binaries non-standard names, with - instructions on where to get the original software distribution. - - d) make other distribution arrangements with the author. - - 4. You may modify and include the part of the software into any other - software (possibly commercial). But some files in the distribution - are not written by the author, so that they are not under these terms. - - For the list of those files and their copying conditions, see the - file LEGAL. - - 5. The scripts and library files supplied as input to or produced as - output from the software do not automatically fall under the - copyright of the software, but belong to whomever generated them, - and may be sold commercially, and may be aggregated with this - software. - - 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE. diff --git a/.gems/gems/json-1.8.1/GPL b/.gems/gems/json-1.8.1/GPL deleted file mode 100644 index db2fc45..0000000 --- a/.gems/gems/json-1.8.1/GPL +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/.gems/gems/json-1.8.1/Gemfile b/.gems/gems/json-1.8.1/Gemfile deleted file mode 100644 index 65d039b..0000000 --- a/.gems/gems/json-1.8.1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -# vim: set ft=ruby: - -source 'https://rubygems.org' - -gemspec :name => 'json' -gemspec :name => 'json_pure' -gemspec :name => 'json-java' - -gem 'utils' -gem 'test-unit' -gem 'debugger', :platform => :mri_19 diff --git a/.gems/gems/json-1.8.1/README-json-jruby.markdown b/.gems/gems/json-1.8.1/README-json-jruby.markdown deleted file mode 100644 index 1336837..0000000 --- a/.gems/gems/json-1.8.1/README-json-jruby.markdown +++ /dev/null @@ -1,33 +0,0 @@ -JSON-JRuby -========== - -JSON-JRuby is a port of Florian Frank's native -[`json` library](http://json.rubyforge.org/) to JRuby. -It aims to be a perfect drop-in replacement for `json_pure`. - - -Development version -=================== - -The latest version is available from the -[Git repository](http://github.com/mernen/json-jruby/tree): - - git clone git://github.com/mernen/json-jruby.git - - -Compiling -========= - -You'll need JRuby version 1.2 or greater to build JSON-JRuby. -Its path must be set on the `jruby.dir` property of -`nbproject/project.properties` (defaults to `../jruby`). - -Additionally, you'll need [Ant](http://ant.apache.org/), and -[Ragel](http://www.cs.queensu.ca/~thurston/ragel/) 6.4 or greater. - -Then, from the folder where the sources are located, type: - - ant clean jar - -to clean any leftovers from previous builds and generate the `.jar` files. -To generate a RubyGem, specify the `gem` action rather than `jar`. diff --git a/.gems/gems/json-1.8.1/README.rdoc b/.gems/gems/json-1.8.1/README.rdoc deleted file mode 100644 index eda896f..0000000 --- a/.gems/gems/json-1.8.1/README.rdoc +++ /dev/null @@ -1,358 +0,0 @@ -= JSON implementation for Ruby {}[http://travis-ci.org/flori/json] - -== Description - -This is a implementation of the JSON specification according to RFC 4627 -http://www.ietf.org/rfc/rfc4627.txt . Starting from version 1.0.0 on there -will be two variants available: - -* A pure ruby variant, that relies on the iconv and the stringscan - extensions, which are both part of the ruby standard library. -* The quite a bit faster C extension variant, which is in parts implemented - in C and comes with its own unicode conversion functions and a parser - generated by the ragel state machine compiler - http://www.cs.queensu.ca/~thurston/ragel . - -Both variants of the JSON generator generate UTF-8 character sequences by -default. If an :ascii_only option with a true value is given, they escape all -non-ASCII and control characters with \uXXXX escape sequences, and support -UTF-16 surrogate pairs in order to be able to generate the whole range of -unicode code points. - -All strings, that are to be encoded as JSON strings, should be UTF-8 byte -sequences on the Ruby side. To encode raw binary strings, that aren't UTF-8 -encoded, please use the to_json_raw_object method of String (which produces -an object, that contains a byte array) and decode the result on the receiving -endpoint. - -The JSON parsers can parse UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, and UTF-32LE -JSON documents under Ruby 1.8. Under Ruby 1.9 they take advantage of Ruby's -M17n features and can parse all documents which have the correct -String#encoding set. If a document string has ASCII-8BIT as an encoding the -parser attempts to figure out which of the UTF encodings from above it is and -trys to parse it. - -== Installation - -It's recommended to use the extension variant of JSON, because it's faster than -the pure ruby variant. If you cannot build it on your system, you can settle -for the latter. - -Just type into the command line as root: - - # rake install - -The above command will build the extensions and install them on your system. - - # rake install_pure - -or - - # ruby install.rb - -will just install the pure ruby implementation of JSON. - -If you use Rubygems you can type - - # gem install json - -instead, to install the newest JSON version. - -There is also a pure ruby json only variant of the gem, that can be installed -with: - - # gem install json_pure - -== Compiling the extensions yourself - -If you want to build the extensions yourself you need rake: - - You can get it from rubyforge: - http://rubyforge.org/projects/rake - - or just type - - # gem install rake - - for the installation via rubygems. - -If you want to create the parser.c file from its parser.rl file or draw nice -graphviz images of the state machines, you need ragel from: http://www.cs.queensu.ca/~thurston/ragel - - -== Usage - -To use JSON you can - require 'json' -to load the installed variant (either the extension 'json' or the pure -variant 'json_pure'). If you have installed the extension variant, you can -pick either the extension variant or the pure variant by typing - require 'json/ext' -or - require 'json/pure' - -Now you can parse a JSON document into a ruby data structure by calling - - JSON.parse(document) - -If you want to generate a JSON document from a ruby data structure call - JSON.generate(data) - -You can also use the pretty_generate method (which formats the output more -verbosely and nicely) or fast_generate (which doesn't do any of the security -checks generate performs, e. g. nesting deepness checks). - -To create a valid JSON document you have to make sure, that the output is -embedded in either a JSON array [] or a JSON object {}. The easiest way to do -this, is by putting your values in a Ruby Array or Hash instance. - -There are also the JSON and JSON[] methods which use parse on a String or -generate a JSON document from an array or hash: - - document = JSON 'test' => 23 # => "{\"test\":23}" - document = JSON['test'] => 23 # => "{\"test\":23}" - -and - - data = JSON '{"test":23}' # => {"test"=>23} - data = JSON['{"test":23}'] # => {"test"=>23} - -You can choose to load a set of common additions to ruby core's objects if -you - require 'json/add/core' - -After requiring this you can, e. g., serialise/deserialise Ruby ranges: - - JSON JSON(1..10) # => 1..10 - -To find out how to add JSON support to other or your own classes, read the -section "More Examples" below. - -To get the best compatibility to rails' JSON implementation, you can - require 'json/add/rails' - -Both of the additions attempt to require 'json' (like above) first, if it has -not been required yet. - -== More Examples - -To create a JSON document from a ruby data structure, you can call -JSON.generate like that: - - json = JSON.generate [1, 2, {"a"=>3.141}, false, true, nil, 4..10] - # => "[1,2,{\"a\":3.141},false,true,null,\"4..10\"]" - -To get back a ruby data structure from a JSON document, you have to call -JSON.parse on it: - - JSON.parse json - # => [1, 2, {"a"=>3.141}, false, true, nil, "4..10"] - -Note, that the range from the original data structure is a simple -string now. The reason for this is, that JSON doesn't support ranges -or arbitrary classes. In this case the json library falls back to call -Object#to_json, which is the same as #to_s.to_json. - -It's possible to add JSON support serialization to arbitrary classes by -simply implementing a more specialized version of the #to_json method, that -should return a JSON object (a hash converted to JSON with #to_json) like -this (don't forget the *a for all the arguments): - - class Range - def to_json(*a) - { - 'json_class' => self.class.name, # = 'Range' - 'data' => [ first, last, exclude_end? ] - }.to_json(*a) - end - end - -The hash key 'json_class' is the class, that will be asked to deserialise the -JSON representation later. In this case it's 'Range', but any namespace of -the form 'A::B' or '::A::B' will do. All other keys are arbitrary and can be -used to store the necessary data to configure the object to be deserialised. - -If a the key 'json_class' is found in a JSON object, the JSON parser checks -if the given class responds to the json_create class method. If so, it is -called with the JSON object converted to a Ruby hash. So a range can -be deserialised by implementing Range.json_create like this: - - class Range - def self.json_create(o) - new(*o['data']) - end - end - -Now it possible to serialise/deserialise ranges as well: - - json = JSON.generate [1, 2, {"a"=>3.141}, false, true, nil, 4..10] - # => "[1,2,{\"a\":3.141},false,true,null,{\"json_class\":\"Range\",\"data\":[4,10,false]}]" - JSON.parse json - # => [1, 2, {"a"=>3.141}, false, true, nil, 4..10] - -JSON.generate always creates the shortest possible string representation of a -ruby data structure in one line. This is good for data storage or network -protocols, but not so good for humans to read. Fortunately there's also -JSON.pretty_generate (or JSON.pretty_generate) that creates a more readable -output: - - puts JSON.pretty_generate([1, 2, {"a"=>3.141}, false, true, nil, 4..10]) - [ - 1, - 2, - { - "a": 3.141 - }, - false, - true, - null, - { - "json_class": "Range", - "data": [ - 4, - 10, - false - ] - } - ] - -There are also the methods Kernel#j for generate, and Kernel#jj for -pretty_generate output to the console, that work analogous to Core Ruby's p and -the pp library's pp methods. - -The script tools/server.rb contains a small example if you want to test, how -receiving a JSON object from a webrick server in your browser with the -javasript prototype library http://www.prototypejs.org works. - -== Speed Comparisons - -I have created some benchmark results (see the benchmarks/data-p4-3Ghz -subdir of the package) for the JSON-parser to estimate the speed up in the C -extension: - - Comparing times (call_time_mean): - 1 ParserBenchmarkExt#parser 900 repeats: - 553.922304770 ( real) -> 21.500x - 0.001805307 - 2 ParserBenchmarkYAML#parser 1000 repeats: - 224.513358139 ( real) -> 8.714x - 0.004454078 - 3 ParserBenchmarkPure#parser 1000 repeats: - 26.755020642 ( real) -> 1.038x - 0.037376163 - 4 ParserBenchmarkRails#parser 1000 repeats: - 25.763381731 ( real) -> 1.000x - 0.038814780 - calls/sec ( time) -> speed covers - secs/call - -In the table above 1 is JSON::Ext::Parser, 2 is YAML.load with YAML -compatbile JSON document, 3 is is JSON::Pure::Parser, and 4 is -ActiveSupport::JSON.decode. The ActiveSupport JSON-decoder converts the -input first to YAML and then uses the YAML-parser, the conversion seems to -slow it down so much that it is only as fast as the JSON::Pure::Parser! - -If you look at the benchmark data you can see that this is mostly caused by -the frequent high outliers - the median of the Rails-parser runs is still -overall smaller than the median of the JSON::Pure::Parser runs: - - Comparing times (call_time_median): - 1 ParserBenchmarkExt#parser 900 repeats: - 800.592479481 ( real) -> 26.936x - 0.001249075 - 2 ParserBenchmarkYAML#parser 1000 repeats: - 271.002390644 ( real) -> 9.118x - 0.003690004 - 3 ParserBenchmarkRails#parser 1000 repeats: - 30.227910865 ( real) -> 1.017x - 0.033082008 - 4 ParserBenchmarkPure#parser 1000 repeats: - 29.722384421 ( real) -> 1.000x - 0.033644676 - calls/sec ( time) -> speed covers - secs/call - -I have benchmarked the JSON-Generator as well. This generated a few more -values, because there are different modes that also influence the achieved -speed: - - Comparing times (call_time_mean): - 1 GeneratorBenchmarkExt#generator_fast 1000 repeats: - 547.354332608 ( real) -> 15.090x - 0.001826970 - 2 GeneratorBenchmarkExt#generator_safe 1000 repeats: - 443.968212317 ( real) -> 12.240x - 0.002252414 - 3 GeneratorBenchmarkExt#generator_pretty 900 repeats: - 375.104545883 ( real) -> 10.341x - 0.002665923 - 4 GeneratorBenchmarkPure#generator_fast 1000 repeats: - 49.978706968 ( real) -> 1.378x - 0.020008521 - 5 GeneratorBenchmarkRails#generator 1000 repeats: - 38.531868759 ( real) -> 1.062x - 0.025952543 - 6 GeneratorBenchmarkPure#generator_safe 1000 repeats: - 36.927649925 ( real) -> 1.018x 7 (>=3859) - 0.027079979 - 7 GeneratorBenchmarkPure#generator_pretty 1000 repeats: - 36.272134441 ( real) -> 1.000x 6 (>=3859) - 0.027569373 - calls/sec ( time) -> speed covers - secs/call - -In the table above 1-3 are JSON::Ext::Generator methods. 4, 6, and 7 are -JSON::Pure::Generator methods and 5 is the Rails JSON generator. It is now a -bit faster than the generator_safe and generator_pretty methods of the pure -variant but slower than the others. - -To achieve the fastest JSON document output, you can use the fast_generate -method. Beware, that this will disable the checking for circular Ruby data -structures, which may cause JSON to go into an infinite loop. - -Here are the median comparisons for completeness' sake: - - Comparing times (call_time_median): - 1 GeneratorBenchmarkExt#generator_fast 1000 repeats: - 708.258020939 ( real) -> 16.547x - 0.001411915 - 2 GeneratorBenchmarkExt#generator_safe 1000 repeats: - 569.105020353 ( real) -> 13.296x - 0.001757145 - 3 GeneratorBenchmarkExt#generator_pretty 900 repeats: - 482.825371244 ( real) -> 11.280x - 0.002071142 - 4 GeneratorBenchmarkPure#generator_fast 1000 repeats: - 62.717626652 ( real) -> 1.465x - 0.015944481 - 5 GeneratorBenchmarkRails#generator 1000 repeats: - 43.965681162 ( real) -> 1.027x - 0.022745013 - 6 GeneratorBenchmarkPure#generator_safe 1000 repeats: - 43.929073409 ( real) -> 1.026x 7 (>=3859) - 0.022763968 - 7 GeneratorBenchmarkPure#generator_pretty 1000 repeats: - 42.802514491 ( real) -> 1.000x 6 (>=3859) - 0.023363113 - calls/sec ( time) -> speed covers - secs/call - -== Author - -Florian Frank - -== License - -Ruby License, see the COPYING file included in the source distribution. The -Ruby License includes the GNU General Public License (GPL), Version 2, so see -the file GPL as well. - -== Download - -The latest version of this library can be downloaded at - -* http://rubyforge.org/frs?group_id=953 - -Online Documentation should be located at - -* http://json.rubyforge.org diff --git a/.gems/gems/json-1.8.1/Rakefile b/.gems/gems/json-1.8.1/Rakefile deleted file mode 100644 index 1d13c2c..0000000 --- a/.gems/gems/json-1.8.1/Rakefile +++ /dev/null @@ -1,412 +0,0 @@ -begin - require 'rubygems/package_task' -rescue LoadError -end - -require 'rbconfig' -include\ - begin - RbConfig - rescue NameError - Config - end - -require 'rake/clean' -CLOBBER.include 'doc', 'Gemfile.lock' -CLEAN.include FileList['diagrams/*.*'], 'doc', 'coverage', 'tmp', - FileList["ext/**/{Makefile,mkmf.log}"], 'build', 'dist', FileList['**/*.rbc'], - FileList["{ext,lib}/**/*.{so,bundle,#{CONFIG['DLEXT']},o,obj,pdb,lib,manifest,exp,def,jar,class,dSYM}"], - FileList['java/src/**/*.class'] - -require 'rake/testtask' -class UndocumentedTestTask < Rake::TestTask - def desc(*) end -end - -def skip_sdoc(src) - src.gsub(/^.*sdoc.*/) { |s| s + ' if RUBY_VERSION > "1.8.6"' } -end - -MAKE = ENV['MAKE'] || %w[gmake make].find { |c| system(c, '-v') } -BUNDLE = ENV['BUNDLE'] || %w[bundle].find { |c| system(c, '-v') } -PKG_NAME = 'json' -PKG_TITLE = 'JSON Implementation for Ruby' -PKG_VERSION = File.read('VERSION').chomp -PKG_FILES = FileList[`git ls-files`.split(/\n/)] - -EXT_ROOT_DIR = 'ext/json/ext' -EXT_PARSER_DIR = "#{EXT_ROOT_DIR}/parser" -EXT_PARSER_DL = "#{EXT_PARSER_DIR}/parser.#{CONFIG['DLEXT']}" -RAGEL_PATH = "#{EXT_PARSER_DIR}/parser.rl" -EXT_PARSER_SRC = "#{EXT_PARSER_DIR}/parser.c" -EXT_GENERATOR_DIR = "#{EXT_ROOT_DIR}/generator" -EXT_GENERATOR_DL = "#{EXT_GENERATOR_DIR}/generator.#{CONFIG['DLEXT']}" -EXT_GENERATOR_SRC = "#{EXT_GENERATOR_DIR}/generator.c" - -JAVA_DIR = "java/src/json/ext" -JAVA_RAGEL_PATH = "#{JAVA_DIR}/Parser.rl" -JAVA_PARSER_SRC = "#{JAVA_DIR}/Parser.java" -JAVA_SOURCES = FileList["#{JAVA_DIR}/*.java"] -JAVA_CLASSES = [] -JRUBY_PARSER_JAR = File.expand_path("lib/json/ext/parser.jar") -JRUBY_GENERATOR_JAR = File.expand_path("lib/json/ext/generator.jar") - -RAGEL_CODEGEN = %w[rlcodegen rlgen-cd ragel].find { |c| system(c, '-v') } -RAGEL_DOTGEN = %w[rlgen-dot rlgen-cd ragel].find { |c| system(c, '-v') } - -desc "Installing library (pure)" -task :install_pure => :version do - ruby 'install.rb' -end - -task :install_ext_really do - sitearchdir = CONFIG["sitearchdir"] - cd 'ext' do - for file in Dir["json/ext/*.#{CONFIG['DLEXT']}"] - d = File.join(sitearchdir, file) - mkdir_p File.dirname(d) - install(file, d) - end - warn " *** Installed EXT ruby library." - end -end - -desc "Installing library (extension)" -task :install_ext => [ :compile, :install_pure, :install_ext_really ] - -desc "Installing library (extension)" -task :install => :install_ext - -if defined?(Gem) and defined?(Gem::PackageTask) - spec_pure = Gem::Specification.new do |s| - s.name = 'json_pure' - s.version = PKG_VERSION - s.summary = PKG_TITLE - s.description = "This is a JSON implementation in pure Ruby." - - s.files = PKG_FILES - - s.require_path = 'lib' - s.add_development_dependency 'permutation' - s.add_development_dependency 'sdoc', '~>0.3.16' - s.add_development_dependency 'rake', '~>0.9.2' - - s.extra_rdoc_files << 'README.rdoc' - s.rdoc_options << - '--title' << 'JSON implemention for ruby' << '--main' << 'README.rdoc' - s.test_files.concat Dir['./tests/test_*.rb'] - - s.author = "Florian Frank" - s.email = "flori@ping.de" - s.homepage = "http://flori.github.com/#{PKG_NAME}" - s.license = 'Ruby' - end - - desc 'Creates a json_pure.gemspec file' - task :gemspec_pure => :version do - File.open('json_pure.gemspec', 'w') do |gemspec| - gemspec.write skip_sdoc(spec_pure.to_ruby) - end - end - - Gem::PackageTask.new(spec_pure) do |pkg| - pkg.need_tar = true - pkg.package_files = PKG_FILES - end - - spec_ext = Gem::Specification.new do |s| - s.name = 'json' - s.version = PKG_VERSION - s.summary = PKG_TITLE - s.description = "This is a JSON implementation as a Ruby extension in C." - - s.files = PKG_FILES - - s.extensions = FileList['ext/**/extconf.rb'] - - s.require_path = 'lib' - s.add_development_dependency 'permutation' - s.add_development_dependency 'sdoc', '~>0.3.16' - - s.extra_rdoc_files << 'README.rdoc' - s.rdoc_options << - '--title' << 'JSON implemention for Ruby' << '--main' << 'README.rdoc' - s.test_files.concat Dir['./tests/test_*.rb'] - - s.author = "Florian Frank" - s.email = "flori@ping.de" - s.homepage = "http://flori.github.com/#{PKG_NAME}" - s.license = 'Ruby' - end - - desc 'Creates a json.gemspec file' - task :gemspec_ext => :version do - File.open('json.gemspec', 'w') do |gemspec| - gemspec.write skip_sdoc(spec_ext.to_ruby) - end - end - - Gem::PackageTask.new(spec_ext) do |pkg| - pkg.need_tar = true - pkg.package_files = PKG_FILES - end - - - desc 'Create all gemspec files' - task :gemspec => [ :gemspec_pure, :gemspec_ext ] -end - -desc m = "Writing version information for #{PKG_VERSION}" -task :version do - puts m - File.open(File.join('lib', 'json', 'version.rb'), 'w') do |v| - v.puts < [ :clean, :do_test_pure ] - -UndocumentedTestTask.new do |t| - t.name = 'do_test_pure' - t.libs << 'lib' - t.test_files = FileList['tests/test_*.rb'] - t.verbose = true - t.options = '-v' -end - -desc "Testing library (pure ruby and extension)" -task :test do - sh "env JSON=pure #{BUNDLE} exec rake test_pure" or exit 1 - sh "env JSON=ext #{BUNDLE} exec rake test_ext" or exit 1 -end - -namespace :gems do - desc 'Install all development gems' - task :install do - sh "#{BUNDLE}" - end -end - -if defined?(RUBY_ENGINE) and RUBY_ENGINE == 'jruby' - if ENV.key?('JAVA_HOME') - warn " *** JAVA_HOME was set to #{ENV['JAVA_HOME'].inspect}" - elsif File.directory?(local_java = '/usr/local/java/jdk') || - File.directory?(local_java = '/usr/lib/jvm/java-6-openjdk') - then - ENV['JAVA_HOME'] = local_java - end - if ENV['JAVA_HOME'] - warn " *** JAVA_HOME is set to #{ENV['JAVA_HOME'].inspect}" - ENV['PATH'] = ENV['PATH'].split(/:/).unshift(java_path = "#{ENV['JAVA_HOME']}/bin") * ':' - warn " *** java binaries are assumed to be in #{java_path.inspect}" - else - warn " *** JAVA_HOME was not set or could not be guessed!" - exit 1 - end - - file JAVA_PARSER_SRC => JAVA_RAGEL_PATH do - cd JAVA_DIR do - if RAGEL_CODEGEN == 'ragel' - sh "ragel Parser.rl -J -o Parser.java" - else - sh "ragel -x Parser.rl | #{RAGEL_CODEGEN} -J" - end - end - end - - desc "Generate parser for java with ragel" - task :ragel => JAVA_PARSER_SRC - - desc "Delete the ragel generated Java source" - task :ragel_clean do - rm_rf JAVA_PARSER_SRC - end - - JRUBY_JAR = File.join(CONFIG["libdir"], "jruby.jar") - if File.exist?(JRUBY_JAR) - JAVA_SOURCES.each do |src| - classpath = (Dir['java/lib/*.jar'] << 'java/src' << JRUBY_JAR) * ':' - obj = src.sub(/\.java\Z/, '.class') - file obj => src do - sh 'javac', '-classpath', classpath, '-source', '1.5', '-target', '1.5', src - end - JAVA_CLASSES << obj - end - else - warn "WARNING: Cannot find jruby in path => Cannot build jruby extension!" - end - - desc "Compiling jruby extension" - task :compile => JAVA_CLASSES - - desc "Package the jruby gem" - task :jruby_gem => :create_jar do - sh 'gem build json-java.gemspec' - mkdir_p 'pkg' - mv "json-#{PKG_VERSION}-java.gem", 'pkg' - end - - desc "Testing library (jruby)" - task :test_ext => [ :create_jar, :do_test_ext ] - - UndocumentedTestTask.new do |t| - t.name = 'do_test_ext' - t.libs << 'lib' - t.test_files = FileList['tests/test_*.rb'] - t.verbose = true - t.options = '-v' - end - - file JRUBY_PARSER_JAR => :compile do - cd 'java/src' do - parser_classes = FileList[ - "json/ext/ByteListTranscoder*.class", - "json/ext/OptionsReader*.class", - "json/ext/Parser*.class", - "json/ext/RuntimeInfo*.class", - "json/ext/StringDecoder*.class", - "json/ext/Utils*.class" - ] - sh 'jar', 'cf', File.basename(JRUBY_PARSER_JAR), *parser_classes - mv File.basename(JRUBY_PARSER_JAR), File.dirname(JRUBY_PARSER_JAR) - end - end - - desc "Create parser jar" - task :create_parser_jar => JRUBY_PARSER_JAR - - file JRUBY_GENERATOR_JAR => :compile do - cd 'java/src' do - generator_classes = FileList[ - "json/ext/ByteListTranscoder*.class", - "json/ext/OptionsReader*.class", - "json/ext/Generator*.class", - "json/ext/RuntimeInfo*.class", - "json/ext/StringEncoder*.class", - "json/ext/Utils*.class" - ] - sh 'jar', 'cf', File.basename(JRUBY_GENERATOR_JAR), *generator_classes - mv File.basename(JRUBY_GENERATOR_JAR), File.dirname(JRUBY_GENERATOR_JAR) - end - end - - desc "Create generator jar" - task :create_generator_jar => JRUBY_GENERATOR_JAR - - desc "Create parser and generator jars" - task :create_jar => [ :create_parser_jar, :create_generator_jar ] - - desc "Build all gems and archives for a new release of the jruby extension." - task :build => [ :clean, :version, :jruby_gem ] - - task :release => :build -else - desc "Compiling extension" - task :compile => [ EXT_PARSER_DL, EXT_GENERATOR_DL ] - - file EXT_PARSER_DL => EXT_PARSER_SRC do - cd EXT_PARSER_DIR do - ruby 'extconf.rb' - sh MAKE - end - cp "#{EXT_PARSER_DIR}/parser.#{CONFIG['DLEXT']}", EXT_ROOT_DIR - end - - file EXT_GENERATOR_DL => EXT_GENERATOR_SRC do - cd EXT_GENERATOR_DIR do - ruby 'extconf.rb' - sh MAKE - end - cp "#{EXT_GENERATOR_DIR}/generator.#{CONFIG['DLEXT']}", EXT_ROOT_DIR - end - - desc "Testing library (extension)" - task :test_ext => [ :compile, :do_test_ext ] - - UndocumentedTestTask.new do |t| - t.name = 'do_test_ext' - t.libs << 'ext' << 'lib' - t.test_files = FileList['tests/test_*.rb'] - t.verbose = true - t.options = '-v' - end - - desc "Create RDOC documentation" - task :doc => [ :version, EXT_PARSER_SRC ] do - sh "sdoc -o doc -t '#{PKG_TITLE}' -m README.rdoc README.rdoc lib/json.rb #{FileList['lib/json/**/*.rb']} #{EXT_PARSER_SRC} #{EXT_GENERATOR_SRC}" - end - - desc "Generate parser with ragel" - task :ragel => EXT_PARSER_SRC - - desc "Delete the ragel generated C source" - task :ragel_clean do - rm_rf EXT_PARSER_SRC - end - - desc "Update the tags file" - task :tags do - system 'ctags', *Dir['**/*.{rb,c,h,java}'] - end - - file EXT_PARSER_SRC => RAGEL_PATH do - cd EXT_PARSER_DIR do - if RAGEL_CODEGEN == 'ragel' - sh "ragel parser.rl -G2 -o parser.c" - else - sh "ragel -x parser.rl | #{RAGEL_CODEGEN} -G2" - end - src = File.read("parser.c").gsub(/[ \t]+$/, '') - File.open("parser.c", "w") {|f| f.print src} - end - end - - desc "Generate diagrams of ragel parser (ps)" - task :ragel_dot_ps do - root = 'diagrams' - specs = [] - File.new(RAGEL_PATH).grep(/^\s*machine\s*(\S+);\s*$/) { specs << $1 } - for s in specs - if RAGEL_DOTGEN == 'ragel' - sh "ragel #{RAGEL_PATH} -S#{s} -p -V | dot -Tps -o#{root}/#{s}.ps" - else - sh "ragel -x #{RAGEL_PATH} -S#{s} | #{RAGEL_DOTGEN} -p|dot -Tps -o#{root}/#{s}.ps" - end - end - end - - desc "Generate diagrams of ragel parser (png)" - task :ragel_dot_png do - root = 'diagrams' - specs = [] - File.new(RAGEL_PATH).grep(/^\s*machine\s*(\S+);\s*$/) { specs << $1 } - for s in specs - if RAGEL_DOTGEN == 'ragel' - sh "ragel #{RAGEL_PATH} -S#{s} -p -V | dot -Tpng -o#{root}/#{s}.png" - else - sh "ragel -x #{RAGEL_PATH} -S#{s} | #{RAGEL_DOTGEN} -p|dot -Tpng -o#{root}/#{s}.png" - end - end - end - - desc "Generate diagrams of ragel parser" - task :ragel_dot => [ :ragel_dot_png, :ragel_dot_ps ] - - desc "Build all gems and archives for a new release of json and json_pure." - task :build => [ :clean, :gemspec, :package ] - - task :release => :build -end - -desc "Compile in the the source directory" -task :default => [ :clean, :gemspec, :test ] diff --git a/.gems/gems/json-1.8.1/TODO b/.gems/gems/json-1.8.1/TODO deleted file mode 100644 index 8b13789..0000000 --- a/.gems/gems/json-1.8.1/TODO +++ /dev/null @@ -1 +0,0 @@ - diff --git a/.gems/gems/json-1.8.1/VERSION b/.gems/gems/json-1.8.1/VERSION deleted file mode 100644 index a8fdfda..0000000 --- a/.gems/gems/json-1.8.1/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.8.1 diff --git a/.gems/gems/json-1.8.1/data/example.json b/.gems/gems/json-1.8.1/data/example.json deleted file mode 100644 index 88b4e82..0000000 --- a/.gems/gems/json-1.8.1/data/example.json +++ /dev/null @@ -1 +0,0 @@ -{"a":2,"b":3.141,"TIME":"2007-03-14T11:52:40","c":"c","d":[1,"b",3.14],"COUNT":666,"e":{"foo":"bar"},"foo":"B\u00e4r","g":"\u677e\u672c\u884c\u5f18","h":1000.0,"bar":"\u00a9 \u2260 \u20ac!","i":0.001,"j":"\ud840\udc01"} diff --git a/.gems/gems/json-1.8.1/data/index.html b/.gems/gems/json-1.8.1/data/index.html deleted file mode 100644 index abe6fdb..0000000 --- a/.gems/gems/json-1.8.1/data/index.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - Javascript Example - - - - - -

Fetching object from server

-
- Wait...
- -
- - - diff --git a/.gems/gems/json-1.8.1/data/prototype.js b/.gems/gems/json-1.8.1/data/prototype.js deleted file mode 100644 index 5c73462..0000000 --- a/.gems/gems/json-1.8.1/data/prototype.js +++ /dev/null @@ -1,4184 +0,0 @@ -/* Prototype JavaScript framework, version 1.6.0 - * (c) 2005-2007 Sam Stephenson - * - * Prototype is freely distributable under the terms of an MIT-style license. - * For details, see the Prototype web site: http://www.prototypejs.org/ - * - *--------------------------------------------------------------------------*/ - -var Prototype = { - Version: '1.6.0', - - Browser: { - IE: !!(window.attachEvent && !window.opera), - Opera: !!window.opera, - WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1, - Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1, - MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/) - }, - - BrowserFeatures: { - XPath: !!document.evaluate, - ElementExtensions: !!window.HTMLElement, - SpecificElementExtensions: - document.createElement('div').__proto__ && - document.createElement('div').__proto__ !== - document.createElement('form').__proto__ - }, - - ScriptFragment: ']*>([\\S\\s]*?)<\/script>', - JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/, - - emptyFunction: function() { }, - K: function(x) { return x } -}; - -if (Prototype.Browser.MobileSafari) - Prototype.BrowserFeatures.SpecificElementExtensions = false; - -if (Prototype.Browser.WebKit) - Prototype.BrowserFeatures.XPath = false; - -/* Based on Alex Arnell's inheritance implementation. */ -var Class = { - create: function() { - var parent = null, properties = $A(arguments); - if (Object.isFunction(properties[0])) - parent = properties.shift(); - - function klass() { - this.initialize.apply(this, arguments); - } - - Object.extend(klass, Class.Methods); - klass.superclass = parent; - klass.subclasses = []; - - if (parent) { - var subclass = function() { }; - subclass.prototype = parent.prototype; - klass.prototype = new subclass; - parent.subclasses.push(klass); - } - - for (var i = 0; i < properties.length; i++) - klass.addMethods(properties[i]); - - if (!klass.prototype.initialize) - klass.prototype.initialize = Prototype.emptyFunction; - - klass.prototype.constructor = klass; - - return klass; - } -}; - -Class.Methods = { - addMethods: function(source) { - var ancestor = this.superclass && this.superclass.prototype; - var properties = Object.keys(source); - - if (!Object.keys({ toString: true }).length) - properties.push("toString", "valueOf"); - - for (var i = 0, length = properties.length; i < length; i++) { - var property = properties[i], value = source[property]; - if (ancestor && Object.isFunction(value) && - value.argumentNames().first() == "$super") { - var method = value, value = Object.extend((function(m) { - return function() { return ancestor[m].apply(this, arguments) }; - })(property).wrap(method), { - valueOf: function() { return method }, - toString: function() { return method.toString() } - }); - } - this.prototype[property] = value; - } - - return this; - } -}; - -var Abstract = { }; - -Object.extend = function(destination, source) { - for (var property in source) - destination[property] = source[property]; - return destination; -}; - -Object.extend(Object, { - inspect: function(object) { - try { - if (object === undefined) return 'undefined'; - if (object === null) return 'null'; - return object.inspect ? object.inspect() : object.toString(); - } catch (e) { - if (e instanceof RangeError) return '...'; - throw e; - } - }, - - toJSON: function(object) { - var type = typeof object; - switch (type) { - case 'undefined': - case 'function': - case 'unknown': return; - case 'boolean': return object.toString(); - } - - if (object === null) return 'null'; - if (object.toJSON) return object.toJSON(); - if (Object.isElement(object)) return; - - var results = []; - for (var property in object) { - var value = Object.toJSON(object[property]); - if (value !== undefined) - results.push(property.toJSON() + ': ' + value); - } - - return '{' + results.join(', ') + '}'; - }, - - toQueryString: function(object) { - return $H(object).toQueryString(); - }, - - toHTML: function(object) { - return object && object.toHTML ? object.toHTML() : String.interpret(object); - }, - - keys: function(object) { - var keys = []; - for (var property in object) - keys.push(property); - return keys; - }, - - values: function(object) { - var values = []; - for (var property in object) - values.push(object[property]); - return values; - }, - - clone: function(object) { - return Object.extend({ }, object); - }, - - isElement: function(object) { - return object && object.nodeType == 1; - }, - - isArray: function(object) { - return object && object.constructor === Array; - }, - - isHash: function(object) { - return object instanceof Hash; - }, - - isFunction: function(object) { - return typeof object == "function"; - }, - - isString: function(object) { - return typeof object == "string"; - }, - - isNumber: function(object) { - return typeof object == "number"; - }, - - isUndefined: function(object) { - return typeof object == "undefined"; - } -}); - -Object.extend(Function.prototype, { - argumentNames: function() { - var names = this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip"); - return names.length == 1 && !names[0] ? [] : names; - }, - - bind: function() { - if (arguments.length < 2 && arguments[0] === undefined) return this; - var __method = this, args = $A(arguments), object = args.shift(); - return function() { - return __method.apply(object, args.concat($A(arguments))); - } - }, - - bindAsEventListener: function() { - var __method = this, args = $A(arguments), object = args.shift(); - return function(event) { - return __method.apply(object, [event || window.event].concat(args)); - } - }, - - curry: function() { - if (!arguments.length) return this; - var __method = this, args = $A(arguments); - return function() { - return __method.apply(this, args.concat($A(arguments))); - } - }, - - delay: function() { - var __method = this, args = $A(arguments), timeout = args.shift() * 1000; - return window.setTimeout(function() { - return __method.apply(__method, args); - }, timeout); - }, - - wrap: function(wrapper) { - var __method = this; - return function() { - return wrapper.apply(this, [__method.bind(this)].concat($A(arguments))); - } - }, - - methodize: function() { - if (this._methodized) return this._methodized; - var __method = this; - return this._methodized = function() { - return __method.apply(null, [this].concat($A(arguments))); - }; - } -}); - -Function.prototype.defer = Function.prototype.delay.curry(0.01); - -Date.prototype.toJSON = function() { - return '"' + this.getUTCFullYear() + '-' + - (this.getUTCMonth() + 1).toPaddedString(2) + '-' + - this.getUTCDate().toPaddedString(2) + 'T' + - this.getUTCHours().toPaddedString(2) + ':' + - this.getUTCMinutes().toPaddedString(2) + ':' + - this.getUTCSeconds().toPaddedString(2) + 'Z"'; -}; - -var Try = { - these: function() { - var returnValue; - - for (var i = 0, length = arguments.length; i < length; i++) { - var lambda = arguments[i]; - try { - returnValue = lambda(); - break; - } catch (e) { } - } - - return returnValue; - } -}; - -RegExp.prototype.match = RegExp.prototype.test; - -RegExp.escape = function(str) { - return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); -}; - -/*--------------------------------------------------------------------------*/ - -var PeriodicalExecuter = Class.create({ - initialize: function(callback, frequency) { - this.callback = callback; - this.frequency = frequency; - this.currentlyExecuting = false; - - this.registerCallback(); - }, - - registerCallback: function() { - this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - execute: function() { - this.callback(this); - }, - - stop: function() { - if (!this.timer) return; - clearInterval(this.timer); - this.timer = null; - }, - - onTimerEvent: function() { - if (!this.currentlyExecuting) { - try { - this.currentlyExecuting = true; - this.execute(); - } finally { - this.currentlyExecuting = false; - } - } - } -}); -Object.extend(String, { - interpret: function(value) { - return value == null ? '' : String(value); - }, - specialChar: { - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '\\': '\\\\' - } -}); - -Object.extend(String.prototype, { - gsub: function(pattern, replacement) { - var result = '', source = this, match; - replacement = arguments.callee.prepareReplacement(replacement); - - while (source.length > 0) { - if (match = source.match(pattern)) { - result += source.slice(0, match.index); - result += String.interpret(replacement(match)); - source = source.slice(match.index + match[0].length); - } else { - result += source, source = ''; - } - } - return result; - }, - - sub: function(pattern, replacement, count) { - replacement = this.gsub.prepareReplacement(replacement); - count = count === undefined ? 1 : count; - - return this.gsub(pattern, function(match) { - if (--count < 0) return match[0]; - return replacement(match); - }); - }, - - scan: function(pattern, iterator) { - this.gsub(pattern, iterator); - return String(this); - }, - - truncate: function(length, truncation) { - length = length || 30; - truncation = truncation === undefined ? '...' : truncation; - return this.length > length ? - this.slice(0, length - truncation.length) + truncation : String(this); - }, - - strip: function() { - return this.replace(/^\s+/, '').replace(/\s+$/, ''); - }, - - stripTags: function() { - return this.replace(/<\/?[^>]+>/gi, ''); - }, - - stripScripts: function() { - return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); - }, - - extractScripts: function() { - var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); - var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); - return (this.match(matchAll) || []).map(function(scriptTag) { - return (scriptTag.match(matchOne) || ['', ''])[1]; - }); - }, - - evalScripts: function() { - return this.extractScripts().map(function(script) { return eval(script) }); - }, - - escapeHTML: function() { - var self = arguments.callee; - self.text.data = this; - return self.div.innerHTML; - }, - - unescapeHTML: function() { - var div = new Element('div'); - div.innerHTML = this.stripTags(); - return div.childNodes[0] ? (div.childNodes.length > 1 ? - $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) : - div.childNodes[0].nodeValue) : ''; - }, - - toQueryParams: function(separator) { - var match = this.strip().match(/([^?#]*)(#.*)?$/); - if (!match) return { }; - - return match[1].split(separator || '&').inject({ }, function(hash, pair) { - if ((pair = pair.split('='))[0]) { - var key = decodeURIComponent(pair.shift()); - var value = pair.length > 1 ? pair.join('=') : pair[0]; - if (value != undefined) value = decodeURIComponent(value); - - if (key in hash) { - if (!Object.isArray(hash[key])) hash[key] = [hash[key]]; - hash[key].push(value); - } - else hash[key] = value; - } - return hash; - }); - }, - - toArray: function() { - return this.split(''); - }, - - succ: function() { - return this.slice(0, this.length - 1) + - String.fromCharCode(this.charCodeAt(this.length - 1) + 1); - }, - - times: function(count) { - return count < 1 ? '' : new Array(count + 1).join(this); - }, - - camelize: function() { - var parts = this.split('-'), len = parts.length; - if (len == 1) return parts[0]; - - var camelized = this.charAt(0) == '-' - ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1) - : parts[0]; - - for (var i = 1; i < len; i++) - camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1); - - return camelized; - }, - - capitalize: function() { - return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); - }, - - underscore: function() { - return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase(); - }, - - dasherize: function() { - return this.gsub(/_/,'-'); - }, - - inspect: function(useDoubleQuotes) { - var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) { - var character = String.specialChar[match[0]]; - return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16); - }); - if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"'; - return "'" + escapedString.replace(/'/g, '\\\'') + "'"; - }, - - toJSON: function() { - return this.inspect(true); - }, - - unfilterJSON: function(filter) { - return this.sub(filter || Prototype.JSONFilter, '#{1}'); - }, - - isJSON: function() { - var str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''); - return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str); - }, - - evalJSON: function(sanitize) { - var json = this.unfilterJSON(); - try { - if (!sanitize || json.isJSON()) return eval('(' + json + ')'); - } catch (e) { } - throw new SyntaxError('Badly formed JSON string: ' + this.inspect()); - }, - - include: function(pattern) { - return this.indexOf(pattern) > -1; - }, - - startsWith: function(pattern) { - return this.indexOf(pattern) === 0; - }, - - endsWith: function(pattern) { - var d = this.length - pattern.length; - return d >= 0 && this.lastIndexOf(pattern) === d; - }, - - empty: function() { - return this == ''; - }, - - blank: function() { - return /^\s*$/.test(this); - }, - - interpolate: function(object, pattern) { - return new Template(this, pattern).evaluate(object); - } -}); - -if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, { - escapeHTML: function() { - return this.replace(/&/g,'&').replace(//g,'>'); - }, - unescapeHTML: function() { - return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); - } -}); - -String.prototype.gsub.prepareReplacement = function(replacement) { - if (Object.isFunction(replacement)) return replacement; - var template = new Template(replacement); - return function(match) { return template.evaluate(match) }; -}; - -String.prototype.parseQuery = String.prototype.toQueryParams; - -Object.extend(String.prototype.escapeHTML, { - div: document.createElement('div'), - text: document.createTextNode('') -}); - -with (String.prototype.escapeHTML) div.appendChild(text); - -var Template = Class.create({ - initialize: function(template, pattern) { - this.template = template.toString(); - this.pattern = pattern || Template.Pattern; - }, - - evaluate: function(object) { - if (Object.isFunction(object.toTemplateReplacements)) - object = object.toTemplateReplacements(); - - return this.template.gsub(this.pattern, function(match) { - if (object == null) return ''; - - var before = match[1] || ''; - if (before == '\\') return match[2]; - - var ctx = object, expr = match[3]; - var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/, match = pattern.exec(expr); - if (match == null) return before; - - while (match != null) { - var comp = match[1].startsWith('[') ? match[2].gsub('\\\\]', ']') : match[1]; - ctx = ctx[comp]; - if (null == ctx || '' == match[3]) break; - expr = expr.substring('[' == match[3] ? match[1].length : match[0].length); - match = pattern.exec(expr); - } - - return before + String.interpret(ctx); - }.bind(this)); - } -}); -Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/; - -var $break = { }; - -var Enumerable = { - each: function(iterator, context) { - var index = 0; - iterator = iterator.bind(context); - try { - this._each(function(value) { - iterator(value, index++); - }); - } catch (e) { - if (e != $break) throw e; - } - return this; - }, - - eachSlice: function(number, iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var index = -number, slices = [], array = this.toArray(); - while ((index += number) < array.length) - slices.push(array.slice(index, index+number)); - return slices.collect(iterator, context); - }, - - all: function(iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var result = true; - this.each(function(value, index) { - result = result && !!iterator(value, index); - if (!result) throw $break; - }); - return result; - }, - - any: function(iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var result = false; - this.each(function(value, index) { - if (result = !!iterator(value, index)) - throw $break; - }); - return result; - }, - - collect: function(iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var results = []; - this.each(function(value, index) { - results.push(iterator(value, index)); - }); - return results; - }, - - detect: function(iterator, context) { - iterator = iterator.bind(context); - var result; - this.each(function(value, index) { - if (iterator(value, index)) { - result = value; - throw $break; - } - }); - return result; - }, - - findAll: function(iterator, context) { - iterator = iterator.bind(context); - var results = []; - this.each(function(value, index) { - if (iterator(value, index)) - results.push(value); - }); - return results; - }, - - grep: function(filter, iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var results = []; - - if (Object.isString(filter)) - filter = new RegExp(filter); - - this.each(function(value, index) { - if (filter.match(value)) - results.push(iterator(value, index)); - }); - return results; - }, - - include: function(object) { - if (Object.isFunction(this.indexOf)) - if (this.indexOf(object) != -1) return true; - - var found = false; - this.each(function(value) { - if (value == object) { - found = true; - throw $break; - } - }); - return found; - }, - - inGroupsOf: function(number, fillWith) { - fillWith = fillWith === undefined ? null : fillWith; - return this.eachSlice(number, function(slice) { - while(slice.length < number) slice.push(fillWith); - return slice; - }); - }, - - inject: function(memo, iterator, context) { - iterator = iterator.bind(context); - this.each(function(value, index) { - memo = iterator(memo, value, index); - }); - return memo; - }, - - invoke: function(method) { - var args = $A(arguments).slice(1); - return this.map(function(value) { - return value[method].apply(value, args); - }); - }, - - max: function(iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var result; - this.each(function(value, index) { - value = iterator(value, index); - if (result == undefined || value >= result) - result = value; - }); - return result; - }, - - min: function(iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var result; - this.each(function(value, index) { - value = iterator(value, index); - if (result == undefined || value < result) - result = value; - }); - return result; - }, - - partition: function(iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var trues = [], falses = []; - this.each(function(value, index) { - (iterator(value, index) ? - trues : falses).push(value); - }); - return [trues, falses]; - }, - - pluck: function(property) { - var results = []; - this.each(function(value) { - results.push(value[property]); - }); - return results; - }, - - reject: function(iterator, context) { - iterator = iterator.bind(context); - var results = []; - this.each(function(value, index) { - if (!iterator(value, index)) - results.push(value); - }); - return results; - }, - - sortBy: function(iterator, context) { - iterator = iterator.bind(context); - return this.map(function(value, index) { - return {value: value, criteria: iterator(value, index)}; - }).sort(function(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }).pluck('value'); - }, - - toArray: function() { - return this.map(); - }, - - zip: function() { - var iterator = Prototype.K, args = $A(arguments); - if (Object.isFunction(args.last())) - iterator = args.pop(); - - var collections = [this].concat(args).map($A); - return this.map(function(value, index) { - return iterator(collections.pluck(index)); - }); - }, - - size: function() { - return this.toArray().length; - }, - - inspect: function() { - return '#'; - } -}; - -Object.extend(Enumerable, { - map: Enumerable.collect, - find: Enumerable.detect, - select: Enumerable.findAll, - filter: Enumerable.findAll, - member: Enumerable.include, - entries: Enumerable.toArray, - every: Enumerable.all, - some: Enumerable.any -}); -function $A(iterable) { - if (!iterable) return []; - if (iterable.toArray) return iterable.toArray(); - var length = iterable.length, results = new Array(length); - while (length--) results[length] = iterable[length]; - return results; -} - -if (Prototype.Browser.WebKit) { - function $A(iterable) { - if (!iterable) return []; - if (!(Object.isFunction(iterable) && iterable == '[object NodeList]') && - iterable.toArray) return iterable.toArray(); - var length = iterable.length, results = new Array(length); - while (length--) results[length] = iterable[length]; - return results; - } -} - -Array.from = $A; - -Object.extend(Array.prototype, Enumerable); - -if (!Array.prototype._reverse) Array.prototype._reverse = Array.prototype.reverse; - -Object.extend(Array.prototype, { - _each: function(iterator) { - for (var i = 0, length = this.length; i < length; i++) - iterator(this[i]); - }, - - clear: function() { - this.length = 0; - return this; - }, - - first: function() { - return this[0]; - }, - - last: function() { - return this[this.length - 1]; - }, - - compact: function() { - return this.select(function(value) { - return value != null; - }); - }, - - flatten: function() { - return this.inject([], function(array, value) { - return array.concat(Object.isArray(value) ? - value.flatten() : [value]); - }); - }, - - without: function() { - var values = $A(arguments); - return this.select(function(value) { - return !values.include(value); - }); - }, - - reverse: function(inline) { - return (inline !== false ? this : this.toArray())._reverse(); - }, - - reduce: function() { - return this.length > 1 ? this : this[0]; - }, - - uniq: function(sorted) { - return this.inject([], function(array, value, index) { - if (0 == index || (sorted ? array.last() != value : !array.include(value))) - array.push(value); - return array; - }); - }, - - intersect: function(array) { - return this.uniq().findAll(function(item) { - return array.detect(function(value) { return item === value }); - }); - }, - - clone: function() { - return [].concat(this); - }, - - size: function() { - return this.length; - }, - - inspect: function() { - return '[' + this.map(Object.inspect).join(', ') + ']'; - }, - - toJSON: function() { - var results = []; - this.each(function(object) { - var value = Object.toJSON(object); - if (value !== undefined) results.push(value); - }); - return '[' + results.join(', ') + ']'; - } -}); - -// use native browser JS 1.6 implementation if available -if (Object.isFunction(Array.prototype.forEach)) - Array.prototype._each = Array.prototype.forEach; - -if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) { - i || (i = 0); - var length = this.length; - if (i < 0) i = length + i; - for (; i < length; i++) - if (this[i] === item) return i; - return -1; -}; - -if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) { - i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1; - var n = this.slice(0, i).reverse().indexOf(item); - return (n < 0) ? n : i - n - 1; -}; - -Array.prototype.toArray = Array.prototype.clone; - -function $w(string) { - if (!Object.isString(string)) return []; - string = string.strip(); - return string ? string.split(/\s+/) : []; -} - -if (Prototype.Browser.Opera){ - Array.prototype.concat = function() { - var array = []; - for (var i = 0, length = this.length; i < length; i++) array.push(this[i]); - for (var i = 0, length = arguments.length; i < length; i++) { - if (Object.isArray(arguments[i])) { - for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++) - array.push(arguments[i][j]); - } else { - array.push(arguments[i]); - } - } - return array; - }; -} -Object.extend(Number.prototype, { - toColorPart: function() { - return this.toPaddedString(2, 16); - }, - - succ: function() { - return this + 1; - }, - - times: function(iterator) { - $R(0, this, true).each(iterator); - return this; - }, - - toPaddedString: function(length, radix) { - var string = this.toString(radix || 10); - return '0'.times(length - string.length) + string; - }, - - toJSON: function() { - return isFinite(this) ? this.toString() : 'null'; - } -}); - -$w('abs round ceil floor').each(function(method){ - Number.prototype[method] = Math[method].methodize(); -}); -function $H(object) { - return new Hash(object); -}; - -var Hash = Class.create(Enumerable, (function() { - if (function() { - var i = 0, Test = function(value) { this.key = value }; - Test.prototype.key = 'foo'; - for (var property in new Test('bar')) i++; - return i > 1; - }()) { - function each(iterator) { - var cache = []; - for (var key in this._object) { - var value = this._object[key]; - if (cache.include(key)) continue; - cache.push(key); - var pair = [key, value]; - pair.key = key; - pair.value = value; - iterator(pair); - } - } - } else { - function each(iterator) { - for (var key in this._object) { - var value = this._object[key], pair = [key, value]; - pair.key = key; - pair.value = value; - iterator(pair); - } - } - } - - function toQueryPair(key, value) { - if (Object.isUndefined(value)) return key; - return key + '=' + encodeURIComponent(String.interpret(value)); - } - - return { - initialize: function(object) { - this._object = Object.isHash(object) ? object.toObject() : Object.clone(object); - }, - - _each: each, - - set: function(key, value) { - return this._object[key] = value; - }, - - get: function(key) { - return this._object[key]; - }, - - unset: function(key) { - var value = this._object[key]; - delete this._object[key]; - return value; - }, - - toObject: function() { - return Object.clone(this._object); - }, - - keys: function() { - return this.pluck('key'); - }, - - values: function() { - return this.pluck('value'); - }, - - index: function(value) { - var match = this.detect(function(pair) { - return pair.value === value; - }); - return match && match.key; - }, - - merge: function(object) { - return this.clone().update(object); - }, - - update: function(object) { - return new Hash(object).inject(this, function(result, pair) { - result.set(pair.key, pair.value); - return result; - }); - }, - - toQueryString: function() { - return this.map(function(pair) { - var key = encodeURIComponent(pair.key), values = pair.value; - - if (values && typeof values == 'object') { - if (Object.isArray(values)) - return values.map(toQueryPair.curry(key)).join('&'); - } - return toQueryPair(key, values); - }).join('&'); - }, - - inspect: function() { - return '#'; - }, - - toJSON: function() { - return Object.toJSON(this.toObject()); - }, - - clone: function() { - return new Hash(this); - } - } -})()); - -Hash.prototype.toTemplateReplacements = Hash.prototype.toObject; -Hash.from = $H; -var ObjectRange = Class.create(Enumerable, { - initialize: function(start, end, exclusive) { - this.start = start; - this.end = end; - this.exclusive = exclusive; - }, - - _each: function(iterator) { - var value = this.start; - while (this.include(value)) { - iterator(value); - value = value.succ(); - } - }, - - include: function(value) { - if (value < this.start) - return false; - if (this.exclusive) - return value < this.end; - return value <= this.end; - } -}); - -var $R = function(start, end, exclusive) { - return new ObjectRange(start, end, exclusive); -}; - -var Ajax = { - getTransport: function() { - return Try.these( - function() {return new XMLHttpRequest()}, - function() {return new ActiveXObject('Msxml2.XMLHTTP')}, - function() {return new ActiveXObject('Microsoft.XMLHTTP')} - ) || false; - }, - - activeRequestCount: 0 -}; - -Ajax.Responders = { - responders: [], - - _each: function(iterator) { - this.responders._each(iterator); - }, - - register: function(responder) { - if (!this.include(responder)) - this.responders.push(responder); - }, - - unregister: function(responder) { - this.responders = this.responders.without(responder); - }, - - dispatch: function(callback, request, transport, json) { - this.each(function(responder) { - if (Object.isFunction(responder[callback])) { - try { - responder[callback].apply(responder, [request, transport, json]); - } catch (e) { } - } - }); - } -}; - -Object.extend(Ajax.Responders, Enumerable); - -Ajax.Responders.register({ - onCreate: function() { Ajax.activeRequestCount++ }, - onComplete: function() { Ajax.activeRequestCount-- } -}); - -Ajax.Base = Class.create({ - initialize: function(options) { - this.options = { - method: 'post', - asynchronous: true, - contentType: 'application/x-www-form-urlencoded', - encoding: 'UTF-8', - parameters: '', - evalJSON: true, - evalJS: true - }; - Object.extend(this.options, options || { }); - - this.options.method = this.options.method.toLowerCase(); - if (Object.isString(this.options.parameters)) - this.options.parameters = this.options.parameters.toQueryParams(); - } -}); - -Ajax.Request = Class.create(Ajax.Base, { - _complete: false, - - initialize: function($super, url, options) { - $super(options); - this.transport = Ajax.getTransport(); - this.request(url); - }, - - request: function(url) { - this.url = url; - this.method = this.options.method; - var params = Object.clone(this.options.parameters); - - if (!['get', 'post'].include(this.method)) { - // simulate other verbs over post - params['_method'] = this.method; - this.method = 'post'; - } - - this.parameters = params; - - if (params = Object.toQueryString(params)) { - // when GET, append parameters to URL - if (this.method == 'get') - this.url += (this.url.include('?') ? '&' : '?') + params; - else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) - params += '&_='; - } - - try { - var response = new Ajax.Response(this); - if (this.options.onCreate) this.options.onCreate(response); - Ajax.Responders.dispatch('onCreate', this, response); - - this.transport.open(this.method.toUpperCase(), this.url, - this.options.asynchronous); - - if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1); - - this.transport.onreadystatechange = this.onStateChange.bind(this); - this.setRequestHeaders(); - - this.body = this.method == 'post' ? (this.options.postBody || params) : null; - this.transport.send(this.body); - - /* Force Firefox to handle ready state 4 for synchronous requests */ - if (!this.options.asynchronous && this.transport.overrideMimeType) - this.onStateChange(); - - } - catch (e) { - this.dispatchException(e); - } - }, - - onStateChange: function() { - var readyState = this.transport.readyState; - if (readyState > 1 && !((readyState == 4) && this._complete)) - this.respondToReadyState(this.transport.readyState); - }, - - setRequestHeaders: function() { - var headers = { - 'X-Requested-With': 'XMLHttpRequest', - 'X-Prototype-Version': Prototype.Version, - 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' - }; - - if (this.method == 'post') { - headers['Content-type'] = this.options.contentType + - (this.options.encoding ? '; charset=' + this.options.encoding : ''); - - /* Force "Connection: close" for older Mozilla browsers to work - * around a bug where XMLHttpRequest sends an incorrect - * Content-length header. See Mozilla Bugzilla #246651. - */ - if (this.transport.overrideMimeType && - (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) - headers['Connection'] = 'close'; - } - - // user-defined headers - if (typeof this.options.requestHeaders == 'object') { - var extras = this.options.requestHeaders; - - if (Object.isFunction(extras.push)) - for (var i = 0, length = extras.length; i < length; i += 2) - headers[extras[i]] = extras[i+1]; - else - $H(extras).each(function(pair) { headers[pair.key] = pair.value }); - } - - for (var name in headers) - this.transport.setRequestHeader(name, headers[name]); - }, - - success: function() { - var status = this.getStatus(); - return !status || (status >= 200 && status < 300); - }, - - getStatus: function() { - try { - return this.transport.status || 0; - } catch (e) { return 0 } - }, - - respondToReadyState: function(readyState) { - var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this); - - if (state == 'Complete') { - try { - this._complete = true; - (this.options['on' + response.status] - || this.options['on' + (this.success() ? 'Success' : 'Failure')] - || Prototype.emptyFunction)(response, response.headerJSON); - } catch (e) { - this.dispatchException(e); - } - - var contentType = response.getHeader('Content-type'); - if (this.options.evalJS == 'force' - || (this.options.evalJS && contentType - && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))) - this.evalResponse(); - } - - try { - (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON); - Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON); - } catch (e) { - this.dispatchException(e); - } - - if (state == 'Complete') { - // avoid memory leak in MSIE: clean up - this.transport.onreadystatechange = Prototype.emptyFunction; - } - }, - - getHeader: function(name) { - try { - return this.transport.getResponseHeader(name); - } catch (e) { return null } - }, - - evalResponse: function() { - try { - return eval((this.transport.responseText || '').unfilterJSON()); - } catch (e) { - this.dispatchException(e); - } - }, - - dispatchException: function(exception) { - (this.options.onException || Prototype.emptyFunction)(this, exception); - Ajax.Responders.dispatch('onException', this, exception); - } -}); - -Ajax.Request.Events = - ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; - -Ajax.Response = Class.create({ - initialize: function(request){ - this.request = request; - var transport = this.transport = request.transport, - readyState = this.readyState = transport.readyState; - - if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) { - this.status = this.getStatus(); - this.statusText = this.getStatusText(); - this.responseText = String.interpret(transport.responseText); - this.headerJSON = this._getHeaderJSON(); - } - - if(readyState == 4) { - var xml = transport.responseXML; - this.responseXML = xml === undefined ? null : xml; - this.responseJSON = this._getResponseJSON(); - } - }, - - status: 0, - statusText: '', - - getStatus: Ajax.Request.prototype.getStatus, - - getStatusText: function() { - try { - return this.transport.statusText || ''; - } catch (e) { return '' } - }, - - getHeader: Ajax.Request.prototype.getHeader, - - getAllHeaders: function() { - try { - return this.getAllResponseHeaders(); - } catch (e) { return null } - }, - - getResponseHeader: function(name) { - return this.transport.getResponseHeader(name); - }, - - getAllResponseHeaders: function() { - return this.transport.getAllResponseHeaders(); - }, - - _getHeaderJSON: function() { - var json = this.getHeader('X-JSON'); - if (!json) return null; - json = decodeURIComponent(escape(json)); - try { - return json.evalJSON(this.request.options.sanitizeJSON); - } catch (e) { - this.request.dispatchException(e); - } - }, - - _getResponseJSON: function() { - var options = this.request.options; - if (!options.evalJSON || (options.evalJSON != 'force' && - !(this.getHeader('Content-type') || '').include('application/json'))) - return null; - try { - return this.transport.responseText.evalJSON(options.sanitizeJSON); - } catch (e) { - this.request.dispatchException(e); - } - } -}); - -Ajax.Updater = Class.create(Ajax.Request, { - initialize: function($super, container, url, options) { - this.container = { - success: (container.success || container), - failure: (container.failure || (container.success ? null : container)) - }; - - options = options || { }; - var onComplete = options.onComplete; - options.onComplete = (function(response, param) { - this.updateContent(response.responseText); - if (Object.isFunction(onComplete)) onComplete(response, param); - }).bind(this); - - $super(url, options); - }, - - updateContent: function(responseText) { - var receiver = this.container[this.success() ? 'success' : 'failure'], - options = this.options; - - if (!options.evalScripts) responseText = responseText.stripScripts(); - - if (receiver = $(receiver)) { - if (options.insertion) { - if (Object.isString(options.insertion)) { - var insertion = { }; insertion[options.insertion] = responseText; - receiver.insert(insertion); - } - else options.insertion(receiver, responseText); - } - else receiver.update(responseText); - } - - if (this.success()) { - if (this.onComplete) this.onComplete.bind(this).defer(); - } - } -}); - -Ajax.PeriodicalUpdater = Class.create(Ajax.Base, { - initialize: function($super, container, url, options) { - $super(options); - this.onComplete = this.options.onComplete; - - this.frequency = (this.options.frequency || 2); - this.decay = (this.options.decay || 1); - - this.updater = { }; - this.container = container; - this.url = url; - - this.start(); - }, - - start: function() { - this.options.onComplete = this.updateComplete.bind(this); - this.onTimerEvent(); - }, - - stop: function() { - this.updater.options.onComplete = undefined; - clearTimeout(this.timer); - (this.onComplete || Prototype.emptyFunction).apply(this, arguments); - }, - - updateComplete: function(response) { - if (this.options.decay) { - this.decay = (response.responseText == this.lastText ? - this.decay * this.options.decay : 1); - - this.lastText = response.responseText; - } - this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency); - }, - - onTimerEvent: function() { - this.updater = new Ajax.Updater(this.container, this.url, this.options); - } -}); -function $(element) { - if (arguments.length > 1) { - for (var i = 0, elements = [], length = arguments.length; i < length; i++) - elements.push($(arguments[i])); - return elements; - } - if (Object.isString(element)) - element = document.getElementById(element); - return Element.extend(element); -} - -if (Prototype.BrowserFeatures.XPath) { - document._getElementsByXPath = function(expression, parentElement) { - var results = []; - var query = document.evaluate(expression, $(parentElement) || document, - null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); - for (var i = 0, length = query.snapshotLength; i < length; i++) - results.push(Element.extend(query.snapshotItem(i))); - return results; - }; -} - -/*--------------------------------------------------------------------------*/ - -if (!window.Node) var Node = { }; - -if (!Node.ELEMENT_NODE) { - // DOM level 2 ECMAScript Language Binding - Object.extend(Node, { - ELEMENT_NODE: 1, - ATTRIBUTE_NODE: 2, - TEXT_NODE: 3, - CDATA_SECTION_NODE: 4, - ENTITY_REFERENCE_NODE: 5, - ENTITY_NODE: 6, - PROCESSING_INSTRUCTION_NODE: 7, - COMMENT_NODE: 8, - DOCUMENT_NODE: 9, - DOCUMENT_TYPE_NODE: 10, - DOCUMENT_FRAGMENT_NODE: 11, - NOTATION_NODE: 12 - }); -} - -(function() { - var element = this.Element; - this.Element = function(tagName, attributes) { - attributes = attributes || { }; - tagName = tagName.toLowerCase(); - var cache = Element.cache; - if (Prototype.Browser.IE && attributes.name) { - tagName = '<' + tagName + ' name="' + attributes.name + '">'; - delete attributes.name; - return Element.writeAttribute(document.createElement(tagName), attributes); - } - if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName)); - return Element.writeAttribute(cache[tagName].cloneNode(false), attributes); - }; - Object.extend(this.Element, element || { }); -}).call(window); - -Element.cache = { }; - -Element.Methods = { - visible: function(element) { - return $(element).style.display != 'none'; - }, - - toggle: function(element) { - element = $(element); - Element[Element.visible(element) ? 'hide' : 'show'](element); - return element; - }, - - hide: function(element) { - $(element).style.display = 'none'; - return element; - }, - - show: function(element) { - $(element).style.display = ''; - return element; - }, - - remove: function(element) { - element = $(element); - element.parentNode.removeChild(element); - return element; - }, - - update: function(element, content) { - element = $(element); - if (content && content.toElement) content = content.toElement(); - if (Object.isElement(content)) return element.update().insert(content); - content = Object.toHTML(content); - element.innerHTML = content.stripScripts(); - content.evalScripts.bind(content).defer(); - return element; - }, - - replace: function(element, content) { - element = $(element); - if (content && content.toElement) content = content.toElement(); - else if (!Object.isElement(content)) { - content = Object.toHTML(content); - var range = element.ownerDocument.createRange(); - range.selectNode(element); - content.evalScripts.bind(content).defer(); - content = range.createContextualFragment(content.stripScripts()); - } - element.parentNode.replaceChild(content, element); - return element; - }, - - insert: function(element, insertions) { - element = $(element); - - if (Object.isString(insertions) || Object.isNumber(insertions) || - Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML))) - insertions = {bottom:insertions}; - - var content, t, range; - - for (position in insertions) { - content = insertions[position]; - position = position.toLowerCase(); - t = Element._insertionTranslations[position]; - - if (content && content.toElement) content = content.toElement(); - if (Object.isElement(content)) { - t.insert(element, content); - continue; - } - - content = Object.toHTML(content); - - range = element.ownerDocument.createRange(); - t.initializeRange(element, range); - t.insert(element, range.createContextualFragment(content.stripScripts())); - - content.evalScripts.bind(content).defer(); - } - - return element; - }, - - wrap: function(element, wrapper, attributes) { - element = $(element); - if (Object.isElement(wrapper)) - $(wrapper).writeAttribute(attributes || { }); - else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes); - else wrapper = new Element('div', wrapper); - if (element.parentNode) - element.parentNode.replaceChild(wrapper, element); - wrapper.appendChild(element); - return wrapper; - }, - - inspect: function(element) { - element = $(element); - var result = '<' + element.tagName.toLowerCase(); - $H({'id': 'id', 'className': 'class'}).each(function(pair) { - var property = pair.first(), attribute = pair.last(); - var value = (element[property] || '').toString(); - if (value) result += ' ' + attribute + '=' + value.inspect(true); - }); - return result + '>'; - }, - - recursivelyCollect: function(element, property) { - element = $(element); - var elements = []; - while (element = element[property]) - if (element.nodeType == 1) - elements.push(Element.extend(element)); - return elements; - }, - - ancestors: function(element) { - return $(element).recursivelyCollect('parentNode'); - }, - - descendants: function(element) { - return $A($(element).getElementsByTagName('*')).each(Element.extend); - }, - - firstDescendant: function(element) { - element = $(element).firstChild; - while (element && element.nodeType != 1) element = element.nextSibling; - return $(element); - }, - - immediateDescendants: function(element) { - if (!(element = $(element).firstChild)) return []; - while (element && element.nodeType != 1) element = element.nextSibling; - if (element) return [element].concat($(element).nextSiblings()); - return []; - }, - - previousSiblings: function(element) { - return $(element).recursivelyCollect('previousSibling'); - }, - - nextSiblings: function(element) { - return $(element).recursivelyCollect('nextSibling'); - }, - - siblings: function(element) { - element = $(element); - return element.previousSiblings().reverse().concat(element.nextSiblings()); - }, - - match: function(element, selector) { - if (Object.isString(selector)) - selector = new Selector(selector); - return selector.match($(element)); - }, - - up: function(element, expression, index) { - element = $(element); - if (arguments.length == 1) return $(element.parentNode); - var ancestors = element.ancestors(); - return expression ? Selector.findElement(ancestors, expression, index) : - ancestors[index || 0]; - }, - - down: function(element, expression, index) { - element = $(element); - if (arguments.length == 1) return element.firstDescendant(); - var descendants = element.descendants(); - return expression ? Selector.findElement(descendants, expression, index) : - descendants[index || 0]; - }, - - previous: function(element, expression, index) { - element = $(element); - if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element)); - var previousSiblings = element.previousSiblings(); - return expression ? Selector.findElement(previousSiblings, expression, index) : - previousSiblings[index || 0]; - }, - - next: function(element, expression, index) { - element = $(element); - if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element)); - var nextSiblings = element.nextSiblings(); - return expression ? Selector.findElement(nextSiblings, expression, index) : - nextSiblings[index || 0]; - }, - - select: function() { - var args = $A(arguments), element = $(args.shift()); - return Selector.findChildElements(element, args); - }, - - adjacent: function() { - var args = $A(arguments), element = $(args.shift()); - return Selector.findChildElements(element.parentNode, args).without(element); - }, - - identify: function(element) { - element = $(element); - var id = element.readAttribute('id'), self = arguments.callee; - if (id) return id; - do { id = 'anonymous_element_' + self.counter++ } while ($(id)); - element.writeAttribute('id', id); - return id; - }, - - readAttribute: function(element, name) { - element = $(element); - if (Prototype.Browser.IE) { - var t = Element._attributeTranslations.read; - if (t.values[name]) return t.values[name](element, name); - if (t.names[name]) name = t.names[name]; - if (name.include(':')) { - return (!element.attributes || !element.attributes[name]) ? null : - element.attributes[name].value; - } - } - return element.getAttribute(name); - }, - - writeAttribute: function(element, name, value) { - element = $(element); - var attributes = { }, t = Element._attributeTranslations.write; - - if (typeof name == 'object') attributes = name; - else attributes[name] = value === undefined ? true : value; - - for (var attr in attributes) { - var name = t.names[attr] || attr, value = attributes[attr]; - if (t.values[attr]) name = t.values[attr](element, value); - if (value === false || value === null) - element.removeAttribute(name); - else if (value === true) - element.setAttribute(name, name); - else element.setAttribute(name, value); - } - return element; - }, - - getHeight: function(element) { - return $(element).getDimensions().height; - }, - - getWidth: function(element) { - return $(element).getDimensions().width; - }, - - classNames: function(element) { - return new Element.ClassNames(element); - }, - - hasClassName: function(element, className) { - if (!(element = $(element))) return; - var elementClassName = element.className; - return (elementClassName.length > 0 && (elementClassName == className || - new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName))); - }, - - addClassName: function(element, className) { - if (!(element = $(element))) return; - if (!element.hasClassName(className)) - element.className += (element.className ? ' ' : '') + className; - return element; - }, - - removeClassName: function(element, className) { - if (!(element = $(element))) return; - element.className = element.className.replace( - new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip(); - return element; - }, - - toggleClassName: function(element, className) { - if (!(element = $(element))) return; - return element[element.hasClassName(className) ? - 'removeClassName' : 'addClassName'](className); - }, - - // removes whitespace-only text node children - cleanWhitespace: function(element) { - element = $(element); - var node = element.firstChild; - while (node) { - var nextNode = node.nextSibling; - if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) - element.removeChild(node); - node = nextNode; - } - return element; - }, - - empty: function(element) { - return $(element).innerHTML.blank(); - }, - - descendantOf: function(element, ancestor) { - element = $(element), ancestor = $(ancestor); - - if (element.compareDocumentPosition) - return (element.compareDocumentPosition(ancestor) & 8) === 8; - - if (element.sourceIndex && !Prototype.Browser.Opera) { - var e = element.sourceIndex, a = ancestor.sourceIndex, - nextAncestor = ancestor.nextSibling; - if (!nextAncestor) { - do { ancestor = ancestor.parentNode; } - while (!(nextAncestor = ancestor.nextSibling) && ancestor.parentNode); - } - if (nextAncestor) return (e > a && e < nextAncestor.sourceIndex); - } - - while (element = element.parentNode) - if (element == ancestor) return true; - return false; - }, - - scrollTo: function(element) { - element = $(element); - var pos = element.cumulativeOffset(); - window.scrollTo(pos[0], pos[1]); - return element; - }, - - getStyle: function(element, style) { - element = $(element); - style = style == 'float' ? 'cssFloat' : style.camelize(); - var value = element.style[style]; - if (!value) { - var css = document.defaultView.getComputedStyle(element, null); - value = css ? css[style] : null; - } - if (style == 'opacity') return value ? parseFloat(value) : 1.0; - return value == 'auto' ? null : value; - }, - - getOpacity: function(element) { - return $(element).getStyle('opacity'); - }, - - setStyle: function(element, styles) { - element = $(element); - var elementStyle = element.style, match; - if (Object.isString(styles)) { - element.style.cssText += ';' + styles; - return styles.include('opacity') ? - element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element; - } - for (var property in styles) - if (property == 'opacity') element.setOpacity(styles[property]); - else - elementStyle[(property == 'float' || property == 'cssFloat') ? - (elementStyle.styleFloat === undefined ? 'cssFloat' : 'styleFloat') : - property] = styles[property]; - - return element; - }, - - setOpacity: function(element, value) { - element = $(element); - element.style.opacity = (value == 1 || value === '') ? '' : - (value < 0.00001) ? 0 : value; - return element; - }, - - getDimensions: function(element) { - element = $(element); - var display = $(element).getStyle('display'); - if (display != 'none' && display != null) // Safari bug - return {width: element.offsetWidth, height: element.offsetHeight}; - - // All *Width and *Height properties give 0 on elements with display none, - // so enable the element temporarily - var els = element.style; - var originalVisibility = els.visibility; - var originalPosition = els.position; - var originalDisplay = els.display; - els.visibility = 'hidden'; - els.position = 'absolute'; - els.display = 'block'; - var originalWidth = element.clientWidth; - var originalHeight = element.clientHeight; - els.display = originalDisplay; - els.position = originalPosition; - els.visibility = originalVisibility; - return {width: originalWidth, height: originalHeight}; - }, - - makePositioned: function(element) { - element = $(element); - var pos = Element.getStyle(element, 'position'); - if (pos == 'static' || !pos) { - element._madePositioned = true; - element.style.position = 'relative'; - // Opera returns the offset relative to the positioning context, when an - // element is position relative but top and left have not been defined - if (window.opera) { - element.style.top = 0; - element.style.left = 0; - } - } - return element; - }, - - undoPositioned: function(element) { - element = $(element); - if (element._madePositioned) { - element._madePositioned = undefined; - element.style.position = - element.style.top = - element.style.left = - element.style.bottom = - element.style.right = ''; - } - return element; - }, - - makeClipping: function(element) { - element = $(element); - if (element._overflow) return element; - element._overflow = Element.getStyle(element, 'overflow') || 'auto'; - if (element._overflow !== 'hidden') - element.style.overflow = 'hidden'; - return element; - }, - - undoClipping: function(element) { - element = $(element); - if (!element._overflow) return element; - element.style.overflow = element._overflow == 'auto' ? '' : element._overflow; - element._overflow = null; - return element; - }, - - cumulativeOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - } while (element); - return Element._returnOffset(valueL, valueT); - }, - - positionedOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - if (element) { - if (element.tagName == 'BODY') break; - var p = Element.getStyle(element, 'position'); - if (p == 'relative' || p == 'absolute') break; - } - } while (element); - return Element._returnOffset(valueL, valueT); - }, - - absolutize: function(element) { - element = $(element); - if (element.getStyle('position') == 'absolute') return; - // Position.prepare(); // To be done manually by Scripty when it needs it. - - var offsets = element.positionedOffset(); - var top = offsets[1]; - var left = offsets[0]; - var width = element.clientWidth; - var height = element.clientHeight; - - element._originalLeft = left - parseFloat(element.style.left || 0); - element._originalTop = top - parseFloat(element.style.top || 0); - element._originalWidth = element.style.width; - element._originalHeight = element.style.height; - - element.style.position = 'absolute'; - element.style.top = top + 'px'; - element.style.left = left + 'px'; - element.style.width = width + 'px'; - element.style.height = height + 'px'; - return element; - }, - - relativize: function(element) { - element = $(element); - if (element.getStyle('position') == 'relative') return; - // Position.prepare(); // To be done manually by Scripty when it needs it. - - element.style.position = 'relative'; - var top = parseFloat(element.style.top || 0) - (element._originalTop || 0); - var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0); - - element.style.top = top + 'px'; - element.style.left = left + 'px'; - element.style.height = element._originalHeight; - element.style.width = element._originalWidth; - return element; - }, - - cumulativeScrollOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.scrollTop || 0; - valueL += element.scrollLeft || 0; - element = element.parentNode; - } while (element); - return Element._returnOffset(valueL, valueT); - }, - - getOffsetParent: function(element) { - if (element.offsetParent) return $(element.offsetParent); - if (element == document.body) return $(element); - - while ((element = element.parentNode) && element != document.body) - if (Element.getStyle(element, 'position') != 'static') - return $(element); - - return $(document.body); - }, - - viewportOffset: function(forElement) { - var valueT = 0, valueL = 0; - - var element = forElement; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - - // Safari fix - if (element.offsetParent == document.body && - Element.getStyle(element, 'position') == 'absolute') break; - - } while (element = element.offsetParent); - - element = forElement; - do { - if (!Prototype.Browser.Opera || element.tagName == 'BODY') { - valueT -= element.scrollTop || 0; - valueL -= element.scrollLeft || 0; - } - } while (element = element.parentNode); - - return Element._returnOffset(valueL, valueT); - }, - - clonePosition: function(element, source) { - var options = Object.extend({ - setLeft: true, - setTop: true, - setWidth: true, - setHeight: true, - offsetTop: 0, - offsetLeft: 0 - }, arguments[2] || { }); - - // find page position of source - source = $(source); - var p = source.viewportOffset(); - - // find coordinate system to use - element = $(element); - var delta = [0, 0]; - var parent = null; - // delta [0,0] will do fine with position: fixed elements, - // position:absolute needs offsetParent deltas - if (Element.getStyle(element, 'position') == 'absolute') { - parent = element.getOffsetParent(); - delta = parent.viewportOffset(); - } - - // correct by body offsets (fixes Safari) - if (parent == document.body) { - delta[0] -= document.body.offsetLeft; - delta[1] -= document.body.offsetTop; - } - - // set position - if (options.setLeft) element.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; - if (options.setTop) element.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; - if (options.setWidth) element.style.width = source.offsetWidth + 'px'; - if (options.setHeight) element.style.height = source.offsetHeight + 'px'; - return element; - } -}; - -Element.Methods.identify.counter = 1; - -Object.extend(Element.Methods, { - getElementsBySelector: Element.Methods.select, - childElements: Element.Methods.immediateDescendants -}); - -Element._attributeTranslations = { - write: { - names: { - className: 'class', - htmlFor: 'for' - }, - values: { } - } -}; - - -if (!document.createRange || Prototype.Browser.Opera) { - Element.Methods.insert = function(element, insertions) { - element = $(element); - - if (Object.isString(insertions) || Object.isNumber(insertions) || - Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML))) - insertions = { bottom: insertions }; - - var t = Element._insertionTranslations, content, position, pos, tagName; - - for (position in insertions) { - content = insertions[position]; - position = position.toLowerCase(); - pos = t[position]; - - if (content && content.toElement) content = content.toElement(); - if (Object.isElement(content)) { - pos.insert(element, content); - continue; - } - - content = Object.toHTML(content); - tagName = ((position == 'before' || position == 'after') - ? element.parentNode : element).tagName.toUpperCase(); - - if (t.tags[tagName]) { - var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts()); - if (position == 'top' || position == 'after') fragments.reverse(); - fragments.each(pos.insert.curry(element)); - } - else element.insertAdjacentHTML(pos.adjacency, content.stripScripts()); - - content.evalScripts.bind(content).defer(); - } - - return element; - }; -} - -if (Prototype.Browser.Opera) { - Element.Methods._getStyle = Element.Methods.getStyle; - Element.Methods.getStyle = function(element, style) { - switch(style) { - case 'left': - case 'top': - case 'right': - case 'bottom': - if (Element._getStyle(element, 'position') == 'static') return null; - default: return Element._getStyle(element, style); - } - }; - Element.Methods._readAttribute = Element.Methods.readAttribute; - Element.Methods.readAttribute = function(element, attribute) { - if (attribute == 'title') return element.title; - return Element._readAttribute(element, attribute); - }; -} - -else if (Prototype.Browser.IE) { - $w('positionedOffset getOffsetParent viewportOffset').each(function(method) { - Element.Methods[method] = Element.Methods[method].wrap( - function(proceed, element) { - element = $(element); - var position = element.getStyle('position'); - if (position != 'static') return proceed(element); - element.setStyle({ position: 'relative' }); - var value = proceed(element); - element.setStyle({ position: position }); - return value; - } - ); - }); - - Element.Methods.getStyle = function(element, style) { - element = $(element); - style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize(); - var value = element.style[style]; - if (!value && element.currentStyle) value = element.currentStyle[style]; - - if (style == 'opacity') { - if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/)) - if (value[1]) return parseFloat(value[1]) / 100; - return 1.0; - } - - if (value == 'auto') { - if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none')) - return element['offset' + style.capitalize()] + 'px'; - return null; - } - return value; - }; - - Element.Methods.setOpacity = function(element, value) { - function stripAlpha(filter){ - return filter.replace(/alpha\([^\)]*\)/gi,''); - } - element = $(element); - var currentStyle = element.currentStyle; - if ((currentStyle && !currentStyle.hasLayout) || - (!currentStyle && element.style.zoom == 'normal')) - element.style.zoom = 1; - - var filter = element.getStyle('filter'), style = element.style; - if (value == 1 || value === '') { - (filter = stripAlpha(filter)) ? - style.filter = filter : style.removeAttribute('filter'); - return element; - } else if (value < 0.00001) value = 0; - style.filter = stripAlpha(filter) + - 'alpha(opacity=' + (value * 100) + ')'; - return element; - }; - - Element._attributeTranslations = { - read: { - names: { - 'class': 'className', - 'for': 'htmlFor' - }, - values: { - _getAttr: function(element, attribute) { - return element.getAttribute(attribute, 2); - }, - _getAttrNode: function(element, attribute) { - var node = element.getAttributeNode(attribute); - return node ? node.value : ""; - }, - _getEv: function(element, attribute) { - var attribute = element.getAttribute(attribute); - return attribute ? attribute.toString().slice(23, -2) : null; - }, - _flag: function(element, attribute) { - return $(element).hasAttribute(attribute) ? attribute : null; - }, - style: function(element) { - return element.style.cssText.toLowerCase(); - }, - title: function(element) { - return element.title; - } - } - } - }; - - Element._attributeTranslations.write = { - names: Object.clone(Element._attributeTranslations.read.names), - values: { - checked: function(element, value) { - element.checked = !!value; - }, - - style: function(element, value) { - element.style.cssText = value ? value : ''; - } - } - }; - - Element._attributeTranslations.has = {}; - - $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' + - 'encType maxLength readOnly longDesc').each(function(attr) { - Element._attributeTranslations.write.names[attr.toLowerCase()] = attr; - Element._attributeTranslations.has[attr.toLowerCase()] = attr; - }); - - (function(v) { - Object.extend(v, { - href: v._getAttr, - src: v._getAttr, - type: v._getAttr, - action: v._getAttrNode, - disabled: v._flag, - checked: v._flag, - readonly: v._flag, - multiple: v._flag, - onload: v._getEv, - onunload: v._getEv, - onclick: v._getEv, - ondblclick: v._getEv, - onmousedown: v._getEv, - onmouseup: v._getEv, - onmouseover: v._getEv, - onmousemove: v._getEv, - onmouseout: v._getEv, - onfocus: v._getEv, - onblur: v._getEv, - onkeypress: v._getEv, - onkeydown: v._getEv, - onkeyup: v._getEv, - onsubmit: v._getEv, - onreset: v._getEv, - onselect: v._getEv, - onchange: v._getEv - }); - })(Element._attributeTranslations.read.values); -} - -else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) { - Element.Methods.setOpacity = function(element, value) { - element = $(element); - element.style.opacity = (value == 1) ? 0.999999 : - (value === '') ? '' : (value < 0.00001) ? 0 : value; - return element; - }; -} - -else if (Prototype.Browser.WebKit) { - Element.Methods.setOpacity = function(element, value) { - element = $(element); - element.style.opacity = (value == 1 || value === '') ? '' : - (value < 0.00001) ? 0 : value; - - if (value == 1) - if(element.tagName == 'IMG' && element.width) { - element.width++; element.width--; - } else try { - var n = document.createTextNode(' '); - element.appendChild(n); - element.removeChild(n); - } catch (e) { } - - return element; - }; - - // Safari returns margins on body which is incorrect if the child is absolutely - // positioned. For performance reasons, redefine Position.cumulativeOffset for - // KHTML/WebKit only. - Element.Methods.cumulativeOffset = function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - if (element.offsetParent == document.body) - if (Element.getStyle(element, 'position') == 'absolute') break; - - element = element.offsetParent; - } while (element); - - return Element._returnOffset(valueL, valueT); - }; -} - -if (Prototype.Browser.IE || Prototype.Browser.Opera) { - // IE and Opera are missing .innerHTML support for TABLE-related and SELECT elements - Element.Methods.update = function(element, content) { - element = $(element); - - if (content && content.toElement) content = content.toElement(); - if (Object.isElement(content)) return element.update().insert(content); - - content = Object.toHTML(content); - var tagName = element.tagName.toUpperCase(); - - if (tagName in Element._insertionTranslations.tags) { - $A(element.childNodes).each(function(node) { element.removeChild(node) }); - Element._getContentFromAnonymousElement(tagName, content.stripScripts()) - .each(function(node) { element.appendChild(node) }); - } - else element.innerHTML = content.stripScripts(); - - content.evalScripts.bind(content).defer(); - return element; - }; -} - -if (document.createElement('div').outerHTML) { - Element.Methods.replace = function(element, content) { - element = $(element); - - if (content && content.toElement) content = content.toElement(); - if (Object.isElement(content)) { - element.parentNode.replaceChild(content, element); - return element; - } - - content = Object.toHTML(content); - var parent = element.parentNode, tagName = parent.tagName.toUpperCase(); - - if (Element._insertionTranslations.tags[tagName]) { - var nextSibling = element.next(); - var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts()); - parent.removeChild(element); - if (nextSibling) - fragments.each(function(node) { parent.insertBefore(node, nextSibling) }); - else - fragments.each(function(node) { parent.appendChild(node) }); - } - else element.outerHTML = content.stripScripts(); - - content.evalScripts.bind(content).defer(); - return element; - }; -} - -Element._returnOffset = function(l, t) { - var result = [l, t]; - result.left = l; - result.top = t; - return result; -}; - -Element._getContentFromAnonymousElement = function(tagName, html) { - var div = new Element('div'), t = Element._insertionTranslations.tags[tagName]; - div.innerHTML = t[0] + html + t[1]; - t[2].times(function() { div = div.firstChild }); - return $A(div.childNodes); -}; - -Element._insertionTranslations = { - before: { - adjacency: 'beforeBegin', - insert: function(element, node) { - element.parentNode.insertBefore(node, element); - }, - initializeRange: function(element, range) { - range.setStartBefore(element); - } - }, - top: { - adjacency: 'afterBegin', - insert: function(element, node) { - element.insertBefore(node, element.firstChild); - }, - initializeRange: function(element, range) { - range.selectNodeContents(element); - range.collapse(true); - } - }, - bottom: { - adjacency: 'beforeEnd', - insert: function(element, node) { - element.appendChild(node); - } - }, - after: { - adjacency: 'afterEnd', - insert: function(element, node) { - element.parentNode.insertBefore(node, element.nextSibling); - }, - initializeRange: function(element, range) { - range.setStartAfter(element); - } - }, - tags: { - TABLE: ['', '
', 1], - TBODY: ['', '
', 2], - TR: ['', '
', 3], - TD: ['
', '
', 4], - SELECT: ['', 1] - } -}; - -(function() { - this.bottom.initializeRange = this.top.initializeRange; - Object.extend(this.tags, { - THEAD: this.tags.TBODY, - TFOOT: this.tags.TBODY, - TH: this.tags.TD - }); -}).call(Element._insertionTranslations); - -Element.Methods.Simulated = { - hasAttribute: function(element, attribute) { - attribute = Element._attributeTranslations.has[attribute] || attribute; - var node = $(element).getAttributeNode(attribute); - return node && node.specified; - } -}; - -Element.Methods.ByTag = { }; - -Object.extend(Element, Element.Methods); - -if (!Prototype.BrowserFeatures.ElementExtensions && - document.createElement('div').__proto__) { - window.HTMLElement = { }; - window.HTMLElement.prototype = document.createElement('div').__proto__; - Prototype.BrowserFeatures.ElementExtensions = true; -} - -Element.extend = (function() { - if (Prototype.BrowserFeatures.SpecificElementExtensions) - return Prototype.K; - - var Methods = { }, ByTag = Element.Methods.ByTag; - - var extend = Object.extend(function(element) { - if (!element || element._extendedByPrototype || - element.nodeType != 1 || element == window) return element; - - var methods = Object.clone(Methods), - tagName = element.tagName, property, value; - - // extend methods for specific tags - if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]); - - for (property in methods) { - value = methods[property]; - if (Object.isFunction(value) && !(property in element)) - element[property] = value.methodize(); - } - - element._extendedByPrototype = Prototype.emptyFunction; - return element; - - }, { - refresh: function() { - // extend methods for all tags (Safari doesn't need this) - if (!Prototype.BrowserFeatures.ElementExtensions) { - Object.extend(Methods, Element.Methods); - Object.extend(Methods, Element.Methods.Simulated); - } - } - }); - - extend.refresh(); - return extend; -})(); - -Element.hasAttribute = function(element, attribute) { - if (element.hasAttribute) return element.hasAttribute(attribute); - return Element.Methods.Simulated.hasAttribute(element, attribute); -}; - -Element.addMethods = function(methods) { - var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag; - - if (!methods) { - Object.extend(Form, Form.Methods); - Object.extend(Form.Element, Form.Element.Methods); - Object.extend(Element.Methods.ByTag, { - "FORM": Object.clone(Form.Methods), - "INPUT": Object.clone(Form.Element.Methods), - "SELECT": Object.clone(Form.Element.Methods), - "TEXTAREA": Object.clone(Form.Element.Methods) - }); - } - - if (arguments.length == 2) { - var tagName = methods; - methods = arguments[1]; - } - - if (!tagName) Object.extend(Element.Methods, methods || { }); - else { - if (Object.isArray(tagName)) tagName.each(extend); - else extend(tagName); - } - - function extend(tagName) { - tagName = tagName.toUpperCase(); - if (!Element.Methods.ByTag[tagName]) - Element.Methods.ByTag[tagName] = { }; - Object.extend(Element.Methods.ByTag[tagName], methods); - } - - function copy(methods, destination, onlyIfAbsent) { - onlyIfAbsent = onlyIfAbsent || false; - for (var property in methods) { - var value = methods[property]; - if (!Object.isFunction(value)) continue; - if (!onlyIfAbsent || !(property in destination)) - destination[property] = value.methodize(); - } - } - - function findDOMClass(tagName) { - var klass; - var trans = { - "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph", - "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList", - "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading", - "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote", - "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION": - "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD": - "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR": - "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET": - "FrameSet", "IFRAME": "IFrame" - }; - if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element'; - if (window[klass]) return window[klass]; - klass = 'HTML' + tagName + 'Element'; - if (window[klass]) return window[klass]; - klass = 'HTML' + tagName.capitalize() + 'Element'; - if (window[klass]) return window[klass]; - - window[klass] = { }; - window[klass].prototype = document.createElement(tagName).__proto__; - return window[klass]; - } - - if (F.ElementExtensions) { - copy(Element.Methods, HTMLElement.prototype); - copy(Element.Methods.Simulated, HTMLElement.prototype, true); - } - - if (F.SpecificElementExtensions) { - for (var tag in Element.Methods.ByTag) { - var klass = findDOMClass(tag); - if (Object.isUndefined(klass)) continue; - copy(T[tag], klass.prototype); - } - } - - Object.extend(Element, Element.Methods); - delete Element.ByTag; - - if (Element.extend.refresh) Element.extend.refresh(); - Element.cache = { }; -}; - -document.viewport = { - getDimensions: function() { - var dimensions = { }; - $w('width height').each(function(d) { - var D = d.capitalize(); - dimensions[d] = self['inner' + D] || - (document.documentElement['client' + D] || document.body['client' + D]); - }); - return dimensions; - }, - - getWidth: function() { - return this.getDimensions().width; - }, - - getHeight: function() { - return this.getDimensions().height; - }, - - getScrollOffsets: function() { - return Element._returnOffset( - window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft, - window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop); - } -}; -/* Portions of the Selector class are derived from Jack Slocum’s DomQuery, - * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style - * license. Please see http://www.yui-ext.com/ for more information. */ - -var Selector = Class.create({ - initialize: function(expression) { - this.expression = expression.strip(); - this.compileMatcher(); - }, - - compileMatcher: function() { - // Selectors with namespaced attributes can't use the XPath version - if (Prototype.BrowserFeatures.XPath && !(/(\[[\w-]*?:|:checked)/).test(this.expression)) - return this.compileXPathMatcher(); - - var e = this.expression, ps = Selector.patterns, h = Selector.handlers, - c = Selector.criteria, le, p, m; - - if (Selector._cache[e]) { - this.matcher = Selector._cache[e]; - return; - } - - this.matcher = ["this.matcher = function(root) {", - "var r = root, h = Selector.handlers, c = false, n;"]; - - while (e && le != e && (/\S/).test(e)) { - le = e; - for (var i in ps) { - p = ps[i]; - if (m = e.match(p)) { - this.matcher.push(Object.isFunction(c[i]) ? c[i](m) : - new Template(c[i]).evaluate(m)); - e = e.replace(m[0], ''); - break; - } - } - } - - this.matcher.push("return h.unique(n);\n}"); - eval(this.matcher.join('\n')); - Selector._cache[this.expression] = this.matcher; - }, - - compileXPathMatcher: function() { - var e = this.expression, ps = Selector.patterns, - x = Selector.xpath, le, m; - - if (Selector._cache[e]) { - this.xpath = Selector._cache[e]; return; - } - - this.matcher = ['.//*']; - while (e && le != e && (/\S/).test(e)) { - le = e; - for (var i in ps) { - if (m = e.match(ps[i])) { - this.matcher.push(Object.isFunction(x[i]) ? x[i](m) : - new Template(x[i]).evaluate(m)); - e = e.replace(m[0], ''); - break; - } - } - } - - this.xpath = this.matcher.join(''); - Selector._cache[this.expression] = this.xpath; - }, - - findElements: function(root) { - root = root || document; - if (this.xpath) return document._getElementsByXPath(this.xpath, root); - return this.matcher(root); - }, - - match: function(element) { - this.tokens = []; - - var e = this.expression, ps = Selector.patterns, as = Selector.assertions; - var le, p, m; - - while (e && le !== e && (/\S/).test(e)) { - le = e; - for (var i in ps) { - p = ps[i]; - if (m = e.match(p)) { - // use the Selector.assertions methods unless the selector - // is too complex. - if (as[i]) { - this.tokens.push([i, Object.clone(m)]); - e = e.replace(m[0], ''); - } else { - // reluctantly do a document-wide search - // and look for a match in the array - return this.findElements(document).include(element); - } - } - } - } - - var match = true, name, matches; - for (var i = 0, token; token = this.tokens[i]; i++) { - name = token[0], matches = token[1]; - if (!Selector.assertions[name](element, matches)) { - match = false; break; - } - } - - return match; - }, - - toString: function() { - return this.expression; - }, - - inspect: function() { - return "#"; - } -}); - -Object.extend(Selector, { - _cache: { }, - - xpath: { - descendant: "//*", - child: "/*", - adjacent: "/following-sibling::*[1]", - laterSibling: '/following-sibling::*', - tagName: function(m) { - if (m[1] == '*') return ''; - return "[local-name()='" + m[1].toLowerCase() + - "' or local-name()='" + m[1].toUpperCase() + "']"; - }, - className: "[contains(concat(' ', @class, ' '), ' #{1} ')]", - id: "[@id='#{1}']", - attrPresence: "[@#{1}]", - attr: function(m) { - m[3] = m[5] || m[6]; - return new Template(Selector.xpath.operators[m[2]]).evaluate(m); - }, - pseudo: function(m) { - var h = Selector.xpath.pseudos[m[1]]; - if (!h) return ''; - if (Object.isFunction(h)) return h(m); - return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m); - }, - operators: { - '=': "[@#{1}='#{3}']", - '!=': "[@#{1}!='#{3}']", - '^=': "[starts-with(@#{1}, '#{3}')]", - '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']", - '*=': "[contains(@#{1}, '#{3}')]", - '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]", - '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]" - }, - pseudos: { - 'first-child': '[not(preceding-sibling::*)]', - 'last-child': '[not(following-sibling::*)]', - 'only-child': '[not(preceding-sibling::* or following-sibling::*)]', - 'empty': "[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]", - 'checked': "[@checked]", - 'disabled': "[@disabled]", - 'enabled': "[not(@disabled)]", - 'not': function(m) { - var e = m[6], p = Selector.patterns, - x = Selector.xpath, le, m, v; - - var exclusion = []; - while (e && le != e && (/\S/).test(e)) { - le = e; - for (var i in p) { - if (m = e.match(p[i])) { - v = Object.isFunction(x[i]) ? x[i](m) : new Template(x[i]).evaluate(m); - exclusion.push("(" + v.substring(1, v.length - 1) + ")"); - e = e.replace(m[0], ''); - break; - } - } - } - return "[not(" + exclusion.join(" and ") + ")]"; - }, - 'nth-child': function(m) { - return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m); - }, - 'nth-last-child': function(m) { - return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m); - }, - 'nth-of-type': function(m) { - return Selector.xpath.pseudos.nth("position() ", m); - }, - 'nth-last-of-type': function(m) { - return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m); - }, - 'first-of-type': function(m) { - m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m); - }, - 'last-of-type': function(m) { - m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m); - }, - 'only-of-type': function(m) { - var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m); - }, - nth: function(fragment, m) { - var mm, formula = m[6], predicate; - if (formula == 'even') formula = '2n+0'; - if (formula == 'odd') formula = '2n+1'; - if (mm = formula.match(/^(\d+)$/)) // digit only - return '[' + fragment + "= " + mm[1] + ']'; - if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b - if (mm[1] == "-") mm[1] = -1; - var a = mm[1] ? Number(mm[1]) : 1; - var b = mm[2] ? Number(mm[2]) : 0; - predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " + - "((#{fragment} - #{b}) div #{a} >= 0)]"; - return new Template(predicate).evaluate({ - fragment: fragment, a: a, b: b }); - } - } - } - }, - - criteria: { - tagName: 'n = h.tagName(n, r, "#{1}", c); c = false;', - className: 'n = h.className(n, r, "#{1}", c); c = false;', - id: 'n = h.id(n, r, "#{1}", c); c = false;', - attrPresence: 'n = h.attrPresence(n, r, "#{1}"); c = false;', - attr: function(m) { - m[3] = (m[5] || m[6]); - return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(m); - }, - pseudo: function(m) { - if (m[6]) m[6] = m[6].replace(/"/g, '\\"'); - return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m); - }, - descendant: 'c = "descendant";', - child: 'c = "child";', - adjacent: 'c = "adjacent";', - laterSibling: 'c = "laterSibling";' - }, - - patterns: { - // combinators must be listed first - // (and descendant needs to be last combinator) - laterSibling: /^\s*~\s*/, - child: /^\s*>\s*/, - adjacent: /^\s*\+\s*/, - descendant: /^\s/, - - // selectors follow - tagName: /^\s*(\*|[\w\-]+)(\b|$)?/, - id: /^#([\w\-\*]+)(\b|$)/, - className: /^\.([\w\-\*]+)(\b|$)/, - pseudo: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s)|(?=:))/, - attrPresence: /^\[([\w]+)\]/, - attr: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/ - }, - - // for Selector.match and Element#match - assertions: { - tagName: function(element, matches) { - return matches[1].toUpperCase() == element.tagName.toUpperCase(); - }, - - className: function(element, matches) { - return Element.hasClassName(element, matches[1]); - }, - - id: function(element, matches) { - return element.id === matches[1]; - }, - - attrPresence: function(element, matches) { - return Element.hasAttribute(element, matches[1]); - }, - - attr: function(element, matches) { - var nodeValue = Element.readAttribute(element, matches[1]); - return Selector.operators[matches[2]](nodeValue, matches[3]); - } - }, - - handlers: { - // UTILITY FUNCTIONS - // joins two collections - concat: function(a, b) { - for (var i = 0, node; node = b[i]; i++) - a.push(node); - return a; - }, - - // marks an array of nodes for counting - mark: function(nodes) { - for (var i = 0, node; node = nodes[i]; i++) - node._counted = true; - return nodes; - }, - - unmark: function(nodes) { - for (var i = 0, node; node = nodes[i]; i++) - node._counted = undefined; - return nodes; - }, - - // mark each child node with its position (for nth calls) - // "ofType" flag indicates whether we're indexing for nth-of-type - // rather than nth-child - index: function(parentNode, reverse, ofType) { - parentNode._counted = true; - if (reverse) { - for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) { - var node = nodes[i]; - if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++; - } - } else { - for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++) - if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++; - } - }, - - // filters out duplicates and extends all nodes - unique: function(nodes) { - if (nodes.length == 0) return nodes; - var results = [], n; - for (var i = 0, l = nodes.length; i < l; i++) - if (!(n = nodes[i])._counted) { - n._counted = true; - results.push(Element.extend(n)); - } - return Selector.handlers.unmark(results); - }, - - // COMBINATOR FUNCTIONS - descendant: function(nodes) { - var h = Selector.handlers; - for (var i = 0, results = [], node; node = nodes[i]; i++) - h.concat(results, node.getElementsByTagName('*')); - return results; - }, - - child: function(nodes) { - var h = Selector.handlers; - for (var i = 0, results = [], node; node = nodes[i]; i++) { - for (var j = 0, children = [], child; child = node.childNodes[j]; j++) - if (child.nodeType == 1 && child.tagName != '!') results.push(child); - } - return results; - }, - - adjacent: function(nodes) { - for (var i = 0, results = [], node; node = nodes[i]; i++) { - var next = this.nextElementSibling(node); - if (next) results.push(next); - } - return results; - }, - - laterSibling: function(nodes) { - var h = Selector.handlers; - for (var i = 0, results = [], node; node = nodes[i]; i++) - h.concat(results, Element.nextSiblings(node)); - return results; - }, - - nextElementSibling: function(node) { - while (node = node.nextSibling) - if (node.nodeType == 1) return node; - return null; - }, - - previousElementSibling: function(node) { - while (node = node.previousSibling) - if (node.nodeType == 1) return node; - return null; - }, - - // TOKEN FUNCTIONS - tagName: function(nodes, root, tagName, combinator) { - tagName = tagName.toUpperCase(); - var results = [], h = Selector.handlers; - if (nodes) { - if (combinator) { - // fastlane for ordinary descendant combinators - if (combinator == "descendant") { - for (var i = 0, node; node = nodes[i]; i++) - h.concat(results, node.getElementsByTagName(tagName)); - return results; - } else nodes = this[combinator](nodes); - if (tagName == "*") return nodes; - } - for (var i = 0, node; node = nodes[i]; i++) - if (node.tagName.toUpperCase() == tagName) results.push(node); - return results; - } else return root.getElementsByTagName(tagName); - }, - - id: function(nodes, root, id, combinator) { - var targetNode = $(id), h = Selector.handlers; - if (!targetNode) return []; - if (!nodes && root == document) return [targetNode]; - if (nodes) { - if (combinator) { - if (combinator == 'child') { - for (var i = 0, node; node = nodes[i]; i++) - if (targetNode.parentNode == node) return [targetNode]; - } else if (combinator == 'descendant') { - for (var i = 0, node; node = nodes[i]; i++) - if (Element.descendantOf(targetNode, node)) return [targetNode]; - } else if (combinator == 'adjacent') { - for (var i = 0, node; node = nodes[i]; i++) - if (Selector.handlers.previousElementSibling(targetNode) == node) - return [targetNode]; - } else nodes = h[combinator](nodes); - } - for (var i = 0, node; node = nodes[i]; i++) - if (node == targetNode) return [targetNode]; - return []; - } - return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : []; - }, - - className: function(nodes, root, className, combinator) { - if (nodes && combinator) nodes = this[combinator](nodes); - return Selector.handlers.byClassName(nodes, root, className); - }, - - byClassName: function(nodes, root, className) { - if (!nodes) nodes = Selector.handlers.descendant([root]); - var needle = ' ' + className + ' '; - for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) { - nodeClassName = node.className; - if (nodeClassName.length == 0) continue; - if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle)) - results.push(node); - } - return results; - }, - - attrPresence: function(nodes, root, attr) { - if (!nodes) nodes = root.getElementsByTagName("*"); - var results = []; - for (var i = 0, node; node = nodes[i]; i++) - if (Element.hasAttribute(node, attr)) results.push(node); - return results; - }, - - attr: function(nodes, root, attr, value, operator) { - if (!nodes) nodes = root.getElementsByTagName("*"); - var handler = Selector.operators[operator], results = []; - for (var i = 0, node; node = nodes[i]; i++) { - var nodeValue = Element.readAttribute(node, attr); - if (nodeValue === null) continue; - if (handler(nodeValue, value)) results.push(node); - } - return results; - }, - - pseudo: function(nodes, name, value, root, combinator) { - if (nodes && combinator) nodes = this[combinator](nodes); - if (!nodes) nodes = root.getElementsByTagName("*"); - return Selector.pseudos[name](nodes, value, root); - } - }, - - pseudos: { - 'first-child': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) { - if (Selector.handlers.previousElementSibling(node)) continue; - results.push(node); - } - return results; - }, - 'last-child': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) { - if (Selector.handlers.nextElementSibling(node)) continue; - results.push(node); - } - return results; - }, - 'only-child': function(nodes, value, root) { - var h = Selector.handlers; - for (var i = 0, results = [], node; node = nodes[i]; i++) - if (!h.previousElementSibling(node) && !h.nextElementSibling(node)) - results.push(node); - return results; - }, - 'nth-child': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, formula, root); - }, - 'nth-last-child': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, formula, root, true); - }, - 'nth-of-type': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, formula, root, false, true); - }, - 'nth-last-of-type': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, formula, root, true, true); - }, - 'first-of-type': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, "1", root, false, true); - }, - 'last-of-type': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, "1", root, true, true); - }, - 'only-of-type': function(nodes, formula, root) { - var p = Selector.pseudos; - return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root); - }, - - // handles the an+b logic - getIndices: function(a, b, total) { - if (a == 0) return b > 0 ? [b] : []; - return $R(1, total).inject([], function(memo, i) { - if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i); - return memo; - }); - }, - - // handles nth(-last)-child, nth(-last)-of-type, and (first|last)-of-type - nth: function(nodes, formula, root, reverse, ofType) { - if (nodes.length == 0) return []; - if (formula == 'even') formula = '2n+0'; - if (formula == 'odd') formula = '2n+1'; - var h = Selector.handlers, results = [], indexed = [], m; - h.mark(nodes); - for (var i = 0, node; node = nodes[i]; i++) { - if (!node.parentNode._counted) { - h.index(node.parentNode, reverse, ofType); - indexed.push(node.parentNode); - } - } - if (formula.match(/^\d+$/)) { // just a number - formula = Number(formula); - for (var i = 0, node; node = nodes[i]; i++) - if (node.nodeIndex == formula) results.push(node); - } else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b - if (m[1] == "-") m[1] = -1; - var a = m[1] ? Number(m[1]) : 1; - var b = m[2] ? Number(m[2]) : 0; - var indices = Selector.pseudos.getIndices(a, b, nodes.length); - for (var i = 0, node, l = indices.length; node = nodes[i]; i++) { - for (var j = 0; j < l; j++) - if (node.nodeIndex == indices[j]) results.push(node); - } - } - h.unmark(nodes); - h.unmark(indexed); - return results; - }, - - 'empty': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) { - // IE treats comments as element nodes - if (node.tagName == '!' || (node.firstChild && !node.innerHTML.match(/^\s*$/))) continue; - results.push(node); - } - return results; - }, - - 'not': function(nodes, selector, root) { - var h = Selector.handlers, selectorType, m; - var exclusions = new Selector(selector).findElements(root); - h.mark(exclusions); - for (var i = 0, results = [], node; node = nodes[i]; i++) - if (!node._counted) results.push(node); - h.unmark(exclusions); - return results; - }, - - 'enabled': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) - if (!node.disabled) results.push(node); - return results; - }, - - 'disabled': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) - if (node.disabled) results.push(node); - return results; - }, - - 'checked': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) - if (node.checked) results.push(node); - return results; - } - }, - - operators: { - '=': function(nv, v) { return nv == v; }, - '!=': function(nv, v) { return nv != v; }, - '^=': function(nv, v) { return nv.startsWith(v); }, - '$=': function(nv, v) { return nv.endsWith(v); }, - '*=': function(nv, v) { return nv.include(v); }, - '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); }, - '|=': function(nv, v) { return ('-' + nv.toUpperCase() + '-').include('-' + v.toUpperCase() + '-'); } - }, - - matchElements: function(elements, expression) { - var matches = new Selector(expression).findElements(), h = Selector.handlers; - h.mark(matches); - for (var i = 0, results = [], element; element = elements[i]; i++) - if (element._counted) results.push(element); - h.unmark(matches); - return results; - }, - - findElement: function(elements, expression, index) { - if (Object.isNumber(expression)) { - index = expression; expression = false; - } - return Selector.matchElements(elements, expression || '*')[index || 0]; - }, - - findChildElements: function(element, expressions) { - var exprs = expressions.join(','), expressions = []; - exprs.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) { - expressions.push(m[1].strip()); - }); - var results = [], h = Selector.handlers; - for (var i = 0, l = expressions.length, selector; i < l; i++) { - selector = new Selector(expressions[i].strip()); - h.concat(results, selector.findElements(element)); - } - return (l > 1) ? h.unique(results) : results; - } -}); - -function $$() { - return Selector.findChildElements(document, $A(arguments)); -} -var Form = { - reset: function(form) { - $(form).reset(); - return form; - }, - - serializeElements: function(elements, options) { - if (typeof options != 'object') options = { hash: !!options }; - else if (options.hash === undefined) options.hash = true; - var key, value, submitted = false, submit = options.submit; - - var data = elements.inject({ }, function(result, element) { - if (!element.disabled && element.name) { - key = element.name; value = $(element).getValue(); - if (value != null && (element.type != 'submit' || (!submitted && - submit !== false && (!submit || key == submit) && (submitted = true)))) { - if (key in result) { - // a key is already present; construct an array of values - if (!Object.isArray(result[key])) result[key] = [result[key]]; - result[key].push(value); - } - else result[key] = value; - } - } - return result; - }); - - return options.hash ? data : Object.toQueryString(data); - } -}; - -Form.Methods = { - serialize: function(form, options) { - return Form.serializeElements(Form.getElements(form), options); - }, - - getElements: function(form) { - return $A($(form).getElementsByTagName('*')).inject([], - function(elements, child) { - if (Form.Element.Serializers[child.tagName.toLowerCase()]) - elements.push(Element.extend(child)); - return elements; - } - ); - }, - - getInputs: function(form, typeName, name) { - form = $(form); - var inputs = form.getElementsByTagName('input'); - - if (!typeName && !name) return $A(inputs).map(Element.extend); - - for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) { - var input = inputs[i]; - if ((typeName && input.type != typeName) || (name && input.name != name)) - continue; - matchingInputs.push(Element.extend(input)); - } - - return matchingInputs; - }, - - disable: function(form) { - form = $(form); - Form.getElements(form).invoke('disable'); - return form; - }, - - enable: function(form) { - form = $(form); - Form.getElements(form).invoke('enable'); - return form; - }, - - findFirstElement: function(form) { - var elements = $(form).getElements().findAll(function(element) { - return 'hidden' != element.type && !element.disabled; - }); - var firstByIndex = elements.findAll(function(element) { - return element.hasAttribute('tabIndex') && element.tabIndex >= 0; - }).sortBy(function(element) { return element.tabIndex }).first(); - - return firstByIndex ? firstByIndex : elements.find(function(element) { - return ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); - }); - }, - - focusFirstElement: function(form) { - form = $(form); - form.findFirstElement().activate(); - return form; - }, - - request: function(form, options) { - form = $(form), options = Object.clone(options || { }); - - var params = options.parameters, action = form.readAttribute('action') || ''; - if (action.blank()) action = window.location.href; - options.parameters = form.serialize(true); - - if (params) { - if (Object.isString(params)) params = params.toQueryParams(); - Object.extend(options.parameters, params); - } - - if (form.hasAttribute('method') && !options.method) - options.method = form.method; - - return new Ajax.Request(action, options); - } -}; - -/*--------------------------------------------------------------------------*/ - -Form.Element = { - focus: function(element) { - $(element).focus(); - return element; - }, - - select: function(element) { - $(element).select(); - return element; - } -}; - -Form.Element.Methods = { - serialize: function(element) { - element = $(element); - if (!element.disabled && element.name) { - var value = element.getValue(); - if (value != undefined) { - var pair = { }; - pair[element.name] = value; - return Object.toQueryString(pair); - } - } - return ''; - }, - - getValue: function(element) { - element = $(element); - var method = element.tagName.toLowerCase(); - return Form.Element.Serializers[method](element); - }, - - setValue: function(element, value) { - element = $(element); - var method = element.tagName.toLowerCase(); - Form.Element.Serializers[method](element, value); - return element; - }, - - clear: function(element) { - $(element).value = ''; - return element; - }, - - present: function(element) { - return $(element).value != ''; - }, - - activate: function(element) { - element = $(element); - try { - element.focus(); - if (element.select && (element.tagName.toLowerCase() != 'input' || - !['button', 'reset', 'submit'].include(element.type))) - element.select(); - } catch (e) { } - return element; - }, - - disable: function(element) { - element = $(element); - element.blur(); - element.disabled = true; - return element; - }, - - enable: function(element) { - element = $(element); - element.disabled = false; - return element; - } -}; - -/*--------------------------------------------------------------------------*/ - -var Field = Form.Element; -var $F = Form.Element.Methods.getValue; - -/*--------------------------------------------------------------------------*/ - -Form.Element.Serializers = { - input: function(element, value) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - return Form.Element.Serializers.inputSelector(element, value); - default: - return Form.Element.Serializers.textarea(element, value); - } - }, - - inputSelector: function(element, value) { - if (value === undefined) return element.checked ? element.value : null; - else element.checked = !!value; - }, - - textarea: function(element, value) { - if (value === undefined) return element.value; - else element.value = value; - }, - - select: function(element, index) { - if (index === undefined) - return this[element.type == 'select-one' ? - 'selectOne' : 'selectMany'](element); - else { - var opt, value, single = !Object.isArray(index); - for (var i = 0, length = element.length; i < length; i++) { - opt = element.options[i]; - value = this.optionValue(opt); - if (single) { - if (value == index) { - opt.selected = true; - return; - } - } - else opt.selected = index.include(value); - } - } - }, - - selectOne: function(element) { - var index = element.selectedIndex; - return index >= 0 ? this.optionValue(element.options[index]) : null; - }, - - selectMany: function(element) { - var values, length = element.length; - if (!length) return null; - - for (var i = 0, values = []; i < length; i++) { - var opt = element.options[i]; - if (opt.selected) values.push(this.optionValue(opt)); - } - return values; - }, - - optionValue: function(opt) { - // extend element because hasAttribute may not be native - return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text; - } -}; - -/*--------------------------------------------------------------------------*/ - -Abstract.TimedObserver = Class.create(PeriodicalExecuter, { - initialize: function($super, element, frequency, callback) { - $super(callback, frequency); - this.element = $(element); - this.lastValue = this.getValue(); - }, - - execute: function() { - var value = this.getValue(); - if (Object.isString(this.lastValue) && Object.isString(value) ? - this.lastValue != value : String(this.lastValue) != String(value)) { - this.callback(this.element, value); - this.lastValue = value; - } - } -}); - -Form.Element.Observer = Class.create(Abstract.TimedObserver, { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.Observer = Class.create(Abstract.TimedObserver, { - getValue: function() { - return Form.serialize(this.element); - } -}); - -/*--------------------------------------------------------------------------*/ - -Abstract.EventObserver = Class.create({ - initialize: function(element, callback) { - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - if (this.element.tagName.toLowerCase() == 'form') - this.registerFormCallbacks(); - else - this.registerCallback(this.element); - }, - - onElementEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - }, - - registerFormCallbacks: function() { - Form.getElements(this.element).each(this.registerCallback, this); - }, - - registerCallback: function(element) { - if (element.type) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - Event.observe(element, 'click', this.onElementEvent.bind(this)); - break; - default: - Event.observe(element, 'change', this.onElementEvent.bind(this)); - break; - } - } - } -}); - -Form.Element.EventObserver = Class.create(Abstract.EventObserver, { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.EventObserver = Class.create(Abstract.EventObserver, { - getValue: function() { - return Form.serialize(this.element); - } -}); -if (!window.Event) var Event = { }; - -Object.extend(Event, { - KEY_BACKSPACE: 8, - KEY_TAB: 9, - KEY_RETURN: 13, - KEY_ESC: 27, - KEY_LEFT: 37, - KEY_UP: 38, - KEY_RIGHT: 39, - KEY_DOWN: 40, - KEY_DELETE: 46, - KEY_HOME: 36, - KEY_END: 35, - KEY_PAGEUP: 33, - KEY_PAGEDOWN: 34, - KEY_INSERT: 45, - - cache: { }, - - relatedTarget: function(event) { - var element; - switch(event.type) { - case 'mouseover': element = event.fromElement; break; - case 'mouseout': element = event.toElement; break; - default: return null; - } - return Element.extend(element); - } -}); - -Event.Methods = (function() { - var isButton; - - if (Prototype.Browser.IE) { - var buttonMap = { 0: 1, 1: 4, 2: 2 }; - isButton = function(event, code) { - return event.button == buttonMap[code]; - }; - - } else if (Prototype.Browser.WebKit) { - isButton = function(event, code) { - switch (code) { - case 0: return event.which == 1 && !event.metaKey; - case 1: return event.which == 1 && event.metaKey; - default: return false; - } - }; - - } else { - isButton = function(event, code) { - return event.which ? (event.which === code + 1) : (event.button === code); - }; - } - - return { - isLeftClick: function(event) { return isButton(event, 0) }, - isMiddleClick: function(event) { return isButton(event, 1) }, - isRightClick: function(event) { return isButton(event, 2) }, - - element: function(event) { - var node = Event.extend(event).target; - return Element.extend(node.nodeType == Node.TEXT_NODE ? node.parentNode : node); - }, - - findElement: function(event, expression) { - var element = Event.element(event); - return element.match(expression) ? element : element.up(expression); - }, - - pointer: function(event) { - return { - x: event.pageX || (event.clientX + - (document.documentElement.scrollLeft || document.body.scrollLeft)), - y: event.pageY || (event.clientY + - (document.documentElement.scrollTop || document.body.scrollTop)) - }; - }, - - pointerX: function(event) { return Event.pointer(event).x }, - pointerY: function(event) { return Event.pointer(event).y }, - - stop: function(event) { - Event.extend(event); - event.preventDefault(); - event.stopPropagation(); - event.stopped = true; - } - }; -})(); - -Event.extend = (function() { - var methods = Object.keys(Event.Methods).inject({ }, function(m, name) { - m[name] = Event.Methods[name].methodize(); - return m; - }); - - if (Prototype.Browser.IE) { - Object.extend(methods, { - stopPropagation: function() { this.cancelBubble = true }, - preventDefault: function() { this.returnValue = false }, - inspect: function() { return "[object Event]" } - }); - - return function(event) { - if (!event) return false; - if (event._extendedByPrototype) return event; - - event._extendedByPrototype = Prototype.emptyFunction; - var pointer = Event.pointer(event); - Object.extend(event, { - target: event.srcElement, - relatedTarget: Event.relatedTarget(event), - pageX: pointer.x, - pageY: pointer.y - }); - return Object.extend(event, methods); - }; - - } else { - Event.prototype = Event.prototype || document.createEvent("HTMLEvents").__proto__; - Object.extend(Event.prototype, methods); - return Prototype.K; - } -})(); - -Object.extend(Event, (function() { - var cache = Event.cache; - - function getEventID(element) { - if (element._eventID) return element._eventID; - arguments.callee.id = arguments.callee.id || 1; - return element._eventID = ++arguments.callee.id; - } - - function getDOMEventName(eventName) { - if (eventName && eventName.include(':')) return "dataavailable"; - return eventName; - } - - function getCacheForID(id) { - return cache[id] = cache[id] || { }; - } - - function getWrappersForEventName(id, eventName) { - var c = getCacheForID(id); - return c[eventName] = c[eventName] || []; - } - - function createWrapper(element, eventName, handler) { - var id = getEventID(element); - var c = getWrappersForEventName(id, eventName); - if (c.pluck("handler").include(handler)) return false; - - var wrapper = function(event) { - if (!Event || !Event.extend || - (event.eventName && event.eventName != eventName)) - return false; - - Event.extend(event); - handler.call(element, event) - }; - - wrapper.handler = handler; - c.push(wrapper); - return wrapper; - } - - function findWrapper(id, eventName, handler) { - var c = getWrappersForEventName(id, eventName); - return c.find(function(wrapper) { return wrapper.handler == handler }); - } - - function destroyWrapper(id, eventName, handler) { - var c = getCacheForID(id); - if (!c[eventName]) return false; - c[eventName] = c[eventName].without(findWrapper(id, eventName, handler)); - } - - function destroyCache() { - for (var id in cache) - for (var eventName in cache[id]) - cache[id][eventName] = null; - } - - if (window.attachEvent) { - window.attachEvent("onunload", destroyCache); - } - - return { - observe: function(element, eventName, handler) { - element = $(element); - var name = getDOMEventName(eventName); - - var wrapper = createWrapper(element, eventName, handler); - if (!wrapper) return element; - - if (element.addEventListener) { - element.addEventListener(name, wrapper, false); - } else { - element.attachEvent("on" + name, wrapper); - } - - return element; - }, - - stopObserving: function(element, eventName, handler) { - element = $(element); - var id = getEventID(element), name = getDOMEventName(eventName); - - if (!handler && eventName) { - getWrappersForEventName(id, eventName).each(function(wrapper) { - element.stopObserving(eventName, wrapper.handler); - }); - return element; - - } else if (!eventName) { - Object.keys(getCacheForID(id)).each(function(eventName) { - element.stopObserving(eventName); - }); - return element; - } - - var wrapper = findWrapper(id, eventName, handler); - if (!wrapper) return element; - - if (element.removeEventListener) { - element.removeEventListener(name, wrapper, false); - } else { - element.detachEvent("on" + name, wrapper); - } - - destroyWrapper(id, eventName, handler); - - return element; - }, - - fire: function(element, eventName, memo) { - element = $(element); - if (element == document && document.createEvent && !element.dispatchEvent) - element = document.documentElement; - - if (document.createEvent) { - var event = document.createEvent("HTMLEvents"); - event.initEvent("dataavailable", true, true); - } else { - var event = document.createEventObject(); - event.eventType = "ondataavailable"; - } - - event.eventName = eventName; - event.memo = memo || { }; - - if (document.createEvent) { - element.dispatchEvent(event); - } else { - element.fireEvent(event.eventType, event); - } - - return event; - } - }; -})()); - -Object.extend(Event, Event.Methods); - -Element.addMethods({ - fire: Event.fire, - observe: Event.observe, - stopObserving: Event.stopObserving -}); - -Object.extend(document, { - fire: Element.Methods.fire.methodize(), - observe: Element.Methods.observe.methodize(), - stopObserving: Element.Methods.stopObserving.methodize() -}); - -(function() { - /* Support for the DOMContentLoaded event is based on work by Dan Webb, - Matthias Miller, Dean Edwards and John Resig. */ - - var timer, fired = false; - - function fireContentLoadedEvent() { - if (fired) return; - if (timer) window.clearInterval(timer); - document.fire("dom:loaded"); - fired = true; - } - - if (document.addEventListener) { - if (Prototype.Browser.WebKit) { - timer = window.setInterval(function() { - if (/loaded|complete/.test(document.readyState)) - fireContentLoadedEvent(); - }, 0); - - Event.observe(window, "load", fireContentLoadedEvent); - - } else { - document.addEventListener("DOMContentLoaded", - fireContentLoadedEvent, false); - } - - } else { - document.write("