The sugar version prevents the promise from being returned

Stephen Paul Weber created

Change summary

.rubocop.yml        | 3 +++
lib/backend_sgx.rb  | 2 +-
lib/customer.rb     | 2 +-
lib/registration.rb | 2 +-
4 files changed, 6 insertions(+), 3 deletions(-)

Detailed changes

.rubocop.yml 🔗

@@ -81,3 +81,6 @@ Style/FormatString:
 
 Style/FormatStringToken:
   EnforcedStyle: unannotated
+
+Naming/AccessorMethodName:
+  Enabled: false

lib/backend_sgx.rb 🔗

@@ -33,7 +33,7 @@ class BackendSgx
 		end
 	end
 
-	def fwd_timeout=(timeout)
+	def set_fwd_timeout(timeout)
 		REDIS.set("catapult_fwd_timeout-#{from_jid}", timeout)
 	end
 

lib/customer.rb 🔗

@@ -20,7 +20,7 @@ class Customer
 	attr_reader :customer_id, :balance, :jid
 	def_delegators :@plan, :active?, :activate_plan_starting_now, :bill_plan,
 	               :currency, :merchant_account, :plan_name, :auto_top_up_amount
-	def_delegators :@sgx, :register!, :registered?, :fwd_timeout=
+	def_delegators :@sgx, :register!, :registered?, :set_fwd_timeout
 	def_delegators :@usage, :usage_report, :message_usage, :incr_message_usage
 
 	def initialize(

lib/registration.rb 🔗

@@ -455,7 +455,7 @@ class Registration
 				EMPromise.all([
 					REDIS.del("pending_tel_for-#{@customer.jid}"),
 					REDIS.set("catapult_fwd-#{@tel}", cheogram_sip_addr),
-					@customer.fwd_timeout = 25 # ~5 seconds / ring, 5 rings
+					@customer.set_fwd_timeout(25) # ~5 seconds / ring, 5 rings
 				])
 			}.then do
 				Command.finish("Your JMP account has been activated as #{@tel}")