rimless 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/rimless/rspec.rb +18 -1
- data/lib/rimless/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b3369ef3be81c9b8d5a25645f20ea552f40beb2803471203e7bb791208e79e1
|
4
|
+
data.tar.gz: 7eab67748a9d227f0b56c626feffcb4fe4a3841bd1d919da8e8e7f03d77ec56a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 313805748ce8b9e2efacd5d56b4babc3d5833d176eda3a7d9f02c343577a3f0da6db35ca3cd3a881d40d30f780212f816ccbfe0c78bc9f74c272cd109cf2c184
|
7
|
+
data.tar.gz: 705c2a7557976fd503cdb75e079ab8f678cc6953dd8a4d2f3050b9106b05c1245cf08c4775c71be26e4db6ab5f92eb2565572271f67ab987896faa1dfd268fe4
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
### 0.2.1
|
2
|
+
|
3
|
+
* Added support for the
|
4
|
+
[parallel_tests](https://github.com/grosser/parallel_tests) gem and
|
5
|
+
reconfigure the compiled schema directory to be unique per running test
|
6
|
+
thread. This fixes all race conditions which slow down or break user test
|
7
|
+
suites.
|
8
|
+
|
1
9
|
### 0.2.0
|
2
10
|
|
3
11
|
* Added the `Rimless.encode` (`.avro_encode`) and `Rimless.decode`
|
data/lib/rimless/rspec.rb
CHANGED
@@ -17,11 +17,27 @@ RSPEC_CONFIGURER.configure do |config|
|
|
17
17
|
config.include Rimless::RSpec::Helpers
|
18
18
|
config.include Rimless::RSpec::Matchers
|
19
19
|
|
20
|
+
# Take care of the initial test configuration.
|
21
|
+
config.before(:suite) do
|
22
|
+
# This allows parallel test execution without race conditions on the
|
23
|
+
# compiled Apache Avro schemas. So when each test have its own compiled
|
24
|
+
# schema repository it cannot conflict while refreshing it.
|
25
|
+
unless ENV['TEST_ENV_NUMBER'].nil?
|
26
|
+
Rimless.configure do |conf|
|
27
|
+
num = ENV['TEST_ENV_NUMBER']
|
28
|
+
num = '1' if num.empty?
|
29
|
+
|
30
|
+
conf.compiled_avro_schema_path = \
|
31
|
+
conf.compiled_avro_schema_path.join("test-worker-#{num}")
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
20
36
|
# Stub all Confluent Schema Registry requests and handle them gracefully with
|
21
37
|
# the help of the faked (inlined) Schema Registry server. This allows us to
|
22
38
|
# perform the actual Apache Avro message encoding/decoding without the need
|
23
39
|
# to have a Schema Registry up and running.
|
24
|
-
config.before do
|
40
|
+
config.before(:each) do
|
25
41
|
# Get the Excon connection from the AvroTurf instance
|
26
42
|
connection = Rimless.avro.instance_variable_get(:@registry)
|
27
43
|
.instance_variable_get(:@upstream)
|
@@ -36,6 +52,7 @@ RSPEC_CONFIGURER.configure do |config|
|
|
36
52
|
.to_rack(FakeConfluentSchemaRegistryServer)
|
37
53
|
# Clear any cached data
|
38
54
|
FakeConfluentSchemaRegistryServer.clear
|
55
|
+
|
39
56
|
# Reconfigure the Rimless AvroTurf instance
|
40
57
|
Rimless.configure_avro_turf
|
41
58
|
end
|
data/lib/rimless/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rimless
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hermann Mayer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -376,7 +376,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
376
376
|
- !ruby/object:Gem::Version
|
377
377
|
version: '0'
|
378
378
|
requirements: []
|
379
|
-
rubygems_version: 3.0.
|
379
|
+
rubygems_version: 3.0.4
|
380
380
|
signing_key:
|
381
381
|
specification_version: 4
|
382
382
|
summary: A bundle of opinionated Apache Kafka / Confluent Schema Registry helpers.
|