knapsack 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -1
- data/.travis.yml +3 -0
- data/CHANGELOG.md +4 -0
- data/README.md +16 -1
- data/TODO.md +0 -1
- data/lib/knapsack/version.rb +1 -1
- data/lib/tasks/knapsack.rake +3 -2
- data/spec_examples/fast/1_spec.rb +1 -1
- data/spec_examples/leftover/1_spec.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: fa40f580898155eb65fe8e84fc8345a476a0a0ab
|
4
|
+
data.tar.gz: 62ff398b48201c72d6074a9e174955c317b52718
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2c797ee5e47d102f93bb618dbe2fe2bf1fdd9c5efefcb5c42e886f19382efdbef2292b1d7c0ace2fbb4716e060f3bf26e652e39acb7532f72873c3be33856e2
|
7
|
+
data.tar.gz: 42450a7369f6e9989b31975d54aa49c7f4b1341a1dff1d9fec37c66c9eef33acdc148870b3bc48f5708edeeb27fce107b0b38176070917dcee99a33404fce3d5
|
data/.rspec
CHANGED
data/.travis.yml
CHANGED
@@ -27,6 +27,9 @@ script:
|
|
27
27
|
- echo "Run rake task for the second CI node"
|
28
28
|
- CI_NODE_TOTAL=2 CI_NODE_INDEX=1 KNAPSACK_SPEC_PATTERN="spec_examples/**/*_spec.rb" bundle exec rake knapsack:rspec
|
29
29
|
|
30
|
+
- echo "Check passing arguments to rspec. Run only specs with custom_focus tag"
|
31
|
+
- KNAPSACK_SPEC_PATTERN="spec_examples/**/*_spec.rb" bundle exec rake "knapsack:rspec[--tag custom_focus]"
|
32
|
+
|
30
33
|
- echo "Run specs with custom knapsack logger"
|
31
34
|
- CUSTOM_LOGGER=true KNAPSACK_SPEC_PATTERN="spec_examples/**/*_spec.rb" bundle exec rake knapsack:rspec
|
32
35
|
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -16,7 +16,10 @@
|
|
16
16
|
|
17
17
|
Parallel specs across CI server nodes based on each spec file's time execution. Knapsack generates a spec time execution report and uses it for future test runs.
|
18
18
|
|
19
|
-
|
19
|
+
Presentations about gem:
|
20
|
+
|
21
|
+
* [2014 X Kraków Ruby User Group](http://slides.com/arturt/parallel-tests-in-comparable-time)
|
22
|
+
* [2014 VII Lunar Logic Dev Meeting](http://slides.com/arturt/knapsack)
|
20
23
|
|
21
24
|
**[Sign up](http://knapsack.launchrock.com) to get info about launch Knapsack Pro with more features and free access for beta users.**
|
22
25
|
|
@@ -96,6 +99,18 @@ You can set `KNAPSACK_REPORT_PATH` if your knapsack report was saved in non defa
|
|
96
99
|
|
97
100
|
`CI_NODE_INDEX` - index of current CI node starts from 0. Second CI node should have `CI_NODE_INDEX=1`.
|
98
101
|
|
102
|
+
### Passing arguments to rspec
|
103
|
+
|
104
|
+
Knapsack allows you to pass arguments through to rspec. For example if you want to run only specs that have the tag `focus`. If you do this with rspec directly it would look like:
|
105
|
+
|
106
|
+
$ bundle exec rake rspec --tag focus
|
107
|
+
|
108
|
+
To do this with Knapsack you simply add your rspec arguments as parameters to the knapsack rake task.
|
109
|
+
|
110
|
+
$ bundle exec rake "knapsack:rspec[--tag focus]"
|
111
|
+
|
112
|
+
Remember that using tags to limit which specs get run will affect the time each file takes to run. One solution to this is to generate a new `knapsack_report.json` for the commonly run scenarios.
|
113
|
+
|
99
114
|
### Info for CircleCI users
|
100
115
|
|
101
116
|
If you are using circleci.com you can omit `CI_NODE_TOTAL` and `CI_NODE_INDEX`. Knapsack will use `CIRCLE_NODE_TOTAL` and `CIRCLE_NODE_INDEX` provided by CircleCI.
|
data/TODO.md
CHANGED
data/lib/knapsack/version.rb
CHANGED
data/lib/tasks/knapsack.rake
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
require 'knapsack'
|
2
2
|
|
3
3
|
namespace :knapsack do
|
4
|
-
task :rspec do
|
4
|
+
task :rspec, [:rspec_args] do |t, args|
|
5
5
|
allocator = Knapsack::Allocator.new
|
6
|
+
rspec_args = args[:rspec_args]
|
6
7
|
|
7
8
|
puts
|
8
9
|
puts 'Report specs:'
|
@@ -12,7 +13,7 @@ namespace :knapsack do
|
|
12
13
|
puts allocator.leftover_node_specs
|
13
14
|
puts
|
14
15
|
|
15
|
-
cmd = %Q[bundle exec rspec --default-path #{allocator.spec_dir} -- #{allocator.stringify_node_specs}]
|
16
|
+
cmd = %Q[bundle exec rspec #{rspec_args} --default-path #{allocator.spec_dir} -- #{allocator.stringify_node_specs}]
|
16
17
|
|
17
18
|
exec(cmd)
|
18
19
|
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: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ArturT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|