Remove remaining use of rabl

This commit is contained in:
Eric 2020-06-10 14:24:03 -05:00 committed by Eric Schultz
parent d4feb357fb
commit b4f201729e
5 changed files with 4 additions and 11 deletions

View file

@ -11,7 +11,6 @@ gem 'hamster', '~> 3.0' # Thread-safe collection classes for Ruby
gem 'parallel', '~> 1.17' # run processes in parallel
gem 'puma_worker_killer', '~> 0.1.1' # TODO: Investigate why puma workers need to be killed.
gem 'puma', '~> 4.0', '>= 4.0.1'
gem 'rabl', '~> 0.14.1' # JSON serialization https://github.com/nesquena/rabl
gem 'rake', '~> 12.3.2'
gem 'sassc-rails', '~> 2.1', '>= 2.1.2'
gem 'sassc', '~> 2.0', '>= 2.0.1'

View file

@ -265,8 +265,6 @@ GEM
puma_worker_killer (0.1.1)
get_process_mem (~> 0.2)
puma (>= 2.7, < 5)
rabl (0.14.1)
activesupport (>= 2.3.14)
rack (2.2.2)
rack-attack (5.4.2)
rack (>= 1.0, < 3)
@ -468,7 +466,6 @@ DEPENDENCIES
puma (~> 4.0, >= 4.0.1)
puma_worker_killer (~> 0.1.1)
qx!
rabl (~> 0.14.1)
rack-attack (~> 5.2)
rack-ssl (~> 1.4)
rack-timeout (~> 0.5.1)

View file

@ -3451,9 +3451,6 @@ Copyright (c) 2013 Michael Grosser <michael@grosser.it>
** parallel_tests; version 2.32.0 --
** puma_worker_killer; version 0.1.1 --
** qx; version 0.1.1 --
** rabl; version 0.14.1 --
Copyright (c) 2010 Nathan Esquenazi
Copyright (c) 2011-2013 Nathan Esquenazi.
** rack; version 2.2.2 --
Copyright (c) 2009-2018 Michael Fellinger <m.fellinger@gmail.com>
Copyright (c) Django Software Foundation and individual contributors.

View file

@ -18,6 +18,7 @@ module Nonprofits
def index
charge = current_nonprofit.charges.find(params[:charge_id])
@refunds = charge.refunds
render locals: {refunds: @refund}}
end
private

View file

@ -1,7 +1,6 @@
# frozen_string_literal: true
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
require 'rabl'
Rabl.configure do |config|
config.enable_json_callbacks = true
end
json.data refunds do |refund|
json.extract refund, :id, :amount, :created_at, :reason, :comment
end