nulogy_message_bus_consumer 0.5.0 → 1.0.0.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nulogy_message_bus_consumer/message.rb +13 -11
- data/lib/nulogy_message_bus_consumer/version.rb +1 -1
- metadata +11 -159
- data/spec/dummy/Rakefile +0 -6
- data/spec/dummy/app/assets/config/manifest.js +0 -3
- data/spec/dummy/app/assets/stylesheets/application.css +0 -15
- data/spec/dummy/app/channels/application_cable/channel.rb +0 -4
- data/spec/dummy/app/channels/application_cable/connection.rb +0 -4
- data/spec/dummy/app/controllers/application_controller.rb +0 -2
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/javascript/packs/application.js +0 -15
- data/spec/dummy/app/jobs/application_job.rb +0 -7
- data/spec/dummy/app/mailers/application_mailer.rb +0 -4
- data/spec/dummy/app/models/application_record.rb +0 -3
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/app/views/layouts/mailer.html.erb +0 -13
- data/spec/dummy/app/views/layouts/mailer.text.erb +0 -1
- data/spec/dummy/bin/rails +0 -4
- data/spec/dummy/bin/rake +0 -4
- data/spec/dummy/bin/setup +0 -33
- data/spec/dummy/config/application.rb +0 -29
- data/spec/dummy/config/boot.rb +0 -5
- data/spec/dummy/config/cable.yml +0 -10
- data/spec/dummy/config/credentials/message-bus-us-east-1.key +0 -1
- data/spec/dummy/config/credentials/message-bus-us-east-1.yml.enc +0 -1
- data/spec/dummy/config/database.yml +0 -27
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -62
- data/spec/dummy/config/environments/production.rb +0 -112
- data/spec/dummy/config/environments/test.rb +0 -49
- data/spec/dummy/config/initializers/application_controller_renderer.rb +0 -8
- data/spec/dummy/config/initializers/assets.rb +0 -12
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/content_security_policy.rb +0 -28
- data/spec/dummy/config/initializers/cookies_serializer.rb +0 -5
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy/config/initializers/message_bus_consumer.rb +0 -5
- data/spec/dummy/config/initializers/mime_types.rb +0 -4
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/en.yml +0 -33
- data/spec/dummy/config/puma.rb +0 -36
- data/spec/dummy/config/routes.rb +0 -3
- data/spec/dummy/config/spring.rb +0 -6
- data/spec/dummy/config/storage.yml +0 -34
- data/spec/dummy/config.ru +0 -5
- data/spec/dummy/db/schema.rb +0 -21
- data/spec/dummy/log/development.log +0 -4
- data/spec/dummy/log/production.log +0 -18
- data/spec/dummy/log/test.log +0 -6083
- data/spec/dummy/public/404.html +0 -67
- data/spec/dummy/public/422.html +0 -67
- data/spec/dummy/public/500.html +0 -66
- data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/dummy/public/apple-touch-icon.png +0 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/tmp/development_secret.txt +0 -1
- data/spec/integration/nulogy_message_bus_consumer/auditor_spec.rb +0 -59
- data/spec/integration/nulogy_message_bus_consumer/kafka_utils_spec.rb +0 -41
- data/spec/integration/nulogy_message_bus_consumer/steps/commit_on_success_spec.rb +0 -131
- data/spec/integration/nulogy_message_bus_consumer/steps/connect_to_message_bus_spec.rb +0 -54
- data/spec/integration/nulogy_message_bus_consumer/steps/supervise_consumer_lag_spec.rb +0 -54
- data/spec/integration/test_topic_spec.rb +0 -39
- data/spec/spec_helper.rb +0 -49
- data/spec/support/kafka.rb +0 -74
- data/spec/support/middleware_tap.rb +0 -12
- data/spec/support/test_topic.rb +0 -48
- data/spec/unit/nulogy_message_bus_consumer/config_spec.rb +0 -20
- data/spec/unit/nulogy_message_bus_consumer/lag_tracker.rb +0 -35
- data/spec/unit/nulogy_message_bus_consumer/message_spec.rb +0 -84
- data/spec/unit/nulogy_message_bus_consumer/pipeline_spec.rb +0 -49
- data/spec/unit/nulogy_message_bus_consumer/steps/commit_on_success_spec.rb +0 -58
- data/spec/unit/nulogy_message_bus_consumer/steps/deduplicate_messages_spec.rb +0 -56
- data/spec/unit/nulogy_message_bus_consumer/steps/log_messages_spec.rb +0 -70
- data/spec/unit/nulogy_message_bus_consumer/steps/monitor_replication_lag/calculator_spec.rb +0 -63
- data/spec/unit/nulogy_message_bus_consumer/steps/stream_messages_spec.rb +0 -35
- data/spec/unit/nulogy_message_bus_consumer_spec.rb +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d17557a978d8762a83afcb1a8027296854d516cde57540243d48c80cc46c012
|
4
|
+
data.tar.gz: 02c45bfab242f35a0143d090a08387f80db0030854a28b161792cb09efded53c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c7ef5e49a3aff7e09e963592fc79f7435a29d3567764d0cec1e98d52fea31d18f1ee2ea4b3d429c2e550307f0fab539733d700716b89b45c05cfee269e87955
|
7
|
+
data.tar.gz: 0be71a225c18e458d440f80eefadfb5b1a841ad57d619af434e12832c48ff31c1ce2614aaf5786330e2282e418838a223f91c82ebae74cedda3801446620fbb2
|
@@ -1,16 +1,17 @@
|
|
1
1
|
module NulogyMessageBusConsumer
|
2
2
|
class Message
|
3
|
-
attr_reader :
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
3
|
+
attr_reader :company_uuid,
|
4
|
+
:created_at,
|
5
|
+
:event_data,
|
6
|
+
:event_data_unparsed,
|
7
|
+
:id,
|
8
|
+
:key,
|
9
|
+
:offset,
|
10
|
+
:partition,
|
11
|
+
:subscription_id,
|
12
|
+
:timestamp,
|
13
|
+
:topic,
|
14
|
+
:type
|
14
15
|
|
15
16
|
def initialize(attrs = {})
|
16
17
|
attrs.each { |key, value| instance_variable_set("@#{key}", value) }
|
@@ -36,6 +37,7 @@ module NulogyMessageBusConsumer
|
|
36
37
|
company_uuid: envelope_data[:company_uuid] || envelope_data[:tenant_id],
|
37
38
|
timestamp: kafka_message.timestamp,
|
38
39
|
topic: kafka_message.topic,
|
40
|
+
type: envelope_data[:type],
|
39
41
|
created_at: envelope_data[:created_at]
|
40
42
|
)
|
41
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nulogy_message_bus_consumer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0.alpha
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nulogy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -154,16 +154,16 @@ dependencies:
|
|
154
154
|
name: rspec
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- -
|
157
|
+
- - '='
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
159
|
+
version: 3.9.0
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- -
|
164
|
+
- - '='
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
166
|
+
version: 3.9.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: rspec-json_expectations
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -269,80 +269,6 @@ files:
|
|
269
269
|
- lib/nulogy_message_bus_consumer/steps/supervise_consumer_lag.rb
|
270
270
|
- lib/nulogy_message_bus_consumer/version.rb
|
271
271
|
- lib/tasks/engine/message_bus_consumer.rake
|
272
|
-
- spec/dummy/Rakefile
|
273
|
-
- spec/dummy/app/assets/config/manifest.js
|
274
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
275
|
-
- spec/dummy/app/channels/application_cable/channel.rb
|
276
|
-
- spec/dummy/app/channels/application_cable/connection.rb
|
277
|
-
- spec/dummy/app/controllers/application_controller.rb
|
278
|
-
- spec/dummy/app/helpers/application_helper.rb
|
279
|
-
- spec/dummy/app/javascript/packs/application.js
|
280
|
-
- spec/dummy/app/jobs/application_job.rb
|
281
|
-
- spec/dummy/app/mailers/application_mailer.rb
|
282
|
-
- spec/dummy/app/models/application_record.rb
|
283
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
284
|
-
- spec/dummy/app/views/layouts/mailer.html.erb
|
285
|
-
- spec/dummy/app/views/layouts/mailer.text.erb
|
286
|
-
- spec/dummy/bin/rails
|
287
|
-
- spec/dummy/bin/rake
|
288
|
-
- spec/dummy/bin/setup
|
289
|
-
- spec/dummy/config.ru
|
290
|
-
- spec/dummy/config/application.rb
|
291
|
-
- spec/dummy/config/boot.rb
|
292
|
-
- spec/dummy/config/cable.yml
|
293
|
-
- spec/dummy/config/credentials/message-bus-us-east-1.key
|
294
|
-
- spec/dummy/config/credentials/message-bus-us-east-1.yml.enc
|
295
|
-
- spec/dummy/config/database.yml
|
296
|
-
- spec/dummy/config/environment.rb
|
297
|
-
- spec/dummy/config/environments/development.rb
|
298
|
-
- spec/dummy/config/environments/production.rb
|
299
|
-
- spec/dummy/config/environments/test.rb
|
300
|
-
- spec/dummy/config/initializers/application_controller_renderer.rb
|
301
|
-
- spec/dummy/config/initializers/assets.rb
|
302
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
303
|
-
- spec/dummy/config/initializers/content_security_policy.rb
|
304
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
305
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
306
|
-
- spec/dummy/config/initializers/inflections.rb
|
307
|
-
- spec/dummy/config/initializers/message_bus_consumer.rb
|
308
|
-
- spec/dummy/config/initializers/mime_types.rb
|
309
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
310
|
-
- spec/dummy/config/locales/en.yml
|
311
|
-
- spec/dummy/config/puma.rb
|
312
|
-
- spec/dummy/config/routes.rb
|
313
|
-
- spec/dummy/config/spring.rb
|
314
|
-
- spec/dummy/config/storage.yml
|
315
|
-
- spec/dummy/db/schema.rb
|
316
|
-
- spec/dummy/log/development.log
|
317
|
-
- spec/dummy/log/production.log
|
318
|
-
- spec/dummy/log/test.log
|
319
|
-
- spec/dummy/public/404.html
|
320
|
-
- spec/dummy/public/422.html
|
321
|
-
- spec/dummy/public/500.html
|
322
|
-
- spec/dummy/public/apple-touch-icon-precomposed.png
|
323
|
-
- spec/dummy/public/apple-touch-icon.png
|
324
|
-
- spec/dummy/public/favicon.ico
|
325
|
-
- spec/dummy/tmp/development_secret.txt
|
326
|
-
- spec/integration/nulogy_message_bus_consumer/auditor_spec.rb
|
327
|
-
- spec/integration/nulogy_message_bus_consumer/kafka_utils_spec.rb
|
328
|
-
- spec/integration/nulogy_message_bus_consumer/steps/commit_on_success_spec.rb
|
329
|
-
- spec/integration/nulogy_message_bus_consumer/steps/connect_to_message_bus_spec.rb
|
330
|
-
- spec/integration/nulogy_message_bus_consumer/steps/supervise_consumer_lag_spec.rb
|
331
|
-
- spec/integration/test_topic_spec.rb
|
332
|
-
- spec/spec_helper.rb
|
333
|
-
- spec/support/kafka.rb
|
334
|
-
- spec/support/middleware_tap.rb
|
335
|
-
- spec/support/test_topic.rb
|
336
|
-
- spec/unit/nulogy_message_bus_consumer/config_spec.rb
|
337
|
-
- spec/unit/nulogy_message_bus_consumer/lag_tracker.rb
|
338
|
-
- spec/unit/nulogy_message_bus_consumer/message_spec.rb
|
339
|
-
- spec/unit/nulogy_message_bus_consumer/pipeline_spec.rb
|
340
|
-
- spec/unit/nulogy_message_bus_consumer/steps/commit_on_success_spec.rb
|
341
|
-
- spec/unit/nulogy_message_bus_consumer/steps/deduplicate_messages_spec.rb
|
342
|
-
- spec/unit/nulogy_message_bus_consumer/steps/log_messages_spec.rb
|
343
|
-
- spec/unit/nulogy_message_bus_consumer/steps/monitor_replication_lag/calculator_spec.rb
|
344
|
-
- spec/unit/nulogy_message_bus_consumer/steps/stream_messages_spec.rb
|
345
|
-
- spec/unit/nulogy_message_bus_consumer_spec.rb
|
346
272
|
homepage: https://github.com/nulogy/message-bus/tree/master/gems/nulogy_message_bus_consumer
|
347
273
|
licenses: []
|
348
274
|
metadata:
|
@@ -355,89 +281,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
355
281
|
requirements:
|
356
282
|
- - ">="
|
357
283
|
- !ruby/object:Gem::Version
|
358
|
-
version: '
|
284
|
+
version: '0'
|
359
285
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
360
286
|
requirements:
|
361
|
-
- - "
|
287
|
+
- - ">"
|
362
288
|
- !ruby/object:Gem::Version
|
363
|
-
version:
|
289
|
+
version: 1.3.1
|
364
290
|
requirements: []
|
365
|
-
rubygems_version: 3.
|
291
|
+
rubygems_version: 3.0.3
|
366
292
|
signing_key:
|
367
293
|
specification_version: 4
|
368
294
|
summary: Code for accessing the Nulogy Message Bus
|
369
|
-
test_files:
|
370
|
-
- spec/dummy/Rakefile
|
371
|
-
- spec/dummy/app/assets/config/manifest.js
|
372
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
373
|
-
- spec/dummy/app/channels/application_cable/channel.rb
|
374
|
-
- spec/dummy/app/channels/application_cable/connection.rb
|
375
|
-
- spec/dummy/app/controllers/application_controller.rb
|
376
|
-
- spec/dummy/app/helpers/application_helper.rb
|
377
|
-
- spec/dummy/app/javascript/packs/application.js
|
378
|
-
- spec/dummy/app/jobs/application_job.rb
|
379
|
-
- spec/dummy/app/mailers/application_mailer.rb
|
380
|
-
- spec/dummy/app/models/application_record.rb
|
381
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
382
|
-
- spec/dummy/app/views/layouts/mailer.html.erb
|
383
|
-
- spec/dummy/app/views/layouts/mailer.text.erb
|
384
|
-
- spec/dummy/bin/rails
|
385
|
-
- spec/dummy/bin/rake
|
386
|
-
- spec/dummy/bin/setup
|
387
|
-
- spec/dummy/config/application.rb
|
388
|
-
- spec/dummy/config/boot.rb
|
389
|
-
- spec/dummy/config/cable.yml
|
390
|
-
- spec/dummy/config/credentials/message-bus-us-east-1.key
|
391
|
-
- spec/dummy/config/credentials/message-bus-us-east-1.yml.enc
|
392
|
-
- spec/dummy/config/database.yml
|
393
|
-
- spec/dummy/config/environment.rb
|
394
|
-
- spec/dummy/config/environments/development.rb
|
395
|
-
- spec/dummy/config/environments/production.rb
|
396
|
-
- spec/dummy/config/environments/test.rb
|
397
|
-
- spec/dummy/config/initializers/application_controller_renderer.rb
|
398
|
-
- spec/dummy/config/initializers/assets.rb
|
399
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
400
|
-
- spec/dummy/config/initializers/content_security_policy.rb
|
401
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
402
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
403
|
-
- spec/dummy/config/initializers/inflections.rb
|
404
|
-
- spec/dummy/config/initializers/message_bus_consumer.rb
|
405
|
-
- spec/dummy/config/initializers/mime_types.rb
|
406
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
407
|
-
- spec/dummy/config/locales/en.yml
|
408
|
-
- spec/dummy/config/puma.rb
|
409
|
-
- spec/dummy/config/routes.rb
|
410
|
-
- spec/dummy/config/spring.rb
|
411
|
-
- spec/dummy/config/storage.yml
|
412
|
-
- spec/dummy/config.ru
|
413
|
-
- spec/dummy/db/schema.rb
|
414
|
-
- spec/dummy/log/development.log
|
415
|
-
- spec/dummy/log/production.log
|
416
|
-
- spec/dummy/log/test.log
|
417
|
-
- spec/dummy/public/404.html
|
418
|
-
- spec/dummy/public/422.html
|
419
|
-
- spec/dummy/public/500.html
|
420
|
-
- spec/dummy/public/apple-touch-icon-precomposed.png
|
421
|
-
- spec/dummy/public/apple-touch-icon.png
|
422
|
-
- spec/dummy/public/favicon.ico
|
423
|
-
- spec/dummy/tmp/development_secret.txt
|
424
|
-
- spec/integration/nulogy_message_bus_consumer/auditor_spec.rb
|
425
|
-
- spec/integration/nulogy_message_bus_consumer/kafka_utils_spec.rb
|
426
|
-
- spec/integration/nulogy_message_bus_consumer/steps/commit_on_success_spec.rb
|
427
|
-
- spec/integration/nulogy_message_bus_consumer/steps/connect_to_message_bus_spec.rb
|
428
|
-
- spec/integration/nulogy_message_bus_consumer/steps/supervise_consumer_lag_spec.rb
|
429
|
-
- spec/integration/test_topic_spec.rb
|
430
|
-
- spec/spec_helper.rb
|
431
|
-
- spec/support/kafka.rb
|
432
|
-
- spec/support/middleware_tap.rb
|
433
|
-
- spec/support/test_topic.rb
|
434
|
-
- spec/unit/nulogy_message_bus_consumer/config_spec.rb
|
435
|
-
- spec/unit/nulogy_message_bus_consumer/lag_tracker.rb
|
436
|
-
- spec/unit/nulogy_message_bus_consumer/message_spec.rb
|
437
|
-
- spec/unit/nulogy_message_bus_consumer/pipeline_spec.rb
|
438
|
-
- spec/unit/nulogy_message_bus_consumer/steps/commit_on_success_spec.rb
|
439
|
-
- spec/unit/nulogy_message_bus_consumer/steps/deduplicate_messages_spec.rb
|
440
|
-
- spec/unit/nulogy_message_bus_consumer/steps/log_messages_spec.rb
|
441
|
-
- spec/unit/nulogy_message_bus_consumer/steps/monitor_replication_lag/calculator_spec.rb
|
442
|
-
- spec/unit/nulogy_message_bus_consumer/steps/stream_messages_spec.rb
|
443
|
-
- spec/unit/nulogy_message_bus_consumer_spec.rb
|
295
|
+
test_files: []
|
data/spec/dummy/Rakefile
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
10
|
-
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
|
-
* It is generally better to create a new file per style scope.
|
12
|
-
*
|
13
|
-
*= require_tree .
|
14
|
-
*= require_self
|
15
|
-
*/
|
@@ -1,15 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// compiled file. JavaScript code in this file should be added after the last require_* statement.
|
9
|
-
//
|
10
|
-
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
-
// about supported directives.
|
12
|
-
//
|
13
|
-
//= require rails-ujs
|
14
|
-
//= require activestorage
|
15
|
-
//= require_tree .
|
@@ -1,7 +0,0 @@
|
|
1
|
-
class ApplicationJob < ActiveJob::Base
|
2
|
-
# Automatically retry jobs that encountered a deadlock
|
3
|
-
# retry_on ActiveRecord::Deadlocked
|
4
|
-
|
5
|
-
# Most jobs are safe to ignore if the underlying records are no longer available
|
6
|
-
# discard_on ActiveJob::DeserializationError
|
7
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= yield %>
|
data/spec/dummy/bin/rails
DELETED
data/spec/dummy/bin/rake
DELETED
data/spec/dummy/bin/setup
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
require "fileutils"
|
3
|
-
|
4
|
-
# path to your application root.
|
5
|
-
APP_ROOT = File.expand_path("..", __dir__)
|
6
|
-
|
7
|
-
def system!(*args)
|
8
|
-
system(*args) || abort("\n== Command #{args} failed ==")
|
9
|
-
end
|
10
|
-
|
11
|
-
FileUtils.chdir APP_ROOT do
|
12
|
-
# This script is a way to setup or update your development environment automatically.
|
13
|
-
# This script is idempotent, so that you can run it at anytime and get an expectable outcome.
|
14
|
-
# Add necessary setup steps to this file.
|
15
|
-
|
16
|
-
puts "== Installing dependencies =="
|
17
|
-
system! "gem install bundler --conservative"
|
18
|
-
system("bundle check") || system!("bundle install")
|
19
|
-
|
20
|
-
# puts "\n== Copying sample files =="
|
21
|
-
# unless File.exist?('config/database.yml')
|
22
|
-
# FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
|
23
|
-
# end
|
24
|
-
|
25
|
-
puts "\n== Preparing database =="
|
26
|
-
system! "bin/rails db:prepare"
|
27
|
-
|
28
|
-
puts "\n== Removing old logs and tempfiles =="
|
29
|
-
system! "bin/rails log:clear tmp:clear"
|
30
|
-
|
31
|
-
puts "\n== Restarting application server =="
|
32
|
-
system! "bin/rails restart"
|
33
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
require_relative "boot"
|
2
|
-
|
3
|
-
require "rails"
|
4
|
-
# Pick the frameworks you want:
|
5
|
-
require "active_model/railtie"
|
6
|
-
require "active_job/railtie"
|
7
|
-
require "active_record/railtie"
|
8
|
-
require "active_storage/engine"
|
9
|
-
require "action_controller/railtie"
|
10
|
-
require "action_mailer/railtie"
|
11
|
-
require "action_view/railtie"
|
12
|
-
require "action_cable/engine"
|
13
|
-
require "sprockets/railtie"
|
14
|
-
# require "rails/test_unit/railtie"
|
15
|
-
|
16
|
-
Bundler.require(*Rails.groups)
|
17
|
-
require "nulogy_message_bus_consumer"
|
18
|
-
|
19
|
-
module Dummy
|
20
|
-
class Application < Rails::Application
|
21
|
-
# Initialize configuration defaults for originally generated Rails version.
|
22
|
-
config.load_defaults 6.0
|
23
|
-
|
24
|
-
# Settings in config/environments/* take precedence over those specified here.
|
25
|
-
# Application configuration can go into files in config/initializers
|
26
|
-
# -- all .rb files in that directory are automatically loaded after loading
|
27
|
-
# the framework and any gems in your application.
|
28
|
-
end
|
29
|
-
end
|
data/spec/dummy/config/boot.rb
DELETED
data/spec/dummy/config/cable.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
dfa19863b2709390893da4c2fb85579a
|
@@ -1 +0,0 @@
|
|
1
|
-
../../../../config/credentials/message-bus-us-east-1.yml.enc
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# Copy this file to 'database.yml' and modify the copy as needed.
|
2
|
-
|
3
|
-
defaults: &defaults
|
4
|
-
adapter: postgresql
|
5
|
-
username: nulogy
|
6
|
-
password: <%= ENV['DATABASE_PASS'] || "Nulogy4Ever" %>
|
7
|
-
host: <%= ENV['DATABASE_HOST'] || "localhost" %>
|
8
|
-
port: 5437
|
9
|
-
min_messages: warning
|
10
|
-
schema_search_path: "\"$user\", public, extensions"
|
11
|
-
|
12
|
-
development: &development
|
13
|
-
<<: *defaults
|
14
|
-
database: <%= ENV['DEVELOPMENT_DATABASE'] || "message_bus_consumer_development" %>
|
15
|
-
|
16
|
-
development_slave:
|
17
|
-
<<: *development
|
18
|
-
|
19
|
-
# Warning: The database defined as 'test' will be erased and
|
20
|
-
# re-generated from your development database when you run 'rake'.
|
21
|
-
# Do not set this db to the same as development or production.
|
22
|
-
test: &test
|
23
|
-
<<: *defaults
|
24
|
-
database: <%= ENV['TEST_DATABASE'] || "message_bus_consumer_test" %>
|
25
|
-
|
26
|
-
test_slave:
|
27
|
-
<<: *test
|
@@ -1,62 +0,0 @@
|
|
1
|
-
Rails.application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
# In the development environment your application's code is reloaded on
|
5
|
-
# every request. This slows down response time but is perfect for development
|
6
|
-
# since you don't have to restart the web server when you make code changes.
|
7
|
-
config.cache_classes = false
|
8
|
-
|
9
|
-
# Do not eager load code on boot.
|
10
|
-
config.eager_load = false
|
11
|
-
|
12
|
-
# Show full error reports.
|
13
|
-
config.consider_all_requests_local = true
|
14
|
-
|
15
|
-
# Enable/disable caching. By default caching is disabled.
|
16
|
-
# Run rails dev:cache to toggle caching.
|
17
|
-
if Rails.root.join("tmp/caching-dev.txt").exist?
|
18
|
-
config.action_controller.perform_caching = true
|
19
|
-
config.action_controller.enable_fragment_cache_logging = true
|
20
|
-
|
21
|
-
config.cache_store = :memory_store
|
22
|
-
config.public_file_server.headers = {
|
23
|
-
"Cache-Control" => "public, max-age=#{2.days.to_i}"
|
24
|
-
}
|
25
|
-
else
|
26
|
-
config.action_controller.perform_caching = false
|
27
|
-
|
28
|
-
config.cache_store = :null_store
|
29
|
-
end
|
30
|
-
|
31
|
-
# Store uploaded files on the local file system (see config/storage.yml for options).
|
32
|
-
config.active_storage.service = :local
|
33
|
-
|
34
|
-
# Don't care if the mailer can't send.
|
35
|
-
config.action_mailer.raise_delivery_errors = false
|
36
|
-
|
37
|
-
config.action_mailer.perform_caching = false
|
38
|
-
|
39
|
-
# Print deprecation notices to the Rails logger.
|
40
|
-
config.active_support.deprecation = :log
|
41
|
-
|
42
|
-
# Raise an error on page load if there are pending migrations.
|
43
|
-
config.active_record.migration_error = :page_load
|
44
|
-
|
45
|
-
# Highlight code that triggered database queries in logs.
|
46
|
-
config.active_record.verbose_query_logs = true
|
47
|
-
|
48
|
-
# Debug mode disables concatenation and preprocessing of assets.
|
49
|
-
# This option may cause significant delays in view rendering with a large
|
50
|
-
# number of complex assets.
|
51
|
-
config.assets.debug = true
|
52
|
-
|
53
|
-
# Suppress logger output for asset requests.
|
54
|
-
config.assets.quiet = true
|
55
|
-
|
56
|
-
# Raises error for missing translations.
|
57
|
-
# config.action_view.raise_on_missing_translations = true
|
58
|
-
|
59
|
-
# Use an evented file watcher to asynchronously detect changes in source code,
|
60
|
-
# routes, locales, etc. This feature depends on the listen gem.
|
61
|
-
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
62
|
-
end
|