travis-conditions 1.0.0 → 1.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/travis/conditions/v1/eval.rb +1 -1
- data/lib/travis/conditions/version.rb +1 -1
- data/spec/v1/eval_spec.rb +35 -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: 3b6d3e53b4b901ce98eba3163f1032654784961c
|
4
|
+
data.tar.gz: d28a8be8838b6db1d8d6ce29ff51e592dbb60f43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 518227b13beb67aa1fd7853de9fb51a398ead71f1d09ab40724299cd3e25b74d062c36a7c2045115b0804a780f65231a100050894edc932098ba81911b6fc23c
|
7
|
+
data.tar.gz: 22607b55555edf9f45f0b3ca9c2849717fd1d4cf36ca7a36f9939d5097fd9ec24a1b250e65cd9e9c290b9607cee5be7bbcea5bda04237834711cf03f93604600
|
data/spec/v1/eval_spec.rb
CHANGED
@@ -109,6 +109,11 @@ describe Travis::Conditions::V1, 'eval' do
|
|
109
109
|
it { should be true }
|
110
110
|
end
|
111
111
|
|
112
|
+
context do
|
113
|
+
let(:str) { 'ENV(foo) = foo' }
|
114
|
+
it { should be true }
|
115
|
+
end
|
116
|
+
|
112
117
|
context do
|
113
118
|
let(:str) { 'env(foo) = bar' }
|
114
119
|
it { should be false }
|
@@ -170,6 +175,11 @@ describe Travis::Conditions::V1, 'eval' do
|
|
170
175
|
end
|
171
176
|
|
172
177
|
describe 'in' do
|
178
|
+
context do
|
179
|
+
let(:str) { 'branch in (foo, master, bar)' }
|
180
|
+
it { should be true }
|
181
|
+
end
|
182
|
+
|
173
183
|
context do
|
174
184
|
let(:str) { 'branch IN (foo, master, bar)' }
|
175
185
|
it { should be true }
|
@@ -192,6 +202,11 @@ describe Travis::Conditions::V1, 'eval' do
|
|
192
202
|
end
|
193
203
|
|
194
204
|
describe 'not in' do
|
205
|
+
context do
|
206
|
+
let(:str) { 'branch not in (foo, master, bar)' }
|
207
|
+
it { should be false }
|
208
|
+
end
|
209
|
+
|
195
210
|
context do
|
196
211
|
let(:str) { 'branch NOT IN (foo, master, bar)' }
|
197
212
|
it { should be false }
|
@@ -214,11 +229,21 @@ describe Travis::Conditions::V1, 'eval' do
|
|
214
229
|
end
|
215
230
|
|
216
231
|
describe 'is' do
|
232
|
+
context do
|
233
|
+
let(:str) { 'branch is present' }
|
234
|
+
it { should be true }
|
235
|
+
end
|
236
|
+
|
217
237
|
context do
|
218
238
|
let(:str) { 'branch IS present' }
|
219
239
|
it { should be true }
|
220
240
|
end
|
221
241
|
|
242
|
+
context do
|
243
|
+
let(:str) { 'branch IS PRESENT' }
|
244
|
+
it { should be true }
|
245
|
+
end
|
246
|
+
|
222
247
|
context do
|
223
248
|
let(:str) { 'tag IS present' }
|
224
249
|
it { should be false }
|
@@ -239,6 +264,11 @@ describe Travis::Conditions::V1, 'eval' do
|
|
239
264
|
it { should be false }
|
240
265
|
end
|
241
266
|
|
267
|
+
context do
|
268
|
+
let(:str) { 'branch IS BLANK' }
|
269
|
+
it { should be false }
|
270
|
+
end
|
271
|
+
|
242
272
|
context do
|
243
273
|
let(:str) { 'branch IS blank' }
|
244
274
|
it { should be false }
|
@@ -266,6 +296,11 @@ describe Travis::Conditions::V1, 'eval' do
|
|
266
296
|
end
|
267
297
|
|
268
298
|
describe 'is not' do
|
299
|
+
context do
|
300
|
+
let(:str) { 'branch is not present' }
|
301
|
+
it { should be false }
|
302
|
+
end
|
303
|
+
|
269
304
|
context do
|
270
305
|
let(:str) { 'branch IS NOT present' }
|
271
306
|
it { should be false }
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Travis CI
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parslet
|