knapsack_pro 7.5.0 → 7.5.1

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: cea03959b8de66cd8cbb686deb3ac76129f9cce7ee24b1da2a0ef9e57dd790df
4
- data.tar.gz: ec12a1f99f57207e967846df739a5dfea4a1423e6823431ee9cf26f1d2f9a473
3
+ metadata.gz: 1c0358e24e8030869e858b896df6bbb3188433fcd973e073e773e6f6735b481a
4
+ data.tar.gz: 33c9a7233e1fc1c14450d3e72eea10568bbab8dd37c90df93db37253db78b8b3
5
5
  SHA512:
6
- metadata.gz: cd53605f0d47ce2a3bc83410eb56d459a65aa1b75b169c420f5a11e3693b2aa7abee8e5b984eff35ab876de53809a2c113abb38b253e1e1b42726c817bccae6b
7
- data.tar.gz: 93eaec09e20ba573cfb69b0f1ad2e8a04f5db2ab95637767a1abed0d8640cf131447b1adae67196998d73165232ea1a23e2c1fe547ab01b14436ace7d422edc5
6
+ metadata.gz: 43966d1dc8df454ede86e53226927e43f7d622e7605a04b1eb6331ca33e8e1c5e5ab7ba3e1ed9e9616088bd729cf95baf5aa28503ab36062828869ef5d5a8943
7
+ data.tar.gz: f1ace143ed62bbbb8d210470990cbf44baeef4473c23d5a303ad28fbf9aa8708ad04c95f920639af588406a7541542c2db8a04db7021c7144a583cc6c120ba41
@@ -16,6 +16,7 @@ TODO: changes introduced by this PR
16
16
 
17
17
  # Checklist reminder
18
18
 
19
+ - [ ] You added the changes to the `UNRELEASED` section of the `CHANGELOG.md`, including the needed bump (ie, patch, minor, major)
19
20
  - [ ] You follow the architecture outlined below for RSpec in Queue Mode, which is a work in progress (feel free to propose changes):
20
21
  - Pure: `lib/knapsack_pro/pure/queue/rspec_pure.rb` contains pure functions that are unit tested.
21
22
  - Extension: `lib/knapsack_pro/extensions/rspec_extension.rb` encapsulates calls to RSpec internals and is integration and e2e tested.
data/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ### UNRELEASED
4
+
5
+ ### 7.5.1
6
+
7
+ Revert to 7.4.0.
8
+
3
9
  ### 7.5.0
10
+
4
11
  * Raise when `KNAPSACK_PRO_CI_NODE_TOTAL` or `KNAPSACK_PRO_CI_NODE_INDEX` is missing and can't be determined from supported CI environments, instead of defaulting to arbitrary numbers.
5
12
 
6
13
  https://github.com/KnapsackPro/knapsack_pro-ruby/pull/256
@@ -8,6 +15,7 @@
8
15
  https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v7.4.0...v7.5.0
9
16
 
10
17
  ### 7.4.0
18
+
11
19
  * Warn when `KNAPSACK_PRO_*` environment variables are set manually if their values could be automatically determined from supported CI environments.
12
20
 
13
21
  https://github.com/KnapsackPro/knapsack_pro-ruby/pull/254
data/README.md CHANGED
@@ -74,28 +74,13 @@ Scripted tests can be found in the [Rails App With Knapsack Pro repository](http
74
74
 
75
75
  ### Publishing
76
76
 
77
- 1. Update the `CHANGELOG.md` as part of your PR.
77
+ 1. Move the changes listed in the `UNRELEASED` section of the `CHANGELOG.md` to the proper version
78
78
 
79
- 2. After your PR has been merged, update the gem version in `lib/knapsack_pro/version.rb` directly on the `master` branch:
79
+ 2. Update the gem version in `lib/knapsack_pro/version.rb`
80
80
 
81
- ```bash
82
- git commit -m "Bump version X.X.X"
83
- git push origin master
84
- ```
85
-
86
- 3. Create a git tag for the release:
81
+ 3. `git commit -am "chore: prepare release"`
87
82
 
88
- ```bash
89
- git tag -a vX.X.X -m "Release vX.X.X"
90
- git push --tags
91
- ```
92
-
93
- 4. Build the gem and publish it to RubyGems:
94
-
95
- ```bash
96
- gem build knapsack_pro.gemspec
97
- gem push knapsack_pro-X.X.X.gem
98
- ```
83
+ 4. Build, tag, push, release: `bundle exec rake release`
99
84
 
100
85
  5. Update the latest available gem version in `TestSuiteClientVersionChecker` for the Knapsack Pro API repository.
101
86
 
@@ -13,17 +13,11 @@ module KnapsackPro
13
13
 
14
14
  class << self
15
15
  def ci_node_total
16
- env_name = 'KNAPSACK_PRO_CI_NODE_TOTAL'
17
- env_value = env_for(env_name, :node_total)
18
-
19
- env_value ? env_value.to_i : raise_missing_env_for(env_name)
16
+ (env_for('KNAPSACK_PRO_CI_NODE_TOTAL', :node_total) || 1).to_i
20
17
  end
21
18
 
22
19
  def ci_node_index
23
- env_name = 'KNAPSACK_PRO_CI_NODE_INDEX'
24
- env_value = env_for(env_name, :node_index)
25
-
26
- env_value ? env_value.to_i : raise_missing_env_for(env_name)
20
+ (env_for('KNAPSACK_PRO_CI_NODE_INDEX', :node_index) || 0).to_i
27
21
  end
28
22
 
29
23
  def ci_node_build_id
@@ -280,7 +274,7 @@ module KnapsackPro
280
274
  private
281
275
 
282
276
  def required_env(env_name)
283
- ENV[env_name] || raise_missing_env_for(env_name)
277
+ ENV[env_name] || raise("Missing environment variable #{env_name}")
284
278
  end
285
279
 
286
280
  def env_for(knapsack_env_name, ci_env_method)
@@ -297,10 +291,6 @@ module KnapsackPro
297
291
  def ci_env_for(env_name)
298
292
  detected_ci.new.send(env_name)
299
293
  end
300
-
301
- def raise_missing_env_for(env_name)
302
- raise("Missing environment variable #{env_name}")
303
- end
304
294
  end
305
295
  end
306
296
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KnapsackPro
4
- VERSION = '7.5.0'
4
+ VERSION = '7.5.1'
5
5
  end
@@ -54,9 +54,7 @@ describe KnapsackPro::Config::Env do
54
54
  end
55
55
 
56
56
  context "when ENV doesn't exist" do
57
- it 'raises' do
58
- expect { subject }.to raise_error(/Missing environment variable KNAPSACK_PRO_CI_NODE_TOTAL/)
59
- end
57
+ it { should eq 1 }
60
58
  end
61
59
  end
62
60
 
@@ -120,9 +118,7 @@ describe KnapsackPro::Config::Env do
120
118
  end
121
119
 
122
120
  context "when ENV doesn't exist" do
123
- it 'raises' do
124
- expect { subject }.to raise_error(/Missing environment variable KNAPSACK_PRO_CI_NODE_INDEX/)
125
- end
121
+ it { should eq 0 }
126
122
  end
127
123
  end
128
124
 
@@ -36,11 +36,13 @@ describe KnapsackPro do
36
36
  stub_const('ENV', {
37
37
  'KNAPSACK_PRO_LOG_DIR' => 'log',
38
38
  })
39
- end
40
39
 
41
- it 'raises' do
42
- expect { subject }.to raise_error(/Missing environment variable KNAPSACK_PRO_CI_NODE_INDEX/)
40
+ expect(Logger).to receive(:new).with('log/knapsack_pro_node_0.log').and_return(logger)
41
+ expect(logger).to receive(:level=).with(Logger::INFO)
42
+ expect(KnapsackPro::LoggerWrapper).to receive(:new).with(logger).and_return(logger_wrapper)
43
43
  end
44
+
45
+ it { should eql logger_wrapper }
44
46
  end
45
47
  end
46
48
 
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.5.0
4
+ version: 7.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ArturT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-27 00:00:00.000000000 Z
11
+ date: 2024-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake