spreedly 1.3.5 → 1.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +15 -0
  2. data/{History.txt → HISTORY.md} +24 -16
  3. data/{vendor/httparty/MIT-LICENSE → LICENSE.txt} +10 -8
  4. data/README.md +42 -0
  5. data/lib/spreedly.rb +28 -26
  6. data/lib/spreedly/version.rb +1 -1
  7. metadata +44 -116
  8. data/.gemtest +0 -0
  9. data/Manifest.txt +0 -68
  10. data/README.txt +0 -67
  11. data/Rakefile +0 -49
  12. data/TODO +0 -0
  13. data/test/spreedly_gem_test.rb +0 -319
  14. data/test/test_site.yml +0 -2
  15. data/vendor/httparty/History +0 -108
  16. data/vendor/httparty/Manifest +0 -55
  17. data/vendor/httparty/README +0 -35
  18. data/vendor/httparty/Rakefile +0 -47
  19. data/vendor/httparty/bin/httparty +0 -98
  20. data/vendor/httparty/cucumber.yml +0 -1
  21. data/vendor/httparty/examples/aaws.rb +0 -32
  22. data/vendor/httparty/examples/basic.rb +0 -11
  23. data/vendor/httparty/examples/delicious.rb +0 -37
  24. data/vendor/httparty/examples/google.rb +0 -16
  25. data/vendor/httparty/examples/rubyurl.rb +0 -14
  26. data/vendor/httparty/examples/twitter.rb +0 -31
  27. data/vendor/httparty/examples/whoismyrep.rb +0 -10
  28. data/vendor/httparty/features/basic_authentication.feature +0 -20
  29. data/vendor/httparty/features/command_line.feature +0 -7
  30. data/vendor/httparty/features/deals_with_http_error_codes.feature +0 -26
  31. data/vendor/httparty/features/handles_multiple_formats.feature +0 -34
  32. data/vendor/httparty/features/steps/env.rb +0 -15
  33. data/vendor/httparty/features/steps/httparty_response_steps.rb +0 -26
  34. data/vendor/httparty/features/steps/httparty_steps.rb +0 -15
  35. data/vendor/httparty/features/steps/mongrel_helper.rb +0 -55
  36. data/vendor/httparty/features/steps/remote_service_steps.rb +0 -47
  37. data/vendor/httparty/features/supports_redirection.feature +0 -22
  38. data/vendor/httparty/httparty.gemspec +0 -37
  39. data/vendor/httparty/lib/core_extensions.rb +0 -189
  40. data/vendor/httparty/lib/httparty.rb +0 -201
  41. data/vendor/httparty/lib/httparty/cookie_hash.rb +0 -9
  42. data/vendor/httparty/lib/httparty/exceptions.rb +0 -7
  43. data/vendor/httparty/lib/httparty/logging.rb +0 -35
  44. data/vendor/httparty/lib/httparty/module_inheritable_attributes.rb +0 -25
  45. data/vendor/httparty/lib/httparty/parsers.rb +0 -4
  46. data/vendor/httparty/lib/httparty/parsers/json.rb +0 -74
  47. data/vendor/httparty/lib/httparty/parsers/xml.rb +0 -209
  48. data/vendor/httparty/lib/httparty/request.rb +0 -169
  49. data/vendor/httparty/lib/httparty/response.rb +0 -17
  50. data/vendor/httparty/lib/httparty/version.rb +0 -3
  51. data/vendor/httparty/setup.rb +0 -1585
  52. data/vendor/httparty/spec/fixtures/delicious.xml +0 -23
  53. data/vendor/httparty/spec/fixtures/empty.xml +0 -0
  54. data/vendor/httparty/spec/fixtures/google.html +0 -3
  55. data/vendor/httparty/spec/fixtures/twitter.json +0 -1
  56. data/vendor/httparty/spec/fixtures/twitter.xml +0 -403
  57. data/vendor/httparty/spec/fixtures/undefined_method_add_node_for_nil.xml +0 -2
  58. data/vendor/httparty/spec/hash_spec.rb +0 -49
  59. data/vendor/httparty/spec/httparty/cookie_hash_spec.rb +0 -38
  60. data/vendor/httparty/spec/httparty/parsers/json_spec.rb +0 -44
  61. data/vendor/httparty/spec/httparty/parsers/xml_spec.rb +0 -454
  62. data/vendor/httparty/spec/httparty/request_spec.rb +0 -203
  63. data/vendor/httparty/spec/httparty/response_spec.rb +0 -53
  64. data/vendor/httparty/spec/httparty_spec.rb +0 -259
  65. data/vendor/httparty/spec/spec.opts +0 -3
  66. data/vendor/httparty/spec/spec_helper.rb +0 -21
  67. data/vendor/httparty/spec/string_spec.rb +0 -29
  68. data/vendor/httparty/website/css/common.css +0 -47
  69. data/vendor/httparty/website/index.html +0 -74
@@ -1,3 +0,0 @@
1
- --format
2
- progress
3
- --colour
@@ -1,21 +0,0 @@
1
- require 'rubygems'
2
- gem 'rspec'
3
- require 'spec'
4
- require File.expand_path(File.dirname(__FILE__) + '/../lib/httparty')
5
-
6
- def file_fixture(filename)
7
- open(File.dirname(__FILE__) + "/fixtures/#{filename.to_s}").read
8
- end
9
-
10
- def stub_http_response_with(filename)
11
- format = filename.split('.').last.intern
12
- data = file_fixture(filename)
13
-
14
- response = Net::HTTPOK.new("1.1", 200, "Content for you")
15
- response.stub!(:body).and_return(data)
16
-
17
- http_request = HTTParty::Request.new(Net::HTTP::Get, 'http://localhost', :format => format)
18
- http_request.stub!(:perform_actual_request).and_return(response)
19
-
20
- HTTParty::Request.should_receive(:new).and_return(http_request)
21
- end
@@ -1,29 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
-
3
- describe String, "#snake_case" do
4
- it "lowercases one word CamelCase" do
5
- "Merb".snake_case.should == "merb"
6
- end
7
-
8
- it "makes one underscore snake_case two word CamelCase" do
9
- "MerbCore".snake_case.should == "merb_core"
10
- end
11
-
12
- it "handles CamelCase with more than 2 words" do
13
- "SoYouWantContributeToMerbCore".snake_case.should == "so_you_want_contribute_to_merb_core"
14
- end
15
-
16
- it "handles CamelCase with more than 2 capital letter in a row" do
17
- "CNN".snake_case.should == "cnn"
18
- "CNNNews".snake_case.should == "cnn_news"
19
- "HeadlineCNNNews".snake_case.should == "headline_cnn_news"
20
- end
21
-
22
- it "does NOT change one word lowercase" do
23
- "merb".snake_case.should == "merb"
24
- end
25
-
26
- it "leaves snake_case as is" do
27
- "merb_core".snake_case.should == "merb_core"
28
- end
29
- end
@@ -1,47 +0,0 @@
1
- @media screen, projection {
2
- /*
3
- Copyright (c) 2007, Yahoo! Inc. All rights reserved.
4
- Code licensed under the BSD License:
5
- http://developer.yahoo.net/yui/license.txt
6
- version: 2.2.0
7
- */
8
- body {font:13px arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}table {font-size:inherit;font:100%;}select, input, textarea {font:99% arial,helvetica,clean,sans-serif;}pre, code {font:115% monospace;*font-size:100%;}body * {line-height:1.22em;}
9
- body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}/*ol,ul {list-style:none;}*/caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym {border:0;}
10
- /* end of yahoo reset and fonts */
11
-
12
- body {color:#333; background:#4b1a1a; line-height:1.3;}
13
- p {margin:0 0 20px;}
14
- a {color:#4b1a1a;}
15
- a:hover {text-decoration:none;}
16
- strong {font-weight:bold;}
17
- em {font-style:italics;}
18
- h1,h2,h3,h4,h5,h6 {font-weight:bold;}
19
- h1 {font-size:197%; margin:30px 0; color:#4b1a1a;}
20
- h2 {font-size:174%; margin:20px 0; color:#b8111a;}
21
- h3 {font-size:152%; margin:10px 0;}
22
- h4 {font-size:129%; margin:10px 0;}
23
- pre {background:#eee; margin:0 0 20px; padding:20px; border:1px solid #ccc; font-size:100%; overflow:auto;}
24
- code {font-size:100%; margin:0; padding:0;}
25
- ul, ol {margin:10px 0 10px 25px;}
26
- ol li {margin:0 0 10px;}
27
-
28
-
29
-
30
-
31
-
32
- div#wrapper {background:#fff; width:560px; margin:0 auto; padding:20px; border:10px solid #bc8c46; border-width:0 10px;}
33
- div#header {position:relative; border-bottom:1px dotted; margin:0 0 10px; padding:0 0 10px;}
34
- div#header p {margin:0; padding:0;}
35
- div#header h1 {margin:0; padding:0;}
36
- ul#nav {position:absolute; top:0; right:0; list-style:none; margin:0; padding:0;}
37
- ul#nav li {display:inline; padding:0 0 0 5px;}
38
- ul#nav li a {}
39
- div#content {}
40
- div#footer {margin:40px 0 0; border-top:1px dotted; padding:10px 0 0;}
41
-
42
-
43
-
44
-
45
-
46
-
47
- }
@@ -1,74 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
5
- <title>HTTParty by John Nunemaker</title>
6
- <link rel="stylesheet" href="css/common.css" type="text/css" />
7
- </head>
8
- <body>
9
-
10
- <div id="wrapper">
11
- <div id="header">
12
- <h1>HTTParty</h1>
13
- <p>Tonight we're gonna HTTParty like it's 1999!</p>
14
-
15
- <ul id="nav">
16
- <li><a href="rdoc/">Docs</a></li>
17
- <li><a href="http://github.com/jnunemaker/httparty">Github</a></li>
18
- <li><a href="http://jnunemaker.lighthouseapp.com/projects/14842-httparty/tickets">Lighthouse</a></li>
19
- <li><a href="http://rubyforge.org/projects/httparty/">Rubyforge</a></li>
20
- </ul>
21
- </div>
22
-
23
- <div id="content">
24
- <h2>Install</h2>
25
- <pre><code>$ sudo gem install httparty</code></pre>
26
-
27
- <h2>Some Quick Examples</h2>
28
-
29
- <p>The following is a simple example of wrapping Twitter's API for posting updates.</p>
30
-
31
- <pre><code>class Twitter
32
- include HTTParty
33
- base_uri 'twitter.com'
34
- basic_auth 'username', 'password'
35
- end
36
-
37
- Twitter.post('/statuses/update.json', :query => {:status => "It's an HTTParty and everyone is invited!"})</code></pre>
38
-
39
- <p>That is really it! The object returned is a ruby hash that is decoded from Twitter's json response. JSON parsing is used because of the .json extension in the path of the request. You can also explicitly set a format (see the examples). </p>
40
-
41
- <p>That works and all but what if you don't want to embed your username and password in the class? Below is an example to fix that:</p>
42
-
43
- <pre><code>class Twitter
44
- include HTTParty
45
- base_uri 'twitter.com'
46
-
47
- def initialize(u, p)
48
- @auth = {:username => u, :password => p}
49
- end
50
-
51
- def post(text)
52
- options = { :query => {:status => text}, :basic_auth => @auth }
53
- self.class.post('/statuses/update.json', options)
54
- end
55
- end
56
-
57
- Twitter.new('username', 'password').post("It's an HTTParty and everyone is invited!")</code></pre>
58
-
59
- <p><strong>More Examples:</strong> There are <a href="http://github.com/jnunemaker/httparty/tree/master/examples/">several examples in the gem itself</a>.</p>
60
-
61
- <h2>Support</h2>
62
- <p>Conversations welcome in the <a href="http://groups.google.com/group/httparty-gem">google group</a> and bugs/features over at <a href="http://jnunemaker.lighthouseapp.com/projects/14842-httparty/overview">Lightouse</a>.</p>
63
-
64
-
65
- </div>
66
-
67
- <div id="footer">
68
- <p>Created by <a href="http://addictedtonew.com/about/">John Nunemaker</a> |
69
- <a href="http://orderedlist.com/">Hire Me at Ordered List</a></p>
70
- </div>
71
- </div>
72
-
73
- </body>
74
- </html>