neon_schemas 0.1.7 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +8 -3
- data/lib/neon_schemas/contracts/outbound_emails/sendgrid_mail_contract.rb +26 -0
- data/lib/neon_schemas/version.rb +1 -1
- data/neon_schemas.gemspec +1 -1
- data/package.json +1 -1
- data/pyproject.toml +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12a8c6f859446c072d0f76e57cf4b3f615dff8c0d0c7215ce82a6efcea6a6e01
|
4
|
+
data.tar.gz: b7d48b608abf70d0d1e2bf3837daa7350961030d0a3c2ae58aa25a0930352f48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79afc50fb670a66ee987cab43c0fba02e16f43092a68cc77f8b0eaaec32a11b50ba1ab3e0080aa469a53e1711780ab710f814f29151459973545108ad1e313c5
|
7
|
+
data.tar.gz: acf8be65c9afe0e5a37409216dbf2bf84c73f258e93dd5a2d98a283e75c9cd75e7d40423ecb37a1890413cb0f35b1ec86e8e8b9b0445b42641ddab259151cedb
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
neon_schemas (0.1.
|
4
|
+
neon_schemas (0.1.12)
|
5
5
|
avro (~> 1.10)
|
6
6
|
dry-validation (= 1.6)
|
7
|
-
neon_operations (= 0.0.
|
7
|
+
neon_operations (= 0.0.6)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
@@ -30,6 +30,10 @@ GEM
|
|
30
30
|
dry-logic (1.2.0)
|
31
31
|
concurrent-ruby (~> 1.0)
|
32
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
|
33
37
|
dry-schema (1.7.0)
|
34
38
|
concurrent-ruby (~> 1.0)
|
35
39
|
dry-configurable (~> 0.8, >= 0.8.3)
|
@@ -77,7 +81,8 @@ GEM
|
|
77
81
|
method_source (1.0.0)
|
78
82
|
multi_json (1.15.0)
|
79
83
|
nenv (0.3.0)
|
80
|
-
neon_operations (0.0.
|
84
|
+
neon_operations (0.0.6)
|
85
|
+
dry-monads (~> 1.3)
|
81
86
|
notiffany (0.1.3)
|
82
87
|
nenv (~> 0.1)
|
83
88
|
shellany (~> 0.0)
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require "dry-validation"
|
2
|
+
|
3
|
+
module NeonSchemas::Contracts::OutboundEmails
|
4
|
+
class SendgridMailContract < Dry::Validation::Contract
|
5
|
+
json do
|
6
|
+
required(:from).filled(:string)
|
7
|
+
required(:to).filled(:string)
|
8
|
+
required(:subject).filled(:string)
|
9
|
+
required(:content).filled(:string)
|
10
|
+
end
|
11
|
+
|
12
|
+
rule(:from) do
|
13
|
+
if value != "support@neonlaw.com"
|
14
|
+
key.failure("emails must come from support@neonlaw.com")
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
rule(:to) do
|
19
|
+
email_regex = /\A[\w+\-.]+@[a-z\d\-]+(\.[a-z\d\-]+)*\.[a-z]+\z/i
|
20
|
+
|
21
|
+
if email_regex.match?(value) == false
|
22
|
+
key.failure("has invalid format")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/neon_schemas/version.rb
CHANGED
data/neon_schemas.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
|
25
25
|
spec.add_runtime_dependency "avro", "~> 1.10"
|
26
26
|
spec.add_runtime_dependency "dry-validation", "1.6"
|
27
|
-
spec.add_runtime_dependency "neon_operations", "0.0.
|
27
|
+
spec.add_runtime_dependency "neon_operations", "0.0.6"
|
28
28
|
|
29
29
|
spec.add_development_dependency "rake", "12.3.3"
|
30
30
|
spec.add_development_dependency "rspec", "3.0"
|
data/package.json
CHANGED
data/pyproject.toml
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neon Law
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.0.
|
47
|
+
version: 0.0.6
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.0.
|
54
|
+
version: 0.0.6
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,6 +184,7 @@ files:
|
|
184
184
|
- lib/neon_schemas/avro.rb
|
185
185
|
- lib/neon_schemas/contracts/authentication/successful_login_contract.rb
|
186
186
|
- lib/neon_schemas/contracts/documents/process_document_contract.rb
|
187
|
+
- lib/neon_schemas/contracts/outbound_emails/sendgrid_mail_contract.rb
|
187
188
|
- lib/neon_schemas/contracts/outbound_emails/welcome_email_contract.rb
|
188
189
|
- lib/neon_schemas/contracts/slack/send_message_contract.rb
|
189
190
|
- lib/neon_schemas/version.rb
|