txgh-server 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/txgh-server/application.rb +1 -2
- data/lib/txgh-server/triggers/pull_handler.rb +12 -0
- data/lib/txgh-server/triggers/push_handler.rb +12 -0
- data/lib/txgh-server/version.rb +1 -1
- data/lib/txgh-server/webhooks/github/delete_attributes.rb +5 -1
- data/lib/txgh-server/webhooks/github/push_attributes.rb +5 -3
- data/lib/txgh-server/webhooks/github/push_handler.rb +20 -6
- data/lib/txgh-server/webhooks/transifex/hook_handler.rb +16 -2
- data/spec/application_spec.rb +8 -6
- data/spec/integration/cassettes/pull.yml +243 -6
- data/spec/integration/cassettes/push.yml +303 -101
- data/spec/integration/cassettes/transifex_hook_endpoint.yml +218 -16
- data/spec/webhooks/github/push_handler_spec.rb +4 -0
- data/spec/webhooks/transifex/hook_handler_spec.rb +15 -3
- data/txgh-server.gemspec +2 -2
- metadata +5 -5
@@ -21,7 +21,7 @@ http_interactions:
|
|
21
21
|
Server:
|
22
22
|
- nginx
|
23
23
|
Date:
|
24
|
-
-
|
24
|
+
- Tue, 04 Oct 2016 21:43:57 GMT
|
25
25
|
Content-Type:
|
26
26
|
- application/json; charset=utf-8
|
27
27
|
Transfer-Encoding:
|
@@ -34,9 +34,9 @@ http_interactions:
|
|
34
34
|
Content-Language:
|
35
35
|
- en
|
36
36
|
Expires:
|
37
|
-
-
|
37
|
+
- Tue, 04 Oct 2016 21:43:57 GMT
|
38
38
|
Last-Modified:
|
39
|
-
-
|
39
|
+
- Tue, 04 Oct 2016 21:43:57 GMT
|
40
40
|
Cache-Control:
|
41
41
|
- max-age=0
|
42
42
|
X-Frame-Options:
|
@@ -61,7 +61,7 @@ http_interactions:
|
|
61
61
|
\\\"Eight\\\"\\nmsgstr \\\"\\\"\\n\\nmsgid \\\"Nine\\\"\\nmsgstr \\\"\\\"\\n\\nmsgid
|
62
62
|
\\\"Ten\\\"\\nmsgstr \\\"\\\"\\n\", \n \"mimetype\": \"text/x-po\"\n}"
|
63
63
|
http_version:
|
64
|
-
recorded_at:
|
64
|
+
recorded_at: Tue, 04 Oct 2016 21:43:57 GMT
|
65
65
|
- request:
|
66
66
|
method: get
|
67
67
|
uri: https://api.github.com/repos/txgh-bot/txgh-test-resources/contents/translations/el_GR/sample.po?ref=master
|
@@ -87,7 +87,7 @@ http_interactions:
|
|
87
87
|
Server:
|
88
88
|
- GitHub.com
|
89
89
|
Date:
|
90
|
-
-
|
90
|
+
- Tue, 04 Oct 2016 21:43:57 GMT
|
91
91
|
Content-Type:
|
92
92
|
- application/json; charset=utf-8
|
93
93
|
Transfer-Encoding:
|
@@ -97,9 +97,9 @@ http_interactions:
|
|
97
97
|
X-Ratelimit-Limit:
|
98
98
|
- '5000'
|
99
99
|
X-Ratelimit-Remaining:
|
100
|
-
- '
|
100
|
+
- '4994'
|
101
101
|
X-Ratelimit-Reset:
|
102
|
-
- '
|
102
|
+
- '1475620950'
|
103
103
|
Cache-Control:
|
104
104
|
- private, max-age=60, s-maxage=60
|
105
105
|
Vary:
|
@@ -131,14 +131,76 @@ http_interactions:
|
|
131
131
|
X-Xss-Protection:
|
132
132
|
- 1; mode=block
|
133
133
|
X-Served-By:
|
134
|
-
-
|
134
|
+
- 075bb2f6b7031ca3c0e69edb17939fae
|
135
135
|
X-Github-Request-Id:
|
136
|
-
- 04358C36:
|
136
|
+
- 04358C36:681B:440C7C9:57F4229D
|
137
137
|
body:
|
138
138
|
encoding: UTF-8
|
139
139
|
string: '{"name":"sample.po","path":"translations/el_GR/sample.po","sha":"540a3d944ac19f573e756de687c8c4f3f9847b53","size":911,"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/contents/translations/el_GR/sample.po?ref=master","html_url":"https://github.com/txgh-bot/txgh-test-resources/blob/master/translations/el_GR/sample.po","git_url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/blobs/540a3d944ac19f573e756de687c8c4f3f9847b53","download_url":"https://raw.githubusercontent.com/txgh-bot/txgh-test-resources/master/translations/el_GR/sample.po","type":"file","content":"IyBUcmFuc2xhdGlvbiBmaWxlIGZvciBUcmFuc2lmZXguCiMgQ29weXJpZ2h0\nIChDKSAyMDA3LTIwMTAgSW5kaWZleCBMdGQuCiMgVGhpcyBmaWxlIGlzIGRp\nc3RyaWJ1dGVkIHVuZGVyIHRoZSBzYW1lIGxpY2Vuc2UgYXMgdGhlIFRyYW5z\naWZleCBwYWNrYWdlLgojIAojIFRyYW5zbGF0b3JzOgojIFRyYW5zbGF0b3Jz\nOgptc2dpZCAiIgptc2dzdHIgIiIKIlByb2plY3QtSWQtVmVyc2lvbjogdGVz\ndC1wcm9qZWN0XG4iCiJSZXBvcnQtTXNnaWQtQnVncy1UbzogXG4iCiJQT1Qt\nQ3JlYXRpb24tRGF0ZTogMjAxNS0wMi0xNyAyMDoxMCswMDAwXG4iCiJQTy1S\nZXZpc2lvbi1EYXRlOiAyMDE2LTAxLTE5IDE5OjA4KzAwMDBcbiIKIkxhc3Qt\nVHJhbnNsYXRvcjogSWxpYXMtRGltaXRyaW9zIFZyYWNobmlzXG4iCiJMYW5n\ndWFnZS1UZWFtOiBHcmVlayAoR3JlZWNlKSAoaHR0cDovL3d3dy50cmFuc2lm\nZXguY29tL3R4Z2gtdGVzdC90ZXN0LXByb2plY3QtODgvbGFuZ3VhZ2UvZWxf\nR1IvKVxuIgoiTUlNRS1WZXJzaW9uOiAxLjBcbiIKIkNvbnRlbnQtVHlwZTog\ndGV4dC9wbGFpbjsgY2hhcnNldD1VVEYtOFxuIgoiQ29udGVudC1UcmFuc2Zl\nci1FbmNvZGluZzogOGJpdFxuIgoiTGFuZ3VhZ2U6IGVsX0dSXG4iCiJQbHVy\nYWwtRm9ybXM6IG5wbHVyYWxzPTI7IHBsdXJhbD0obiAhPSAxKTtcbiIKCm1z\nZ2lkICJPbmUiCm1zZ3N0ciAiIgoKbXNnaWQgIlR3byIKbXNnc3RyICIiCgpt\nc2dpZCAiVGhyZWUiCm1zZ3N0ciAiIgoKbXNnaWQgIkZvdXIiCm1zZ3N0ciAi\nIgoKbXNnaWQgIkZpdmUiCm1zZ3N0ciAiIgoKbXNnaWQgIlNpeCIKbXNnc3Ry\nICIiCgptc2dpZCAiU2V2ZW4iCm1zZ3N0ciAiIgoKbXNnaWQgIkVpZ2h0Igpt\nc2dzdHIgIiIKCm1zZ2lkICJOaW5lIgptc2dzdHIgIiIKCm1zZ2lkICJUZW4i\nCm1zZ3N0ciAiIgo=\n","encoding":"base64","_links":{"self":"https://api.github.com/repos/txgh-bot/txgh-test-resources/contents/translations/el_GR/sample.po?ref=master","git":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/blobs/540a3d944ac19f573e756de687c8c4f3f9847b53","html":"https://github.com/txgh-bot/txgh-test-resources/blob/master/translations/el_GR/sample.po"}}'
|
140
140
|
http_version:
|
141
|
-
recorded_at:
|
141
|
+
recorded_at: Tue, 04 Oct 2016 21:43:57 GMT
|
142
|
+
- request:
|
143
|
+
method: get
|
144
|
+
uri: https://txgh.bot:<TRANSIFEX_PASSWORD>@www.transifex.com/api/2/project/test-project-88/resources/
|
145
|
+
body:
|
146
|
+
encoding: US-ASCII
|
147
|
+
string: ''
|
148
|
+
headers:
|
149
|
+
User-Agent:
|
150
|
+
- Faraday v0.9.2
|
151
|
+
Accept:
|
152
|
+
- application/json
|
153
|
+
Accept-Encoding:
|
154
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
155
|
+
response:
|
156
|
+
status:
|
157
|
+
code: 200
|
158
|
+
message: OK
|
159
|
+
headers:
|
160
|
+
Server:
|
161
|
+
- nginx
|
162
|
+
Date:
|
163
|
+
- Tue, 04 Oct 2016 21:43:58 GMT
|
164
|
+
Content-Type:
|
165
|
+
- application/json; charset=utf-8
|
166
|
+
Transfer-Encoding:
|
167
|
+
- chunked
|
168
|
+
Connection:
|
169
|
+
- keep-alive
|
170
|
+
Vary:
|
171
|
+
- Accept-Encoding
|
172
|
+
- Authorization, Host, Accept-Language, Cookie
|
173
|
+
Content-Language:
|
174
|
+
- en
|
175
|
+
Expires:
|
176
|
+
- Tue, 04 Oct 2016 21:43:58 GMT
|
177
|
+
Last-Modified:
|
178
|
+
- Tue, 04 Oct 2016 21:43:58 GMT
|
179
|
+
Cache-Control:
|
180
|
+
- max-age=0
|
181
|
+
X-Frame-Options:
|
182
|
+
- SAMEORIGIN
|
183
|
+
X-Content-Type-Options:
|
184
|
+
- nosniff
|
185
|
+
body:
|
186
|
+
encoding: UTF-8
|
187
|
+
string: "[\n {\n \"source_language_code\": \"en\", \n \"name\":
|
188
|
+
\"sample.po\", \n \"i18n_type\": \"PO\", \n \"priority\": \"1\",
|
189
|
+
\n \"slug\": \"samplepo-heads_master\", \n \"categories\": [\n
|
190
|
+
\ \"\"\n ]\n }, \n {\n \"source_language_code\":
|
191
|
+
\"en\", \n \"name\": \"sample.po\", \n \"i18n_type\": \"PO\",
|
192
|
+
\n \"priority\": \"0\", \n \"slug\": \"samplepo\", \n \"categories\":
|
193
|
+
[\n \"branch:refs/tags/L10N\", \n \"author:Txgh Bot\"\n
|
194
|
+
\ ]\n }, \n {\n \"source_language_code\": \"en\", \n \"name\":
|
195
|
+
\"test.yml\", \n \"i18n_type\": \"YML\", \n \"priority\": \"1\",
|
196
|
+
\n \"slug\": \"testyml-heads_change_some_shizz\", \n \"categories\":
|
197
|
+
[\n \"author:Cameron_Dutro branch:heads/change_some_shizz\"\n ]\n
|
198
|
+
\ }, \n {\n \"source_language_code\": \"en\", \n \"name\":
|
199
|
+
\"test.yml\", \n \"i18n_type\": \"YML\", \n \"priority\": \"0\",
|
200
|
+
\n \"slug\": \"testyml-heads_master\", \n \"categories\": [\n
|
201
|
+
\ \"branch:heads/master\"\n ]\n }\n]"
|
202
|
+
http_version:
|
203
|
+
recorded_at: Tue, 04 Oct 2016 21:43:58 GMT
|
142
204
|
- request:
|
143
205
|
method: get
|
144
206
|
uri: https://api.github.com/repos/txgh-bot/txgh-test-resources/git/refs/heads/master
|
@@ -164,7 +226,7 @@ http_interactions:
|
|
164
226
|
Server:
|
165
227
|
- GitHub.com
|
166
228
|
Date:
|
167
|
-
-
|
229
|
+
- Tue, 04 Oct 2016 21:43:58 GMT
|
168
230
|
Content-Type:
|
169
231
|
- application/json; charset=utf-8
|
170
232
|
Transfer-Encoding:
|
@@ -174,9 +236,9 @@ http_interactions:
|
|
174
236
|
X-Ratelimit-Limit:
|
175
237
|
- '5000'
|
176
238
|
X-Ratelimit-Remaining:
|
177
|
-
- '
|
239
|
+
- '4993'
|
178
240
|
X-Ratelimit-Reset:
|
179
|
-
- '
|
241
|
+
- '1475620950'
|
180
242
|
Cache-Control:
|
181
243
|
- private, max-age=60, s-maxage=60
|
182
244
|
Vary:
|
@@ -210,12 +272,152 @@ http_interactions:
|
|
210
272
|
X-Xss-Protection:
|
211
273
|
- 1; mode=block
|
212
274
|
X-Served-By:
|
213
|
-
-
|
275
|
+
- 76d9828c7e4f1d910f7ba069e90ce976
|
214
276
|
X-Github-Request-Id:
|
215
|
-
- 04358C36:
|
277
|
+
- 04358C36:681A:21A9497:57F4229E
|
216
278
|
body:
|
217
279
|
encoding: UTF-8
|
218
280
|
string: '{"ref":"refs/heads/master","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/refs/heads/master","object":{"sha":"f3edb21f027b70974750649ba29b0090e410ecde","type":"commit","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/commits/f3edb21f027b70974750649ba29b0090e410ecde"}}'
|
219
281
|
http_version:
|
220
|
-
recorded_at:
|
282
|
+
recorded_at: Tue, 04 Oct 2016 21:43:58 GMT
|
283
|
+
- request:
|
284
|
+
method: get
|
285
|
+
uri: https://txgh.bot:<TRANSIFEX_PASSWORD>@www.transifex.com/api/2/project/test-project-88/resource/samplepo/stats/
|
286
|
+
body:
|
287
|
+
encoding: US-ASCII
|
288
|
+
string: ''
|
289
|
+
headers:
|
290
|
+
User-Agent:
|
291
|
+
- Faraday v0.9.2
|
292
|
+
Accept:
|
293
|
+
- application/json
|
294
|
+
Accept-Encoding:
|
295
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
296
|
+
response:
|
297
|
+
status:
|
298
|
+
code: 200
|
299
|
+
message: OK
|
300
|
+
headers:
|
301
|
+
Server:
|
302
|
+
- nginx
|
303
|
+
Date:
|
304
|
+
- Tue, 04 Oct 2016 21:43:59 GMT
|
305
|
+
Content-Type:
|
306
|
+
- application/json; charset=utf-8
|
307
|
+
Transfer-Encoding:
|
308
|
+
- chunked
|
309
|
+
Connection:
|
310
|
+
- keep-alive
|
311
|
+
Vary:
|
312
|
+
- Accept-Encoding
|
313
|
+
- Authorization, Host, Accept-Language, Cookie
|
314
|
+
Content-Language:
|
315
|
+
- en
|
316
|
+
Expires:
|
317
|
+
- Tue, 04 Oct 2016 21:43:59 GMT
|
318
|
+
Last-Modified:
|
319
|
+
- Tue, 04 Oct 2016 21:43:59 GMT
|
320
|
+
Cache-Control:
|
321
|
+
- max-age=0
|
322
|
+
X-Frame-Options:
|
323
|
+
- SAMEORIGIN
|
324
|
+
X-Content-Type-Options:
|
325
|
+
- nosniff
|
326
|
+
body:
|
327
|
+
encoding: UTF-8
|
328
|
+
string: "{\n \"el_GR\": {\n \"reviewed_percentage\": \"0%\", \n \"completed\":
|
329
|
+
\"0%\", \n \"untranslated_words\": 10, \n \"last_commiter\":
|
330
|
+
\"\", \n \"reviewed\": 0, \n \"translated_entities\": 0, \n
|
331
|
+
\ \"translated_words\": 0, \n \"last_update\": \"2016-01-19 19:08:25\",
|
332
|
+
\n \"untranslated_entities\": 10\n }, \n \"ru\": {\n \"reviewed_percentage\":
|
333
|
+
\"0%\", \n \"completed\": \"0%\", \n \"untranslated_words\":
|
334
|
+
10, \n \"last_commiter\": \"txgh.bot\", \n \"reviewed\": 0,
|
335
|
+
\n \"translated_entities\": 0, \n \"translated_words\": 0, \n
|
336
|
+
\ \"last_update\": \"2016-04-01 05:36:37\", \n \"untranslated_entities\":
|
337
|
+
10\n }, \n \"en\": {\n \"reviewed_percentage\": \"0%\", \n \"completed\":
|
338
|
+
\"100%\", \n \"untranslated_words\": 0, \n \"last_commiter\":
|
339
|
+
\"txgh.bot\", \n \"reviewed\": 0, \n \"translated_entities\":
|
340
|
+
10, \n \"translated_words\": 10, \n \"last_update\": \"2016-01-19
|
341
|
+
19:08:25\", \n \"untranslated_entities\": 0\n }\n}"
|
342
|
+
http_version:
|
343
|
+
recorded_at: Tue, 04 Oct 2016 21:43:59 GMT
|
344
|
+
- request:
|
345
|
+
method: post
|
346
|
+
uri: https://api.github.com/repos/txgh-bot/txgh-test-resources/statuses/f3edb21f027b70974750649ba29b0090e410ecde
|
347
|
+
body:
|
348
|
+
encoding: UTF-8
|
349
|
+
string: '{"context":"continuous-localization/txgh","target_url":"https://www.transifex.com//test-project-88/content","description":"10/30
|
350
|
+
translations complete.","state":"pending"}'
|
351
|
+
headers:
|
352
|
+
Accept:
|
353
|
+
- application/vnd.github.v3+json
|
354
|
+
User-Agent:
|
355
|
+
- Octokit Ruby Gem 4.3.0
|
356
|
+
Content-Type:
|
357
|
+
- application/json
|
358
|
+
Authorization:
|
359
|
+
- token <GITHUB_TOKEN>
|
360
|
+
Accept-Encoding:
|
361
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
362
|
+
response:
|
363
|
+
status:
|
364
|
+
code: 201
|
365
|
+
message: Created
|
366
|
+
headers:
|
367
|
+
Server:
|
368
|
+
- GitHub.com
|
369
|
+
Date:
|
370
|
+
- Tue, 04 Oct 2016 21:43:59 GMT
|
371
|
+
Content-Type:
|
372
|
+
- application/json; charset=utf-8
|
373
|
+
Content-Length:
|
374
|
+
- '1259'
|
375
|
+
Status:
|
376
|
+
- 201 Created
|
377
|
+
X-Ratelimit-Limit:
|
378
|
+
- '5000'
|
379
|
+
X-Ratelimit-Remaining:
|
380
|
+
- '4992'
|
381
|
+
X-Ratelimit-Reset:
|
382
|
+
- '1475620950'
|
383
|
+
Cache-Control:
|
384
|
+
- private, max-age=60, s-maxage=60
|
385
|
+
Vary:
|
386
|
+
- Accept, Authorization, Cookie, X-GitHub-OTP
|
387
|
+
- Accept-Encoding
|
388
|
+
Etag:
|
389
|
+
- '"d1840f82e12475b13c29e798d6b1e604"'
|
390
|
+
X-Oauth-Scopes:
|
391
|
+
- public_repo
|
392
|
+
X-Accepted-Oauth-Scopes:
|
393
|
+
- ''
|
394
|
+
Location:
|
395
|
+
- https://api.github.com/repos/txgh-bot/txgh-test-resources/statuses/f3edb21f027b70974750649ba29b0090e410ecde
|
396
|
+
X-Github-Media-Type:
|
397
|
+
- github.v3; format=json
|
398
|
+
Access-Control-Expose-Headers:
|
399
|
+
- ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
|
400
|
+
X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
401
|
+
Access-Control-Allow-Origin:
|
402
|
+
- "*"
|
403
|
+
Content-Security-Policy:
|
404
|
+
- default-src 'none'
|
405
|
+
Strict-Transport-Security:
|
406
|
+
- max-age=31536000; includeSubdomains; preload
|
407
|
+
X-Content-Type-Options:
|
408
|
+
- nosniff
|
409
|
+
X-Frame-Options:
|
410
|
+
- deny
|
411
|
+
X-Xss-Protection:
|
412
|
+
- 1; mode=block
|
413
|
+
X-Served-By:
|
414
|
+
- 7efb7ae49588ef0269c6a1c1bd3721d9
|
415
|
+
X-Github-Request-Id:
|
416
|
+
- 04358C36:6823:3A0BE34:57F4229F
|
417
|
+
body:
|
418
|
+
encoding: UTF-8
|
419
|
+
string: '{"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/statuses/f3edb21f027b70974750649ba29b0090e410ecde","id":785754437,"state":"pending","description":"10/30
|
420
|
+
translations complete.","target_url":"https://www.transifex.com//test-project-88/content","context":"continuous-localization/txgh","created_at":"2016-10-04T21:43:59Z","updated_at":"2016-10-04T21:43:59Z","creator":{"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}}'
|
421
|
+
http_version:
|
422
|
+
recorded_at: Tue, 04 Oct 2016 21:43:59 GMT
|
221
423
|
recorded_with: VCR 3.0.3
|
@@ -45,11 +45,15 @@ describe HookHandler do
|
|
45
45
|
expect(github_api).to(
|
46
46
|
receive(:update_contents).with(
|
47
47
|
"heads/#{branch}",
|
48
|
-
{ "translations/#{language}/sample.yml"
|
48
|
+
[{ path: "translations/#{language}/sample.yml", contents: translations }],
|
49
49
|
"Updating #{language} translations in #{file_name}"
|
50
50
|
)
|
51
51
|
)
|
52
52
|
|
53
|
+
expect(Txgh::GithubStatus).to(
|
54
|
+
receive(:update).with(transifex_project, github_repo, ref)
|
55
|
+
)
|
56
|
+
|
53
57
|
response = handler.execute
|
54
58
|
expect(response.status).to eq(200)
|
55
59
|
expect(response.body).to eq(true)
|
@@ -92,11 +96,15 @@ describe HookHandler do
|
|
92
96
|
expect(github_api).to(
|
93
97
|
receive(:update_contents).with(
|
94
98
|
ref,
|
95
|
-
{ "translations/#{language}/sample.yml"
|
99
|
+
[{ path: "translations/#{language}/sample.yml", contents: translations }],
|
96
100
|
"Updating #{language} translations in #{file_name}"
|
97
101
|
)
|
98
102
|
)
|
99
103
|
|
104
|
+
expect(Txgh::GithubStatus).to(
|
105
|
+
receive(:update).with(transifex_project, github_repo, ref)
|
106
|
+
)
|
107
|
+
|
100
108
|
response = handler.execute
|
101
109
|
expect(response.status).to eq(200)
|
102
110
|
expect(response.body).to eq(true)
|
@@ -110,11 +118,15 @@ describe HookHandler do
|
|
110
118
|
expect(github_api).to(
|
111
119
|
receive(:update_contents).with(
|
112
120
|
"tags/my_tag",
|
113
|
-
{ "translations/#{language}/sample.yml"
|
121
|
+
[{ path: "translations/#{language}/sample.yml", contents: translations }],
|
114
122
|
"Updating #{language} translations in #{file_name}"
|
115
123
|
)
|
116
124
|
)
|
117
125
|
|
126
|
+
expect(Txgh::GithubStatus).to(
|
127
|
+
receive(:update).with(transifex_project, github_repo, branch)
|
128
|
+
)
|
129
|
+
|
118
130
|
response = handler.execute
|
119
131
|
expect(response.status).to eq(200)
|
120
132
|
expect(response.body).to eq(true)
|
data/txgh-server.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.version = ::TxghServer::VERSION
|
7
7
|
s.authors = ['Matthew Jackowski', 'Cameron Dutro']
|
8
8
|
s.email = ['mattjjacko@gmail.com', 'camertron@gmail.com']
|
9
|
-
s.homepage = 'https://github.com/lumoslabs/txgh
|
9
|
+
s.homepage = 'https://github.com/lumoslabs/txgh'
|
10
10
|
|
11
11
|
s.description = s.summary = 'An HTTP server for interacting with txgh.'
|
12
12
|
|
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.add_dependency 'sinatra', '~> 1.4'
|
18
18
|
s.add_dependency 'sinatra-contrib', '~> 1.4'
|
19
19
|
s.add_dependency 'rubyzip', '>= 1.0', '<= 1.1.2'
|
20
|
-
s.add_dependency 'txgh', '~> 6.
|
20
|
+
s.add_dependency 'txgh', '~> 6.1'
|
21
21
|
|
22
22
|
s.require_path = 'lib'
|
23
23
|
s.files = Dir['{lib,spec}/**/*', 'README.md', 'txgh-server.gemspec', 'LICENSE']
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: txgh-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Jackowski
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-10-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mime-types
|
@@ -79,14 +79,14 @@ dependencies:
|
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '6.
|
82
|
+
version: '6.1'
|
83
83
|
type: :runtime
|
84
84
|
prerelease: false
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '6.
|
89
|
+
version: '6.1'
|
90
90
|
description: An HTTP server for interacting with txgh.
|
91
91
|
email:
|
92
92
|
- mattjjacko@gmail.com
|
@@ -147,7 +147,7 @@ files:
|
|
147
147
|
- spec/webhooks/transifex/hook_handler_spec.rb
|
148
148
|
- spec/zip_stream_response_spec.rb
|
149
149
|
- txgh-server.gemspec
|
150
|
-
homepage: https://github.com/lumoslabs/txgh
|
150
|
+
homepage: https://github.com/lumoslabs/txgh
|
151
151
|
licenses: []
|
152
152
|
metadata: {}
|
153
153
|
post_install_message:
|