knapsack 1.3.3 → 1.3.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3884defa102a784ebc24edee1f7f0bce15e47c2
|
4
|
+
data.tar.gz: 54a6980e2ae231d9048a5d864a345995af50bba9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99669c6406a29636495159672d56dfe176ed4573c690929e18a8b092c54b269408ca3eecc76b005a6a5842d34496d08bb8cdcb644af01feeaca38d7deca87409
|
7
|
+
data.tar.gz: f09fbc5afeac38e7ec5a943e3527c049fb2f7b77c2df42dff9967f0db4840fb17a681fcbe052546ab36be9aaf6544648ecc1610b06cd7c816d20441358790a22
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
* TODO
|
4
4
|
|
5
|
+
### 1.3.4
|
6
|
+
|
7
|
+
* Make knapsack backwards compatible with earlier version of minitest
|
8
|
+
|
9
|
+
https://github.com/ArturT/knapsack/pull/26
|
10
|
+
|
11
|
+
https://github.com/ArturT/knapsack/compare/v1.3.3...v1.3.4
|
12
|
+
|
5
13
|
### 1.3.3
|
6
14
|
|
7
15
|
* Fix wrong dependency for timecop
|
@@ -23,20 +23,20 @@ module Knapsack
|
|
23
23
|
def bind_time_tracker
|
24
24
|
::Minitest::Test.send(:include, BindTimeTrackerMinitestPlugin)
|
25
25
|
|
26
|
-
|
26
|
+
add_post_run_callback do
|
27
27
|
Knapsack.logger.info(Presenter.global_time)
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
31
|
def bind_report_generator
|
32
|
-
|
32
|
+
add_post_run_callback do
|
33
33
|
Knapsack.report.save
|
34
34
|
Knapsack.logger.info(Presenter.report_details)
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
38
|
def bind_time_offset_warning
|
39
|
-
|
39
|
+
add_post_run_callback do
|
40
40
|
Knapsack.logger.warn(Presenter.time_offset_warning)
|
41
41
|
end
|
42
42
|
end
|
@@ -47,7 +47,8 @@ module Knapsack
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def self.test_path(obj)
|
50
|
-
|
50
|
+
# Pick the first public method in the class itself, that starts with "test_"
|
51
|
+
test_method_name = obj.public_methods(false).select{|m| m =~ /^test_/ }.first
|
51
52
|
method_object = obj.method(test_method_name)
|
52
53
|
full_test_path = method_object.source_location.first
|
53
54
|
parent_of_test_dir_regexp = Regexp.new("^#{@@parent_of_test_dir}")
|
@@ -55,6 +56,16 @@ module Knapsack
|
|
55
56
|
# test_path will look like ./test/dir/unit_test.rb
|
56
57
|
test_path
|
57
58
|
end
|
59
|
+
|
60
|
+
private
|
61
|
+
|
62
|
+
def add_post_run_callback(&block)
|
63
|
+
if Minitest.respond_to?(:after_run)
|
64
|
+
Minitest.after_run { block.call }
|
65
|
+
else
|
66
|
+
Minitest::Unit.after_tests { block.call }
|
67
|
+
end
|
68
|
+
end
|
58
69
|
end
|
59
70
|
end
|
60
71
|
end
|
@@ -15,7 +15,7 @@ module Knapsack
|
|
15
15
|
cmd = %Q[bundle exec rspec #{args} --default-path #{allocator.test_dir} -- #{allocator.stringify_node_tests}]
|
16
16
|
|
17
17
|
system(cmd)
|
18
|
-
exit($?.exitstatus) unless $?.exitstatus
|
18
|
+
exit($?.exitstatus) unless $?.exitstatus.zero?
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
data/lib/knapsack/version.rb
CHANGED
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.3.
|
4
|
+
version: 1.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ArturT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|