knapsack_pro 0.56.0 → 0.57.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +79 -4
- data/lib/knapsack_pro.rb +2 -0
- data/lib/knapsack_pro/config/ci/app_veyor.rb +32 -0
- data/lib/knapsack_pro/config/ci/solano_ci.rb +32 -0
- data/lib/knapsack_pro/version.rb +1 -1
- data/spec/knapsack_pro/config/ci/app_veyor_spec.rb +73 -0
- data/spec/knapsack_pro/config/ci/solano_ci_spec.rb +73 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 653d33cf8cec36e3f29ba1e3f5c1fd2ccd791e2c5f28dc9f902c61f634f6b881
|
4
|
+
data.tar.gz: 838eef54f03ff2bc88d0c4553ff0c535fd232f9aa7986e4ecac8734cbc297e25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c969994628a4db7b5f55f97260902a8d5e7ee76396db08103592daeec3a391ff92ac1b3b0a00f32ab0af6e46f50d07b7a688feb3675a21f500bb207d919e1c83
|
7
|
+
data.tar.gz: 5c188e1d96c4caf3274cfff5c8f791e6a243d67d3abd7ad30f9ebb4c7b3e851be8f227ec86dcc4be0dbabc563e2c108d4e43832b1a3826a9935e0ef9e6519fc1
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
* TODO
|
4
4
|
|
5
|
+
### 0.57.0
|
6
|
+
|
7
|
+
* Add support for Solano CI and AppVeyor
|
8
|
+
|
9
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/pull/66
|
10
|
+
|
11
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v0.56.0...v0.57.0
|
12
|
+
|
5
13
|
### 0.56.0
|
6
14
|
|
7
15
|
* Add support for Cirrus CI
|
data/README.md
CHANGED
@@ -105,6 +105,8 @@ The knapsack_pro has also [queue mode](#queue-mode) to get an optimal test suite
|
|
105
105
|
- [Info for Gitlab CI users](#info-for-gitlab-ci-users)
|
106
106
|
- [Info for codeship.com users](#info-for-codeshipcom-users)
|
107
107
|
- [Info for Heroku CI users](#info-for-heroku-ci-users)
|
108
|
+
- [Info for Solano CI users](#info-for-solano-ci-users)
|
109
|
+
- [Info for AppVeyor users](#info-for-appveyor-users)
|
108
110
|
- [Info for snap-ci.com users](#info-for-snap-cicom-users)
|
109
111
|
- [Info for cirrus-ci.org users](#info-for-cirrus-ciorg-users)
|
110
112
|
- [Info for Jenkins users](#info-for-jenkins-users)
|
@@ -141,6 +143,8 @@ The knapsack_pro has also [queue mode](#queue-mode) to get an optimal test suite
|
|
141
143
|
- [How to use junit formatter?](#how-to-use-junit-formatter)
|
142
144
|
- [How to use junit formatter with knapsack_pro regular mode?](#how-to-use-junit-formatter-with-knapsack_pro-regular-mode)
|
143
145
|
- [How to use junit formatter with knapsack_pro queue mode?](#how-to-use-junit-formatter-with-knapsack_pro-queue-mode)
|
146
|
+
- [How to use junit formatter with knapsack_pro queue mode when CI nodes use common local drive?](#how-to-use-junit-formatter-with-knapsack_pro-queue-mode-when-ci-nodes-use-common-local-drive)
|
147
|
+
- [Why `tmp/rspec_final_results.xml` is corrupted when I use junit formatter with knapsack_pro queue mode?](#why-tmprspec_final_resultsxml-is-corrupted-when-i-use-junit-formatter-with-knapsack_pro-queue-mode)
|
144
148
|
- [How many API keys I need?](#how-many-api-keys-i-need)
|
145
149
|
- [What is optimal order of test commands?](#what-is-optimal-order-of-test-commands)
|
146
150
|
- [How to set `before(:suite)` and `after(:suite)` RSpec hooks in Queue Mode (Percy.io example)?](#how-to-set-beforesuite-and-aftersuite-rspec-hooks-in-queue-mode-percyio-example)
|
@@ -840,7 +844,7 @@ Knapsack Pro supports semaphoreapp ENVs `SEMAPHORE_THREAD_COUNT` and `SEMAPHORE_
|
|
840
844
|
|
841
845
|
Tests will be split across threads.
|
842
846
|
|
843
|
-
Please remember to set up token like `KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC` as global environment.
|
847
|
+
Please remember to set up API token like `KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC` as global environment.
|
844
848
|
|
845
849
|
#### Info for buildkite.com users
|
846
850
|
|
@@ -861,7 +865,7 @@ Knapsack Pro supports buildkite ENVs `BUILDKITE_PARALLEL_JOB_COUNT` and `BUILDKI
|
|
861
865
|
# Step for Spinach
|
862
866
|
bundle exec rake knapsack_pro:spinach
|
863
867
|
|
864
|
-
Please remember to set up token like `KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC` as global environment.
|
868
|
+
Please remember to set up API token like `KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC` as global environment.
|
865
869
|
|
866
870
|
Here you can find article [how to set up a new pipeline for your project in Buildkite and configure Knapsack Pro](http://docs.knapsackpro.com/2017/auto-balancing-7-hours-tests-between-100-parallel-jobs-on-ci-buildkite-example) and 2 example repositories for Ruby/Rails projects:
|
867
871
|
|
@@ -976,6 +980,68 @@ Note the [Heroku CI Parallel Test Runs](https://devcenter.heroku.com/articles/he
|
|
976
980
|
|
977
981
|
You can learn more about [Heroku CI](https://devcenter.heroku.com/articles/heroku-ci).
|
978
982
|
|
983
|
+
#### Info for Solano CI users
|
984
|
+
|
985
|
+
[Solano CI](https://www.solanolabs.com) does not provide parallel jobs environment variables so you will have to define `KNAPSACK_PRO_CI_NODE_TOTAL` and `KNAPSACK_PRO_CI_NODE_INDEX` for each parallel job running as part of the same CI build.
|
986
|
+
|
987
|
+
# Step for RSpec for first CI node
|
988
|
+
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=0 bundle exec rake knapsack_pro:rspec
|
989
|
+
# Step for RSpec for second CI node
|
990
|
+
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=1 bundle exec rake knapsack_pro:rspec
|
991
|
+
|
992
|
+
# Step for Cucumber for first CI node
|
993
|
+
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=0 bundle exec rake knapsack_pro:cucumber
|
994
|
+
# Step for Cucumber for second CI node
|
995
|
+
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=1 bundle exec rake knapsack_pro:cucumber
|
996
|
+
|
997
|
+
# Step for Minitest for first CI node
|
998
|
+
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=0 bundle exec rake knapsack_pro:minitest
|
999
|
+
# Step for Minitest for second CI node
|
1000
|
+
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=1 bundle exec rake knapsack_pro:minitest
|
1001
|
+
|
1002
|
+
# Step for test-unit for first CI node
|
1003
|
+
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=0 bundle exec rake knapsack_pro:test_unit
|
1004
|
+
# Step for test-unit for second CI node
|
1005
|
+
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=1 bundle exec rake knapsack_pro:test_unit
|
1006
|
+
|
1007
|
+
# Step for Spinach for first CI node
|
1008
|
+
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=0 bundle exec rake knapsack_pro:spinach
|
1009
|
+
# Step for Spinach for second CI node
|
1010
|
+
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=1 bundle exec rake knapsack_pro:spinach
|
1011
|
+
|
1012
|
+
Please remember to set up API token like `KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC` as global environment.
|
1013
|
+
|
1014
|
+
#### Info for AppVeyor users
|
1015
|
+
|
1016
|
+
[AppVeyor](https://www.appveyor.com) does not provide parallel jobs environment variables so you will have to define `KNAPSACK_PRO_CI_NODE_TOTAL` and `KNAPSACK_PRO_CI_NODE_INDEX` for each parallel job running as part of the same CI build.
|
1017
|
+
|
1018
|
+
# Step for RSpec for first CI node
|
1019
|
+
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=0 bundle exec rake knapsack_pro:rspec
|
1020
|
+
# Step for RSpec for second CI node
|
1021
|
+
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=1 bundle exec rake knapsack_pro:rspec
|
1022
|
+
|
1023
|
+
# Step for Cucumber for first CI node
|
1024
|
+
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=0 bundle exec rake knapsack_pro:cucumber
|
1025
|
+
# Step for Cucumber for second CI node
|
1026
|
+
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=1 bundle exec rake knapsack_pro:cucumber
|
1027
|
+
|
1028
|
+
# Step for Minitest for first CI node
|
1029
|
+
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=0 bundle exec rake knapsack_pro:minitest
|
1030
|
+
# Step for Minitest for second CI node
|
1031
|
+
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=1 bundle exec rake knapsack_pro:minitest
|
1032
|
+
|
1033
|
+
# Step for test-unit for first CI node
|
1034
|
+
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=0 bundle exec rake knapsack_pro:test_unit
|
1035
|
+
# Step for test-unit for second CI node
|
1036
|
+
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=1 bundle exec rake knapsack_pro:test_unit
|
1037
|
+
|
1038
|
+
# Step for Spinach for first CI node
|
1039
|
+
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=0 bundle exec rake knapsack_pro:spinach
|
1040
|
+
# Step for Spinach for second CI node
|
1041
|
+
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=1 bundle exec rake knapsack_pro:spinach
|
1042
|
+
|
1043
|
+
Please remember to set up API token like `KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC` as global environment.
|
1044
|
+
|
979
1045
|
#### Info for snap-ci.com users
|
980
1046
|
|
981
1047
|
Knapsack Pro supports snap-ci.com ENVs `SNAP_WORKER_TOTAL` and `SNAP_WORKER_INDEX`. The only thing you need to do is to configure number of workers for your project in configuration settings in order to enable parallelism. Next thing is to set below commands to be executed in your stage:
|
@@ -995,7 +1061,7 @@ Knapsack Pro supports snap-ci.com ENVs `SNAP_WORKER_TOTAL` and `SNAP_WORKER_INDE
|
|
995
1061
|
# Step for Spinach
|
996
1062
|
bundle exec rake knapsack_pro:spinach
|
997
1063
|
|
998
|
-
Please remember to set up token like `KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC` as global environment.
|
1064
|
+
Please remember to set up API token like `KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC` as global environment.
|
999
1065
|
|
1000
1066
|
#### Info for cirrus-ci.org users
|
1001
1067
|
|
@@ -1016,7 +1082,9 @@ Knapsack Pro supports cirrus-ci.org ENVs `CI_NODE_TOTAL` and `CI_NODE_INDEX`. Th
|
|
1016
1082
|
# Step for Spinach
|
1017
1083
|
bundle exec rake knapsack_pro:spinach
|
1018
1084
|
|
1019
|
-
Please remember to set up token like `KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC` as global environment.
|
1085
|
+
Please remember to set up API token like `KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC` as global environment.
|
1086
|
+
|
1087
|
+
Here is example for [`.cirrus.yml` configuration file](https://cirrus-ci.org/examples/#ruby).
|
1020
1088
|
|
1021
1089
|
#### Info for Jenkins users
|
1022
1090
|
|
@@ -1478,6 +1546,8 @@ The xml report will contain all tests executed across intermediate test subset r
|
|
1478
1546
|
end
|
1479
1547
|
end
|
1480
1548
|
|
1549
|
+
###### How to use junit formatter with knapsack_pro queue mode when CI nodes use common local drive?
|
1550
|
+
|
1481
1551
|
Note if you use a CI provider or your own CI solution that uses common local drive for all parallel CI nodes then above solution needs to be adjusted to produce report file with CI node index number in the file name to avoid file conflicts. Example file name with CI node index number: `tmp/rspec_final_results_N.xml`.
|
1482
1552
|
|
1483
1553
|
```
|
@@ -1508,6 +1578,11 @@ KnapsackPro::Hooks::Queue.after_subset_queue do |queue_id, subset_queue_id|
|
|
1508
1578
|
end
|
1509
1579
|
```
|
1510
1580
|
|
1581
|
+
###### Why `tmp/rspec_final_results.xml` is corrupted when I use junit formatter with knapsack_pro queue mode?
|
1582
|
+
|
1583
|
+
The `tmp/rspec_final_results.xml` might be corrupted due syntax error in your test suite. First check if your test suite is green.
|
1584
|
+
Another reason might be that you did not configure the junit formatter as shown in the example for Queue Mode. Please check above 2 questions & answers explaing that.
|
1585
|
+
|
1511
1586
|
#### How many API keys I need?
|
1512
1587
|
|
1513
1588
|
Basically you need as many API keys as you have steps in your build.
|
data/lib/knapsack_pro.rb
CHANGED
@@ -12,6 +12,7 @@ require_relative 'knapsack_pro/hooks/queue'
|
|
12
12
|
require_relative 'knapsack_pro/utils'
|
13
13
|
require_relative 'knapsack_pro/logger_wrapper'
|
14
14
|
require_relative 'knapsack_pro/config/ci/base'
|
15
|
+
require_relative 'knapsack_pro/config/ci/app_veyor'
|
15
16
|
require_relative 'knapsack_pro/config/ci/circle'
|
16
17
|
require_relative 'knapsack_pro/config/ci/cirrus_ci'
|
17
18
|
require_relative 'knapsack_pro/config/ci/gitlab_ci'
|
@@ -19,6 +20,7 @@ require_relative 'knapsack_pro/config/ci/semaphore'
|
|
19
20
|
require_relative 'knapsack_pro/config/ci/buildkite'
|
20
21
|
require_relative 'knapsack_pro/config/ci/travis'
|
21
22
|
require_relative 'knapsack_pro/config/ci/snap_ci'
|
23
|
+
require_relative 'knapsack_pro/config/ci/solano_ci'
|
22
24
|
require_relative 'knapsack_pro/config/ci/codeship'
|
23
25
|
require_relative 'knapsack_pro/config/ci/heroku'
|
24
26
|
require_relative 'knapsack_pro/config/env'
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# https://www.appveyor.com/docs/environment-variables/
|
2
|
+
module KnapsackPro
|
3
|
+
module Config
|
4
|
+
module CI
|
5
|
+
class AppVeyor < Base
|
6
|
+
def node_total
|
7
|
+
# not provided
|
8
|
+
end
|
9
|
+
|
10
|
+
def node_index
|
11
|
+
# not provided
|
12
|
+
end
|
13
|
+
|
14
|
+
def node_build_id
|
15
|
+
ENV['APPVEYOR_BUILD_ID']
|
16
|
+
end
|
17
|
+
|
18
|
+
def commit_hash
|
19
|
+
ENV['APPVEYOR_REPO_COMMIT']
|
20
|
+
end
|
21
|
+
|
22
|
+
def branch
|
23
|
+
ENV['APPVEYOR_REPO_BRANCH']
|
24
|
+
end
|
25
|
+
|
26
|
+
def project_dir
|
27
|
+
ENV['APPVEYOR_BUILD_FOLDER']
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# http://docs.solanolabs.com/Setup/tddium-set-environment-variables/
|
2
|
+
module KnapsackPro
|
3
|
+
module Config
|
4
|
+
module CI
|
5
|
+
class SolanoCI < Base
|
6
|
+
def node_total
|
7
|
+
# not provided
|
8
|
+
end
|
9
|
+
|
10
|
+
def node_index
|
11
|
+
# not provided
|
12
|
+
end
|
13
|
+
|
14
|
+
def node_build_id
|
15
|
+
ENV['TDDIUM_SESSION_ID']
|
16
|
+
end
|
17
|
+
|
18
|
+
def commit_hash
|
19
|
+
ENV['TDDIUM_CURRENT_COMMIT']
|
20
|
+
end
|
21
|
+
|
22
|
+
def branch
|
23
|
+
ENV['TDDIUM_CURRENT_BRANCH']
|
24
|
+
end
|
25
|
+
|
26
|
+
def project_dir
|
27
|
+
ENV['TDDIUM_REPO_ROOT']
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/knapsack_pro/version.rb
CHANGED
@@ -0,0 +1,73 @@
|
|
1
|
+
describe KnapsackPro::Config::CI::AppVeyor do
|
2
|
+
let(:env) { {} }
|
3
|
+
|
4
|
+
before do
|
5
|
+
stub_const('ENV', env)
|
6
|
+
end
|
7
|
+
|
8
|
+
it { should be_kind_of KnapsackPro::Config::CI::Base }
|
9
|
+
|
10
|
+
describe '#node_total' do
|
11
|
+
subject { described_class.new.node_total }
|
12
|
+
|
13
|
+
it { should be nil }
|
14
|
+
end
|
15
|
+
|
16
|
+
describe '#node_index' do
|
17
|
+
subject { described_class.new.node_index }
|
18
|
+
|
19
|
+
it { should be nil }
|
20
|
+
end
|
21
|
+
|
22
|
+
describe '#node_build_id' do
|
23
|
+
subject { described_class.new.node_build_id }
|
24
|
+
|
25
|
+
context 'when environment exists' do
|
26
|
+
let(:env) { { 'APPVEYOR_BUILD_ID' => 123 } }
|
27
|
+
it { should eql 123 }
|
28
|
+
end
|
29
|
+
|
30
|
+
context "when environment doesn't exist" do
|
31
|
+
it { should be nil }
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe '#commit_hash' do
|
36
|
+
subject { described_class.new.commit_hash }
|
37
|
+
|
38
|
+
context 'when environment exists' do
|
39
|
+
let(:env) { { 'APPVEYOR_REPO_COMMIT' => '2e13512fc230d6f9ebf4923352718e4d' } }
|
40
|
+
it { should eql '2e13512fc230d6f9ebf4923352718e4d' }
|
41
|
+
end
|
42
|
+
|
43
|
+
context "when environment doesn't exist" do
|
44
|
+
it { should be nil }
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
describe '#branch' do
|
49
|
+
subject { described_class.new.branch }
|
50
|
+
|
51
|
+
context 'when environment exists' do
|
52
|
+
let(:env) { { 'APPVEYOR_REPO_BRANCH' => 'master' } }
|
53
|
+
it { should eql 'master' }
|
54
|
+
end
|
55
|
+
|
56
|
+
context "when environment doesn't exist" do
|
57
|
+
it { should be nil }
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
describe '#project_dir' do
|
62
|
+
subject { described_class.new.project_dir }
|
63
|
+
|
64
|
+
context 'when environment exists' do
|
65
|
+
let(:env) { { 'APPVEYOR_BUILD_FOLDER' => '/path/to/clone/repo' } }
|
66
|
+
it { should eql '/path/to/clone/repo' }
|
67
|
+
end
|
68
|
+
|
69
|
+
context "when environment doesn't exist" do
|
70
|
+
it { should be nil }
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
describe KnapsackPro::Config::CI::SolanoCI do
|
2
|
+
let(:env) { {} }
|
3
|
+
|
4
|
+
before do
|
5
|
+
stub_const('ENV', env)
|
6
|
+
end
|
7
|
+
|
8
|
+
it { should be_kind_of KnapsackPro::Config::CI::Base }
|
9
|
+
|
10
|
+
describe '#node_total' do
|
11
|
+
subject { described_class.new.node_total }
|
12
|
+
|
13
|
+
it { should be nil }
|
14
|
+
end
|
15
|
+
|
16
|
+
describe '#node_index' do
|
17
|
+
subject { described_class.new.node_index }
|
18
|
+
|
19
|
+
it { should be nil }
|
20
|
+
end
|
21
|
+
|
22
|
+
describe '#node_build_id' do
|
23
|
+
subject { described_class.new.node_build_id }
|
24
|
+
|
25
|
+
context 'when environment exists' do
|
26
|
+
let(:env) { { 'TDDIUM_SESSION_ID' => 123 } }
|
27
|
+
it { should eql 123 }
|
28
|
+
end
|
29
|
+
|
30
|
+
context "when environment doesn't exist" do
|
31
|
+
it { should be nil }
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe '#commit_hash' do
|
36
|
+
subject { described_class.new.commit_hash }
|
37
|
+
|
38
|
+
context 'when environment exists' do
|
39
|
+
let(:env) { { 'TDDIUM_CURRENT_COMMIT' => '2e13512fc230d6f9ebf4923352718e4d' } }
|
40
|
+
it { should eql '2e13512fc230d6f9ebf4923352718e4d' }
|
41
|
+
end
|
42
|
+
|
43
|
+
context "when environment doesn't exist" do
|
44
|
+
it { should be nil }
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
describe '#branch' do
|
49
|
+
subject { described_class.new.branch }
|
50
|
+
|
51
|
+
context 'when environment exists' do
|
52
|
+
let(:env) { { 'TDDIUM_CURRENT_BRANCH' => 'master' } }
|
53
|
+
it { should eql 'master' }
|
54
|
+
end
|
55
|
+
|
56
|
+
context "when environment doesn't exist" do
|
57
|
+
it { should be nil }
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
describe '#project_dir' do
|
62
|
+
subject { described_class.new.project_dir }
|
63
|
+
|
64
|
+
context 'when environment exists' do
|
65
|
+
let(:env) { { 'TDDIUM_REPO_ROOT' => '/example/repo/root' } }
|
66
|
+
it { should eql '/example/repo/root' }
|
67
|
+
end
|
68
|
+
|
69
|
+
context "when environment doesn't exist" do
|
70
|
+
it { should be nil }
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knapsack_pro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.57.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ArturT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -233,6 +233,7 @@ files:
|
|
233
233
|
- lib/knapsack_pro/client/api/v1/build_subsets.rb
|
234
234
|
- lib/knapsack_pro/client/api/v1/queues.rb
|
235
235
|
- lib/knapsack_pro/client/connection.rb
|
236
|
+
- lib/knapsack_pro/config/ci/app_veyor.rb
|
236
237
|
- lib/knapsack_pro/config/ci/base.rb
|
237
238
|
- lib/knapsack_pro/config/ci/buildkite.rb
|
238
239
|
- lib/knapsack_pro/config/ci/circle.rb
|
@@ -242,6 +243,7 @@ files:
|
|
242
243
|
- lib/knapsack_pro/config/ci/heroku.rb
|
243
244
|
- lib/knapsack_pro/config/ci/semaphore.rb
|
244
245
|
- lib/knapsack_pro/config/ci/snap_ci.rb
|
246
|
+
- lib/knapsack_pro/config/ci/solano_ci.rb
|
245
247
|
- lib/knapsack_pro/config/ci/travis.rb
|
246
248
|
- lib/knapsack_pro/config/env.rb
|
247
249
|
- lib/knapsack_pro/config/env_generator.rb
|
@@ -312,6 +314,7 @@ files:
|
|
312
314
|
- spec/knapsack_pro/client/api/v1/build_subsets_spec.rb
|
313
315
|
- spec/knapsack_pro/client/api/v1/queues_spec.rb
|
314
316
|
- spec/knapsack_pro/client/connection_spec.rb
|
317
|
+
- spec/knapsack_pro/config/ci/app_veyor_spec.rb
|
315
318
|
- spec/knapsack_pro/config/ci/base_spec.rb
|
316
319
|
- spec/knapsack_pro/config/ci/buildkite_spec.rb
|
317
320
|
- spec/knapsack_pro/config/ci/circle_spec.rb
|
@@ -321,6 +324,7 @@ files:
|
|
321
324
|
- spec/knapsack_pro/config/ci/heroku_spec.rb
|
322
325
|
- spec/knapsack_pro/config/ci/semaphore_spec.rb
|
323
326
|
- spec/knapsack_pro/config/ci/snap_ci_spec.rb
|
327
|
+
- spec/knapsack_pro/config/ci/solano_ci_spec.rb
|
324
328
|
- spec/knapsack_pro/config/ci/travis_spec.rb
|
325
329
|
- spec/knapsack_pro/config/env_generator_spec.rb
|
326
330
|
- spec/knapsack_pro/config/env_spec.rb
|
@@ -415,6 +419,7 @@ test_files:
|
|
415
419
|
- spec/knapsack_pro/client/api/v1/build_subsets_spec.rb
|
416
420
|
- spec/knapsack_pro/client/api/v1/queues_spec.rb
|
417
421
|
- spec/knapsack_pro/client/connection_spec.rb
|
422
|
+
- spec/knapsack_pro/config/ci/app_veyor_spec.rb
|
418
423
|
- spec/knapsack_pro/config/ci/base_spec.rb
|
419
424
|
- spec/knapsack_pro/config/ci/buildkite_spec.rb
|
420
425
|
- spec/knapsack_pro/config/ci/circle_spec.rb
|
@@ -424,6 +429,7 @@ test_files:
|
|
424
429
|
- spec/knapsack_pro/config/ci/heroku_spec.rb
|
425
430
|
- spec/knapsack_pro/config/ci/semaphore_spec.rb
|
426
431
|
- spec/knapsack_pro/config/ci/snap_ci_spec.rb
|
432
|
+
- spec/knapsack_pro/config/ci/solano_ci_spec.rb
|
427
433
|
- spec/knapsack_pro/config/ci/travis_spec.rb
|
428
434
|
- spec/knapsack_pro/config/env_generator_spec.rb
|
429
435
|
- spec/knapsack_pro/config/env_spec.rb
|