karafka 1.0.0.rc1 → 1.0.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 +2 -1
- data/Gemfile.lock +2 -2
- data/README.md +14 -3
- data/lib/karafka/params/params.rb +5 -4
- data/lib/karafka/params/params_batch.rb +1 -1
- data/lib/karafka/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49921e358054ab6470899c0e122cc9c93f5398ea
|
4
|
+
data.tar.gz: 183d5ff52e6f4ce09110287147d735929ff2a6e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd8ad63256d3133dbc1c4a4676b54c64815353047a8cb42c87e6ef343ff6af12099ff07d03d01b4a3b61fc648d79dc6b13c1f969a48f3ab04f1dc3a91799e99b
|
7
|
+
data.tar.gz: 345addc070e2b13fc7d11f07faefccbcfbffeedad3ce106d98a335c0e54f5c29731fc9288c46b114aee4df62f7578c2e120e8b61b7a378c517881221b2254e4e
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Karafka framework changelog
|
2
2
|
|
3
|
-
## 1.0.0
|
3
|
+
## 1.0.0
|
4
4
|
|
5
5
|
### Closed issues:
|
6
6
|
|
@@ -66,6 +66,7 @@
|
|
66
66
|
- Single controller **needs** to be used for a single topic consumption
|
67
67
|
- Renamed ```before_enqueue``` to ```after_received``` to better resemble internal logic, since for inline backend, there is no enqueue.
|
68
68
|
- Due to the level on which topic and controller are related (class level), the dynamic worker selection is no longer available.
|
69
|
+
- Renamed params #retrieve to params #retrieve! to better reflect what it does
|
69
70
|
|
70
71
|
### Other changes
|
71
72
|
- PolishGeeksDevTools removed (in favour of Coditsu)
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
karafka (1.0.0
|
4
|
+
karafka (1.0.0)
|
5
5
|
activesupport (>= 5.0)
|
6
6
|
celluloid
|
7
7
|
dry-configurable (~> 0.7)
|
@@ -77,7 +77,7 @@ GEM
|
|
77
77
|
inflecto (0.0.2)
|
78
78
|
json (2.1.0)
|
79
79
|
minitest (5.10.3)
|
80
|
-
multi_json (1.12.
|
80
|
+
multi_json (1.12.2)
|
81
81
|
null-logger (0.1.4)
|
82
82
|
rake (12.0.0)
|
83
83
|
require_all (1.4.0)
|
data/README.md
CHANGED
@@ -58,14 +58,26 @@ If you are interested in our commercial services, please contact [Maciej Mensfel
|
|
58
58
|
|
59
59
|
Karafka framework and Karafka team are __not__ related to Kafka streaming service called CloudKarafka in any matter. We don't recommend nor discourage usage of their platform.
|
60
60
|
|
61
|
+
## References
|
62
|
+
|
63
|
+
* [Karafka framework](https://github.com/karafka/karafka)
|
64
|
+
* [Karafka Travis CI](https://travis-ci.org/karafka/karafka)
|
65
|
+
* [Karafka Coditsu](https://app.coditsu.io/karafka/repositories/karafka)
|
66
|
+
|
61
67
|
## Note on Patches/Pull Requests
|
62
68
|
|
63
69
|
Fork the project.
|
64
70
|
Make your feature addition or bug fix.
|
65
|
-
Add tests for it. This is important so
|
71
|
+
Add tests for it. This is important so we don't break it in a future versions unintentionally.
|
66
72
|
Commit, do not mess with Rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull). Send me a pull request. Bonus points for topic branches.
|
67
73
|
|
68
|
-
|
74
|
+
[](https://app.coditsu.io/karafka/repositories/karafka)
|
75
|
+
|
76
|
+
Each pull request must pass our quality requirements. To check if everything is as it should be, we use [Coditsu](https://coditsu.io) that combinse multiple linters and code analyzers for both code and documentation.
|
77
|
+
|
78
|
+
Unfortunately, it does not yet support independent forks, however you should be fine by looking at what we require.
|
79
|
+
|
80
|
+
Please run:
|
69
81
|
|
70
82
|
```bash
|
71
83
|
bundle exec rake
|
@@ -78,7 +90,6 @@ to check if everything is in order. After that you can submit a pull request.
|
|
78
90
|
This project exists thanks to all the people who contribute. [[Contribute]](CONTRIBUTING.md).
|
79
91
|
<a href="https://github.com/karafka/karafka/graphs/contributors"><img src="https://opencollective.com/karafka/contributors.svg?width=890" /></a>
|
80
92
|
|
81
|
-
|
82
93
|
## Backers
|
83
94
|
|
84
95
|
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/karafka#backer)]
|
@@ -32,7 +32,7 @@ module Karafka
|
|
32
32
|
def build(message, parser)
|
33
33
|
# Hash case happens inside backends that interchange data
|
34
34
|
if message.is_a?(Hash)
|
35
|
-
new(parser: parser).merge
|
35
|
+
new(parser: parser).send(:merge!, message)
|
36
36
|
else
|
37
37
|
# This happens inside Kafka::FetchedMessagesProcessor
|
38
38
|
new(
|
@@ -57,12 +57,15 @@ module Karafka
|
|
57
57
|
# retrieve data, parser will be executed to parse data. Output of parsing will be merged
|
58
58
|
# to the current object. This object will be also marked as already parsed, so we won't
|
59
59
|
# parse it again.
|
60
|
-
def retrieve
|
60
|
+
def retrieve!
|
61
61
|
return self if self[:parsed]
|
62
62
|
|
63
63
|
merge!(parse(delete(:value)))
|
64
64
|
end
|
65
65
|
|
66
|
+
|
67
|
+
private
|
68
|
+
|
66
69
|
# Overwritten merge! method - it behaves differently for keys that are the same in our hash
|
67
70
|
# and in a other_hash - it will not replace keys that are the same in our hash
|
68
71
|
# and in the other one
|
@@ -80,8 +83,6 @@ module Karafka
|
|
80
83
|
super(other_hash) { |_key, base_value, _new_value| base_value }
|
81
84
|
end
|
82
85
|
|
83
|
-
private
|
84
|
-
|
85
86
|
# @param value [String] Raw data that we want to parse using controller's parser
|
86
87
|
# @note If something goes wrong, it will return raw data in a hash with a message key
|
87
88
|
# @return [Hash] parsed data or a hash with message key containing raw data if something
|
@@ -22,7 +22,7 @@ module Karafka
|
|
22
22
|
# @note Invocation of this method will cause loading and parsing each param after another.
|
23
23
|
# If you want to get access without parsing, please access params_batch directly
|
24
24
|
def each
|
25
|
-
@params_batch.each { |param| yield(param.retrieve) }
|
25
|
+
@params_batch.each { |param| yield(param.retrieve!) }
|
26
26
|
end
|
27
27
|
|
28
28
|
# @return [Array<Karafka::Params::Params>] returns all the params in a loaded state, so they
|
data/lib/karafka/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: karafka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maciej Mensfeld
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-09-
|
13
|
+
date: 2017-09-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: ruby-kafka
|
@@ -265,9 +265,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
265
265
|
version: 2.3.0
|
266
266
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
267
267
|
requirements:
|
268
|
-
- - "
|
268
|
+
- - ">="
|
269
269
|
- !ruby/object:Gem::Version
|
270
|
-
version:
|
270
|
+
version: '0'
|
271
271
|
requirements: []
|
272
272
|
rubyforge_project:
|
273
273
|
rubygems_version: 2.6.13
|