nulogy_message_bus_producer 3.5.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c697390ae3e8ef5704c9cec7f698efc708143254ee61a434a3954c63bb761a4e
4
- data.tar.gz: c9d6cf6b80814090796993e3e82aab04405412fe41d56aa49fd00c54b8a50ffd
3
+ metadata.gz: '09cdf559c81e51ed84f1934671f228a19a2dfad7cff5abcaacd8488f0f283d99'
4
+ data.tar.gz: fbdf61244f85650b49d8993147ec0c6bf4a2c4cf938232179c407dc713375a4c
5
5
  SHA512:
6
- metadata.gz: 9f02675c37b6668344f704163531cd46e83aacd3a0e6d2ee6dee85b76182b0b0852f23e0954baac10ae978901b619399776ac38326b39c74b2f4540c59a2fdc3
7
- data.tar.gz: 848f437d8e1dffc475648ff89a684b109a30457ae85f012ffefc98b6643087de3d6b2e6668281bcab83e2de4b8ac2662742825d990866c5c3916b9a38d93b649
6
+ metadata.gz: 5287ca3c664b020a3b5c2b0d075b059edf8cf5809a903bf4616a3f2fef5f5c9f95a06572dd55d6647fac316c6214e4bc0272acbac5fe36044c7902fa4862b8a8
7
+ data.tar.gz: af1a24b62b496e43133f5fdcfb77c194a18df2fc4e84780f245e934fe43e2deee9f794ae7f0e7abed6cf4fc8a69ce21367ff1e5aaa1e510b891fd2067cbf9669
data/README.md CHANGED
@@ -133,11 +133,6 @@ module ExampleDomainPublicApi
133
133
  class Schema < GraphQL::Schema
134
134
  use NulogyMessageBusProducer::Subscriptions::PostgresTransport
135
135
 
136
- # You must use the Interpreter, as it will be the new default.
137
- # See more here: https://graphql-ruby.org/queries/interpreter
138
- use GraphQL::Analysis::AST
139
- use GraphQL::Execution::Interpreter
140
-
141
136
  # This prevents subscriptions which contain arguments or expand lists form being registered.
142
137
  # Expanding unbounded lists inside of an event may severely impact the performance of the system.
143
138
  # Arguments are a source of variation that may not be appropriately tested.
@@ -17,10 +17,10 @@ module NulogyMessageBusProducer
17
17
  @schema_key = NulogyMessageBusProducer.resolve_schema_key(schema)
18
18
  end
19
19
 
20
- def each_subscription_id(event)
21
- # The graphql gem camelizes and stringifies the Event's arguments
22
- # See subscriptions#trigger here: graphql-1.11.4/lib/graphql/subscriptions.rb
23
- yield event.arguments.fetch("subscriptionId")
20
+ def execute_all(event, object)
21
+ subscription_id = event.arguments.fetch("subscriptionId")
22
+
23
+ execute(subscription_id, event, object)
24
24
  end
25
25
 
26
26
  def read_subscription(subscription_id)
@@ -1,3 +1,3 @@
1
1
  module NulogyMessageBusProducer
2
- VERSION = "3.5.0".freeze
2
+ VERSION = "4.0.0".freeze
3
3
  end
@@ -14,9 +14,7 @@ RSpec.describe NulogyMessageBusProducer::RepopulateReplicationSlots do
14
14
  cleanup_everything
15
15
  end
16
16
 
17
- # TODO: This test is incredibly flakey.
18
- # It rarely works in CI, and ocassionally works locally.
19
- xit "generates events" do
17
+ it "generates events", skip: flakey_in_ci do
20
18
  Kafka.create_topic(topic_name)
21
19
  consumer = Kafka.setup_kafka_consumer(topic_name)
22
20
 
data/spec/spec_helper.rb CHANGED
@@ -56,4 +56,5 @@ RSpec.configure do |config|
56
56
  end
57
57
 
58
58
  config.include(SubscriptionHelpers)
59
+ config.extend(Skip)
59
60
  end
@@ -0,0 +1,9 @@
1
+ module Skip
2
+ def flakey_in_ci
3
+ if ENV.fetch("CI", false)
4
+ "This spec is terribly flakey in CI, so we only run it locally"
5
+ else
6
+ false
7
+ end
8
+ end
9
+ end
@@ -40,8 +40,6 @@ module NulogyMessageBusProducer
40
40
  end
41
41
 
42
42
  class TestSchema < GraphQL::Schema
43
- use GraphQL::Execution::Interpreter
44
- use GraphQL::Analysis::AST
45
43
  use NulogyMessageBusProducer::Subscriptions::PostgresTransport
46
44
 
47
45
  query TestQuery
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nulogy_message_bus_producer
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 4.0.0
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-15 00:00:00.000000000 Z
11
+ date: 2021-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.11.7
19
+ version: 1.13.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.11.7
26
+ version: 1.13.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: railties
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.7.0.1
55
+ - !ruby/object:Gem::Dependency
56
+ name: listen
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.5'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.5'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: pg
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -222,7 +236,7 @@ dependencies:
222
236
  version: 1.40.0
223
237
  description: Nulogy's code for producing to the Message Bus
224
238
  email:
225
- - tass@nulogy.com
239
+ - platform-engineering@nulogy.com
226
240
  executables: []
227
241
  extensions: []
228
242
  extra_rdoc_files: []
@@ -299,8 +313,6 @@ files:
299
313
  - spec/dummy/config/storage.yml
300
314
  - spec/dummy/db/migrate/20201005164116_create_active_storage_tables.active_storage.rb
301
315
  - spec/dummy/db/schema.rb
302
- - spec/dummy/log/development.log
303
- - spec/dummy/log/test.log
304
316
  - spec/dummy/package.json
305
317
  - spec/dummy/public/404.html
306
318
  - spec/dummy/public/422.html
@@ -323,6 +335,7 @@ files:
323
335
  - spec/support/kafka.rb
324
336
  - spec/support/kafka_connect.rb
325
337
  - spec/support/shared_examples/subscription_validations.rb
338
+ - spec/support/skip.rb
326
339
  - spec/support/spec_utils.rb
327
340
  - spec/support/sql_helpers.rb
328
341
  - spec/support/subscription_helpers.rb
@@ -400,8 +413,6 @@ test_files:
400
413
  - spec/dummy/config.ru
401
414
  - spec/dummy/db/migrate/20201005164116_create_active_storage_tables.active_storage.rb
402
415
  - spec/dummy/db/schema.rb
403
- - spec/dummy/log/development.log
404
- - spec/dummy/log/test.log
405
416
  - spec/dummy/package.json
406
417
  - spec/dummy/public/404.html
407
418
  - spec/dummy/public/422.html
@@ -424,6 +435,7 @@ test_files:
424
435
  - spec/support/kafka.rb
425
436
  - spec/support/kafka_connect.rb
426
437
  - spec/support/shared_examples/subscription_validations.rb
438
+ - spec/support/skip.rb
427
439
  - spec/support/spec_utils.rb
428
440
  - spec/support/sql_helpers.rb
429
441
  - spec/support/subscription_helpers.rb