txgh 5.2.2 → 5.3.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/github_api.rb +18 -0
- data/lib/txgh/resource_committer.rb +4 -1
- data/lib/txgh/utils.rb +10 -0
- data/lib/txgh/version.rb +1 -1
- data/spec/github_api_spec.rb +35 -0
- data/spec/handlers/transifex/hook_handler_spec.rb +4 -4
- data/spec/integration/cassettes/transifex_hook_endpoint.yml +30 -442
- data/spec/resource_committer_spec.rb +1 -1
- data/spec/utils_spec.rb +22 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da73a2ba9cb72597e6abc0367c6e50368239ac1f
|
4
|
+
data.tar.gz: 5b1bff59f2805f6d26175895d9343c3a036e2808
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccc0c69d5cd08cb77f624bd8f8457277461dd4033be38667621dcaacc606023cb3f743c1b6ed6b641f532e51ae1ae40bccd6d278acd73a35f6f6bb369a4c3778
|
7
|
+
data.tar.gz: af15bf78523dbe2719ad3412993b84aa7529bd4f1c30e222fd564f6bba742725cb1d20e9958004153869a3ad8f8b24e3106ffbbf96f78a89d841bd732c5bed35
|
data/lib/txgh/github_api.rb
CHANGED
@@ -33,6 +33,24 @@ module Txgh
|
|
33
33
|
client.create_ref(repo, branch, sha) rescue false
|
34
34
|
end
|
35
35
|
|
36
|
+
def update_contents(repo, branch, content_map, message)
|
37
|
+
content_map.each do |path, new_contents|
|
38
|
+
branch = Utils.relative_branch(branch)
|
39
|
+
file = client.contents(repo, { path: path, ref: branch})
|
40
|
+
current_contents = Base64.decode64(file[:content])
|
41
|
+
current_sha = file[:sha]
|
42
|
+
|
43
|
+
new_sha = Utils.git_hash_blob(new_contents)
|
44
|
+
options = { branch: branch }
|
45
|
+
|
46
|
+
if current_sha != new_sha
|
47
|
+
client.update_contents(
|
48
|
+
repo, path, message, current_sha, new_contents, options
|
49
|
+
)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
36
54
|
def commit(repo, branch, content_map, message, allow_empty = false)
|
37
55
|
parent = client.ref(repo, branch)
|
38
56
|
base_commit = get_commit(repo, parent[:object][:sha])
|
@@ -18,7 +18,10 @@ module Txgh
|
|
18
18
|
message = commit_message_for(language, file_name)
|
19
19
|
|
20
20
|
if translations
|
21
|
-
repo.api.
|
21
|
+
repo.api.update_contents(
|
22
|
+
repo.name, branch, { file_name => translations }, message
|
23
|
+
)
|
24
|
+
|
22
25
|
fire_event_for(tx_resource, branch, language)
|
23
26
|
end
|
24
27
|
end
|
data/lib/txgh/utils.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'digest'
|
2
|
+
|
1
3
|
module Txgh
|
2
4
|
module Utils
|
3
5
|
def slugify(text)
|
@@ -18,6 +20,10 @@ module Txgh
|
|
18
20
|
end
|
19
21
|
end
|
20
22
|
|
23
|
+
def relative_branch(branch)
|
24
|
+
branch.strip.sub(/\A(heads|tags)\//, '')
|
25
|
+
end
|
26
|
+
|
21
27
|
def branches_equal?(first, second)
|
22
28
|
absolute_branch(first) == absolute_branch(second)
|
23
29
|
end
|
@@ -26,6 +32,10 @@ module Txgh
|
|
26
32
|
ref.include?('tags/')
|
27
33
|
end
|
28
34
|
|
35
|
+
def git_hash_blob(str)
|
36
|
+
Digest::SHA1.hexdigest("blob #{str.bytesize}\0#{str}")
|
37
|
+
end
|
38
|
+
|
29
39
|
# Builds a hash from an array of hashes using a common key present in all
|
30
40
|
# the elements. For example, consider this array of hashes:
|
31
41
|
#
|
data/lib/txgh/version.rb
CHANGED
data/spec/github_api_spec.rb
CHANGED
@@ -35,6 +35,41 @@ describe GithubApi do
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
+
describe '#update_contents' do
|
39
|
+
let(:path) { 'path/to/file.txt' }
|
40
|
+
let(:old_contents) { 'abc123' }
|
41
|
+
let(:old_sha) { Utils.git_hash_blob(old_contents) }
|
42
|
+
|
43
|
+
it 'updates the given file contents' do
|
44
|
+
new_contents = 'def456'
|
45
|
+
|
46
|
+
expect(client).to(
|
47
|
+
receive(:contents)
|
48
|
+
.with(repo, { ref: branch, path: path })
|
49
|
+
.and_return({ sha: old_sha, content: Base64.encode64(old_contents) })
|
50
|
+
)
|
51
|
+
|
52
|
+
expect(client).to(
|
53
|
+
receive(:update_contents)
|
54
|
+
.with(repo, path, 'message', old_sha, new_contents, { branch: branch })
|
55
|
+
)
|
56
|
+
|
57
|
+
api.update_contents(repo, branch, { path => new_contents }, 'message')
|
58
|
+
end
|
59
|
+
|
60
|
+
it "doesn't update the file contents if the file hasn't changed" do
|
61
|
+
expect(client).to(
|
62
|
+
receive(:contents)
|
63
|
+
.with(repo, { ref: branch, path: path })
|
64
|
+
.and_return({ sha: old_sha, content: Base64.encode64(old_contents) })
|
65
|
+
)
|
66
|
+
|
67
|
+
expect(client).to_not receive(:update_contents)
|
68
|
+
|
69
|
+
api.update_contents(repo, branch, { path => old_contents }, 'message')
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
38
73
|
describe '#commit' do
|
39
74
|
let(:path) { 'path/to/translations' }
|
40
75
|
let(:other_path) { 'other/path/to/translations' }
|
@@ -43,7 +43,7 @@ describe HookHandler do
|
|
43
43
|
|
44
44
|
it 'downloads translations and pushes them to the correct branch (head)' do
|
45
45
|
expect(github_api).to(
|
46
|
-
receive(:
|
46
|
+
receive(:update_contents).with(
|
47
47
|
repo_name, "heads/#{branch}",
|
48
48
|
{ "translations/#{language}/sample.yml" => translations },
|
49
49
|
"Updating #{language} translations in #{file_name}"
|
@@ -90,7 +90,7 @@ describe HookHandler do
|
|
90
90
|
end
|
91
91
|
|
92
92
|
expect(github_api).to(
|
93
|
-
receive(:
|
93
|
+
receive(:update_contents).with(
|
94
94
|
repo_name, ref,
|
95
95
|
{ "translations/#{language}/sample.yml" => translations },
|
96
96
|
"Updating #{language} translations in #{file_name}"
|
@@ -108,7 +108,7 @@ describe HookHandler do
|
|
108
108
|
|
109
109
|
it 'downloads translations and pushes them to the tag' do
|
110
110
|
expect(github_api).to(
|
111
|
-
receive(:
|
111
|
+
receive(:update_contents).with(
|
112
112
|
repo_name, "tags/my_tag",
|
113
113
|
{ "translations/#{language}/sample.yml" => translations },
|
114
114
|
"Updating #{language} translations in #{file_name}"
|
@@ -126,7 +126,7 @@ describe HookHandler do
|
|
126
126
|
let(:supported_languages) { ['ja'] }
|
127
127
|
|
128
128
|
it "doesn't make a commit" do
|
129
|
-
expect(github_api).to_not receive(:
|
129
|
+
expect(github_api).to_not receive(:update_contents)
|
130
130
|
|
131
131
|
response = handler.execute
|
132
132
|
expect(response.status).to eq(304)
|
@@ -20,31 +20,29 @@ http_interactions:
|
|
20
20
|
headers:
|
21
21
|
Server:
|
22
22
|
- nginx
|
23
|
-
|
24
|
-
-
|
25
|
-
- Authorization, Host, Accept-Language, Cookie
|
26
|
-
Cache-Control:
|
27
|
-
- max-age=0
|
23
|
+
Date:
|
24
|
+
- Tue, 28 Jun 2016 22:05:59 GMT
|
28
25
|
Content-Type:
|
29
26
|
- application/json; charset=utf-8
|
30
|
-
Date:
|
31
|
-
- Fri, 29 Apr 2016 16:06:38 GMT
|
32
|
-
Expires:
|
33
|
-
- Fri, 29 Apr 2016 16:06:38 GMT
|
34
27
|
Transfer-Encoding:
|
35
28
|
- chunked
|
36
|
-
Content-Language:
|
37
|
-
- en
|
38
|
-
X-Content-Type-Options:
|
39
|
-
- nosniff
|
40
29
|
Connection:
|
41
30
|
- keep-alive
|
42
|
-
|
43
|
-
-
|
31
|
+
Vary:
|
32
|
+
- Accept-Encoding
|
33
|
+
- Authorization, Host, Accept-Language, Cookie
|
34
|
+
Content-Language:
|
35
|
+
- en
|
36
|
+
Expires:
|
37
|
+
- Tue, 28 Jun 2016 22:05:59 GMT
|
44
38
|
Last-Modified:
|
45
|
-
-
|
39
|
+
- Tue, 28 Jun 2016 22:05:59 GMT
|
40
|
+
Cache-Control:
|
41
|
+
- max-age=0
|
46
42
|
X-Frame-Options:
|
47
43
|
- SAMEORIGIN
|
44
|
+
X-Content-Type-Options:
|
45
|
+
- nosniff
|
48
46
|
body:
|
49
47
|
encoding: UTF-8
|
50
48
|
string: "{\n \"content\": \"# Translation file for Transifex.\\n# Copyright
|
@@ -63,89 +61,10 @@ http_interactions:
|
|
63
61
|
\\\"Eight\\\"\\nmsgstr \\\"\\\"\\n\\nmsgid \\\"Nine\\\"\\nmsgstr \\\"\\\"\\n\\nmsgid
|
64
62
|
\\\"Ten\\\"\\nmsgstr \\\"\\\"\\n\", \n \"mimetype\": \"text/x-po\"\n}"
|
65
63
|
http_version:
|
66
|
-
recorded_at:
|
67
|
-
- request:
|
68
|
-
method: get
|
69
|
-
uri: https://api.github.com/repos/txgh-bot/txgh-test-resources/git/refs/heads/master
|
70
|
-
body:
|
71
|
-
encoding: US-ASCII
|
72
|
-
string: ''
|
73
|
-
headers:
|
74
|
-
Accept:
|
75
|
-
- application/vnd.github.v3+json
|
76
|
-
User-Agent:
|
77
|
-
- Octokit Ruby Gem 4.3.0
|
78
|
-
Content-Type:
|
79
|
-
- application/json
|
80
|
-
Authorization:
|
81
|
-
- token <GITHUB_TOKEN>
|
82
|
-
Accept-Encoding:
|
83
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
84
|
-
response:
|
85
|
-
status:
|
86
|
-
code: 200
|
87
|
-
message: OK
|
88
|
-
headers:
|
89
|
-
Server:
|
90
|
-
- GitHub.com
|
91
|
-
Date:
|
92
|
-
- Fri, 29 Apr 2016 16:06:48 GMT
|
93
|
-
Content-Type:
|
94
|
-
- application/json; charset=utf-8
|
95
|
-
Transfer-Encoding:
|
96
|
-
- chunked
|
97
|
-
Status:
|
98
|
-
- 200 OK
|
99
|
-
X-Ratelimit-Limit:
|
100
|
-
- '5000'
|
101
|
-
X-Ratelimit-Remaining:
|
102
|
-
- '4988'
|
103
|
-
X-Ratelimit-Reset:
|
104
|
-
- '1461949570'
|
105
|
-
Cache-Control:
|
106
|
-
- private, max-age=60, s-maxage=60
|
107
|
-
Vary:
|
108
|
-
- Accept, Authorization, Cookie, X-GitHub-OTP
|
109
|
-
- Accept-Encoding
|
110
|
-
Etag:
|
111
|
-
- W/"a5fe675407899fa4460005cce07b9fe2"
|
112
|
-
Last-Modified:
|
113
|
-
- Mon, 11 Jan 2016 23:45:43 GMT
|
114
|
-
X-Poll-Interval:
|
115
|
-
- '300'
|
116
|
-
X-Oauth-Scopes:
|
117
|
-
- public_repo
|
118
|
-
X-Accepted-Oauth-Scopes:
|
119
|
-
- ''
|
120
|
-
X-Github-Media-Type:
|
121
|
-
- github.v3; format=json
|
122
|
-
Access-Control-Expose-Headers:
|
123
|
-
- ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
|
124
|
-
X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
125
|
-
Access-Control-Allow-Origin:
|
126
|
-
- "*"
|
127
|
-
Content-Security-Policy:
|
128
|
-
- default-src 'none'
|
129
|
-
Strict-Transport-Security:
|
130
|
-
- max-age=31536000; includeSubdomains; preload
|
131
|
-
X-Content-Type-Options:
|
132
|
-
- nosniff
|
133
|
-
X-Frame-Options:
|
134
|
-
- deny
|
135
|
-
X-Xss-Protection:
|
136
|
-
- 1; mode=block
|
137
|
-
X-Served-By:
|
138
|
-
- d0b3c2c33a23690498aa8e70a435a259
|
139
|
-
X-Github-Request-Id:
|
140
|
-
- 438EEBFC:76D2:F87C5CA:57238694
|
141
|
-
body:
|
142
|
-
encoding: UTF-8
|
143
|
-
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"}}'
|
144
|
-
http_version:
|
145
|
-
recorded_at: Fri, 29 Apr 2016 16:06:49 GMT
|
64
|
+
recorded_at: Tue, 28 Jun 2016 22:05:59 GMT
|
146
65
|
- request:
|
147
66
|
method: get
|
148
|
-
uri: https://api.github.com/repos/txgh-bot/txgh-test-resources/
|
67
|
+
uri: https://api.github.com/repos/txgh-bot/txgh-test-resources/contents/translations/el_GR/sample.po?ref=master
|
149
68
|
body:
|
150
69
|
encoding: US-ASCII
|
151
70
|
string: ''
|
@@ -168,7 +87,7 @@ http_interactions:
|
|
168
87
|
Server:
|
169
88
|
- GitHub.com
|
170
89
|
Date:
|
171
|
-
-
|
90
|
+
- Tue, 28 Jun 2016 22:05:59 GMT
|
172
91
|
Content-Type:
|
173
92
|
- application/json; charset=utf-8
|
174
93
|
Transfer-Encoding:
|
@@ -178,16 +97,16 @@ http_interactions:
|
|
178
97
|
X-Ratelimit-Limit:
|
179
98
|
- '5000'
|
180
99
|
X-Ratelimit-Remaining:
|
181
|
-
- '
|
100
|
+
- '4999'
|
182
101
|
X-Ratelimit-Reset:
|
183
|
-
- '
|
102
|
+
- '1467155159'
|
184
103
|
Cache-Control:
|
185
104
|
- private, max-age=60, s-maxage=60
|
186
105
|
Vary:
|
187
106
|
- Accept, Authorization, Cookie, X-GitHub-OTP
|
188
107
|
- Accept-Encoding
|
189
108
|
Etag:
|
190
|
-
- W/"
|
109
|
+
- W/"0c4897447f15f3dad309a5e63b994f66"
|
191
110
|
Last-Modified:
|
192
111
|
- Wed, 27 Apr 2016 17:33:49 GMT
|
193
112
|
X-Oauth-Scopes:
|
@@ -212,345 +131,14 @@ http_interactions:
|
|
212
131
|
X-Xss-Protection:
|
213
132
|
- 1; mode=block
|
214
133
|
X-Served-By:
|
215
|
-
-
|
216
|
-
X-Github-Request-Id:
|
217
|
-
- 438EEBFC:76D4:1CED3E16:57238699
|
218
|
-
body:
|
219
|
-
encoding: UTF-8
|
220
|
-
string: '{"sha":"f3edb21f027b70974750649ba29b0090e410ecde","commit":{"author":{"name":"txgh-bot","email":"txgh.bot@gmail.com","date":"2016-04-27T17:33:49Z"},"committer":{"name":"txgh-bot","email":"txgh.bot@gmail.com","date":"2016-04-27T17:33:49Z"},"message":"Updating
|
221
|
-
translations for translations/el_GR/sample.po","tree":{"sha":"fb0bb964adae138921edd29647d100350a0a25d0","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/trees/fb0bb964adae138921edd29647d100350a0a25d0"},"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/commits/f3edb21f027b70974750649ba29b0090e410ecde","comment_count":0},"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/commits/f3edb21f027b70974750649ba29b0090e410ecde","html_url":"https://github.com/txgh-bot/txgh-test-resources/commit/f3edb21f027b70974750649ba29b0090e410ecde","comments_url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/commits/f3edb21f027b70974750649ba29b0090e410ecde/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":"89275cd4a7b4f36f00282689610cec9b2a970834","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/commits/89275cd4a7b4f36f00282689610cec9b2a970834","html_url":"https://github.com/txgh-bot/txgh-test-resources/commit/89275cd4a7b4f36f00282689610cec9b2a970834"}],"stats":{"total":2,"additions":1,"deletions":1},"files":[{"sha":"540a3d944ac19f573e756de687c8c4f3f9847b53","filename":"translations/el_GR/sample.po","status":"modified","additions":1,"deletions":1,"changes":2,"blob_url":"https://github.com/txgh-bot/txgh-test-resources/blob/f3edb21f027b70974750649ba29b0090e410ecde/translations/el_GR/sample.po","raw_url":"https://github.com/txgh-bot/txgh-test-resources/raw/f3edb21f027b70974750649ba29b0090e410ecde/translations/el_GR/sample.po","contents_url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/contents/translations/el_GR/sample.po?ref=f3edb21f027b70974750649ba29b0090e410ecde","patch":"@@
|
222
|
-
-9,7 +9,7 @@ msgstr \"\"\n \"Project-Id-Version: test-project\\n\"\n \"Report-Msgid-Bugs-To:
|
223
|
-
\\n\"\n \"POT-Creation-Date: 2015-02-17 20:10+0000\\n\"\n-\"PO-Revision-Date:
|
224
|
-
2016-02-05 23:57+0000\\n\"\n+\"PO-Revision-Date: 2016-01-19 19:08+0000\\n\"\n
|
225
|
-
\"Last-Translator: Ilias-Dimitrios Vrachnis\\n\"\n \"Language-Team: Greek
|
226
|
-
(Greece) (http://www.transifex.com/txgh-test/test-project-88/language/el_GR/)\\n\"\n
|
227
|
-
\"MIME-Version: 1.0\\n\""}]}'
|
228
|
-
http_version:
|
229
|
-
recorded_at: Fri, 29 Apr 2016 16:06:57 GMT
|
230
|
-
- request:
|
231
|
-
method: post
|
232
|
-
uri: https://api.github.com/repos/txgh-bot/txgh-test-resources/git/blobs
|
233
|
-
body:
|
234
|
-
encoding: UTF-8
|
235
|
-
string: '{"content":"# Translation file for Transifex.\n# Copyright (C) 2007-2010
|
236
|
-
Indifex Ltd.\n# This file is distributed under the same license as the Transifex
|
237
|
-
package.\n# \n# Translators:\n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version:
|
238
|
-
test-project\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-02-17
|
239
|
-
20:10+0000\\n\"\n\"PO-Revision-Date: 2016-01-19 19:08+0000\\n\"\n\"Last-Translator:
|
240
|
-
Ilias-Dimitrios Vrachnis\\n\"\n\"Language-Team: Greek (Greece) (http://www.transifex.com/txgh-test/test-project-88/language/el_GR/)\\n\"\n\"MIME-Version:
|
241
|
-
1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding:
|
242
|
-
8bit\\n\"\n\"Language: el_GR\\n\"\n\"Plural-Forms: nplurals=2; plural=(n !=
|
243
|
-
1);\\n\"\n\nmsgid \"One\"\nmsgstr \"\"\n\nmsgid \"Two\"\nmsgstr \"\"\n\nmsgid
|
244
|
-
\"Three\"\nmsgstr \"\"\n\nmsgid \"Four\"\nmsgstr \"\"\n\nmsgid \"Five\"\nmsgstr
|
245
|
-
\"\"\n\nmsgid \"Six\"\nmsgstr \"\"\n\nmsgid \"Seven\"\nmsgstr \"\"\n\nmsgid
|
246
|
-
\"Eight\"\nmsgstr \"\"\n\nmsgid \"Nine\"\nmsgstr \"\"\n\nmsgid \"Ten\"\nmsgstr
|
247
|
-
\"\"\n","encoding":"utf-8"}'
|
248
|
-
headers:
|
249
|
-
Accept:
|
250
|
-
- application/vnd.github.v3+json
|
251
|
-
User-Agent:
|
252
|
-
- Octokit Ruby Gem 4.3.0
|
253
|
-
Content-Type:
|
254
|
-
- application/json
|
255
|
-
Authorization:
|
256
|
-
- token <GITHUB_TOKEN>
|
257
|
-
Accept-Encoding:
|
258
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
259
|
-
response:
|
260
|
-
status:
|
261
|
-
code: 201
|
262
|
-
message: Created
|
263
|
-
headers:
|
264
|
-
Server:
|
265
|
-
- GitHub.com
|
266
|
-
Date:
|
267
|
-
- Fri, 29 Apr 2016 16:07:00 GMT
|
268
|
-
Content-Type:
|
269
|
-
- application/json; charset=utf-8
|
270
|
-
Content-Length:
|
271
|
-
- '167'
|
272
|
-
Status:
|
273
|
-
- 201 Created
|
274
|
-
X-Ratelimit-Limit:
|
275
|
-
- '5000'
|
276
|
-
X-Ratelimit-Remaining:
|
277
|
-
- '4986'
|
278
|
-
X-Ratelimit-Reset:
|
279
|
-
- '1461949570'
|
280
|
-
Cache-Control:
|
281
|
-
- private, max-age=60, s-maxage=60
|
282
|
-
Vary:
|
283
|
-
- Accept, Authorization, Cookie, X-GitHub-OTP
|
284
|
-
- Accept-Encoding
|
285
|
-
Etag:
|
286
|
-
- '"ed992de3605511d4d93bfd55ab933696"'
|
287
|
-
X-Oauth-Scopes:
|
288
|
-
- public_repo
|
289
|
-
X-Accepted-Oauth-Scopes:
|
290
|
-
- ''
|
291
|
-
Location:
|
292
|
-
- https://api.github.com/repos/txgh-bot/txgh-test-resources/git/blobs/540a3d944ac19f573e756de687c8c4f3f9847b53
|
293
|
-
X-Github-Media-Type:
|
294
|
-
- github.v3; format=json
|
295
|
-
Access-Control-Expose-Headers:
|
296
|
-
- ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
|
297
|
-
X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
298
|
-
Access-Control-Allow-Origin:
|
299
|
-
- "*"
|
300
|
-
Content-Security-Policy:
|
301
|
-
- default-src 'none'
|
302
|
-
Strict-Transport-Security:
|
303
|
-
- max-age=31536000; includeSubdomains; preload
|
304
|
-
X-Content-Type-Options:
|
305
|
-
- nosniff
|
306
|
-
X-Frame-Options:
|
307
|
-
- deny
|
308
|
-
X-Xss-Protection:
|
309
|
-
- 1; mode=block
|
310
|
-
X-Served-By:
|
311
|
-
- 7b641bda7ec2ca7cd9df72d2578baf75
|
312
|
-
X-Github-Request-Id:
|
313
|
-
- 438EEBFC:76D7:19A400E9:572386A1
|
314
|
-
body:
|
315
|
-
encoding: UTF-8
|
316
|
-
string: '{"sha":"540a3d944ac19f573e756de687c8c4f3f9847b53","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/blobs/540a3d944ac19f573e756de687c8c4f3f9847b53"}'
|
317
|
-
http_version:
|
318
|
-
recorded_at: Fri, 29 Apr 2016 16:07:01 GMT
|
319
|
-
- request:
|
320
|
-
method: post
|
321
|
-
uri: https://api.github.com/repos/txgh-bot/txgh-test-resources/git/trees
|
322
|
-
body:
|
323
|
-
encoding: UTF-8
|
324
|
-
string: '{"base_tree":"fb0bb964adae138921edd29647d100350a0a25d0","tree":[{"path":"translations/el_GR/sample.po","mode":"100644","type":"blob","sha":"540a3d944ac19f573e756de687c8c4f3f9847b53"}]}'
|
325
|
-
headers:
|
326
|
-
Accept:
|
327
|
-
- application/vnd.github.v3+json
|
328
|
-
User-Agent:
|
329
|
-
- Octokit Ruby Gem 4.3.0
|
330
|
-
Content-Type:
|
331
|
-
- application/json
|
332
|
-
Authorization:
|
333
|
-
- token <GITHUB_TOKEN>
|
334
|
-
Accept-Encoding:
|
335
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
336
|
-
response:
|
337
|
-
status:
|
338
|
-
code: 201
|
339
|
-
message: Created
|
340
|
-
headers:
|
341
|
-
Server:
|
342
|
-
- GitHub.com
|
343
|
-
Date:
|
344
|
-
- Fri, 29 Apr 2016 16:07:05 GMT
|
345
|
-
Content-Type:
|
346
|
-
- application/json; charset=utf-8
|
347
|
-
Content-Length:
|
348
|
-
- '1323'
|
349
|
-
Status:
|
350
|
-
- 201 Created
|
351
|
-
X-Ratelimit-Limit:
|
352
|
-
- '5000'
|
353
|
-
X-Ratelimit-Remaining:
|
354
|
-
- '4985'
|
355
|
-
X-Ratelimit-Reset:
|
356
|
-
- '1461949570'
|
357
|
-
Cache-Control:
|
358
|
-
- private, max-age=60, s-maxage=60
|
359
|
-
Vary:
|
360
|
-
- Accept, Authorization, Cookie, X-GitHub-OTP
|
361
|
-
- Accept-Encoding
|
362
|
-
Etag:
|
363
|
-
- '"ee25b6150834713923850d7c815c3c39"'
|
364
|
-
X-Oauth-Scopes:
|
365
|
-
- public_repo
|
366
|
-
X-Accepted-Oauth-Scopes:
|
367
|
-
- ''
|
368
|
-
Location:
|
369
|
-
- https://api.github.com/repos/txgh-bot/txgh-test-resources/git/trees/fb0bb964adae138921edd29647d100350a0a25d0
|
370
|
-
X-Github-Media-Type:
|
371
|
-
- github.v3; format=json
|
372
|
-
Access-Control-Expose-Headers:
|
373
|
-
- ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
|
374
|
-
X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
375
|
-
Access-Control-Allow-Origin:
|
376
|
-
- "*"
|
377
|
-
Content-Security-Policy:
|
378
|
-
- default-src 'none'
|
379
|
-
Strict-Transport-Security:
|
380
|
-
- max-age=31536000; includeSubdomains; preload
|
381
|
-
X-Content-Type-Options:
|
382
|
-
- nosniff
|
383
|
-
X-Frame-Options:
|
384
|
-
- deny
|
385
|
-
X-Xss-Protection:
|
386
|
-
- 1; mode=block
|
387
|
-
X-Served-By:
|
388
|
-
- 07ff1c8a09e44b62e277fae50a1b1dc4
|
389
|
-
X-Github-Request-Id:
|
390
|
-
- 438EEBFC:76D5:248FA4A1:572386A5
|
391
|
-
body:
|
392
|
-
encoding: UTF-8
|
393
|
-
string: '{"sha":"fb0bb964adae138921edd29647d100350a0a25d0","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/trees/fb0bb964adae138921edd29647d100350a0a25d0","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":"test.yml","mode":"100644","type":"blob","sha":"7f2c77eec6692bc2ef95f7a7baede6e84179fe1d","size":44,"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/blobs/7f2c77eec6692bc2ef95f7a7baede6e84179fe1d"},{"path":"translations","mode":"040000","type":"tree","sha":"64881902c6515e26c22e022abc0bedeaa15eafdc","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/trees/64881902c6515e26c22e022abc0bedeaa15eafdc"},{"path":"tx.config","mode":"100644","type":"blob","sha":"294be94dbb8d1d2ae6d30c51869912ff3a0d9e40","size":295,"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/blobs/294be94dbb8d1d2ae6d30c51869912ff3a0d9e40"}],"truncated":false}'
|
394
|
-
http_version:
|
395
|
-
recorded_at: Fri, 29 Apr 2016 16:07:06 GMT
|
396
|
-
- request:
|
397
|
-
method: post
|
398
|
-
uri: https://api.github.com/repos/txgh-bot/txgh-test-resources/git/commits
|
399
|
-
body:
|
400
|
-
encoding: UTF-8
|
401
|
-
string: '{"message":"Updating translations for translations/el_GR/sample.po","tree":"fb0bb964adae138921edd29647d100350a0a25d0","parents":["f3edb21f027b70974750649ba29b0090e410ecde"]}'
|
402
|
-
headers:
|
403
|
-
Accept:
|
404
|
-
- application/vnd.github.v3+json
|
405
|
-
User-Agent:
|
406
|
-
- Octokit Ruby Gem 4.3.0
|
407
|
-
Content-Type:
|
408
|
-
- application/json
|
409
|
-
Authorization:
|
410
|
-
- token <GITHUB_TOKEN>
|
411
|
-
Accept-Encoding:
|
412
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
413
|
-
response:
|
414
|
-
status:
|
415
|
-
code: 201
|
416
|
-
message: Created
|
417
|
-
headers:
|
418
|
-
Server:
|
419
|
-
- GitHub.com
|
420
|
-
Date:
|
421
|
-
- Fri, 29 Apr 2016 16:07:09 GMT
|
422
|
-
Content-Type:
|
423
|
-
- application/json; charset=utf-8
|
424
|
-
Content-Length:
|
425
|
-
- '990'
|
426
|
-
Status:
|
427
|
-
- 201 Created
|
428
|
-
X-Ratelimit-Limit:
|
429
|
-
- '5000'
|
430
|
-
X-Ratelimit-Remaining:
|
431
|
-
- '4984'
|
432
|
-
X-Ratelimit-Reset:
|
433
|
-
- '1461949570'
|
434
|
-
Cache-Control:
|
435
|
-
- private, max-age=60, s-maxage=60
|
436
|
-
Vary:
|
437
|
-
- Accept, Authorization, Cookie, X-GitHub-OTP
|
438
|
-
- Accept-Encoding
|
439
|
-
Etag:
|
440
|
-
- '"2b5680dc5bfdac9282ee911424290f33"'
|
441
|
-
X-Oauth-Scopes:
|
442
|
-
- public_repo
|
443
|
-
X-Accepted-Oauth-Scopes:
|
444
|
-
- ''
|
445
|
-
Location:
|
446
|
-
- https://api.github.com/repos/txgh-bot/txgh-test-resources/git/commits/239f32750810ac8f366f0e81dc9f59e12e467dbd
|
447
|
-
X-Github-Media-Type:
|
448
|
-
- github.v3; format=json
|
449
|
-
Access-Control-Expose-Headers:
|
450
|
-
- ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
|
451
|
-
X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
452
|
-
Access-Control-Allow-Origin:
|
453
|
-
- "*"
|
454
|
-
Content-Security-Policy:
|
455
|
-
- default-src 'none'
|
456
|
-
Strict-Transport-Security:
|
457
|
-
- max-age=31536000; includeSubdomains; preload
|
458
|
-
X-Content-Type-Options:
|
459
|
-
- nosniff
|
460
|
-
X-Frame-Options:
|
461
|
-
- deny
|
462
|
-
X-Xss-Protection:
|
463
|
-
- 1; mode=block
|
464
|
-
X-Served-By:
|
465
|
-
- a474937f3b2fa272558fa6dc951018ad
|
466
|
-
X-Github-Request-Id:
|
467
|
-
- 438EEBFC:76D0:74E0358:572386AB
|
468
|
-
body:
|
469
|
-
encoding: UTF-8
|
470
|
-
string: '{"sha":"239f32750810ac8f366f0e81dc9f59e12e467dbd","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/commits/239f32750810ac8f366f0e81dc9f59e12e467dbd","html_url":"https://github.com/txgh-bot/txgh-test-resources/commit/239f32750810ac8f366f0e81dc9f59e12e467dbd","author":{"name":"txgh-bot","email":"txgh.bot@gmail.com","date":"2016-04-29T16:07:09Z"},"committer":{"name":"txgh-bot","email":"txgh.bot@gmail.com","date":"2016-04-29T16:07:09Z"},"tree":{"sha":"fb0bb964adae138921edd29647d100350a0a25d0","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/trees/fb0bb964adae138921edd29647d100350a0a25d0"},"message":"Updating
|
471
|
-
translations for translations/el_GR/sample.po","parents":[{"sha":"f3edb21f027b70974750649ba29b0090e410ecde","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/commits/f3edb21f027b70974750649ba29b0090e410ecde","html_url":"https://github.com/txgh-bot/txgh-test-resources/commit/f3edb21f027b70974750649ba29b0090e410ecde"}]}'
|
472
|
-
http_version:
|
473
|
-
recorded_at: Fri, 29 Apr 2016 16:07:10 GMT
|
474
|
-
- request:
|
475
|
-
method: get
|
476
|
-
uri: https://api.github.com/repos/txgh-bot/txgh-test-resources/compare/f3edb21f027b70974750649ba29b0090e410ecde...239f32750810ac8f366f0e81dc9f59e12e467dbd
|
477
|
-
body:
|
478
|
-
encoding: US-ASCII
|
479
|
-
string: ''
|
480
|
-
headers:
|
481
|
-
Accept:
|
482
|
-
- application/vnd.github.v3+json
|
483
|
-
User-Agent:
|
484
|
-
- Octokit Ruby Gem 4.3.0
|
485
|
-
Content-Type:
|
486
|
-
- application/json
|
487
|
-
Authorization:
|
488
|
-
- token <GITHUB_TOKEN>
|
489
|
-
Accept-Encoding:
|
490
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
491
|
-
response:
|
492
|
-
status:
|
493
|
-
code: 200
|
494
|
-
message: OK
|
495
|
-
headers:
|
496
|
-
Server:
|
497
|
-
- GitHub.com
|
498
|
-
Date:
|
499
|
-
- Fri, 29 Apr 2016 16:07:13 GMT
|
500
|
-
Content-Type:
|
501
|
-
- application/json; charset=utf-8
|
502
|
-
Transfer-Encoding:
|
503
|
-
- chunked
|
504
|
-
Status:
|
505
|
-
- 200 OK
|
506
|
-
X-Ratelimit-Limit:
|
507
|
-
- '5000'
|
508
|
-
X-Ratelimit-Remaining:
|
509
|
-
- '4983'
|
510
|
-
X-Ratelimit-Reset:
|
511
|
-
- '1461949570'
|
512
|
-
Cache-Control:
|
513
|
-
- private, max-age=60, s-maxage=60
|
514
|
-
Vary:
|
515
|
-
- Accept, Authorization, Cookie, X-GitHub-OTP
|
516
|
-
- Accept-Encoding
|
517
|
-
Etag:
|
518
|
-
- W/"f26d4497b0d6852e8df96aacb42ed451"
|
519
|
-
Last-Modified:
|
520
|
-
- Fri, 29 Apr 2016 16:07:09 GMT
|
521
|
-
X-Oauth-Scopes:
|
522
|
-
- public_repo
|
523
|
-
X-Accepted-Oauth-Scopes:
|
524
|
-
- ''
|
525
|
-
X-Github-Media-Type:
|
526
|
-
- github.v3; format=json
|
527
|
-
Access-Control-Expose-Headers:
|
528
|
-
- ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
|
529
|
-
X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
530
|
-
Access-Control-Allow-Origin:
|
531
|
-
- "*"
|
532
|
-
Content-Security-Policy:
|
533
|
-
- default-src 'none'
|
534
|
-
Strict-Transport-Security:
|
535
|
-
- max-age=31536000; includeSubdomains; preload
|
536
|
-
X-Content-Type-Options:
|
537
|
-
- nosniff
|
538
|
-
X-Frame-Options:
|
539
|
-
- deny
|
540
|
-
X-Xss-Protection:
|
541
|
-
- 1; mode=block
|
542
|
-
X-Served-By:
|
543
|
-
- 07ff1c8a09e44b62e277fae50a1b1dc4
|
134
|
+
- 593010132f82159af0ded24b4932e109
|
544
135
|
X-Github-Request-Id:
|
545
|
-
-
|
136
|
+
- 6171B7B3:3981:20641D9:5772F4C7
|
546
137
|
body:
|
547
138
|
encoding: UTF-8
|
548
|
-
string: '{"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/
|
549
|
-
translations for translations/el_GR/sample.po","tree":{"sha":"fb0bb964adae138921edd29647d100350a0a25d0","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/trees/fb0bb964adae138921edd29647d100350a0a25d0"},"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/commits/f3edb21f027b70974750649ba29b0090e410ecde","comment_count":0},"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/commits/f3edb21f027b70974750649ba29b0090e410ecde","html_url":"https://github.com/txgh-bot/txgh-test-resources/commit/f3edb21f027b70974750649ba29b0090e410ecde","comments_url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/commits/f3edb21f027b70974750649ba29b0090e410ecde/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":"89275cd4a7b4f36f00282689610cec9b2a970834","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/commits/89275cd4a7b4f36f00282689610cec9b2a970834","html_url":"https://github.com/txgh-bot/txgh-test-resources/commit/89275cd4a7b4f36f00282689610cec9b2a970834"}]},"merge_base_commit":{"sha":"f3edb21f027b70974750649ba29b0090e410ecde","commit":{"author":{"name":"txgh-bot","email":"txgh.bot@gmail.com","date":"2016-04-27T17:33:49Z"},"committer":{"name":"txgh-bot","email":"txgh.bot@gmail.com","date":"2016-04-27T17:33:49Z"},"message":"Updating
|
550
|
-
translations for translations/el_GR/sample.po","tree":{"sha":"fb0bb964adae138921edd29647d100350a0a25d0","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/trees/fb0bb964adae138921edd29647d100350a0a25d0"},"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/commits/f3edb21f027b70974750649ba29b0090e410ecde","comment_count":0},"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/commits/f3edb21f027b70974750649ba29b0090e410ecde","html_url":"https://github.com/txgh-bot/txgh-test-resources/commit/f3edb21f027b70974750649ba29b0090e410ecde","comments_url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/commits/f3edb21f027b70974750649ba29b0090e410ecde/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":"89275cd4a7b4f36f00282689610cec9b2a970834","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/commits/89275cd4a7b4f36f00282689610cec9b2a970834","html_url":"https://github.com/txgh-bot/txgh-test-resources/commit/89275cd4a7b4f36f00282689610cec9b2a970834"}]},"status":"ahead","ahead_by":1,"behind_by":0,"total_commits":1,"commits":[{"sha":"239f32750810ac8f366f0e81dc9f59e12e467dbd","commit":{"author":{"name":"txgh-bot","email":"txgh.bot@gmail.com","date":"2016-04-29T16:07:09Z"},"committer":{"name":"txgh-bot","email":"txgh.bot@gmail.com","date":"2016-04-29T16:07:09Z"},"message":"Updating
|
551
|
-
translations for translations/el_GR/sample.po","tree":{"sha":"fb0bb964adae138921edd29647d100350a0a25d0","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/trees/fb0bb964adae138921edd29647d100350a0a25d0"},"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/git/commits/239f32750810ac8f366f0e81dc9f59e12e467dbd","comment_count":0},"url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/commits/239f32750810ac8f366f0e81dc9f59e12e467dbd","html_url":"https://github.com/txgh-bot/txgh-test-resources/commit/239f32750810ac8f366f0e81dc9f59e12e467dbd","comments_url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/commits/239f32750810ac8f366f0e81dc9f59e12e467dbd/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":"f3edb21f027b70974750649ba29b0090e410ecde","url":"https://api.github.com/repos/txgh-bot/txgh-test-resources/commits/f3edb21f027b70974750649ba29b0090e410ecde","html_url":"https://github.com/txgh-bot/txgh-test-resources/commit/f3edb21f027b70974750649ba29b0090e410ecde"}]}],"files":[]}'
|
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"}}'
|
552
140
|
http_version:
|
553
|
-
recorded_at:
|
141
|
+
recorded_at: Tue, 28 Jun 2016 22:06:00 GMT
|
554
142
|
- request:
|
555
143
|
method: get
|
556
144
|
uri: https://api.github.com/repos/txgh-bot/txgh-test-resources/git/refs/heads/master
|
@@ -576,7 +164,7 @@ http_interactions:
|
|
576
164
|
Server:
|
577
165
|
- GitHub.com
|
578
166
|
Date:
|
579
|
-
-
|
167
|
+
- Tue, 28 Jun 2016 22:06:00 GMT
|
580
168
|
Content-Type:
|
581
169
|
- application/json; charset=utf-8
|
582
170
|
Transfer-Encoding:
|
@@ -586,9 +174,9 @@ http_interactions:
|
|
586
174
|
X-Ratelimit-Limit:
|
587
175
|
- '5000'
|
588
176
|
X-Ratelimit-Remaining:
|
589
|
-
- '
|
177
|
+
- '4998'
|
590
178
|
X-Ratelimit-Reset:
|
591
|
-
- '
|
179
|
+
- '1467155159'
|
592
180
|
Cache-Control:
|
593
181
|
- private, max-age=60, s-maxage=60
|
594
182
|
Vary:
|
@@ -622,12 +210,12 @@ http_interactions:
|
|
622
210
|
X-Xss-Protection:
|
623
211
|
- 1; mode=block
|
624
212
|
X-Served-By:
|
625
|
-
-
|
213
|
+
- a30e6f9aa7cf5731b87dfb3b9992202d
|
626
214
|
X-Github-Request-Id:
|
627
|
-
-
|
215
|
+
- 6171B7B3:3986:319BFEC:5772F4C8
|
628
216
|
body:
|
629
217
|
encoding: UTF-8
|
630
218
|
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"}}'
|
631
219
|
http_version:
|
632
|
-
recorded_at:
|
220
|
+
recorded_at: Tue, 28 Jun 2016 22:06:00 GMT
|
633
221
|
recorded_with: VCR 3.0.1
|
@@ -31,7 +31,7 @@ describe ResourceCommitter do
|
|
31
31
|
expect(downloader).to receive(:first).and_return([file_name, :translations])
|
32
32
|
|
33
33
|
expect(github_api).to(
|
34
|
-
receive(:
|
34
|
+
receive(:update_contents).with(
|
35
35
|
repo_name, branch, { file_name => :translations }, commit_message
|
36
36
|
)
|
37
37
|
)
|
data/spec/utils_spec.rb
CHANGED
@@ -35,6 +35,20 @@ describe Utils do
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
+
describe '.relative_branch' do
|
39
|
+
it 'removes tags/ if present' do
|
40
|
+
expect(Utils.relative_branch('tags/foobar')).to eq('foobar')
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'removes heads/ if present' do
|
44
|
+
expect(Utils.relative_branch('heads/foobar')).to eq('foobar')
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'does nothing if no prefix can be removed' do
|
48
|
+
expect(Utils.relative_branch('abcdef')).to eq('abcdef')
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
38
52
|
describe '.is_tag?' do
|
39
53
|
it 'returns true if given a tag' do
|
40
54
|
expect(Utils.is_tag?('tags/foo')).to eq(true)
|
@@ -46,6 +60,14 @@ describe Utils do
|
|
46
60
|
end
|
47
61
|
end
|
48
62
|
|
63
|
+
describe '.git_hash_blob' do
|
64
|
+
it 'calculates the git blob hash for the given string' do
|
65
|
+
expect(Utils.git_hash_blob('foobarbaz')).to eq(
|
66
|
+
'31e446dbb4751d2157c673a88826b3541ae073ea'
|
67
|
+
)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
49
71
|
describe '.index_on' do
|
50
72
|
it 'correctly converts an array of hashes' do
|
51
73
|
arr = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: txgh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.3.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-07-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: abroad
|