Sha256: 367fe63f73f5a5edd2ee0b6183597f2f354be5adb5c6a6ad10af2e0a7a46e403

Contents?: true

Size: 567 Bytes

Versions: 6

Compression:

Stored size: 567 Bytes

Contents

# Local implementation of BorrowDirectController in dummy app,
# with local #patron_barcode method, that in our test dummy app
# takes from ENV/VCRFilter
class BorrowDirectController < UmlautBorrowDirect::ControllerImplementation
  # used for testing to test with bad barcodes
  @@force_patron_barcode = nil
  def self.force_patron_barcode=(v)
    @@force_patron_barcode = v
  end

  def patron_barcode
    return @@force_patron_barcode if @@force_patron_barcode

    if defined? VCRFilter
      VCRFilter[:bd_patron]
    else
      ENV["BD_PATRON"]
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
umlaut_borrow_direct-1.0.2 test/dummy/app/controllers/borrow_direct_controller.rb
umlaut_borrow_direct-1.0.1 test/dummy/app/controllers/borrow_direct_controller.rb
umlaut_borrow_direct-1.0.0 test/dummy/app/controllers/borrow_direct_controller.rb
umlaut_borrow_direct-1.0.0.pre3 test/dummy/app/controllers/borrow_direct_controller.rb
umlaut_borrow_direct-1.0.0.pre2 test/dummy/app/controllers/borrow_direct_controller.rb
umlaut_borrow_direct-1.0.0.pre.alpha.1 test/dummy/app/controllers/borrow_direct_controller.rb