sushi_fabric 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +2 -0
- data/lib/sushi_fabric/sushiApp.rb +2 -1
- data/lib/sushi_fabric/version.rb +1 -1
- data/spec/spec_helper.rb +96 -0
- data/spec/sushi_app_spec.rb +24 -0
- metadata +7 -3
data/.rspec
ADDED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# encoding: utf-8
|
3
|
-
# Version = '20160303-
|
3
|
+
# Version = '20160303-160844'
|
4
4
|
|
5
5
|
require 'csv'
|
6
6
|
require 'fileutils'
|
@@ -363,6 +363,7 @@ set -o pipefail
|
|
363
363
|
#### SET THE STAGE
|
364
364
|
SCRATCH_DIR=#{@scratch_dir}
|
365
365
|
GSTORE_DIR=#{@gstore_dir}
|
366
|
+
INPUT_DATASET=#{@input_dataset_tsv_path}
|
366
367
|
echo "Job runs on `hostname`"
|
367
368
|
echo "at $SCRATCH_DIR"
|
368
369
|
mkdir $SCRATCH_DIR || exit 1
|
data/lib/sushi_fabric/version.rb
CHANGED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
4
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
5
|
+
# files.
|
6
|
+
#
|
7
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
8
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
9
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
10
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
11
|
+
# a separate helper file that requires the additional dependencies and performs
|
12
|
+
# the additional setup, and require it from the spec files that actually need
|
13
|
+
# it.
|
14
|
+
#
|
15
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
16
|
+
# users commonly want.
|
17
|
+
#
|
18
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
19
|
+
RSpec.configure do |config|
|
20
|
+
# rspec-expectations config goes here. You can use an alternate
|
21
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
22
|
+
# assertions if you prefer.
|
23
|
+
config.expect_with :rspec do |expectations|
|
24
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
25
|
+
# and `failure_message` of custom matchers include text for helper methods
|
26
|
+
# defined using `chain`, e.g.:
|
27
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
28
|
+
# # => "be bigger than 2 and smaller than 4"
|
29
|
+
# ...rather than:
|
30
|
+
# # => "be bigger than 2"
|
31
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
32
|
+
end
|
33
|
+
|
34
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
35
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
36
|
+
config.mock_with :rspec do |mocks|
|
37
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
38
|
+
# a real object. This is generally recommended, and will default to
|
39
|
+
# `true` in RSpec 4.
|
40
|
+
mocks.verify_partial_doubles = true
|
41
|
+
end
|
42
|
+
|
43
|
+
# The settings below are suggested to provide a good initial experience
|
44
|
+
# with RSpec, but feel free to customize to your heart's content.
|
45
|
+
=begin
|
46
|
+
# These two settings work together to allow you to limit a spec run
|
47
|
+
# to individual examples or groups you care about by tagging them with
|
48
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
49
|
+
# get run.
|
50
|
+
config.filter_run :focus
|
51
|
+
config.run_all_when_everything_filtered = true
|
52
|
+
|
53
|
+
# Allows RSpec to persist some state between runs in order to support
|
54
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
55
|
+
# you configure your source control system to ignore this file.
|
56
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
57
|
+
|
58
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
59
|
+
# recommended. For more details, see:
|
60
|
+
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
61
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
62
|
+
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
63
|
+
config.disable_monkey_patching!
|
64
|
+
|
65
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
66
|
+
# be too noisy due to issues in dependencies.
|
67
|
+
config.warnings = true
|
68
|
+
|
69
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
70
|
+
# file, and it's useful to allow more verbose output when running an
|
71
|
+
# individual spec file.
|
72
|
+
if config.files_to_run.one?
|
73
|
+
# Use the documentation formatter for detailed output,
|
74
|
+
# unless a formatter has already been configured
|
75
|
+
# (e.g. via a command-line flag).
|
76
|
+
config.default_formatter = 'doc'
|
77
|
+
end
|
78
|
+
|
79
|
+
# Print the 10 slowest examples and example groups at the
|
80
|
+
# end of the spec run, to help surface which specs are running
|
81
|
+
# particularly slow.
|
82
|
+
config.profile_examples = 10
|
83
|
+
|
84
|
+
# Run specs in random order to surface order dependencies. If you find an
|
85
|
+
# order dependency and want to debug it, you can fix the order by providing
|
86
|
+
# the seed, which is printed after each run.
|
87
|
+
# --seed 1234
|
88
|
+
config.order = :random
|
89
|
+
|
90
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
91
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
92
|
+
# test failures related to randomization by passing the same `--seed` value
|
93
|
+
# as the one that triggered the failure.
|
94
|
+
Kernel.srand config.seed
|
95
|
+
=end
|
96
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
require './lib/sushi_fabric/sushiApp'
|
5
|
+
|
6
|
+
include SushiFabric
|
7
|
+
describe SushiApp do
|
8
|
+
subject(:sushi_app) {SushiApp.new}
|
9
|
+
context 'when new' do
|
10
|
+
it {is_expected.to be_an_instance_of SushiApp}
|
11
|
+
end
|
12
|
+
describe "#job_header" do
|
13
|
+
subject{sushi_app.job_header}
|
14
|
+
let(:dataset) {{'Name' => 'Name'}}
|
15
|
+
let(:out) {double('out')}
|
16
|
+
before do
|
17
|
+
allow(out).to receive_messages(:print => nil)
|
18
|
+
sushi_app.instance_variable_set(:@out, out)
|
19
|
+
sushi_app.instance_variable_set(:@scratch_result_dir, 'scratch_result_dir')
|
20
|
+
sushi_app.instance_variable_set(:@dataset, dataset)
|
21
|
+
end
|
22
|
+
it {is_expected.to be_nil}
|
23
|
+
end
|
24
|
+
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: sushi_fabric
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.5.
|
5
|
+
version: 0.5.5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Functional Genomics Center Zurich
|
@@ -45,6 +45,7 @@ extra_rdoc_files: []
|
|
45
45
|
|
46
46
|
files:
|
47
47
|
- .gitignore
|
48
|
+
- .rspec
|
48
49
|
- Gemfile
|
49
50
|
- LICENSE.txt
|
50
51
|
- README.md
|
@@ -58,6 +59,8 @@ files:
|
|
58
59
|
- sample/WordCountApp.rb
|
59
60
|
- sample/sample_dataset.tsv
|
60
61
|
- sample/sample_parameterset.tsv
|
62
|
+
- spec/spec_helper.rb
|
63
|
+
- spec/sushi_app_spec.rb
|
61
64
|
- sushi_fabric.gemspec
|
62
65
|
homepage: ""
|
63
66
|
licenses:
|
@@ -86,5 +89,6 @@ rubygems_version: 1.8.23
|
|
86
89
|
signing_key:
|
87
90
|
specification_version: 3
|
88
91
|
summary: workflow manager client.
|
89
|
-
test_files:
|
90
|
-
|
92
|
+
test_files:
|
93
|
+
- spec/spec_helper.rb
|
94
|
+
- spec/sushi_app_spec.rb
|