knapsack_pro 7.1.0 → 7.2.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
  SHA256:
3
- metadata.gz: 832322e0370ece75c8c2e53870b526e6bc4cd3f43214d4ee893a48cef6b209af
4
- data.tar.gz: a3847464969d15278d84d00d9638c9e6e2cecea0190be5f773c70da0117c0d44
3
+ metadata.gz: 5fa2cbdcdebace591370260b651732d348da4b27010a0059bd90cb4d193b8486
4
+ data.tar.gz: fbfd4447d1c74132d48bc29ceb0f3293be0825c5e9dd8e682ab874c53a6b3ab7
5
5
  SHA512:
6
- metadata.gz: d3648e3a7f77b8acfac104dc32a6f99cca7d86456cadd2127ff3b8e6d0a874df452398b5a266a887d54c9c239bf28727501a524cc3351adbb676b8887e272014
7
- data.tar.gz: c7212ef6b958a7bb7aec2add6e6dc9d02e753936401f8d7705b4799c4ef1bb2b20c3456d1ad165b9e8ece86873b7393ee7afe1aa260c798b8644e6ace039fb17
6
+ metadata.gz: a4d0029246717da43f525bc8826b4068c7727731e532278386ef0fc8e6d76e7108ff4f660da88d97e12e531fa8e10e85c6d8626035eb4c15c5fada7ef5318258
7
+ data.tar.gz: ff749f54cc9ebd40ff0ae3a06e1b4693df88ee4c307d43b59b3c6fc9ef94ff1ba462a110016511ec882f8b54a172c76e0b8e16e8bb549ebc763f245357577da9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ### 7.2.0
4
+
5
+ * Always use the original `Net::HTTP` client, even when WebMock replaces it with its own
6
+ * No action is required on your side, but you can delete the following code that you may have used to configure Knapsack Pro with WebMock or VCR:
7
+ ```diff
8
+ WebMock.disable_net_connect!(
9
+ allow_localhost: true,
10
+ - allow: ['api.knapsackpro.com']
11
+ )
12
+
13
+ # VCR
14
+ - config.ignore_hosts('localhost', '127.0.0.1', '0.0.0.0', 'api.knapsackpro.com')
15
+ + config.ignore_localhost = true
16
+ ```
17
+
18
+ https://github.com/KnapsackPro/knapsack_pro-ruby/pull/251
19
+
20
+ https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v7.1.0...v7.2.0
21
+
3
22
  ### 7.1.0
4
23
 
5
24
  * [RSpec] [Queue Mode] Log error message and backtrace when unexpected failure is raised
@@ -36,6 +55,25 @@ https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v7.0.0...v7.0.1
36
55
  __After:__<br>
37
56
  The `KnapsackPro::Hooks::Queue.after_queue` hook is executed __inside__ of the `after(:suite)` hook.
38
57
 
58
+ * The RSpec `filter_run_excluding` option is not supported in Queue Mode.
59
+
60
+ __Before:__ The following option won't run tests tagged with `:manual`.<br>
61
+
62
+ ```ruby
63
+ # spec_helper.rb
64
+ RSpec.configure do |config|
65
+ config.filter_run_excluding :manual
66
+ end
67
+ ```
68
+
69
+ __After:__ The RSpec `filter_run_excluding` option is ignored in Queue Mode. You must manually pass the `--tag ~manual` option to the Knapsack Pro command to skip tests tagged with `:manual`.
70
+
71
+ ```
72
+ bundle exec rake "knapsack_pro:queue:rspec[--tag ~manual]"
73
+ ```
74
+
75
+ * Please [update the datadog-ci gem to the latest version](https://github.com/DataDog/datadog-ci-rb/issues/147#issuecomment-2099997045) if you use DataDog. This allows DataDog to collect RSpec data correctly in Knapsack Pro Queue Mode.
76
+
39
77
  * Recommended RSpec changes in your project:
40
78
  * Remove the following code if you use Queue Mode and the `rspec_junit_formatter` gem to generate JUnit XML or JSON reports:
41
79
 
@@ -141,13 +141,21 @@ module KnapsackPro
141
141
  end
142
142
 
143
143
  def build_http(uri)
144
- http = Net::HTTP.new(uri.host, uri.port)
144
+ http = net_http.new(uri.host, uri.port)
145
145
  http.use_ssl = (uri.scheme == 'https')
146
146
  http.open_timeout = TIMEOUT
147
147
  http.read_timeout = TIMEOUT
148
148
  http
149
149
  end
150
150
 
151
+ def net_http
152
+ if defined?(WebMock::HttpLibAdapters::NetHttpAdapter::OriginalNetHTTP)
153
+ WebMock::HttpLibAdapters::NetHttpAdapter::OriginalNetHTTP
154
+ else
155
+ Net::HTTP
156
+ end
157
+ end
158
+
151
159
  def post
152
160
  uri = URI.parse(endpoint_url)
153
161
  http = build_http(uri)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KnapsackPro
4
- VERSION = '7.1.0'
4
+ VERSION = '7.2.0'
5
5
  end
data/spec/spec_helper.rb CHANGED
@@ -40,4 +40,8 @@ RSpec.configure do |config|
40
40
  FileUtils.rm_r(KNAPSACK_PRO_TMP_DIR) if File.exist?(KNAPSACK_PRO_TMP_DIR)
41
41
  end
42
42
  end
43
+
44
+ config.before(:each) do
45
+ allow_any_instance_of(KnapsackPro::Client::Connection).to receive(:net_http).and_return(Net::HTTP)
46
+ end
43
47
  end
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: 7.1.0
4
+ version: 7.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ArturT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-30 00:00:00.000000000 Z
11
+ date: 2024-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -412,7 +412,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
412
412
  - !ruby/object:Gem::Version
413
413
  version: '0'
414
414
  requirements: []
415
- rubygems_version: 3.4.19
415
+ rubygems_version: 3.4.10
416
416
  signing_key:
417
417
  specification_version: 4
418
418
  summary: Knapsack Pro splits tests across parallel CI nodes and ensures each parallel