knapsack 1.12.1 → 1.12.2
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 +8 -0
- data/lib/knapsack/adapters/rspec_adapter.rb +7 -1
- data/lib/knapsack/version.rb +1 -1
- data/spec/knapsack/adapters/rspec_adapter_spec.rb +27 -9
- 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: d93cadf5bd18740988cc4826d0ed219129e2f80d
|
4
|
+
data.tar.gz: 05aaf96a027a95e2f50d76c106356471a99de891
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11fcb7f4ce6dca8e1de5967427e6dedc0f6a5e8cbab736e748d834adccd0b66f6e07ee5d0c15158a4839492b14a63a39692c85059db3a5e9326f528347eddfbe
|
7
|
+
data.tar.gz: 7848784f3951d192a173dcb4c50ae8ad24be60ffa8aebe62d5dcd697cd27a226d318dcc4e95f1685aa0c37ec65c2d236e705bcfa642350282ca20ae26ed9cf4d
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
* TODO
|
4
4
|
|
5
|
+
### 1.12.2
|
6
|
+
|
7
|
+
* Fix support for turnip >= 2.x
|
8
|
+
|
9
|
+
https://github.com/ArturT/knapsack/pull/47
|
10
|
+
|
11
|
+
https://github.com/ArturT/knapsack/compare/v1.12.1...v1.12.2
|
12
|
+
|
5
13
|
### 1.12.1
|
6
14
|
|
7
15
|
* Cucumber and Spinach should load files from proper folder in case when you use custom test directory.
|
data/README.md
CHANGED
@@ -16,6 +16,14 @@
|
|
16
16
|
|
17
17
|
Parallel tests across CI server nodes based on each test file's time execution. Knapsack generates a test time execution report and uses it for future test runs.
|
18
18
|
|
19
|
+
The knapsack gem supports:
|
20
|
+
|
21
|
+
* [RSpec](http://rspec.info)
|
22
|
+
* [Cucumber](https://cucumber.io)
|
23
|
+
* [Minitest](http://docs.seattlerb.org/minitest/)
|
24
|
+
* [Spinach](https://github.com/codegram/spinach)
|
25
|
+
* [Turnip](https://github.com/jnicklas/turnip)
|
26
|
+
|
19
27
|
### Without Knapsack
|
20
28
|
|
21
29
|
![Without Knapsack gem](docs/images/without_knapsack.png)
|
@@ -48,7 +48,13 @@ module Knapsack
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def self.test_path(example_group)
|
51
|
-
|
51
|
+
if defined?(Turnip) && Turnip::VERSION.to_i < 2
|
52
|
+
unless example_group[:turnip]
|
53
|
+
until example_group[:parent_example_group].nil?
|
54
|
+
example_group = example_group[:parent_example_group]
|
55
|
+
end
|
56
|
+
end
|
57
|
+
else
|
52
58
|
until example_group[:parent_example_group].nil?
|
53
59
|
example_group = example_group[:parent_example_group]
|
54
60
|
end
|
data/lib/knapsack/version.rb
CHANGED
@@ -98,19 +98,37 @@ describe Knapsack::Adapters::RSpecAdapter do
|
|
98
98
|
it { should eql 'a_spec.rb' }
|
99
99
|
|
100
100
|
context 'with turnip features' do
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
101
|
+
describe 'when the turnip version is less than 2' do
|
102
|
+
let(:current_example_metadata) do
|
103
|
+
{
|
104
|
+
file_path: "./spec/features/logging_in.feature",
|
105
|
+
turnip: true,
|
106
|
+
parent_example_group: {
|
107
|
+
file_path: "gems/turnip-1.2.4/lib/turnip/rspec.rb"
|
108
|
+
}
|
107
109
|
}
|
108
|
-
|
110
|
+
end
|
111
|
+
|
112
|
+
before { stub_const("Turnip::VERSION", '1.2.4') }
|
113
|
+
|
114
|
+
it { should eql './spec/features/logging_in.feature' }
|
109
115
|
end
|
110
116
|
|
111
|
-
|
117
|
+
describe 'when turnip is version 2 or greater' do
|
118
|
+
let(:current_example_metadata) do
|
119
|
+
{
|
120
|
+
file_path: "gems/turnip-2.0.0/lib/turnip/rspec.rb",
|
121
|
+
turnip: true,
|
122
|
+
parent_example_group: {
|
123
|
+
file_path: "./spec/features/logging_in.feature",
|
124
|
+
}
|
125
|
+
}
|
126
|
+
end
|
112
127
|
|
113
|
-
|
128
|
+
before { stub_const("Turnip::VERSION", '2.0.0') }
|
129
|
+
|
130
|
+
it { should eql './spec/features/logging_in.feature' }
|
131
|
+
end
|
114
132
|
end
|
115
133
|
end
|
116
134
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knapsack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.12.
|
4
|
+
version: 1.12.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ArturT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|