kani_laser 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +18 -0
- data/lib/kani_laser/schema.rb +2 -1
- data/lib/kani_laser/version.rb +1 -1
- data/tasks/json_schema.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 614e3ee7e69b0e1058cc8a3174b88de3d4655c435c7017e9944eb0bd29286bc7
|
4
|
+
data.tar.gz: a9863cee5792cb22c3e6672809cb874c6445aeb92d144fa9048c4efc4c1116f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76394d457953fedffa5d399f9f012e15eee84d2fb0346cbbb11494b3307fe400121b563d5951289754ae38535014f84ffd08c573b43acdf9a48c863da442b508
|
7
|
+
data.tar.gz: 39ffddca138f891997d9fab4e51192ca69cd91f94c2e73397fb654683dd150a855d3eab4ddd5d25e9a281de8c48e2f2349b17368c843b890d645c1d1cca05fbf
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
kani_laser (0.1.
|
4
|
+
kani_laser (0.1.2)
|
5
5
|
faraday (~> 0.17.1)
|
6
6
|
faraday_middleware
|
7
7
|
json-schema
|
@@ -13,7 +13,7 @@ GEM
|
|
13
13
|
public_suffix (>= 2.0.2, < 5.0)
|
14
14
|
ast (2.4.0)
|
15
15
|
diff-lcs (1.3)
|
16
|
-
faraday (0.17.
|
16
|
+
faraday (0.17.3)
|
17
17
|
multipart-post (>= 1.2, < 3)
|
18
18
|
faraday_middleware (0.13.1)
|
19
19
|
faraday (>= 0.7.4, < 1.0)
|
data/README.md
CHANGED
@@ -52,6 +52,24 @@ client.send_mail(
|
|
52
52
|
)
|
53
53
|
```
|
54
54
|
|
55
|
+
### For testing
|
56
|
+
|
57
|
+
```ruby
|
58
|
+
client = KaniLaser::Client.new(options) do |faraday|
|
59
|
+
faraday.adapter :test, Faraday::Adapter::Test::Stubs.new do |stub|
|
60
|
+
stub.post('/v3/mail/send') do |_env|
|
61
|
+
[202, {}, '']
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
```
|
66
|
+
|
67
|
+
## Update schema
|
68
|
+
|
69
|
+
```sh
|
70
|
+
rake schema:update
|
71
|
+
```
|
72
|
+
|
55
73
|
## Related Links
|
56
74
|
|
57
75
|
* https://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/index.html
|
data/lib/kani_laser/schema.rb
CHANGED
@@ -55,7 +55,8 @@ module KaniLaser
|
|
55
55
|
{"type"=>"integer",
|
56
56
|
"description"=>
|
57
57
|
"A unix timestamp allowing you to specify when you want your email to be delivered. Scheduling more than 72 hours in advance is forbidden."}},
|
58
|
-
"required"=>["to"]}
|
58
|
+
"required"=>["to"]},
|
59
|
+
"minItems"=>1},
|
59
60
|
"from"=>{"$ref"=>"#/definitions/email_object"},
|
60
61
|
"reply_to"=>{"$ref"=>"#/definitions/email_object"},
|
61
62
|
"subject"=>
|
data/lib/kani_laser/version.rb
CHANGED
data/tasks/json_schema.rb
CHANGED
@@ -22,6 +22,10 @@ module JSONSchema
|
|
22
22
|
schema['required'].delete('subject')
|
23
23
|
schema['required'].delete('content')
|
24
24
|
|
25
|
+
# TODO: Fix upstream
|
26
|
+
# https://github.com/sendgrid/sendgrid-oai
|
27
|
+
schema['properties'].fetch('personalizations')['minItems'] ||= 1
|
28
|
+
|
25
29
|
schema
|
26
30
|
end
|
27
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kani_laser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- winebarrel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|