gratitude 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6612f9265596c16760a8a6a57cdf792de502ac33
4
- data.tar.gz: 2c3fd5e87e85e5797264db76467312616129bb3c
3
+ metadata.gz: a3426a86627d58024de176a96959857d0032a69d
4
+ data.tar.gz: c918f9fc3804023c7985c283c967d37dd83eae8e
5
5
  SHA512:
6
- metadata.gz: 3508b34b260ee22ad4baeb21b8db6fe09cef53082d493841f5224c4ff8d895dd5f43477ded0eb7b8c352d2876cf048e6f672a2b11188a31a0eaf20ec891053cb
7
- data.tar.gz: ba4d68e325ea9730e3cf2429a56a69cbe6a2e8ef9ae6272065de1bce026d9aed0d4296a19c05ebf0cb3eda506d563a6322c73c3dd6dc4d436c43a902968da5c0
6
+ metadata.gz: beacd24fcdf3e11cc1459d76a9dc4bdaf3361368c2bc235a0c4d7faa42b2285d5d4e90cc7f45372b6ac40282dcc73cc2390006a24ebe3039f5408900fcbe95dc
7
+ data.tar.gz: 87acf159f83bde5b85702f7a89e2bfac096fbc7db258aefb49c6e99ce29fecc24ff1d1be4752473fe0fea0bc37cbaf11f237ec61f40540a82fc68fe36ad471c1
data/.travis.yml CHANGED
@@ -1,5 +1,8 @@
1
+ language: ruby
1
2
  rvm:
3
+ - 2.1.1
4
+ - 2.1.0
2
5
  - 2.0.0
3
6
  - 1.9.3
4
7
  - jruby-19mode
5
- - rbx-19mode
8
+ - jruby-head
data/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  ### 0.1.0 (Upcoming Stable Release)
2
2
  * Implement all aspects of the Gittip API.
3
3
 
4
+ ### 0.0.10
5
+ * Add rake console task to enter an IRB session with Gratitude required
6
+ * Simplify Tip's public interface
7
+
8
+ ### 0.0.9 (10/19/2013)
9
+ * Add ability to update a user's current tips.
10
+
4
11
  ### 0.0.8 (10/18/2013)
5
12
  * Add client authentication.
6
13
  * Add ability to retrieve a user's current tips.
data/Gemfile CHANGED
@@ -3,7 +3,7 @@ source "https://rubygems.org"
3
3
  gemspec
4
4
 
5
5
  group :development, :test do
6
- gem "rspec"
6
+ gem "rspec", '~> 3.0.0.beta2'
7
7
  gem "webmock"
8
8
  gem "vcr"
9
9
  gem "pry"
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2013 John Kelly Ferguson
3
+ Copyright (c) 2014 John Kelly Ferguson
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in
data/README.md CHANGED
@@ -31,7 +31,9 @@ When using gratitude to retrieve data from the Gittip API, please note that many
31
31
 
32
32
  The Gittip API provides access to the historical data of all its paydays. To retrieve this information, simply use the following command:
33
33
 
34
- Gratitude::Payday.all
34
+ ```ruby
35
+ Gratitude::Payday.all
36
+ ```
35
37
 
36
38
  The above will return an array of Payday objects. Each Payday object responds to the following methods:
37
39
 
@@ -53,26 +55,34 @@ The above will return an array of Payday objects. Each Payday object responds to
53
55
 
54
56
  You can then iterate through this array of payday objects to persist them to a database or get whatever information you need.
55
57
 
56
- paydays = Gratitude::Payday.all
57
- paydays.each do |payday|
58
- # get whatever information you want from the payday object
59
- # using the above mentioned methods.
60
- end
58
+ ```ruby
59
+ paydays = Gratitude::Payday.all
60
+ paydays.each do |payday|
61
+ # get whatever information you want from the payday object
62
+ # using the above mentioned methods.
63
+ end
64
+ ```
61
65
 
62
66
  Finally, if you just want to get the most recent payday, you can do so by using:
63
67
 
64
- Gratitude::Payday.most_recent
68
+ ```ruby
69
+ Gratitude::Payday.most_recent
70
+ ```
65
71
 
66
72
  ##Statistics ([source code](https://github.com/JohnKellyFerguson/gratitude/blob/master/lib/gratitude/statistics.rb))
67
73
  The Statistics aspect of the Gittip API provides the current statistics, as of that moment in time, for Gittip. Note that these stats can potentially change when making subsequent requests.
68
74
 
69
75
  If you would like to get the current Gittip stats, you can do so by using:
70
76
 
71
- Gratitude::Statistics.current
77
+ ```ruby
78
+ Gratitude::Statistics.current
79
+ ```
72
80
 
73
81
  Alternatively, you can also use:
74
82
 
75
- Gratitude::Statistics.new
83
+ ```ruby
84
+ Gratitude::Statistics.new
85
+ ```
76
86
 
77
87
  Each of the above will return an object containing all of the current Gittip stats. You can access each of the Gittip stats using the following methods:
78
88
 
@@ -97,8 +107,8 @@ Each of the above will return an object containing all of the current Gittip sta
97
107
  * `this_thursday`
98
108
  * This refers to the upcoming Thursday when payments/transfers are set to occur. Possible values include: "this Thursday", "today", "right now!", and "next Thursday"
99
109
  * `tip_distribution_json`
100
- * This returns a hash. Each key in the hash is a float which represents a tip amount (for example, $0.01, $0.25 or $1). The value of each key is an array. The first element in the array is an integer representing the total number of users who have pledged that amount. The second element in the array is a float which shows how much this tip amount makes up all of the possible tips. For example, the hash returned will look like the following: `{ 0.01: [11, 0.002153484729835552], … }`
101
-
110
+ * This returns a hash. Each key in the hash is a float which represents a tip amount (for example, $0.01, $0.25 or $1). The value of each key is an array. The first element in the array is an integer representing the total number of users who have pledged that amount. The second element in the array is a float which shows how much this tip amount makes up of all the possible tips. For example, the hash returned will look like the following: `{ 0.01: [11, 0.002153484729835552], … }`
111
+
102
112
  In this example, the amount being tipped is $0.01. The amount of users tipping this amount is 11, and the total tip amount for this tip size makes up 0.2153484729835552% of all tips distributed. The hash will contain many more elements, each with the same structure.
103
113
  * `number_of_tips` (alias: `tip_n`)
104
114
  * `value_of_total_backed_tips` (alias: `total_backed_tips`)
@@ -108,7 +118,9 @@ Each of the above will return an object containing all of the current Gittip sta
108
118
 
109
119
  The Profile aspect of the Gittip API allows you to get the public profile information of any Gittip user. To do so, just pass their username as an initialization argument to the `Gratitude::Profile` class.
110
120
 
111
- Gratitude::Profile.new("johnkellyferguson")
121
+ ```ruby
122
+ Gratitude::Profile.new("johnkellyferguson")
123
+ ```
112
124
 
113
125
  The above will retrieve the public profile of the above user. You can then access all of the different information with the following methods:
114
126
 
@@ -150,13 +162,16 @@ The above will retrieve the public profile of the above user. You can then acces
150
162
  **TODO:** Implement the `my_tip` method into the Profile section once client authentication is finished.
151
163
 
152
164
  ##Tips ([client authentication source code](https://github.com/JohnKellyFerguson/gratitude/blob/master/lib/gratitude/client.rb), [tips source code](https://github.com/JohnKellyFerguson/gratitude/blob/master/lib/gratitude/tips.rb))
153
- The Tips aspect of the Gittip API allows you to retrieve the current tips of a user. In order to get this information, you will need your username and API_KEY. To find out your API Key, log into your Gittip account, go to your profile and at the bottom of the page you will find your API_KEY.
165
+ The Tips aspect of the Gittip API allows you to retrieve and update the current tips of an authenticated user. In order to interact with this aspect of the API, you will need your username and API_KEY. To find out your API Key, log into your Gittip account, go to your profile and at the bottom of the page you will find your API_KEY.
154
166
 
155
167
  ![Gittip API Key](api_key.png)
156
168
 
157
- Now that you have your API_KEY, you can find out your current tips using Gratitude.
169
+ Now that you have your API_KEY, you can find out your current tips or update your tips using Gratitude.
158
170
 
159
- ```
171
+ ### Determing Current Tips
172
+ To find out the current tips of a user, follow these instructions:
173
+
174
+ ```ruby
160
175
  # First establish a connection to the Gittip API by passing in your credentials to Gratitude::Client.new
161
176
  # You will need to pass in your username and api key like so.
162
177
  client = Gratitude::Client.new(:username => "my_username", :api_key => "my_api_key")
@@ -167,22 +182,107 @@ This will will return an array of hashes that represent your current tips and wi
167
182
 
168
183
 
169
184
  [
185
+ {"amount"=>"2.00", "platform"=>"gittip", "username"=>"gittip"},
170
186
  {"amount"=>"1.00", "platform"=>"gittip", "username"=>"whit537"},
171
- {"amount"=>"0.25", "platform"=>"gittip", "username"=>"JohnKellyFerguson"},
172
-
187
+ {"amount"=>"0.25", "platform"=>"gittip", "username"=>"JohnKellyFerguson"}
173
188
  ]
174
189
 
175
190
  Please be aware that all of the amounts in the hash are strings and not floats.
176
191
 
192
+ In addition, you can also find out the current total of all of a user's tips by using the `current_tips_total` method. This will return a float with a total of all of the user's tips.
193
+
194
+ ```ruby
195
+ # Continuing the example
196
+ client.current_tips_total
197
+ => 3.25
198
+ ```
199
+
200
+ ### Updating Tips
201
+ It is also possible to update a user's tips. To do so, we will once again have to pass in our authentication information (or use our previously stored information).
202
+
203
+ ```ruby
204
+ client = Gratitude::Client.new(:username => "my_username", :api_key => "my_api_key")
205
+ ```
206
+ We can then call the `update_tips` method, which accepts an array of hashes containing a user's username and desired tip amount.
207
+
208
+ ```ruby
209
+ client.update_tips([ { :username => "gittip", :amount => "3.50" },
210
+ { :username => "whit537", :amount => "3.50"},
211
+ { :username => "JohnKellyFerguson", :amount = "3.50" }])
212
+ ```
213
+
214
+ When tips are successfully updated, the `update_tips` method will return an array representing the successfully updated tips.
215
+
216
+ ```ruby
217
+ [
218
+ {"amount"=>"3.50", "platform"=>"gittip", "username"=>"gittip"},
219
+ {"amount"=>"3.50", "platform"=>"gittip", "username"=>"whit537"},
220
+ {"amount"=>"3.50", "platform"=>"gittip", "username"=>"JohnKellyFerguson"}
221
+ ]
222
+ ```
223
+ Please note that you do not have to update all of a user's tips when using the `update_tips` method and that it is possible to either update only a subset of a user's tips or to add new tips.
224
+
225
+ For example:
226
+
227
+ ```ruby
228
+ client.update_tips([ { :username => "gittip", :amount => "4.50" } ])
229
+ ```
230
+ will only updates the tips going to the "gittip"" user. All other tips will remain unchanged. We can see this by continuing our example and running the `current_tips` method.
231
+
232
+ ```ruby
233
+ client.current_tips
234
+ => [
235
+ {"amount"=>"4.50", "platform"=>"gittip", "username"=>"gittip"},
236
+ {"amount"=>"3.50", "platform"=>"gittip", "username"=>"whit537"},
237
+ {"amount"=>"3.50", "platform"=>"gittip", "username"=>"JohnKellyFerguson"}
238
+ ]
239
+ ```
240
+
241
+ New tips can also be added using the `update_tips` method.
242
+
243
+ ```ruby
244
+ client.update_tips([ { :username => "steveklabnik", :amount=> "1.00" }])
245
+ ```
246
+ The new tip will be added to the previously existing tips.
247
+
248
+ ```ruby
249
+ client.current_tips
250
+ => [
251
+ {"amount"=>"4.50", "platform"=>"gittip", "username"=>"gittip"},
252
+ {"amount"=>"3.50", "platform"=>"gittip", "username"=>"whit537"},
253
+ {"amount"=>"3.50", "platform"=>"gittip", "username"=>"JohnKellyFerguson"},
254
+ {"amount"=>"1.00", "platform"=>"gittip", "username"=>"steveklabnik"}
255
+ ]
256
+ ```
257
+
258
+ Finally, gratitude comes with the ability to update a specific tip and remove all other tips. This can be accomplished by using the `update_tips_and_prune` method, which again takes an array of hashes containing a user's username and desired tip amount.
259
+
260
+ ```ruby
261
+ client.update_tips_and_prune([ { :username => "gittip", :amount => "25.00" } ])
262
+ ```
177
263
 
264
+ Like the `update_tips` method, `update_tips_and_prune` will return an array of the successfully updated tips.
178
265
 
179
- * **TODO:** Add the ability to post and update tips to Gittip's API.
266
+ ```ruby
267
+ [
268
+ {"amount"=>"25.00", "platform"=>"gittip", "username"=>"gittip"}
269
+ ]
270
+ ```
271
+
272
+ All other tips have been removed, which we can see by using the `current_tips` method.
273
+
274
+ ```ruby
275
+ client.current_tips
276
+ => [
277
+ {"amount"=>"25.00", "platform"=>"gittip", "username"=>"gittip"}
278
+ ]
279
+ ```
180
280
 
181
281
 
182
282
 
183
283
  ### Copyright and License
184
284
 
185
- Copyright John Kelly Ferguson and Contributors, 2013
285
+ Copyright John Kelly Ferguson and Contributors, 2014
186
286
 
187
287
  [MIT Licence](LICENSE.txt)
188
288
 
data/Rakefile CHANGED
@@ -10,4 +10,12 @@ RSpec::Core::RakeTask.new(:spec) do |spec|
10
10
  spec.pattern = FileList["spec/**/*_spec.rb"]
11
11
  end
12
12
 
13
- task :default => :spec
13
+ task :default => :spec
14
+
15
+ task :console do
16
+ require 'irb'
17
+ require 'irb/completion'
18
+ require 'gratitude'
19
+ ARGV.clear
20
+ IRB.start
21
+ end
@@ -3,7 +3,7 @@ module Gratitude
3
3
  module Tips
4
4
 
5
5
  def current_tips
6
- self.class.get(tips_url, { :basic_auth => authorization }).parsed_response
6
+ self.class.get(tips_url, basic_auth).parsed_response
7
7
  end
8
8
 
9
9
  def current_tips_total
@@ -11,46 +11,56 @@ module Gratitude
11
11
  end
12
12
 
13
13
  def update_tips(array_of_hashes_with_usernames_and_amounts)
14
- self.class.post(tips_url,
15
- {
16
- :body => prepared_tips_array(array_of_hashes_with_usernames_and_amounts).to_json,
17
- :basic_auth => authorization,
18
- :headers => { 'Content-Type' => 'application/json', 'Accept' => 'application/json'}
19
- })
14
+ self.class.post(
15
+ tips_url, request_payload(array_of_hashes_with_usernames_and_amounts)
16
+ )
20
17
  end
21
18
 
22
19
  def update_tips_and_prune(array_of_hashes_with_usernames_and_amounts)
23
- self.class.post(tips_url,
24
- {
25
- :body => prepared_tips_array(array_of_hashes_with_usernames_and_amounts).to_json,
26
- :basic_auth => authorization,
27
- :query => { :also_prune => "true"},
28
- :headers => { 'Content-Type' => 'application/json', 'Accept' => 'application/json'}
29
- })
20
+ self.class.post(
21
+ tips_url,
22
+ request_payload(array_of_hashes_with_usernames_and_amounts)
23
+ .merge(:query => { :also_prune => "true"})
24
+ )
30
25
  end
31
26
 
27
+ private
28
+
32
29
  def tips_url
33
30
  "https://www.gittip.com/#{username}/tips.json"
34
31
  end
35
32
 
36
- def authorization
37
- { :username => api_key }
38
- end
39
-
40
- def tip_hash_based_upon(username, amount)
41
- { "amount" => "#{amount}", "platform" => "gittip", "username" => "#{username}" }
33
+ def request_payload(array_of_hashes)
34
+ {
35
+ :body => prepared_tips_array(array_of_hashes).to_json,
36
+ :headers => json_header
37
+ }.merge(basic_auth)
42
38
  end
43
39
 
44
- def prepared_tips_array(array_of_hashes_with_usernames_and_amounts)
45
- prepared_array = []
46
- array_of_hashes_with_usernames_and_amounts.each do |hash|
40
+ def prepared_tips_array(array_of_hashes)
41
+ array_of_hashes.each_with_object([]) do |hash, array|
47
42
  username = hash[:username] || hash["username"]
48
43
  amount = hash[:amount] || hash["amount"]
49
- prepared_array << tip_hash_based_upon(username, amount)
44
+ array << tip_hash_based_upon(username, amount)
50
45
  end
51
- prepared_array
46
+ end
47
+
48
+ def tip_hash_based_upon(username, amount)
49
+ {
50
+ "amount" => "#{amount}",
51
+ "platform" => "gittip",
52
+ "username" => "#{username}"
53
+ }
54
+ end
55
+
56
+ def json_header
57
+ { 'Content-Type' => 'application/json', 'Accept' => 'application/json'}
58
+ end
59
+
60
+ def basic_auth
61
+ { :basic_auth => { :username => api_key } }
52
62
  end
53
63
 
54
64
  end # Tips
55
65
  end # Client
56
- end # Gratitude
66
+ end # Gratitude
@@ -1,3 +1,3 @@
1
1
  module Gratitude
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
@@ -1 +1,63 @@
1
- {"http_interactions":[{"request":{"method":"get","uri":"https://5962b93a-5bf7-4cb6-ae6f-aa4114c5e4f2:@www.gittip.com/gratitude_test/tips.json","body":{"encoding":"US-ASCII","string":""},"headers":{}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Content-Type":["application/json"],"Date":["Sun, 20 Oct 2013 01:41:31 GMT"],"Expires":["Thu, 01 Jan 1970 00:00:00 GMT"],"Server":["Aspen! Cheroot!"],"Set-Cookie":["csrf_token=qJFOtxb2kGqZhrlXEv5QRrLcP3H0wik9; expires=Sun, 19 Oct 2014 01:41:31 GMT; Path=/","session=c08eaad1dae3407c9d31f5ca904364bd; expires=Sun, 27 Oct 2013 01:41:31 GMT; httponly; Path=/; secure"],"Vary":["Cookie"],"X-Frame-Options":["SAMEORIGIN"],"X-Gittip-Version":["10.1.35"],"Content-Length":["210"],"Connection":["keep-alive"]},"body":{"encoding":"UTF-8","string":"[\n {\n \"amount\": \"1.00\",\n \"platform\": \"gittip\",\n \"username\": \"whit537\"\n },\n {\n \"amount\": \"0.25\",\n \"platform\": \"gittip\",\n \"username\": \"JohnKellyFerguson\"\n }\n]"},"http_version":null},"recorded_at":"Sun, 20 Oct 2013 01:41:36 GMT"}],"recorded_with":"VCR 2.5.0"}
1
+ {
2
+ "http_interactions":[
3
+ {
4
+ "request":{
5
+ "method":"get",
6
+ "uri":"https://5962b93a-5bf7-4cb6-ae6f-aa4114c5e4f2:@www.gittip.com/gratitude_test/tips.json",
7
+ "body":{
8
+ "encoding":"US-ASCII",
9
+ "string":""
10
+ },
11
+ "headers":{
12
+
13
+ }
14
+ },
15
+ "response":{
16
+ "status":{
17
+ "code":200,
18
+ "message":"OK"
19
+ },
20
+ "headers":{
21
+ "Content-Type":[
22
+ "application/json"
23
+ ],
24
+ "Date":[
25
+ "Sun, 20 Oct 2013 01:41:31 GMT"
26
+ ],
27
+ "Expires":[
28
+ "Thu, 01 Jan 1970 00:00:00 GMT"
29
+ ],
30
+ "Server":[
31
+ "Aspen! Cheroot!"
32
+ ],
33
+ "Set-Cookie":[
34
+ "csrf_token=qJFOtxb2kGqZhrlXEv5QRrLcP3H0wik9; expires=Sun, 19 Oct 2014 01:41:31 GMT; Path=/",
35
+ "session=c08eaad1dae3407c9d31f5ca904364bd; expires=Sun, 27 Oct 2013 01:41:31 GMT; httponly; Path=/; secure"
36
+ ],
37
+ "Vary":[
38
+ "Cookie"
39
+ ],
40
+ "X-Frame-Options":[
41
+ "SAMEORIGIN"
42
+ ],
43
+ "X-Gittip-Version":[
44
+ "10.1.35"
45
+ ],
46
+ "Content-Length":[
47
+ "210"
48
+ ],
49
+ "Connection":[
50
+ "keep-alive"
51
+ ]
52
+ },
53
+ "body":{
54
+ "encoding":"UTF-8",
55
+ "string":"[\n {\n \"amount\": \"1.00\",\n \"platform\": \"gittip\",\n \"username\": \"whit537\"\n },\n {\n \"amount\": \"0.25\",\n \"platform\": \"gittip\",\n \"username\": \"JohnKellyFerguson\"\n }\n]"
56
+ },
57
+ "http_version":null
58
+ },
59
+ "recorded_at":"Sun, 20 Oct 2013 01:41:36 GMT"
60
+ }
61
+ ],
62
+ "recorded_with":"VCR 2.5.0"
63
+ }
@@ -1 +1,68 @@
1
- {"http_interactions":[{"request":{"method":"post","uri":"https://5962b93a-5bf7-4cb6-ae6f-aa4114c5e4f2:@www.gittip.com/gratitude_test/tips.json","body":{"encoding":"UTF-8","string":"[{\"amount\":\"10\",\"platform\":\"gittip\",\"username\":\"whit537\"},{\"amount\":\"4\",\"platform\":\"gittip\",\"username\":\"JohnKellyFerguson\"}]"},"headers":{"Content-Type":["application/json"],"Accept":["application/json"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Content-Type":["application/json"],"Date":["Sun, 20 Oct 2013 03:12:30 GMT"],"Expires":["Thu, 01 Jan 1970 00:00:00 GMT"],"Server":["Aspen! Cheroot!"],"Set-Cookie":["csrf_token=zpQWN7H1DlHpCQvAB9mPs7aMjXroYDOV; expires=Sun, 19 Oct 2014 03:12:30 GMT; Path=/","session=c08eaad1dae3407c9d31f5ca904364bd; expires=Sun, 27 Oct 2013 03:12:30 GMT; httponly; Path=/; secure"],"Vary":["Cookie"],"X-Frame-Options":["SAMEORIGIN"],"X-Gittip-Version":["10.1.35"],"Content-Length":["205"],"Connection":["keep-alive"]},"body":{"encoding":"UTF-8","string":"[\n {\n \"amount\": \"10\",\n \"platform\": \"gittip\",\n \"username\": \"whit537\"\n },\n {\n \"amount\": \"4\",\n \"platform\": \"gittip\",\n \"username\": \"JohnKellyFerguson\"\n }\n]"},"http_version":null},"recorded_at":"Sun, 20 Oct 2013 03:12:37 GMT"}],"recorded_with":"VCR 2.5.0"}
1
+ {
2
+ "http_interactions":[
3
+ {
4
+ "request":{
5
+ "method":"post",
6
+ "uri":"https://5962b93a-5bf7-4cb6-ae6f-aa4114c5e4f2:@www.gittip.com/gratitude_test/tips.json",
7
+ "body":{
8
+ "encoding":"UTF-8",
9
+ "string":"[{\"amount\":\"10\",\"platform\":\"gittip\",\"username\":\"whit537\"},{\"amount\":\"4\",\"platform\":\"gittip\",\"username\":\"JohnKellyFerguson\"}]"
10
+ },
11
+ "headers":{
12
+ "Content-Type":[
13
+ "application/json"
14
+ ],
15
+ "Accept":[
16
+ "application/json"
17
+ ]
18
+ }
19
+ },
20
+ "response":{
21
+ "status":{
22
+ "code":200,
23
+ "message":"OK"
24
+ },
25
+ "headers":{
26
+ "Content-Type":[
27
+ "application/json"
28
+ ],
29
+ "Date":[
30
+ "Sun, 20 Oct 2013 03:12:30 GMT"
31
+ ],
32
+ "Expires":[
33
+ "Thu, 01 Jan 1970 00:00:00 GMT"
34
+ ],
35
+ "Server":[
36
+ "Aspen! Cheroot!"
37
+ ],
38
+ "Set-Cookie":[
39
+ "csrf_token=zpQWN7H1DlHpCQvAB9mPs7aMjXroYDOV; expires=Sun, 19 Oct 2014 03:12:30 GMT; Path=/",
40
+ "session=c08eaad1dae3407c9d31f5ca904364bd; expires=Sun, 27 Oct 2013 03:12:30 GMT; httponly; Path=/; secure"
41
+ ],
42
+ "Vary":[
43
+ "Cookie"
44
+ ],
45
+ "X-Frame-Options":[
46
+ "SAMEORIGIN"
47
+ ],
48
+ "X-Gittip-Version":[
49
+ "10.1.35"
50
+ ],
51
+ "Content-Length":[
52
+ "205"
53
+ ],
54
+ "Connection":[
55
+ "keep-alive"
56
+ ]
57
+ },
58
+ "body":{
59
+ "encoding":"UTF-8",
60
+ "string":"[\n {\n \"amount\": \"10\",\n \"platform\": \"gittip\",\n \"username\": \"whit537\"\n },\n {\n \"amount\": \"4\",\n \"platform\": \"gittip\",\n \"username\": \"JohnKellyFerguson\"\n }\n]"
61
+ },
62
+ "http_version":null
63
+ },
64
+ "recorded_at":"Sun, 20 Oct 2013 03:12:37 GMT"
65
+ }
66
+ ],
67
+ "recorded_with":"VCR 2.5.0"
68
+ }
@@ -1 +1,68 @@
1
- {"http_interactions":[{"request":{"method":"post","uri":"https://5962b93a-5bf7-4cb6-ae6f-aa4114c5e4f2:@www.gittip.com/gratitude_test/tips.json","body":{"encoding":"UTF-8","string":"[{\"amount\":\"5\",\"platform\":\"gittip\",\"username\":\"whit537\"}]"},"headers":{"Content-Type":["application/json"],"Accept":["application/json"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Content-Type":["application/json"],"Date":["Sun, 20 Oct 2013 03:09:02 GMT"],"Expires":["Thu, 01 Jan 1970 00:00:00 GMT"],"Server":["Aspen! Cheroot!"],"Set-Cookie":["csrf_token=DRdyOGvuZo1D9zPRfgzXAbhOpQrP03Na; expires=Sun, 19 Oct 2014 03:09:02 GMT; Path=/","session=c08eaad1dae3407c9d31f5ca904364bd; expires=Sun, 27 Oct 2013 03:09:02 GMT; httponly; Path=/; secure"],"Vary":["Cookie"],"X-Frame-Options":["SAMEORIGIN"],"X-Gittip-Version":["10.1.35"],"Content-Length":["98"],"Connection":["keep-alive"]},"body":{"encoding":"UTF-8","string":"[\n {\n \"amount\": \"5\",\n \"platform\": \"gittip\",\n \"username\": \"whit537\"\n }\n]"},"http_version":null},"recorded_at":"Sun, 20 Oct 2013 03:09:09 GMT"}],"recorded_with":"VCR 2.5.0"}
1
+ {
2
+ "http_interactions":[
3
+ {
4
+ "request":{
5
+ "method":"post",
6
+ "uri":"https://5962b93a-5bf7-4cb6-ae6f-aa4114c5e4f2:@www.gittip.com/gratitude_test/tips.json",
7
+ "body":{
8
+ "encoding":"UTF-8",
9
+ "string":"[{\"amount\":\"5\",\"platform\":\"gittip\",\"username\":\"whit537\"}]"
10
+ },
11
+ "headers":{
12
+ "Content-Type":[
13
+ "application/json"
14
+ ],
15
+ "Accept":[
16
+ "application/json"
17
+ ]
18
+ }
19
+ },
20
+ "response":{
21
+ "status":{
22
+ "code":200,
23
+ "message":"OK"
24
+ },
25
+ "headers":{
26
+ "Content-Type":[
27
+ "application/json"
28
+ ],
29
+ "Date":[
30
+ "Sun, 20 Oct 2013 03:09:02 GMT"
31
+ ],
32
+ "Expires":[
33
+ "Thu, 01 Jan 1970 00:00:00 GMT"
34
+ ],
35
+ "Server":[
36
+ "Aspen! Cheroot!"
37
+ ],
38
+ "Set-Cookie":[
39
+ "csrf_token=DRdyOGvuZo1D9zPRfgzXAbhOpQrP03Na; expires=Sun, 19 Oct 2014 03:09:02 GMT; Path=/",
40
+ "session=c08eaad1dae3407c9d31f5ca904364bd; expires=Sun, 27 Oct 2013 03:09:02 GMT; httponly; Path=/; secure"
41
+ ],
42
+ "Vary":[
43
+ "Cookie"
44
+ ],
45
+ "X-Frame-Options":[
46
+ "SAMEORIGIN"
47
+ ],
48
+ "X-Gittip-Version":[
49
+ "10.1.35"
50
+ ],
51
+ "Content-Length":[
52
+ "98"
53
+ ],
54
+ "Connection":[
55
+ "keep-alive"
56
+ ]
57
+ },
58
+ "body":{
59
+ "encoding":"UTF-8",
60
+ "string":"[\n {\n \"amount\": \"5\",\n \"platform\": \"gittip\",\n \"username\": \"whit537\"\n }\n]"
61
+ },
62
+ "http_version":null
63
+ },
64
+ "recorded_at":"Sun, 20 Oct 2013 03:09:09 GMT"
65
+ }
66
+ ],
67
+ "recorded_with":"VCR 2.5.0"
68
+ }
@@ -1 +1,68 @@
1
- {"http_interactions":[{"request":{"method":"post","uri":"https://5962b93a-5bf7-4cb6-ae6f-aa4114c5e4f2:@www.gittip.com/gratitude_test/tips.json","body":{"encoding":"UTF-8","string":"[{\"amount\":\"20\",\"platform\":\"gittip\",\"username\":\"not_a_real_user\"}]"},"headers":{"Content-Type":["application/json"],"Accept":["application/json"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Content-Type":["application/json"],"Date":["Sun, 20 Oct 2013 03:21:36 GMT"],"Expires":["Thu, 01 Jan 1970 00:00:00 GMT"],"Server":["Aspen! Cheroot!"],"Set-Cookie":["csrf_token=iyQSAZVfmuWKaWltmYauK2Jadl8oCunm; expires=Sun, 19 Oct 2014 03:21:36 GMT; Path=/","session=c08eaad1dae3407c9d31f5ca904364bd; expires=Sun, 27 Oct 2013 03:21:36 GMT; httponly; Path=/; secure"],"Vary":["Cookie"],"X-Frame-Options":["SAMEORIGIN"],"X-Gittip-Version":["10.1.35"],"Content-Length":["141"],"Connection":["keep-alive"]},"body":{"encoding":"UTF-8","string":"[\n {\n \"amount\": \"e\",\n \"error\": \"IntegrityError\",\n \"platform\": \"gittip\",\n \"username\": \"not_a_real_user\"\n }\n]"},"http_version":null},"recorded_at":"Sun, 20 Oct 2013 03:21:43 GMT"}],"recorded_with":"VCR 2.5.0"}
1
+ {
2
+ "http_interactions":[
3
+ {
4
+ "request":{
5
+ "method":"post",
6
+ "uri":"https://5962b93a-5bf7-4cb6-ae6f-aa4114c5e4f2:@www.gittip.com/gratitude_test/tips.json",
7
+ "body":{
8
+ "encoding":"UTF-8",
9
+ "string":"[{\"amount\":\"20\",\"platform\":\"gittip\",\"username\":\"not_a_real_user\"}]"
10
+ },
11
+ "headers":{
12
+ "Content-Type":[
13
+ "application/json"
14
+ ],
15
+ "Accept":[
16
+ "application/json"
17
+ ]
18
+ }
19
+ },
20
+ "response":{
21
+ "status":{
22
+ "code":200,
23
+ "message":"OK"
24
+ },
25
+ "headers":{
26
+ "Content-Type":[
27
+ "application/json"
28
+ ],
29
+ "Date":[
30
+ "Sun, 20 Oct 2013 03:21:36 GMT"
31
+ ],
32
+ "Expires":[
33
+ "Thu, 01 Jan 1970 00:00:00 GMT"
34
+ ],
35
+ "Server":[
36
+ "Aspen! Cheroot!"
37
+ ],
38
+ "Set-Cookie":[
39
+ "csrf_token=iyQSAZVfmuWKaWltmYauK2Jadl8oCunm; expires=Sun, 19 Oct 2014 03:21:36 GMT; Path=/",
40
+ "session=c08eaad1dae3407c9d31f5ca904364bd; expires=Sun, 27 Oct 2013 03:21:36 GMT; httponly; Path=/; secure"
41
+ ],
42
+ "Vary":[
43
+ "Cookie"
44
+ ],
45
+ "X-Frame-Options":[
46
+ "SAMEORIGIN"
47
+ ],
48
+ "X-Gittip-Version":[
49
+ "10.1.35"
50
+ ],
51
+ "Content-Length":[
52
+ "141"
53
+ ],
54
+ "Connection":[
55
+ "keep-alive"
56
+ ]
57
+ },
58
+ "body":{
59
+ "encoding":"UTF-8",
60
+ "string":"[\n {\n \"amount\": \"e\",\n \"error\": \"IntegrityError\",\n \"platform\": \"gittip\",\n \"username\": \"not_a_real_user\"\n }\n]"
61
+ },
62
+ "http_version":null
63
+ },
64
+ "recorded_at":"Sun, 20 Oct 2013 03:21:43 GMT"
65
+ }
66
+ ],
67
+ "recorded_with":"VCR 2.5.0"
68
+ }