txgh 7.0.3.beta3 → 7.0.3.beta4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ddb70a73202419003bba2aeda693a5a704be5b88980c29da7a082cb1f3263162
4
- data.tar.gz: 302e2a9608de1fb9f09ca065cdf15aa84c49319c6ac0c9660cf05a0491479e85
3
+ metadata.gz: 48e0eadcdb6ad07122b1373f84e39dbc8d219ae3cd2000c85cbdcd901ef4cd62
4
+ data.tar.gz: ee74522f8b4b97b0f0a2fd83a032e3f8a8734afb9f57e004d5dd7be4ffbccd36
5
5
  SHA512:
6
- metadata.gz: 1d9fd68fe5103f5ff3b6e7754bfd175b593878dfcfe72a785e059bb38a8254bc2402d8f08db6743a7992c06890d55cdcb6f3728d7fbdce3ec4b7ecf9b06d87ce
7
- data.tar.gz: f22f1e1c1ec3ce35737f96b17b0b77cf488be246f255c26a6377352e5c8138bcf92cb45d07ceb7d559d0462206ae70a87c0d4203a41b93cd012804ab62e4b479
6
+ metadata.gz: 8bfa277f9876adccb9bbbe8c01576bc08ed4294054afb522c49e97b5127d3cb2f4e355c847964405a6a764e29f9b6a220cac43b79923c4ac866a607bcce9d2ef
7
+ data.tar.gz: 972253d27b545b8ffa9e8f7b4793a8d96cd3259917d2a16b3900219798ed6006a22e632ffcb86229dd80a1caad51201185aaf29010ffefb7230a747ed2637f0a
@@ -16,7 +16,7 @@ module Txgh
16
16
  content_list.each do |file_params|
17
17
  path = file_params.fetch(:path)
18
18
  new_contents = file_params.fetch(:contents)
19
- branch = Utils.url_safe_relative_branch(branch)
19
+ branch = Utils.relative_branch(branch)
20
20
 
21
21
  file_sha = file_params.fetch(:sha) do
22
22
  begin
@@ -48,7 +48,7 @@ module Txgh
48
48
  end
49
49
 
50
50
  def download(path, branch)
51
- file = client.get_file(repo_name, path, Utils.url_safe_relative_branch(branch))
51
+ file = client.get_file(repo_name, path, Utils.relative_branch(branch))
52
52
 
53
53
  # mock github response
54
54
  {
@@ -1,3 +1,3 @@
1
1
  module Txgh
2
- VERSION = '7.0.3.beta3'
2
+ VERSION = '7.0.3.beta4'
3
3
  end
@@ -23,13 +23,13 @@ describe Txgh::GitlabApi do
23
23
 
24
24
  expect(client).to(
25
25
  receive(:get_file)
26
- .with(repo, path, url_safe_branch)
26
+ .with(repo, path, filtered_branch)
27
27
  .and_return(double(blob_id: old_sha))
28
28
  )
29
29
 
30
30
  expect(client).to(
31
31
  receive(:edit_file)
32
- .with(repo, path, url_safe_branch, new_contents, 'message')
32
+ .with(repo, path, filtered_branch, new_contents, 'message')
33
33
  )
34
34
 
35
35
  api.update_contents(branch, [{ path: path, contents: new_contents }], 'message')
@@ -38,7 +38,7 @@ describe Txgh::GitlabApi do
38
38
  it "doesn't update the file contents if the file hasn't changed" do
39
39
  expect(client).to(
40
40
  receive(:get_file)
41
- .with(repo, path, url_safe_branch)
41
+ .with(repo, path, filtered_branch)
42
42
  .and_return(double(blob_id: old_sha))
43
43
  )
44
44
 
@@ -53,7 +53,7 @@ describe Txgh::GitlabApi do
53
53
 
54
54
  expect(client).to(
55
55
  receive(:edit_file)
56
- .with(repo, path, url_safe_branch, new_contents, 'message')
56
+ .with(repo, path, filtered_branch, new_contents, 'message')
57
57
  )
58
58
 
59
59
  api.update_contents(branch, [{ path: path, contents: new_contents }], 'message')
@@ -64,7 +64,7 @@ describe Txgh::GitlabApi do
64
64
  it 'downloads the file from the given branch' do
65
65
  expect(client).to(
66
66
  receive(:get_file)
67
- .with(repo, path, url_safe_branch)
67
+ .with(repo, path, filtered_branch)
68
68
  .and_return(double(content: 'content', encoding: 'utf-8'))
69
69
  )
70
70
 
@@ -76,7 +76,7 @@ describe Txgh::GitlabApi do
76
76
 
77
77
  expect(client).to(
78
78
  receive(:get_file)
79
- .with(repo, path, url_safe_branch)
79
+ .with(repo, path, filtered_branch)
80
80
  .and_return(double(content: content, encoding: 'utf-16'))
81
81
  )
82
82
 
@@ -88,7 +88,7 @@ describe Txgh::GitlabApi do
88
88
  it 'automatically decodes base64-encoded content' do
89
89
  expect(client).to(
90
90
  receive(:get_file)
91
- .with(repo, path, url_safe_branch)
91
+ .with(repo, path, filtered_branch)
92
92
  .and_return(double(content: Base64.encode64('content'), encoding: 'base64'))
93
93
  )
94
94
 
@@ -103,14 +103,14 @@ describe Txgh::GitlabApi do
103
103
 
104
104
  context 'when master branch' do
105
105
  let(:branch) { 'master' }
106
- let(:url_safe_branch) { 'master' }
106
+ let(:filtered_branch) { 'master' }
107
107
 
108
108
  it_behaves_like 'an update_contents flow'
109
109
  end
110
110
 
111
111
  context 'when feature branch' do
112
- let(:branch) { 'feature/foo-ticket' }
113
- let(:url_safe_branch) { 'feature%2Ffoo-ticket' }
112
+ let(:branch) { 'heads/feature/foo-ticket' }
113
+ let(:filtered_branch) { 'feature/foo-ticket' }
114
114
 
115
115
  it_behaves_like 'an update_contents flow'
116
116
  end
@@ -149,14 +149,14 @@ describe Txgh::GitlabApi do
149
149
 
150
150
  context 'when master branch' do
151
151
  let(:branch) { 'master' }
152
- let(:url_safe_branch) { 'master' }
152
+ let(:filtered_branch) { 'master' }
153
153
 
154
154
  it_behaves_like 'a download flow'
155
155
  end
156
156
 
157
157
  context 'when feature branch' do
158
- let(:branch) { 'feature/foo-ticket' }
159
- let(:url_safe_branch) { 'feature%2Ffoo-ticket' }
158
+ let(:branch) { 'heads/feature/foo-ticket' }
159
+ let(:filtered_branch) { 'feature/foo-ticket' }
160
160
 
161
161
  it_behaves_like 'a download flow'
162
162
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.add_dependency 'faraday_middleware', '0.14.0'
19
19
  s.add_dependency 'json', '~> 2.3'
20
20
  s.add_dependency 'octokit', '~> 4.2'
21
- s.add_dependency 'gitlab', '~> 4.14'
21
+ s.add_dependency 'gitlab', '~> 4.17'
22
22
  s.add_dependency 'parseconfig', '~> 1.0'
23
23
 
24
24
  s.require_path = 'lib'
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: 7.0.3.beta3
4
+ version: 7.0.3.beta4
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: 2021-01-11 00:00:00.000000000 Z
12
+ date: 2021-01-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: abroad
@@ -101,14 +101,14 @@ dependencies:
101
101
  requirements:
102
102
  - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: '4.14'
104
+ version: '4.17'
105
105
  type: :runtime
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: '4.14'
111
+ version: '4.17'
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: parseconfig
114
114
  requirement: !ruby/object:Gem::Requirement
@@ -229,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
229
229
  version: 1.3.1
230
230
  requirements: []
231
231
  rubyforge_project:
232
- rubygems_version: 2.7.6
232
+ rubygems_version: 2.7.6.2
233
233
  signing_key:
234
234
  specification_version: 4
235
235
  summary: A library for syncing translation resources between Github and Transifex.