~singpolyma/sgx-jmp

92bd0c6fcc1788fbd7235c697003cbe30670bbfc — Stephen Paul Weber 1 year, 4 months ago 97df926
EmptyRepo can wrap another to allow mutation
2 files changed, 5 insertions(+), 2 deletions(-)

M lib/empty_repo.rb
M sgx_jmp.rb
M lib/empty_repo.rb => lib/empty_repo.rb +3 -1
@@ 1,5 1,7 @@
# frozen_string_literal: true

class EmptyRepo
require "delegate"

class EmptyRepo < SimpleDelegator
	def find(*); end
end

M sgx_jmp.rb => sgx_jmp.rb +2 -1
@@ 72,6 72,7 @@ require_relative "lib/backend_sgx"
require_relative "lib/bwmsgsv2_repo"
require_relative "lib/bandwidth_iris_patch"
require_relative "lib/bandwidth_tn_order"
require_relative "lib/bandwidth_tn_repo"
require_relative "lib/btc_sell_prices"
require_relative "lib/buy_account_credit_form"
require_relative "lib/configure_calls_form"


@@ 757,7 758,7 @@ Command.new(

		customer_repo = CustomerRepo.new(
			sgx_repo: Bwmsgsv2Repo.new,
			bandwidth_tn_repo: EmptyRepo.new # No CNAM in admin
			bandwidth_tn_repo: EmptyRepo.new(BandwidthTnRepo.new) # No CNAM in admin
		)

		Command.reply { |reply|