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.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -1
  3. data/lib/sendgrid4r/version.rb +1 -1
  4. data/lib/sendgrid4r.rb +0 -58
  5. data/sendgrid4r.gemspec +0 -3
  6. data/spec/client_spec.rb +1 -1
  7. metadata +5 -183
  8. data/exe/sg +0 -5
  9. data/lib/sendgrid4r/cli/alert.rb +0 -51
  10. data/lib/sendgrid4r/cli/api_keys/api_key.rb +0 -53
  11. data/lib/sendgrid4r/cli/api_keys/permission.rb +0 -15
  12. data/lib/sendgrid4r/cli/campaign/campaign.rb +0 -134
  13. data/lib/sendgrid4r/cli/campaign/contact/contact.rb +0 -25
  14. data/lib/sendgrid4r/cli/campaign/contact/custom_field.rb +0 -42
  15. data/lib/sendgrid4r/cli/campaign/contact/list.rb +0 -71
  16. data/lib/sendgrid4r/cli/campaign/contact/recipient.rb +0 -78
  17. data/lib/sendgrid4r/cli/campaign/contact/reserved_field.rb +0 -17
  18. data/lib/sendgrid4r/cli/campaign/contact/segment.rb +0 -105
  19. data/lib/sendgrid4r/cli/campaign/sender.rb +0 -83
  20. data/lib/sendgrid4r/cli/cancel_schedules/batch_id.rb +0 -23
  21. data/lib/sendgrid4r/cli/cancel_schedules/cancel_schedule.rb +0 -55
  22. data/lib/sendgrid4r/cli/category.rb +0 -16
  23. data/lib/sendgrid4r/cli/ipam/activity.rb +0 -16
  24. data/lib/sendgrid4r/cli/ipam/ipam.rb +0 -14
  25. data/lib/sendgrid4r/cli/ipam/whitelist.rb +0 -39
  26. data/lib/sendgrid4r/cli/ips/address.rb +0 -48
  27. data/lib/sendgrid4r/cli/ips/ip.rb +0 -17
  28. data/lib/sendgrid4r/cli/ips/pool.rb +0 -48
  29. data/lib/sendgrid4r/cli/ips/warmup.rb +0 -39
  30. data/lib/sendgrid4r/cli/mail.rb +0 -34
  31. data/lib/sendgrid4r/cli/settings/enforced_tls.rb +0 -24
  32. data/lib/sendgrid4r/cli/settings/mail.rb +0 -195
  33. data/lib/sendgrid4r/cli/settings/partner.rb +0 -37
  34. data/lib/sendgrid4r/cli/settings/settings.rb +0 -20
  35. data/lib/sendgrid4r/cli/settings/tracking.rb +0 -101
  36. data/lib/sendgrid4r/cli/sg.rb +0 -61
  37. data/lib/sendgrid4r/cli/sg_thor.rb +0 -50
  38. data/lib/sendgrid4r/cli/stats/advanced.rb +0 -74
  39. data/lib/sendgrid4r/cli/stats/category.rb +0 -35
  40. data/lib/sendgrid4r/cli/stats/global.rb +0 -18
  41. data/lib/sendgrid4r/cli/stats/parse.rb +0 -18
  42. data/lib/sendgrid4r/cli/stats/stats.rb +0 -23
  43. data/lib/sendgrid4r/cli/stats/subuser.rb +0 -67
  44. data/lib/sendgrid4r/cli/subusers/monitor.rb +0 -44
  45. data/lib/sendgrid4r/cli/subusers/subuser.rb +0 -77
  46. data/lib/sendgrid4r/cli/suppressions/block.rb +0 -43
  47. data/lib/sendgrid4r/cli/suppressions/bounce.rb +0 -41
  48. data/lib/sendgrid4r/cli/suppressions/global_unsubscribe.rb +0 -43
  49. data/lib/sendgrid4r/cli/suppressions/group.rb +0 -61
  50. data/lib/sendgrid4r/cli/suppressions/group_unsubscribe.rb +0 -43
  51. data/lib/sendgrid4r/cli/suppressions/invalid_email.rb +0 -43
  52. data/lib/sendgrid4r/cli/suppressions/spam_report.rb +0 -43
  53. data/lib/sendgrid4r/cli/suppressions/suppression.rb +0 -36
  54. data/lib/sendgrid4r/cli/templates/template.rb +0 -51
  55. data/lib/sendgrid4r/cli/templates/version.rb +0 -78
  56. data/lib/sendgrid4r/cli/user.rb +0 -86
  57. data/lib/sendgrid4r/cli/webhooks/event.rb +0 -53
  58. data/lib/sendgrid4r/cli/webhooks/parse.rb +0 -55
  59. data/lib/sendgrid4r/cli/webhooks/webhook.rb +0 -14
  60. data/lib/sendgrid4r/cli/whitelabel/domain.rb +0 -117
  61. data/lib/sendgrid4r/cli/whitelabel/ip.rb +0 -52
  62. data/lib/sendgrid4r/cli/whitelabel/link.rb +0 -96
  63. data/lib/sendgrid4r/cli/whitelabel/whitelabel.rb +0 -17
  64. data/spec/cli/alert_spec.rb +0 -71
  65. data/spec/cli/api_keys/api_key_spec.rb +0 -77
  66. data/spec/cli/api_keys/permission_spec.rb +0 -29
  67. data/spec/cli/campaign/campaign_spec.rb +0 -136
  68. data/spec/cli/campaign/contact/custom_field_spec.rb +0 -48
  69. data/spec/cli/campaign/contact/list_spec.rb +0 -88
  70. data/spec/cli/campaign/contact/recipient_spec.rb +0 -93
  71. data/spec/cli/campaign/contact/reserved_field_spec.rb +0 -20
  72. data/spec/cli/campaign/contact/segment_spec.rb +0 -93
  73. data/spec/cli/campaign/sender_spec.rb +0 -83
  74. data/spec/cli/cancel_schedules/batch_id_spec.rb +0 -33
  75. data/spec/cli/cancel_schedules/cancel_schedule_spec.rb +0 -69
  76. data/spec/cli/category_spec.rb +0 -23
  77. data/spec/cli/ipam/activity_spec.rb +0 -21
  78. data/spec/cli/ipam/ipam_spec.rb +0 -26
  79. data/spec/cli/ipam/whitelist_spec.rb +0 -47
  80. data/spec/cli/ips/address_spec.rb +0 -57
  81. data/spec/cli/ips/ip_spec.rb +0 -33
  82. data/spec/cli/ips/pool_spec.rb +0 -57
  83. data/spec/cli/ips/warmup_spec.rb +0 -47
  84. data/spec/cli/mail_spec.rb +0 -37
  85. data/spec/cli/settings/enforced_tls_spec.rb +0 -30
  86. data/spec/cli/settings/mail_spec.rb +0 -255
  87. data/spec/cli/settings/partner_spec.rb +0 -47
  88. data/spec/cli/settings/settings_spec.rb +0 -40
  89. data/spec/cli/settings/tracking_spec.rb +0 -128
  90. data/spec/cli/sg_spec.rb +0 -87
  91. data/spec/cli/stats/advanced_spec.rb +0 -137
  92. data/spec/cli/stats/category_spec.rb +0 -57
  93. data/spec/cli/stats/global_spec.rb +0 -32
  94. data/spec/cli/stats/parse_spec.rb +0 -32
  95. data/spec/cli/stats/stats_spec.rb +0 -40
  96. data/spec/cli/stats/subuser_spec.rb +0 -104
  97. data/spec/cli/subusers/monitor_spec.rb +0 -52
  98. data/spec/cli/subusers/subuser_spec.rb +0 -88
  99. data/spec/cli/suppressions/block_spec.rb +0 -60
  100. data/spec/cli/suppressions/bounce_spec.rb +0 -58
  101. data/spec/cli/suppressions/global_unsubscribe_spec.rb +0 -59
  102. data/spec/cli/suppressions/group_spec.rb +0 -78
  103. data/spec/cli/suppressions/group_unsubscribe_spec.rb +0 -51
  104. data/spec/cli/suppressions/invalid_email_spec.rb +0 -60
  105. data/spec/cli/suppressions/spam_report_spec.rb +0 -60
  106. data/spec/cli/suppressions/suppression_spec.rb +0 -68
  107. data/spec/cli/templates/template_spec.rb +0 -65
  108. data/spec/cli/templates/version_spec.rb +0 -71
  109. data/spec/cli/user_spec.rb +0 -82
  110. data/spec/cli/webhooks/event_spec.rb +0 -67
  111. data/spec/cli/webhooks/parse_spec.rb +0 -72
  112. data/spec/cli/webhooks/webhook_spec.rb +0 -28
  113. data/spec/cli/whitelabel/domain_spec.rb +0 -112
  114. data/spec/cli/whitelabel/ip_spec.rb +0 -61
  115. data/spec/cli/whitelabel/link_spec.rb +0 -110
  116. data/spec/cli/whitelabel/whitelabel_spec.rb +0 -27
@@ -1,57 +0,0 @@
1
- # encoding: utf-8
2
- require File.dirname(__FILE__) + '/../../spec_helper'
3
-
4
- module SendGrid4r::CLI::Stats
5
- describe Category do
6
- describe 'integration test', :it do
7
- before do
8
- Dotenv.load
9
- end
10
-
11
- it '#get with mandatory params' do
12
- args = [
13
- 'get',
14
- '--api-key', ENV['SILVER_API_KEY'],
15
- '--start-date', '2016-01-01',
16
- '--categories', 'cat1'
17
- ]
18
- Category.start(args)
19
- end
20
-
21
- it '#get with full params' do
22
- args = [
23
- 'get',
24
- '--api-key', ENV['SILVER_API_KEY'],
25
- '--start-date', '2016-01-01',
26
- '--end-date', '2016-01-02',
27
- '--aggregated-by', 'day',
28
- '--categories', 'cat1'
29
- ]
30
- Category.start(args)
31
- end
32
-
33
- it '#sums with mandatory params' do
34
- args = [
35
- 'sums',
36
- '--api-key', ENV['SILVER_API_KEY'],
37
- '--start-date', '2016-01-01'
38
- ]
39
- Category.start(args)
40
- end
41
-
42
- it '#sums with full params' do
43
- args = [
44
- 'sums',
45
- '--api-key', ENV['SILVER_API_KEY'],
46
- '--start-date', '2016-01-01',
47
- '--end-date', '2016-01-02',
48
- '--sort-by-metric', 'requests',
49
- '--sort-by-direction', 'desc',
50
- '--limit', 10,
51
- '--offset', 0
52
- ]
53
- Category.start(args)
54
- end
55
- end
56
- end
57
- end
@@ -1,32 +0,0 @@
1
- # encoding: utf-8
2
- require File.dirname(__FILE__) + '/../../spec_helper'
3
-
4
- module SendGrid4r::CLI::Stats
5
- describe Global do
6
- describe 'integration test', :it do
7
- before do
8
- Dotenv.load
9
- end
10
-
11
- it '#get with mandatory params' do
12
- args = [
13
- 'get',
14
- '--api-key', ENV['SILVER_API_KEY'],
15
- '--start-date', '2016-01-01'
16
- ]
17
- Global.start(args)
18
- end
19
-
20
- it '#get with full params' do
21
- args = [
22
- 'get',
23
- '--api-key', ENV['SILVER_API_KEY'],
24
- '--start-date', '2016-01-01',
25
- '--end-date', '2016-01-02',
26
- '--aggregated-by', 'day'
27
- ]
28
- Global.start(args)
29
- end
30
- end
31
- end
32
- end
@@ -1,32 +0,0 @@
1
- # encoding: utf-8
2
- require File.dirname(__FILE__) + '/../../spec_helper'
3
-
4
- module SendGrid4r::CLI::Stats
5
- describe Parse do
6
- describe 'integration test', :it do
7
- before do
8
- Dotenv.load
9
- end
10
-
11
- it '#get with mandatory params' do
12
- args = [
13
- 'get',
14
- '--api-key', ENV['SILVER_API_KEY'],
15
- '--start-date', '2016-01-01'
16
- ]
17
- Parse.start(args)
18
- end
19
-
20
- it '#get with full params' do
21
- args = [
22
- 'get',
23
- '--api-key', ENV['SILVER_API_KEY'],
24
- '--start-date', '2016-01-01',
25
- '--end-date', '2016-01-02',
26
- '--aggregated-by', 'day'
27
- ]
28
- Parse.start(args)
29
- end
30
- end
31
- end
32
- end
@@ -1,40 +0,0 @@
1
- # encoding: utf-8
2
- require File.dirname(__FILE__) + '/../../spec_helper'
3
-
4
- module SendGrid4r::CLI::Stats
5
- describe Stats do
6
- describe 'integration test', :it do
7
- before do
8
- Dotenv.load
9
- end
10
-
11
- it '#advanced subcommand' do
12
- args = [
13
- 'advanced'
14
- ]
15
- Stats.start(args)
16
- end
17
-
18
- it '#global subcommand' do
19
- args = [
20
- 'global'
21
- ]
22
- Stats.start(args)
23
- end
24
-
25
- it '#parse subcommand' do
26
- args = [
27
- 'parse'
28
- ]
29
- Stats.start(args)
30
- end
31
-
32
- it '#subuser subcommand' do
33
- args = [
34
- 'subuser'
35
- ]
36
- Stats.start(args)
37
- end
38
- end
39
- end
40
- end
@@ -1,104 +0,0 @@
1
- # encoding: utf-8
2
- require File.dirname(__FILE__) + '/../../spec_helper'
3
-
4
- module SendGrid4r::CLI::Stats
5
- describe Subuser do
6
- describe 'integration test', :it do
7
- before do
8
- Dotenv.load
9
- end
10
-
11
- it '#get with mandatory params' do
12
- args = [
13
- 'get',
14
- '--api-key', ENV['SILVER_API_KEY'],
15
- '--start-date', '2016-01-01',
16
- '--subusers', ENV['SUBUSER4']
17
- ]
18
- Subuser.start(args)
19
- end
20
-
21
- it '#get with full params' do
22
- args = [
23
- 'get',
24
- '--api-key', ENV['SILVER_API_KEY'],
25
- '--start-date', '2016-01-01',
26
- '--end-date', '2016-01-02',
27
- '--aggregated-by', 'day',
28
- '--subusers', ENV['SUBUSER4']
29
- ]
30
- Subuser.start(args)
31
- end
32
-
33
- it '#sums with mandatory params' do
34
- args = [
35
- 'sums',
36
- '--api-key', ENV['SILVER_API_KEY'],
37
- '--start-date', '2015-01-01'
38
- ]
39
- Subuser.start(args)
40
- end
41
-
42
- it '#sums with full params' do
43
- args = [
44
- 'sums',
45
- '--api-key', ENV['SILVER_API_KEY'],
46
- '--start-date', '2015-01-01',
47
- '--end-date', '2015-01-31',
48
- '--sort-by-metric', 'requests',
49
- '--sort-by-direction', 'desc',
50
- '--limit', 10,
51
- '--offset', 0
52
- ]
53
- Subuser.start(args)
54
- end
55
-
56
- it '#list_monthly with mandatory params' do
57
- args = [
58
- 'list_monthly',
59
- '--api-key', ENV['SILVER_API_KEY'],
60
- '--date', '2015-01-01'
61
- ]
62
- Subuser.start(args)
63
- end
64
-
65
- it '#list_monthly with full params' do
66
- args = [
67
- 'list_monthly',
68
- '--api-key', ENV['SILVER_API_KEY'],
69
- '--date', '2015-01-01',
70
- '--subuser', ENV['SUBUSER4'],
71
- '--sort-by-metric', 'requests',
72
- '--sort-by-direction', 'desc',
73
- '--limit', 10,
74
- '--offset', 0
75
- ]
76
- Subuser.start(args)
77
- end
78
-
79
- it '#get_monthly with mandatory params' do
80
- args = [
81
- 'get_monthly',
82
- '--api-key', ENV['SILVER_API_KEY'],
83
- '--subuser-name', ENV['SUBUSER4'],
84
- '--date', '2015-01-01'
85
- ]
86
- Subuser.start(args)
87
- end
88
-
89
- it '#get_monthly with full params' do
90
- args = [
91
- 'get_monthly',
92
- '--api-key', ENV['SILVER_API_KEY'],
93
- '--subuser-name', ENV['SUBUSER4'],
94
- '--date', '2015-01-01',
95
- '--sort-by-metric', 'requests',
96
- '--sort-by-direction', 'desc',
97
- '--limit', 10,
98
- '--offset', 0
99
- ]
100
- Subuser.start(args)
101
- end
102
- end
103
- end
104
- end
@@ -1,52 +0,0 @@
1
- # encoding: utf-8
2
- require File.dirname(__FILE__) + '/../../spec_helper'
3
-
4
- module SendGrid4r::CLI::Subusers
5
- describe Monitor 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
- '--username', ENV['SUBUSER4']
16
- ]
17
- Monitor.start(args)
18
- end
19
-
20
- it '#create' do
21
- args = [
22
- 'create',
23
- '--api-key', ENV['SILVER_API_KEY'],
24
- '--username', ENV['SUBUSER4'],
25
- '--email', ENV['MAIL'],
26
- '--frequency', 10
27
- ]
28
- Monitor.start(args)
29
- end
30
-
31
- it '#update' do
32
- args = [
33
- 'update',
34
- '--api-key', ENV['SILVER_API_KEY'],
35
- '--username', ENV['SUBUSER4'],
36
- '--email', ENV['MAIL'],
37
- '--frequency', 10
38
- ]
39
- Monitor.start(args)
40
- end
41
-
42
- it '#delete' do
43
- args = [
44
- 'delete',
45
- '--api-key', ENV['SILVER_API_KEY'],
46
- '--username', ENV['SUBUSER4']
47
- ]
48
- Monitor.start(args)
49
- end
50
- end
51
- end
52
- end
@@ -1,88 +0,0 @@
1
- # encoding: utf-8
2
- require File.dirname(__FILE__) + '/../../spec_helper'
3
-
4
- module SendGrid4r::CLI::Subusers
5
- describe Subuser do
6
- describe 'integration test', :it do
7
- before do
8
- Dotenv.load
9
- end
10
-
11
- it '#list with full params' do
12
- args = [
13
- 'list',
14
- '--api-key', ENV['SILVER_API_KEY'],
15
- '--limit', 10,
16
- '--offset', 0,
17
- '--username', ENV['SUBUSER4']
18
- ]
19
- Subuser.start(args)
20
- end
21
-
22
- it '#create with full params' do
23
- args = [
24
- 'create',
25
- '--api-key', ENV['SILVER_API_KEY'],
26
- '--username', ENV['SUBUSER4'],
27
- '--email', ENV['MAIL'],
28
- '--password', ENV['PASS'],
29
- '--ips', ENV['IP']
30
- ]
31
- Subuser.start(args)
32
- end
33
-
34
- it '#enable' do
35
- args = [
36
- 'enable',
37
- '--api-key', ENV['SILVER_API_KEY'],
38
- '--username', ENV['SUBUSER4']
39
- ]
40
- Subuser.start(args)
41
- end
42
-
43
- it '#disable' do
44
- args = [
45
- 'disable',
46
- '--api-key', ENV['SILVER_API_KEY'],
47
- '--username', ENV['SUBUSER4']
48
- ]
49
- Subuser.start(args)
50
- end
51
-
52
- it '#delete' do
53
- args = [
54
- 'delete',
55
- '--api-key', ENV['SILVER_API_KEY'],
56
- '--username', ENV['SUBUSER4']
57
- ]
58
- Subuser.start(args)
59
- end
60
-
61
- it '#reputation' do
62
- args = [
63
- 'reputation',
64
- '--api-key', ENV['SILVER_API_KEY'],
65
- '--usernames', ENV['SUBUSER4'], ENV['SUBUSER2']
66
- ]
67
- Subuser.start(args)
68
- end
69
-
70
- it '#assign_ips' do
71
- args = [
72
- 'assign_ips',
73
- '--api-key', ENV['SILVER_API_KEY'],
74
- '--username', ENV['SUBUSER4'],
75
- '--ips', ENV['IP']
76
- ]
77
- Subuser.start(args)
78
- end
79
-
80
- it '#monitor subcommand' do
81
- args = [
82
- 'monitor'
83
- ]
84
- Subuser.start(args)
85
- end
86
- end
87
- end
88
- end
@@ -1,60 +0,0 @@
1
- # encoding: utf-8
2
- require File.dirname(__FILE__) + '/../../spec_helper'
3
-
4
- module SendGrid4r::CLI::Suppressions
5
- describe Block 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
- Block.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
- Block.start(args)
30
- end
31
-
32
- it '#delete with email' do
33
- args = [
34
- 'delete',
35
- '--api-key', ENV['SILVER_API_KEY'],
36
- '--email', ''
37
- ]
38
- Block.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
- Block.start(args)
48
- end
49
-
50
- it '#get' do
51
- args = [
52
- 'get',
53
- '--api-key', ENV['SILVER_API_KEY'],
54
- '--email', ''
55
- ]
56
- Block.start(args)
57
- end
58
- end
59
- end
60
- end
@@ -1,58 +0,0 @@
1
- # encoding: utf-8
2
- require File.dirname(__FILE__) + '/../../spec_helper'
3
-
4
- module SendGrid4r::CLI::Suppressions
5
- describe Bounce 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
- ]
18
- Bounce.start(args)
19
- end
20
-
21
- it '#delete with delete_all' do
22
- args = [
23
- 'delete',
24
- '--api-key', ENV['SILVER_API_KEY'],
25
- '--delete-all', true
26
- ]
27
- Bounce.start(args)
28
- end
29
-
30
- it '#delete with email' do
31
- args = [
32
- 'delete',
33
- '--api-key', ENV['SILVER_API_KEY'],
34
- '--email', ''
35
- ]
36
- Bounce.start(args)
37
- end
38
-
39
- it '#delete with emails' do
40
- args = [
41
- 'delete',
42
- '--api-key', ENV['SILVER_API_KEY'],
43
- '--emails', 'abc@abc.com', 'cde@cde.com'
44
- ]
45
- Bounce.start(args)
46
- end
47
-
48
- it '#get' do
49
- args = [
50
- 'get',
51
- '--api-key', ENV['SILVER_API_KEY'],
52
- '--email', ''
53
- ]
54
- Bounce.start(args)
55
- end
56
- end
57
- end
58
- end
@@ -1,59 +0,0 @@
1
- # encoding: utf-8
2
- require File.dirname(__FILE__) + '/../../spec_helper'
3
-
4
- module SendGrid4r::CLI::Suppressions
5
- describe GlobalUnsubscribe do
6
- describe 'integration test', :it do
7
- before do
8
- Dotenv.load
9
- end
10
-
11
- it '#list with no params' do
12
- args = [
13
- 'list',
14
- '--api-key', ENV['SILVER_API_KEY']
15
- ]
16
- GlobalUnsubscribe.start(args)
17
- end
18
-
19
- it '#list with full params' do
20
- args = [
21
- 'list',
22
- '--api-key', ENV['SILVER_API_KEY'],
23
- '--start-time', Time.local(2016, 1, 1).to_i,
24
- '--end-time', Time.local(2016, 1, 31).to_i,
25
- '--limit', 10,
26
- '--offset', 0
27
- ]
28
- GlobalUnsubscribe.start(args)
29
- end
30
-
31
- it '#add' do
32
- args = [
33
- 'add',
34
- '--api-key', ENV['SILVER_API_KEY'],
35
- '--recipient_emails', 'abc@abc.com', 'cde@cde.com'
36
- ]
37
- GlobalUnsubscribe.start(args)
38
- end
39
-
40
- it '#delete with email' do
41
- args = [
42
- 'delete',
43
- '--api-key', ENV['SILVER_API_KEY'],
44
- '--email_address', 'abc@abc.com'
45
- ]
46
- GlobalUnsubscribe.start(args)
47
- end
48
-
49
- it '#get' do
50
- args = [
51
- 'get',
52
- '--api-key', ENV['SILVER_API_KEY'],
53
- '--email_address', 'cde@cde.com'
54
- ]
55
- GlobalUnsubscribe.start(args)
56
- end
57
- end
58
- end
59
- end
@@ -1,78 +0,0 @@
1
- # encoding: utf-8
2
- require File.dirname(__FILE__) + '/../../spec_helper'
3
-
4
- module SendGrid4r::CLI::Suppressions
5
- describe Group 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', 'thor_test',
16
- '--description', 'thor test description',
17
- '--is-default', false
18
- ]
19
- Group.start(args)
20
- end
21
-
22
- it '#list without params' do
23
- args = [
24
- 'list',
25
- '--api-key', ENV['SILVER_API_KEY']
26
- ]
27
- Group.start(args)
28
- end
29
-
30
- it '#list with email' do
31
- args = [
32
- 'list',
33
- '--api-key', ENV['SILVER_API_KEY'],
34
- '--email-address', 'test1@test.com'
35
- ]
36
- Group.start(args)
37
- end
38
-
39
- it '#get' do
40
- args = [
41
- 'get',
42
- '--api-key', ENV['SILVER_API_KEY'],
43
- '--group-id', 889
44
- ]
45
- Group.start(args)
46
- end
47
-
48
- it '#update with mandatory params' do
49
- args = [
50
- 'update',
51
- '--api-key', ENV['SILVER_API_KEY'],
52
- '--group-id', 967
53
- ]
54
- Group.start(args)
55
- end
56
-
57
- it '#update with full params' do
58
- args = [
59
- 'update',
60
- '--api-key', ENV['SILVER_API_KEY'],
61
- '--group-id', 967,
62
- '--name', 'thor test 2',
63
- '--description', 'thor test description 2'
64
- ]
65
- Group.start(args)
66
- end
67
-
68
- it '#delete' do
69
- args = [
70
- 'delete',
71
- '--api-key', ENV['SILVER_API_KEY'],
72
- '--group-id', 967
73
- ]
74
- Group.start(args)
75
- end
76
- end
77
- end
78
- end