waterdrop 0.1.5 → 0.1.6
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 +3 -0
- data/Gemfile.lock +22 -15
- data/README.md +20 -1
- data/lib/water_drop/message.rb +4 -1
- data/lib/water_drop/version.rb +1 -1
- data/lib/waterdrop.rb +2 -2
- data/waterdrop.gemspec +1 -0
- metadata +16 -3
- data/lib/water_drop/logger.rb +0 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0ba074f881bf7dae566b0f1c084d328913209b1e
|
|
4
|
+
data.tar.gz: da63b01f8a1ceeaf044fa1009e1ee4ba8db3c4bd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7bda18594a2321c809a2ffd0463a0dfcc3ee714ed60e36cb59ca15a94e007cca319e178baf03962b31cab56ecea603af7bebac9f2968320bb309bbb843fe8ce7
|
|
7
|
+
data.tar.gz: 6475608c7646f70561c74209961159621ba8c252aaecf552297564b9c2798ef9ddd41160e8eb60c3f526ed6d0bcc707c66947c9b95b25680450cd1f6db99e36f
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
waterdrop (0.1.
|
|
4
|
+
waterdrop (0.1.6)
|
|
5
5
|
aspector
|
|
6
6
|
bundler
|
|
7
7
|
connection_pool
|
|
8
|
+
null-logger
|
|
8
9
|
poseidon
|
|
9
10
|
rake
|
|
10
11
|
|
|
@@ -12,10 +13,10 @@ GEM
|
|
|
12
13
|
remote: https://rubygems.org/
|
|
13
14
|
specs:
|
|
14
15
|
abstract_type (0.0.7)
|
|
15
|
-
activemodel (4.2.
|
|
16
|
-
activesupport (= 4.2.
|
|
16
|
+
activemodel (4.2.4)
|
|
17
|
+
activesupport (= 4.2.4)
|
|
17
18
|
builder (~> 3.1)
|
|
18
|
-
activesupport (4.2.
|
|
19
|
+
activesupport (4.2.4)
|
|
19
20
|
i18n (~> 0.7)
|
|
20
21
|
json (~> 1.7, >= 1.7.7)
|
|
21
22
|
minitest (~> 5.1)
|
|
@@ -32,17 +33,18 @@ GEM
|
|
|
32
33
|
descendants_tracker (~> 0.0.4)
|
|
33
34
|
ice_nine (~> 0.11.0)
|
|
34
35
|
thread_safe (~> 0.3, >= 0.3.1)
|
|
35
|
-
brakeman (3.0
|
|
36
|
+
brakeman (3.1.0)
|
|
36
37
|
erubis (~> 2.6)
|
|
37
38
|
fastercsv (~> 1.5)
|
|
38
39
|
haml (>= 3.0, < 5.0)
|
|
39
|
-
highline (~> 1.6
|
|
40
|
+
highline (~> 1.6)
|
|
40
41
|
multi_json (~> 1.2)
|
|
41
|
-
ruby2ruby (
|
|
42
|
+
ruby2ruby (>= 2.1.1, < 2.3.0)
|
|
42
43
|
ruby_parser (~> 3.7.0)
|
|
43
44
|
sass (~> 3.0)
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
slim (>= 1.3.6, < 4.0)
|
|
46
|
+
terminal-table (~> 1.4.5)
|
|
47
|
+
bson (3.2.4)
|
|
46
48
|
builder (3.2.2)
|
|
47
49
|
coderay (1.1.0)
|
|
48
50
|
coercible (1.0.0)
|
|
@@ -72,7 +74,7 @@ GEM
|
|
|
72
74
|
haml (~> 4.0)
|
|
73
75
|
rubocop (>= 0.25.0)
|
|
74
76
|
sysexits (~> 1.1)
|
|
75
|
-
highline (1.
|
|
77
|
+
highline (1.7.3)
|
|
76
78
|
i18n (0.7.0)
|
|
77
79
|
ice_nine (0.11.1)
|
|
78
80
|
json (1.8.3)
|
|
@@ -94,11 +96,12 @@ GEM
|
|
|
94
96
|
connection_pool (~> 2.0)
|
|
95
97
|
optionable (~> 0.2.0)
|
|
96
98
|
multi_json (1.11.2)
|
|
99
|
+
null-logger (0.1.0)
|
|
97
100
|
optionable (0.2.0)
|
|
98
101
|
origin (2.1.1)
|
|
99
102
|
parser (2.2.2.6)
|
|
100
103
|
ast (>= 1.1, < 3.0)
|
|
101
|
-
polishgeeks-dev-tools (1.
|
|
104
|
+
polishgeeks-dev-tools (1.2.0)
|
|
102
105
|
brakeman
|
|
103
106
|
faker
|
|
104
107
|
haml-lint
|
|
@@ -137,14 +140,14 @@ GEM
|
|
|
137
140
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
138
141
|
rspec-support (~> 3.3.0)
|
|
139
142
|
rspec-support (3.3.0)
|
|
140
|
-
rubocop (0.
|
|
143
|
+
rubocop (0.34.0)
|
|
141
144
|
astrolabe (~> 1.3)
|
|
142
145
|
parser (>= 2.2.2.5, < 3.0)
|
|
143
146
|
powerpack (~> 0.1)
|
|
144
147
|
rainbow (>= 1.99.1, < 3.0)
|
|
145
148
|
ruby-progressbar (~> 1.4)
|
|
146
149
|
ruby-progressbar (1.7.5)
|
|
147
|
-
ruby2ruby (2.
|
|
150
|
+
ruby2ruby (2.2.0)
|
|
148
151
|
ruby_parser (~> 3.1)
|
|
149
152
|
sexp_processor (~> 4.0)
|
|
150
153
|
ruby_parser (3.7.1)
|
|
@@ -156,7 +159,7 @@ GEM
|
|
|
156
159
|
reek (= 1.6.3)
|
|
157
160
|
ruby2ruby (>= 2.1.1, < 3.0)
|
|
158
161
|
virtus (~> 1.0)
|
|
159
|
-
sass (3.4.
|
|
162
|
+
sass (3.4.18)
|
|
160
163
|
sexp_processor (4.6.0)
|
|
161
164
|
shoulda (3.5.0)
|
|
162
165
|
shoulda-context (~> 1.0, >= 1.0.1)
|
|
@@ -169,9 +172,13 @@ GEM
|
|
|
169
172
|
json (~> 1.8)
|
|
170
173
|
simplecov-html (~> 0.10.0)
|
|
171
174
|
simplecov-html (0.10.0)
|
|
175
|
+
slim (3.0.6)
|
|
176
|
+
temple (~> 0.7.3)
|
|
177
|
+
tilt (>= 1.3.3, < 2.1)
|
|
172
178
|
slop (3.6.0)
|
|
173
179
|
sysexits (1.2.0)
|
|
174
|
-
|
|
180
|
+
temple (0.7.6)
|
|
181
|
+
terminal-table (1.4.5)
|
|
175
182
|
thread_safe (0.3.5)
|
|
176
183
|
tilt (2.0.1)
|
|
177
184
|
timecop (0.8.0)
|
data/README.md
CHANGED
|
@@ -149,6 +149,25 @@ ClassName.new.run
|
|
|
149
149
|
|
|
150
150
|
a message with the given message will be send before and after the method execution.
|
|
151
151
|
|
|
152
|
+
## References
|
|
153
|
+
|
|
154
|
+
* [Karafka framework](https://github.com/karafka/karafka)
|
|
155
|
+
* [Waterdrop](https://github.com/karafka/waterdrop)
|
|
156
|
+
* [Sidekiq Glass](https://github.com/karafka/sidekiq-glass)
|
|
157
|
+
* [Envlogic](https://github.com/karafka/envlogic)
|
|
158
|
+
* [Null Logger](https://github.com/karafka/null-logger)
|
|
159
|
+
|
|
152
160
|
## Note on Patches/Pull Requests
|
|
153
161
|
|
|
154
|
-
Fork the project.
|
|
162
|
+
Fork the project.
|
|
163
|
+
Make your feature addition or bug fix.
|
|
164
|
+
Add tests for it. This is important so I don't break it in a future version unintentionally.
|
|
165
|
+
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.
|
|
166
|
+
|
|
167
|
+
Each pull request must pass our quality requirements. To check if everything is as it should be, we use [PolishGeeks Dev Tools](https://github.com/polishgeeks/polishgeeks-dev-tools) that combine multiple linters and code analyzers. Please run:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
bundle exec rake
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
to check if everything is in order. After that you can submit a pull request.
|
data/lib/water_drop/message.rb
CHANGED
|
@@ -32,10 +32,13 @@ module WaterDrop
|
|
|
32
32
|
Poseidon::MessageToSend.new(topic, message)
|
|
33
33
|
])
|
|
34
34
|
end
|
|
35
|
+
::WaterDrop.logger.info("Message #{message} was sent to topic '#{topic}'")
|
|
35
36
|
rescue *CATCHED_ERRORS => e
|
|
36
37
|
# Reraise if we want to raise on failure
|
|
37
38
|
# Ignore if we dont want to know that something went wrong
|
|
38
|
-
|
|
39
|
+
return unless ::WaterDrop.config.raise_on_failure?
|
|
40
|
+
::WaterDrop.logger.fatal(e)
|
|
41
|
+
raise(e)
|
|
39
42
|
end
|
|
40
43
|
end
|
|
41
44
|
end
|
data/lib/water_drop/version.rb
CHANGED
data/lib/waterdrop.rb
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
aspector
|
|
11
11
|
forwardable
|
|
12
12
|
connection_pool
|
|
13
|
+
null_logger
|
|
13
14
|
).each { |lib| require lib }
|
|
14
15
|
|
|
15
16
|
# Internal components
|
|
@@ -19,7 +20,6 @@ base_path = File.dirname(__FILE__) + '/water_drop'
|
|
|
19
20
|
version
|
|
20
21
|
pool
|
|
21
22
|
config
|
|
22
|
-
logger
|
|
23
23
|
message
|
|
24
24
|
aspects/base_aspect
|
|
25
25
|
aspects/formatter
|
|
@@ -35,7 +35,7 @@ module WaterDrop
|
|
|
35
35
|
|
|
36
36
|
# @return [Logger] logger that we want to use
|
|
37
37
|
def logger
|
|
38
|
-
@logger ||=
|
|
38
|
+
@logger ||= NullLogger.new
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
# Sets up the whole configuration
|
data/waterdrop.gemspec
CHANGED
|
@@ -19,6 +19,7 @@ Gem::Specification.new do |spec|
|
|
|
19
19
|
spec.add_dependency 'aspector', '>= 0'
|
|
20
20
|
spec.add_dependency 'poseidon', '>= 0'
|
|
21
21
|
spec.add_dependency 'connection_pool', '>= 0'
|
|
22
|
+
spec.add_dependency 'null-logger'
|
|
22
23
|
|
|
23
24
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
|
|
24
25
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: waterdrop
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Maciej Mensfeld
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2015-
|
|
12
|
+
date: 2015-09-07 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|
|
@@ -81,6 +81,20 @@ dependencies:
|
|
|
81
81
|
- - ">="
|
|
82
82
|
- !ruby/object:Gem::Version
|
|
83
83
|
version: '0'
|
|
84
|
+
- !ruby/object:Gem::Dependency
|
|
85
|
+
name: null-logger
|
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
|
87
|
+
requirements:
|
|
88
|
+
- - ">="
|
|
89
|
+
- !ruby/object:Gem::Version
|
|
90
|
+
version: '0'
|
|
91
|
+
type: :runtime
|
|
92
|
+
prerelease: false
|
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
94
|
+
requirements:
|
|
95
|
+
- - ">="
|
|
96
|
+
- !ruby/object:Gem::Version
|
|
97
|
+
version: '0'
|
|
84
98
|
description: Kafka messages with aspects made easy!
|
|
85
99
|
email:
|
|
86
100
|
- maciej@mensfeld.pl
|
|
@@ -105,7 +119,6 @@ files:
|
|
|
105
119
|
- lib/water_drop/aspects/before_aspect.rb
|
|
106
120
|
- lib/water_drop/aspects/formatter.rb
|
|
107
121
|
- lib/water_drop/config.rb
|
|
108
|
-
- lib/water_drop/logger.rb
|
|
109
122
|
- lib/water_drop/message.rb
|
|
110
123
|
- lib/water_drop/pool.rb
|
|
111
124
|
- lib/water_drop/version.rb
|