knapsack_pro 0.35.0 → 0.36.0

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: '094b839e2b6fef614a4c91b10579d484ee7aef37'
4
- data.tar.gz: 1270f9dd4023504fa6fb4ab929ffeaccc605d529
3
+ metadata.gz: 8cc652e6837b671f2954c0ab3ab8119557fd7562
4
+ data.tar.gz: 84b5d915628454bb4de229af9e8b146d6f35a45d
5
5
  SHA512:
6
- metadata.gz: c8266d9534aa7f0f93dfbce4e7a3699a9363f2a256a8c22e7dd3410d0ba50c27a73dd29cbdfa3fd53159520dca455257a1925b33f7904812f4f4cbe6f19e46a0
7
- data.tar.gz: ad0ce91e958078a3884913aab721a9d08be79a0c22bbeaa387d1c16ff2a18a83f647d914e2d230a6b9aaf6627aa5e3bc173bc721ad0cb4ad6626d9e716a31dfa
6
+ metadata.gz: 4554fffac8f1e1c6f4f6ac4e36850e3c1f9fe8a16bdc25d8538532e0a713133c5d64adfda8bdc8733f775b697d8698e76f3817b8b882b487413399fca2a14d33
7
+ data.tar.gz: 51c5930337707e7a7d02e6a12577a6d366d9549b4cc2ea42820d5cec3485e950163db0501523c38b85daf0793873f9c231505cb7f3561e4417e240899f93f6e8
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  * TODO
4
4
 
5
+ ### 0.36.0
6
+
7
+ * Show messages about not executed test files as warnings in logs.
8
+
9
+ https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v0.35.0...v0.36.0
10
+
5
11
  ### 0.35.0
6
12
 
7
13
  * Add `RSpecQueueProfileFormatterExtension` to show profile summary only once at the very end of RSpec Queue Mode output.
data/README.md CHANGED
@@ -1025,9 +1025,13 @@ Below example is for rspec. You can change `$KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC
1025
1025
  if [ "$KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC" = "" ]; then
1026
1026
  KNAPSACK_PRO_ENDPOINT=https://api-disabled-for-fork.knapsackpro.com \
1027
1027
  KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC=disabled-for-fork \
1028
- bundle exec rake knapsack_pro:rspec
1028
+ bundle exec rake knapsack_pro:rspec # use Regular Mode here always
1029
1029
  else
1030
+ # Regular Mode
1030
1031
  bundle exec rake knapsack_pro:rspec
1032
+
1033
+ # You can use Queue Mode instead of Regular Mode if you like
1034
+ # bundle exec rake knapsack_pro:queue:rspec
1031
1035
  fi
1032
1036
  ```
1033
1037
 
@@ -4,7 +4,7 @@ module KnapsackPro
4
4
  test_files = KnapsackPro.tracker.to_a
5
5
 
6
6
  if test_files.empty?
7
- KnapsackPro.logger.info("No test files were executed on this CI node. When you use knapsack_pro regular mode then probably reason might be very narrowed tests list - you run only tests with specified tag and there are fewer test files with the tag than node total number.")
7
+ KnapsackPro.logger.warn("No test files were executed on this CI node. When you use knapsack_pro regular mode then probably reason might be very narrowed tests list - you run only tests with specified tag and there are fewer test files with the tag than node total number.")
8
8
  end
9
9
 
10
10
  create_build_subset(test_files)
@@ -35,7 +35,7 @@ module KnapsackPro
35
35
  end
36
36
 
37
37
  if test_files.empty?
38
- KnapsackPro.logger.info("No test files were executed on this CI node. When you use knapsack_pro queue mode then probably reason might be that CI node was started after the test files from the queue were already executed by other CI nodes. That is why this CI node has no test files to execute.")
38
+ KnapsackPro.logger.warn("No test files were executed on this CI node. When you use knapsack_pro queue mode then probably reason might be that CI node was started after the test files from the queue were already executed by other CI nodes. That is why this CI node has no test files to execute.")
39
39
  end
40
40
 
41
41
  create_build_subset(test_files)
@@ -18,7 +18,7 @@ module KnapsackPro
18
18
  end
19
19
 
20
20
  def stop_timer
21
- @execution_time = now_without_mock_time.to_f - @start_time
21
+ @execution_time = @start_time ? now_without_mock_time.to_f - @start_time : 0.0
22
22
  update_global_time
23
23
  update_test_file_time
24
24
  @execution_time
@@ -1,3 +1,3 @@
1
1
  module KnapsackPro
2
- VERSION = '0.35.0'
2
+ VERSION = '0.36.0'
3
3
  end
@@ -85,6 +85,22 @@ describe KnapsackPro::Tracker do
85
85
  it { expect(tracker.test_files_with_time['b_spec.rb']).to be_within(delta).of(0) }
86
86
  it_behaves_like '#to_a'
87
87
  end
88
+
89
+ # https://github.com/KnapsackPro/knapsack_pro-ruby/issues/32
90
+ context 'when start timer was not called (rspec-retry issue)' do
91
+ before do
92
+ test_paths.each_with_index do |test_path, index|
93
+ tracker.current_test_path = test_path
94
+ tracker.stop_timer
95
+ end
96
+ end
97
+
98
+ it { expect(tracker.global_time).to eq 0 }
99
+ it { expect(tracker.test_files_with_time.keys.size).to eql 2 }
100
+ it { expect(tracker.test_files_with_time['a_spec.rb']).to eq 0 }
101
+ it { expect(tracker.test_files_with_time['b_spec.rb']).to eq 0 }
102
+ it_behaves_like '#to_a'
103
+ end
88
104
  end
89
105
 
90
106
  describe '#reset!' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knapsack_pro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.35.0
4
+ version: 0.36.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ArturT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-01 00:00:00.000000000 Z
11
+ date: 2017-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake