~singpolyma/sgx-jmp

3a438a22ff383ecd6cb33a9dcb41aabd275c2f95 — Stephen Paul Weber 5 months ago e983901
Try new TTS style

Old one does not work well for our self hosted one
2 files changed, 2 insertions(+), 2 deletions(-)

M lib/customer_ogm.rb
M test/test_customer_ogm.rb
M lib/customer_ogm.rb => lib/customer_ogm.rb +1 -1
@@ 56,7 56,7 @@ module CustomerOGM
		end

		def formatted_tel
			@tel.sub(/\A\+?1?(\d{3})(\d{3})/, "(\\1) \\2-")
			@tel.sub(/\A\+?1(\d{3})(\d{3})(\d+)/, "\\1.\\2.\\3").gsub(/(?=\d)/, " ")
		end

		def to_render

M test/test_customer_ogm.rb => test/test_customer_ogm.rb +1 -1
@@ 26,7 26,7 @@ class CustomerOGMTest < Minitest::Test
				</vcard4>
			XML
			assert_equal(
				[:voicemail_ogm_tts, { locals: { fn: "(555) 123-4567" } }],
				[:voicemail_ogm_tts, { locals: { fn: " 5 5 5. 1 2 3. 4 5 6 7" } }],
				CustomerOGM::TTS.new("+15551234567", vcard).to_render
			)
		end