knapsack_pro 1.16.1 → 1.17.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 +5 -0
- data/lib/knapsack_pro/config/env.rb +4 -0
- data/lib/knapsack_pro/runners/queue/cucumber_runner.rb +4 -1
- data/lib/knapsack_pro/version.rb +1 -1
- data/spec/knapsack_pro/config/env_spec.rb +14 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86141c7add4d4159437103ebcb72460961d1a2b7f69493f6c517bcd3160785a1
|
4
|
+
data.tar.gz: 257c9d52f6d1a43c1f92ad0e48eda4d3ec5753d684068a63ea19dcb46484f792
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ebc1c14cb430ca87497d946bfeb20d4a2c47f9c1f563663aeb0062192c453de84ab1455a6e109f870eed4a44e8b83a2757391e48c3338feebeccb01cce6ef3e
|
7
|
+
data.tar.gz: f407c9d6566e5cfe73a0198519e513a4d7aa1e55b2371bc3ca1aad6a5818526d16f41b8a1a69a50b3c4277d0272862ec5e59a9e8d5577597222c9d048ae6bb02
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
### 1.17.0
|
4
|
+
|
5
|
+
* Add `KNAPSACK_PRO_CUCUMBER_QUEUE_PREFIX` to allow run Cucumber with spring gem in Queue Mode
|
6
|
+
|
7
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/pull/98
|
8
|
+
|
9
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v1.16.1...v1.17.0
|
10
|
+
|
3
11
|
### 1.16.1
|
4
12
|
|
5
13
|
* Allow to use Queue Mode for old RSpec versions that don't have `RSpec.configuration.reset_filters` method
|
data/README.md
CHANGED
@@ -482,6 +482,11 @@ bundle exec rake knapsack_pro:queue:rspec
|
|
482
482
|
bundle exec rake knapsack_pro:queue:minitest
|
483
483
|
|
484
484
|
# Cucumber
|
485
|
+
# If you use spring gem and spring-commands-cucumber gem to start Cucumber tests faster please set
|
486
|
+
# export KNAPSACK_PRO_CUCUMBER_QUEUE_PREFIX=bundle exec spring
|
487
|
+
# or you can use spring binstub
|
488
|
+
# export KNAPSACK_PRO_CUCUMBER_QUEUE_PREFIX=bin/spring
|
489
|
+
# Thanks to that Cucumber will start tests faster for each batch of tests fetched from Knapsack Pro Queue API
|
485
490
|
bundle exec rake knapsack_pro:queue:cucumber
|
486
491
|
```
|
487
492
|
|
@@ -139,6 +139,10 @@ module KnapsackPro
|
|
139
139
|
ENV.fetch('KNAPSACK_PRO_FIXED_QUEUE_SPLIT', false)
|
140
140
|
end
|
141
141
|
|
142
|
+
def cucumber_queue_prefix
|
143
|
+
ENV.fetch('KNAPSACK_PRO_CUCUMBER_QUEUE_PREFIX', 'bundle exec')
|
144
|
+
end
|
145
|
+
|
142
146
|
def test_suite_token
|
143
147
|
env_name = 'KNAPSACK_PRO_TEST_SUITE_TOKEN'
|
144
148
|
ENV[env_name] || raise("Missing environment variable #{env_name}. You should set environment variable like #{env_name}_RSPEC (note there is suffix _RSPEC at the end). knapsack_pro gem will set #{env_name} based on #{env_name}_RSPEC value. If you use other test runner than RSpec then use proper suffix.")
|
@@ -79,7 +79,10 @@ module KnapsackPro
|
|
79
79
|
def self.cucumber_run(runner, test_file_paths, args)
|
80
80
|
stringify_test_file_paths = KnapsackPro::TestFilePresenter.stringify_paths(test_file_paths)
|
81
81
|
|
82
|
-
cmd =
|
82
|
+
cmd = [
|
83
|
+
KnapsackPro::Config::Env.cucumber_queue_prefix,
|
84
|
+
%Q[cucumber #{args} --require #{runner.test_dir} -- #{stringify_test_file_paths}]
|
85
|
+
].join(' ')
|
83
86
|
|
84
87
|
Kernel.system(cmd)
|
85
88
|
|
data/lib/knapsack_pro/version.rb
CHANGED
@@ -504,6 +504,20 @@ describe KnapsackPro::Config::Env do
|
|
504
504
|
end
|
505
505
|
end
|
506
506
|
|
507
|
+
describe '.cucumber_queue_prefix' do
|
508
|
+
subject { described_class.cucumber_queue_prefix }
|
509
|
+
|
510
|
+
context 'when ENV exists' do
|
511
|
+
before { stub_const("ENV", { 'KNAPSACK_PRO_CUCUMBER_QUEUE_PREFIX' => 'bundle exec spring' }) }
|
512
|
+
it { should eq 'bundle exec spring' }
|
513
|
+
end
|
514
|
+
|
515
|
+
context "when ENV doesn't exist" do
|
516
|
+
before { stub_const("ENV", {}) }
|
517
|
+
it { should eq 'bundle exec' }
|
518
|
+
end
|
519
|
+
end
|
520
|
+
|
507
521
|
describe '.test_suite_token' do
|
508
522
|
subject { described_class.test_suite_token }
|
509
523
|
|
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: 1.
|
4
|
+
version: 1.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ArturT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|