appraisermetrics_report_service 0.1.6 → 0.1.7
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 +4 -4
- data/lib/appraisermetrics_report_service/version.rb +1 -1
- data/lib/closed_sale.rb +7 -2
- data/lib/eval_report.rb +7 -2
- data/spec/lib/closed_sale_spec.rb +10 -0
- data/spec/lib/eval_report_spec.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2470ef58844451b904f67492255e8cfcdea82328
|
4
|
+
data.tar.gz: a6a1540cdb8b8812b373aa8190bdaab6f0fbf145
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 362d720e74c6852e3908ca0370bae2d528a7cb77d6b8459e83fd5230bcee33acd848200d51b15bf9baca030d5831b5259c16fa573e933e15ec6983371bcd7812
|
7
|
+
data.tar.gz: b52f962220829d673c4380e8c7959d8b26b2ae65bfc0874dee3313609c1990b3f742eb2e749a99e88b558267bad3a88e380c5f9aa32a8eb9fa02cb519b48f852
|
data/lib/closed_sale.rb
CHANGED
@@ -610,15 +610,20 @@ class ClosedSale < Prawn::Document
|
|
610
610
|
def water_rights
|
611
611
|
water_rights_data = [
|
612
612
|
[{content: "Water Rights", colspan: 8}],
|
613
|
-
["Water Right No.", "Water Right", "Water Source", "Priority Date", "Beneficial Use", "No. Acres Irrigated", "Annual Volume Ac-Ft", "
|
613
|
+
["Water Right No.", "Water Right", "Water Source", "Priority Date", "Beneficial Use", "No. Acres Irrigated", "Annual Volume Ac-Ft", "Ac-Ft per Acre"]
|
614
614
|
]
|
615
615
|
|
616
616
|
rights = @rep[:waterrights]
|
617
617
|
if rights # node could be nil
|
618
618
|
rights.each do |r|
|
619
619
|
if r # array could be empty
|
620
|
+
if !r[:numIrrAcres] || r[:numIrrAcres] == 0
|
621
|
+
ac_ft_per = 0
|
622
|
+
else
|
623
|
+
ac_ft_per = (no_nil_number(r[:annVolume]).to_f / r[:numIrrAcres].to_f).round(1)
|
624
|
+
end
|
620
625
|
water_rights_data.push(
|
621
|
-
["#{r[:waterrightNum]}", "#{r[:waterRight]}", "#{r[:waterSrc]}", datemaker(r[:priorityDate]), "#{r[:purpose]}", "#{r[:numIrrAcres]}", "#{r[:annVolume]}"]
|
626
|
+
["#{r[:waterrightNum]}", "#{r[:waterRight]}", "#{r[:waterSrc]}", datemaker(r[:priorityDate]), "#{r[:purpose]}", "#{r[:numIrrAcres]}", "#{r[:annVolume]}", "#{ac_ft_per}"]
|
622
627
|
)
|
623
628
|
end
|
624
629
|
end
|
data/lib/eval_report.rb
CHANGED
@@ -1206,15 +1206,20 @@ class EvalReport < Prawn::Document
|
|
1206
1206
|
def water_rights
|
1207
1207
|
water_rights_data = [
|
1208
1208
|
[{content: "Water Rights", colspan: 8}],
|
1209
|
-
["Water Right No.", "Water Right", "Water Source", "Priority Date", "Beneficial Use", "No. Acres Irrigated", "Annual Volume Ac-Ft", "
|
1209
|
+
["Water Right No.", "Water Right", "Water Source", "Priority Date", "Beneficial Use", "No. Acres Irrigated", "Annual Volume Ac-Ft", "Ac-Ft per Acre"]
|
1210
1210
|
]
|
1211
1211
|
|
1212
1212
|
rights = @sub[:waterrights]
|
1213
1213
|
if rights # node could be nil
|
1214
1214
|
rights.each do |r|
|
1215
1215
|
if r # array could be empty
|
1216
|
+
if !r[:numIrrAcres] || r[:numIrrAcres] == 0
|
1217
|
+
ac_ft_per = 0
|
1218
|
+
else
|
1219
|
+
ac_ft_per = (no_nil_number(r[:annVolume]).to_f / r[:numIrrAcres].to_f).round(1)
|
1220
|
+
end
|
1216
1221
|
water_rights_data.push(
|
1217
|
-
["#{r[:waterrightNum]}", "#{r[:waterRight]}", "#{r[:waterSrc]}", datemaker(r[:priorityDate]), "#{r[:purpose]}", "#{r[:numIrrAcres]}", "#{r[:annVolume]}"]
|
1222
|
+
["#{r[:waterrightNum]}", "#{r[:waterRight]}", "#{r[:waterSrc]}", datemaker(r[:priorityDate]), "#{r[:purpose]}", "#{r[:numIrrAcres]}", "#{r[:annVolume]}", "#{ac_ft_per}"]
|
1218
1223
|
)
|
1219
1224
|
end
|
1220
1225
|
end
|
@@ -1,6 +1,16 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe 'closed_sale class' do
|
4
|
+
|
5
|
+
describe 'write_content' do
|
6
|
+
it 'should render without breaking' do # check for syntax errors
|
7
|
+
@pdf = ClosedSale.new do
|
8
|
+
@rep = Sampler.get_comp2
|
9
|
+
write_content(Sampler.get_comp2, Sampler.sample_closed_sale_images, Sampler.sample_logo)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
4
14
|
describe 'meta data table' do # meta data
|
5
15
|
context 'keys present' do
|
6
16
|
before :each do
|
@@ -2,6 +2,16 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe 'eval report class' do
|
4
4
|
|
5
|
+
describe '#write_content' do
|
6
|
+
it 'contains no obvious syntax errors' do
|
7
|
+
r = EvalReport.new do
|
8
|
+
comps = []
|
9
|
+
8.times {|c| comps << Sampler.get_comp2}
|
10
|
+
write_content(Sampler.get_eval1, comps, Sampler.sample_logo, Sampler.sample_eval_docs)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
5
15
|
describe '#meta_data' do
|
6
16
|
context 'with keys' do
|
7
17
|
it 'renders static content' do
|
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.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- StackPoint
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ttfunk
|