knapsack 1.3.4 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +12 -0
- data/README.md +2 -2
- data/lib/knapsack/adapters/base_adapter.rb +1 -1
- data/lib/knapsack/adapters/cucumber_adapter.rb +1 -1
- data/lib/knapsack/adapters/minitest_adapter.rb +1 -1
- data/lib/knapsack/adapters/rspec_adapter.rb +7 -3
- data/lib/knapsack/runners/rspec_runner.rb +1 -1
- data/lib/knapsack/version.rb +1 -1
- data/spec/knapsack/adapters/rspec_adapter_spec.rb +1 -1
- data/spec/knapsack/allocator_builder_spec.rb +7 -1
- data/spec_examples/spec_helper.rb +1 -1
- 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: 8319351a256487728d985749b72592013e4300db
|
4
|
+
data.tar.gz: 685600b211177aa493dc3d607067d8553eb248f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e17a9f6638b01ff7c94df361a29be64a5ae9b7402bdf7bfe108b3f3531d3f6be80a081d3c2eb50c5ad24bdb89ba479b4e73f055e4a8ca2316ba66e39c646800
|
7
|
+
data.tar.gz: 51de58b779209637241afe7dbb131412073bd77be4a66cfaccccd0a68407dd29a938fab9ba2a3d8497d6ee25c1f675b15c9ee7d9703b02828407ebf76939741e
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
* TODO
|
4
4
|
|
5
|
+
### 1.4.0
|
6
|
+
|
7
|
+
* Rename RspecAdapter to RSpecAdapter so that it is consistent
|
8
|
+
|
9
|
+
https://github.com/ArturT/knapsack/pull/28
|
10
|
+
|
11
|
+
* Change file path patterns to support 1-level symlinks by default
|
12
|
+
|
13
|
+
https://github.com/ArturT/knapsack/pull/27
|
14
|
+
|
15
|
+
https://github.com/ArturT/knapsack/compare/v1.3.4...v1.4.0
|
16
|
+
|
5
17
|
### 1.3.4
|
6
18
|
|
7
19
|
* Make knapsack backwards compatible with earlier version of minitest
|
data/README.md
CHANGED
@@ -21,7 +21,7 @@ Presentations about gem:
|
|
21
21
|
* [X 2014 Kraków Ruby User Group](http://slides.com/arturt/parallel-tests-in-comparable-time)
|
22
22
|
* [VII 2014 Lunar Logic Dev Meeting](http://slides.com/arturt/knapsack)
|
23
23
|
|
24
|
-
**[
|
24
|
+
**Would you like to try [knapsack_pro gem](https://github.com/KnapsackPro/knapsack_pro-ruby) with more features and free access for beta users? Please [fill the form](https://docs.google.com/forms/d/1S8b5I-W2wr4_8C0tKu9AiW9y_5vq3SW9j2MMUql-hjE/viewform?c=0&w=1&hl=en).**
|
25
25
|
|
26
26
|
### Without Knapsack
|
27
27
|
|
@@ -107,7 +107,7 @@ require 'knapsack'
|
|
107
107
|
|
108
108
|
# CUSTOM_CONFIG_GOES_HERE
|
109
109
|
|
110
|
-
Knapsack::Adapters::
|
110
|
+
Knapsack::Adapters::RSpecAdapter.bind
|
111
111
|
```
|
112
112
|
|
113
113
|
### Step for Cucumber
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Knapsack
|
2
2
|
module Adapters
|
3
|
-
class
|
4
|
-
TEST_DIR_PATTERN = 'spec
|
3
|
+
class RSpecAdapter < BaseAdapter
|
4
|
+
TEST_DIR_PATTERN = 'spec/**{,/*/**}/*_spec.rb'
|
5
5
|
REPORT_PATH = 'knapsack_rspec_report.json'
|
6
6
|
|
7
7
|
def bind_time_tracker
|
@@ -13,7 +13,7 @@ module Knapsack
|
|
13
13
|
else
|
14
14
|
example.metadata
|
15
15
|
end
|
16
|
-
Knapsack.tracker.test_path =
|
16
|
+
Knapsack.tracker.test_path = RSpecAdapter.test_path(current_example_group)
|
17
17
|
Knapsack.tracker.start_timer
|
18
18
|
end
|
19
19
|
|
@@ -54,5 +54,9 @@ module Knapsack
|
|
54
54
|
example_group[:file_path]
|
55
55
|
end
|
56
56
|
end
|
57
|
+
|
58
|
+
# This is added to provide backwards compatabiliy
|
59
|
+
class RspecAdapter < RSpecAdapter
|
60
|
+
end
|
57
61
|
end
|
58
62
|
end
|
@@ -2,7 +2,7 @@ module Knapsack
|
|
2
2
|
module Runners
|
3
3
|
class RSpecRunner
|
4
4
|
def self.run(args)
|
5
|
-
allocator = Knapsack::AllocatorBuilder.new(Knapsack::Adapters::
|
5
|
+
allocator = Knapsack::AllocatorBuilder.new(Knapsack::Adapters::RSpecAdapter).allocator
|
6
6
|
|
7
7
|
puts
|
8
8
|
puts 'Report specs:'
|
data/lib/knapsack/version.rb
CHANGED
@@ -75,6 +75,12 @@ describe Knapsack::AllocatorBuilder do
|
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
|
+
context 'when RSpecAdapter' do
|
79
|
+
let(:adapter_class) { Knapsack::Adapters::RSpecAdapter }
|
80
|
+
it_behaves_like 'allocator builder'
|
81
|
+
end
|
82
|
+
|
83
|
+
# To make sure we do not break backwards compatibility
|
78
84
|
context 'when RspecAdapter' do
|
79
85
|
let(:adapter_class) { Knapsack::Adapters::RspecAdapter }
|
80
86
|
it_behaves_like 'allocator builder'
|
@@ -87,7 +93,7 @@ describe Knapsack::AllocatorBuilder do
|
|
87
93
|
end
|
88
94
|
|
89
95
|
describe '#test_dir' do
|
90
|
-
let(:adapter_class) { Knapsack::Adapters::
|
96
|
+
let(:adapter_class) { Knapsack::Adapters::RSpecAdapter }
|
91
97
|
|
92
98
|
subject { allocator_builder.test_dir }
|
93
99
|
|
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.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ArturT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|