neon_schemas 0.1.7 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7414c300a3ad35033334c2bc803f110ef5e93f98a65b2bc52d74a3ed9e2f0e90
4
- data.tar.gz: 75ea146f9eea38ef90371a038ad2561791631cee5d0c60e6483c51c85dd746d0
3
+ metadata.gz: 12a8c6f859446c072d0f76e57cf4b3f615dff8c0d0c7215ce82a6efcea6a6e01
4
+ data.tar.gz: b7d48b608abf70d0d1e2bf3837daa7350961030d0a3c2ae58aa25a0930352f48
5
5
  SHA512:
6
- metadata.gz: ed6e4a64ac401e2bdf17105d004a5b3cb1628a3bb0cd14c30f1c7c1e143b7726b50a70e8833c65c8614ea35fb245513cf1b9fc3cbbedbaa9e93477d48fcae7ba
7
- data.tar.gz: 286c2e734c31f0e411163227004487cb916d3c07ffa54e2ee5841501b8fa380b3b7de1546b50596fad8d5cfac14c60009cb6fa9372dfbbe6071b7e4753ab4bd3
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.7)
4
+ neon_schemas (0.1.12)
5
5
  avro (~> 1.10)
6
6
  dry-validation (= 1.6)
7
- neon_operations (= 0.0.1)
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.1)
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
@@ -1,3 +1,3 @@
1
1
  module NeonSchemas
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.12"
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.1"
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"
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.7
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.1
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.1
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