appraisermetrics_report_service 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0d4ca9ad4041390d69d2c9f5cdde8e00269d4c96
4
- data.tar.gz: 75ef9a1275a9be42fb8e137ba4a593fcdf150d1a
3
+ metadata.gz: 6c1943150bf8449feab4a3a0c0b491de2dc1b9af
4
+ data.tar.gz: 69ad532b4a0c36300e2657f1443909c9d305e154
5
5
  SHA512:
6
- metadata.gz: fae4f6fc15fbef80f763ca5a489fdb6e488f18696e245bafe92afa0e2fccfdc4dc6725a115dccba1feeb1428592cd2fc43d2f820ef4764ed705af3c27faa6bd3
7
- data.tar.gz: 03b54fd044302884d899113a204b5fab507783e27d25901069acbf7b3deebe245c24e194dc6b86f1655a98fb7f913fd1aee0ab4d180e7d94189b0a2a34726035
6
+ metadata.gz: 5176424d1dac01ddaea2b9a36b31b8f19fb83813384c98af5614b3e95880202532244eb2f878c9606386ae206293695ba0d82f25f9dc4e941d339b7d349673a2
7
+ data.tar.gz: d12e1d8e29e46dcc5490f04bc8bb9ffeed386af49d8a5e333136c4953e98d630d87c419e2b200a9ae89de455ed1df58baead2968279361f97116c7f27729a074
@@ -1,3 +1,3 @@
1
1
  module AppraisermetricsReportService
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
data/lib/closed_sale.rb CHANGED
@@ -303,10 +303,29 @@ class ClosedSale < Prawn::Document
303
303
 
304
304
  def comments
305
305
  comments_data = [
306
- ["Comments"],
307
- ["#{@rep[:general_comments]}"]
306
+ ["Comments"]
308
307
  ]
309
308
 
309
+ comment_sections = [
310
+ :sale_adjustment_comments,
311
+ :general_comments,
312
+ :atmarket_comments,
313
+ :lease_comments,
314
+ :change_of_use,
315
+ :water_rights_cont,
316
+ :water_distribution_comment,
317
+ :easements_description,
318
+ :mineral_rights,
319
+ :permanent_plantings,
320
+ :property_improvement_comments
321
+ ]
322
+
323
+ comment_sections.each do |c| # only include if exists
324
+ if @rep[c]
325
+ comments_data << ["#{@rep[c]}"]
326
+ end
327
+ end
328
+
310
329
  table(comments_data) do
311
330
  row(0).style align: :center
312
331
  column(0).width = 270
data/lib/eval_report.rb CHANGED
@@ -45,8 +45,6 @@ class EvalReport < Prawn::Document
45
45
  ag_sales_map
46
46
  val_method_and_recon
47
47
  assumptions_and_conditions
48
- addendum_a
49
- addendum_b
50
48
  additional_docs
51
49
  finish_toc
52
50
  end
@@ -343,7 +341,7 @@ class EvalReport < Prawn::Document
343
341
  end
344
342
 
345
343
  def topo_maps
346
- header("LOCAL AREA MAP")
344
+ header("SUBJECT MAPS")
347
345
  move_down 25
348
346
  text "MAPS", size: 14, align: :center
349
347
 
@@ -374,7 +372,7 @@ class EvalReport < Prawn::Document
374
372
 
375
373
  def property_description
376
374
  header("PROPERTY DESCRIPTION")
377
- move_down 25
375
+ move_down 10
378
376
  text "PROPERTY DESCRIPTION, SURROUNDING LAND USES, REGIONAL ECONOMIC AND DEMOGRAPHIC OVERVIEW", size: 14, style: :bold
379
377
  font_size 6
380
378
  bounding_box([0, 645], height: 300, width: 340) do
@@ -670,6 +668,9 @@ class EvalReport < Prawn::Document
670
668
  end
671
669
 
672
670
  def property_features # container method to create various tables
671
+ move_down 3
672
+ header("PROPERTY DESCRIPTION")
673
+ move_down 5
673
674
  font_size 7
674
675
  stroke_bounds
675
676
  if @sub[:transactions] && @sub[:transactions].any?
@@ -744,7 +745,7 @@ class EvalReport < Prawn::Document
744
745
 
745
746
  def property_comparison
746
747
  header("DIRECT COMPARISON ANALYSIS")
747
- move_down 25
748
+ move_down 10
748
749
  font_size 7
749
750
 
750
751
  table(flip_comp_array(@comps.first(5))) do
@@ -752,12 +753,15 @@ class EvalReport < Prawn::Document
752
753
  columns(1..6).width = 75
753
754
  cells.padding = [1, 2.5]
754
755
  columns(1..6).style(align: :center)
756
+ row(0).style(border_right_width: 0, border_top_width: 0, border_left_width: 0, border_bottom_width: 0)
757
+ row(0).style(font_style: :bold, size: 11)
755
758
  end
756
759
 
757
760
  if @comps.length > 5
758
761
  start_new_page
762
+ font_size 11
759
763
  header("DIRECT COMPARISON ANALYSIS")
760
- move_down 25
764
+ move_down 10
761
765
  font_size 7
762
766
 
763
767
  second_page_comps = flip_comp_array(@comps[5..9])
@@ -767,6 +771,8 @@ class EvalReport < Prawn::Document
767
771
  columns(1..6).width = 75
768
772
  cells.padding = [1, 2.5]
769
773
  columns(1..6).style(align: :center)
774
+ row(0).style(border_right_width: 0, border_top_width: 0, border_left_width: 0, border_bottom_width: 0)
775
+ row(0).style(font_style: :bold, size: 11)
770
776
  end
771
777
  end
772
778
 
@@ -775,13 +781,13 @@ class EvalReport < Prawn::Document
775
781
  end
776
782
 
777
783
  def discussion_of_sales
778
- header("DIRECT COMPARISON ANALYSIS")
779
- font_size 10
780
784
  if @comps && @comps.any? # just skip the table if there aren't any comps
785
+ header("COMPARABLE SALES COMMENTS")
786
+ font_size 9
781
787
 
782
788
  table(flip_discussions(@comps.first(5))) do
783
789
  cells.padding = [1, 2.5]
784
- columns(0..5).width = 90
790
+ columns(0..4).width = 108
785
791
  row(0).style(align: :center, background_color: 'd7d7d7')
786
792
  cells.style(border_width: 0)
787
793
  columns(0..5).style(border_right_width: 0.5)
@@ -789,10 +795,10 @@ class EvalReport < Prawn::Document
789
795
 
790
796
  if @comps.length > 5
791
797
  start_new_page
792
- header("DIRECT COMPARISON ANALYSIS")
798
+ header("COMPARABLE SALES COMMENTS")
793
799
  table(flip_discussions(@comps[5..9])) do
794
800
  cells.padding = [1, 2.5]
795
- columns(0..5).width = 90
801
+ columns(0..4).width = 108
796
802
  row(0).style(align: :center, background_color: 'd7d7d7')
797
803
  cells.style(border_width: 0)
798
804
  columns(0..5).style(border_right_width: 0.5)
@@ -806,9 +812,9 @@ class EvalReport < Prawn::Document
806
812
  def flip_discussions(comps_to_flip)
807
813
  @discussion_increment ||= 1
808
814
  discussion_data = [
809
- ["Subject"]
815
+ []
810
816
  ]
811
- sale_discussions = ["N/A"]
817
+ sale_discussions = []
812
818
 
813
819
  comps_to_flip.each do |c|
814
820
  c_string = " "
@@ -842,7 +848,7 @@ class EvalReport < Prawn::Document
842
848
  end
843
849
 
844
850
  def ag_sales_map
845
- header("AGRICULTURE SALES LOCATION MAP")
851
+ header("SALES LOCATION MAP")
846
852
  move_down 50
847
853
  if @docs[:agsalesmap] && @docs[:agsalesmap].any?
848
854
  image "#{@docs[:agsalesmap][0]}", width: 500, position: :center
@@ -957,34 +963,6 @@ class EvalReport < Prawn::Document
957
963
  text "Evaluators Associated with this Evaluation Report are identified as follows:"
958
964
  move_down 10
959
965
  text "#{@sub[:validentification]}"
960
- start_new_page
961
- end
962
-
963
- def addendum_a
964
- # if an engagement letter is present, use it as a template for this page
965
- if @docs[:engagementletter] && @docs[:engagementletter].any?
966
- start_new_page(template: @docs[:engagementletter][0])
967
- header("ENGAGEMENT LETTER")
968
- else
969
- start_new_page
970
- header("ENGAGEMENT LETTER")
971
- move_down 25
972
- text "No engagement letter present.", size: 14, style: :bold
973
- end
974
- end
975
-
976
- def addendum_b
977
-
978
- if @docs[:legaldescription] && @docs[:legaldescription].any?
979
- start_new_page(template: @docs[:legaldescription][0])
980
- header("LEGAL DESCRIPTION")
981
- else
982
- start_new_page
983
- header("LEGAL DESCRIPTION")
984
- move_down 25
985
- text "No Legal Description file present.", size: 14, style: :bold
986
- end
987
- # end of document
988
966
  end
989
967
 
990
968
  def additional_docs
@@ -1004,6 +982,8 @@ class EvalReport < Prawn::Document
1004
982
  end
1005
983
  end
1006
984
 
985
+ pdf_doc_proc.call(:engagementletter, "ENGAGEMENT LETTER")
986
+ pdf_doc_proc.call(:legaldescription, "LEGAL DESCRIPTION")
1007
987
  pdf_doc_proc.call(:warrantydeed, "WARRANTY DEED/TRANSFER DEED")
1008
988
  pdf_doc_proc.call(:titleinsurancepolicy, "TITLE INSURANCE POLICY")
1009
989
  pdf_doc_proc.call(:lease, "LEASE")
@@ -1056,7 +1036,7 @@ class EvalReport < Prawn::Document
1056
1036
  props = [@sub, comps_to_flip].compact.flatten
1057
1037
  @comp_increment ||= 0
1058
1038
  final_a = [
1059
- [{content: 'Valuation Analysis - Sales Comparison Approach', colspan: 7}], # [0]
1039
+ [{content: 'Valuation Analysis', colspan: 7}], # [0]
1060
1040
  ['Characteristic', 'Subject'], # [1]
1061
1041
  ['Record No.'], ['Tax Parcel #(s)'], ['Address'], ['City'], ['State'], ['Zip Code'], ['Sale Date'], ['Sale Price'], # [2] -> [9]
1062
1042
  ['Conditions of Sale'], ['Adjusted Sale Price'], ['Property Rights Conveyed'], ['Unit of Comparison'], # [10 -> 13]
@@ -300,7 +300,7 @@ describe 'eval report class' do
300
300
  end
301
301
 
302
302
  @comparison_content = PDF::Reader.new(StringIO.new(@pdf.render)).page(1).to_s
303
- expect(@comparison_content).to include('DIRECT', 'Sales', 'Conditions')
303
+ expect(@comparison_content).to include('DIRECT', 'Conditions')
304
304
  end
305
305
 
306
306
  it 'renders dynamic content from keys' do
@@ -327,7 +327,7 @@ describe 'eval report class' do
327
327
  end
328
328
 
329
329
  @comparison_content = PDF::Reader.new(StringIO.new(@pdf.render)).page(1).to_s
330
- expect(@comparison_content).to include('DIRECT', 'Sales', 'Conditions')
330
+ expect(@comparison_content).to include('DIRECT', 'Conditions')
331
331
  end
332
332
  end
333
333
  end
@@ -360,7 +360,7 @@ describe 'eval report class' do
360
360
  end
361
361
 
362
362
  context 'without keys' do
363
- it 'renders static content' do
363
+ it 'does not render content' do
364
364
  @pdf = EvalReport.new do
365
365
  @sub = Sampler.get_eval1
366
366
  @comps = []
@@ -368,7 +368,7 @@ describe 'eval report class' do
368
368
  end
369
369
 
370
370
  @discussion_content = PDF::Reader.new(StringIO.new(@pdf.render)).page(1).to_s
371
- expect(@discussion_content).to include('DIRECT')
371
+ expect(@discussion_content).to include('')
372
372
  end
373
373
  end
374
374
 
@@ -483,84 +483,6 @@ describe 'eval report class' do
483
483
  end
484
484
  end
485
485
 
486
- describe '#addendum_a' do
487
- context 'with keys' do
488
- it 'renders static content' do
489
- @pdf = EvalReport.new do
490
- @sub = Sampler.get_eval1
491
- @docs = {engagementletter: ['./spec/test_data/pdfs/engagement_letter.pdf']}
492
- addendum_a
493
- end
494
-
495
- @addendum_a_content = PDF::Reader.new(StringIO.new(@pdf.render)).page(2).to_s
496
- expect(@addendum_a_content).to include('ENGAGEMENT')
497
- end
498
-
499
- it 'renders dynamic content from keys' do
500
- @pdf = EvalReport.new do
501
- @sub = Sampler.get_eval1
502
- @docs = {engagementletter: ['./spec/test_data/pdfs/engagement_letter.pdf']}
503
- addendum_a
504
- end
505
-
506
- @addendum_a_content = PDF::Reader.new(StringIO.new(@pdf.render)).page(2).to_s
507
- expect(@addendum_a_content).to include('test')
508
- end
509
- end
510
-
511
- context 'without keys' do
512
- it 'renders static content' do
513
- @pdf = EvalReport.new do
514
- @sub = {}
515
- @docs = {}
516
- addendum_a
517
- end
518
-
519
- @addendum_a_content = PDF::Reader.new(StringIO.new(@pdf.render)).page(2).to_s
520
- expect(@addendum_a_content).to include('ENGAGEMENT', 'present')
521
- end
522
- end
523
- end
524
-
525
- describe '#addendum_b' do
526
- context 'with keys' do
527
- it 'renders static content' do
528
- @pdf = EvalReport.new do
529
- @sub = {}
530
- @docs = {legaldescription: ['./spec/test_data/pdfs/legal_description.pdf']}
531
- addendum_b
532
- end
533
-
534
- @addendum_b_content = PDF::Reader.new(StringIO.new(@pdf.render)).page(2).to_s
535
- expect(@addendum_b_content).to include('LEGAL')
536
- end
537
-
538
- it 'renders inserts dynamic content from pdf' do
539
- @pdf = EvalReport.new do
540
- @sub = Sampler.get_eval1
541
- @docs = {legaldescription: ['./spec/test_data/pdfs/legal_description.pdf']}
542
- addendum_b
543
- end
544
-
545
- @addendum_b_content = PDF::Reader.new(StringIO.new(@pdf.render)).page(2).to_s
546
- expect(@addendum_b_content).to include('test')
547
- end
548
- end
549
-
550
- context 'without keys' do
551
- it 'renders static content' do
552
- @pdf = EvalReport.new do
553
- @sub = Sampler.get_eval1
554
- @docs = {}
555
- addendum_b
556
- end
557
-
558
- @addendum_b_content = PDF::Reader.new(StringIO.new(@pdf.render)).page(2).to_s
559
- expect(@addendum_b_content).to include('LEGAL')
560
- end
561
- end
562
- end
563
-
564
486
  describe '#header' do
565
487
  context 'with keys' do
566
488
  it 'renders static header content'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appraisermetrics_report_service
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - StackPoint
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-22 00:00:00.000000000 Z
11
+ date: 2015-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ttfunk
@@ -210,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
210
  version: '0'
211
211
  requirements: []
212
212
  rubyforge_project:
213
- rubygems_version: 2.4.5
213
+ rubygems_version: 2.2.2
214
214
  signing_key:
215
215
  specification_version: 4
216
216
  summary: '["A service to generate pdf reports"]'