nulogy_message_bus_producer 3.2.1 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +82 -22
- data/Rakefile +2 -4
- data/db/migrate/20200611150212_create_public_subscriptions_and_events_tables.rb +2 -2
- data/lib/nulogy_message_bus_producer.rb +15 -8
- data/lib/nulogy_message_bus_producer/base_subscription.rb +1 -1
- data/lib/nulogy_message_bus_producer/config.rb +25 -1
- data/lib/nulogy_message_bus_producer/configuration/query_parser.rb +71 -0
- data/lib/nulogy_message_bus_producer/self_serve_subscription.rb +18 -0
- data/lib/nulogy_message_bus_producer/subscriptions/configured_subscription.rb +14 -0
- data/lib/nulogy_message_bus_producer/subscriptions/finder.rb +40 -0
- data/lib/nulogy_message_bus_producer/subscriptions/postgres_transport.rb +13 -6
- data/lib/nulogy_message_bus_producer/subscriptions/query_validator.rb +47 -0
- data/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker.rb +0 -5
- data/lib/nulogy_message_bus_producer/subscriptions/valid_for_schema_validator.rb +14 -0
- data/lib/nulogy_message_bus_producer/version.rb +1 -1
- data/spec/dummy/Rakefile +1 -1
- data/spec/dummy/app/mailers/application_mailer.rb +2 -2
- data/spec/dummy/bin/bundle +2 -2
- data/spec/dummy/bin/rails +3 -3
- data/spec/dummy/bin/rake +2 -2
- data/spec/dummy/bin/setup +14 -16
- data/spec/dummy/bin/update +10 -10
- data/spec/dummy/bin/yarn +13 -7
- data/spec/dummy/config.ru +2 -1
- data/spec/dummy/config/application.rb +11 -6
- data/spec/dummy/config/boot.rb +2 -4
- data/spec/dummy/config/cable.yml +2 -2
- data/spec/dummy/config/database.yml +2 -2
- data/spec/dummy/config/environment.rb +1 -1
- data/spec/dummy/config/environments/development.rb +29 -7
- data/spec/dummy/config/environments/production.rb +50 -20
- data/spec/dummy/config/environments/test.rb +25 -8
- data/spec/dummy/config/initializers/assets.rb +2 -2
- data/spec/dummy/config/initializers/backtrace_silencers.rb +4 -3
- data/spec/dummy/config/initializers/content_security_policy.rb +30 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +3 -1
- data/spec/dummy/config/initializers/new_framework_defaults_6_1.rb +67 -0
- data/spec/dummy/config/initializers/permissions_policy.rb +11 -0
- data/spec/dummy/config/locales/en.yml +1 -1
- data/spec/dummy/config/puma.rb +3 -3
- data/spec/dummy/config/spring.rb +2 -2
- data/spec/dummy/config/storage.yml +34 -0
- data/spec/dummy/db/schema.rb +0 -2
- data/spec/dummy/log/development.log +317 -0
- data/spec/dummy/log/test.log +13164 -0
- data/spec/integration/lib/nulogy_message_bus_producer/config_spec.rb +37 -0
- data/spec/integration/lib/nulogy_message_bus_producer/repopulate_replication_slots_spec.rb +6 -7
- data/spec/integration/lib/nulogy_message_bus_producer/subscription_spec.rb +3 -57
- data/spec/integration/lib/nulogy_message_bus_producer/subscriptions/finder_spec.rb +54 -0
- data/spec/integration/lib/nulogy_message_bus_producer/subscriptions/no_variables_spec.rb +1 -1
- data/spec/integration/lib/nulogy_message_bus_producer/subscriptions/postgres_transport_spec.rb +100 -54
- data/spec/integration/lib/nulogy_message_bus_producer/{subscriber_graphql_schema_validator_spec.rb → subscriptions/query_validator_spec.rb} +3 -3
- data/spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb +0 -16
- data/spec/integration_spec_helper.rb +0 -6
- data/spec/nulogy_message_bus_producer/configuration/query_parser_spec.rb +58 -0
- data/spec/nulogy_message_bus_producer/subscriptions/subscription_spec.rb +9 -0
- data/spec/spec_helper.rb +26 -1
- data/spec/support/kafka.rb +9 -10
- data/spec/support/kafka_connect.rb +1 -1
- data/spec/support/shared_examples/subscription_validations.rb +77 -0
- data/spec/support/skip.rb +9 -0
- data/spec/support/sql_helpers.rb +1 -1
- data/spec/support/subscription_helpers.rb +22 -4
- data/spec/support/test_graphql_schema.rb +6 -2
- metadata +131 -79
- data/lib/nulogy_message_bus_producer/subscriber_graphql_schema_validator.rb +0 -45
- data/lib/nulogy_message_bus_producer/subscription.rb +0 -28
@@ -1,6 +1,3 @@
|
|
1
|
-
# Make all rspec configuration changes to this file.
|
2
|
-
# Leave automatically generated configuration files untouched to facilitate gem upgrades.
|
3
|
-
|
4
1
|
ENV["RAILS_ENV"] ||= "test"
|
5
2
|
|
6
3
|
require File.expand_path("dummy/config/environment.rb", __dir__)
|
@@ -10,8 +7,6 @@ require "rspec/json_expectations"
|
|
10
7
|
require "active_record"
|
11
8
|
require "spec_helper"
|
12
9
|
|
13
|
-
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].sort.each { |f| require f }
|
14
|
-
|
15
10
|
RSpec.configure do |config|
|
16
11
|
# Uncomment this line to see full backtraces for spec failures
|
17
12
|
# config.backtrace_exclusion_patterns = []
|
@@ -37,5 +32,4 @@ RSpec.configure do |config|
|
|
37
32
|
|
38
33
|
config.include(SpecUtils)
|
39
34
|
config.include(SqlHelpers)
|
40
|
-
config.include(SubscriptionHelpers)
|
41
35
|
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
module NulogyMessageBusProducer
|
4
|
+
module Configuration
|
5
|
+
RSpec.describe QueryParser do
|
6
|
+
it "parses queries" do
|
7
|
+
query = <<~QUERY
|
8
|
+
subscription {
|
9
|
+
testCreated(subscriptionId: "abc", subscriptionGroupId: "123", topicName: "test-topic") {
|
10
|
+
foo {
|
11
|
+
id
|
12
|
+
}
|
13
|
+
}
|
14
|
+
}
|
15
|
+
QUERY
|
16
|
+
|
17
|
+
qp = QueryParser.new(query)
|
18
|
+
|
19
|
+
expect(qp.subscription_id).to eq("abc")
|
20
|
+
expect(qp.subscription_group_id).to eq("123")
|
21
|
+
expect(qp.event_type).to eq("testCreated")
|
22
|
+
expect(qp.topic).to eq("test-topic")
|
23
|
+
end
|
24
|
+
|
25
|
+
context "when query is invalid" do
|
26
|
+
it "raises errors for event type" do
|
27
|
+
query = <<~QUERY
|
28
|
+
testCreated(subscriptionId: "abc", subscriptionGroupId: "123", topicName: "test-topic") {
|
29
|
+
foo {
|
30
|
+
id
|
31
|
+
}
|
32
|
+
}
|
33
|
+
QUERY
|
34
|
+
|
35
|
+
qp = QueryParser.new(query)
|
36
|
+
|
37
|
+
expect { qp.event_type }.to raise_error QueryParser::ParseError, /Error extracting event type/
|
38
|
+
end
|
39
|
+
|
40
|
+
it "raises errors for topic" do
|
41
|
+
query = <<~QUERY
|
42
|
+
subscription {
|
43
|
+
testCreated(subscriptionId: "abc", subscriptionGroupId: "123") {
|
44
|
+
foo {
|
45
|
+
id
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
QUERY
|
50
|
+
|
51
|
+
qp = QueryParser.new(query)
|
52
|
+
|
53
|
+
expect { qp.topic }.to raise_error QueryParser::ParseError, /Error extracting topic/
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
|
1
|
+
require "rails/all"
|
2
|
+
require "nulogy_message_bus_producer"
|
3
|
+
|
4
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].sort.each { |f| require f }
|
5
|
+
|
2
6
|
RSpec.configure do |config|
|
3
7
|
config.expect_with(:rspec) do |expectations|
|
4
8
|
# This is generally recommended, and will default to `true` in RSpec 4.
|
@@ -32,4 +36,25 @@ RSpec.configure do |config|
|
|
32
36
|
# test failures related to randomization by passing the same `--seed` value
|
33
37
|
# as the one that triggered the failure.
|
34
38
|
Kernel.srand(config.seed)
|
39
|
+
|
40
|
+
config.around do |example|
|
41
|
+
if example.metadata[:subscriptions]
|
42
|
+
old_config = NulogyMessageBusProducer.config
|
43
|
+
|
44
|
+
NulogyMessageBusProducer.config = NulogyMessageBusProducer::Config.new
|
45
|
+
NulogyMessageBusProducer.config.register_schema(
|
46
|
+
schema: "NulogyMessageBusProducer::Specs::TestSchema",
|
47
|
+
key: "test"
|
48
|
+
)
|
49
|
+
|
50
|
+
example.run
|
51
|
+
|
52
|
+
NulogyMessageBusProducer.config = old_config
|
53
|
+
else
|
54
|
+
example.run
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
config.include(SubscriptionHelpers)
|
59
|
+
config.extend(Skip)
|
35
60
|
end
|
data/spec/support/kafka.rb
CHANGED
@@ -24,7 +24,7 @@ module Kafka
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def test_bootstrap_servers
|
27
|
-
"
|
27
|
+
"kafka:29093"
|
28
28
|
end
|
29
29
|
|
30
30
|
def setup_kafka_producer
|
@@ -33,6 +33,8 @@ module Kafka
|
|
33
33
|
|
34
34
|
def setup_kafka_consumer(topic_name)
|
35
35
|
consumer = kafka_config.consumer
|
36
|
+
puts "Subscribing to #{topic_name}"
|
37
|
+
sleep 10
|
36
38
|
consumer.subscribe(topic_name)
|
37
39
|
wait_for_assignment(consumer)
|
38
40
|
consumer
|
@@ -61,23 +63,20 @@ module Kafka
|
|
61
63
|
|
62
64
|
def create_topic(topic_name)
|
63
65
|
cmd = [
|
64
|
-
"
|
65
|
-
"
|
66
|
-
"--
|
67
|
-
"--
|
68
|
-
"--replication-factor 1",
|
69
|
-
"--partitions 3",
|
70
|
-
"--if-not-exists --topic #{topic_name}"
|
66
|
+
"kaf topic create #{topic_name}",
|
67
|
+
"--brokers kafka:29093",
|
68
|
+
"--replicas 1",
|
69
|
+
"--partitions 3"
|
71
70
|
]
|
72
71
|
run(cmd.join(" "))
|
73
72
|
end
|
74
73
|
|
75
74
|
def delete_topic(topic_name)
|
76
|
-
run("
|
75
|
+
run("kaf topic delete #{topic_name} --brokers kafka:29093")
|
77
76
|
end
|
78
77
|
|
79
78
|
def list_topics
|
80
|
-
topics = run("
|
79
|
+
topics = run("kaf topics --brokers kafka:29093")
|
81
80
|
topics.split(" ")
|
82
81
|
end
|
83
82
|
|
@@ -0,0 +1,77 @@
|
|
1
|
+
RSpec.shared_examples "subscription validations" do
|
2
|
+
context "when validating" do
|
3
|
+
it "is invalid without an id" do
|
4
|
+
model = build_subscription(id: "")
|
5
|
+
|
6
|
+
model.validate
|
7
|
+
|
8
|
+
expect(model.errors[:id]).to contain_exactly("can't be blank")
|
9
|
+
end
|
10
|
+
|
11
|
+
it "is invalid without a subscription_group_id" do
|
12
|
+
model = build_subscription(subscription_group_id: "")
|
13
|
+
|
14
|
+
model.validate
|
15
|
+
|
16
|
+
expect(model.errors[:subscription_group_id]).to contain_exactly("can't be blank")
|
17
|
+
end
|
18
|
+
|
19
|
+
it "is invalid with a blank query" do
|
20
|
+
model = build_subscription(query: "")
|
21
|
+
|
22
|
+
model.validate
|
23
|
+
|
24
|
+
expect(model.errors[:query]).to contain_exactly("can't be blank")
|
25
|
+
end
|
26
|
+
|
27
|
+
it "is invalid with blank schema_key" do
|
28
|
+
model = build_subscription(schema_key: "")
|
29
|
+
|
30
|
+
model.validate
|
31
|
+
|
32
|
+
expect(model.errors[:schema_key]).to contain_exactly("can't be blank")
|
33
|
+
end
|
34
|
+
|
35
|
+
it "is invalid with an invalid schema_key" do
|
36
|
+
model = build_subscription(schema_key: "invalid")
|
37
|
+
|
38
|
+
model.validate
|
39
|
+
|
40
|
+
expect(model.errors[:query]).to contain_exactly(/Could not find a schema for schema_key 'invalid'/)
|
41
|
+
end
|
42
|
+
|
43
|
+
it "is invalid with an invalid query" do
|
44
|
+
model = build_subscription(
|
45
|
+
query: subscription_query(query: "foo { a_field_that_does_not_exist }")
|
46
|
+
)
|
47
|
+
|
48
|
+
model.validate
|
49
|
+
|
50
|
+
expect(model).not_to be_valid
|
51
|
+
expect(model.errors[:query]).to contain_exactly(
|
52
|
+
match(/Field 'a_field_that_does_not_exist' doesn't exist on type 'testObject'/)
|
53
|
+
)
|
54
|
+
end
|
55
|
+
|
56
|
+
it "valid with a valid query" do
|
57
|
+
model = build_subscription(
|
58
|
+
query: subscription_query(query: "foo { id }")
|
59
|
+
)
|
60
|
+
|
61
|
+
model.validate
|
62
|
+
|
63
|
+
expect(model.errors).not_to include(:query)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def build_subscription(overrides = {})
|
68
|
+
attrs = {
|
69
|
+
id: SecureRandom.uuid,
|
70
|
+
subscription_group_id: SecureRandom.uuid,
|
71
|
+
schema_key: "test",
|
72
|
+
query: subscription_query
|
73
|
+
}.merge(overrides)
|
74
|
+
|
75
|
+
described_class.new(attrs)
|
76
|
+
end
|
77
|
+
end
|
data/spec/support/sql_helpers.rb
CHANGED
@@ -14,7 +14,7 @@ module SqlHelpers
|
|
14
14
|
|
15
15
|
# Just incase these models weren't loaded, do them explicitly
|
16
16
|
ActiveRecord::Base.connection.execute("TRUNCATE #{NulogyMessageBusProducer::SubscriptionEvent.table_name}")
|
17
|
-
ActiveRecord::Base.connection.execute("TRUNCATE #{NulogyMessageBusProducer::
|
17
|
+
ActiveRecord::Base.connection.execute("TRUNCATE #{NulogyMessageBusProducer::SelfServeSubscription.table_name}")
|
18
18
|
end
|
19
19
|
|
20
20
|
def replication_slots
|
@@ -1,17 +1,35 @@
|
|
1
1
|
module SubscriptionHelpers
|
2
|
-
def
|
2
|
+
def self_serve_subscription(
|
3
3
|
schema: NulogyMessageBusProducer::Specs::TestSchema,
|
4
4
|
subscription_id: SecureRandom.uuid,
|
5
5
|
**query_args
|
6
6
|
)
|
7
7
|
gql = subscription_query(subscription_id: subscription_id, **query_args)
|
8
8
|
|
9
|
-
expect
|
9
|
+
expect {
|
10
10
|
gql_response = execute_graphql(gql, schema)
|
11
11
|
expect(gql_response).to eq(data: {})
|
12
|
-
|
12
|
+
}.to change(NulogyMessageBusProducer::SelfServeSubscription, :count).by(1)
|
13
13
|
|
14
|
-
NulogyMessageBusProducer::
|
14
|
+
NulogyMessageBusProducer::SelfServeSubscription.find(subscription_id)
|
15
|
+
end
|
16
|
+
|
17
|
+
def configured_subscription(
|
18
|
+
schema: NulogyMessageBusProducer::Specs::TestSchema,
|
19
|
+
subscription_id: SecureRandom.uuid,
|
20
|
+
subscription_group_id: SecureRandom.uuid,
|
21
|
+
**query_args
|
22
|
+
)
|
23
|
+
gql = subscription_query(
|
24
|
+
subscription_id: subscription_id,
|
25
|
+
subscription_group_id: subscription_group_id,
|
26
|
+
**query_args
|
27
|
+
)
|
28
|
+
|
29
|
+
NulogyMessageBusProducer.config.add_subscription!(
|
30
|
+
schema: schema.name,
|
31
|
+
query: gql
|
32
|
+
)
|
15
33
|
end
|
16
34
|
|
17
35
|
def subscription_query(
|
@@ -29,13 +29,17 @@ module NulogyMessageBusProducer
|
|
29
29
|
field :foo_list, [TestObject], null: false
|
30
30
|
end
|
31
31
|
|
32
|
+
class TestUpdated < NulogyMessageBusProducer::BaseSubscription
|
33
|
+
field :foo, TestObject, null: false
|
34
|
+
field :foo_list, [TestObject], null: false
|
35
|
+
end
|
36
|
+
|
32
37
|
class TestSubscription < GraphQL::Schema::Object
|
33
38
|
field :test_created, subscription: TestCreated
|
39
|
+
field :test_updated, subscription: TestCreated
|
34
40
|
end
|
35
41
|
|
36
42
|
class TestSchema < GraphQL::Schema
|
37
|
-
use GraphQL::Execution::Interpreter
|
38
|
-
use GraphQL::Analysis::AST
|
39
43
|
use NulogyMessageBusProducer::Subscriptions::PostgresTransport
|
40
44
|
|
41
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.
|
4
|
+
version: 3.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nulogy
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql
|
@@ -16,28 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.12.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.
|
26
|
+
version: 1.12.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: railties
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '5'
|
33
|
+
version: '5.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '5'
|
40
|
+
version: '5.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler-audit
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.7.0.1
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
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'
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
70
|
name: pg
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +108,20 @@ dependencies:
|
|
80
108
|
- - ">="
|
81
109
|
- !ruby/object:Gem::Version
|
82
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rails
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '6'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '6'
|
83
125
|
- !ruby/object:Gem::Dependency
|
84
126
|
name: rake
|
85
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +142,14 @@ dependencies:
|
|
100
142
|
requirements:
|
101
143
|
- - '='
|
102
144
|
- !ruby/object:Gem::Version
|
103
|
-
version: 1.
|
145
|
+
version: 1.3.0
|
104
146
|
type: :development
|
105
147
|
prerelease: false
|
106
148
|
version_requirements: !ruby/object:Gem::Requirement
|
107
149
|
requirements:
|
108
150
|
- - '='
|
109
151
|
- !ruby/object:Gem::Version
|
110
|
-
version: 1.
|
152
|
+
version: 1.3.0
|
111
153
|
- !ruby/object:Gem::Dependency
|
112
154
|
name: rdkafka
|
113
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -151,33 +193,19 @@ dependencies:
|
|
151
193
|
- !ruby/object:Gem::Version
|
152
194
|
version: 4.0.1
|
153
195
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
196
|
+
name: standard
|
155
197
|
requirement: !ruby/object:Gem::Requirement
|
156
198
|
requirements:
|
157
199
|
- - '='
|
158
200
|
- !ruby/object:Gem::Version
|
159
|
-
version: 0.
|
201
|
+
version: 0.11.0
|
160
202
|
type: :development
|
161
203
|
prerelease: false
|
162
204
|
version_requirements: !ruby/object:Gem::Requirement
|
163
205
|
requirements:
|
164
206
|
- - '='
|
165
207
|
- !ruby/object:Gem::Version
|
166
|
-
version: 0.
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: rubocop-performance
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - '='
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: 1.6.1
|
174
|
-
type: :development
|
175
|
-
prerelease: false
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - '='
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: 1.6.1
|
208
|
+
version: 0.11.0
|
181
209
|
- !ruby/object:Gem::Dependency
|
182
210
|
name: rubocop-rails
|
183
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -221,14 +249,18 @@ files:
|
|
221
249
|
- lib/nulogy_message_bus_producer/application_record.rb
|
222
250
|
- lib/nulogy_message_bus_producer/base_subscription.rb
|
223
251
|
- lib/nulogy_message_bus_producer/config.rb
|
252
|
+
- lib/nulogy_message_bus_producer/configuration/query_parser.rb
|
224
253
|
- lib/nulogy_message_bus_producer/engine.rb
|
225
254
|
- lib/nulogy_message_bus_producer/repopulate_replication_slots.rb
|
226
|
-
- lib/nulogy_message_bus_producer/
|
227
|
-
- lib/nulogy_message_bus_producer/subscription.rb
|
255
|
+
- lib/nulogy_message_bus_producer/self_serve_subscription.rb
|
228
256
|
- lib/nulogy_message_bus_producer/subscription_event.rb
|
257
|
+
- lib/nulogy_message_bus_producer/subscriptions/configured_subscription.rb
|
258
|
+
- lib/nulogy_message_bus_producer/subscriptions/finder.rb
|
229
259
|
- lib/nulogy_message_bus_producer/subscriptions/no_variables.rb
|
230
260
|
- lib/nulogy_message_bus_producer/subscriptions/postgres_transport.rb
|
261
|
+
- lib/nulogy_message_bus_producer/subscriptions/query_validator.rb
|
231
262
|
- lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker.rb
|
263
|
+
- lib/nulogy_message_bus_producer/subscriptions/valid_for_schema_validator.rb
|
232
264
|
- lib/nulogy_message_bus_producer/version.rb
|
233
265
|
- lib/tasks/engine/message_bus_producer.rake
|
234
266
|
- spec/dummy/Rakefile
|
@@ -265,16 +297,20 @@ files:
|
|
265
297
|
- spec/dummy/config/initializers/application_controller_renderer.rb
|
266
298
|
- spec/dummy/config/initializers/assets.rb
|
267
299
|
- spec/dummy/config/initializers/backtrace_silencers.rb
|
300
|
+
- spec/dummy/config/initializers/content_security_policy.rb
|
268
301
|
- spec/dummy/config/initializers/cookies_serializer.rb
|
269
302
|
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
270
303
|
- spec/dummy/config/initializers/inflections.rb
|
271
304
|
- spec/dummy/config/initializers/mime_types.rb
|
305
|
+
- spec/dummy/config/initializers/new_framework_defaults_6_1.rb
|
306
|
+
- spec/dummy/config/initializers/permissions_policy.rb
|
272
307
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
273
308
|
- spec/dummy/config/locales/en.yml
|
274
309
|
- spec/dummy/config/puma.rb
|
275
310
|
- spec/dummy/config/routes.rb
|
276
311
|
- spec/dummy/config/secrets.yml
|
277
312
|
- spec/dummy/config/spring.rb
|
313
|
+
- spec/dummy/config/storage.yml
|
278
314
|
- spec/dummy/db/migrate/20201005164116_create_active_storage_tables.active_storage.rb
|
279
315
|
- spec/dummy/db/schema.rb
|
280
316
|
- spec/dummy/log/development.log
|
@@ -286,16 +322,22 @@ files:
|
|
286
322
|
- spec/dummy/public/apple-touch-icon-precomposed.png
|
287
323
|
- spec/dummy/public/apple-touch-icon.png
|
288
324
|
- spec/dummy/public/favicon.ico
|
325
|
+
- spec/integration/lib/nulogy_message_bus_producer/config_spec.rb
|
289
326
|
- spec/integration/lib/nulogy_message_bus_producer/repopulate_replication_slots_spec.rb
|
290
|
-
- spec/integration/lib/nulogy_message_bus_producer/subscriber_graphql_schema_validator_spec.rb
|
291
327
|
- spec/integration/lib/nulogy_message_bus_producer/subscription_spec.rb
|
328
|
+
- spec/integration/lib/nulogy_message_bus_producer/subscriptions/finder_spec.rb
|
292
329
|
- spec/integration/lib/nulogy_message_bus_producer/subscriptions/no_variables_spec.rb
|
293
330
|
- spec/integration/lib/nulogy_message_bus_producer/subscriptions/postgres_transport_spec.rb
|
331
|
+
- spec/integration/lib/nulogy_message_bus_producer/subscriptions/query_validator_spec.rb
|
294
332
|
- spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb
|
295
333
|
- spec/integration_spec_helper.rb
|
334
|
+
- spec/nulogy_message_bus_producer/configuration/query_parser_spec.rb
|
335
|
+
- spec/nulogy_message_bus_producer/subscriptions/subscription_spec.rb
|
296
336
|
- spec/spec_helper.rb
|
297
337
|
- spec/support/kafka.rb
|
298
338
|
- spec/support/kafka_connect.rb
|
339
|
+
- spec/support/shared_examples/subscription_validations.rb
|
340
|
+
- spec/support/skip.rb
|
299
341
|
- spec/support/spec_utils.rb
|
300
342
|
- spec/support/sql_helpers.rb
|
301
343
|
- spec/support/subscription_helpers.rb
|
@@ -303,92 +345,102 @@ files:
|
|
303
345
|
homepage: https://github.com/nulogy/message-bus/tree/master/gems/nulogy_message_bus_producer
|
304
346
|
licenses: []
|
305
347
|
metadata: {}
|
306
|
-
post_install_message:
|
348
|
+
post_install_message:
|
307
349
|
rdoc_options: []
|
308
350
|
require_paths:
|
309
351
|
- lib
|
310
352
|
required_ruby_version: !ruby/object:Gem::Requirement
|
311
353
|
requirements:
|
312
|
-
- - "
|
354
|
+
- - ">="
|
313
355
|
- !ruby/object:Gem::Version
|
314
|
-
version: '2.
|
356
|
+
version: '2.6'
|
315
357
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
316
358
|
requirements:
|
317
359
|
- - ">="
|
318
360
|
- !ruby/object:Gem::Version
|
319
361
|
version: '0'
|
320
362
|
requirements: []
|
321
|
-
rubygems_version: 3.
|
322
|
-
signing_key:
|
363
|
+
rubygems_version: 3.2.15
|
364
|
+
signing_key:
|
323
365
|
specification_version: 4
|
324
366
|
summary: Nulogy's code for producing to the Message Bus
|
325
367
|
test_files:
|
326
|
-
- spec/
|
327
|
-
- spec/dummy/app/
|
328
|
-
- spec/dummy/app/
|
329
|
-
- spec/dummy/app/
|
368
|
+
- spec/dummy/Rakefile
|
369
|
+
- spec/dummy/app/assets/config/manifest.js
|
370
|
+
- spec/dummy/app/assets/javascripts/application.js
|
371
|
+
- spec/dummy/app/assets/javascripts/cable.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
|
330
375
|
- spec/dummy/app/controllers/application_controller.rb
|
331
376
|
- spec/dummy/app/controllers/dummy_controller.rb
|
377
|
+
- spec/dummy/app/helpers/application_helper.rb
|
378
|
+
- spec/dummy/app/jobs/application_job.rb
|
379
|
+
- spec/dummy/app/mailers/application_mailer.rb
|
380
|
+
- spec/dummy/app/models/application_record.rb
|
332
381
|
- spec/dummy/app/views/layouts/application.html.erb
|
333
382
|
- spec/dummy/app/views/layouts/mailer.html.erb
|
334
383
|
- spec/dummy/app/views/layouts/mailer.text.erb
|
335
|
-
- spec/dummy/
|
336
|
-
- spec/dummy/
|
337
|
-
- spec/dummy/app/assets/javascripts/application.js
|
338
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
339
|
-
- spec/dummy/app/helpers/application_helper.rb
|
340
|
-
- spec/dummy/app/channels/application_cable/connection.rb
|
341
|
-
- spec/dummy/app/channels/application_cable/channel.rb
|
342
|
-
- spec/dummy/bin/update
|
384
|
+
- spec/dummy/bin/bundle
|
385
|
+
- spec/dummy/bin/rails
|
343
386
|
- spec/dummy/bin/rake
|
344
387
|
- spec/dummy/bin/setup
|
345
|
-
- spec/dummy/bin/
|
388
|
+
- spec/dummy/bin/update
|
346
389
|
- spec/dummy/bin/yarn
|
347
|
-
- spec/dummy/
|
348
|
-
- spec/dummy/config/
|
349
|
-
- spec/dummy/config/routes.rb
|
350
|
-
- spec/dummy/config/locales/en.yml
|
390
|
+
- spec/dummy/config/application.rb
|
391
|
+
- spec/dummy/config/boot.rb
|
351
392
|
- spec/dummy/config/cable.yml
|
352
|
-
- spec/dummy/config/
|
393
|
+
- spec/dummy/config/database.yml
|
394
|
+
- spec/dummy/config/environment.rb
|
353
395
|
- spec/dummy/config/environments/development.rb
|
396
|
+
- spec/dummy/config/environments/production.rb
|
354
397
|
- spec/dummy/config/environments/test.rb
|
355
|
-
- spec/dummy/config/spring.rb
|
356
|
-
- spec/dummy/config/environment.rb
|
357
|
-
- spec/dummy/config/application.rb
|
358
|
-
- spec/dummy/config/puma.rb
|
359
|
-
- spec/dummy/config/database.yml
|
360
|
-
- spec/dummy/config/boot.rb
|
361
398
|
- spec/dummy/config/initializers/application_controller_renderer.rb
|
362
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
363
|
-
- spec/dummy/config/initializers/mime_types.rb
|
364
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
365
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
366
399
|
- spec/dummy/config/initializers/assets.rb
|
400
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
401
|
+
- spec/dummy/config/initializers/content_security_policy.rb
|
367
402
|
- spec/dummy/config/initializers/cookies_serializer.rb
|
403
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
368
404
|
- spec/dummy/config/initializers/inflections.rb
|
405
|
+
- spec/dummy/config/initializers/mime_types.rb
|
406
|
+
- spec/dummy/config/initializers/new_framework_defaults_6_1.rb
|
407
|
+
- spec/dummy/config/initializers/permissions_policy.rb
|
408
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
409
|
+
- spec/dummy/config/locales/en.yml
|
410
|
+
- spec/dummy/config/puma.rb
|
411
|
+
- spec/dummy/config/routes.rb
|
412
|
+
- spec/dummy/config/secrets.yml
|
413
|
+
- spec/dummy/config/spring.rb
|
414
|
+
- spec/dummy/config/storage.yml
|
369
415
|
- spec/dummy/config.ru
|
370
|
-
- spec/dummy/
|
371
|
-
- spec/dummy/
|
416
|
+
- spec/dummy/db/migrate/20201005164116_create_active_storage_tables.active_storage.rb
|
417
|
+
- spec/dummy/db/schema.rb
|
418
|
+
- spec/dummy/log/development.log
|
419
|
+
- spec/dummy/log/test.log
|
420
|
+
- spec/dummy/package.json
|
421
|
+
- spec/dummy/public/404.html
|
372
422
|
- spec/dummy/public/422.html
|
373
|
-
- spec/dummy/public/apple-touch-icon.png
|
374
423
|
- spec/dummy/public/500.html
|
375
|
-
- spec/dummy/public/404.html
|
376
424
|
- spec/dummy/public/apple-touch-icon-precomposed.png
|
377
|
-
- spec/dummy/
|
378
|
-
- spec/dummy/
|
379
|
-
- spec/
|
380
|
-
- spec/dummy/log/test.log
|
381
|
-
- spec/dummy/log/development.log
|
382
|
-
- spec/integration_spec_helper.rb
|
425
|
+
- spec/dummy/public/apple-touch-icon.png
|
426
|
+
- spec/dummy/public/favicon.ico
|
427
|
+
- spec/integration/lib/nulogy_message_bus_producer/config_spec.rb
|
383
428
|
- spec/integration/lib/nulogy_message_bus_producer/repopulate_replication_slots_spec.rb
|
384
|
-
- spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb
|
385
|
-
- spec/integration/lib/nulogy_message_bus_producer/subscriptions/postgres_transport_spec.rb
|
386
|
-
- spec/integration/lib/nulogy_message_bus_producer/subscriptions/no_variables_spec.rb
|
387
429
|
- spec/integration/lib/nulogy_message_bus_producer/subscription_spec.rb
|
388
|
-
- spec/integration/lib/nulogy_message_bus_producer/
|
389
|
-
- spec/
|
390
|
-
- spec/
|
430
|
+
- spec/integration/lib/nulogy_message_bus_producer/subscriptions/finder_spec.rb
|
431
|
+
- spec/integration/lib/nulogy_message_bus_producer/subscriptions/no_variables_spec.rb
|
432
|
+
- spec/integration/lib/nulogy_message_bus_producer/subscriptions/postgres_transport_spec.rb
|
433
|
+
- spec/integration/lib/nulogy_message_bus_producer/subscriptions/query_validator_spec.rb
|
434
|
+
- spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb
|
435
|
+
- spec/integration_spec_helper.rb
|
436
|
+
- spec/nulogy_message_bus_producer/configuration/query_parser_spec.rb
|
437
|
+
- spec/nulogy_message_bus_producer/subscriptions/subscription_spec.rb
|
438
|
+
- spec/spec_helper.rb
|
391
439
|
- spec/support/kafka.rb
|
440
|
+
- spec/support/kafka_connect.rb
|
441
|
+
- spec/support/shared_examples/subscription_validations.rb
|
442
|
+
- spec/support/skip.rb
|
392
443
|
- spec/support/spec_utils.rb
|
393
444
|
- spec/support/sql_helpers.rb
|
445
|
+
- spec/support/subscription_helpers.rb
|
394
446
|
- spec/support/test_graphql_schema.rb
|