txgh 6.3.0 → 6.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/txgh/resource_deleter.rb +1 -1
- data/lib/txgh/version.rb +1 -1
- data/spec/resource_deleter_spec.rb +8 -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: aeb448eff8972fe9df592b05e4ddb0920c670c96
|
4
|
+
data.tar.gz: 3a6bdcbe812433adbd0d23443ae989cb94e3afe4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9f95d7974e0a072373bcafb217392ec345c5ff161299d705c1ae4a7f0f978dc7c01d9395ca6037d0bd7f33847dd7d01b5ecad7cbc697149185c0ae5c24719a8
|
7
|
+
data.tar.gz: e600b1a07e636d3c7667b07e4d30e5ae0406fe95e3e27ec9374c769cc78ebc60e2e17e5070ebe22a8baeed89957f0ed0b4d62c1538956cb1efdcc16f5be74b51
|
@@ -20,7 +20,7 @@ module Txgh
|
|
20
20
|
|
21
21
|
def tx_resources
|
22
22
|
project.api.get_resources(project.name).map do |resource_hash|
|
23
|
-
categories = deserialize_categories(resource_hash['categories'])
|
23
|
+
categories = deserialize_categories(resource_hash['categories'] || [])
|
24
24
|
resource_branch = Txgh::Utils.absolute_branch(categories['branch'])
|
25
25
|
|
26
26
|
if resource_branch == branch
|
data/lib/txgh/version.rb
CHANGED
@@ -36,6 +36,14 @@ describe ResourceDeleter do
|
|
36
36
|
deleter.delete_resources
|
37
37
|
end
|
38
38
|
|
39
|
+
it 'handles the case when no categories are present' do
|
40
|
+
expect(transifex_api).to(
|
41
|
+
receive(:get_resources).and_return([resource.to_api_h.merge('categories' => nil)])
|
42
|
+
)
|
43
|
+
|
44
|
+
expect { deleter.delete_resources }.to_not raise_error
|
45
|
+
end
|
46
|
+
|
39
47
|
it "does not delete resources that don't have a matching branch" do
|
40
48
|
deleter = ResourceDeleter.new(transifex_project, github_repo, 'heads/fake')
|
41
49
|
expect(transifex_api).to(
|
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: 6.3.
|
4
|
+
version: 6.3.1
|
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-11-
|
12
|
+
date: 2016-11-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: abroad
|