txgh-server 1.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +7 -0
  2. data/lib/txgh-server/application.rb +141 -0
  3. data/lib/txgh-server/download_handler.rb +85 -0
  4. data/lib/txgh-server/github_request_auth.rb +28 -0
  5. data/lib/txgh-server/response.rb +15 -0
  6. data/lib/txgh-server/response_helpers.rb +26 -0
  7. data/lib/txgh-server/stream_response.rb +37 -0
  8. data/lib/txgh-server/tgz_stream_response.rb +39 -0
  9. data/lib/txgh-server/transifex_request_auth.rb +53 -0
  10. data/lib/txgh-server/triggers/handler.rb +50 -0
  11. data/lib/txgh-server/triggers/pull_handler.rb +18 -0
  12. data/lib/txgh-server/triggers/push_handler.rb +18 -0
  13. data/lib/txgh-server/triggers.rb +7 -0
  14. data/lib/txgh-server/version.rb +3 -0
  15. data/lib/txgh-server/webhooks/github/delete_handler.rb +37 -0
  16. data/lib/txgh-server/webhooks/github/handler.rb +20 -0
  17. data/lib/txgh-server/webhooks/github/ping_handler.rb +18 -0
  18. data/lib/txgh-server/webhooks/github/push_handler.rb +124 -0
  19. data/lib/txgh-server/webhooks/github/request_handler.rb +113 -0
  20. data/lib/txgh-server/webhooks/github.rb +11 -0
  21. data/lib/txgh-server/webhooks/transifex/hook_handler.rb +94 -0
  22. data/lib/txgh-server/webhooks/transifex/request_handler.rb +78 -0
  23. data/lib/txgh-server/webhooks/transifex.rb +8 -0
  24. data/lib/txgh-server/webhooks.rb +6 -0
  25. data/lib/txgh-server/zip_stream_response.rb +19 -0
  26. data/lib/txgh-server.rb +23 -0
  27. data/spec/application_spec.rb +347 -0
  28. data/spec/download_handler_spec.rb +91 -0
  29. data/spec/github_request_auth_spec.rb +39 -0
  30. data/spec/helpers/github_payload_builder.rb +141 -0
  31. data/spec/helpers/integration_setup.rb +47 -0
  32. data/spec/integration/cassettes/github_l10n_hook_endpoint.yml +536 -0
  33. data/spec/integration/cassettes/pull.yml +47 -0
  34. data/spec/integration/cassettes/push.yml +544 -0
  35. data/spec/integration/cassettes/transifex_hook_endpoint.yml +221 -0
  36. data/spec/integration/config/tx.config +10 -0
  37. data/spec/integration/hooks_spec.rb +159 -0
  38. data/spec/integration/payloads/github_postbody.json +161 -0
  39. data/spec/integration/payloads/github_postbody_l10n.json +136 -0
  40. data/spec/integration/payloads/github_postbody_release.json +136 -0
  41. data/spec/integration/triggers_spec.rb +45 -0
  42. data/spec/spec_helper.rb +26 -0
  43. data/spec/tgz_stream_response_spec.rb +59 -0
  44. data/spec/transifex_request_auth_spec.rb +39 -0
  45. data/spec/webhooks/github/delete_handler_spec.rb +38 -0
  46. data/spec/webhooks/github/ping_handler_spec.rb +16 -0
  47. data/spec/webhooks/github/push_handler_spec.rb +106 -0
  48. data/spec/webhooks/transifex/hook_handler_spec.rb +136 -0
  49. data/spec/zip_stream_response_spec.rb +58 -0
  50. data/txgh-server.gemspec +24 -0
  51. metadata +170 -0
@@ -0,0 +1,544 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.github.com/repos/txgh-bot/txgh-test-resources/git/refs/heads/master
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/vnd.github.v3+json
12
+ User-Agent:
13
+ - Octokit Ruby Gem 4.2.0
14
+ Content-Type:
15
+ - application/json
16
+ Authorization:
17
+ - token <GITHUB_TOKEN>
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - GitHub.com
27
+ Date:
28
+ - Fri, 12 Feb 2016 19:49:00 GMT
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Status:
34
+ - 200 OK
35
+ X-Ratelimit-Limit:
36
+ - '5000'
37
+ X-Ratelimit-Remaining:
38
+ - '4989'
39
+ X-Ratelimit-Reset:
40
+ - '1455310132'
41
+ Cache-Control:
42
+ - private, max-age=60, s-maxage=60
43
+ Last-Modified:
44
+ - Mon, 11 Jan 2016 23:45:43 GMT
45
+ Etag:
46
+ - W/"2c789545a86986f3dbe3ca967407cb88"
47
+ X-Poll-Interval:
48
+ - '300'
49
+ X-Oauth-Scopes:
50
+ - public_repo
51
+ X-Accepted-Oauth-Scopes:
52
+ - ''
53
+ Vary:
54
+ - Accept, Authorization, Cookie, X-GitHub-OTP
55
+ - Accept-Encoding
56
+ X-Github-Media-Type:
57
+ - github.v3; format=json
58
+ Access-Control-Allow-Credentials:
59
+ - 'true'
60
+ Access-Control-Expose-Headers:
61
+ - ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
62
+ X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
63
+ Access-Control-Allow-Origin:
64
+ - "*"
65
+ Content-Security-Policy:
66
+ - default-src 'none'
67
+ Strict-Transport-Security:
68
+ - max-age=31536000; includeSubdomains; preload
69
+ X-Content-Type-Options:
70
+ - nosniff
71
+ X-Frame-Options:
72
+ - deny
73
+ X-Xss-Protection:
74
+ - 1; mode=block
75
+ X-Served-By:
76
+ - 318e55760cf7cdb40e61175a4d36cd32
77
+ X-Github-Request-Id:
78
+ - 04358C36:14596:F629B21:56BE372C
79
+ body:
80
+ encoding: UTF-8
81
+ string: '{"ref":"refs/heads/master","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/refs/heads/master","object":{"sha":"e411b627bdb8884f66748d48fcd9576f61992085","type":"commit","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/commits/e411b627bdb8884f66748d48fcd9576f61992085"}}'
82
+ http_version:
83
+ recorded_at: Fri, 12 Feb 2016 19:49:00 GMT
84
+ - request:
85
+ method: get
86
+ uri: https://api.github.com/repos/txgh-bot/txgh-test-resources/commits/e411b627bdb8884f66748d48fcd9576f61992085
87
+ body:
88
+ encoding: US-ASCII
89
+ string: ''
90
+ headers:
91
+ Accept:
92
+ - application/vnd.github.v3+json
93
+ User-Agent:
94
+ - Octokit Ruby Gem 4.2.0
95
+ Content-Type:
96
+ - application/json
97
+ Authorization:
98
+ - token <GITHUB_TOKEN>
99
+ Accept-Encoding:
100
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
101
+ response:
102
+ status:
103
+ code: 200
104
+ message: OK
105
+ headers:
106
+ Server:
107
+ - GitHub.com
108
+ Date:
109
+ - Fri, 12 Feb 2016 19:49:00 GMT
110
+ Content-Type:
111
+ - application/json; charset=utf-8
112
+ Transfer-Encoding:
113
+ - chunked
114
+ Status:
115
+ - 200 OK
116
+ X-Ratelimit-Limit:
117
+ - '5000'
118
+ X-Ratelimit-Remaining:
119
+ - '4988'
120
+ X-Ratelimit-Reset:
121
+ - '1455310132'
122
+ Cache-Control:
123
+ - private, max-age=60, s-maxage=60
124
+ Last-Modified:
125
+ - Mon, 01 Feb 2016 20:15:13 GMT
126
+ Etag:
127
+ - W/"5c055175960a69cba21e17c0a0507135"
128
+ X-Oauth-Scopes:
129
+ - public_repo
130
+ X-Accepted-Oauth-Scopes:
131
+ - ''
132
+ Vary:
133
+ - Accept, Authorization, Cookie, X-GitHub-OTP
134
+ - Accept-Encoding
135
+ X-Github-Media-Type:
136
+ - github.v3; format=json
137
+ Access-Control-Allow-Credentials:
138
+ - 'true'
139
+ Access-Control-Expose-Headers:
140
+ - ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
141
+ X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
142
+ Access-Control-Allow-Origin:
143
+ - "*"
144
+ Content-Security-Policy:
145
+ - default-src 'none'
146
+ Strict-Transport-Security:
147
+ - max-age=31536000; includeSubdomains; preload
148
+ X-Content-Type-Options:
149
+ - nosniff
150
+ X-Frame-Options:
151
+ - deny
152
+ X-Xss-Protection:
153
+ - 1; mode=block
154
+ X-Served-By:
155
+ - a474937f3b2fa272558fa6dc951018ad
156
+ X-Github-Request-Id:
157
+ - 04358C36:1458D:29185EB:56BE372C
158
+ body:
159
+ encoding: UTF-8
160
+ string: '{"sha":"e411b627bdb8884f66748d48fcd9576f61992085","commit":{"author":{"name":"txgh-bot","email":"txgh.bot@gmail.com","date":"2016-02-01T20:15:13Z"},"committer":{"name":"txgh-bot","email":"txgh.bot@gmail.com","date":"2016-02-01T20:15:13Z"},"message":"Updating
161
+ translations for translations/el_GR/sample.po","tree":{"sha":"4ee65f809366225a4d575ad47f0f8c2a05a6d460","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/trees/4ee65f809366225a4d575ad47f0f8c2a05a6d460"},"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/commits/e411b627bdb8884f66748d48fcd9576f61992085","comment_count":0},"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/commits/e411b627bdb8884f66748d48fcd9576f61992085","html_url":"https://github.com/txgh-bot/txgh-test-resources/commit/e411b627bdb8884f66748d48fcd9576f61992085","comments_url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/commits/e411b627bdb8884f66748d48fcd9576f61992085/comments","author":{"login":"txgh-bot","id":16723366,"avatar_url":"https://avatars.githubusercontent.com/u/16723366?v=3","gravatar_id":"","url":"https://api.github.com/users/txgh-bot","html_url":"https://github.com/txgh-bot","followers_url":"https://api.github.com/users/txgh-bot/followers","following_url":"https://api.github.com/users/txgh-bot/following{/other_user}","gists_url":"https://api.github.com/users/txgh-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/txgh-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/txgh-bot/subscriptions","organizations_url":"https://api.github.com/users/txgh-bot/orgs","repos_url":"https://api.github.com/users/txgh-bot/repos","events_url":"https://api.github.com/users/txgh-bot/events{/privacy}","received_events_url":"https://api.github.com/users/txgh-bot/received_events","type":"User","site_admin":false},"committer":{"login":"txgh-bot","id":16723366,"avatar_url":"https://avatars.githubusercontent.com/u/16723366?v=3","gravatar_id":"","url":"https://api.github.com/users/txgh-bot","html_url":"https://github.com/txgh-bot","followers_url":"https://api.github.com/users/txgh-bot/followers","following_url":"https://api.github.com/users/txgh-bot/following{/other_user}","gists_url":"https://api.github.com/users/txgh-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/txgh-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/txgh-bot/subscriptions","organizations_url":"https://api.github.com/users/txgh-bot/orgs","repos_url":"https://api.github.com/users/txgh-bot/repos","events_url":"https://api.github.com/users/txgh-bot/events{/privacy}","received_events_url":"https://api.github.com/users/txgh-bot/received_events","type":"User","site_admin":false},"parents":[{"sha":"f0356f2c6216af45b74a517835a6b8d11c246a33","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/commits/f0356f2c6216af45b74a517835a6b8d11c246a33","html_url":"https://github.com/txgh-bot/txgh-test-resources/commit/f0356f2c6216af45b74a517835a6b8d11c246a33"}],"stats":{"total":0,"additions":0,"deletions":0},"files":[]}'
162
+ http_version:
163
+ recorded_at: Fri, 12 Feb 2016 19:49:00 GMT
164
+ - request:
165
+ method: get
166
+ uri: https://api.github.com/repos/txgh-bot/txgh-test-resources/git/trees/4ee65f809366225a4d575ad47f0f8c2a05a6d460?recursive=1
167
+ body:
168
+ encoding: US-ASCII
169
+ string: ''
170
+ headers:
171
+ Accept:
172
+ - application/vnd.github.v3+json
173
+ User-Agent:
174
+ - Octokit Ruby Gem 4.2.0
175
+ Content-Type:
176
+ - application/json
177
+ Authorization:
178
+ - token <GITHUB_TOKEN>
179
+ Accept-Encoding:
180
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
181
+ response:
182
+ status:
183
+ code: 200
184
+ message: OK
185
+ headers:
186
+ Server:
187
+ - GitHub.com
188
+ Date:
189
+ - Fri, 12 Feb 2016 19:49:01 GMT
190
+ Content-Type:
191
+ - application/json; charset=utf-8
192
+ Transfer-Encoding:
193
+ - chunked
194
+ Status:
195
+ - 200 OK
196
+ X-Ratelimit-Limit:
197
+ - '5000'
198
+ X-Ratelimit-Remaining:
199
+ - '4987'
200
+ X-Ratelimit-Reset:
201
+ - '1455310132'
202
+ Cache-Control:
203
+ - private, max-age=60, s-maxage=60
204
+ Last-Modified:
205
+ - Mon, 11 Jan 2016 23:45:43 GMT
206
+ Etag:
207
+ - W/"2eb6bdd2b0ffcb4d1380c3458aa5a771"
208
+ X-Oauth-Scopes:
209
+ - public_repo
210
+ X-Accepted-Oauth-Scopes:
211
+ - ''
212
+ Vary:
213
+ - Accept, Authorization, Cookie, X-GitHub-OTP
214
+ - Accept-Encoding
215
+ X-Github-Media-Type:
216
+ - github.v3; format=json
217
+ Access-Control-Allow-Credentials:
218
+ - 'true'
219
+ Access-Control-Expose-Headers:
220
+ - ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
221
+ X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
222
+ Access-Control-Allow-Origin:
223
+ - "*"
224
+ Content-Security-Policy:
225
+ - default-src 'none'
226
+ Strict-Transport-Security:
227
+ - max-age=31536000; includeSubdomains; preload
228
+ X-Content-Type-Options:
229
+ - nosniff
230
+ X-Frame-Options:
231
+ - deny
232
+ X-Xss-Protection:
233
+ - 1; mode=block
234
+ X-Served-By:
235
+ - 3e3b9690823fb031da84658eb58aa83b
236
+ X-Github-Request-Id:
237
+ - 04358C36:14594:ED063B2:56BE372C
238
+ body:
239
+ encoding: UTF-8
240
+ string: '{"sha":"4ee65f809366225a4d575ad47f0f8c2a05a6d460","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/trees/4ee65f809366225a4d575ad47f0f8c2a05a6d460","tree":[{"path":"README.md","mode":"100644","type":"blob","sha":"cee445fa5bceaeb83c8d443b28f1647c2feff565","size":53,"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/blobs/cee445fa5bceaeb83c8d443b28f1647c2feff565"},{"path":"sample.po","mode":"100644","type":"blob","sha":"a93e31a00137e0bd23db5bc7720568f8e908b2b6","size":855,"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/blobs/a93e31a00137e0bd23db5bc7720568f8e908b2b6"},{"path":"translations","mode":"040000","type":"tree","sha":"64881902c6515e26c22e022abc0bedeaa15eafdc","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/trees/64881902c6515e26c22e022abc0bedeaa15eafdc"},{"path":"translations/el_GR","mode":"040000","type":"tree","sha":"050a15129f99770b93244b61d6acbf0abc8bca47","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/trees/050a15129f99770b93244b61d6acbf0abc8bca47"},{"path":"translations/el_GR/sample.po","mode":"100644","type":"blob","sha":"540a3d944ac19f573e756de687c8c4f3f9847b53","size":911,"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/blobs/540a3d944ac19f573e756de687c8c4f3f9847b53"},{"path":"translations/el_GR/test.txt","mode":"100644","type":"blob","sha":"f16628a67170414c9d346279f2595e77a1c3cf0f","size":28,"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/blobs/f16628a67170414c9d346279f2595e77a1c3cf0f"},{"path":"translations/test.txt","mode":"100644","type":"blob","sha":"f16628a67170414c9d346279f2595e77a1c3cf0f","size":28,"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/blobs/f16628a67170414c9d346279f2595e77a1c3cf0f"}],"truncated":false}'
241
+ http_version:
242
+ recorded_at: Fri, 12 Feb 2016 19:49:01 GMT
243
+ - request:
244
+ method: get
245
+ uri: https://api.github.com/repos/txgh-bot/txgh-test-resources/git/blobs/a93e31a00137e0bd23db5bc7720568f8e908b2b6
246
+ body:
247
+ encoding: US-ASCII
248
+ string: ''
249
+ headers:
250
+ Accept:
251
+ - application/vnd.github.v3+json
252
+ User-Agent:
253
+ - Octokit Ruby Gem 4.2.0
254
+ Content-Type:
255
+ - application/json
256
+ Authorization:
257
+ - token <GITHUB_TOKEN>
258
+ Accept-Encoding:
259
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
260
+ response:
261
+ status:
262
+ code: 200
263
+ message: OK
264
+ headers:
265
+ Server:
266
+ - GitHub.com
267
+ Date:
268
+ - Fri, 12 Feb 2016 19:49:01 GMT
269
+ Content-Type:
270
+ - application/json; charset=utf-8
271
+ Transfer-Encoding:
272
+ - chunked
273
+ Status:
274
+ - 200 OK
275
+ X-Ratelimit-Limit:
276
+ - '5000'
277
+ X-Ratelimit-Remaining:
278
+ - '4986'
279
+ X-Ratelimit-Reset:
280
+ - '1455310132'
281
+ Cache-Control:
282
+ - private, max-age=60, s-maxage=60
283
+ Etag:
284
+ - W/"dbb7c82142b789308c5d1aae70171c46"
285
+ X-Oauth-Scopes:
286
+ - public_repo
287
+ X-Accepted-Oauth-Scopes:
288
+ - ''
289
+ Vary:
290
+ - Accept, Authorization, Cookie, X-GitHub-OTP
291
+ - Accept-Encoding
292
+ X-Github-Media-Type:
293
+ - github.v3; format=json
294
+ Access-Control-Allow-Credentials:
295
+ - 'true'
296
+ Access-Control-Expose-Headers:
297
+ - ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
298
+ X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
299
+ Access-Control-Allow-Origin:
300
+ - "*"
301
+ Content-Security-Policy:
302
+ - default-src 'none'
303
+ Strict-Transport-Security:
304
+ - max-age=31536000; includeSubdomains; preload
305
+ X-Content-Type-Options:
306
+ - nosniff
307
+ X-Frame-Options:
308
+ - deny
309
+ X-Xss-Protection:
310
+ - 1; mode=block
311
+ X-Served-By:
312
+ - 76d9828c7e4f1d910f7ba069e90ce976
313
+ X-Github-Request-Id:
314
+ - 04358C36:1458E:2FD06AA:56BE372D
315
+ body:
316
+ encoding: UTF-8
317
+ string: '{"sha":"a93e31a00137e0bd23db5bc7720568f8e908b2b6","size":855,"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/blobs/a93e31a00137e0bd23db5bc7720568f8e908b2b6","content":"IyBUcmFuc2xhdGlvbiBmaWxlIGZvciBUcmFuc2lmZXguCiMgQ29weXJpZ2h0\nIChDKSAyMDA3LTIwMTAgSW5kaWZleCBMdGQuCiMgVGhpcyBmaWxlIGlzIGRp\nc3RyaWJ1dGVkIHVuZGVyIHRoZSBzYW1lIGxpY2Vuc2UgYXMgdGhlIFRyYW5z\naWZleCBwYWNrYWdlLgojCiMgVHJhbnNsYXRvcnM6Cm1zZ2lkICIiCm1zZ3N0\nciAiIgoiUHJvamVjdC1JZC1WZXJzaW9uOiBUcmFuc2lmZXhcbiIKIlJlcG9y\ndC1Nc2dpZC1CdWdzLVRvOiBcbiIKIlBPVC1DcmVhdGlvbi1EYXRlOiAyMDE1\nLTAyLTE3IDIwOjEwKzAwMDBcbiIKIlBPLVJldmlzaW9uLURhdGU6IDIwMTMt\nMTAtMjIgMTA6NTcrMDAwMFxuIgoiTGFzdC1UcmFuc2xhdG9yOiBJbGlhcy1E\naW1pdHJpb3MgVnJhY2huaXNcbiIKIkxhbmd1YWdlLVRlYW06IExBTkdVQUdF\nIDxMTEBsaS5vcmc+XG4iCiJMYW5ndWFnZTogZW5cbiIKIk1JTUUtVmVyc2lv\nbjogMS4wXG4iCiJDb250ZW50LVR5cGU6IHRleHQvcGxhaW47IGNoYXJzZXQ9\nVVRGLThcbiIKIkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IDhiaXRcbiIK\nIlBsdXJhbC1Gb3JtczogbnBsdXJhbHM9MjsgcGx1cmFsPShuICE9IDEpO1xu\nIgptc2dpZCAiT25lIgptc2dzdHIgIk9uZSIKbXNnaWQgIlR3byIKbXNnc3Ry\nICJUd28iCm1zZ2lkICJUaHJlZSIKbXNnc3RyICJUaHJlZSIKbXNnaWQgIkZv\ndXIiCm1zZ3N0ciAiRm91ciIKbXNnaWQgIkZpdmUiCm1zZ3N0ciAiRml2ZSIK\nbXNnaWQgIlNpeCIKbXNnc3RyICJTaXgiCm1zZ2lkICJTZXZlbiIKbXNnc3Ry\nICJTZXZlbiIKbXNnaWQgIkVpZ2h0Igptc2dzdHIgIkVpZ2h0Igptc2dpZCAi\nTmluZSIKbXNnc3RyICJOaW5lIgptc2dpZCAiVGVuIgptc2dzdHIgIlRlbiIK\n","encoding":"base64"}'
318
+ http_version:
319
+ recorded_at: Fri, 12 Feb 2016 19:49:01 GMT
320
+ - request:
321
+ method: get
322
+ uri: https://txgh.bot:<TRANSIFEX_PASSWORD>@www.transifex.com/api/2/project/test-project-88/resource/samplepo-heads_master/
323
+ body:
324
+ encoding: US-ASCII
325
+ string: ''
326
+ headers:
327
+ User-Agent:
328
+ - Faraday v0.9.2
329
+ Accept:
330
+ - application/json
331
+ Accept-Encoding:
332
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
333
+ response:
334
+ status:
335
+ code: 200
336
+ message: OK
337
+ headers:
338
+ Server:
339
+ - nginx
340
+ Vary:
341
+ - Accept-Encoding
342
+ - Authorization, Host, Accept-Language, Cookie
343
+ Cache-Control:
344
+ - max-age=0
345
+ Content-Type:
346
+ - application/json; charset=utf-8
347
+ Date:
348
+ - Fri, 12 Feb 2016 19:49:02 GMT
349
+ Expires:
350
+ - Fri, 12 Feb 2016 19:49:02 GMT
351
+ Transfer-Encoding:
352
+ - chunked
353
+ Content-Language:
354
+ - en
355
+ X-Content-Type-Options:
356
+ - nosniff
357
+ Connection:
358
+ - keep-alive
359
+ Set-Cookie:
360
+ - X-Mapping-fjhppofk=EC88B8A0F350FE88E4BF67A3F4B1C219; path=/
361
+ Last-Modified:
362
+ - Fri, 12 Feb 2016 19:49:02 GMT
363
+ X-Frame-Options:
364
+ - SAMEORIGIN
365
+ body:
366
+ encoding: UTF-8
367
+ string: "{\n \"source_language_code\": \"en\", \n \"name\": \"sample.po\",
368
+ \n \"i18n_type\": \"PO\", \n \"priority\": \"1\", \n \"slug\": \"samplepo-heads_master\",
369
+ \n \"categories\": [\n \"\"\n ]\n}"
370
+ http_version:
371
+ recorded_at: Fri, 12 Feb 2016 19:49:02 GMT
372
+ - request:
373
+ method: get
374
+ uri: https://txgh.bot:<TRANSIFEX_PASSWORD>@www.transifex.com/api/2/project/test-project-88/resource/samplepo-heads_master/
375
+ body:
376
+ encoding: US-ASCII
377
+ string: ''
378
+ headers:
379
+ User-Agent:
380
+ - Faraday v0.9.2
381
+ Accept:
382
+ - application/json
383
+ Accept-Encoding:
384
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
385
+ response:
386
+ status:
387
+ code: 200
388
+ message: OK
389
+ headers:
390
+ Server:
391
+ - nginx
392
+ Vary:
393
+ - Accept-Encoding
394
+ - Authorization, Host, Accept-Language, Cookie
395
+ Cache-Control:
396
+ - max-age=0
397
+ Content-Type:
398
+ - application/json; charset=utf-8
399
+ Date:
400
+ - Fri, 12 Feb 2016 19:49:02 GMT
401
+ Expires:
402
+ - Fri, 12 Feb 2016 19:49:02 GMT
403
+ Transfer-Encoding:
404
+ - chunked
405
+ Content-Language:
406
+ - en
407
+ X-Content-Type-Options:
408
+ - nosniff
409
+ Connection:
410
+ - keep-alive
411
+ Set-Cookie:
412
+ - X-Mapping-fjhppofk=B8558B7BB369B761FC4CE03884ACF0F5; path=/
413
+ Last-Modified:
414
+ - Fri, 12 Feb 2016 19:49:02 GMT
415
+ X-Frame-Options:
416
+ - SAMEORIGIN
417
+ body:
418
+ encoding: UTF-8
419
+ string: "{\n \"source_language_code\": \"en\", \n \"name\": \"sample.po\",
420
+ \n \"i18n_type\": \"PO\", \n \"priority\": \"1\", \n \"slug\": \"samplepo-heads_master\",
421
+ \n \"categories\": [\n \"\"\n ]\n}"
422
+ http_version:
423
+ recorded_at: Fri, 12 Feb 2016 19:49:02 GMT
424
+ - request:
425
+ method: put
426
+ uri: https://txgh.bot:<TRANSIFEX_PASSWORD>@www.transifex.com/api/2/project/test-project-88/resource/samplepo-heads_master/
427
+ body:
428
+ encoding: UTF-8
429
+ string: '{"categories":[""]}'
430
+ headers:
431
+ User-Agent:
432
+ - Faraday v0.9.2
433
+ Accept:
434
+ - application/json
435
+ Content-Type:
436
+ - application/json
437
+ Accept-Encoding:
438
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
439
+ response:
440
+ status:
441
+ code: 200
442
+ message: OK
443
+ headers:
444
+ Server:
445
+ - nginx
446
+ Vary:
447
+ - Accept-Encoding
448
+ - Authorization, Host, Accept-Language, Cookie
449
+ Cache-Control:
450
+ - max-age=0
451
+ Content-Type:
452
+ - text/plain
453
+ Date:
454
+ - Fri, 12 Feb 2016 19:49:03 GMT
455
+ Expires:
456
+ - Fri, 12 Feb 2016 19:49:03 GMT
457
+ Transfer-Encoding:
458
+ - chunked
459
+ Content-Language:
460
+ - en
461
+ X-Content-Type-Options:
462
+ - nosniff
463
+ Connection:
464
+ - keep-alive
465
+ Set-Cookie:
466
+ - X-Mapping-fjhppofk=B8558B7BB369B761FC4CE03884ACF0F5; path=/
467
+ Last-Modified:
468
+ - Fri, 12 Feb 2016 19:49:03 GMT
469
+ X-Frame-Options:
470
+ - SAMEORIGIN
471
+ body:
472
+ encoding: UTF-8
473
+ string: OK
474
+ http_version:
475
+ recorded_at: Fri, 12 Feb 2016 19:49:03 GMT
476
+ - request:
477
+ method: put
478
+ uri: https://txgh.bot:<TRANSIFEX_PASSWORD>@www.transifex.com/api/2/project/test-project-88/resource/samplepo-heads_master/content/
479
+ body:
480
+ encoding: UTF-8
481
+ string: "-------------RubyMultipartPost\r\nContent-Disposition: form-data; name=\"content\";
482
+ filename=\"sample.po\"\r\nContent-Length: 855\r\nContent-Type: application/octet-stream\r\nContent-Transfer-Encoding:
483
+ binary\r\n\r\n# Translation file for Transifex.\n# Copyright (C) 2007-2010
484
+ Indifex Ltd.\n# This file is distributed under the same license as the Transifex
485
+ package.\n#\n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version:
486
+ Transifex\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-02-17
487
+ 20:10+0000\\n\"\n\"PO-Revision-Date: 2013-10-22 10:57+0000\\n\"\n\"Last-Translator:
488
+ Ilias-Dimitrios Vrachnis\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"Language:
489
+ en\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding:
490
+ 8bit\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\nmsgid \"One\"\nmsgstr
491
+ \"One\"\nmsgid \"Two\"\nmsgstr \"Two\"\nmsgid \"Three\"\nmsgstr \"Three\"\nmsgid
492
+ \"Four\"\nmsgstr \"Four\"\nmsgid \"Five\"\nmsgstr \"Five\"\nmsgid \"Six\"\nmsgstr
493
+ \"Six\"\nmsgid \"Seven\"\nmsgstr \"Seven\"\nmsgid \"Eight\"\nmsgstr \"Eight\"\nmsgid
494
+ \"Nine\"\nmsgstr \"Nine\"\nmsgid \"Ten\"\nmsgstr \"Ten\"\n\r\n-------------RubyMultipartPost--\r\n\r\n"
495
+ headers:
496
+ User-Agent:
497
+ - Faraday v0.9.2
498
+ Accept:
499
+ - application/json
500
+ Content-Type:
501
+ - multipart/form-data; boundary=-----------RubyMultipartPost
502
+ Content-Length:
503
+ - '1093'
504
+ Accept-Encoding:
505
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
506
+ response:
507
+ status:
508
+ code: 200
509
+ message: OK
510
+ headers:
511
+ Server:
512
+ - nginx
513
+ Vary:
514
+ - Accept-Encoding
515
+ - Authorization, Host, Accept-Language, Cookie
516
+ Cache-Control:
517
+ - max-age=0
518
+ Content-Type:
519
+ - application/json; charset=utf-8
520
+ Date:
521
+ - Fri, 12 Feb 2016 19:49:04 GMT
522
+ Expires:
523
+ - Fri, 12 Feb 2016 19:49:04 GMT
524
+ Transfer-Encoding:
525
+ - chunked
526
+ Content-Language:
527
+ - en
528
+ X-Content-Type-Options:
529
+ - nosniff
530
+ Connection:
531
+ - keep-alive
532
+ Set-Cookie:
533
+ - X-Mapping-fjhppofk=EB51E54611BEFDE531C59D8E5F7EF32B; path=/
534
+ Last-Modified:
535
+ - Fri, 12 Feb 2016 19:49:04 GMT
536
+ X-Frame-Options:
537
+ - SAMEORIGIN
538
+ body:
539
+ encoding: UTF-8
540
+ string: "{\n \"strings_added\": 0, \n \"strings_updated\": 0, \n \"strings_delete\":
541
+ 0, \n \"redirect\": \"/txgh-test/test-project-88/samplepo-heads_master/\"\n}"
542
+ http_version:
543
+ recorded_at: Fri, 12 Feb 2016 19:49:06 GMT
544
+ recorded_with: VCR 3.0.1