singularity_dsl 3.0.5 → 3.0.6
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 +4 -4
- data/Gemfile.lock +31 -42
- data/lib/singularity_dsl.rb +0 -2
- data/lib/singularity_dsl/cli.rb +3 -3
- data/lib/singularity_dsl/cli/command/app_runner_command.rb +1 -1
- data/lib/singularity_dsl/cli/command/command.rb +1 -1
- data/lib/singularity_dsl/cli/command/test.rb +1 -1
- data/lib/singularity_dsl/dsl/dsl.rb +5 -5
- data/lib/singularity_dsl/dsl/registry.rb +4 -4
- data/lib/singularity_dsl/dsl/runner.rb +1 -1
- data/lib/singularity_dsl/errors.rb +2 -2
- data/lib/singularity_dsl/git_helper.rb +4 -4
- data/lib/singularity_dsl/task.rb +1 -1
- data/lib/singularity_dsl/tasks/boot_coveralls.rb +1 -1
- data/lib/singularity_dsl/tasks/shell_task.rb +1 -1
- data/lib/singularity_dsl/version.rb +1 -1
- data/spec/singularity_dsl/application_spec.rb +2 -2
- data/spec/singularity_dsl/cli/command/test_merge_spec.rb +3 -3
- data/spec/singularity_dsl/dsl/batch_spec.rb +1 -3
- data/spec/singularity_dsl/dsl/changeset_spec.rb +10 -10
- data/spec/singularity_dsl/dsl/dsl_spec.rb +3 -3
- data/spec/singularity_dsl/dsl/utils_spec.rb +2 -2
- data/spec/singularity_dsl/git_helper_spec.rb +4 -4
- data/spec/singularity_dsl/task_spec.rb +3 -3
- data/spec/singularity_dsl/tasks/boot_coveralls_spec.rb +2 -2
- data/spec/singularity_dsl/tasks/shell_task_spec.rb +4 -4
- data/spec/singularity_dsl_spec.rb +2 -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: f01317129316a96bfa285febee6db2127cd27dc3
|
|
4
|
+
data.tar.gz: 5ef3a92f5e6a24564e0474ce43db7779282922af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 05f0675493eeb80798930d901d3f1ed352cdf79fa62243d6b0f58b68ef8487e5f94563f9b54ef56bddec16449f47e15985e93c0e84fe15ba4bf27f3149730d99
|
|
7
|
+
data.tar.gz: e65b776da10d271f484bb31ef8f975bee8aed8ac22a6f2d8c5842bda34fe616aa00de8d307ba4ef6dfd462c257c98e1a09c2897cde9b0e6896c9ce8263079a9b
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
singularity_dsl (3.0.
|
|
4
|
+
singularity_dsl (3.0.6)
|
|
5
5
|
coveralls (~> 0.8.0)
|
|
6
6
|
json (~> 1.0)
|
|
7
7
|
mixlib-shellout (~> 2.0)
|
|
@@ -15,56 +15,44 @@ PATH
|
|
|
15
15
|
GEM
|
|
16
16
|
remote: https://rubygems.org/
|
|
17
17
|
specs:
|
|
18
|
-
ast (2.
|
|
19
|
-
|
|
20
|
-
parser (>= 2.2.0.pre.3, < 3.0)
|
|
21
|
-
coveralls (0.8.2)
|
|
18
|
+
ast (2.2.0)
|
|
19
|
+
coveralls (0.8.13)
|
|
22
20
|
json (~> 1.8)
|
|
23
|
-
|
|
24
|
-
simplecov (~> 0.10.0)
|
|
21
|
+
simplecov (~> 0.11.0)
|
|
25
22
|
term-ansicolor (~> 1.3)
|
|
26
23
|
thor (~> 0.19.1)
|
|
24
|
+
tins (~> 1.6.0)
|
|
27
25
|
diff-lcs (1.2.5)
|
|
28
26
|
docile (1.1.5)
|
|
29
|
-
|
|
30
|
-
unf (>= 0.0.5, < 1.0.0)
|
|
31
|
-
gem-release (0.7.3)
|
|
32
|
-
http-cookie (1.0.2)
|
|
33
|
-
domain_name (~> 0.5)
|
|
27
|
+
gem-release (0.7.4)
|
|
34
28
|
json (1.8.3)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
parser (2.3.0.pre.2)
|
|
39
|
-
ast (>= 1.1, < 3.0)
|
|
29
|
+
mixlib-shellout (2.2.6)
|
|
30
|
+
parser (2.3.0.7)
|
|
31
|
+
ast (~> 2.2)
|
|
40
32
|
powerpack (0.1.1)
|
|
41
33
|
rainbow (2.0.0)
|
|
42
|
-
rake (10.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
rspec (3.
|
|
48
|
-
rspec-
|
|
49
|
-
|
|
50
|
-
rspec-mocks (~> 3.3.0)
|
|
51
|
-
rspec-core (3.3.1)
|
|
52
|
-
rspec-support (~> 3.3.0)
|
|
53
|
-
rspec-expectations (3.3.0)
|
|
34
|
+
rake (10.5.0)
|
|
35
|
+
rspec (3.4.0)
|
|
36
|
+
rspec-core (~> 3.4.0)
|
|
37
|
+
rspec-expectations (~> 3.4.0)
|
|
38
|
+
rspec-mocks (~> 3.4.0)
|
|
39
|
+
rspec-core (3.4.4)
|
|
40
|
+
rspec-support (~> 3.4.0)
|
|
41
|
+
rspec-expectations (3.4.0)
|
|
54
42
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
55
|
-
rspec-support (~> 3.
|
|
56
|
-
rspec-mocks (3.
|
|
43
|
+
rspec-support (~> 3.4.0)
|
|
44
|
+
rspec-mocks (3.4.1)
|
|
57
45
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
58
|
-
rspec-support (~> 3.
|
|
59
|
-
rspec-support (3.
|
|
60
|
-
rubocop (0.
|
|
61
|
-
|
|
62
|
-
parser (>= 2.2.2.5, < 3.0)
|
|
46
|
+
rspec-support (~> 3.4.0)
|
|
47
|
+
rspec-support (3.4.1)
|
|
48
|
+
rubocop (0.39.0)
|
|
49
|
+
parser (>= 2.3.0.7, < 3.0)
|
|
63
50
|
powerpack (~> 0.1)
|
|
64
51
|
rainbow (>= 1.99.1, < 3.0)
|
|
65
|
-
ruby-progressbar (~> 1.
|
|
52
|
+
ruby-progressbar (~> 1.7)
|
|
53
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
|
66
54
|
ruby-progressbar (1.7.5)
|
|
67
|
-
simplecov (0.
|
|
55
|
+
simplecov (0.11.2)
|
|
68
56
|
docile (~> 1.1.0)
|
|
69
57
|
json (~> 1.8)
|
|
70
58
|
simplecov-html (~> 0.10.0)
|
|
@@ -73,10 +61,8 @@ GEM
|
|
|
73
61
|
tins (~> 1.0)
|
|
74
62
|
terminal-table (1.5.2)
|
|
75
63
|
thor (0.19.1)
|
|
76
|
-
tins (1.
|
|
77
|
-
|
|
78
|
-
unf_ext
|
|
79
|
-
unf_ext (0.0.7.1)
|
|
64
|
+
tins (1.6.0)
|
|
65
|
+
unicode-display_width (1.0.3)
|
|
80
66
|
|
|
81
67
|
PLATFORMS
|
|
82
68
|
ruby
|
|
@@ -85,3 +71,6 @@ DEPENDENCIES
|
|
|
85
71
|
bundler (~> 1.3)
|
|
86
72
|
gem-release
|
|
87
73
|
singularity_dsl!
|
|
74
|
+
|
|
75
|
+
BUNDLED WITH
|
|
76
|
+
1.11.2
|
data/lib/singularity_dsl.rb
CHANGED
data/lib/singularity_dsl/cli.rb
CHANGED
|
@@ -76,9 +76,9 @@ EOD
|
|
|
76
76
|
def testmerge(git_fork, branch, base_branch, base_fork = nil)
|
|
77
77
|
Command::TestMerge.new(options).tap do |cmd|
|
|
78
78
|
cmd.bootstrap_cwd(base_fork)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
.set_fork_env(git_fork, branch)
|
|
80
|
+
.perform_merge(git_fork, branch, base_branch, base_fork)
|
|
81
|
+
.execute
|
|
82
82
|
end
|
|
83
83
|
end
|
|
84
84
|
|
|
@@ -13,7 +13,7 @@ module SingularityDsl
|
|
|
13
13
|
# Exposes the app that is created so that child classes
|
|
14
14
|
# can perform injections / configurations on the fly
|
|
15
15
|
yield(app) if block_given?
|
|
16
|
-
exit(app.run
|
|
16
|
+
exit(app.run(batch, options[:all_tasks]))
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
def batch
|
|
@@ -32,13 +32,13 @@ module SingularityDsl
|
|
|
32
32
|
|
|
33
33
|
def load_ex_script(path)
|
|
34
34
|
@registry = Registry.new
|
|
35
|
-
instance_eval(::File.read
|
|
35
|
+
instance_eval(::File.read(path))
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
def define_task(klass)
|
|
39
39
|
raise_task_def_error klass if task_defined klass
|
|
40
40
|
# because define_method is private
|
|
41
|
-
define_singleton_method(task
|
|
41
|
+
define_singleton_method(task(klass)) do |&block|
|
|
42
42
|
@registry.add_task klass.new(&block)
|
|
43
43
|
end
|
|
44
44
|
end
|
|
@@ -47,7 +47,7 @@ module SingularityDsl
|
|
|
47
47
|
base_tasks = task_list
|
|
48
48
|
updated_tasks = task_list
|
|
49
49
|
files_in_path(path, 'rb').each do |file|
|
|
50
|
-
SingularityDsl.module_eval(::File.read
|
|
50
|
+
SingularityDsl.module_eval(::File.read(file))
|
|
51
51
|
# keep a list of class => file mappings
|
|
52
52
|
(task_list - updated_tasks).each do |klass|
|
|
53
53
|
SingularityDsl.map_task_file klass, file
|
|
@@ -77,11 +77,11 @@ module SingularityDsl
|
|
|
77
77
|
private
|
|
78
78
|
|
|
79
79
|
def raise_task_def_error(klass)
|
|
80
|
-
|
|
80
|
+
raise "task name clash for #{klass}"
|
|
81
81
|
end
|
|
82
82
|
|
|
83
83
|
def task_defined(klass)
|
|
84
|
-
singleton_methods(false).include?(task
|
|
84
|
+
singleton_methods(false).include?(task(klass))
|
|
85
85
|
end
|
|
86
86
|
|
|
87
87
|
def load_tasks(list)
|
|
@@ -41,19 +41,19 @@ module SingularityDsl
|
|
|
41
41
|
private
|
|
42
42
|
|
|
43
43
|
def batch_dne(name)
|
|
44
|
-
|
|
44
|
+
raise "Cannot invoke batch '#{name}', does not exist"
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
def batch_exists(name)
|
|
48
|
-
|
|
48
|
+
raise "A task batch with the name '#{name}' already exists"
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
def fail_non_type(type, task)
|
|
52
|
-
|
|
52
|
+
raise "Non-#{type} given - #{task}"
|
|
53
53
|
end
|
|
54
54
|
|
|
55
55
|
def fail_raw_type(type, task)
|
|
56
|
-
|
|
56
|
+
raise "Cannot use raw #{type} objects - #{task}"
|
|
57
57
|
end
|
|
58
58
|
end
|
|
59
59
|
end
|
|
@@ -25,11 +25,11 @@ module SingularityDsl
|
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
def resource_fail(klass)
|
|
28
|
-
|
|
28
|
+
raise ResourceFail, klass_failed(klass)
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def resource_err(klass)
|
|
32
|
-
|
|
32
|
+
raise ResourceError, klass_error(klass)
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
end
|
|
@@ -28,7 +28,7 @@ module SingularityDsl
|
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
def clean_reset
|
|
31
|
-
|
|
31
|
+
raise 'failed to clean' unless (reset | clean) == 0
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
def checkout_remote(branch, remote)
|
|
@@ -84,14 +84,14 @@ module SingularityDsl
|
|
|
84
84
|
end
|
|
85
85
|
|
|
86
86
|
def remote_action(branch, url, action)
|
|
87
|
-
status = exec(remote_cmd
|
|
88
|
-
|
|
87
|
+
status = exec(remote_cmd(branch, url, action))
|
|
88
|
+
raise "failed to #{action}" unless status == 0
|
|
89
89
|
status
|
|
90
90
|
end
|
|
91
91
|
|
|
92
92
|
def remote_from_url(url)
|
|
93
93
|
return 'origin' if url.nil? || !url
|
|
94
|
-
url.split(':').last.
|
|
94
|
+
url.split(':').last.tr('/', '_')
|
|
95
95
|
end
|
|
96
96
|
|
|
97
97
|
def fetch_all
|
data/lib/singularity_dsl/task.rb
CHANGED
|
@@ -14,8 +14,8 @@ describe 'Application' do
|
|
|
14
14
|
context '#load_script' do
|
|
15
15
|
it 'just calls runner.load_ex_script' do
|
|
16
16
|
stub_res = 'spooooooky ghooooost'
|
|
17
|
-
allow(app.dsl).to(receive(:load_ex_script).and_return
|
|
18
|
-
expect(app.load_script
|
|
17
|
+
allow(app.dsl).to(receive(:load_ex_script).and_return(stub_res))
|
|
18
|
+
expect(app.load_script('dummy')).to eql stub_res
|
|
19
19
|
end
|
|
20
20
|
end
|
|
21
21
|
|
|
@@ -48,7 +48,7 @@ describe SingularityDsl::Cli::Command::TestMerge do
|
|
|
48
48
|
|
|
49
49
|
it 'does nothing' do
|
|
50
50
|
allow(cmd.git).to receive :verbosity
|
|
51
|
-
expect(cmd.bootstrap_cwd
|
|
51
|
+
expect(cmd.bootstrap_cwd(repo)).to eql cmd
|
|
52
52
|
end
|
|
53
53
|
end
|
|
54
54
|
|
|
@@ -64,7 +64,7 @@ describe SingularityDsl::Cli::Command::TestMerge do
|
|
|
64
64
|
allow(cmd.git).to receive :verbosity
|
|
65
65
|
expect_git_cmd("git clone #{repo} .")
|
|
66
66
|
expect_git_cmd('git submodule update --init --recursive')
|
|
67
|
-
expect(cmd.bootstrap_cwd
|
|
67
|
+
expect(cmd.bootstrap_cwd(repo)).to eql cmd
|
|
68
68
|
end
|
|
69
69
|
end
|
|
70
70
|
|
|
@@ -78,7 +78,7 @@ describe SingularityDsl::Cli::Command::TestMerge do
|
|
|
78
78
|
expect_git_cmd('git clean -ffdx')
|
|
79
79
|
expect_git_cmd('git add . && git reset --hard')
|
|
80
80
|
expect_git_cmd('git submodule update --init --recursive')
|
|
81
|
-
expect(cmd.bootstrap_cwd
|
|
81
|
+
expect(cmd.bootstrap_cwd(repo)).to eql cmd
|
|
82
82
|
end
|
|
83
83
|
end
|
|
84
84
|
end
|
|
@@ -20,9 +20,7 @@ describe 'Batch' do
|
|
|
20
20
|
it 'executes block in passed context' do
|
|
21
21
|
dummy = TestObject.new
|
|
22
22
|
allow(dummy).to receive(:meth)
|
|
23
|
-
batch = SingularityDsl::Dsl::Batch.new('test', dummy)
|
|
24
|
-
thing.meth
|
|
25
|
-
end
|
|
23
|
+
batch = SingularityDsl::Dsl::Batch.new('test', dummy, &:meth)
|
|
26
24
|
expect(dummy).to receive(:meth)
|
|
27
25
|
batch.execute
|
|
28
26
|
end
|
|
@@ -18,23 +18,23 @@ describe 'DslChangeset' do
|
|
|
18
18
|
|
|
19
19
|
context '#files_changed?' do
|
|
20
20
|
it 'correctly evals for single file type' do
|
|
21
|
-
expect(instance.files_changed?
|
|
21
|
+
expect(instance.files_changed?('php')).to eql true
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
it 'returns false when file type not in changeset' do
|
|
25
|
-
expect(instance.files_changed?
|
|
25
|
+
expect(instance.files_changed?(%w(golang py))).to eql false
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
it 'correctly evals for multiple file types' do
|
|
29
|
-
expect(instance.files_changed?
|
|
29
|
+
expect(instance.files_changed?(%w(js css))).to eql true
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
it 'correctly detects literal file paths' do
|
|
33
|
-
expect(instance.files_changed?
|
|
33
|
+
expect(instance.files_changed?(%w(a/file/path))).to eql true
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
it 'returns false for non-existing literal file paths' do
|
|
37
|
-
expect(instance.files_changed?
|
|
37
|
+
expect(instance.files_changed?(%w(another/file/path))).to eql false
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
|
|
@@ -55,24 +55,24 @@ describe 'DslChangeset' do
|
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
it 'correctly evals for single file type' do
|
|
58
|
-
expect(instance.changed_files
|
|
58
|
+
expect(instance.changed_files('css')).to eql %w(something.css)
|
|
59
59
|
end
|
|
60
60
|
|
|
61
61
|
it 'returns [] when file type not in changeset' do
|
|
62
|
-
expect(instance.changed_files
|
|
62
|
+
expect(instance.changed_files(%w(golang py))).to eql []
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
it 'filters for existing files & sorts' do
|
|
66
|
-
expect(instance.changed_files
|
|
66
|
+
expect(instance.changed_files(%w(php js css a/file/path)))
|
|
67
67
|
.to eql %w(a/file/path something.css something.js)
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
it 'correctly detects literal file paths' do
|
|
71
|
-
expect(instance.changed_files
|
|
71
|
+
expect(instance.changed_files(%w(a/file/path))).to eql %w(a/file/path)
|
|
72
72
|
end
|
|
73
73
|
|
|
74
74
|
it 'returns false for non-existing literal file paths' do
|
|
75
|
-
expect(instance.changed_files
|
|
75
|
+
expect(instance.changed_files(%w(another/file/path))).to eql []
|
|
76
76
|
end
|
|
77
77
|
end
|
|
78
78
|
end
|
|
@@ -106,17 +106,17 @@ describe 'Dsl' do
|
|
|
106
106
|
|
|
107
107
|
context '#flag?' do
|
|
108
108
|
it 'returns false by default' do
|
|
109
|
-
expect(dsl.flag?
|
|
109
|
+
expect(dsl.flag?('blah')).to eql false
|
|
110
110
|
end
|
|
111
111
|
|
|
112
112
|
it 'returns true by default' do
|
|
113
113
|
dsl.flag 'default'
|
|
114
|
-
expect(dsl.flag?
|
|
114
|
+
expect(dsl.flag?('default')).to eql true
|
|
115
115
|
end
|
|
116
116
|
|
|
117
117
|
it 'returns vals' do
|
|
118
118
|
dsl.flag 'foo', 'bar'
|
|
119
|
-
expect(dsl.flag?
|
|
119
|
+
expect(dsl.flag?('foo')).to eql 'bar'
|
|
120
120
|
end
|
|
121
121
|
end
|
|
122
122
|
end
|
|
@@ -10,13 +10,13 @@ describe 'Utils' do
|
|
|
10
10
|
|
|
11
11
|
context '#task_name' do
|
|
12
12
|
it 'simplifies class names correctly' do
|
|
13
|
-
expect(task_name
|
|
13
|
+
expect(task_name('Foo::Bar::Blah')).to eql 'Blah'
|
|
14
14
|
end
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
context '#task' do
|
|
18
18
|
it 'returns lowercase sym representing DSL fx' do
|
|
19
|
-
expect(task
|
|
19
|
+
expect(task(TestTask)).to eql :testtask
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
22
|
|
|
@@ -40,7 +40,7 @@ describe 'GitHelper' do
|
|
|
40
40
|
.to receive(:git_installed)
|
|
41
41
|
.and_return false
|
|
42
42
|
expect { SingularityDsl::GitHelper.new }
|
|
43
|
-
.to(raise_error
|
|
43
|
+
.to(raise_error(ArgumentError, /git not installed/))
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
|
|
@@ -71,21 +71,21 @@ describe 'GitHelper' do
|
|
|
71
71
|
allow(git).to receive(:reset).and_return(1)
|
|
72
72
|
allow(git).to receive(:clean).and_return(0)
|
|
73
73
|
expect { git.clean_reset }
|
|
74
|
-
.to(raise_error
|
|
74
|
+
.to(raise_error(RuntimeError, /failed to clean/))
|
|
75
75
|
end
|
|
76
76
|
|
|
77
77
|
it 'fails when clean fails' do
|
|
78
78
|
allow(git).to receive(:reset).and_return(0)
|
|
79
79
|
allow(git).to receive(:clean).and_return(1)
|
|
80
80
|
expect { git.clean_reset }
|
|
81
|
-
.to(raise_error
|
|
81
|
+
.to(raise_error(RuntimeError, /failed to clean/))
|
|
82
82
|
end
|
|
83
83
|
|
|
84
84
|
it 'fails when both reset & clean fail' do
|
|
85
85
|
allow(git).to receive(:reset).and_return(1)
|
|
86
86
|
allow(git).to receive(:clean).and_return(1)
|
|
87
87
|
expect { git.clean_reset }
|
|
88
|
-
.to(raise_error
|
|
88
|
+
.to(raise_error(RuntimeError, /failed to clean/))
|
|
89
89
|
end
|
|
90
90
|
end
|
|
91
91
|
|
|
@@ -39,9 +39,9 @@ describe 'Task' do
|
|
|
39
39
|
context '#failed_status' do
|
|
40
40
|
it 'returns false for specific values' do
|
|
41
41
|
task = SingularityDsl::Task.new
|
|
42
|
-
expect(task.failed_status
|
|
43
|
-
expect(task.failed_status
|
|
44
|
-
expect(task.failed_status
|
|
42
|
+
expect(task.failed_status(nil)).to eql false
|
|
43
|
+
expect(task.failed_status(0)).to eql false
|
|
44
|
+
expect(task.failed_status(false)).to eql false
|
|
45
45
|
end
|
|
46
46
|
end
|
|
47
47
|
|
|
@@ -36,7 +36,7 @@ describe BootCoveralls do
|
|
|
36
36
|
|
|
37
37
|
describe '#no_fail' do
|
|
38
38
|
it 'fails when non-bool given' do
|
|
39
|
-
expect { coveralls.no_fail [] }.to
|
|
39
|
+
expect { coveralls.no_fail [] }.to(raise_error(/must be bool/))
|
|
40
40
|
end
|
|
41
41
|
end
|
|
42
42
|
|
|
@@ -65,7 +65,7 @@ describe BootCoveralls do
|
|
|
65
65
|
allow(ENV).to receive(:key?)
|
|
66
66
|
.with('COVERALLS_REPO_TOKEN').and_return true
|
|
67
67
|
allow(::Coveralls).to receive(:wear!)
|
|
68
|
-
.and_raise(::StandardError.new
|
|
68
|
+
.and_raise(::StandardError.new('NO PANTS FOR YOU'))
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
it 'does not fail by default' do
|
|
@@ -21,7 +21,7 @@ describe 'ShellTask' do
|
|
|
21
21
|
|
|
22
22
|
context '#condition' do
|
|
23
23
|
it 'throws when non string given' do
|
|
24
|
-
expect { sh_task.condition([]) }.to raise_error
|
|
24
|
+
expect { sh_task.condition([]) }.to raise_error(/must be string/)
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
it 'appends the cmd to conditionals array' do
|
|
@@ -32,13 +32,13 @@ describe 'ShellTask' do
|
|
|
32
32
|
|
|
33
33
|
context '#no_fail' do
|
|
34
34
|
it 'fails when non-bool given' do
|
|
35
|
-
expect { sh_task.no_fail [] }.to raise_error
|
|
35
|
+
expect { sh_task.no_fail [] }.to raise_error(/must be bool/)
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
context '#alt' do
|
|
40
40
|
it 'throws when non string given' do
|
|
41
|
-
expect { sh_task.alt([]) }.to raise_error
|
|
41
|
+
expect { sh_task.alt([]) }.to raise_error(/must be string/)
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
it 'sets alternative cmd' do
|
|
@@ -75,7 +75,7 @@ describe 'ShellTask' do
|
|
|
75
75
|
|
|
76
76
|
context '#execute' do
|
|
77
77
|
it 'errors when command() was never called' do
|
|
78
|
-
expect { sh_task.execute }.to raise_error
|
|
78
|
+
expect { sh_task.execute }.to raise_error(/command never/)
|
|
79
79
|
end
|
|
80
80
|
|
|
81
81
|
it 'runs command returns correct status, with conditionals' do
|
|
@@ -15,12 +15,12 @@ describe 'SingularityDsl' do
|
|
|
15
15
|
|
|
16
16
|
context '#task_file' do
|
|
17
17
|
it 'returns false when no such class' do
|
|
18
|
-
expect(SingularityDsl.task_file
|
|
18
|
+
expect(SingularityDsl.task_file(1)).to eql false
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
it 'returns the correct mapping for a class' do
|
|
22
22
|
# THIS VALUE IS FROM THE RUN IN '#map_task_file'
|
|
23
|
-
expect(SingularityDsl.task_file
|
|
23
|
+
expect(SingularityDsl.task_file('foo')).to eql('foo')
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: singularity_dsl
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- chr0n1x
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-04-
|
|
11
|
+
date: 2016-04-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|