singularity_dsl 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZmQwNTFiMTY3ODJhN2IzMDRjZTg5YzY5Y2M3MDc0NTBkODA2YzlmMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTFiOTkyNjVkYWMxNTFkZGI5MWVlODAxNGVlYTBkNGI5N2U3ZWI2YQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NzBiMDQ2ZmM2MTA2M2RhY2FmNzM3MDEyYmY3MDMzMTIxMTc2ZmZiNzEyZjc5
|
10
|
+
MmFjZmJmODZkZjhkNjYzZjIwNjk4YzNhZWRmZGQwN2YyMWVmYWU2MTE3NWQ2
|
11
|
+
MWY0YzFjYWQ4N2FiZTNiYmZmMTU1Nzc0M2EyZTNkZDhjN2RlYmM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZjE5ZDE2YzAwMzExZGY3YTI0ZmM2NzVmMzBmOGI2NzdhNTM2YjY4MzJiMzQy
|
14
|
+
YWRhZDk2OWNlMWY2NmE2YzQyMzMyZWFjZmNiZjU3ZGI5YzU3ZTg4YTAzOGQ2
|
15
|
+
MmRkYWMyMDIzODFkMTliMmUwN2VmNjk0ZmViMTkxYmNhNTMzYzQ=
|
data/.singularityrc
CHANGED
data/Gemfile.lock
CHANGED
@@ -6,6 +6,7 @@ require 'singularity_dsl/cli/utils'
|
|
6
6
|
require 'singularity_dsl/dsl/dsl'
|
7
7
|
require 'singularity_dsl/errors'
|
8
8
|
require 'singularity_dsl/git_helper'
|
9
|
+
require 'singularity_dsl/version'
|
9
10
|
require 'thor'
|
10
11
|
|
11
12
|
module SingularityDsl
|
@@ -53,6 +54,12 @@ module SingularityDsl
|
|
53
54
|
Runtime flags to set for use with flag_set?, formatted as VAR:VAL
|
54
55
|
EOD
|
55
56
|
|
57
|
+
map %w(--version -v) => :__print_version
|
58
|
+
desc '--version, -v', 'print the version'
|
59
|
+
def __print_version
|
60
|
+
puts "Singularity Runner & DSL v#{SingularityDsl::VERSION}"
|
61
|
+
end
|
62
|
+
|
56
63
|
# TASKS COMMAND
|
57
64
|
desc 'tasks', 'Available tasks.'
|
58
65
|
def tasks
|
@@ -5,22 +5,46 @@ require 'singularity_dsl/tasks/boot_coveralls'
|
|
5
5
|
describe BootCoveralls do
|
6
6
|
let(:coveralls) { BootCoveralls.new }
|
7
7
|
|
8
|
-
|
8
|
+
describe '#token' do
|
9
|
+
it 'sets COVERALLS_REPO_TOKEN' do
|
10
|
+
# cannot actually set var - will overwrite the ACTUAL
|
11
|
+
# value ...UGGGGH :(
|
12
|
+
expect(ENV).to receive(:[]=)
|
13
|
+
.with('COVERALLS_REPO_TOKEN', 'foobar')
|
14
|
+
coveralls.token 'foobar'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe '#report_endpoint' do
|
19
|
+
after(:each) do
|
20
|
+
ENV['COVERALLS_ENDPOINT'] = nil
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'sets COVERALLS_ENDPOINT' do
|
24
|
+
coveralls.report_endpoint 'foobar'
|
25
|
+
|
26
|
+
expect(ENV['COVERALLS_ENDPOINT']).to eql 'foobar'
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe '#no_fail' do
|
9
31
|
it 'fails when non-bool given' do
|
10
32
|
expect { coveralls.no_fail [] }.to raise_error
|
11
33
|
end
|
12
34
|
end
|
13
35
|
|
14
|
-
|
36
|
+
describe '#execute' do
|
15
37
|
before(:each) do
|
16
38
|
allow(coveralls).to receive(:info)
|
17
39
|
end
|
18
40
|
|
19
41
|
context 'environment not correct' do
|
20
|
-
|
42
|
+
before(:each) do
|
21
43
|
allow(ENV).to receive(:key?)
|
22
44
|
.with('COVERALLS_REPO_TOKEN').and_return false
|
45
|
+
end
|
23
46
|
|
47
|
+
it 'return if COVERALLS_REPO_TOKEN is not set' do
|
24
48
|
expect(coveralls).to receive(:info)
|
25
49
|
.with('Missing ENV variable: COVERALLS_REPO_TOKEN')
|
26
50
|
expect(coveralls).to receive(:info)
|
@@ -28,5 +52,25 @@ describe BootCoveralls do
|
|
28
52
|
expect(coveralls.execute).to eql nil
|
29
53
|
end
|
30
54
|
end
|
55
|
+
|
56
|
+
context '::Coveralls itself no bueno' do
|
57
|
+
before(:each) do
|
58
|
+
allow(ENV).to receive(:key?)
|
59
|
+
.with('COVERALLS_REPO_TOKEN').and_return true
|
60
|
+
allow(::Coveralls).to receive(:wear!)
|
61
|
+
.and_raise(::StandardError.new 'NO PANTS FOR YOU')
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'does not fail by default' do
|
65
|
+
expect(coveralls).to receive(:info).with(/NO PANTS/)
|
66
|
+
expect(coveralls.execute).to eql nil
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'fails when no_fail flipped off' do
|
70
|
+
coveralls.no_fail false
|
71
|
+
|
72
|
+
expect { coveralls.execute }.to raise_error(/NO PANTS/)
|
73
|
+
end
|
74
|
+
end
|
31
75
|
end
|
32
76
|
end
|