travis-conditions 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/travis/conditions/v1/eval.rb +1 -1
- data/lib/travis/conditions/version.rb +1 -1
- data/spec/v1/eval_spec.rb +32 -2
- 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: 45ed752f8af131a4a0121e1a7016895f60a17743
|
4
|
+
data.tar.gz: 1abb2cd96e820aaf4f8e6786ff05956994838fde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5a2a1e2a7f9522d25e72726e05496b7a6ab6c719aef674ef3c2f7ea193867e0b2b47c6c950fdc39051bb7d0f38e97f7747fb6f5cfd1c94705561a608f716e06
|
7
|
+
data.tar.gz: ce2070be5d3cd20a36ac89d732aa32feb691203d391d4aa6f46b33ee2910a828e1aa635491967906ec3cd6b2dd7a529e320d0cadb84252809f9db661660a1597
|
data/spec/v1/eval_spec.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
describe Travis::Conditions::V1, 'eval' do
|
2
|
+
let(:data) { { branch: 'master', tag: tag, env: env } }
|
3
|
+
let(:env) { { foo: 'foo', bar: false } }
|
2
4
|
let(:tag) { nil }
|
3
|
-
let(:data) { { branch: 'master', tag: tag, env: { foo: 'foo', bar: false } } }
|
4
5
|
subject { described_class.eval(str, data) }
|
5
6
|
|
6
7
|
context do
|
@@ -251,7 +252,36 @@ describe Travis::Conditions::V1, 'eval' do
|
|
251
252
|
|
252
253
|
context do
|
253
254
|
let(:str) { 'env(foo) IS present' }
|
254
|
-
|
255
|
+
|
256
|
+
describe 'given an env hash with a string value' do
|
257
|
+
let(:env) { { foo: 'foo' } }
|
258
|
+
it { should be true }
|
259
|
+
end
|
260
|
+
|
261
|
+
describe 'given an env hash with a numeric value' do
|
262
|
+
let(:env) { { foo: 1 } }
|
263
|
+
it { should be true }
|
264
|
+
end
|
265
|
+
|
266
|
+
describe 'given an env hash with a boolean value' do
|
267
|
+
let(:env) { { foo: true } }
|
268
|
+
it { should be true }
|
269
|
+
end
|
270
|
+
|
271
|
+
describe 'given an env strings array with a string value' do
|
272
|
+
let(:env) { ['foo=foo'] }
|
273
|
+
it { should be true }
|
274
|
+
end
|
275
|
+
|
276
|
+
describe 'given an env strings array with a numeric value' do
|
277
|
+
let(:env) { ['foo=1'] }
|
278
|
+
it { should be true }
|
279
|
+
end
|
280
|
+
|
281
|
+
describe 'given an env strings array with a boolean value' do
|
282
|
+
let(:env) { ['foo=true'] }
|
283
|
+
it { should be true }
|
284
|
+
end
|
255
285
|
end
|
256
286
|
|
257
287
|
context do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: travis-conditions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Travis CI
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parslet
|