twilio-ruby 5.61.2 → 5.64.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test-and-deploy.yml +124 -0
- data/.rubocop.yml +1 -1
- data/.rubocop_todo.yml +84 -21
- data/CHANGES.md +99 -0
- data/Makefile +3 -6
- data/README.md +5 -4
- data/lib/rack/twilio_webhook_authentication.rb +25 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +667 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +26 -0
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +19 -5
- data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +435 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +20 -20
- data/lib/twilio-ruby/rest/conversations/v1.rb +17 -0
- data/lib/twilio-ruby/rest/conversations.rb +9 -0
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +0 -77
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +33 -18
- data/lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb +474 -0
- data/lib/twilio-ruby/rest/insights/v1/conference.rb +512 -0
- data/lib/twilio-ruby/rest/insights/v1/setting.rb +215 -0
- data/lib/twilio-ruby/rest/insights/v1.rb +23 -0
- data/lib/twilio-ruby/rest/insights.rb +14 -0
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +14 -1
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +23 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +80 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +75 -18
- data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +372 -0
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +71 -30
- data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1.rb +16 -0
- data/lib/twilio-ruby/rest/supersim.rb +9 -0
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +130 -8
- data/lib/twilio-ruby/rest/verify/v2/service.rb +8 -2
- data/lib/twilio-ruby/rest/verify/v2/template.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +89 -21
- data/lib/twilio-ruby/rest/verify.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/composition.rb +7 -0
- data/lib/twilio-ruby/rest/video/v1/recording.rb +7 -0
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +7 -0
- data/lib/twilio-ruby/rest/video/v1/room.rb +30 -5
- data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +184 -0
- data/lib/twilio-ruby/rest/voice/v1.rb +21 -0
- data/lib/twilio-ruby/rest/voice.rb +8 -0
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +4 -4
- data/lib/twilio-ruby/version.rb +1 -1
- data/sonar-project.properties +1 -1
- data/twilio-ruby.gemspec +0 -1
- metadata +10 -18
- data/.github/workflows/deploy.yml +0 -65
- data/.github/workflows/test.yml +0 -52
@@ -0,0 +1,184 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Voice < Domain
|
12
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
15
|
+
class ArchivedCallList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the ArchivedCallList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [ArchivedCallList] ArchivedCallList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
end
|
26
|
+
|
27
|
+
##
|
28
|
+
# Provide a user friendly representation
|
29
|
+
def to_s
|
30
|
+
'#<Twilio.Voice.V1.ArchivedCallList>'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
36
|
+
class ArchivedCallPage < Page
|
37
|
+
##
|
38
|
+
# Initialize the ArchivedCallPage
|
39
|
+
# @param [Version] version Version that contains the resource
|
40
|
+
# @param [Response] response Response from the API
|
41
|
+
# @param [Hash] solution Path solution for the resource
|
42
|
+
# @return [ArchivedCallPage] ArchivedCallPage
|
43
|
+
def initialize(version, response, solution)
|
44
|
+
super(version, response)
|
45
|
+
|
46
|
+
# Path Solution
|
47
|
+
@solution = solution
|
48
|
+
end
|
49
|
+
|
50
|
+
##
|
51
|
+
# Build an instance of ArchivedCallInstance
|
52
|
+
# @param [Hash] payload Payload response from the API
|
53
|
+
# @return [ArchivedCallInstance] ArchivedCallInstance
|
54
|
+
def get_instance(payload)
|
55
|
+
ArchivedCallInstance.new(@version, payload, )
|
56
|
+
end
|
57
|
+
|
58
|
+
##
|
59
|
+
# Provide a user friendly representation
|
60
|
+
def to_s
|
61
|
+
'<Twilio.Voice.V1.ArchivedCallPage>'
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
##
|
66
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
67
|
+
class ArchivedCallContext < InstanceContext
|
68
|
+
##
|
69
|
+
# Initialize the ArchivedCallContext
|
70
|
+
# @param [Version] version Version that contains the resource
|
71
|
+
# @param [Date] date The date of the Call in UTC.
|
72
|
+
# @param [String] sid The Twilio-provided Call SID that uniquely identifies the
|
73
|
+
# Call resource to delete
|
74
|
+
# @return [ArchivedCallContext] ArchivedCallContext
|
75
|
+
def initialize(version, date, sid)
|
76
|
+
super(version)
|
77
|
+
|
78
|
+
# Path Solution
|
79
|
+
@solution = {date: date, sid: sid, }
|
80
|
+
@uri = "/Archives/#{@solution[:date]}/Calls/#{@solution[:sid]}"
|
81
|
+
end
|
82
|
+
|
83
|
+
##
|
84
|
+
# Delete the ArchivedCallInstance
|
85
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
86
|
+
def delete
|
87
|
+
@version.delete('DELETE', @uri)
|
88
|
+
end
|
89
|
+
|
90
|
+
##
|
91
|
+
# Provide a user friendly representation
|
92
|
+
def to_s
|
93
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
94
|
+
"#<Twilio.Voice.V1.ArchivedCallContext #{context}>"
|
95
|
+
end
|
96
|
+
|
97
|
+
##
|
98
|
+
# Provide a detailed, user friendly representation
|
99
|
+
def inspect
|
100
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
101
|
+
"#<Twilio.Voice.V1.ArchivedCallContext #{context}>"
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
##
|
106
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
107
|
+
class ArchivedCallInstance < InstanceResource
|
108
|
+
##
|
109
|
+
# Initialize the ArchivedCallInstance
|
110
|
+
# @param [Version] version Version that contains the resource
|
111
|
+
# @param [Hash] payload payload that contains response from Twilio
|
112
|
+
# @param [Date] date The date of the Call in UTC.
|
113
|
+
# @param [String] sid The Twilio-provided Call SID that uniquely identifies the
|
114
|
+
# Call resource to delete
|
115
|
+
# @return [ArchivedCallInstance] ArchivedCallInstance
|
116
|
+
def initialize(version, payload, date: nil, sid: nil)
|
117
|
+
super(version)
|
118
|
+
|
119
|
+
# Marshaled Properties
|
120
|
+
@properties = {
|
121
|
+
'date' => Twilio.deserialize_iso8601_date(payload['date']),
|
122
|
+
'sid' => payload['sid'],
|
123
|
+
'url' => payload['url'],
|
124
|
+
}
|
125
|
+
|
126
|
+
# Context
|
127
|
+
@instance_context = nil
|
128
|
+
@params = {'date' => date || @properties['date'], 'sid' => sid || @properties['sid'], }
|
129
|
+
end
|
130
|
+
|
131
|
+
##
|
132
|
+
# Generate an instance context for the instance, the context is capable of
|
133
|
+
# performing various actions. All instance actions are proxied to the context
|
134
|
+
# @return [ArchivedCallContext] ArchivedCallContext for this ArchivedCallInstance
|
135
|
+
def context
|
136
|
+
unless @instance_context
|
137
|
+
@instance_context = ArchivedCallContext.new(@version, @params['date'], @params['sid'], )
|
138
|
+
end
|
139
|
+
@instance_context
|
140
|
+
end
|
141
|
+
|
142
|
+
##
|
143
|
+
# @return [Date] date
|
144
|
+
def date
|
145
|
+
@properties['date']
|
146
|
+
end
|
147
|
+
|
148
|
+
##
|
149
|
+
# @return [String] sid
|
150
|
+
def sid
|
151
|
+
@properties['sid']
|
152
|
+
end
|
153
|
+
|
154
|
+
##
|
155
|
+
# @return [String] The absolute URL of the resource
|
156
|
+
def url
|
157
|
+
@properties['url']
|
158
|
+
end
|
159
|
+
|
160
|
+
##
|
161
|
+
# Delete the ArchivedCallInstance
|
162
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
163
|
+
def delete
|
164
|
+
context.delete
|
165
|
+
end
|
166
|
+
|
167
|
+
##
|
168
|
+
# Provide a user friendly representation
|
169
|
+
def to_s
|
170
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
171
|
+
"<Twilio.Voice.V1.ArchivedCallInstance #{values}>"
|
172
|
+
end
|
173
|
+
|
174
|
+
##
|
175
|
+
# Provide a detailed, user friendly representation
|
176
|
+
def inspect
|
177
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
178
|
+
"<Twilio.Voice.V1.ArchivedCallInstance #{values}>"
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
@@ -15,6 +15,7 @@ module Twilio
|
|
15
15
|
def initialize(domain)
|
16
16
|
super
|
17
17
|
@version = 'v1'
|
18
|
+
@archived_calls = nil
|
18
19
|
@byoc_trunks = nil
|
19
20
|
@connection_policies = nil
|
20
21
|
@dialing_permissions = nil
|
@@ -22,6 +23,26 @@ module Twilio
|
|
22
23
|
@source_ip_mappings = nil
|
23
24
|
end
|
24
25
|
|
26
|
+
##
|
27
|
+
# @param [Date] date The date of the Call in UTC.
|
28
|
+
# @param [String] sid The Twilio-provided Call SID that uniquely identifies the
|
29
|
+
# Call resource to delete
|
30
|
+
# @return [Twilio::REST::Voice::V1::ArchivedCallContext] if sid was passed.
|
31
|
+
# @return [Twilio::REST::Voice::V1::ArchivedCallList]
|
32
|
+
def archived_calls(date=:unset, sid=:unset)
|
33
|
+
if date.nil?
|
34
|
+
raise ArgumentError, 'date cannot be nil'
|
35
|
+
end
|
36
|
+
if sid.nil?
|
37
|
+
raise ArgumentError, 'sid cannot be nil'
|
38
|
+
end
|
39
|
+
if date == :unset && sid == :unset
|
40
|
+
@archived_calls ||= ArchivedCallList.new self
|
41
|
+
else
|
42
|
+
ArchivedCallContext.new(self, date, sid)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
25
46
|
##
|
26
47
|
# @param [String] sid The Twilio-provided string that uniquely identifies the BYOC
|
27
48
|
# Trunk resource to fetch.
|
@@ -28,6 +28,14 @@ module Twilio
|
|
28
28
|
@v1 ||= V1.new self
|
29
29
|
end
|
30
30
|
|
31
|
+
##
|
32
|
+
# @param [String] sid The call sid
|
33
|
+
# @return [Twilio::REST::Voice::V1::ArchivedCallInstance] if sid was passed.
|
34
|
+
# @return [Twilio::REST::Voice::V1::ArchivedCallList]
|
35
|
+
def archived_calls(date=:unset, sid=:unset)
|
36
|
+
self.v1.archived_calls(date, sid)
|
37
|
+
end
|
38
|
+
|
31
39
|
##
|
32
40
|
# @param [String] sid The unique string that that we created to identify the BYOC
|
33
41
|
# Trunk resource.
|
@@ -458,25 +458,25 @@ module Twilio
|
|
458
458
|
end
|
459
459
|
|
460
460
|
##
|
461
|
-
# @return [String] Deprecated
|
461
|
+
# @return [String] Deprecated
|
462
462
|
def sms_fallback_method
|
463
463
|
@properties['sms_fallback_method']
|
464
464
|
end
|
465
465
|
|
466
466
|
##
|
467
|
-
# @return [String] Deprecated
|
467
|
+
# @return [String] Deprecated
|
468
468
|
def sms_fallback_url
|
469
469
|
@properties['sms_fallback_url']
|
470
470
|
end
|
471
471
|
|
472
472
|
##
|
473
|
-
# @return [String] Deprecated
|
473
|
+
# @return [String] Deprecated
|
474
474
|
def sms_method
|
475
475
|
@properties['sms_method']
|
476
476
|
end
|
477
477
|
|
478
478
|
##
|
479
|
-
# @return [String] Deprecated
|
479
|
+
# @return [String] Deprecated
|
480
480
|
def sms_url
|
481
481
|
@properties['sms_url']
|
482
482
|
end
|
data/lib/twilio-ruby/version.rb
CHANGED
data/sonar-project.properties
CHANGED
data/twilio-ruby.gemspec
CHANGED
@@ -36,7 +36,6 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_development_dependency 'rack', '~> 2.0'
|
37
37
|
spec.add_development_dependency 'rake', '~> 13.0'
|
38
38
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
39
|
-
spec.add_development_dependency 'rubocop', '~> 0.82.0'
|
40
39
|
spec.add_development_dependency 'yard', '~> 0.9.9'
|
41
40
|
spec.add_development_dependency 'logger', '~> 1.4.2'
|
42
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.64.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Twilio API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -160,20 +160,6 @@ dependencies:
|
|
160
160
|
- - "~>"
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: '3.0'
|
163
|
-
- !ruby/object:Gem::Dependency
|
164
|
-
name: rubocop
|
165
|
-
requirement: !ruby/object:Gem::Requirement
|
166
|
-
requirements:
|
167
|
-
- - "~>"
|
168
|
-
- !ruby/object:Gem::Version
|
169
|
-
version: 0.82.0
|
170
|
-
type: :development
|
171
|
-
prerelease: false
|
172
|
-
version_requirements: !ruby/object:Gem::Requirement
|
173
|
-
requirements:
|
174
|
-
- - "~>"
|
175
|
-
- !ruby/object:Gem::Version
|
176
|
-
version: 0.82.0
|
177
163
|
- !ruby/object:Gem::Dependency
|
178
164
|
name: yard
|
179
165
|
requirement: !ruby/object:Gem::Requirement
|
@@ -212,8 +198,7 @@ extra_rdoc_files:
|
|
212
198
|
- LICENSE
|
213
199
|
files:
|
214
200
|
- ".dockerignore"
|
215
|
-
- ".github/workflows/deploy.yml"
|
216
|
-
- ".github/workflows/test.yml"
|
201
|
+
- ".github/workflows/test-and-deploy.yml"
|
217
202
|
- ".gitignore"
|
218
203
|
- ".rubocop.yml"
|
219
204
|
- ".rubocop_todo.yml"
|
@@ -287,6 +272,7 @@ files:
|
|
287
272
|
- lib/twilio-ruby/rest/api/v2010/account/call/payment.rb
|
288
273
|
- lib/twilio-ruby/rest/api/v2010/account/call/recording.rb
|
289
274
|
- lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb
|
275
|
+
- lib/twilio-ruby/rest/api/v2010/account/call/stream.rb
|
290
276
|
- lib/twilio-ruby/rest/api/v2010/account/conference.rb
|
291
277
|
- lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb
|
292
278
|
- lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb
|
@@ -392,6 +378,7 @@ files:
|
|
392
378
|
- lib/twilio-ruby/rest/client.rb
|
393
379
|
- lib/twilio-ruby/rest/conversations.rb
|
394
380
|
- lib/twilio-ruby/rest/conversations/v1.rb
|
381
|
+
- lib/twilio-ruby/rest/conversations/v1/address_configuration.rb
|
395
382
|
- lib/twilio-ruby/rest/conversations/v1/configuration.rb
|
396
383
|
- lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb
|
397
384
|
- lib/twilio-ruby/rest/conversations/v1/conversation.rb
|
@@ -448,8 +435,11 @@ files:
|
|
448
435
|
- lib/twilio-ruby/rest/insights/v1/call/metric.rb
|
449
436
|
- lib/twilio-ruby/rest/insights/v1/call/summary.rb
|
450
437
|
- lib/twilio-ruby/rest/insights/v1/call_summaries.rb
|
438
|
+
- lib/twilio-ruby/rest/insights/v1/conference.rb
|
439
|
+
- lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb
|
451
440
|
- lib/twilio-ruby/rest/insights/v1/room.rb
|
452
441
|
- lib/twilio-ruby/rest/insights/v1/room/participant.rb
|
442
|
+
- lib/twilio-ruby/rest/insights/v1/setting.rb
|
453
443
|
- lib/twilio-ruby/rest/ip_messaging.rb
|
454
444
|
- lib/twilio-ruby/rest/ip_messaging/v1.rb
|
455
445
|
- lib/twilio-ruby/rest/ip_messaging/v1/credential.rb
|
@@ -637,6 +627,7 @@ files:
|
|
637
627
|
- lib/twilio-ruby/rest/supersim.rb
|
638
628
|
- lib/twilio-ruby/rest/supersim/v1.rb
|
639
629
|
- lib/twilio-ruby/rest/supersim/v1/command.rb
|
630
|
+
- lib/twilio-ruby/rest/supersim/v1/esim_profile.rb
|
640
631
|
- lib/twilio-ruby/rest/supersim/v1/fleet.rb
|
641
632
|
- lib/twilio-ruby/rest/supersim/v1/ip_command.rb
|
642
633
|
- lib/twilio-ruby/rest/supersim/v1/network.rb
|
@@ -743,6 +734,7 @@ files:
|
|
743
734
|
- lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb
|
744
735
|
- lib/twilio-ruby/rest/voice.rb
|
745
736
|
- lib/twilio-ruby/rest/voice/v1.rb
|
737
|
+
- lib/twilio-ruby/rest/voice/v1/archived_call.rb
|
746
738
|
- lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb
|
747
739
|
- lib/twilio-ruby/rest/voice/v1/connection_policy.rb
|
748
740
|
- lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb
|
@@ -1,65 +0,0 @@
|
|
1
|
-
name: Deploy
|
2
|
-
on:
|
3
|
-
push:
|
4
|
-
tags:
|
5
|
-
- '*'
|
6
|
-
workflow_dispatch:
|
7
|
-
|
8
|
-
jobs:
|
9
|
-
deploy:
|
10
|
-
name: Deploy to Rubygems
|
11
|
-
runs-on: ubuntu-latest
|
12
|
-
steps:
|
13
|
-
- name: Checkout twilio-ruby
|
14
|
-
uses: actions/checkout@v2
|
15
|
-
with:
|
16
|
-
fetch-depth: 0
|
17
|
-
|
18
|
-
- name: Login to Docker Hub
|
19
|
-
uses: docker/login-action@v1
|
20
|
-
with:
|
21
|
-
username: ${{ secrets.DOCKER_USERNAME }}
|
22
|
-
password: ${{ secrets.DOCKER_AUTH_TOKEN }}
|
23
|
-
|
24
|
-
# The expression strips off the shortest match from the front of the string to yield just the tag name as the output
|
25
|
-
- name: Get tagged version
|
26
|
-
run: echo "GITHUB_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
27
|
-
|
28
|
-
- name: Build and Push image
|
29
|
-
run: make docker-build && make docker-push
|
30
|
-
|
31
|
-
- name: Set up Ruby
|
32
|
-
uses: ruby/setup-ruby@v1
|
33
|
-
with:
|
34
|
-
ruby-version: 2.4
|
35
|
-
bundler-cache: true
|
36
|
-
|
37
|
-
- run: bundle install
|
38
|
-
- name: Publish to Rubygems
|
39
|
-
env:
|
40
|
-
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
|
41
|
-
run: |
|
42
|
-
mkdir -p $HOME/.gem
|
43
|
-
touch $HOME/.gem/credentials
|
44
|
-
chmod 0600 $HOME/.gem/credentials
|
45
|
-
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
46
|
-
gem build *.gemspec
|
47
|
-
gem push *.gem
|
48
|
-
|
49
|
-
notify-on-failure:
|
50
|
-
name: Slack notify on failure
|
51
|
-
if: ${{ failure() }}
|
52
|
-
needs: [deploy]
|
53
|
-
runs-on: ubuntu-latest
|
54
|
-
steps:
|
55
|
-
- uses: rtCamp/action-slack-notify@v2
|
56
|
-
env:
|
57
|
-
SLACK_COLOR: ${{ needs.deploy.status }}
|
58
|
-
SLACK_ICON_EMOJI: ':github:'
|
59
|
-
SLACK_MESSAGE: ${{ format('Failed to publish {1} to RubyGems{3} {0}/{1}/actions/runs/{2}', github.server_url, github.repository, github.run_id, ':') }}
|
60
|
-
SLACK_TITLE: Deployment Failure
|
61
|
-
SLACK_USERNAME: GitHub Actions
|
62
|
-
SLACK_MSG_AUTHOR: twilio-dx
|
63
|
-
SLACK_FOOTER: Posted automatically using GitHub Actions
|
64
|
-
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
65
|
-
MSG_MINIMAL: true
|
data/.github/workflows/test.yml
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
name: Tests
|
2
|
-
on:
|
3
|
-
push:
|
4
|
-
branches: [ '*' ]
|
5
|
-
pull_request:
|
6
|
-
branches: [ main ]
|
7
|
-
schedule:
|
8
|
-
# Run automatically at 8AM PST Monday-Friday
|
9
|
-
- cron: '0 15 * * 1-5'
|
10
|
-
workflow_dispatch:
|
11
|
-
|
12
|
-
jobs:
|
13
|
-
test:
|
14
|
-
name: Test
|
15
|
-
runs-on: ubuntu-latest
|
16
|
-
timeout-minutes: 20
|
17
|
-
strategy:
|
18
|
-
matrix:
|
19
|
-
ruby: [2.4, 2.5, 2.6, 2.7, '3.0', ruby-head, jruby-9.2]
|
20
|
-
continue-on-error: ${{ matrix.ruby == 'ruby-head' }}
|
21
|
-
steps:
|
22
|
-
- name: Checkout twilio-ruby
|
23
|
-
uses: actions/checkout@v2
|
24
|
-
|
25
|
-
- name: Set up Ruby
|
26
|
-
uses: ruby/setup-ruby@v1
|
27
|
-
with:
|
28
|
-
ruby-version: ${{ matrix.ruby }}
|
29
|
-
bundler-cache: true
|
30
|
-
|
31
|
-
- run: bundle install --with development
|
32
|
-
- run: bundle exec rake install
|
33
|
-
- name: Run Unit Tests
|
34
|
-
run: make test
|
35
|
-
|
36
|
-
notify-on-failure:
|
37
|
-
name: Slack notify on failure
|
38
|
-
if: ${{ failure() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' }}
|
39
|
-
needs: [test]
|
40
|
-
runs-on: ubuntu-latest
|
41
|
-
steps:
|
42
|
-
- uses: rtCamp/action-slack-notify@v2
|
43
|
-
env:
|
44
|
-
SLACK_COLOR: ${{ needs.test.status }}
|
45
|
-
SLACK_ICON_EMOJI: ':github:'
|
46
|
-
SLACK_MESSAGE: ${{ format('Build {2} in {1} failed{3} {0}/{1}/actions/runs/{2}', github.server_url, github.repository, github.run_id, ':') }}
|
47
|
-
SLACK_TITLE: Build Failure
|
48
|
-
SLACK_USERNAME: GitHub Actions
|
49
|
-
SLACK_MSG_AUTHOR: twilio-dx
|
50
|
-
SLACK_FOOTER: Posted automatically using GitHub Actions
|
51
|
-
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
52
|
-
MSG_MINIMAL: true
|