sendgrid_webapi 0.0.2 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/config.yml +132 -0
- data/.circleci/setup-rubygems.sh +5 -0
- data/.gitignore +27 -1
- data/.rspec +2 -2
- data/.ruby-version +1 -0
- data/.tool-versions +1 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +103 -79
- data/lib/api_key/management.rb +33 -0
- data/lib/api_key/modules.rb +10 -0
- data/lib/apikey_client.rb +11 -0
- data/lib/base.rb +47 -13
- data/lib/helper.rb +8 -8
- data/lib/sendgrid_webapi.rb +1 -0
- data/lib/sub_user/modules.rb +15 -15
- data/lib/version.rb +2 -2
- data/lib/web_api/blocks.rb +5 -0
- data/lib/web_api/bounces.rb +5 -0
- data/lib/web_api/modules.rb +15 -11
- data/lib/web_api/version.rb +1 -1
- data/lib/webapi_client.rb +1 -1
- data/sendgrid_webapi.gemspec +12 -8
- data/spec/cassettes/client/_modules/_block/should_get_block_emails.yml +29 -41
- data/spec/cassettes/client/_modules/_block/should_get_totals_blocks.yml +36 -0
- data/spec/cassettes/client/_modules/_block/should_try_delete_not_existing_block_email.yml +29 -42
- data/spec/cassettes/client/_modules/_bounce/should_get_bounce_emails.yml +27 -31
- data/spec/cassettes/client/_modules/_bounce/should_get_totals_bounces.yml +36 -0
- data/spec/cassettes/client/_modules/_bounce/should_try_delete_not_existing_bounce_email.yml +27 -32
- data/spec/cassettes/client/_modules/_event_notification/should_delete_event_notification_url.yml +38 -40
- data/spec/cassettes/client/_modules/_event_notification/should_get_event_notification_url.yml +38 -40
- data/spec/cassettes/client/_modules/_event_notification/should_set_event_notification_url.yml +38 -40
- data/spec/cassettes/client/_modules/_invalid_email/should_get_invalid_emails.yml +27 -31
- data/spec/cassettes/client/_modules/_invalid_email/should_try_delete_not_existing_invalid_emails.yml +27 -32
- data/spec/cassettes/client/_modules/_parse_email/should_delete_parse_email.yml +73 -76
- data/spec/cassettes/client/_modules/_parse_email/should_get_parse_email.yml +38 -41
- data/spec/cassettes/client/_modules/_parse_email/should_set_parse_email.yml +38 -40
- data/spec/cassettes/client/_modules/_profile/should_get_profile.yml +39 -43
- data/spec/cassettes/client/_modules/_profile/should_set_first_name.yml +109 -117
- data/spec/cassettes/client/_modules/_spam/should_get_spam_emails.yml +27 -31
- data/spec/cassettes/client/_modules/_spam/should_try_delete_not_existing_spam_emails.yml +27 -32
- data/spec/cassettes/client/_modules/_unsubscribe/should_add_unsubscribe_emails.yml +27 -31
- data/spec/cassettes/client/_modules/_unsubscribe/should_delete_unsubscribe_email.yml +27 -31
- data/spec/cassettes/client/_modules/_unsubscribe/should_get_unsubscribe_emails.yml +27 -32
- data/spec/cassettes/client/_modules/_unsubscribe/should_try_delete_not_existing_unsubscribe_emails.yml +27 -32
- data/spec/cassettes/helper/_create_sub_user_account/should_create_sub_user_account.yml +248 -255
- data/spec/cassettes/helper/_run_sendgrid_query/should_raise_with_unsucessfull_request.yml +39 -38
- data/spec/cassettes/helper/_run_sendgrid_query/should_run_sendgrid_request.yml +38 -40
- data/spec/cassettes/sub_user/_apps/should_activate_app.yml +38 -40
- data/spec/cassettes/sub_user/_apps/should_deactivate_app.yml +38 -40
- data/spec/cassettes/sub_user/_apps/should_get_current_setting_from_one_app.yml +38 -41
- data/spec/cassettes/sub_user/_apps/should_return_available_apps.yml +63 -55
- data/spec/cassettes/sub_user/_apps/should_set_current_app.yml +73 -72
- data/spec/cassettes/sub_user/_authentication/should_auth_a_sub_user.yml +38 -40
- data/spec/cassettes/sub_user/_authentication/should_return_error_with_a_bad_sub_user.yml +38 -40
- data/spec/cassettes/sub_user/_bounces/should_returns_bounce_emails.yml +38 -39
- data/spec/cassettes/sub_user/_bounces/should_tries_to_delete_unexisting_bounce_emails.yml +38 -40
- data/spec/cassettes/sub_user/_event_notification/should_add_event_notification_url.yml +38 -40
- data/spec/cassettes/sub_user/_event_notification/should_delete_event_notification_url.yml +38 -40
- data/spec/cassettes/sub_user/_event_notification/should_get_event_notification_url.yml +38 -40
- data/spec/cassettes/sub_user/_invalid_emails/should_return_invalid_emails.yml +38 -39
- data/spec/cassettes/sub_user/_invalid_emails/should_tries_to_delete_unexisting_invalid_mail.yml +38 -40
- data/spec/cassettes/sub_user/_ip_management/should_return_all_ips_available.yml +38 -40
- data/spec/cassettes/sub_user/_ip_management/should_show_ip_subuser.yml +38 -40
- data/spec/cassettes/sub_user/_limits/should_decrements_credits_for_a_sub_user.yml +73 -77
- data/spec/cassettes/sub_user/_limits/should_delete_all_limits_for_a_sub_user.yml +73 -76
- data/spec/cassettes/sub_user/_limits/should_increments_credits_for_a_sub_user.yml +73 -77
- data/spec/cassettes/sub_user/_limits/should_list_the_limits_for_a_sub_user.yml +38 -40
- data/spec/cassettes/sub_user/_limits/should_reset_all_limits_for_a_sub_user.yml +73 -77
- data/spec/cassettes/sub_user/_limits/should_returns_limits_for_a_sub_user.yml +38 -40
- data/spec/cassettes/sub_user/_limits/should_set_total_credits.yml +38 -40
- data/spec/cassettes/sub_user/_management/should_add_new_subuser.yml +38 -40
- data/spec/cassettes/sub_user/_management/should_disable_sub_user_for_send_email.yml +38 -40
- data/spec/cassettes/sub_user/_management/should_enable_sub_user_for_access_to_website.yml +38 -40
- data/spec/cassettes/sub_user/_management/should_enable_sub_user_for_send_email.yml +38 -40
- data/spec/cassettes/sub_user/_management/should_update_sub_user.yml +38 -40
- data/spec/cassettes/sub_user/_monitor_records/should_add_existing_sub_user_to_monitor_record.yml +73 -78
- data/spec/cassettes/sub_user/_monitor_records/should_create_a_new_monitor_record.yml +73 -78
- data/spec/cassettes/sub_user/_monitor_records/should_delete_a_monitor_record.yml +73 -76
- data/spec/cassettes/sub_user/_monitor_records/should_edit_a_monitor_record.yml +73 -78
- data/spec/cassettes/sub_user/_monitor_records/should_remove_existing_sub_user_from_monitor_record.yml +73 -78
- data/spec/cassettes/sub_user/_parse_email/should_delete_parse_email.yml +73 -76
- data/spec/cassettes/sub_user/_parse_email/should_get_parse_email.yml +38 -41
- data/spec/cassettes/sub_user/_parse_email/should_set_parse_email.yml +38 -40
- data/spec/cassettes/sub_user/_spam/should_return_spam_mails.yml +38 -39
- data/spec/cassettes/sub_user/_spam/should_tries_to_delete_unexisting_spam_mail.yml +38 -40
- data/spec/cassettes/sub_user/_unsubscribes/should_add_bounce_email.yml +38 -40
- data/spec/cassettes/sub_user/_unsubscribes/should_delete_existing_bounce_email.yml +38 -40
- data/spec/cassettes/sub_user/_unsubscribes/should_delete_unexisting_bounce_email.yml +38 -40
- data/spec/cassettes/sub_user/_unsubscribes/should_returns_bounce_emails.yml +38 -40
- data/spec/client_spec.rb +7 -4
- data/spec/helper_spec.rb +9 -9
- data/spec/sub_user_spec.rb +63 -68
- data/test.rb +5 -0
- metadata +90 -58
- data/.travis.yml +0 -5
- data/spec/cassettes/sub_user/_management/should_get_all_subusers.yml +0 -54
metadata
CHANGED
@@ -1,97 +1,120 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sendgrid_webapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- kylejginavan
|
9
8
|
- chebyte
|
10
|
-
autorequire:
|
9
|
+
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2021-07-22 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
15
|
+
name: faraday
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
|
-
- - ~>
|
18
|
+
- - "~>"
|
21
19
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
23
|
-
type: :
|
20
|
+
version: '1.0'
|
21
|
+
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
|
-
- - ~>
|
25
|
+
- - "~>"
|
29
26
|
- !ruby/object:Gem::Version
|
30
|
-
version:
|
27
|
+
version: '1.0'
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
|
-
name:
|
29
|
+
name: faraday_middleware
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '1.0'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '1.0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: json
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '2.0'
|
49
|
+
type: :runtime
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '2.0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rspec
|
33
58
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
59
|
requirements:
|
36
|
-
- - ~>
|
60
|
+
- - "~>"
|
37
61
|
- !ruby/object:Gem::Version
|
38
|
-
version:
|
62
|
+
version: '3.4'
|
39
63
|
type: :development
|
40
64
|
prerelease: false
|
41
65
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
66
|
requirements:
|
44
|
-
- - ~>
|
67
|
+
- - "~>"
|
45
68
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
69
|
+
version: '3.4'
|
47
70
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
71
|
+
name: webmock
|
49
72
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
73
|
requirements:
|
52
|
-
- - ~>
|
74
|
+
- - "~>"
|
53
75
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
76
|
+
version: '3.12'
|
55
77
|
type: :development
|
56
78
|
prerelease: false
|
57
79
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
80
|
requirements:
|
60
|
-
- - ~>
|
81
|
+
- - "~>"
|
61
82
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
83
|
+
version: '3.12'
|
63
84
|
- !ruby/object:Gem::Dependency
|
64
|
-
name:
|
85
|
+
name: vcr
|
65
86
|
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
87
|
requirements:
|
68
|
-
- - ~>
|
88
|
+
- - "~>"
|
69
89
|
- !ruby/object:Gem::Version
|
70
|
-
version:
|
71
|
-
type: :
|
90
|
+
version: '6.0'
|
91
|
+
type: :development
|
72
92
|
prerelease: false
|
73
93
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
94
|
requirements:
|
76
|
-
- - ~>
|
95
|
+
- - "~>"
|
77
96
|
- !ruby/object:Gem::Version
|
78
|
-
version:
|
97
|
+
version: '6.0'
|
79
98
|
- !ruby/object:Gem::Dependency
|
80
|
-
name:
|
99
|
+
name: rspec_junit_formatter
|
81
100
|
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
101
|
requirements:
|
84
|
-
- - ~>
|
102
|
+
- - "~>"
|
85
103
|
- !ruby/object:Gem::Version
|
86
|
-
version:
|
87
|
-
|
104
|
+
version: '0.3'
|
105
|
+
- - ">="
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: 0.3.0
|
108
|
+
type: :development
|
88
109
|
prerelease: false
|
89
110
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
111
|
requirements:
|
92
|
-
- - ~>
|
112
|
+
- - "~>"
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '0.3'
|
115
|
+
- - ">="
|
93
116
|
- !ruby/object:Gem::Version
|
94
|
-
version:
|
117
|
+
version: 0.3.0
|
95
118
|
description: Gem for access to SendGrid WEB API from rails
|
96
119
|
email:
|
97
120
|
- kylejginavan@gmail.com
|
@@ -100,12 +123,19 @@ executables: []
|
|
100
123
|
extensions: []
|
101
124
|
extra_rdoc_files: []
|
102
125
|
files:
|
103
|
-
- .
|
104
|
-
- .
|
105
|
-
- .
|
126
|
+
- ".circleci/config.yml"
|
127
|
+
- ".circleci/setup-rubygems.sh"
|
128
|
+
- ".gitignore"
|
129
|
+
- ".rspec"
|
130
|
+
- ".ruby-version"
|
131
|
+
- ".tool-versions"
|
106
132
|
- Gemfile
|
133
|
+
- MIT-LICENSE
|
107
134
|
- README.rdoc
|
108
135
|
- Rakefile
|
136
|
+
- lib/api_key/management.rb
|
137
|
+
- lib/api_key/modules.rb
|
138
|
+
- lib/apikey_client.rb
|
109
139
|
- lib/base.rb
|
110
140
|
- lib/helper.rb
|
111
141
|
- lib/middlewares/sendgrid_response.rb
|
@@ -143,8 +173,10 @@ files:
|
|
143
173
|
- lib/webapi_client.rb
|
144
174
|
- sendgrid_webapi.gemspec
|
145
175
|
- spec/cassettes/client/_modules/_block/should_get_block_emails.yml
|
176
|
+
- spec/cassettes/client/_modules/_block/should_get_totals_blocks.yml
|
146
177
|
- spec/cassettes/client/_modules/_block/should_try_delete_not_existing_block_email.yml
|
147
178
|
- spec/cassettes/client/_modules/_bounce/should_get_bounce_emails.yml
|
179
|
+
- spec/cassettes/client/_modules/_bounce/should_get_totals_bounces.yml
|
148
180
|
- spec/cassettes/client/_modules/_bounce/should_try_delete_not_existing_bounce_email.yml
|
149
181
|
- spec/cassettes/client/_modules/_event_notification/should_delete_event_notification_url.yml
|
150
182
|
- spec/cassettes/client/_modules/_event_notification/should_get_event_notification_url.yml
|
@@ -192,7 +224,6 @@ files:
|
|
192
224
|
- spec/cassettes/sub_user/_management/should_disable_sub_user_for_send_email.yml
|
193
225
|
- spec/cassettes/sub_user/_management/should_enable_sub_user_for_access_to_website.yml
|
194
226
|
- spec/cassettes/sub_user/_management/should_enable_sub_user_for_send_email.yml
|
195
|
-
- spec/cassettes/sub_user/_management/should_get_all_subusers.yml
|
196
227
|
- spec/cassettes/sub_user/_management/should_update_sub_user.yml
|
197
228
|
- spec/cassettes/sub_user/_monitor_records/should_add_existing_sub_user_to_monitor_record.yml
|
198
229
|
- spec/cassettes/sub_user/_monitor_records/should_create_a_new_monitor_record.yml
|
@@ -212,34 +243,36 @@ files:
|
|
212
243
|
- spec/helper_spec.rb
|
213
244
|
- spec/spec_helper.rb
|
214
245
|
- spec/sub_user_spec.rb
|
215
|
-
|
216
|
-
|
217
|
-
|
246
|
+
- test.rb
|
247
|
+
homepage: https://github.com/kylejginavan/sendgrid_webapi
|
248
|
+
licenses:
|
249
|
+
- MIT
|
250
|
+
metadata: {}
|
251
|
+
post_install_message:
|
218
252
|
rdoc_options: []
|
219
253
|
require_paths:
|
220
254
|
- lib
|
221
255
|
required_ruby_version: !ruby/object:Gem::Requirement
|
222
|
-
none: false
|
223
256
|
requirements:
|
224
|
-
- -
|
257
|
+
- - ">="
|
225
258
|
- !ruby/object:Gem::Version
|
226
259
|
version: '0'
|
227
260
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
228
|
-
none: false
|
229
261
|
requirements:
|
230
|
-
- -
|
262
|
+
- - ">="
|
231
263
|
- !ruby/object:Gem::Version
|
232
264
|
version: '0'
|
233
265
|
requirements: []
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
specification_version: 3
|
266
|
+
rubygems_version: 3.2.3
|
267
|
+
signing_key:
|
268
|
+
specification_version: 4
|
238
269
|
summary: SendGrid WEB API gem fo Rails
|
239
270
|
test_files:
|
240
271
|
- spec/cassettes/client/_modules/_block/should_get_block_emails.yml
|
272
|
+
- spec/cassettes/client/_modules/_block/should_get_totals_blocks.yml
|
241
273
|
- spec/cassettes/client/_modules/_block/should_try_delete_not_existing_block_email.yml
|
242
274
|
- spec/cassettes/client/_modules/_bounce/should_get_bounce_emails.yml
|
275
|
+
- spec/cassettes/client/_modules/_bounce/should_get_totals_bounces.yml
|
243
276
|
- spec/cassettes/client/_modules/_bounce/should_try_delete_not_existing_bounce_email.yml
|
244
277
|
- spec/cassettes/client/_modules/_event_notification/should_delete_event_notification_url.yml
|
245
278
|
- spec/cassettes/client/_modules/_event_notification/should_get_event_notification_url.yml
|
@@ -287,7 +320,6 @@ test_files:
|
|
287
320
|
- spec/cassettes/sub_user/_management/should_disable_sub_user_for_send_email.yml
|
288
321
|
- spec/cassettes/sub_user/_management/should_enable_sub_user_for_access_to_website.yml
|
289
322
|
- spec/cassettes/sub_user/_management/should_enable_sub_user_for_send_email.yml
|
290
|
-
- spec/cassettes/sub_user/_management/should_get_all_subusers.yml
|
291
323
|
- spec/cassettes/sub_user/_management/should_update_sub_user.yml
|
292
324
|
- spec/cassettes/sub_user/_monitor_records/should_add_existing_sub_user_to_monitor_record.yml
|
293
325
|
- spec/cassettes/sub_user/_monitor_records/should_create_a_new_monitor_record.yml
|
@@ -1,54 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://sendgrid.com/apiv2/customer.profile.json?api_key=pass&api_user=user&task=get
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ""
|
9
|
-
headers:
|
10
|
-
Accept-Encoding:
|
11
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
-
Accept:
|
13
|
-
- "*/*"
|
14
|
-
User-Agent:
|
15
|
-
- Ruby
|
16
|
-
response:
|
17
|
-
status:
|
18
|
-
code: 200
|
19
|
-
message: OK
|
20
|
-
headers:
|
21
|
-
Server:
|
22
|
-
- nginx/0.7.65
|
23
|
-
Date:
|
24
|
-
- Mon, 02 Jul 2012 14:34:54 GMT
|
25
|
-
Content-Type:
|
26
|
-
- application/json
|
27
|
-
Connection:
|
28
|
-
- keep-alive
|
29
|
-
X-Powered-By:
|
30
|
-
- PHP/5.3.2-1ubuntu4.14
|
31
|
-
Cache-Control:
|
32
|
-
- private
|
33
|
-
Set-Cookie:
|
34
|
-
- sendgrid_frontend=62ac20a811cbc3c4275613c30c68d82c:e4195477931c4a47a9934349269021766fe01372; expires=Wed, 01-Aug-2012 14:34:30 GMT; path=/; httponly
|
35
|
-
Content-Encoding:
|
36
|
-
- gzip
|
37
|
-
Vary:
|
38
|
-
- Accept-Encoding
|
39
|
-
Content-Length:
|
40
|
-
- "285"
|
41
|
-
body:
|
42
|
-
encoding: ASCII-8BIT
|
43
|
-
string: !binary |
|
44
|
-
H4sIAAAAAAAAA+SSz06EMBDGX4X0jG4AObgnjY9gPLlmM5RxaZa2pDOoaHx3
|
45
|
-
p7CKf9bD6k2bNJnv+6YD/aXXT6onDA4sqqXSDVYDo0oVWjDt7JzhA9iuxWPt
|
46
|
-
raSg2dzFAxz62H1rAvH6bQi4DY6qlqyFOSJjO/IuTqjrgETilWWZgBuIAyLP
|
47
|
-
SS6RKG14kEoakrFMFTFwnHVxLuLRdFKeZnlxEpt97zjE/qtLkV3jHU5fOJIt
|
48
|
-
zj1WZMbTDXO3XC1Wi48X2zWsQevp78YLPqf7KOW/w8RI/AnPzprZRCN5ld+g
|
49
|
-
2YIjoB+BybIsyaa1H47zjG7jD4FT+WDoHZlRH8Kl8RaD/8sPp/j6cIp/S+jm
|
50
|
-
BQAA//8DAAAqOD6CBAAA
|
51
|
-
|
52
|
-
http_version:
|
53
|
-
recorded_at: Mon, 02 Jul 2012 14:34:54 GMT
|
54
|
-
recorded_with: VCR 2.1.1
|