~singpolyma/jmp-pay

59cb1bd6da0f24d63a3b3c53198d4c80d8c3703b — Stephen Paul Weber 1 year, 8 months ago 737b8ac
add sentry
2 files changed, 11 insertions(+), 0 deletions(-)

M Gemfile
M config.ru
M Gemfile => Gemfile +1 -0
@@ 9,6 9,7 @@ gem "money-open-exchange-rates"
gem "pg"
gem "redis"
gem "roda"
gem "sentry-ruby"
gem "slim"

group(:development) do

M config.ru => config.ru +10 -0
@@ 15,6 15,14 @@ end

require_relative "lib/electrum"

if ENV["RACK_ENV"] == "production"
	require "sentry-ruby"
	Sentry.init do |config|
		config.traces_sample_rate = 1
	end
	use Sentry::Rack::CaptureExceptions
end

REDIS = Redis.new
PLANS = Dhall.load("env:PLANS").sync
BRAINTREE_CONFIG = Dhall.load("env:BRAINTREE_CONFIG").sync


@@ 198,6 206,8 @@ class JmpPay < Roda
		end

		r.on :jid do |jid|
			Sentry.set_user(id: request.params["customer_id"], jid: jid)

			gateway = CreditCardGateway.new(
				jid,
				request.params["customer_id"]