neon_schemas 0.1.8 → 0.1.13

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: 2c8cd7c1e5b280eec2059a833b8a1a55f22dda32dc80acda0d4f6c59a59e883e
4
- data.tar.gz: 30e7b661cf4d9ac38e0d4037c0082244ecc2f1bf5245e83a5562c406d5ea82ec
3
+ metadata.gz: '083a0139b1118dd6d4a4a0c43368e6c6a1ff6190b2ed6abf26fa6e8087064f63'
4
+ data.tar.gz: cdd78a34d2addb9fb0636cb012a65ddbf81bf5657eba0853d6093e6e62fcb881
5
5
  SHA512:
6
- metadata.gz: 36524a23e886abf67899f029698b0003e0110cfb37718b18968020f85e7f0cbd81874b954c0fe38efe644bc6fb916eedf38c78e24bc5d3db623303bf578ef382
7
- data.tar.gz: 4af8171ddfed52ff3eba766dc9ae6820427e597d8b6c67dc168bf6991530ba89763d584536e2bdffd8929c94ba9216f2a3afffd22a97aaa5ce4c41a2db95aa63
6
+ metadata.gz: cfaa11ddc2f9e861b159defe504a7bffa511ae626dc01eea784ff58023617dc912bb2080e79792edd98aa128a74ee9848c8084a548b1d4790985f7013b5559c4
7
+ data.tar.gz: 4902007f3acad84bc4ad1b613217169779e98da72c00cec4e175756f6fac14b83153d51907fae74a166880dc82c8095bca3269bc0c0939a9cd85bcc6cb9e735d
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- neon_schemas (0.1.8)
4
+ neon_schemas (0.1.13)
5
5
  avro (~> 1.10)
6
6
  dry-validation (= 1.6)
7
- neon_operations (= 0.0.3)
7
+ neon_operations (= 0.0.6)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
@@ -81,7 +81,7 @@ GEM
81
81
  method_source (1.0.0)
82
82
  multi_json (1.15.0)
83
83
  nenv (0.3.0)
84
- neon_operations (0.0.3)
84
+ neon_operations (0.0.6)
85
85
  dry-monads (~> 1.3)
86
86
  notiffany (0.1.3)
87
87
  nenv (~> 0.1)
@@ -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
@@ -1,3 +1,3 @@
1
1
  module NeonSchemas
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.13"
3
3
  end
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.3"
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neonlaw/schemas",
3
- "version": "0.1.5",
3
+ "version": "0.1.12",
4
4
  "license": "Apache-2.0",
5
5
  "author": "@neonlaw",
6
6
  "scripts": {
data/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "neon_schemas"
3
- version = "0.1.5"
3
+ version = "0.1.12"
4
4
  description = "Schemas for Neon Law"
5
5
  authors = ["neon law <support@neonlaw.com>"]
6
6
  license = "Apache-2.0"
@@ -7,11 +7,6 @@
7
7
  "name": "email",
8
8
  "type": "string",
9
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
10
  }
16
11
  ]
17
12
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neon_schemas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.13
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-07-04 00:00:00.000000000 Z
11
+ date: 2021-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avro
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.0.3
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.3
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