Skip to content

Commit 3818079

Browse files
committed
style: scripts: canonicalize credentials env var names and .env filenames
1 parent 6fdacec commit 3818079

23 files changed

+68
-85
lines changed

Diff for: .env

-21
This file was deleted.

Diff for: scripts/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ the beginning of your source describing what it does.
1515

1616
Many of the scripts in this folder use a `.env` file to hold application and
1717
user credentials. To create your own file, copy the sample file
18-
`rc_config_sample.json` to `.env` and add your own information.
18+
`credentials_sample.env.txt` to `.env` and add your own information.

Diff for: scripts/account-extensions.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
require 'pp'
55

66
# Set your credentials in the .env file
7-
# Use the rc_config_sample.env.txt file as a scaffold
7+
# Use the credentials_sample.env.txt file as a scaffold
88

99
client = RingCentralSdk::REST::Client.new do |config|
1010
config.load_env = true

Diff for: scripts/answering-rules.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
envPath = ENV['ENV_PATH'] || '.env'
1010
# Set your credentials in the .env file
11-
# Use the rc_config_sample.env.txt file as a scaffold
11+
# Use the credentials_sample.env.txt file as a scaffold
1212

1313
#client = RingCentralSdk::REST::Client.new do |config|
1414
# config.load_env = true

Diff for: scripts/call-recording_download.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
require 'pp'
66

77
# Set your credentials in the .env file
8-
# Use the rc_config_sample.env.txt file as a scaffold
8+
# Use the credentials_sample.env.txt file as a scaffold
99

1010
client = RingCentralSdk::REST::Client.new do |config|
1111
config.load_env = true

Diff for: scripts/call-recording_transcribe_voicebase.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# Guide version 1.1.4 PDF page 18.
1717
#
1818
# Set your credentials in the .env file
19-
# Use the rc_config_sample.env.txt file as a scaffold
19+
# Use the credentials_sample.env.txt file as a scaffold
2020

2121
def upload_recordings(vbsdk, dir)
2222
filepath = File.join(dir, 'recording_*.mp3')

Diff for: scripts/call-recording_transcribe_voicebase_url.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
require 'pp'
77

88
# Set your credentials in the .env file
9-
# Use the rc_config_sample.env.txt file as a scaffold
9+
# Use the credentials_sample.env.txt file as a scaffold
1010

1111
client = RingCentralSdk::REST::Client.new do |config|
1212
config.load_env = true

Diff for: scripts/credentials_sample.env.txt

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
RINGCENTRAL_CLIENT_ID=myAppKey
2+
RINGCENTRAL_CLIENT_SECRET=myAppSecret
3+
RINGCENTRAL_SERVER_URL=myRcApiServerUrl
4+
RINGCENTRAL_REDIRECT_URL=myRcApiRedirectUrl
5+
6+
RINGCENTRAL_USERNAME=myUsername
7+
RINGCENTRAL_EXTENSION=myExtension
8+
RINGCENTRAL_PASSWORD=myPassword
9+
10+
RINGCENTRAL_OAP_SERVER_URL=myOnlineAccountPortalServerUrl
11+
12+
RINGCENTRAL_DEMO_FAX_TO=demoFaxToPhoneNumber
13+
RINGCENTRAL_DEMO_FAX_COVERPAGE_TEXT=demoFaxCoverPageText
14+
RINGCENTRAL_DEMO_FAX_FILE=demoFaxFilepath
15+
16+
RINGCENTRAL_DEMO_RINGOUT_TO=+17752204114
17+
RINGCENTRAL_DEMO_RINGOUT_FROM=+19294151254
18+
RINGCENTRAL_DEMO_RINGOUT_PROMPT=false
19+
20+
RINGCENTRAL_DEMO_SMS_TO=+16505551212
21+
RINGCENTRAL_DEMO_SMS_FROM=+14155551212
22+
RINGCENTRAL_DEMO_SMS_TEXT=Test SMS from Ruby!
23+
RINGCENTRAL_DEMO_MMS_FILE=glip_chatbots_700x400.png
24+
25+
RINGCENTRAL_DEMO_VB_API_KEY=myVoiceBaseApiKey
26+
RINGCENTRAL_DEMO_VB_PASSWORD=myVoiceBasePassword
27+
28+
RC_DEMO_GLIP_WEBHOOK_URL=https://hooks.glip.com/webhook/11111111-2222-3333-4444-555555555555
29+
RC_DEMO_GLIP_WEBHOOK_ICON=http://example.com/icon.png

Diff for: scripts/fax-custom-coverpage/.env.sample

-17
This file was deleted.
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
RINGCENTRAL_CLIENT_ID=myAppKey
2+
RINGCENTRAL_CLIENT_SECRET=myAppSecret
3+
RINGCENTRAL_SERVER_URL=myRcApiServerUrl
4+
RINGCENTRAL_REDIRECT_URL=myRcApiRedirectUrl
5+
6+
RINGCENTRAL_USERNAME=myUsername
7+
RINGCENTRAL_EXTENSION=myExtension
8+
RINGCENTRAL_PASSWORD=myPassword
9+
10+
RINGCENTRAL_DEMO_FAX_PAGES=2
11+
RINGCENTRAL_DEMO_FAX_TO=demoFaxToPhoneNumber
12+
RINGCENTRAL_DEMO_FAX_FROM=demoFaxFromPhoneNumber
13+
RINGCENTRAL_DEMO_FAX_FROM_NAME=RingForce
14+
RINGCENTRAL_DEMO_FAX_TO_NAME=ACME Motors
15+
RINGCENTRAL_DEMO_FAX_COVERPAGE_TEXT=Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
16+
RINGCENTRAL_DEMO_FAX_FILEPATH=./asset_file.pdf
17+
RINGCENTRAL_DEMO_FAX_COVERPAGE_TEMPLATE=view_coverpage.handlebars

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
require 'mime_builder'
77

88
# Set your credentials in the .env file
9-
# Use the rc_config_sample.env.txt file as a scaffold
9+
# Use the credentials_sample.env.txt file as a scaffold
1010
client = RingCentralSdk::REST::Client.new do |config|
1111
config.dotenv = true
1212
end

Diff for: scripts/fax_download_new.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
require 'pp'
55

66
# Set your credentials in the .env file
7-
# Use the rc_config_sample.env.txt file as a scaffold
7+
# Use the credentials_sample.env.txt file as a scaffold
88

99
client = RingCentralSdk::REST::Client.new do |config|
1010
config.load_env = true

Diff for: scripts/fax_send.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
require 'pp'
66

77
# Set your credentials in the .env file
8-
# Use the rc_config_sample.env.txt file as a scaffold
8+
# Use the credentials_sample.env.txt file as a scaffold
99

1010
Dotenv.load ENV['ENV_PATH'] || '.env'
1111

Diff for: scripts/fax_send_formdata.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
require 'mime/types'
66

77
# Set your credentials in the .env file
8-
# Use the rc_config_sample.env.txt file as a scaffold
8+
# Use the credentials_sample.env.txt file as a scaffold
99

1010
client = RingCentralSdk::REST::Client.new do |config|
1111
config.load_env = true

Diff for: scripts/oauth2-sinatra/config-sample.env.txt

-6
This file was deleted.

Diff for: scripts/oauth2-sinatra/credentials_sample.env.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
RINGCENTRAL_CLIENT_ID=myAppKey
2+
RINGCENTRAL_CLIENT_SECRET=myAppSecret
3+
RINGCENTRAL_SERVER_URL=https://platform.devtest.ringcentral.com
4+
RINGCENTRAL_REDIRECT_URL=http://localhost:8080/callback
5+
MY_APP_HOST=localhost
6+
MY_APP_PORT=8080

Diff for: scripts/rc_config_sample.env.txt

-25
This file was deleted.

Diff for: scripts/sms_send.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
require 'pp'
66

77
# Set your credentials in the .env file
8-
# Use the rc_config_sample.env.txt file as a scaffold
8+
# Use the credentials_sample.env.txt file as a scaffold
99

1010
envPath = ENV['ENV_PATH'] || '.env'
1111
Dotenv.load envPath

Diff for: scripts/sms_send_mms.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
require 'pp'
66

77
# Set your credentials in the .env file
8-
# Use the rc_config_sample.env.txt file as a scaffold
8+
# Use the credentials_sample.env.txt file as a scaffold
99

1010
envPath = ENV['ENV_PATH'] || '.env'
1111
Dotenv.load envPath

Diff for: scripts/sms_subscription.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
require 'ringcentral_sdk'
55

66
# Set your credentials in the .env file
7-
# Use the rc_config_sample.env.txt file as a scaffold
7+
# Use the credentials_sample.env.txt file as a scaffold
88

99
client = RingCentralSdk::REST::Client.new do |config|
1010
config.load_env = true

Diff for: scripts/sms_to_chat.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
require 'glip_poster'
77

88
# Set your credentials in the .env file
9-
# Use the rc_config_sample.env.txt file as a scaffold
9+
# Use the credentials_sample.env.txt file as a scaffold
1010

1111
client = RingCentralSdk::REST::Client.new do |config|
1212
config.load_env = true

Diff for: scripts/subscription.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Dotenv.load(env_path) if File.exist?(env_path)
99

1010
# Set your credentials in the .env file
11-
# Use the rc_config_sample.env.txt file as a scaffold
11+
# Use the credentials_sample.env.txt file as a scaffold
1212

1313
client = RingCentralSdk::REST::Client.new do |config|
1414
config.app_key = ENV['RINGCENTRAL_CLIENT_ID']

Diff for: scripts/subscription_all_extensions.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
require 'ringcentral_sdk'
66

77
# Set your credentials in the .env file
8-
# Use the rc_config_sample.env.txt file as a scaffold
8+
# Use the credentials_sample.env.txt file as a scaffold
99

1010
client = RingCentralSdk::REST::Client.new do |config|
1111
config.load_env = true

0 commit comments

Comments
 (0)