hivent 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. data/.codeclimate.yml +19 -0
  3. data/.gitignore +14 -0
  4. data/.rspec +1 -0
  5. data/.rubocop.yml +1063 -0
  6. data/.ruby-version +1 -0
  7. data/.simplecov.template +1 -0
  8. data/.travis.yml +23 -0
  9. data/.version +1 -0
  10. data/Gemfile +4 -0
  11. data/LICENSE +21 -0
  12. data/README.md +196 -0
  13. data/bin/hivent +5 -0
  14. data/hivent.gemspec +34 -0
  15. data/lib/hivent.rb +32 -0
  16. data/lib/hivent/abstract_signal.rb +63 -0
  17. data/lib/hivent/cli/consumer.rb +60 -0
  18. data/lib/hivent/cli/runner.rb +50 -0
  19. data/lib/hivent/cli/start_option_parser.rb +53 -0
  20. data/lib/hivent/config.rb +22 -0
  21. data/lib/hivent/config/options.rb +51 -0
  22. data/lib/hivent/emitter.rb +41 -0
  23. data/lib/hivent/life_cycle_event_handler.rb +41 -0
  24. data/lib/hivent/redis/consumer.rb +82 -0
  25. data/lib/hivent/redis/extensions.rb +26 -0
  26. data/lib/hivent/redis/lua/consumer.lua +179 -0
  27. data/lib/hivent/redis/lua/producer.lua +27 -0
  28. data/lib/hivent/redis/producer.rb +24 -0
  29. data/lib/hivent/redis/redis.rb +14 -0
  30. data/lib/hivent/redis/signal.rb +36 -0
  31. data/lib/hivent/rspec.rb +11 -0
  32. data/lib/hivent/signal.rb +14 -0
  33. data/lib/hivent/spec.rb +11 -0
  34. data/lib/hivent/spec/matchers.rb +14 -0
  35. data/lib/hivent/spec/matchers/emit.rb +116 -0
  36. data/lib/hivent/spec/signal.rb +60 -0
  37. data/lib/hivent/version.rb +6 -0
  38. data/spec/codeclimate_helper.rb +5 -0
  39. data/spec/fixtures/cli/bootstrap_consumers.rb +7 -0
  40. data/spec/fixtures/cli/life_cycle_event_test.rb +8 -0
  41. data/spec/hivent/abstract_signal_spec.rb +161 -0
  42. data/spec/hivent/cli/consumer_spec.rb +68 -0
  43. data/spec/hivent/cli/runner_spec.rb +75 -0
  44. data/spec/hivent/cli/start_option_parser_spec.rb +48 -0
  45. data/spec/hivent/life_cycle_event_handler_spec.rb +38 -0
  46. data/spec/hivent/redis/consumer_spec.rb +348 -0
  47. data/spec/hivent/redis/signal_spec.rb +155 -0
  48. data/spec/hivent_spec.rb +100 -0
  49. data/spec/spec/matchers/emit_spec.rb +66 -0
  50. data/spec/spec/signal_spec.rb +72 -0
  51. data/spec/spec_helper.rb +27 -0
  52. data/spec/support/matchers/exit_with_code.rb +28 -0
  53. data/spec/support/stdout_helpers.rb +25 -0
  54. metadata +267 -0
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: false
2
+ module STDOUTHelpers
3
+
4
+ def with_captured_stdout(&_block)
5
+ original_stdout = $stdout
6
+ $stdout = StringIO.new('', 'w')
7
+ yield
8
+ $stdout.string
9
+ ensure
10
+ $stdout = original_stdout
11
+ end
12
+
13
+ def silence(&_block)
14
+ result = nil
15
+ begin
16
+ original_stdout = $stdout
17
+ $stdout = StringIO.new('', 'w')
18
+ result = yield
19
+ ensure
20
+ $stdout = original_stdout
21
+ end
22
+ result
23
+ end
24
+
25
+ end
metadata ADDED
@@ -0,0 +1,267 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hivent
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Bruno Abrantes
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-10-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '5.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '5.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: retryable
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: redis
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.3'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: event_emitter
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.2'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.2'
69
+ - !ruby/object:Gem::Dependency
70
+ name: bundler
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.12'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.12'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.5'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '3.5'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec-its
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.2'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.2'
111
+ - !ruby/object:Gem::Dependency
112
+ name: pry-byebug
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '3.4'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '3.4'
125
+ - !ruby/object:Gem::Dependency
126
+ name: simplecov
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '0.12'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '0.12'
139
+ - !ruby/object:Gem::Dependency
140
+ name: codeclimate-test-reporter
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '0.6'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '0.6'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rubocop
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '0.43'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '0.43'
167
+ description: ''
168
+ email:
169
+ - bruno@brunoabrantes.com
170
+ executables:
171
+ - hivent
172
+ extensions: []
173
+ extra_rdoc_files: []
174
+ files:
175
+ - ".codeclimate.yml"
176
+ - ".gitignore"
177
+ - ".rspec"
178
+ - ".rubocop.yml"
179
+ - ".ruby-version"
180
+ - ".simplecov.template"
181
+ - ".travis.yml"
182
+ - ".version"
183
+ - Gemfile
184
+ - LICENSE
185
+ - README.md
186
+ - bin/hivent
187
+ - hivent.gemspec
188
+ - lib/hivent.rb
189
+ - lib/hivent/abstract_signal.rb
190
+ - lib/hivent/cli/consumer.rb
191
+ - lib/hivent/cli/runner.rb
192
+ - lib/hivent/cli/start_option_parser.rb
193
+ - lib/hivent/config.rb
194
+ - lib/hivent/config/options.rb
195
+ - lib/hivent/emitter.rb
196
+ - lib/hivent/life_cycle_event_handler.rb
197
+ - lib/hivent/redis/consumer.rb
198
+ - lib/hivent/redis/extensions.rb
199
+ - lib/hivent/redis/lua/consumer.lua
200
+ - lib/hivent/redis/lua/producer.lua
201
+ - lib/hivent/redis/producer.rb
202
+ - lib/hivent/redis/redis.rb
203
+ - lib/hivent/redis/signal.rb
204
+ - lib/hivent/rspec.rb
205
+ - lib/hivent/signal.rb
206
+ - lib/hivent/spec.rb
207
+ - lib/hivent/spec/matchers.rb
208
+ - lib/hivent/spec/matchers/emit.rb
209
+ - lib/hivent/spec/signal.rb
210
+ - lib/hivent/version.rb
211
+ - spec/codeclimate_helper.rb
212
+ - spec/fixtures/cli/bootstrap_consumers.rb
213
+ - spec/fixtures/cli/life_cycle_event_test.rb
214
+ - spec/hivent/abstract_signal_spec.rb
215
+ - spec/hivent/cli/consumer_spec.rb
216
+ - spec/hivent/cli/runner_spec.rb
217
+ - spec/hivent/cli/start_option_parser_spec.rb
218
+ - spec/hivent/life_cycle_event_handler_spec.rb
219
+ - spec/hivent/redis/consumer_spec.rb
220
+ - spec/hivent/redis/signal_spec.rb
221
+ - spec/hivent_spec.rb
222
+ - spec/spec/matchers/emit_spec.rb
223
+ - spec/spec/signal_spec.rb
224
+ - spec/spec_helper.rb
225
+ - spec/support/matchers/exit_with_code.rb
226
+ - spec/support/stdout_helpers.rb
227
+ homepage: https://github.com/inf0rmer/hivent-ruby
228
+ licenses:
229
+ - MIT
230
+ metadata: {}
231
+ post_install_message:
232
+ rdoc_options: []
233
+ require_paths:
234
+ - lib
235
+ required_ruby_version: !ruby/object:Gem::Requirement
236
+ requirements:
237
+ - - ">="
238
+ - !ruby/object:Gem::Version
239
+ version: '0'
240
+ required_rubygems_version: !ruby/object:Gem::Requirement
241
+ requirements:
242
+ - - ">="
243
+ - !ruby/object:Gem::Version
244
+ version: '0'
245
+ requirements: []
246
+ rubyforge_project:
247
+ rubygems_version: 2.5.1
248
+ signing_key:
249
+ specification_version: 4
250
+ summary: An event stream implementation that aggregates facts about your application
251
+ test_files:
252
+ - spec/codeclimate_helper.rb
253
+ - spec/fixtures/cli/bootstrap_consumers.rb
254
+ - spec/fixtures/cli/life_cycle_event_test.rb
255
+ - spec/hivent/abstract_signal_spec.rb
256
+ - spec/hivent/cli/consumer_spec.rb
257
+ - spec/hivent/cli/runner_spec.rb
258
+ - spec/hivent/cli/start_option_parser_spec.rb
259
+ - spec/hivent/life_cycle_event_handler_spec.rb
260
+ - spec/hivent/redis/consumer_spec.rb
261
+ - spec/hivent/redis/signal_spec.rb
262
+ - spec/hivent_spec.rb
263
+ - spec/spec/matchers/emit_spec.rb
264
+ - spec/spec/signal_spec.rb
265
+ - spec/spec_helper.rb
266
+ - spec/support/matchers/exit_with_code.rb
267
+ - spec/support/stdout_helpers.rb