knapsack_pro 6.0.2 → 6.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 01f99e32731d4f72887d579cffe6f72dc955f8b18fa3527edd4c20a33290fb22
4
- data.tar.gz: bafeb90b8e27a7a8ad6d5cac4820947810887227646502f96a4a110eec205eb6
3
+ metadata.gz: 5e14f8999c37f913f26b9d52a4c5968f25d9c3f7d3a6f91442e140619d5eb986
4
+ data.tar.gz: 58350583c0545e48f7deb7b2bf78f951124f87b35f734627400794479c3a53b2
5
5
  SHA512:
6
- metadata.gz: 66ce104356dab398f399b4a882eb7a296ba02fcfec84b025776cdcfb306c42a7ae3d1d35b9027ca5ff91e45d8f99cf1b1ea9201bfdddcb949397b7bb37f998d3
7
- data.tar.gz: 3947753ad22f500d9a8102fd5183f07dec1cb9fef884894da3da28bf03a8e7259cb88b0d8139893874db4367568f7a2b648d77276bd5f118cbc4afa6671eea63
6
+ metadata.gz: 3ee99fbf40d75acbaf3af791947a87a2e7d547638e99dd04666133e3f4c7addc33f8e91f610fb055b3fd8d47bfadb8e9257dfa0ef65ec16042b0ac7dfb51b727
7
+ data.tar.gz: 3adfda6f4cfb3761b497da0d2aeb688fe70efc65334da29b70fb0af3ff0a480dcf83714d11c3b126bcdc1218fa46c1b3f88264090bf204f310dc332512b077b8
data/.circleci/config.yml CHANGED
@@ -1,45 +1,331 @@
1
- # Ruby CircleCI 2.0 configuration file
2
- #
3
- # Check https://circleci.com/docs/2.0/language-ruby/ for more details
4
- #
5
- version: 2
6
- jobs:
7
- build:
8
- parallelism: 1
9
- docker:
10
- # specify the version you desire here
11
- # https://circleci.com/developer/images/image/cimg/ruby
12
- - image: cimg/ruby:3.2.1
13
- environment:
14
- CODECLIMATE_REPO_TOKEN: b6626e682a8e97e0c5978febc92c3526792a2d018b41b8e1b52689da37fb7d92
15
-
16
- working_directory: ~/knapsack_pro-ruby
1
+ version: 2.1
17
2
 
3
+ commands:
4
+ setup_knapsack_pro_ruby:
18
5
  steps:
19
6
  - checkout
20
-
21
- # Download and cache dependencies
22
7
  - restore_cache:
23
8
  keys:
24
- - v2-dependencies-bundler-{{ checksum "knapsack_pro.gemspec" }}
25
- # fallback to using the latest cache if no exact match is found
26
- - v2-dependencies-bundler-
27
-
9
+ - v1-bundler-ruby-{{ checksum "knapsack_pro.gemspec" }}
10
+ - v1-bundler-ruby-
28
11
  - run:
29
- name: install ruby dependencies
30
12
  command: |
31
- bundle install --jobs=4 --retry=3 --path vendor/bundle
32
-
33
- - run: gem install rubocop
34
-
13
+ bundle config set --local path './vendor/bundle'
14
+ bundle install --jobs=4 --retry=3
35
15
  - save_cache:
36
16
  paths:
37
17
  - ./vendor/bundle
38
- key: v2-dependencies-bundler-{{ checksum "knapsack_pro.gemspec" }}
18
+ key: v1-bundler-ruby-{{ checksum "knapsack_pro.gemspec" }}
39
19
 
40
- # enforce `frozen_string_literal: true` in the gem files
41
- - run: rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment lib/
20
+ setup_rails_app_with_knapsack_pro:
21
+ parameters:
22
+ path:
23
+ type: string
24
+ ruby:
25
+ type: string
26
+ rspec:
27
+ type: string
28
+ default: ""
29
+ steps:
30
+ - run:
31
+ working_directory: << parameters.path >>
32
+ command: |
33
+ git clone --depth 1 --branch $CIRCLE_BRANCH --single-branch git@github.com:KnapsackPro/rails-app-with-knapsack_pro.git ./ || git clone --depth 1 git@github.com:KnapsackPro/rails-app-with-knapsack_pro.git ./
34
+ if [[ "<< parameters.rspec >>" != "" ]]; then
35
+ sed -i 's/.*gem.*rspec-core.*/gem "rspec-core", "<< parameters.rspec >>"/g' ./Gemfile
36
+ echo "Updated RSpec version in Gemfile"
37
+ fi
38
+ - restore_cache:
39
+ keys:
40
+ - v1-bundler-rails-{{ checksum "Gemfile.lock" }}-<< parameters.ruby >>
41
+ - v1-bundler-rails-{{ checksum "Gemfile.lock" }}-
42
+ - v1-bundler-rails-
43
+ - run:
44
+ working_directory: << parameters.path >>
45
+ command: |
46
+ bundle config set --local path './vendor/bundle'
47
+ bundle install --jobs=4 --retry=3
48
+ - save_cache:
49
+ paths:
50
+ - << parameters.path >>/vendor/bundle
51
+ key: v1-bundler-rails-{{ checksum "Gemfile.lock" }}-<< parameters.ruby >>
42
52
 
53
+ jobs:
54
+ unit:
55
+ parallelism: 1
56
+ working_directory: ~/knapsack_pro-ruby
57
+ docker:
58
+ - image: cimg/ruby:3.2
59
+ steps:
60
+ - setup_knapsack_pro_ruby
61
+ - run: gem install rubocop
62
+ - run: rubocop --fail-level A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment lib/
43
63
  - run: bundle exec rspec spec
44
-
45
64
  - run: bundle exec ruby spec/knapsack_pro/formatters/time_tracker_specs.rb
65
+
66
+ integration-regular-rspec:
67
+ parallelism: 2
68
+ working_directory: ~/knapsack_pro-ruby
69
+ parameters:
70
+ ruby:
71
+ type: string
72
+ rspec:
73
+ type: string
74
+ docker:
75
+ - image: cimg/ruby:<< parameters.ruby >>-browsers
76
+ environment:
77
+ PGHOST: 127.0.0.1
78
+ PGUSER: rails-app-with-knapsack_pro
79
+ RAILS_ENV: test
80
+ RACK_ENV: test
81
+ KNAPSACK_PRO_ENDPOINT: https://api-staging.knapsackpro.com
82
+ KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC: $KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC
83
+ EXTRA_TEST_FILES_DELAY: 10
84
+ - image: cimg/postgres:14.7
85
+ environment:
86
+ POSTGRES_DB: rails-app-with-knapsack_pro_test
87
+ POSTGRES_PASSWORD: password
88
+ POSTGRES_USER: rails-app-with-knapsack_pro
89
+ steps:
90
+ - setup_knapsack_pro_ruby
91
+ - setup_rails_app_with_knapsack_pro:
92
+ path: ~/rails-app-with-knapsack_pro
93
+ ruby: << parameters.ruby >>
94
+ rspec: << parameters.rspec >>
95
+ - run: dockerize -wait tcp://localhost:5432 -timeout 1m
96
+ - run:
97
+ working_directory: ~/rails-app-with-knapsack_pro
98
+ command: |
99
+ ruby --version
100
+ bundle exec rspec --version
101
+ RSPEC=$(bundle exec rspec --version | grep rspec-core | head -n1 | cut -d " " -f5)
102
+ [ $RSPEC != << parameters.rspec >> ] && exit 1 || echo "Correct version of RSpec installed: $RSPEC"
103
+ - run:
104
+ working_directory: ~/rails-app-with-knapsack_pro
105
+ command: bin/rails db:setup
106
+ - run:
107
+ working_directory: ~/rails-app-with-knapsack_pro
108
+ command: |
109
+ export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--regular"
110
+ bundle exec rake knapsack_pro:rspec
111
+ - run:
112
+ working_directory: ~/rails-app-with-knapsack_pro
113
+ command: |
114
+ # fallback ||
115
+ export KNAPSACK_PRO_ENDPOINT=https://api-fake.knapsackpro.com
116
+ export KNAPSACK_PRO_MAX_REQUEST_RETRIES=1
117
+ bundle exec rake knapsack_pro:rspec
118
+ - run:
119
+ working_directory: ~/rails-app-with-knapsack_pro
120
+ command: |
121
+ # split by test examples ||
122
+ export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--regular--split"
123
+ export KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES=true
124
+ bundle exec rake knapsack_pro:rspec
125
+
126
+ integration-queue-rspec:
127
+ parameters:
128
+ ruby:
129
+ type: string
130
+ rspec:
131
+ type: string
132
+ parallelism: 2
133
+ working_directory: ~/knapsack_pro-ruby
134
+ docker:
135
+ - image: cimg/ruby:<< parameters.ruby >>-browsers
136
+ environment:
137
+ PGHOST: 127.0.0.1
138
+ PGUSER: rails-app-with-knapsack_pro
139
+ RAILS_ENV: test
140
+ RACK_ENV: test
141
+ KNAPSACK_PRO_ENDPOINT: https://api-staging.knapsackpro.com
142
+ KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC: $KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC
143
+ EXTRA_TEST_FILES_DELAY: 10
144
+ - image: cimg/postgres:14.7
145
+ environment:
146
+ POSTGRES_DB: rails-app-with-knapsack_pro_test
147
+ POSTGRES_PASSWORD: password
148
+ POSTGRES_USER: rails-app-with-knapsack_pro
149
+ steps:
150
+ - setup_knapsack_pro_ruby
151
+ - setup_rails_app_with_knapsack_pro:
152
+ path: ~/rails-app-with-knapsack_pro
153
+ ruby: << parameters.ruby >>
154
+ rspec: << parameters.rspec >>
155
+ - run: dockerize -wait tcp://localhost:5432 -timeout 1m
156
+ - run:
157
+ working_directory: ~/rails-app-with-knapsack_pro
158
+ command: |
159
+ ruby --version
160
+ bundle exec rspec --version
161
+ RSPEC=$(bundle exec rspec --version | grep rspec-core | head -n1 | cut -d " " -f5)
162
+ [ $RSPEC != << parameters.rspec >> ] && exit 1 || echo "Correct version of RSpec installed: $RSPEC"
163
+ - run:
164
+ working_directory: ~/rails-app-with-knapsack_pro
165
+ command: bin/rails db:setup
166
+ - run:
167
+ working_directory: ~/rails-app-with-knapsack_pro
168
+ command: |
169
+ export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--queue"
170
+ bundle exec rake knapsack_pro:queue:rspec
171
+ - run:
172
+ working_directory: ~/rails-app-with-knapsack_pro
173
+ command: |
174
+ # run 0 tests as queue is consumed ||
175
+ export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--queue"
176
+ export KNAPSACK_PRO_FIXED_QUEUE_SPLIT=false
177
+ bundle exec rake knapsack_pro:queue:rspec
178
+ - run:
179
+ working_directory: ~/rails-app-with-knapsack_pro
180
+ command: |
181
+ # retry the same split ||
182
+ export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--queue"
183
+ export KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true
184
+ bundle exec rake knapsack_pro:queue:rspec
185
+ - run:
186
+ working_directory: ~/rails-app-with-knapsack_pro
187
+ command: |
188
+ # fallback ||
189
+ export KNAPSACK_PRO_ENDPOINT=https://api-fake.knapsackpro.com
190
+ export KNAPSACK_PRO_MAX_REQUEST_RETRIES=1
191
+ bundle exec rake knapsack_pro:queue:rspec
192
+ - run:
193
+ working_directory: ~/rails-app-with-knapsack_pro
194
+ command: |
195
+ # split by test examples ||
196
+ export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--queue--split"
197
+ export KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true
198
+ export KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES=true
199
+ bundle exec rake knapsack_pro:queue:rspec
200
+ - run:
201
+ working_directory: ~/rails-app-with-knapsack_pro
202
+ command: |
203
+ # turnip ||
204
+ export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--queue--turnip"
205
+ export KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true
206
+ export KNAPSACK_PRO_TEST_DIR=turnip
207
+ export KNAPSACK_PRO_TEST_FILE_PATTERN="turnip/**/*.feature"
208
+ bundle exec rake "knapsack_pro:queue:rspec[-r turnip/rspec]"
209
+ - run:
210
+ working_directory: ~/rails-app-with-knapsack_pro
211
+ command: |
212
+ # turnip retry ||
213
+ export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--queue--turnip"
214
+ export KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true
215
+ export KNAPSACK_PRO_TEST_DIR=turnip
216
+ export KNAPSACK_PRO_TEST_FILE_PATTERN="turnip/**/*.feature"
217
+ bundle exec rake "knapsack_pro:queue:rspec[-r turnip/rspec]"
218
+
219
+ integration-regular-minitest:
220
+ parallelism: 2
221
+ working_directory: ~/knapsack_pro-ruby
222
+ parameters:
223
+ ruby:
224
+ type: string
225
+ docker:
226
+ - image: cimg/ruby:<< parameters.ruby >>-browsers
227
+ environment:
228
+ PGHOST: 127.0.0.1
229
+ PGUSER: rails-app-with-knapsack_pro
230
+ RAILS_ENV: test
231
+ RACK_ENV: test
232
+ KNAPSACK_PRO_ENDPOINT: https://api-staging.knapsackpro.com
233
+ KNAPSACK_PRO_TEST_SUITE_TOKEN_MINITEST: $KNAPSACK_PRO_TEST_SUITE_TOKEN_MINITEST
234
+ EXTRA_TEST_FILES_DELAY: 10
235
+ - image: cimg/postgres:14.7
236
+ environment:
237
+ POSTGRES_DB: rails-app-with-knapsack_pro_test
238
+ POSTGRES_PASSWORD: password
239
+ POSTGRES_USER: rails-app-with-knapsack_pro
240
+ steps:
241
+ - setup_knapsack_pro_ruby
242
+ - setup_rails_app_with_knapsack_pro:
243
+ path: ~/rails-app-with-knapsack_pro
244
+ ruby: << parameters.ruby >>
245
+ - run: dockerize -wait tcp://localhost:5432 -timeout 1m
246
+ - run:
247
+ working_directory: ~/rails-app-with-knapsack_pro
248
+ command: ruby --version
249
+ - run:
250
+ working_directory: ~/rails-app-with-knapsack_pro
251
+ command: bin/rails db:setup
252
+ - run:
253
+ working_directory: ~/rails-app-with-knapsack_pro
254
+ command: |
255
+ export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--regular"
256
+ bundle exec rake knapsack_pro:minitest[--verbose]
257
+
258
+ integration-queue-minitest:
259
+ parameters:
260
+ ruby:
261
+ type: string
262
+ parallelism: 2
263
+ working_directory: ~/knapsack_pro-ruby
264
+ docker:
265
+ - image: cimg/ruby:<< parameters.ruby >>-browsers
266
+ environment:
267
+ PGHOST: 127.0.0.1
268
+ PGUSER: rails-app-with-knapsack_pro
269
+ RAILS_ENV: test
270
+ RACK_ENV: test
271
+ KNAPSACK_PRO_ENDPOINT: https://api-staging.knapsackpro.com
272
+ KNAPSACK_PRO_TEST_SUITE_TOKEN_MINITEST: $KNAPSACK_PRO_TEST_SUITE_TOKEN_MINITEST
273
+ EXTRA_TEST_FILES_DELAY: 10
274
+ - image: cimg/postgres:14.7
275
+ environment:
276
+ POSTGRES_DB: rails-app-with-knapsack_pro_test
277
+ POSTGRES_PASSWORD: password
278
+ POSTGRES_USER: rails-app-with-knapsack_pro
279
+ steps:
280
+ - setup_knapsack_pro_ruby
281
+ - setup_rails_app_with_knapsack_pro:
282
+ path: ~/rails-app-with-knapsack_pro
283
+ ruby: << parameters.ruby >>
284
+ - run: dockerize -wait tcp://localhost:5432 -timeout 1m
285
+ - run:
286
+ working_directory: ~/rails-app-with-knapsack_pro
287
+ command: ruby --version
288
+ - run:
289
+ working_directory: ~/rails-app-with-knapsack_pro
290
+ command: bin/rails db:setup
291
+ - run:
292
+ working_directory: ~/rails-app-with-knapsack_pro
293
+ command: |
294
+ # minitest ||
295
+ export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--queue--minitest"
296
+ export KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true
297
+ bundle exec rake knapsack_pro:queue:minitest[--verbose]
298
+ - run:
299
+ working_directory: ~/rails-app-with-knapsack_pro
300
+ command: |
301
+ # minitest retry ||
302
+ export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--queue--minitest"
303
+ export KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true
304
+ bundle exec rake knapsack_pro:queue:minitest[--verbose]
305
+
306
+ workflows:
307
+ tests:
308
+ jobs:
309
+ - unit
310
+ - integration-regular-rspec:
311
+ name: integration-regular__ruby-<< matrix.ruby >>__rspec-<< matrix.rspec >>
312
+ matrix:
313
+ parameters:
314
+ ruby: ["3.0", "3.1", "3.2"]
315
+ rspec: ["3.10.2", "3.11.0", "3.12.2"]
316
+ - integration-queue-rspec:
317
+ name: integration-queue__ruby-<< matrix.ruby >>__rspec-<< matrix.rspec >>
318
+ matrix:
319
+ parameters:
320
+ ruby: ["3.0", "3.1", "3.2"]
321
+ rspec: ["3.10.2", "3.11.0", "3.12.2"]
322
+ - integration-regular-minitest:
323
+ name: integration-regular__ruby-<< matrix.ruby >>__minitest
324
+ matrix:
325
+ parameters:
326
+ ruby: ["3.0", "3.1", "3.2"]
327
+ - integration-queue-minitest:
328
+ name: integration-queue__ruby-<< matrix.ruby >>__minitest
329
+ matrix:
330
+ parameters:
331
+ ruby: ["3.0", "3.1", "3.2"]
data/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ### 6.0.4
4
+
5
+ * fix(minitest): avoid installing `at_exit` (that would result in an empty run of Minitest after Knapsack Pro is finished in Queue Mode)
6
+
7
+ https://github.com/KnapsackPro/knapsack_pro-ruby/pull/236
8
+
9
+ https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v6.0.3...v6.0.4
10
+
11
+ ### 6.0.3
12
+
13
+ * fix(Turnip): make sure `.feature` files are recorded
14
+ * fix(RSpec): stop recording `UNKNOWN_PATH` that would generate an error in case of a CI node retry
15
+
16
+ https://github.com/KnapsackPro/knapsack_pro-ruby/pull/233
17
+
18
+ https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v6.0.2...v6.0.3
19
+
3
20
  ### 6.0.2
4
21
 
5
22
  * fix(RSpec): allow using `TimeTracker` in RSpec < 3.10.2 when formatters were required to expose `#output`
data/README.md CHANGED
@@ -18,9 +18,6 @@
18
18
  <a href="https://rubygems.org/gems/knapsack_pro">
19
19
  <img alt="Gem Version" src="https://badge.fury.io/rb/knapsack_pro.svg" />
20
20
  </a>
21
- <a href="https://codeclimate.com/github/KnapsackPro/knapsack_pro-ruby">
22
- <img alt="Code Climate" src="https://codeclimate.com/github/KnapsackPro/knapsack_pro-ruby/badges/gpa.svg" />
23
- </a>
24
21
  </div>
25
22
 
26
23
  <br />
@@ -65,7 +65,7 @@ module KnapsackPro
65
65
  ]
66
66
  .each do |path|
67
67
  p = path.call
68
- return p if p.include?('_spec.rb')
68
+ return p if p.include?('_spec.rb') || p.include?('.feature')
69
69
  end
70
70
 
71
71
  return ''
@@ -115,8 +115,9 @@ module KnapsackPro
115
115
 
116
116
  def record_example(accumulator, example, started_at)
117
117
  path = path_for(example)
118
- time_execution = time_execution_for(example, started_at)
118
+ return if path.nil?
119
119
 
120
+ time_execution = time_execution_for(example, started_at)
120
121
  if accumulator.key?(path)
121
122
  accumulator[path][:time_execution] += time_execution
122
123
  else
@@ -126,7 +127,8 @@ module KnapsackPro
126
127
 
127
128
  def path_for(example)
128
129
  file = file_path_for(example)
129
- return "UNKNOWN_PATH" if file == ""
130
+ return nil if file == ""
131
+
130
132
  path = rspec_split_by_test_example?(file) ? example.id : file
131
133
  KnapsackPro::TestFileCleaner.clean(path)
132
134
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module KnapsackPro
2
4
  module Formatters
3
5
  class TimeTrackerFetcher
@@ -7,6 +7,10 @@ module KnapsackPro
7
7
  def self.run(args)
8
8
  require 'minitest'
9
9
 
10
+ # Avoid installing `at_exit` since we are calling `Minitest.run` ourselves.
11
+ # Without this, Minitest would run again (autorun) after `Minitest.run`.
12
+ ::Minitest.class_variable_set('@@installed_at_exit', true)
13
+
10
14
  ENV['KNAPSACK_PRO_TEST_SUITE_TOKEN'] = KnapsackPro::Config::Env.test_suite_token_minitest
11
15
  ENV['KNAPSACK_PRO_QUEUE_RECORDING_ENABLED'] = 'true'
12
16
  ENV['KNAPSACK_PRO_QUEUE_ID'] = KnapsackPro::Config::EnvGenerator.set_queue_id
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KnapsackPro
4
- VERSION = '6.0.2'
4
+ VERSION = '6.0.4'
5
5
  end
@@ -305,6 +305,15 @@ describe KnapsackPro::Adapters::RSpecAdapter do
305
305
  expect(subject).to eq('')
306
306
  end
307
307
  end
308
+
309
+ context "when id does not end in .feature (nor _spec.rb)" do
310
+ it "returns the file_path" do
311
+ allow(current_example).to receive(:id).and_return("./foo.rb")
312
+ allow(current_example).to receive(:metadata).and_return(file_path: "./foo.feature")
313
+
314
+ expect(subject).to eq("./foo.feature")
315
+ end
316
+ end
308
317
  end
309
318
 
310
319
  describe 'bind methods' do
@@ -280,9 +280,9 @@ class TestTimeTracker
280
280
  SPEC
281
281
 
282
282
  run_specs(spec) do |spec_paths, times|
283
- raise unless times.size == 2
284
- raise unless times[0]["path"] == "UNKNOWN_PATH"
285
- raise unless times[1]["path"] == spec_paths.first
283
+ raise unless times.size == 1
284
+ raise unless times[0]["path"] == spec_paths.first
285
+ raise unless times[0]["time_execution"] == 0.0
286
286
  end
287
287
 
288
288
  ensure
@@ -431,7 +431,7 @@ class TestTimeTracker
431
431
  .queue(paths)
432
432
  .sort_by { |time| time["path"] }
433
433
  .filter do |time|
434
- paths.any? { |path| time["path"].start_with?(path) || time["path"] == "UNKNOWN_PATH" }
434
+ paths.any? { |path| time["path"].start_with?(path) }
435
435
  end
436
436
  yield(paths, times, time_tracker)
437
437
 
data/spec/spec_helper.rb CHANGED
@@ -9,7 +9,6 @@ require 'webmock/rspec'
9
9
  VCR.configure do |config|
10
10
  config.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
11
11
  config.hook_into :webmock # or :fakeweb
12
- config.ignore_hosts('codeclimate.com')
13
12
  end
14
13
 
15
14
  require 'knapsack_pro'
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: 6.0.2
4
+ version: 6.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ArturT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-06 00:00:00.000000000 Z
11
+ date: 2024-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake