Socket
Book a DemoInstallSign in
Socket

appraisermetrics_report_service

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appraisermetrics_report_service

0.1.8
bundlerRubygems
Version published
Maintainers
1
Created
Source

appraisermetrics-report-service

Report Service app for AM app.

gem dependencies

  • prawn - https://github.com/prawnpdf/prawn - license: choice of GPLv2 or GPLv3
  • prawn/table - https://github.com/prawnpdf/prawn-table - license: choice of GPLv2 or GPLv3
  • money - https://github.com/RubyMoney/money - license: https://github.com/RubyMoney/money/blob/master/LICENSE
  • rspec for tests
  • pdf-reader (for specs) - https://github.com/yob/pdf-reader - license: MIT
  • the Date ruby module, should be included in any standard ruby app

usage

# will need a deploy key
gem 'appraisermetrics_report_service', git: 'https://github.com/StackPointCloud/appraisermetrics-report-service.git' 
require 'appraisermetrics_report_service'

ClosedSale

c = ClosedSale.new do
	write_content(ruby_hash_object, images, office_logo) # => returns ClosedSaleObject which inherits from Prawn::Document
end

# ruby_hash_object is identical to Comp document, with references to the Mongo Shell removed (ISODate, ObjectID) 
# images takes an array of image paths. [0] should be the profile image for the property
# office_logo takes a file path

EvalReport

# generate an eval report
r = EvalReport.new do
	write_content(subject, comparables, logo, docs={}) 
	# docs is an optional hash. All keys are should be filepaths, with the exception of 
	# :subjectphotos which is an Array of filepaths, 

	# subject is a hash, comparables is an array, logo is a filepath
end

Output

# render it to file
r.render_file("some_name.pdf") => local directory pdf called "some_name" with extension .pdf
# stringIO
StringIO.new(r.render) => <StringIO>


Testing/Dev

  • Rspec suite covers table methods invidually, as well as helper methods.
  • The pdf-reader gem is used in specs to read content into tests
  • The Sampler class is used to generate sample ruby objects to be used in specs.

To generate test pdf reports:

irb

load './spec/test_data/sampler'

# closed sale
Sampler.test_closed_sale

# eval report
Sampler.test_eval_report

FAQs

Package last updated on 31 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.