sendgrid4r 1.13.0 → 1.14.0
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 +4 -4
- data/README.md +0 -1
- data/lib/sendgrid4r/version.rb +1 -1
- data/lib/sendgrid4r.rb +0 -58
- data/sendgrid4r.gemspec +0 -3
- data/spec/client_spec.rb +1 -1
- metadata +5 -183
- data/exe/sg +0 -5
- data/lib/sendgrid4r/cli/alert.rb +0 -51
- data/lib/sendgrid4r/cli/api_keys/api_key.rb +0 -53
- data/lib/sendgrid4r/cli/api_keys/permission.rb +0 -15
- data/lib/sendgrid4r/cli/campaign/campaign.rb +0 -134
- data/lib/sendgrid4r/cli/campaign/contact/contact.rb +0 -25
- data/lib/sendgrid4r/cli/campaign/contact/custom_field.rb +0 -42
- data/lib/sendgrid4r/cli/campaign/contact/list.rb +0 -71
- data/lib/sendgrid4r/cli/campaign/contact/recipient.rb +0 -78
- data/lib/sendgrid4r/cli/campaign/contact/reserved_field.rb +0 -17
- data/lib/sendgrid4r/cli/campaign/contact/segment.rb +0 -105
- data/lib/sendgrid4r/cli/campaign/sender.rb +0 -83
- data/lib/sendgrid4r/cli/cancel_schedules/batch_id.rb +0 -23
- data/lib/sendgrid4r/cli/cancel_schedules/cancel_schedule.rb +0 -55
- data/lib/sendgrid4r/cli/category.rb +0 -16
- data/lib/sendgrid4r/cli/ipam/activity.rb +0 -16
- data/lib/sendgrid4r/cli/ipam/ipam.rb +0 -14
- data/lib/sendgrid4r/cli/ipam/whitelist.rb +0 -39
- data/lib/sendgrid4r/cli/ips/address.rb +0 -48
- data/lib/sendgrid4r/cli/ips/ip.rb +0 -17
- data/lib/sendgrid4r/cli/ips/pool.rb +0 -48
- data/lib/sendgrid4r/cli/ips/warmup.rb +0 -39
- data/lib/sendgrid4r/cli/mail.rb +0 -34
- data/lib/sendgrid4r/cli/settings/enforced_tls.rb +0 -24
- data/lib/sendgrid4r/cli/settings/mail.rb +0 -195
- data/lib/sendgrid4r/cli/settings/partner.rb +0 -37
- data/lib/sendgrid4r/cli/settings/settings.rb +0 -20
- data/lib/sendgrid4r/cli/settings/tracking.rb +0 -101
- data/lib/sendgrid4r/cli/sg.rb +0 -61
- data/lib/sendgrid4r/cli/sg_thor.rb +0 -50
- data/lib/sendgrid4r/cli/stats/advanced.rb +0 -74
- data/lib/sendgrid4r/cli/stats/category.rb +0 -35
- data/lib/sendgrid4r/cli/stats/global.rb +0 -18
- data/lib/sendgrid4r/cli/stats/parse.rb +0 -18
- data/lib/sendgrid4r/cli/stats/stats.rb +0 -23
- data/lib/sendgrid4r/cli/stats/subuser.rb +0 -67
- data/lib/sendgrid4r/cli/subusers/monitor.rb +0 -44
- data/lib/sendgrid4r/cli/subusers/subuser.rb +0 -77
- data/lib/sendgrid4r/cli/suppressions/block.rb +0 -43
- data/lib/sendgrid4r/cli/suppressions/bounce.rb +0 -41
- data/lib/sendgrid4r/cli/suppressions/global_unsubscribe.rb +0 -43
- data/lib/sendgrid4r/cli/suppressions/group.rb +0 -61
- data/lib/sendgrid4r/cli/suppressions/group_unsubscribe.rb +0 -43
- data/lib/sendgrid4r/cli/suppressions/invalid_email.rb +0 -43
- data/lib/sendgrid4r/cli/suppressions/spam_report.rb +0 -43
- data/lib/sendgrid4r/cli/suppressions/suppression.rb +0 -36
- data/lib/sendgrid4r/cli/templates/template.rb +0 -51
- data/lib/sendgrid4r/cli/templates/version.rb +0 -78
- data/lib/sendgrid4r/cli/user.rb +0 -86
- data/lib/sendgrid4r/cli/webhooks/event.rb +0 -53
- data/lib/sendgrid4r/cli/webhooks/parse.rb +0 -55
- data/lib/sendgrid4r/cli/webhooks/webhook.rb +0 -14
- data/lib/sendgrid4r/cli/whitelabel/domain.rb +0 -117
- data/lib/sendgrid4r/cli/whitelabel/ip.rb +0 -52
- data/lib/sendgrid4r/cli/whitelabel/link.rb +0 -96
- data/lib/sendgrid4r/cli/whitelabel/whitelabel.rb +0 -17
- data/spec/cli/alert_spec.rb +0 -71
- data/spec/cli/api_keys/api_key_spec.rb +0 -77
- data/spec/cli/api_keys/permission_spec.rb +0 -29
- data/spec/cli/campaign/campaign_spec.rb +0 -136
- data/spec/cli/campaign/contact/custom_field_spec.rb +0 -48
- data/spec/cli/campaign/contact/list_spec.rb +0 -88
- data/spec/cli/campaign/contact/recipient_spec.rb +0 -93
- data/spec/cli/campaign/contact/reserved_field_spec.rb +0 -20
- data/spec/cli/campaign/contact/segment_spec.rb +0 -93
- data/spec/cli/campaign/sender_spec.rb +0 -83
- data/spec/cli/cancel_schedules/batch_id_spec.rb +0 -33
- data/spec/cli/cancel_schedules/cancel_schedule_spec.rb +0 -69
- data/spec/cli/category_spec.rb +0 -23
- data/spec/cli/ipam/activity_spec.rb +0 -21
- data/spec/cli/ipam/ipam_spec.rb +0 -26
- data/spec/cli/ipam/whitelist_spec.rb +0 -47
- data/spec/cli/ips/address_spec.rb +0 -57
- data/spec/cli/ips/ip_spec.rb +0 -33
- data/spec/cli/ips/pool_spec.rb +0 -57
- data/spec/cli/ips/warmup_spec.rb +0 -47
- data/spec/cli/mail_spec.rb +0 -37
- data/spec/cli/settings/enforced_tls_spec.rb +0 -30
- data/spec/cli/settings/mail_spec.rb +0 -255
- data/spec/cli/settings/partner_spec.rb +0 -47
- data/spec/cli/settings/settings_spec.rb +0 -40
- data/spec/cli/settings/tracking_spec.rb +0 -128
- data/spec/cli/sg_spec.rb +0 -87
- data/spec/cli/stats/advanced_spec.rb +0 -137
- data/spec/cli/stats/category_spec.rb +0 -57
- data/spec/cli/stats/global_spec.rb +0 -32
- data/spec/cli/stats/parse_spec.rb +0 -32
- data/spec/cli/stats/stats_spec.rb +0 -40
- data/spec/cli/stats/subuser_spec.rb +0 -104
- data/spec/cli/subusers/monitor_spec.rb +0 -52
- data/spec/cli/subusers/subuser_spec.rb +0 -88
- data/spec/cli/suppressions/block_spec.rb +0 -60
- data/spec/cli/suppressions/bounce_spec.rb +0 -58
- data/spec/cli/suppressions/global_unsubscribe_spec.rb +0 -59
- data/spec/cli/suppressions/group_spec.rb +0 -78
- data/spec/cli/suppressions/group_unsubscribe_spec.rb +0 -51
- data/spec/cli/suppressions/invalid_email_spec.rb +0 -60
- data/spec/cli/suppressions/spam_report_spec.rb +0 -60
- data/spec/cli/suppressions/suppression_spec.rb +0 -68
- data/spec/cli/templates/template_spec.rb +0 -65
- data/spec/cli/templates/version_spec.rb +0 -71
- data/spec/cli/user_spec.rb +0 -82
- data/spec/cli/webhooks/event_spec.rb +0 -67
- data/spec/cli/webhooks/parse_spec.rb +0 -72
- data/spec/cli/webhooks/webhook_spec.rb +0 -28
- data/spec/cli/whitelabel/domain_spec.rb +0 -112
- data/spec/cli/whitelabel/ip_spec.rb +0 -61
- data/spec/cli/whitelabel/link_spec.rb +0 -110
- data/spec/cli/whitelabel/whitelabel_spec.rb +0 -27
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
require File.dirname(__FILE__) + '/../../spec_helper'
|
|
3
|
-
|
|
4
|
-
module SendGrid4r::CLI::Suppressions
|
|
5
|
-
describe GroupUnsubscribe do
|
|
6
|
-
describe 'integration test', :it do
|
|
7
|
-
before do
|
|
8
|
-
Dotenv.load
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
it '#add' do
|
|
12
|
-
args = [
|
|
13
|
-
'add',
|
|
14
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
15
|
-
'--group-id', 1099,
|
|
16
|
-
'--recipient-emails', 'abc@abc.com', 'cde@cde.com'
|
|
17
|
-
]
|
|
18
|
-
GroupUnsubscribe.start(args)
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
it '#list with no params' do
|
|
22
|
-
args = [
|
|
23
|
-
'list',
|
|
24
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
25
|
-
'--group-id', 1099
|
|
26
|
-
]
|
|
27
|
-
GroupUnsubscribe.start(args)
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
it '#search' do
|
|
31
|
-
args = [
|
|
32
|
-
'search',
|
|
33
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
34
|
-
'--group-id', 1099,
|
|
35
|
-
'--recipient-emails', 'abc@abc.com', 'cde@cde.com'
|
|
36
|
-
]
|
|
37
|
-
GroupUnsubscribe.start(args)
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
it '#remove' do
|
|
41
|
-
args = [
|
|
42
|
-
'remove',
|
|
43
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
44
|
-
'--group-id', 889,
|
|
45
|
-
'--email-address', 'abc@abc.com'
|
|
46
|
-
]
|
|
47
|
-
GroupUnsubscribe.start(args)
|
|
48
|
-
end
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
end
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
require File.dirname(__FILE__) + '/../../spec_helper'
|
|
3
|
-
|
|
4
|
-
module SendGrid4r::CLI::Suppressions
|
|
5
|
-
describe InvalidEmail do
|
|
6
|
-
describe 'integration test', :it do
|
|
7
|
-
before do
|
|
8
|
-
Dotenv.load
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
it '#list' do
|
|
12
|
-
args = [
|
|
13
|
-
'list',
|
|
14
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
15
|
-
'--start-time', Time.local(2016, 1, 1).to_i,
|
|
16
|
-
'--end-time', Time.local(2016, 1, 31).to_i,
|
|
17
|
-
'--limit', 10,
|
|
18
|
-
'--offset', 0
|
|
19
|
-
]
|
|
20
|
-
InvalidEmail.start(args)
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
it '#delete with delete_all' do
|
|
24
|
-
args = [
|
|
25
|
-
'delete',
|
|
26
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
27
|
-
'--delete-all', true
|
|
28
|
-
]
|
|
29
|
-
InvalidEmail.start(args)
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
it '#delete with email' do
|
|
33
|
-
args = [
|
|
34
|
-
'delete',
|
|
35
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
36
|
-
'--email', 'abc@abc.com'
|
|
37
|
-
]
|
|
38
|
-
InvalidEmail.start(args)
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
it '#delete with emails' do
|
|
42
|
-
args = [
|
|
43
|
-
'delete',
|
|
44
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
45
|
-
'--emails', 'abc@abc.com', 'cde@cde.com'
|
|
46
|
-
]
|
|
47
|
-
InvalidEmail.start(args)
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
it '#get' do
|
|
51
|
-
args = [
|
|
52
|
-
'get',
|
|
53
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
54
|
-
'--email', 'abc@abc.com'
|
|
55
|
-
]
|
|
56
|
-
InvalidEmail.start(args)
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
end
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
require File.dirname(__FILE__) + '/../../spec_helper'
|
|
3
|
-
|
|
4
|
-
module SendGrid4r::CLI::Suppressions
|
|
5
|
-
describe SpamReport do
|
|
6
|
-
describe 'integration test', :it do
|
|
7
|
-
before do
|
|
8
|
-
Dotenv.load
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
it '#list' do
|
|
12
|
-
args = [
|
|
13
|
-
'list',
|
|
14
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
15
|
-
'--start-time', Time.local(2016, 1, 1).to_i,
|
|
16
|
-
'--end-time', Time.local(2016, 1, 31).to_i,
|
|
17
|
-
'--limit', 10,
|
|
18
|
-
'--offset', 0
|
|
19
|
-
]
|
|
20
|
-
SpamReport.start(args)
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
it '#delete with delete_all' do
|
|
24
|
-
args = [
|
|
25
|
-
'delete',
|
|
26
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
27
|
-
'--delete-all', true
|
|
28
|
-
]
|
|
29
|
-
SpamReport.start(args)
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
it '#delete with email' do
|
|
33
|
-
args = [
|
|
34
|
-
'delete',
|
|
35
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
36
|
-
'--email', 'abc@abc.com'
|
|
37
|
-
]
|
|
38
|
-
SpamReport.start(args)
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
it '#delete with emails' do
|
|
42
|
-
args = [
|
|
43
|
-
'delete',
|
|
44
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
45
|
-
'--emails', 'abc@abc.com', 'cde@cde.com'
|
|
46
|
-
]
|
|
47
|
-
SpamReport.start(args)
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
it '#get' do
|
|
51
|
-
args = [
|
|
52
|
-
'get',
|
|
53
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
54
|
-
'--email', 'abc@abc.com'
|
|
55
|
-
]
|
|
56
|
-
SpamReport.start(args)
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
end
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
require File.dirname(__FILE__) + '/../../spec_helper'
|
|
3
|
-
|
|
4
|
-
module SendGrid4r::CLI::Suppressions
|
|
5
|
-
describe Suppression do
|
|
6
|
-
describe 'integration test', :it do
|
|
7
|
-
before do
|
|
8
|
-
Dotenv.load
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
it '#block subcommand' do
|
|
12
|
-
args = [
|
|
13
|
-
'block',
|
|
14
|
-
'--api-key', ENV['SILVER_API_KEY']
|
|
15
|
-
]
|
|
16
|
-
Suppression.start(args)
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
it '#bounce subcommand' do
|
|
20
|
-
args = [
|
|
21
|
-
'bounce',
|
|
22
|
-
'--api-key', ENV['SILVER_API_KEY']
|
|
23
|
-
]
|
|
24
|
-
Suppression.start(args)
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
it '#invalid_email subcommand' do
|
|
28
|
-
args = [
|
|
29
|
-
'invalid_email',
|
|
30
|
-
'--api-key', ENV['SILVER_API_KEY']
|
|
31
|
-
]
|
|
32
|
-
Suppression.start(args)
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
it '#spam_report subcommand' do
|
|
36
|
-
args = [
|
|
37
|
-
'spam_report',
|
|
38
|
-
'--api-key', ENV['SILVER_API_KEY']
|
|
39
|
-
]
|
|
40
|
-
Suppression.start(args)
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
it '#global_unsubscribe subcommand' do
|
|
44
|
-
args = [
|
|
45
|
-
'global_unsubscribe',
|
|
46
|
-
'--api-key', ENV['SILVER_API_KEY']
|
|
47
|
-
]
|
|
48
|
-
Suppression.start(args)
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
it '#group subcommand' do
|
|
52
|
-
args = [
|
|
53
|
-
'group',
|
|
54
|
-
'--api-key', ENV['SILVER_API_KEY']
|
|
55
|
-
]
|
|
56
|
-
Suppression.start(args)
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
it '#group_unsubscribe subcommand' do
|
|
60
|
-
args = [
|
|
61
|
-
'group_unsubscribe',
|
|
62
|
-
'--api-key', ENV['SILVER_API_KEY']
|
|
63
|
-
]
|
|
64
|
-
Suppression.start(args)
|
|
65
|
-
end
|
|
66
|
-
end
|
|
67
|
-
end
|
|
68
|
-
end
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
require File.dirname(__FILE__) + '/../../spec_helper'
|
|
3
|
-
|
|
4
|
-
module SendGrid4r::CLI::Templates
|
|
5
|
-
describe Template do
|
|
6
|
-
describe 'integration test', :it do
|
|
7
|
-
before do
|
|
8
|
-
Dotenv.load
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
it '#create' do
|
|
12
|
-
args = [
|
|
13
|
-
'create',
|
|
14
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
15
|
-
'--name', 'cli_template'
|
|
16
|
-
]
|
|
17
|
-
Template.start(args)
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
it '#list' do
|
|
21
|
-
args = [
|
|
22
|
-
'list',
|
|
23
|
-
'--api-key', ENV['SILVER_API_KEY']
|
|
24
|
-
]
|
|
25
|
-
Template.start(args)
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
it '#get' do
|
|
29
|
-
args = [
|
|
30
|
-
'get',
|
|
31
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
32
|
-
'--template-id', 'b4c57fdc-4ae3-451f-9f09-56bedd4ec6c4'
|
|
33
|
-
]
|
|
34
|
-
Template.start(args)
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
it '#update' do
|
|
38
|
-
args = [
|
|
39
|
-
'update',
|
|
40
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
41
|
-
'--template-id', 'a973204f-2fcc-419d-8f04-db4a3f5fe01e',
|
|
42
|
-
'--name', 'cli_template_edit'
|
|
43
|
-
]
|
|
44
|
-
Template.start(args)
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
it '#delete' do
|
|
48
|
-
args = [
|
|
49
|
-
'delete',
|
|
50
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
51
|
-
'--id', 'a973204f-2fcc-419d-8f04-db4a3f5fe01e'
|
|
52
|
-
]
|
|
53
|
-
Template.start(args)
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
it '#version subcommand' do
|
|
57
|
-
args = [
|
|
58
|
-
'version',
|
|
59
|
-
'--api-key', ENV['SILVER_API_KEY']
|
|
60
|
-
]
|
|
61
|
-
Template.start(args)
|
|
62
|
-
end
|
|
63
|
-
end
|
|
64
|
-
end
|
|
65
|
-
end
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
require File.dirname(__FILE__) + '/../../spec_helper'
|
|
3
|
-
|
|
4
|
-
module SendGrid4r::CLI::Templates
|
|
5
|
-
describe Version do
|
|
6
|
-
describe 'integration test', :it do
|
|
7
|
-
before do
|
|
8
|
-
Dotenv.load
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
it '#create' do
|
|
12
|
-
args = [
|
|
13
|
-
'create',
|
|
14
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
15
|
-
'--template-id', 'b4c57fdc-4ae3-451f-9f09-56bedd4ec6c4',
|
|
16
|
-
'--name', 'cli_version',
|
|
17
|
-
'--subject', 'Hello!<%subject%>',
|
|
18
|
-
'--html-content', 'HTML_Content<%body%>',
|
|
19
|
-
'--plain-content', 'plain_content<%body%>',
|
|
20
|
-
'--active', 0
|
|
21
|
-
]
|
|
22
|
-
Version.start(args)
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
it '#activate' do
|
|
26
|
-
args = [
|
|
27
|
-
'activate',
|
|
28
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
29
|
-
'--template-id', 'b4c57fdc-4ae3-451f-9f09-56bedd4ec6c4',
|
|
30
|
-
'--version-id', '811fbaad-9079-4f5c-8c3c-3582a7c100c7'
|
|
31
|
-
]
|
|
32
|
-
Version.start(args)
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
it '#get' do
|
|
36
|
-
args = [
|
|
37
|
-
'get',
|
|
38
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
39
|
-
'--template-id', 'b4c57fdc-4ae3-451f-9f09-56bedd4ec6c4',
|
|
40
|
-
'--version-id', '594a5aef-dbf4-4e27-8bc1-ef3242c96b89'
|
|
41
|
-
]
|
|
42
|
-
Version.start(args)
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
it '#update' do
|
|
46
|
-
args = [
|
|
47
|
-
'update',
|
|
48
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
49
|
-
'--template-id', 'b4c57fdc-4ae3-451f-9f09-56bedd4ec6c4',
|
|
50
|
-
'--version-id', '594a5aef-dbf4-4e27-8bc1-ef3242c96b89',
|
|
51
|
-
'--name', 'cli_version_edit',
|
|
52
|
-
'--subject', 'Hello!<%subject%> edit',
|
|
53
|
-
'--html-content', 'HTML_Content<%body%> edit',
|
|
54
|
-
'--plain-content', 'plain_content<%body%> edit',
|
|
55
|
-
'--active', 1
|
|
56
|
-
]
|
|
57
|
-
Version.start(args)
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
it '#delete' do
|
|
61
|
-
args = [
|
|
62
|
-
'delete',
|
|
63
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
64
|
-
'--template-id', 'b4c57fdc-4ae3-451f-9f09-56bedd4ec6c4',
|
|
65
|
-
'--version-id', '594a5aef-dbf4-4e27-8bc1-ef3242c96b89'
|
|
66
|
-
]
|
|
67
|
-
Version.start(args)
|
|
68
|
-
end
|
|
69
|
-
end
|
|
70
|
-
end
|
|
71
|
-
end
|
data/spec/cli/user_spec.rb
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
require File.dirname(__FILE__) + '/../spec_helper'
|
|
3
|
-
|
|
4
|
-
module SendGrid4r::CLI
|
|
5
|
-
describe User do
|
|
6
|
-
describe 'integration test', :it do
|
|
7
|
-
before do
|
|
8
|
-
Dotenv.load
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
it '#profile get with full params' do
|
|
12
|
-
args = [
|
|
13
|
-
'profile', 'get',
|
|
14
|
-
'--api-key', ENV['SILVER_API_KEY']
|
|
15
|
-
]
|
|
16
|
-
User.start(args)
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
it '#profile update' do
|
|
20
|
-
args = [
|
|
21
|
-
'profile', 'update',
|
|
22
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
23
|
-
'--city', 'Nakano2',
|
|
24
|
-
'--zip', '111-1111'
|
|
25
|
-
]
|
|
26
|
-
User.start(args)
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
it '#account get' do
|
|
30
|
-
args = [
|
|
31
|
-
'account', 'get',
|
|
32
|
-
'--api-key', ENV['SILVER_API_KEY']
|
|
33
|
-
]
|
|
34
|
-
User.start(args)
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
it '#email get' do
|
|
38
|
-
args = [
|
|
39
|
-
'email', 'get',
|
|
40
|
-
'--api-key', ENV['SILVER_API_KEY']
|
|
41
|
-
]
|
|
42
|
-
User.start(args)
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
it '#email update' do
|
|
46
|
-
args = [
|
|
47
|
-
'email', 'update',
|
|
48
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
49
|
-
'--email', ENV['MAIL2']
|
|
50
|
-
]
|
|
51
|
-
User.start(args)
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
it '#username get' do
|
|
55
|
-
args = [
|
|
56
|
-
'username', 'get',
|
|
57
|
-
'--api-key', ENV['SILVER_API_KEY']
|
|
58
|
-
]
|
|
59
|
-
User.start(args)
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
it '#username update' do
|
|
63
|
-
args = [
|
|
64
|
-
'username', 'update',
|
|
65
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
66
|
-
'--username', ENV['USERNAME']
|
|
67
|
-
]
|
|
68
|
-
User.start(args)
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
it '#password' do
|
|
72
|
-
args = [
|
|
73
|
-
'password', 'update',
|
|
74
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
75
|
-
'--new-password', ENV['PASS'],
|
|
76
|
-
'--old-password', ENV['PASS']
|
|
77
|
-
]
|
|
78
|
-
User.start(args)
|
|
79
|
-
end
|
|
80
|
-
end
|
|
81
|
-
end
|
|
82
|
-
end
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
require File.dirname(__FILE__) + '/../../spec_helper'
|
|
3
|
-
|
|
4
|
-
module SendGrid4r::CLI::Webhooks
|
|
5
|
-
describe Event do
|
|
6
|
-
describe 'integration test', :it do
|
|
7
|
-
before do
|
|
8
|
-
Dotenv.load
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
it '#get' do
|
|
12
|
-
args = [
|
|
13
|
-
'get',
|
|
14
|
-
'--api-key', ENV['SILVER_API_KEY']
|
|
15
|
-
]
|
|
16
|
-
Event.start(args)
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
it '#enable with mandatory params' do
|
|
20
|
-
args = [
|
|
21
|
-
'enable',
|
|
22
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
23
|
-
'--url', 'http://test.test.test',
|
|
24
|
-
'--group-resubscribe', true
|
|
25
|
-
]
|
|
26
|
-
Event.start(args)
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
it '#enable with full params' do
|
|
30
|
-
args = [
|
|
31
|
-
'enable',
|
|
32
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
33
|
-
'--url', 'http://test.test.test',
|
|
34
|
-
'--group-resubscribe', false,
|
|
35
|
-
'--delivered', false,
|
|
36
|
-
'--group-unsubscribe', false,
|
|
37
|
-
'--spam-report', false,
|
|
38
|
-
'--bounce', false,
|
|
39
|
-
'--deferred', false,
|
|
40
|
-
'--unsubscribe', false,
|
|
41
|
-
'--processed', false,
|
|
42
|
-
'--open', false,
|
|
43
|
-
'--click', false,
|
|
44
|
-
'--dropped', false
|
|
45
|
-
]
|
|
46
|
-
Event.start(args)
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
it '#disable with full params' do
|
|
50
|
-
args = [
|
|
51
|
-
'disable',
|
|
52
|
-
'--api-key', ENV['SILVER_API_KEY']
|
|
53
|
-
]
|
|
54
|
-
Event.start(args)
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
it '#test' do
|
|
58
|
-
args = [
|
|
59
|
-
'test',
|
|
60
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
61
|
-
'--url', 'http://test.test.test'
|
|
62
|
-
]
|
|
63
|
-
Event.start(args)
|
|
64
|
-
end
|
|
65
|
-
end
|
|
66
|
-
end
|
|
67
|
-
end
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
require File.dirname(__FILE__) + '/../../spec_helper'
|
|
3
|
-
|
|
4
|
-
module SendGrid4r::CLI::Webhooks
|
|
5
|
-
describe Parse do
|
|
6
|
-
describe 'integration test', :it do
|
|
7
|
-
before do
|
|
8
|
-
Dotenv.load
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
it '#list without params' do
|
|
12
|
-
args = [
|
|
13
|
-
'list',
|
|
14
|
-
'--api-key', ENV['SILVER_API_KEY']
|
|
15
|
-
]
|
|
16
|
-
Parse.start(args)
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
it '#list with full params' do
|
|
20
|
-
args = [
|
|
21
|
-
'list',
|
|
22
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
23
|
-
'--limit', 0,
|
|
24
|
-
'--offset', 1
|
|
25
|
-
]
|
|
26
|
-
Parse.start(args)
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
it '#create' do
|
|
30
|
-
args = [
|
|
31
|
-
'create',
|
|
32
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
33
|
-
'--hostname', 'host1.abc.abc',
|
|
34
|
-
'--url', 'http://host1.abc.abc',
|
|
35
|
-
'--spam_check', true,
|
|
36
|
-
'--send_raw', true
|
|
37
|
-
]
|
|
38
|
-
Parse.start(args)
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
it '#get' do
|
|
42
|
-
args = [
|
|
43
|
-
'get',
|
|
44
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
45
|
-
'--hostname', 'host1.abc.abc'
|
|
46
|
-
]
|
|
47
|
-
Parse.start(args)
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
it '#update' do
|
|
51
|
-
args = [
|
|
52
|
-
'update',
|
|
53
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
54
|
-
'--hostname', 'host1.abc.abc',
|
|
55
|
-
'--url', 'http://host1.abc.abc',
|
|
56
|
-
'--spam_check', true,
|
|
57
|
-
'--send_raw', true
|
|
58
|
-
]
|
|
59
|
-
Parse.start(args)
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
it '#delete' do
|
|
63
|
-
args = [
|
|
64
|
-
'delete',
|
|
65
|
-
'--api-key', ENV['SILVER_API_KEY'],
|
|
66
|
-
'--hostname', 'host1.abc.abc'
|
|
67
|
-
]
|
|
68
|
-
Parse.start(args)
|
|
69
|
-
end
|
|
70
|
-
end
|
|
71
|
-
end
|
|
72
|
-
end
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
require File.dirname(__FILE__) + '/../../spec_helper'
|
|
3
|
-
|
|
4
|
-
module SendGrid4r::CLI::Webhooks
|
|
5
|
-
describe Webhook do
|
|
6
|
-
describe 'integration test', :it do
|
|
7
|
-
before do
|
|
8
|
-
Dotenv.load
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
it '#event subcommand' do
|
|
12
|
-
args = [
|
|
13
|
-
'event',
|
|
14
|
-
'--api-key', ENV['SILVER_API_KEY']
|
|
15
|
-
]
|
|
16
|
-
Webhook.start(args)
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
it '#parse subcommand' do
|
|
20
|
-
args = [
|
|
21
|
-
'parse',
|
|
22
|
-
'--api-key', ENV['SILVER_API_KEY']
|
|
23
|
-
]
|
|
24
|
-
Webhook.start(args)
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|