Skip to content

Commit fe18c70

Browse files
committed
Fix class name: Ruby requires class names to be constants (uppercase)
The previous commit renamed VoiceIt3 to voiceit3, but Ruby class names must start with an uppercase letter. Restore VoiceIt3 as the class name while keeping the lowercase filename.
1 parent d369905 commit fe18c70

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

test_example.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require 'json'
22
require './voiceit3.rb'
3-
vi = voiceit3.new(ENV['VOICEIT_API_KEY'], ENV['VOICEIT_API_TOKEN'])
3+
vi = VoiceIt3.new(ENV['VOICEIT_API_KEY'], ENV['VOICEIT_API_TOKEN'])
44
phrase = "Never forget tomorrow is a new day"
55
td = "test-data"
66
errors = 0

tests.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
require 'open-uri'
55
require 'net/http'
66

7-
class Testvoiceit3 < Test::Unit::TestCase
7+
class TestVoiceIt3 < Test::Unit::TestCase
88

99
def download_file(link, filename)
1010
File.open(filename, "wb") do |saved_file|
@@ -17,9 +17,9 @@ def download_file(link, filename)
1717
def test_notification_url() # test webhook URL's
1818
viapikey = ENV['VIAPIKEY']
1919
viapitoken = ENV['VIAPITOKEN']
20-
myVoiceIt = voiceit3.new(viapikey, viapitoken, 'https://api.voiceit.io')
20+
myVoiceIt = VoiceIt3.new(viapikey, viapitoken, 'https://api.voiceit.io')
2121
if ENV['BOXFUSE_ENV'] == 'voiceittest'
22-
File.write(ENV['HOME'] + '/' + 'platformVersion', voiceit3::VERSION)
22+
File.write(ENV['HOME'] + '/' + 'platformVersion', VoiceIt3::VERSION)
2323
end
2424
myVoiceIt.addNotificationUrl('https://voiceit.io')
2525
assert_equal(myVoiceIt.notification_url, "?notificationURL=https%3A%2F%2Fvoiceit.io")
@@ -30,7 +30,7 @@ def test_notification_url() # test webhook URL's
3030
def test_users_groups() # get all users, get all groups, create user, create group, add user to group, remove user from group, delete user delete group
3131
viapikey = ENV['VIAPIKEY']
3232
viapitoken = ENV['VIAPITOKEN']
33-
myVoiceIt = voiceit3.new(viapikey, viapitoken, 'https://api.voiceit.io')
33+
myVoiceIt = VoiceIt3.new(viapikey, viapitoken, 'https://api.voiceit.io')
3434
ret = JSON.parse(myVoiceIt.createUser())
3535
assert_equal(201, ret['status'])
3636
assert_equal('SUCC', ret['responseCode'])
@@ -93,7 +93,7 @@ def test_users_groups() # get all users, get all groups, create user, create gro
9393
def test_sub_accounts()
9494
viapikey = ENV['VIAPIKEY']
9595
viapitoken = ENV['VIAPITOKEN']
96-
myVoiceIt = voiceit3.new(viapikey, viapitoken, 'https://api.voiceit.io')
96+
myVoiceIt = VoiceIt3.new(viapikey, viapitoken, 'https://api.voiceit.io')
9797
ret = JSON.parse(myVoiceIt.createManagedSubAccount('Test','Ruby', '', '', ''))
9898
assert_equal(201, ret['status'])
9999
assert_equal('SUCC', ret['responseCode'])
@@ -125,7 +125,7 @@ def test_video() # video enrollment, video verification, video identification, (
125125

126126
viapikey = ENV['VIAPIKEY']
127127
viapitoken = ENV['VIAPITOKEN']
128-
myVoiceIt = voiceit3.new(viapikey, viapitoken, 'https://api.voiceit.io')
128+
myVoiceIt = VoiceIt3.new(viapikey, viapitoken, 'https://api.voiceit.io')
129129
userId1 = JSON.parse(myVoiceIt.createUser())['userId']
130130
userId2 = JSON.parse(myVoiceIt.createUser())['userId']
131131
groupId = JSON.parse(myVoiceIt.createGroup('Sample Group Description'))['groupId']
@@ -257,7 +257,7 @@ def test_voice() # voice enrollment, voice verification, voice identification, (
257257

258258
viapikey = ENV['VIAPIKEY']
259259
viapitoken = ENV['VIAPITOKEN']
260-
myVoiceIt = voiceit3.new(viapikey, viapitoken, 'https://api.voiceit.io')
260+
myVoiceIt = VoiceIt3.new(viapikey, viapitoken, 'https://api.voiceit.io')
261261
userId1 = JSON.parse(myVoiceIt.createUser())['userId']
262262
userId2 = JSON.parse(myVoiceIt.createUser())['userId']
263263
groupId = JSON.parse(myVoiceIt.createGroup('Sample Group Description'))['groupId']
@@ -388,7 +388,7 @@ def test_face() # face enrollment, face verification
388388

389389
viapikey = ENV['VIAPIKEY']
390390
viapitoken = ENV['VIAPITOKEN']
391-
myVoiceIt = voiceit3.new(viapikey, viapitoken, 'https://api.voiceit.io')
391+
myVoiceIt = VoiceIt3.new(viapikey, viapitoken, 'https://api.voiceit.io')
392392
userId1 = JSON.parse(myVoiceIt.createUser())['userId']
393393
userId2 = JSON.parse(myVoiceIt.createUser())['userId']
394394
groupId = JSON.parse(myVoiceIt.createGroup('Sample Group Description'))['groupId']

voiceit3.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'erb'
44

55

6-
class voiceit3
6+
class VoiceIt3
77

88
VERSION = '3.8.4'
99
PLATFORM_ID = '35'

0 commit comments

Comments
 (0)