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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 653d9e7ac72466dc9713aeee4d5b42af3e0f065a
4
- data.tar.gz: d67c45587bae5c80ea6ea74761918f8c4247a8d7
3
+ metadata.gz: d93cadf5bd18740988cc4826d0ed219129e2f80d
4
+ data.tar.gz: 05aaf96a027a95e2f50d76c106356471a99de891
5
5
  SHA512:
6
- metadata.gz: 343c3e23963c1d81159394870f4b18237ac31c55fe6cf01e27146479f71e019c99a49149934ec00c9d10b425180b8d370eb6bf2df9c6960bde5b5f0d2dbf2799
7
- data.tar.gz: 711f1ea47f5c2b657727b3ae2d722f459ba35efe8729e73d9e8f57995c1c3c1f88a5ea2d56092d27066fa6b8f650b7101c2c6fb3d1ad077ccbecbcb3ee37684d
6
+ metadata.gz: 11fcb7f4ce6dca8e1de5967427e6dedc0f6a5e8cbab736e748d834adccd0b66f6e07ee5d0c15158a4839492b14a63a39692c85059db3a5e9326f528347eddfbe
7
+ data.tar.gz: 7848784f3951d192a173dcb4c50ae8ad24be60ffa8aebe62d5dcd697cd27a226d318dcc4e95f1685aa0c37ec65c2d236e705bcfa642350282ca20ae26ed9cf4d
@@ -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
- unless example_group[:turnip]
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
@@ -1,3 +1,3 @@
1
1
  module Knapsack
2
- VERSION = '1.12.1'
2
+ VERSION = '1.12.2'
3
3
  end
@@ -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
- let(:current_example_metadata) do
102
- {
103
- file_path: "./spec/features/logging_in.feature",
104
- turnip: true,
105
- parent_example_group: {
106
- file_path: "gems/turnip-1.2.4/lib/turnip/rspec.rb",
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
- subject { described_class.test_path(current_example_metadata) }
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
- it { should eql './spec/features/logging_in.feature' }
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.1
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-09-25 00:00:00.000000000 Z
11
+ date: 2016-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake