neon_schemas 0.1.0 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gemfile +0 -11
- data/Gemfile.lock +112 -28
- data/Guardfile +7 -0
- data/README.md +12 -0
- data/lib/neon_schemas.rb +5 -31
- data/lib/neon_schemas/avro.rb +34 -0
- data/lib/neon_schemas/contracts/authentication/successful_login_contract.rb +18 -0
- data/lib/neon_schemas/contracts/documents/process_document_contract.rb +9 -0
- data/lib/neon_schemas/contracts/outbound_emails/welcome_email_contract.rb +17 -0
- data/lib/neon_schemas/contracts/slack/send_message_contract.rb +16 -0
- data/lib/neon_schemas/version.rb +1 -1
- data/neon_schemas.gemspec +14 -1
- data/neon_schemas/__init__.py +1 -0
- data/package.json +1 -1
- data/pyproject.toml +1 -1
- data/schemas/authentication/successful_login.avsc +17 -0
- data/schemas/documents/process_document.avsc +37 -0
- data/schemas/outbound_emails/welcome_email.avsc +17 -0
- data/schemas/slack/send_message.avsc +17 -0
- metadata +168 -4
- data/src/outbound_email.avsc +0 -51
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c8cd7c1e5b280eec2059a833b8a1a55f22dda32dc80acda0d4f6c59a59e883e
|
4
|
+
data.tar.gz: 30e7b661cf4d9ac38e0d4037c0082244ecc2f1bf5245e83a5562c406d5ea82ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36524a23e886abf67899f029698b0003e0110cfb37718b18968020f85e7f0cbd81874b954c0fe38efe644bc6fb916eedf38c78e24bc5d3db623303bf578ef382
|
7
|
+
data.tar.gz: 4af8171ddfed52ff3eba766dc9ae6820427e597d8b6c67dc168bf6991530ba89763d584536e2bdffd8929c94ba9216f2a3afffd22a97aaa5ce4c41a2db95aa63
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
neon_schemas (0.1.
|
4
|
+
neon_schemas (0.1.8)
|
5
|
+
avro (~> 1.10)
|
6
|
+
dry-validation (= 1.6)
|
7
|
+
neon_operations (= 0.0.3)
|
5
8
|
|
6
9
|
GEM
|
7
10
|
remote: https://rubygems.org/
|
@@ -10,9 +13,79 @@ GEM
|
|
10
13
|
avro (1.10.2)
|
11
14
|
multi_json (~> 1)
|
12
15
|
coderay (1.1.3)
|
16
|
+
concurrent-ruby (1.1.9)
|
13
17
|
diff-lcs (1.4.4)
|
18
|
+
docile (1.4.0)
|
19
|
+
dry-configurable (0.12.1)
|
20
|
+
concurrent-ruby (~> 1.0)
|
21
|
+
dry-core (~> 0.5, >= 0.5.0)
|
22
|
+
dry-container (0.8.0)
|
23
|
+
concurrent-ruby (~> 1.0)
|
24
|
+
dry-configurable (~> 0.1, >= 0.1.3)
|
25
|
+
dry-core (0.6.0)
|
26
|
+
concurrent-ruby (~> 1.0)
|
27
|
+
dry-equalizer (0.3.0)
|
28
|
+
dry-inflector (0.2.1)
|
29
|
+
dry-initializer (3.0.4)
|
30
|
+
dry-logic (1.2.0)
|
31
|
+
concurrent-ruby (~> 1.0)
|
32
|
+
dry-core (~> 0.5, >= 0.5)
|
33
|
+
dry-monads (1.3.5)
|
34
|
+
concurrent-ruby (~> 1.0)
|
35
|
+
dry-core (~> 0.4, >= 0.4.4)
|
36
|
+
dry-equalizer
|
37
|
+
dry-schema (1.7.0)
|
38
|
+
concurrent-ruby (~> 1.0)
|
39
|
+
dry-configurable (~> 0.8, >= 0.8.3)
|
40
|
+
dry-core (~> 0.5, >= 0.5)
|
41
|
+
dry-initializer (~> 3.0)
|
42
|
+
dry-logic (~> 1.0)
|
43
|
+
dry-types (~> 1.5)
|
44
|
+
dry-types (1.5.1)
|
45
|
+
concurrent-ruby (~> 1.0)
|
46
|
+
dry-container (~> 0.3)
|
47
|
+
dry-core (~> 0.5, >= 0.5)
|
48
|
+
dry-inflector (~> 0.1, >= 0.1.2)
|
49
|
+
dry-logic (~> 1.0, >= 1.0.2)
|
50
|
+
dry-validation (1.6.0)
|
51
|
+
concurrent-ruby (~> 1.0)
|
52
|
+
dry-container (~> 0.7, >= 0.7.1)
|
53
|
+
dry-core (~> 0.4)
|
54
|
+
dry-equalizer (~> 0.2)
|
55
|
+
dry-initializer (~> 3.0)
|
56
|
+
dry-schema (~> 1.5, >= 1.5.2)
|
57
|
+
faker (2.17.0)
|
58
|
+
i18n (>= 1.6, < 2)
|
59
|
+
ffi (1.15.3)
|
60
|
+
formatador (0.3.0)
|
61
|
+
guard (2.17.0)
|
62
|
+
formatador (>= 0.2.4)
|
63
|
+
listen (>= 2.7, < 4.0)
|
64
|
+
lumberjack (>= 1.0.12, < 2.0)
|
65
|
+
nenv (~> 0.1)
|
66
|
+
notiffany (~> 0.0)
|
67
|
+
pry (>= 0.9.12)
|
68
|
+
shellany (~> 0.0)
|
69
|
+
thor (>= 0.18.1)
|
70
|
+
guard-compat (1.2.1)
|
71
|
+
guard-rspec (4.7.3)
|
72
|
+
guard (~> 2.1)
|
73
|
+
guard-compat (~> 1.1)
|
74
|
+
rspec (>= 2.99.0, < 4.0)
|
75
|
+
i18n (1.8.10)
|
76
|
+
concurrent-ruby (~> 1.0)
|
77
|
+
listen (3.5.1)
|
78
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
79
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
80
|
+
lumberjack (1.2.8)
|
14
81
|
method_source (1.0.0)
|
15
82
|
multi_json (1.15.0)
|
83
|
+
nenv (0.3.0)
|
84
|
+
neon_operations (0.0.3)
|
85
|
+
dry-monads (~> 1.3)
|
86
|
+
notiffany (0.1.3)
|
87
|
+
nenv (~> 0.1)
|
88
|
+
shellany (~> 0.0)
|
16
89
|
parallel (1.20.1)
|
17
90
|
parser (3.0.1.1)
|
18
91
|
ast (~> 2.4.1)
|
@@ -21,53 +94,64 @@ GEM
|
|
21
94
|
method_source (~> 1.0)
|
22
95
|
rainbow (3.0.0)
|
23
96
|
rake (12.3.3)
|
97
|
+
rb-fsevent (0.11.0)
|
98
|
+
rb-inotify (0.10.1)
|
99
|
+
ffi (~> 1.0)
|
24
100
|
regexp_parser (2.1.1)
|
25
101
|
rexml (3.2.5)
|
26
|
-
rspec (3.
|
27
|
-
rspec-core (~> 3.
|
28
|
-
rspec-expectations (~> 3.
|
29
|
-
rspec-mocks (~> 3.
|
30
|
-
rspec-core (3.
|
31
|
-
rspec-support (~> 3.
|
32
|
-
rspec-expectations (3.
|
102
|
+
rspec (3.0.0)
|
103
|
+
rspec-core (~> 3.0.0)
|
104
|
+
rspec-expectations (~> 3.0.0)
|
105
|
+
rspec-mocks (~> 3.0.0)
|
106
|
+
rspec-core (3.0.4)
|
107
|
+
rspec-support (~> 3.0.0)
|
108
|
+
rspec-expectations (3.0.4)
|
33
109
|
diff-lcs (>= 1.2.0, < 2.0)
|
34
|
-
rspec-support (~> 3.
|
35
|
-
rspec-mocks (3.
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
rubocop (1.14.0)
|
110
|
+
rspec-support (~> 3.0.0)
|
111
|
+
rspec-mocks (3.0.4)
|
112
|
+
rspec-support (~> 3.0.0)
|
113
|
+
rspec-support (3.0.4)
|
114
|
+
rubocop (1.12.1)
|
40
115
|
parallel (~> 1.10)
|
41
116
|
parser (>= 3.0.0.0)
|
42
117
|
rainbow (>= 2.2.2, < 4.0)
|
43
118
|
regexp_parser (>= 1.8, < 3.0)
|
44
119
|
rexml
|
45
|
-
rubocop-ast (>= 1.
|
120
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
46
121
|
ruby-progressbar (~> 1.7)
|
47
122
|
unicode-display_width (>= 1.4.0, < 3.0)
|
48
|
-
rubocop-ast (1.
|
123
|
+
rubocop-ast (1.7.0)
|
49
124
|
parser (>= 3.0.1.1)
|
50
|
-
rubocop-performance (1.
|
51
|
-
rubocop (>=
|
125
|
+
rubocop-performance (1.10.1)
|
126
|
+
rubocop (>= 0.90.0, < 2.0)
|
52
127
|
rubocop-ast (>= 0.4.0)
|
53
128
|
ruby-progressbar (1.11.0)
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
129
|
+
shellany (0.0.1)
|
130
|
+
simplecov (0.21.2)
|
131
|
+
docile (~> 1.1)
|
132
|
+
simplecov-html (~> 0.11)
|
133
|
+
simplecov_json_formatter (~> 0.1)
|
134
|
+
simplecov-html (0.12.3)
|
135
|
+
simplecov_json_formatter (0.1.3)
|
136
|
+
standard (1.0.5)
|
137
|
+
rubocop (= 1.12.1)
|
138
|
+
rubocop-performance (= 1.10.1)
|
139
|
+
thor (1.1.0)
|
59
140
|
unicode-display_width (2.0.0)
|
60
141
|
|
61
142
|
PLATFORMS
|
62
143
|
ruby
|
63
144
|
|
64
145
|
DEPENDENCIES
|
65
|
-
|
146
|
+
faker (= 2.17)
|
147
|
+
guard (= 2.17.0)
|
148
|
+
guard-rspec (= 4.7.3)
|
66
149
|
neon_schemas!
|
67
|
-
pry (
|
68
|
-
rake (
|
69
|
-
rspec (
|
70
|
-
|
150
|
+
pry (= 0.14.1)
|
151
|
+
rake (= 12.3.3)
|
152
|
+
rspec (= 3.0)
|
153
|
+
simplecov (= 0.21.2)
|
154
|
+
standard (= 1.0.5)
|
71
155
|
|
72
156
|
BUNDLED WITH
|
73
157
|
2.1.4
|
data/Guardfile
ADDED
data/README.md
CHANGED
@@ -38,3 +38,15 @@ gcloud pubsub subscriptions create outbound_email \
|
|
38
38
|
--dead-letter-topic=outbound_email_dlq \
|
39
39
|
--max-delivery-attempts=10
|
40
40
|
```
|
41
|
+
|
42
|
+
## Schemas
|
43
|
+
|
44
|
+
* Outbound Emails
|
45
|
+
* Welcome Email
|
46
|
+
|
47
|
+
## Developing
|
48
|
+
|
49
|
+
```bash
|
50
|
+
bundle
|
51
|
+
bundle exec guard
|
52
|
+
```
|
data/lib/neon_schemas.rb
CHANGED
@@ -1,36 +1,10 @@
|
|
1
1
|
require "neon_schemas/version"
|
2
|
-
require "avro"
|
3
2
|
|
4
3
|
module NeonSchemas
|
5
|
-
|
6
|
-
|
7
|
-
class Avro
|
8
|
-
SCHEMA_DIRECTORY = "#{__dir__}/../src"
|
9
|
-
|
10
|
-
def self.encode(record:, schema_name:)
|
11
|
-
avro_schema = ::Avro::Schema.parse(
|
12
|
-
File.read("#{SCHEMA_DIRECTORY}/#{schema_name}.avsc")
|
13
|
-
)
|
14
|
-
writer = ::Avro::IO::DatumWriter.new avro_schema
|
15
|
-
buffer = ::StringIO.new
|
16
|
-
encoder = ::Avro::IO::BinaryEncoder.new buffer
|
17
|
-
|
18
|
-
writer.write record, encoder
|
19
|
-
|
20
|
-
buffer
|
21
|
-
end
|
4
|
+
module Contracts; end
|
22
5
|
|
23
|
-
|
24
|
-
avro_schema = ::Avro::Schema.parse(
|
25
|
-
File.read("#{SCHEMA_DIRECTORY}/#{schema_name}.avsc")
|
26
|
-
)
|
27
|
-
buffer = ::StringIO.new string
|
28
|
-
decoder = ::Avro::IO::BinaryDecoder.new buffer
|
29
|
-
reader = ::Avro::IO::DatumReader.new avro_schema
|
30
|
-
|
31
|
-
json = reader.read(decoder).to_json
|
32
|
-
|
33
|
-
JSON.parse(json, symbolize_names: true)
|
34
|
-
end
|
35
|
-
end
|
6
|
+
class Error < StandardError; end
|
36
7
|
end
|
8
|
+
|
9
|
+
require "neon_schemas/avro"
|
10
|
+
Dir["#{__dir__}/neon_schemas/contracts/**/*.rb"].sort.each { |f| require f }
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require "neon_schemas/version"
|
2
|
+
require "avro"
|
3
|
+
|
4
|
+
module NeonSchemas
|
5
|
+
class Avro
|
6
|
+
SCHEMA_DIRECTORY = "#{__dir__}/../../schemas"
|
7
|
+
|
8
|
+
def self.encode(record:, schema_name:)
|
9
|
+
avro_schema = ::Avro::Schema.parse(
|
10
|
+
File.read("#{SCHEMA_DIRECTORY}/#{schema_name.tr(".", "/")}.avsc")
|
11
|
+
)
|
12
|
+
writer = ::Avro::IO::DatumWriter.new avro_schema
|
13
|
+
buffer = ::StringIO.new
|
14
|
+
encoder = ::Avro::IO::BinaryEncoder.new buffer
|
15
|
+
|
16
|
+
writer.write record, encoder
|
17
|
+
|
18
|
+
buffer
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.decode(string:, schema_name:)
|
22
|
+
avro_schema = ::Avro::Schema.parse(
|
23
|
+
File.read("#{SCHEMA_DIRECTORY}/#{schema_name.tr(".", "/")}.avsc")
|
24
|
+
)
|
25
|
+
buffer = ::StringIO.new string
|
26
|
+
decoder = ::Avro::IO::BinaryDecoder.new buffer
|
27
|
+
reader = ::Avro::IO::DatumReader.new avro_schema
|
28
|
+
|
29
|
+
json = reader.read(decoder).to_json
|
30
|
+
|
31
|
+
JSON.parse(json, symbolize_names: true)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require "dry-validation"
|
2
|
+
|
3
|
+
module NeonSchemas::Contracts::Authentication
|
4
|
+
class SuccessfulLoginContract < Dry::Validation::Contract
|
5
|
+
json do
|
6
|
+
required(:email).filled(:string)
|
7
|
+
required(:sub).value(:string)
|
8
|
+
end
|
9
|
+
|
10
|
+
rule(:email) do
|
11
|
+
email_regex = /\A[\w+\-.]+@[a-z\d\-]+(\.[a-z\d\-]+)*\.[a-z]+\z/i
|
12
|
+
|
13
|
+
if email_regex.match?(value) == false
|
14
|
+
key.failure("has invalid format")
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require "dry-validation"
|
2
|
+
|
3
|
+
module NeonSchemas::Contracts::OutboundEmails
|
4
|
+
class WelcomeEmailContract < Dry::Validation::Contract
|
5
|
+
json do
|
6
|
+
required(:email).filled(:string)
|
7
|
+
end
|
8
|
+
|
9
|
+
rule(:email) do
|
10
|
+
email_regex = /\A[\w+\-.]+@[a-z\d\-]+(\.[a-z\d\-]+)*\.[a-z]+\z/i
|
11
|
+
|
12
|
+
if email_regex.match?(value) == false
|
13
|
+
key.failure("has invalid format")
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require "dry-validation"
|
2
|
+
|
3
|
+
module NeonSchemas::Contracts::Slack
|
4
|
+
class SendMessageContract < Dry::Validation::Contract
|
5
|
+
json do
|
6
|
+
required(:message).filled(:string)
|
7
|
+
required(:channel).value(:string)
|
8
|
+
end
|
9
|
+
|
10
|
+
rule(:channel) do
|
11
|
+
if value != "devops"
|
12
|
+
key.failure("invalid channel")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/neon_schemas/version.rb
CHANGED
data/neon_schemas.gemspec
CHANGED
@@ -17,8 +17,21 @@ Gem::Specification.new do |spec|
|
|
17
17
|
|
18
18
|
# Specify which files should be added to the gem when it is released.
|
19
19
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
20
|
-
spec.files = Dir.chdir(File.expand_path(
|
20
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
21
21
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
22
22
|
end
|
23
23
|
spec.require_paths = ["lib"]
|
24
|
+
|
25
|
+
spec.add_runtime_dependency "avro", "~> 1.10"
|
26
|
+
spec.add_runtime_dependency "dry-validation", "1.6"
|
27
|
+
spec.add_runtime_dependency "neon_operations", "0.0.3"
|
28
|
+
|
29
|
+
spec.add_development_dependency "rake", "12.3.3"
|
30
|
+
spec.add_development_dependency "rspec", "3.0"
|
31
|
+
spec.add_development_dependency "standard", "1.0.5"
|
32
|
+
spec.add_development_dependency "pry", "0.14.1"
|
33
|
+
spec.add_development_dependency "faker", "2.17"
|
34
|
+
spec.add_development_dependency "guard", "2.17.0"
|
35
|
+
spec.add_development_dependency "guard-rspec", "4.7.3"
|
36
|
+
spec.add_development_dependency "simplecov", "0.21.2"
|
24
37
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
"""The Neon Schemas Python Module"""
|
data/package.json
CHANGED
data/pyproject.toml
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"namespace": "com.neon_law.authentication",
|
3
|
+
"name": "successful_login",
|
4
|
+
"type": "record",
|
5
|
+
"fields": [
|
6
|
+
{
|
7
|
+
"name": "email",
|
8
|
+
"type": "string",
|
9
|
+
"doc": "The email of the logged in user."
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"type" : "string",
|
13
|
+
"name" : "sub",
|
14
|
+
"doc": "The 'sub' from Auth0 of the logged in user."
|
15
|
+
}
|
16
|
+
]
|
17
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
{
|
2
|
+
"namespace": "com.neon_law.documents",
|
3
|
+
"name": "process_unprocessed_document",
|
4
|
+
"type": "record",
|
5
|
+
"fields": [
|
6
|
+
{
|
7
|
+
"name": "id",
|
8
|
+
"type": "string",
|
9
|
+
"doc": "The id of the unprocessed document."
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"name" : "gcp_url",
|
13
|
+
"type": "string",
|
14
|
+
"doc": "The gcp url of the uploaded document."
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"name" : "person_id",
|
18
|
+
"type": "string",
|
19
|
+
"doc": "The id of the person who uploaded the document."
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"name" : "documentable_type",
|
23
|
+
"type": "string",
|
24
|
+
"doc": "The type of document like a matter_document or response_document"
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"name" : "documentable_id",
|
28
|
+
"type": "string",
|
29
|
+
"doc": "The id of the row associated with the polymorphic association"
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"name" : "document_template_id",
|
33
|
+
"type": "string",
|
34
|
+
"doc": "The id of the document_template that should be applied to the document"
|
35
|
+
}
|
36
|
+
]
|
37
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"namespace": "com.neon_law.outbound_emails",
|
3
|
+
"name": "welcome_email",
|
4
|
+
"type": "record",
|
5
|
+
"fields": [
|
6
|
+
{
|
7
|
+
"name": "email",
|
8
|
+
"type": "string",
|
9
|
+
"doc": "The 'to' email to send the email to."
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"type": "string",
|
13
|
+
"name": "sub",
|
14
|
+
"doc": "The 'sub' from Auth0."
|
15
|
+
}
|
16
|
+
]
|
17
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"namespace": "com.neon_law.slack",
|
3
|
+
"name": "send_message",
|
4
|
+
"type": "record",
|
5
|
+
"fields": [
|
6
|
+
{
|
7
|
+
"name": "body",
|
8
|
+
"type": "string",
|
9
|
+
"doc": "The body of the message, formatted with Slack text."
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"name" : "channel",
|
13
|
+
"type": "string",
|
14
|
+
"doc": "The channel to send the message to."
|
15
|
+
}
|
16
|
+
]
|
17
|
+
}
|
metadata
CHANGED
@@ -1,15 +1,169 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neon_schemas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neon Law
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
12
|
-
dependencies:
|
11
|
+
date: 2021-07-04 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: avro
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.10'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.10'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: dry-validation
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.6'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.6'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: neon_operations
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.0.3
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.0.3
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 12.3.3
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 12.3.3
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: standard
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.0.5
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 1.0.5
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.14.1
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.14.1
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: faker
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '2.17'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '2.17'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: guard
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 2.17.0
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 2.17.0
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: guard-rspec
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 4.7.3
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 4.7.3
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: simplecov
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - '='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 0.21.2
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - '='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 0.21.2
|
13
167
|
description: A gem containing schemas and encoding/decoding Avro classes
|
14
168
|
email:
|
15
169
|
- support@neonlaw.com
|
@@ -21,17 +175,27 @@ files:
|
|
21
175
|
- ".rspec"
|
22
176
|
- Gemfile
|
23
177
|
- Gemfile.lock
|
178
|
+
- Guardfile
|
24
179
|
- README.md
|
25
180
|
- Rakefile
|
26
181
|
- bin/console
|
27
182
|
- bin/setup
|
28
183
|
- lib/neon_schemas.rb
|
184
|
+
- lib/neon_schemas/avro.rb
|
185
|
+
- lib/neon_schemas/contracts/authentication/successful_login_contract.rb
|
186
|
+
- lib/neon_schemas/contracts/documents/process_document_contract.rb
|
187
|
+
- lib/neon_schemas/contracts/outbound_emails/welcome_email_contract.rb
|
188
|
+
- lib/neon_schemas/contracts/slack/send_message_contract.rb
|
29
189
|
- lib/neon_schemas/version.rb
|
30
190
|
- neon_schemas.gemspec
|
191
|
+
- neon_schemas/__init__.py
|
31
192
|
- package.json
|
32
193
|
- poetry.lock
|
33
194
|
- pyproject.toml
|
34
|
-
-
|
195
|
+
- schemas/authentication/successful_login.avsc
|
196
|
+
- schemas/documents/process_document.avsc
|
197
|
+
- schemas/outbound_emails/welcome_email.avsc
|
198
|
+
- schemas/slack/send_message.avsc
|
35
199
|
homepage: https://github.com/neonlaw/codebase
|
36
200
|
licenses: []
|
37
201
|
metadata:
|
data/src/outbound_email.avsc
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"namespace": "com.neon_law.email",
|
3
|
-
"name": "outbound_email",
|
4
|
-
"type": "record",
|
5
|
-
"fields": [
|
6
|
-
{
|
7
|
-
"name": "email",
|
8
|
-
"type": "string",
|
9
|
-
"doc": "The 'to' email to send the email to."
|
10
|
-
},
|
11
|
-
{
|
12
|
-
"name": "email_type",
|
13
|
-
"type": [
|
14
|
-
{
|
15
|
-
"type" : "record",
|
16
|
-
"name" : "new_registration",
|
17
|
-
"namespace" : "com.neon_law.email",
|
18
|
-
"fields" : [
|
19
|
-
{
|
20
|
-
"type" : "string",
|
21
|
-
"name" : "sub"
|
22
|
-
},
|
23
|
-
{
|
24
|
-
"type" : "string",
|
25
|
-
"name" : "template",
|
26
|
-
"pattern": "^new_registration$"
|
27
|
-
}
|
28
|
-
],
|
29
|
-
"doc:" : "Subscribers to this message can send a welcome email."
|
30
|
-
},
|
31
|
-
{
|
32
|
-
"type" : "record",
|
33
|
-
"name" : "new_document",
|
34
|
-
"namespace" : "com.neon_law.email",
|
35
|
-
"fields" : [
|
36
|
-
{
|
37
|
-
"type" : "string",
|
38
|
-
"name" : "sub"
|
39
|
-
},
|
40
|
-
{
|
41
|
-
"type" : "string",
|
42
|
-
"name" : "template",
|
43
|
-
"pattern": "^new_registration$"
|
44
|
-
}
|
45
|
-
],
|
46
|
-
"doc:" : "Subscribers to this message can send a welcome email."
|
47
|
-
}
|
48
|
-
]
|
49
|
-
}
|
50
|
-
]
|
51
|
-
}
|