txgh 2.0.0 → 2.0.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/transifex_project.rb +5 -1
- data/lib/txgh/utils.rb +9 -0
- data/lib/txgh/version.rb +1 -1
- data/spec/transifex_project_spec.rb +6 -1
- data/spec/utils_spec.rb +17 -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: 41d11b7b8102cca5e57f005f206a07ae1e80b37b
|
4
|
+
data.tar.gz: 00d3f323be5b4e668d4ad92e89d4211027899346
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a609ee7470a0787d7c350ab62fd871eabd615fcf9645d5f9807de6644587da41e52596dcb28437bb568f8a0cc937598db56b9f1e9ccd5358d5a682e02d8cf55
|
7
|
+
data.tar.gz: 99d8736582500541ba8967d5d621d55a49eec61dd3c0138a0c54f886963112cd52aff95348ce6faa880728e47b7ac4be0cd767ef57b7711c66427dad7dcbfb94
|
@@ -11,6 +11,10 @@ module Txgh
|
|
11
11
|
config['name']
|
12
12
|
end
|
13
13
|
|
14
|
+
def organization
|
15
|
+
config['organization']
|
16
|
+
end
|
17
|
+
|
14
18
|
def webhook_secret
|
15
19
|
config['webhook_secret']
|
16
20
|
end
|
@@ -27,7 +31,7 @@ module Txgh
|
|
27
31
|
end
|
28
32
|
|
29
33
|
def auto_delete_resources?
|
30
|
-
(config['auto_delete_resources'] || '')
|
34
|
+
Utils.booleanize(config['auto_delete_resources'] || 'false')
|
31
35
|
end
|
32
36
|
|
33
37
|
def tx_config_uri
|
data/lib/txgh/utils.rb
CHANGED
data/lib/txgh/version.rb
CHANGED
@@ -32,7 +32,12 @@ describe TransifexProject do
|
|
32
32
|
expect(transifex_project.auto_delete_resources?).to eq(false)
|
33
33
|
end
|
34
34
|
|
35
|
-
it 'returns true if configured' do
|
35
|
+
it 'returns true if configured with bool' do
|
36
|
+
project_config['auto_delete_resources'] = true
|
37
|
+
expect(transifex_project.auto_delete_resources?).to eq(true)
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'returns true if configured with string' do
|
36
41
|
project_config['auto_delete_resources'] = 'true'
|
37
42
|
expect(transifex_project.auto_delete_resources?).to eq(true)
|
38
43
|
end
|
data/spec/utils_spec.rb
CHANGED
@@ -55,4 +55,21 @@ describe Utils do
|
|
55
55
|
})
|
56
56
|
end
|
57
57
|
end
|
58
|
+
|
59
|
+
describe '.booleanize' do
|
60
|
+
it 'converts a string into a bool' do
|
61
|
+
expect(Utils.booleanize('true')).to eq(true)
|
62
|
+
expect(Utils.booleanize('false')).to eq(false)
|
63
|
+
end
|
64
|
+
|
65
|
+
it 'converts a badly-cased string into a bool' do
|
66
|
+
expect(Utils.booleanize('TrUe')).to eq(true)
|
67
|
+
expect(Utils.booleanize('faLSE')).to eq(false)
|
68
|
+
end
|
69
|
+
|
70
|
+
it "doesn't convert bools" do
|
71
|
+
expect(Utils.booleanize(true)).to eq(true)
|
72
|
+
expect(Utils.booleanize(false)).to eq(false)
|
73
|
+
end
|
74
|
+
end
|
58
75
|
end
|
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: 2.0.
|
4
|
+
version: 2.0.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-04-
|
12
|
+
date: 2016-04-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: abroad
|