txgh 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +202 -0
- data/README.md +64 -0
- data/lib/ext/zipline/output_stream.rb +62 -0
- data/lib/txgh.rb +53 -0
- data/lib/txgh/app.rb +135 -0
- data/lib/txgh/category_support.rb +31 -0
- data/lib/txgh/config.rb +11 -0
- data/lib/txgh/config/config_pair.rb +36 -0
- data/lib/txgh/config/key_manager.rb +54 -0
- data/lib/txgh/config/provider_instance.rb +20 -0
- data/lib/txgh/config/provider_support.rb +26 -0
- data/lib/txgh/config/providers.rb +9 -0
- data/lib/txgh/config/providers/file_provider.rb +19 -0
- data/lib/txgh/config/providers/git_provider.rb +58 -0
- data/lib/txgh/config/providers/raw_provider.rb +19 -0
- data/lib/txgh/config/tx_config.rb +77 -0
- data/lib/txgh/config/tx_manager.rb +15 -0
- data/lib/txgh/diff_calculator.rb +90 -0
- data/lib/txgh/empty_resource_contents.rb +43 -0
- data/lib/txgh/errors.rb +9 -0
- data/lib/txgh/github_api.rb +83 -0
- data/lib/txgh/github_repo.rb +88 -0
- data/lib/txgh/github_request_auth.rb +28 -0
- data/lib/txgh/handlers.rb +12 -0
- data/lib/txgh/handlers/download_handler.rb +84 -0
- data/lib/txgh/handlers/github.rb +10 -0
- data/lib/txgh/handlers/github/delete_handler.rb +65 -0
- data/lib/txgh/handlers/github/handler.rb +20 -0
- data/lib/txgh/handlers/github/push_handler.rb +108 -0
- data/lib/txgh/handlers/github/request_handler.rb +106 -0
- data/lib/txgh/handlers/response.rb +17 -0
- data/lib/txgh/handlers/stream_response.rb +39 -0
- data/lib/txgh/handlers/tgz_stream_response.rb +41 -0
- data/lib/txgh/handlers/transifex.rb +8 -0
- data/lib/txgh/handlers/transifex/hook_handler.rb +77 -0
- data/lib/txgh/handlers/transifex/request_handler.rb +78 -0
- data/lib/txgh/handlers/triggers.rb +9 -0
- data/lib/txgh/handlers/triggers/handler.rb +66 -0
- data/lib/txgh/handlers/triggers/pull_handler.rb +29 -0
- data/lib/txgh/handlers/triggers/push_handler.rb +21 -0
- data/lib/txgh/handlers/zip_stream_response.rb +21 -0
- data/lib/txgh/merge_calculator.rb +74 -0
- data/lib/txgh/parse_config.rb +24 -0
- data/lib/txgh/resource_committer.rb +39 -0
- data/lib/txgh/resource_contents.rb +118 -0
- data/lib/txgh/resource_downloader.rb +141 -0
- data/lib/txgh/resource_updater.rb +104 -0
- data/lib/txgh/response_helpers.rb +30 -0
- data/lib/txgh/transifex_api.rb +165 -0
- data/lib/txgh/transifex_project.rb +37 -0
- data/lib/txgh/transifex_request_auth.rb +53 -0
- data/lib/txgh/tx_branch_resource.rb +59 -0
- data/lib/txgh/tx_logger.rb +12 -0
- data/lib/txgh/tx_resource.rb +66 -0
- data/lib/txgh/utils.rb +44 -0
- data/lib/txgh/version.rb +3 -0
- data/spec/app_spec.rb +346 -0
- data/spec/category_support_spec.rb +43 -0
- data/spec/config/config_pair_spec.rb +47 -0
- data/spec/config/key_manager_spec.rb +48 -0
- data/spec/config/provider_instance_spec.rb +30 -0
- data/spec/config/provider_support_spec.rb +55 -0
- data/spec/config/tx_config_spec.rb +49 -0
- data/spec/config/tx_manager_spec.rb +57 -0
- data/spec/diff_calculator_spec.rb +90 -0
- data/spec/github_api_spec.rb +148 -0
- data/spec/github_repo_spec.rb +178 -0
- data/spec/github_request_auth_spec.rb +39 -0
- data/spec/handlers/download_handler_spec.rb +81 -0
- data/spec/handlers/github/delete_handler_spec.rb +71 -0
- data/spec/handlers/github/push_handler_spec.rb +76 -0
- data/spec/handlers/tgz_stream_response_spec.rb +59 -0
- data/spec/handlers/transifex/hook_handler_spec.rb +115 -0
- data/spec/handlers/zip_stream_response_spec.rb +58 -0
- data/spec/helpers/github_payload_builder.rb +141 -0
- data/spec/helpers/integration_setup.rb +47 -0
- data/spec/helpers/nil_logger.rb +10 -0
- data/spec/helpers/standard_txgh_setup.rb +92 -0
- data/spec/helpers/test_provider.rb +12 -0
- data/spec/integration/cassettes/github_l10n_hook_endpoint.yml +536 -0
- data/spec/integration/cassettes/pull.yml +47 -0
- data/spec/integration/cassettes/push.yml +544 -0
- data/spec/integration/cassettes/transifex_hook_endpoint.yml +560 -0
- data/spec/integration/config/tx.config +10 -0
- data/spec/integration/hooks_spec.rb +158 -0
- data/spec/integration/payloads/github_postbody.json +161 -0
- data/spec/integration/payloads/github_postbody_l10n.json +136 -0
- data/spec/integration/payloads/github_postbody_release.json +136 -0
- data/spec/integration/triggers_spec.rb +45 -0
- data/spec/merge_calculator_spec.rb +112 -0
- data/spec/parse_config_spec.rb +52 -0
- data/spec/resource_committer_spec.rb +42 -0
- data/spec/resource_contents_spec.rb +212 -0
- data/spec/resource_downloader_spec.rb +205 -0
- data/spec/resource_updater_spec.rb +147 -0
- data/spec/spec_helper.rb +32 -0
- data/spec/transifex_api_spec.rb +345 -0
- data/spec/transifex_project_spec.rb +45 -0
- data/spec/transifex_request_auth_spec.rb +39 -0
- data/spec/tx_branch_resource_spec.rb +99 -0
- data/spec/tx_resource_spec.rb +47 -0
- data/spec/utils_spec.rb +58 -0
- data/txgh.gemspec +29 -0
- metadata +296 -0
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'helpers/standard_txgh_setup'
|
3
|
+
|
4
|
+
include Txgh
|
5
|
+
|
6
|
+
describe TransifexProject do
|
7
|
+
include StandardTxghSetup
|
8
|
+
|
9
|
+
describe '#name' do
|
10
|
+
it 'pulls the project name out of the config' do
|
11
|
+
expect(transifex_project.name).to eq(project_name)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe '#protected_branches' do
|
16
|
+
it 'splits the list of branches and expands each one' do
|
17
|
+
project_config['protected_branches'] = 'foo,bar, baz'
|
18
|
+
expect(transifex_project.protected_branches).to eq(
|
19
|
+
%w(heads/foo heads/bar heads/baz)
|
20
|
+
)
|
21
|
+
end
|
22
|
+
|
23
|
+
it "doesn't freak out if protected_branches is nil" do
|
24
|
+
project_config['protected_branches'] = nil
|
25
|
+
expect(transifex_project.protected_branches).to eq([])
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe '#auto_delete_resources' do
|
30
|
+
it 'returns false by default' do
|
31
|
+
project_config['auto_delete_resources'] = nil
|
32
|
+
expect(transifex_project.auto_delete_resources?).to eq(false)
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'returns true if configured' do
|
36
|
+
project_config['auto_delete_resources'] = 'true'
|
37
|
+
expect(transifex_project.auto_delete_resources?).to eq(true)
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'handles inconsistent casing' do
|
41
|
+
project_config['auto_delete_resources'] = 'tRuE'
|
42
|
+
expect(transifex_project.auto_delete_resources?).to eq(true)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'rack'
|
3
|
+
|
4
|
+
include Txgh
|
5
|
+
|
6
|
+
describe TransifexRequestAuth do
|
7
|
+
let(:secret) { 'abc123' }
|
8
|
+
let(:params) { 'param1=value1¶m2=value2¶m3=123' }
|
9
|
+
let(:valid_signature) { 'pXucIcivBezpfNgCGTHKYeDve84=' }
|
10
|
+
|
11
|
+
describe '.authentic_request?' do
|
12
|
+
it 'returns true if the request is signed correctly' do
|
13
|
+
request = Rack::Request.new(
|
14
|
+
TransifexRequestAuth::RACK_HEADER => valid_signature,
|
15
|
+
'rack.input' => StringIO.new(params)
|
16
|
+
)
|
17
|
+
|
18
|
+
authentic = TransifexRequestAuth.authentic_request?(request, secret)
|
19
|
+
expect(authentic).to eq(true)
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'returns false if the request is not signed correctly' do
|
23
|
+
request = Rack::Request.new(
|
24
|
+
TransifexRequestAuth::RACK_HEADER => 'incorrect',
|
25
|
+
'rack.input' => StringIO.new(params)
|
26
|
+
)
|
27
|
+
|
28
|
+
authentic = TransifexRequestAuth.authentic_request?(request, secret)
|
29
|
+
expect(authentic).to eq(false)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
describe '.header' do
|
34
|
+
it 'calculates the signature and formats it as an http header' do
|
35
|
+
value = TransifexRequestAuth.header_value(params, secret)
|
36
|
+
expect(value).to eq(valid_signature)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
include Txgh
|
4
|
+
|
5
|
+
describe TxBranchResource do
|
6
|
+
let(:resource_slug) { 'resource_slug' }
|
7
|
+
let(:resource_slug_with_branch) { "#{resource_slug}-heads_my_branch" }
|
8
|
+
let(:project_slug) { 'project_slug' }
|
9
|
+
let(:branch) { 'heads/my_branch' }
|
10
|
+
|
11
|
+
let(:api) { :api }
|
12
|
+
let(:config) { { name: project_slug } }
|
13
|
+
let(:resources) { [base_resource] }
|
14
|
+
|
15
|
+
let(:tx_config) do
|
16
|
+
TxConfig.new(resources, {})
|
17
|
+
end
|
18
|
+
|
19
|
+
let(:base_resource) do
|
20
|
+
TxResource.new(
|
21
|
+
project_slug, resource_slug, 'type', 'source_lang', 'source_file',
|
22
|
+
'ko-KR:ko', 'translation_file'
|
23
|
+
)
|
24
|
+
end
|
25
|
+
|
26
|
+
describe '.find' do
|
27
|
+
it 'finds the correct resource when the suffix is included in the slug' do
|
28
|
+
resource = TxBranchResource.find(tx_config, resource_slug_with_branch, branch)
|
29
|
+
expect(resource).to be_a(TxBranchResource)
|
30
|
+
expect(resource.resource).to eq(base_resource)
|
31
|
+
expect(resource.branch).to eq(branch)
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'finds the correct resource if no suffix is included in the slug' do
|
35
|
+
resource = TxBranchResource.find(tx_config, resource_slug, branch)
|
36
|
+
expect(resource).to be_a(TxBranchResource)
|
37
|
+
expect(resource.resource).to eq(base_resource)
|
38
|
+
expect(resource.branch).to eq(branch)
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'returns nil if no resource matches' do
|
42
|
+
resource = TxBranchResource.find(tx_config, 'foobar', branch)
|
43
|
+
expect(resource).to be_nil
|
44
|
+
|
45
|
+
resource = TxBranchResource.find(tx_config, resource_slug_with_branch, 'foobar')
|
46
|
+
expect(resource).to be_nil
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
describe '.deslugify' do
|
51
|
+
it 'removes the branch suffix from the resource slug' do
|
52
|
+
result = TxBranchResource.deslugify(resource_slug_with_branch, branch)
|
53
|
+
expect(result).to eq(resource_slug)
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'hands back the original slug if no suffix' do
|
57
|
+
result = TxBranchResource.deslugify(resource_slug, branch)
|
58
|
+
expect(result).to eq(resource_slug)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
context 'with a resource' do
|
63
|
+
let(:resource) do
|
64
|
+
TxBranchResource.new(base_resource, branch)
|
65
|
+
end
|
66
|
+
|
67
|
+
describe '#resource_slug' do
|
68
|
+
it 'adds the branch name to the resource slug' do
|
69
|
+
expect(resource.resource.resource_slug).to eq(resource_slug)
|
70
|
+
expect(resource.resource_slug).to eq(resource_slug_with_branch)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
describe '#slugs' do
|
75
|
+
it 'ensures the project slug contains the branch name' do
|
76
|
+
expect(resource.slugs).to eq([project_slug, resource_slug_with_branch])
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
describe '#to_h' do
|
81
|
+
it 'converts the resource into a hash' do
|
82
|
+
expect(resource.to_h).to eq(
|
83
|
+
project_slug: project_slug,
|
84
|
+
resource_slug: resource_slug_with_branch,
|
85
|
+
type: 'type',
|
86
|
+
source_lang: 'source_lang',
|
87
|
+
source_file: 'source_file',
|
88
|
+
translation_file: 'translation_file'
|
89
|
+
)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
describe '#original_resource_slug' do
|
94
|
+
it 'returns the base slug, i.e. without the branch' do
|
95
|
+
expect(resource.original_resource_slug).to eq(resource_slug)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
include Txgh
|
4
|
+
|
5
|
+
describe TxResource do
|
6
|
+
let(:resource) do
|
7
|
+
TxResource.new(
|
8
|
+
'project_slug', 'resource_slug', 'type',
|
9
|
+
'source_lang', 'source_file', 'ko-KR:ko', 'translation_file'
|
10
|
+
)
|
11
|
+
end
|
12
|
+
|
13
|
+
describe '#L10N_resource_slug' do
|
14
|
+
it 'appends L10N to the resource slug' do
|
15
|
+
expect(resource.L10N_resource_slug).to eq("L10Nresource_slug")
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe '#lang_map' do
|
20
|
+
it 'converts the given language if a mapping exists for it' do
|
21
|
+
expect(resource.lang_map('ko-KR')).to eq('ko')
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'does not perform any conversion if no mapping exists for the given language' do
|
25
|
+
expect(resource.lang_map('foo')).to eq('foo')
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe '#slugs' do
|
30
|
+
it 'returns an array containing the project and resource slugs' do
|
31
|
+
expect(resource.slugs).to eq(%w(project_slug resource_slug))
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe '#to_h' do
|
36
|
+
it 'converts the resource into a hash' do
|
37
|
+
expect(resource.to_h).to eq(
|
38
|
+
project_slug: 'project_slug',
|
39
|
+
resource_slug: 'resource_slug',
|
40
|
+
type: 'type',
|
41
|
+
source_lang: 'source_lang',
|
42
|
+
source_file: 'source_file',
|
43
|
+
translation_file: 'translation_file'
|
44
|
+
)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
data/spec/utils_spec.rb
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
include Txgh
|
4
|
+
|
5
|
+
describe Utils do
|
6
|
+
describe '.slugify' do
|
7
|
+
it 'correctly slugifies a string with slashes' do
|
8
|
+
expect(Utils.slugify('abc/def/ghi')).to eq('abc_def_ghi')
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'does not replace underscores' do
|
12
|
+
expect(Utils.slugify('abc_def/ghi')).to eq('abc_def_ghi')
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe '.absolute_branch' do
|
17
|
+
it 'does not modify tags' do
|
18
|
+
expect(Utils.absolute_branch('tags/foo')).to eq('tags/foo')
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'does not modify heads' do
|
22
|
+
expect(Utils.absolute_branch('heads/foo')).to eq('heads/foo')
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'prefixes heads/ to bare branch names' do
|
26
|
+
expect(Utils.absolute_branch('foo')).to eq('heads/foo')
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'handles a nil branch' do
|
30
|
+
expect(Utils.absolute_branch(nil)).to eq(nil)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe '.is_tag?' do
|
35
|
+
it 'returns true if given a tag' do
|
36
|
+
expect(Utils.is_tag?('tags/foo')).to eq(true)
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'returns false if not given a tag' do
|
40
|
+
expect(Utils.is_tag?('heads/foo')).to eq(false)
|
41
|
+
expect(Utils.is_tag?('foo')).to eq(false)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe '.index_on' do
|
46
|
+
it 'correctly converts an array of hashes' do
|
47
|
+
arr = [
|
48
|
+
{ 'name' => 'Jean Luc Picard', 'starship' => 'Enterprise' },
|
49
|
+
{ 'name' => 'Kathryn Janeway', 'starship' => 'Voyager' }
|
50
|
+
]
|
51
|
+
|
52
|
+
expect(Utils.index_on('starship', arr)).to eq({
|
53
|
+
'Enterprise' => { 'name' => 'Jean Luc Picard', 'starship' => 'Enterprise' },
|
54
|
+
'Voyager' => { 'name' => 'Kathryn Janeway', 'starship' => 'Voyager' }
|
55
|
+
})
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
data/txgh.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), 'lib')
|
2
|
+
require 'txgh/version'
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = 'txgh'
|
6
|
+
s.version = ::Txgh::VERSION
|
7
|
+
s.authors = ['Matthew Jackowski', 'Cameron Dutro']
|
8
|
+
s.email = ['mattjjacko@gmail.com', 'camertron@gmail.com']
|
9
|
+
s.homepage = "https://github.com/transifex/txgh"
|
10
|
+
|
11
|
+
s.description = s.summary = 'A server that automatically syncs translation resources between Github and Transifex.'
|
12
|
+
|
13
|
+
s.platform = Gem::Platform::RUBY
|
14
|
+
s.has_rdoc = true
|
15
|
+
|
16
|
+
s.add_dependency 'abroad', '~> 1.0'
|
17
|
+
s.add_dependency 'faraday', '~> 0.9'
|
18
|
+
s.add_dependency 'faraday_middleware', '~> 0.10'
|
19
|
+
s.add_dependency 'json', '~> 1.8'
|
20
|
+
s.add_dependency 'mime-types', '~> 2.0'
|
21
|
+
s.add_dependency 'octokit', '~> 4.2'
|
22
|
+
s.add_dependency 'parseconfig', '~> 1.0'
|
23
|
+
s.add_dependency 'sinatra', '~> 1.4'
|
24
|
+
s.add_dependency 'sinatra-contrib', '~> 1.4'
|
25
|
+
s.add_dependency 'rubyzip', '>= 1.0', '<= 1.1.2'
|
26
|
+
|
27
|
+
s.require_path = 'lib'
|
28
|
+
s.files = Dir['{lib,spec}/**/*', 'README.md', 'txgh.gemspec', 'LICENSE']
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,296 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: txgh
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Matthew Jackowski
|
8
|
+
- Cameron Dutro
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2016-04-06 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: abroad
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '1.0'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '1.0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: faraday
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0.9'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0.9'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: faraday_middleware
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0.10'
|
49
|
+
type: :runtime
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0.10'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: json
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '1.8'
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '1.8'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: mime-types
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '2.0'
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '2.0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: octokit
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - "~>"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '4.2'
|
91
|
+
type: :runtime
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - "~>"
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '4.2'
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: parseconfig
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - "~>"
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '1.0'
|
105
|
+
type: :runtime
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - "~>"
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '1.0'
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: sinatra
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - "~>"
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '1.4'
|
119
|
+
type: :runtime
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - "~>"
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '1.4'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: sinatra-contrib
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - "~>"
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '1.4'
|
133
|
+
type: :runtime
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - "~>"
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '1.4'
|
140
|
+
- !ruby/object:Gem::Dependency
|
141
|
+
name: rubyzip
|
142
|
+
requirement: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '1.0'
|
147
|
+
- - "<="
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: 1.1.2
|
150
|
+
type: :runtime
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
requirements:
|
154
|
+
- - ">="
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '1.0'
|
157
|
+
- - "<="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 1.1.2
|
160
|
+
description: A server that automatically syncs translation resources between Github
|
161
|
+
and Transifex.
|
162
|
+
email:
|
163
|
+
- mattjjacko@gmail.com
|
164
|
+
- camertron@gmail.com
|
165
|
+
executables: []
|
166
|
+
extensions: []
|
167
|
+
extra_rdoc_files: []
|
168
|
+
files:
|
169
|
+
- LICENSE
|
170
|
+
- README.md
|
171
|
+
- lib/ext/zipline/output_stream.rb
|
172
|
+
- lib/txgh.rb
|
173
|
+
- lib/txgh/app.rb
|
174
|
+
- lib/txgh/category_support.rb
|
175
|
+
- lib/txgh/config.rb
|
176
|
+
- lib/txgh/config/config_pair.rb
|
177
|
+
- lib/txgh/config/key_manager.rb
|
178
|
+
- lib/txgh/config/provider_instance.rb
|
179
|
+
- lib/txgh/config/provider_support.rb
|
180
|
+
- lib/txgh/config/providers.rb
|
181
|
+
- lib/txgh/config/providers/file_provider.rb
|
182
|
+
- lib/txgh/config/providers/git_provider.rb
|
183
|
+
- lib/txgh/config/providers/raw_provider.rb
|
184
|
+
- lib/txgh/config/tx_config.rb
|
185
|
+
- lib/txgh/config/tx_manager.rb
|
186
|
+
- lib/txgh/diff_calculator.rb
|
187
|
+
- lib/txgh/empty_resource_contents.rb
|
188
|
+
- lib/txgh/errors.rb
|
189
|
+
- lib/txgh/github_api.rb
|
190
|
+
- lib/txgh/github_repo.rb
|
191
|
+
- lib/txgh/github_request_auth.rb
|
192
|
+
- lib/txgh/handlers.rb
|
193
|
+
- lib/txgh/handlers/download_handler.rb
|
194
|
+
- lib/txgh/handlers/github.rb
|
195
|
+
- lib/txgh/handlers/github/delete_handler.rb
|
196
|
+
- lib/txgh/handlers/github/handler.rb
|
197
|
+
- lib/txgh/handlers/github/push_handler.rb
|
198
|
+
- lib/txgh/handlers/github/request_handler.rb
|
199
|
+
- lib/txgh/handlers/response.rb
|
200
|
+
- lib/txgh/handlers/stream_response.rb
|
201
|
+
- lib/txgh/handlers/tgz_stream_response.rb
|
202
|
+
- lib/txgh/handlers/transifex.rb
|
203
|
+
- lib/txgh/handlers/transifex/hook_handler.rb
|
204
|
+
- lib/txgh/handlers/transifex/request_handler.rb
|
205
|
+
- lib/txgh/handlers/triggers.rb
|
206
|
+
- lib/txgh/handlers/triggers/handler.rb
|
207
|
+
- lib/txgh/handlers/triggers/pull_handler.rb
|
208
|
+
- lib/txgh/handlers/triggers/push_handler.rb
|
209
|
+
- lib/txgh/handlers/zip_stream_response.rb
|
210
|
+
- lib/txgh/merge_calculator.rb
|
211
|
+
- lib/txgh/parse_config.rb
|
212
|
+
- lib/txgh/resource_committer.rb
|
213
|
+
- lib/txgh/resource_contents.rb
|
214
|
+
- lib/txgh/resource_downloader.rb
|
215
|
+
- lib/txgh/resource_updater.rb
|
216
|
+
- lib/txgh/response_helpers.rb
|
217
|
+
- lib/txgh/transifex_api.rb
|
218
|
+
- lib/txgh/transifex_project.rb
|
219
|
+
- lib/txgh/transifex_request_auth.rb
|
220
|
+
- lib/txgh/tx_branch_resource.rb
|
221
|
+
- lib/txgh/tx_logger.rb
|
222
|
+
- lib/txgh/tx_resource.rb
|
223
|
+
- lib/txgh/utils.rb
|
224
|
+
- lib/txgh/version.rb
|
225
|
+
- spec/app_spec.rb
|
226
|
+
- spec/category_support_spec.rb
|
227
|
+
- spec/config/config_pair_spec.rb
|
228
|
+
- spec/config/key_manager_spec.rb
|
229
|
+
- spec/config/provider_instance_spec.rb
|
230
|
+
- spec/config/provider_support_spec.rb
|
231
|
+
- spec/config/tx_config_spec.rb
|
232
|
+
- spec/config/tx_manager_spec.rb
|
233
|
+
- spec/diff_calculator_spec.rb
|
234
|
+
- spec/github_api_spec.rb
|
235
|
+
- spec/github_repo_spec.rb
|
236
|
+
- spec/github_request_auth_spec.rb
|
237
|
+
- spec/handlers/download_handler_spec.rb
|
238
|
+
- spec/handlers/github/delete_handler_spec.rb
|
239
|
+
- spec/handlers/github/push_handler_spec.rb
|
240
|
+
- spec/handlers/tgz_stream_response_spec.rb
|
241
|
+
- spec/handlers/transifex/hook_handler_spec.rb
|
242
|
+
- spec/handlers/zip_stream_response_spec.rb
|
243
|
+
- spec/helpers/github_payload_builder.rb
|
244
|
+
- spec/helpers/integration_setup.rb
|
245
|
+
- spec/helpers/nil_logger.rb
|
246
|
+
- spec/helpers/standard_txgh_setup.rb
|
247
|
+
- spec/helpers/test_provider.rb
|
248
|
+
- spec/integration/cassettes/github_l10n_hook_endpoint.yml
|
249
|
+
- spec/integration/cassettes/pull.yml
|
250
|
+
- spec/integration/cassettes/push.yml
|
251
|
+
- spec/integration/cassettes/transifex_hook_endpoint.yml
|
252
|
+
- spec/integration/config/tx.config
|
253
|
+
- spec/integration/hooks_spec.rb
|
254
|
+
- spec/integration/payloads/github_postbody.json
|
255
|
+
- spec/integration/payloads/github_postbody_l10n.json
|
256
|
+
- spec/integration/payloads/github_postbody_release.json
|
257
|
+
- spec/integration/triggers_spec.rb
|
258
|
+
- spec/merge_calculator_spec.rb
|
259
|
+
- spec/parse_config_spec.rb
|
260
|
+
- spec/resource_committer_spec.rb
|
261
|
+
- spec/resource_contents_spec.rb
|
262
|
+
- spec/resource_downloader_spec.rb
|
263
|
+
- spec/resource_updater_spec.rb
|
264
|
+
- spec/spec_helper.rb
|
265
|
+
- spec/transifex_api_spec.rb
|
266
|
+
- spec/transifex_project_spec.rb
|
267
|
+
- spec/transifex_request_auth_spec.rb
|
268
|
+
- spec/tx_branch_resource_spec.rb
|
269
|
+
- spec/tx_resource_spec.rb
|
270
|
+
- spec/utils_spec.rb
|
271
|
+
- txgh.gemspec
|
272
|
+
homepage: https://github.com/transifex/txgh
|
273
|
+
licenses: []
|
274
|
+
metadata: {}
|
275
|
+
post_install_message:
|
276
|
+
rdoc_options: []
|
277
|
+
require_paths:
|
278
|
+
- lib
|
279
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
280
|
+
requirements:
|
281
|
+
- - ">="
|
282
|
+
- !ruby/object:Gem::Version
|
283
|
+
version: '0'
|
284
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
285
|
+
requirements:
|
286
|
+
- - ">="
|
287
|
+
- !ruby/object:Gem::Version
|
288
|
+
version: '0'
|
289
|
+
requirements: []
|
290
|
+
rubyforge_project:
|
291
|
+
rubygems_version: 2.2.3
|
292
|
+
signing_key:
|
293
|
+
specification_version: 4
|
294
|
+
summary: A server that automatically syncs translation resources between Github and
|
295
|
+
Transifex.
|
296
|
+
test_files: []
|