Skip to content

Commit 6fdacec

Browse files
committed
style: scripts: update to use same env var names
1 parent b2d3737 commit 6fdacec

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

Diff for: scripts/call-recording_transcribe_voicebase.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def upload_recordings(vbsdk, dir)
2929
end
3030

3131
vbsdk = VoiceBase::V1::Client.new(
32-
ENV['RC_DEMO_VB_API_KEY'],
33-
ENV['RC_DEMO_VB_PASSWORD']
32+
ENV['RINGCENTRAL_DEMO_VB_API_KEY'],
33+
ENV['RINGCENTRAL_DEMO_VB_PASSWORD']
3434
)
3535

3636
upload_recordings(vbsdk, '.')

Diff for: scripts/call-recording_transcribe_voicebase_url.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ def transcribe_recordings(rcsdk, vbsdk)
3838
end
3939

4040
vbsdk = VoiceBase::V1::Client.new(
41-
ENV['RC_DEMO_VB_API_KEY'],
42-
ENV['RC_DEMO_VB_PASSWORD']
41+
ENV['RINGCENTRAL_DEMO_VB_API_KEY'],
42+
ENV['RINGCENTRAL_DEMO_VB_PASSWORD']
4343
)
4444

4545
transcribe_recordings(client, vbsdk)

Diff for: scripts/fax-custom-coverpage/fax_send.rb

+11-11
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ def build_template_html
2626
template = build_template
2727
html = template.call(
2828
fax_date: DateTime.now.to_s,
29-
fax_pages: ENV['RC_DEMO_FAX_PAGES'],
30-
fax_to_name: ENV['RC_DEMO_FAX_TO_NAME'],
31-
fax_to_phone: ENV['RC_DEMO_FAX_TO'],
32-
fax_to_fax: ENV['RC_DEMO_FAX_TO'],
33-
fax_from_name: ENV['RC_DEMO_FAX_FROM_NAME'],
34-
fax_from_phone: ENV['RC_DEMO_FAX_FROM'],
35-
fax_from_fax: ENV['RC_DEMO_FAX_FROM'],
36-
fax_coverpage_text: ENV['RC_DEMO_FAX_COVERPAGE_TEXT']
29+
fax_pages: ENV['RINGCENTRAL_DEMO_FAX_PAGES'],
30+
fax_to_name: ENV['RINGCENTRAL_DEMO_FAX_TO_NAME'],
31+
fax_to_phone: ENV['RINGCENTRAL_DEMO_FAX_TO'],
32+
fax_to_fax: ENV['RINGCENTRAL_DEMO_FAX_TO'],
33+
fax_from_name: ENV['RINGCENTRAL_DEMO_FAX_FROM_NAME'],
34+
fax_from_phone: ENV['RINGCENTRAL_DEMO_FAX_FROM'],
35+
fax_from_fax: ENV['RINGCENTRAL_DEMO_FAX_FROM'],
36+
fax_coverpage_text: ENV['RINGCENTRAL_DEMO_FAX_COVERPAGE_TEXT']
3737
)
3838
html
3939
end
4040

4141
def build_template
42-
hbs = ENV['RC_DEMO_FAX_COVERPAGE_TEMPLATE'].strip
42+
hbs = ENV['RINGCENTRAL_DEMO_FAX_COVERPAGE_TEMPLATE'].strip
4343
raise "Coverpage Template Does Not Exist: #{hbs}" unless File.exist? hbs
4444

4545
handlebars = Handlebars::Context.new
@@ -55,9 +55,9 @@ def build_template
5555
# Set coverIndex to 0 to remove standard template
5656
# add MIME::Media object as first file attachment
5757
res = client.messages.fax.create(
58-
to: ENV['RC_DEMO_FAX_TO'],
58+
to: ENV['RINGCENTRAL_DEMO_FAX_TO'],
5959
coverIndex: 0,
60-
files: [cover, ENV['RC_DEMO_FAX_FILE']]
60+
files: [cover, ENV['RINGCENTRAL_DEMO_FAX_FILE']]
6161
)
6262
pp res.body
6363

Diff for: scripts/fax_send_formdata.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
res = client.http.post do |req|
1515
req.url 'account/~/extension/~/fax'
16-
filepath = ENV['RC_DEMO_FAX_FILE']
16+
filepath = ENV['RINGCENTRAL_DEMO_FAX_FILE']
1717
ct = MIME::Types.type_for(filepath).first.content_type \
1818
|| 'application/octet-stream'
1919
req.body = {
20-
to: ENV['RC_DEMO_FAX_TO'],
20+
to: ENV['RINGCENTRAL_DEMO_FAX_TO'],
2121
coverPageText: 'Ruby REST Client Formdata',
2222
attachment: Faraday::UploadIO.new(filepath, ct)
2323
}

0 commit comments

Comments
 (0)