knapsack_pro 0.15.2 → 0.16.0
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 +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +14 -0
- data/lib/knapsack_pro.rb +1 -1
- data/lib/knapsack_pro/config/env.rb +8 -0
- data/lib/knapsack_pro/version.rb +1 -1
- data/spec/knapsack_pro/config/env_spec.rb +14 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29937a880aa916b87440c968c42c0ef48e657faa
|
4
|
+
data.tar.gz: c570bd3da47a9b4641316d1f91a94cd964151118
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07d059e6b79a117447db263430b45dfee56651d3462a1600589f87b229e78c1c7e5be71a93c5439737b969d7b3a1e0df56a537a7610eabfa55da64bc7dc775a1
|
7
|
+
data.tar.gz: 4ebeeb9e24932ea069e545775481cc60fc03979c9ea2a3c85220e16cd5d5af593a17f50c377c773d1819ee45adc799a9a4c83e31ead65b4aab80bd3d702de317
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,15 @@
|
|
2
2
|
|
3
3
|
* TODO
|
4
4
|
|
5
|
+
### 0.16.0
|
6
|
+
|
7
|
+
* Add KNAPSACK_PRO_LOG_LEVEL option
|
8
|
+
|
9
|
+
Related PR:
|
10
|
+
https://github.com/ArturT/knapsack/pull/49
|
11
|
+
|
12
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v0.15.2...v0.16.0
|
13
|
+
|
5
14
|
### 0.15.2
|
6
15
|
|
7
16
|
* Cache API response test file paths to fix problem with double request to get test suite distribution for the node.
|
data/README.md
CHANGED
@@ -87,6 +87,8 @@ For instance when you will run tests with rake knapsack_pro:rspec then:
|
|
87
87
|
- [Info for snap-ci.com users](#info-for-snap-cicom-users)
|
88
88
|
- [FAQ](#faq)
|
89
89
|
- [How to run tests for particular CI node in your development environment](#how-to-run-tests-for-particular-ci-node-in-your-development-environment)
|
90
|
+
- [What happens when Knapsack Pro API is not available/not reachable temporarily?](#what-happens-when-knapsack-pro-api-is-not-availablenot-reachable-temporarily)
|
91
|
+
- [How can I change log level?](#how-can-i-change-log-level)
|
90
92
|
- [Gem tests](#gem-tests)
|
91
93
|
- [Spec](#spec)
|
92
94
|
- [Contributing](#contributing)
|
@@ -550,6 +552,18 @@ For instance to run subset of tests for the first CI node with specified seed yo
|
|
550
552
|
|
551
553
|
Above example is for RSpec. You can use respectively rake task name and token environment variable when you want to run tests for minitest, cucumber or spinach.
|
552
554
|
|
555
|
+
### What happens when Knapsack Pro API is not available/not reachable temporarily?
|
556
|
+
|
557
|
+
knapsack_pro gem has fallback behaviour and it will split test files across CI nodes based on popular test directory names.
|
558
|
+
|
559
|
+
### How can I change log level?
|
560
|
+
|
561
|
+
You can change log level by specifying the `KNAPSACK_PRO_LOG_LEVEL` environment variable.
|
562
|
+
|
563
|
+
KNAPSACK_PRO_LOG_LEVEL=warn bundle exec rake knapsack_pro:rspec
|
564
|
+
|
565
|
+
Available values are `debug`, `info`, and `warn`. The default log level is `info`.
|
566
|
+
|
553
567
|
## Gem tests
|
554
568
|
|
555
569
|
### Spec
|
data/lib/knapsack_pro.rb
CHANGED
@@ -120,6 +120,14 @@ module KnapsackPro
|
|
120
120
|
value
|
121
121
|
end
|
122
122
|
|
123
|
+
def log_level
|
124
|
+
{
|
125
|
+
'debug' => ::Logger::DEBUG,
|
126
|
+
'info' => ::Logger::INFO,
|
127
|
+
'warn' => ::Logger::WARN,
|
128
|
+
}[ENV['KNAPSACK_PRO_LOG_LEVEL']] || ::Logger::INFO
|
129
|
+
end
|
130
|
+
|
123
131
|
private
|
124
132
|
|
125
133
|
def required_env(env_name)
|
data/lib/knapsack_pro/version.rb
CHANGED
@@ -443,4 +443,18 @@ describe KnapsackPro::Config::Env do
|
|
443
443
|
end
|
444
444
|
end
|
445
445
|
end
|
446
|
+
|
447
|
+
describe '.log_level' do
|
448
|
+
subject { described_class.log_level }
|
449
|
+
|
450
|
+
context 'when ENV exists' do
|
451
|
+
let(:log_level) { 'debug' }
|
452
|
+
before { stub_const('ENV', { 'KNAPSACK_PRO_LOG_LEVEL' => log_level }) }
|
453
|
+
it { should eql ::Logger::DEBUG }
|
454
|
+
end
|
455
|
+
|
456
|
+
context "when ENV doesn't exist" do
|
457
|
+
it { should eql ::Logger::INFO }
|
458
|
+
end
|
459
|
+
end
|
446
460
|
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: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ArturT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|