enrichment_db 0.1.12 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/enrichment_db/helper.rb +2 -0
- data/lib/enrichment_db/version.rb +1 -1
- data/test/census/datum_test.rb +5 -0
- metadata +2 -4
- data/enrichment_db-0.1.4.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a737f15fb5aadd35c06a71fc51b3ef9405263b4f
|
4
|
+
data.tar.gz: efa874a6971330e778cbc7208de3570bb9506a77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a02a38e45100ecb1384ada2e32378d7f8344a0284f6d3b3487b33044b1db1e6e8b423549082a994d122f7f0f57bbb4df627b88735c6aeb19485d0897fbf6faf
|
7
|
+
data.tar.gz: 1d5fa5bc513ff0f9988a7ccd6422ea889154d15d7f9745d7223be2b5db4c7de6eb53cbd6337f0d8d087a5f227cc36c9db63690a2c150ef13148472923891e480
|
data/Gemfile.lock
CHANGED
data/lib/enrichment_db/helper.rb
CHANGED
@@ -25,6 +25,8 @@ module EnrichmentDb::Helper
|
|
25
25
|
region_type = result['region_type']
|
26
26
|
region_type = region_type[0..-2]
|
27
27
|
region = EnrichmentDb::Geo.const_get(region_type).by_id(id.to_i)
|
28
|
+
return if region.nil?
|
29
|
+
|
28
30
|
region = EnrichmentDb::Helper.hash_float_str_to_float(region)
|
29
31
|
result['region'] = region
|
30
32
|
result
|
data/test/census/datum_test.rb
CHANGED
@@ -7,4 +7,9 @@ describe EnrichmentDb::Census::Datum do
|
|
7
7
|
assert_equal 'Postcodes', result['region_type']
|
8
8
|
assert_equal 26, result['median_age_of_persons']
|
9
9
|
end
|
10
|
+
|
11
|
+
it 'should find postcode in census data but not in our database so return nil' do
|
12
|
+
result = EnrichmentDb::Census::Datum.by_id('selected_medians_and_averages', '6079')
|
13
|
+
assert_nil result
|
14
|
+
end
|
10
15
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enrichment_db
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Wallis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -64,7 +64,6 @@ files:
|
|
64
64
|
- LICENSE
|
65
65
|
- README.md
|
66
66
|
- Rakefile
|
67
|
-
- enrichment_db-0.1.4.gem
|
68
67
|
- enrichment_db.gemspec
|
69
68
|
- lib/enrichment_db.rb
|
70
69
|
- lib/enrichment_db/.DS_Store
|
@@ -136,7 +135,6 @@ test_files:
|
|
136
135
|
- LICENSE
|
137
136
|
- README.md
|
138
137
|
- Rakefile
|
139
|
-
- enrichment_db-0.1.4.gem
|
140
138
|
- enrichment_db.gemspec
|
141
139
|
- lib/enrichment_db.rb
|
142
140
|
- lib/enrichment_db/.DS_Store
|
data/enrichment_db-0.1.4.gem
DELETED
Binary file
|